{"title":"$:/plugins/tiddlywiki/jasmine","name":"Jasmine","description":"Jasmine testing framework","list":"readme","version":"5.2.2","plugin-type":"plugin","dependents":"","type":"application/json","tiddlers":{"$:/plugins/tiddlywiki/jasmine/jasmine/command.js":{"text":"var path = require('path'),\n    fs = require('fs');\n\nexports = module.exports = Command;\n\nvar subCommands = {\n  init: {\n    description: 'initialize jasmine',\n    action: initJasmine\n  },\n  examples: {\n    description: 'install examples',\n    action: installExamples\n  },\n  help: {\n    description: 'show help',\n    action: help,\n    alias: '-h'\n  },\n  version: {\n    description: 'show jasmine and jasmine-core versions',\n    action: version,\n    alias: '-v'\n  }\n};\n\nfunction Command(projectBaseDir, examplesDir, print) {\n  this.projectBaseDir = projectBaseDir;\n  this.specDir = path.join(projectBaseDir, 'spec');\n\n  var command = this;\n\n  this.run = function(jasmine, commands) {\n    setEnvironmentVariables(commands);\n\n    var commandToRun;\n    Object.keys(subCommands).forEach(function(cmd) {\n      var commandObject = subCommands[cmd];\n        if (commands.indexOf(cmd) >= 0) {\n        commandToRun = commandObject;\n      } else if(commandObject.alias && commands.indexOf(commandObject.alias) >= 0) {\n        commandToRun = commandObject;\n      }\n    });\n\n    if (commandToRun) {\n      commandToRun.action({jasmine: jasmine, projectBaseDir: command.projectBaseDir, specDir: command.specDir, examplesDir: examplesDir, print: print});\n    } else {\n      var env = parseOptions(commands);\n      if (env.unknownOptions.length > 0) {\n        process.exitCode = 1;\n        print('Unknown options: ' + env.unknownOptions.join(', '));\n        print('');\n        help({print: print});\n      } else {\n        runJasmine(jasmine, env, print);\n      }\n    }\n  };\n}\n\nfunction isFileArg(arg) {\n  return arg.indexOf('--') !== 0 && !isEnvironmentVariable(arg);\n}\n\nfunction parseOptions(argv) {\n  var files = [],\n      helpers = [],\n      requires = [],\n      unknownOptions = [],\n      color = process.stdout.isTTY || false,\n      reporter,\n      configPath,\n      filter,\n      stopOnFailure,\n      failFast,\n      random,\n      seed;\n\n  argv.forEach(function(arg) {\n    if (arg === '--no-color') {\n      color = false;\n    } else if (arg === '--color') {\n      color = true;\n    } else if (arg.match(\"^--filter=\")) {\n      filter = arg.match(\"^--filter=(.*)\")[1];\n    } else if (arg.match(\"^--helper=\")) {\n      helpers.push(arg.match(\"^--helper=(.*)\")[1]);\n    } else if (arg.match(\"^--require=\")) {\n      requires.push(arg.match(\"^--require=(.*)\")[1]);\n    } else if (arg.match(\"^--stop-on-failure=\")) {\n      stopOnFailure = arg.match(\"^--stop-on-failure=(.*)\")[1] === 'true';\n    } else if (arg.match(\"^--fail-fast=\")) {\n      failFast = arg.match(\"^--fail-fast=(.*)\")[1] === 'true';\n    } else if (arg.match(\"^--random=\")) {\n      random = arg.match(\"^--random=(.*)\")[1] === 'true';\n    } else if (arg.match(\"^--seed=\")) {\n      seed = arg.match(\"^--seed=(.*)\")[1];\n    } else if (arg.match(\"^--config=\")) {\n      configPath = arg.match(\"^--config=(.*)\")[1];\n    } else if (arg.match(\"^--reporter=\")) {\n      reporter = arg.match(\"^--reporter=(.*)\")[1];\n    } else if (isFileArg(arg)) {\n      files.push(arg);\n    } else if (!isEnvironmentVariable(arg)) {\n      unknownOptions.push(arg);\n    }\n  });\n  return {\n    color: color,\n    configPath: configPath,\n    filter: filter,\n    stopOnFailure: stopOnFailure,\n    failFast: failFast,\n    helpers: helpers,\n    requires: requires,\n    reporter: reporter,\n    files: files,\n    random: random,\n    seed: seed,\n    unknownOptions: unknownOptions\n  };\n}\n\nfunction runJasmine(jasmine, env, print) {\n  jasmine.loadConfigFile(env.configPath || process.env.JASMINE_CONFIG_PATH);\n  if (env.stopOnFailure !== undefined) {\n    jasmine.stopSpecOnExpectationFailure(env.stopOnFailure);\n  }\n  if (env.failFast !== undefined) {\n    jasmine.stopOnSpecFailure(env.failFast);\n  }\n  if (env.seed !== undefined) {\n    jasmine.seed(env.seed);\n  }\n  if (env.random !== undefined) {\n    jasmine.randomizeTests(env.random);\n  }\n  if (env.helpers !== undefined && env.helpers.length) {\n    jasmine.addHelperFiles(env.helpers);\n  }\n  if (env.requires !== undefined && env.requires.length) {\n    jasmine.addRequires(env.requires);\n  }\n  if (env.reporter !== undefined) {\n    try {\n      var Report = require(env.reporter);\n      var reporter = new Report();\n      jasmine.clearReporters();\n      jasmine.addReporter(reporter);\n    } catch(e) {\n      print('failed to register reporter \"' + env.reporter + '\"');\n      print(e.message);\n      print(e.stack);\n    }\n  }\n  jasmine.showColors(env.color);\n  jasmine.execute(env.files, env.filter);\n}\n\nfunction initJasmine(options) {\n  var print = options.print;\n  var specDir = options.specDir;\n  makeDirStructure(path.join(specDir, 'support/'));\n  if(!fs.existsSync(path.join(specDir, 'support/jasmine.json'))) {\n    fs.writeFileSync(path.join(specDir, 'support/jasmine.json'), fs.readFileSync(path.join(__dirname, '../lib/examples/jasmine.json'), 'utf-8'));\n  }\n  else {\n    print('spec/support/jasmine.json already exists in your project.');\n  }\n}\n\nfunction installExamples(options) {\n  var specDir = options.specDir;\n  var projectBaseDir = options.projectBaseDir;\n  var examplesDir = options.examplesDir;\n\n  makeDirStructure(path.join(specDir, 'support'));\n  makeDirStructure(path.join(specDir, 'jasmine_examples'));\n  makeDirStructure(path.join(specDir, 'helpers', 'jasmine_examples'));\n  makeDirStructure(path.join(projectBaseDir, 'lib', 'jasmine_examples'));\n\n  copyFiles(\n    path.join(examplesDir, 'spec', 'helpers', 'jasmine_examples'),\n    path.join(specDir, 'helpers', 'jasmine_examples'),\n    new RegExp(/[Hh]elper\\.js/)\n  );\n\n  copyFiles(\n    path.join(examplesDir, 'lib', 'jasmine_examples'),\n    path.join(projectBaseDir, 'lib', 'jasmine_examples'),\n    new RegExp(/\\.js/)\n  );\n\n  copyFiles(\n    path.join(examplesDir, 'spec', 'jasmine_examples'),\n    path.join(specDir, 'jasmine_examples'),\n    new RegExp(/[Ss]pec.js/)\n  );\n}\n\nfunction help(options) {\n  var print = options.print;\n  print('Usage: jasmine [command] [options] [files]');\n  print('');\n  print('Commands:');\n  Object.keys(subCommands).forEach(function(cmd) {\n    var commandNameText = cmd;\n    if(subCommands[cmd].alias) {\n      commandNameText = commandNameText + ',' + subCommands[cmd].alias;\n    }\n    print('%s\\t%s', lPad(commandNameText, 10), subCommands[cmd].description);\n  });\n  print('');\n  print('If no command is given, jasmine specs will be run');\n  print('');\n  print('');\n\n  print('Options:');\n  print('%s\\tturn off color in spec output', lPad('--no-color', 18));\n  print('%s\\tforce turn on color in spec output', lPad('--color', 18));\n  print('%s\\tfilter specs to run only those that match the given string', lPad('--filter=', 18));\n  print('%s\\tload helper files that match the given string', lPad('--helper=', 18));\n  print('%s\\tload module that match the given string', lPad('--require=', 18));\n  print('%s\\t[true|false] stop spec execution on expectation failure', lPad('--stop-on-failure=', 18));\n  print('%s\\t[true|false] stop Jasmine execution on spec failure', lPad('--fail-fast=', 18));\n  print('%s\\tpath to your optional jasmine.json', lPad('--config=', 18));\n  print('%s\\tpath to reporter to use instead of the default Jasmine reporter', lPad('--reporter=', 18));\n  print('');\n  print('The given arguments take precedence over options in your jasmine.json');\n  print('The path to your optional jasmine.json can also be configured by setting the JASMINE_CONFIG_PATH environment variable');\n}\n\nfunction version(options) {\n  var print = options.print;\n  print('jasmine v' + require('../package.json').version);\n  print('jasmine-core v' + options.jasmine.coreVersion());\n}\n\nfunction lPad(str, length) {\n  if (str.length >= length) {\n    return str;\n  } else {\n    return lPad(' ' + str, length);\n  }\n}\n\nfunction copyFiles(srcDir, destDir, pattern) {\n  var srcDirFiles = fs.readdirSync(srcDir);\n  srcDirFiles.forEach(function(file) {\n    if (file.search(pattern) !== -1) {\n      fs.writeFileSync(path.join(destDir, file), fs.readFileSync(path.join(srcDir, file)));\n    }\n  });\n}\n\nfunction makeDirStructure(absolutePath) {\n  var splitPath = absolutePath.split(path.sep);\n  splitPath.forEach(function(dir, index) {\n    if(index > 1) {\n      var fullPath = path.join(splitPath.slice(0, index).join('/'), dir);\n      if (!fs.existsSync(fullPath)) {\n        fs.mkdirSync(fullPath);\n      }\n    }\n  });\n}\n\nfunction isEnvironmentVariable(command) {\n  var envRegExp = /(.*)=(.*)/;\n  return command.match(envRegExp);\n}\n\nfunction setEnvironmentVariables(commands) {\n  commands.forEach(function (command) {\n    var regExpMatch = isEnvironmentVariable(command);\n    if(regExpMatch) {\n      var key = regExpMatch[1];\n      var value = regExpMatch[2];\n      process.env[key] = value;\n    }\n  });\n}\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine/command.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine/jasmine.js":{"text":"var path = require('path'),\n    util = require('util'),\n    glob = require('glob'),\n    CompletionReporter = require('./reporters/completion_reporter'),\n    ConsoleSpecFilter = require('./filters/console_spec_filter');\n\nmodule.exports = Jasmine;\nmodule.exports.ConsoleReporter = require('./reporters/console_reporter');\n\nfunction Jasmine(options) {\n  options = options || {};\n  var jasmineCore = options.jasmineCore || require('jasmine-core');\n  this.jasmineCorePath = path.join(jasmineCore.files.path, 'jasmine.js');\n  this.jasmine = jasmineCore.boot(jasmineCore);\n  this.projectBaseDir = options.projectBaseDir || path.resolve();\n  this.specDir = '';\n  this.specFiles = [];\n  this.helperFiles = [];\n  this.requires = [];\n  this.env = this.jasmine.getEnv({suppressLoadErrors: true});\n  this.reportersCount = 0;\n  this.completionReporter = new CompletionReporter();\n  this.onCompleteCallbackAdded = false;\n  this.exit = process.exit;\n  this.showingColors = true;\n  this.reporter = new module.exports.ConsoleReporter();\n  this.addReporter(this.reporter);\n  this.defaultReporterConfigured = false;\n\n  var jasmineRunner = this;\n  this.completionReporter.onComplete(function(passed) {\n    jasmineRunner.exitCodeCompletion(passed);\n  });\n  this.checkExit = checkExit(this);\n\n  this.coreVersion = function() {\n    return jasmineCore.version();\n  };\n}\n\nJasmine.prototype.randomizeTests = function(value) {\n  this.env.configure({random: value});\n};\n\nJasmine.prototype.seed = function(value) {\n  this.env.configure({seed: value});\n};\n\nJasmine.prototype.showColors = function(value) {\n  this.showingColors = value;\n};\n\nJasmine.prototype.addSpecFile = function(filePath) {\n  this.specFiles.push(filePath);\n};\n\nJasmine.prototype.addReporter = function(reporter) {\n  this.env.addReporter(reporter);\n  this.reportersCount++;\n};\n\nJasmine.prototype.clearReporters = function() {\n  this.env.clearReporters();\n  this.reportersCount = 0;\n};\n\nJasmine.prototype.provideFallbackReporter = function(reporter) {\n  this.env.provideFallbackReporter(reporter);\n};\n\nJasmine.prototype.configureDefaultReporter = function(options) {\n  options.timer = options.timer || new this.jasmine.Timer();\n  options.print = options.print || function() {\n    process.stdout.write(util.format.apply(this, arguments));\n  };\n  options.showColors = options.hasOwnProperty('showColors') ? options.showColors : true;\n  options.jasmineCorePath = options.jasmineCorePath || this.jasmineCorePath;\n\n  this.reporter.setOptions(options);\n  this.defaultReporterConfigured = true;\n};\n\nJasmine.prototype.addMatchers = function(matchers) {\n  this.env.addMatchers(matchers);\n};\n\nJasmine.prototype.loadSpecs = function() {\n  this.specFiles.forEach(function(file) {\n    require(file);\n  });\n};\n\nJasmine.prototype.loadHelpers = function() {\n  this.helperFiles.forEach(function(file) {\n    require(file);\n  });\n};\n\nJasmine.prototype.loadRequires = function() {\n  this.requires.forEach(function(r) {\n    require(r);\n  });\n};\n\nJasmine.prototype.loadConfigFile = function(configFilePath) {\n  try {\n    var absoluteConfigFilePath = path.resolve(this.projectBaseDir, configFilePath || 'spec/support/jasmine.json');\n    var config = require(absoluteConfigFilePath);\n    this.loadConfig(config);\n  } catch (e) {\n    if(configFilePath || e.code != 'MODULE_NOT_FOUND') { throw e; }\n  }\n};\n\nJasmine.prototype.loadConfig = function(config) {\n  this.specDir = config.spec_dir || this.specDir;\n\n  var configuration = {};\n\n  if (config.stopSpecOnExpectationFailure !== undefined) {\n    configuration.oneFailurePerSpec = config.stopSpecOnExpectationFailure;\n  }\n\n  if (config.stopOnSpecFailure !== undefined) {\n    configuration.failFast = config.stopOnSpecFailure;\n  }\n\n  if (config.random !== undefined) {\n    configuration.random = config.random;\n  }\n\n  if (Object.keys(configuration).length > 0) {\n    this.env.configure(configuration);\n  }\n\n  if(config.helpers) {\n    this.addHelperFiles(config.helpers);\n  }\n\n  if(config.requires) {\n    this.addRequires(config.requires);\n  }\n\n  if(config.spec_files) {\n    this.addSpecFiles(config.spec_files);\n  }\n};\n\nJasmine.prototype.addHelperFiles = addFiles('helperFiles');\nJasmine.prototype.addSpecFiles = addFiles('specFiles');\n\nJasmine.prototype.addRequires = function(requires) {\n  var jasmineRunner = this;\n  requires.forEach(function(r) {\n    jasmineRunner.requires.push(r);\n  });\n};\n\nfunction addFiles(kind) {\n  return function (files) {\n    var jasmineRunner = this;\n    var fileArr = this[kind];\n\n    var includeFiles = [];\n    var excludeFiles = [];\n    files.forEach(function(file) {\n      if (file.startsWith('!')) {\n        var excludeFile = file.substring(1);\n        if(!(path.isAbsolute && path.isAbsolute(excludeFile))) {\n          excludeFile = path.join(jasmineRunner.projectBaseDir, jasmineRunner.specDir, excludeFile);\n        }\n\n        excludeFiles.push(excludeFile);\n      } else {\n        includeFiles.push(file);\n      }\n    });\n\n    includeFiles.forEach(function(file) {\n      if(!(path.isAbsolute && path.isAbsolute(file))) {\n        file = path.join(jasmineRunner.projectBaseDir, jasmineRunner.specDir, file);\n      }\n      var filePaths = glob.sync(file, { ignore: excludeFiles });\n      filePaths.forEach(function(filePath) {\n        // glob will always output '/' as a segment separator but the fileArr may use \\ on windows\n        // fileArr needs to be checked for both versions\n        if(fileArr.indexOf(filePath) === -1 && fileArr.indexOf(path.normalize(filePath)) === -1) {\n          fileArr.push(filePath);\n        }\n      });\n    });\n  };\n}\n\nJasmine.prototype.onComplete = function(onCompleteCallback) {\n  this.completionReporter.onComplete(onCompleteCallback);\n};\n\nJasmine.prototype.stopSpecOnExpectationFailure = function(value) {\n  this.env.configure({oneFailurePerSpec: value});\n};\n\nJasmine.prototype.stopOnSpecFailure = function(value) {\n  this.env.configure({failFast: value});\n};\n\nJasmine.prototype.exitCodeCompletion = function(passed) {\n  var jasmineRunner = this;\n  var streams = [process.stdout, process.stderr];\n  var writesToWait = streams.length;\n  streams.forEach(function(stream) {\n    stream.write('', null, exitIfAllStreamsCompleted);\n  });\n  function exitIfAllStreamsCompleted() {\n    writesToWait--;\n    if (writesToWait === 0) {\n      if(passed) {\n        jasmineRunner.exit(0);\n      }\n      else {\n        jasmineRunner.exit(1);\n      }\n    }\n  }\n};\n\nvar checkExit = function(jasmineRunner) {\n  return function() {\n    if (!jasmineRunner.completionReporter.isComplete()) {\n      process.exitCode = 4;\n    }\n  };\n};\n\nJasmine.prototype.execute = function(files, filterString) {\n  this.completionReporter.exitHandler = this.checkExit;\n\n  this.loadRequires();\n  this.loadHelpers();\n  if (!this.defaultReporterConfigured) {\n    this.configureDefaultReporter({ showColors: this.showingColors });\n  }\n\n  if(filterString) {\n    var specFilter = new ConsoleSpecFilter({\n      filterString: filterString\n    });\n    this.env.configure({specFilter: function(spec) {\n      return specFilter.matches(spec.getFullName());\n    }});\n  }\n\n  if (files && files.length > 0) {\n    this.specDir = '';\n    this.specFiles = [];\n    this.addSpecFiles(files);\n  }\n\n  this.loadSpecs();\n\n  this.addReporter(this.completionReporter);\n  this.env.execute();\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine/jasmine.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine/filters/console_spec_filter.js":{"text":"module.exports = exports = ConsoleSpecFilter;\n\nfunction ConsoleSpecFilter(options) {\n  var filterString = options && options.filterString;\n  var filterPattern = new RegExp(filterString);\n\n  this.matches = function(specName) {\n    return filterPattern.test(specName);\n  };\n}\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine/filters/console_spec_filter.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine/reporters/completion_reporter.js":{"text":"module.exports = function() {\n  var onCompleteCallback = function() {};\n  var completed = false;\n\n  this.onComplete = function(callback) {\n    onCompleteCallback = callback;\n  };\n\n  this.jasmineStarted = function() {\n    if (this.exitHandler) {\n      process.on('exit', this.exitHandler);\n    }\n  };\n\n  this.jasmineDone = function(result) {\n    completed = true;\n    if (this.exitHandler) {\n      process.removeListener('exit', this.exitHandler);\n    }\n\n    onCompleteCallback(result.overallStatus === 'passed');\n  };\n\n  this.isComplete = function() {\n    return completed;\n  };\n\n  this.exitHandler = null;\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine/reporters/completion_reporter.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine/reporters/console_reporter.js":{"text":"module.exports = exports = ConsoleReporter;\n\nvar noopTimer = {\n  start: function(){},\n  elapsed: function(){ return 0; }\n};\n\nfunction ConsoleReporter() {\n  var print = function() {},\n    showColors = false,\n    timer = noopTimer,\n    jasmineCorePath = null,\n    specCount,\n    executableSpecCount,\n    failureCount,\n    failedSpecs = [],\n    pendingSpecs = [],\n    ansi = {\n      green: '\\x1B[32m',\n      red: '\\x1B[31m',\n      yellow: '\\x1B[33m',\n      none: '\\x1B[0m'\n    },\n    failedSuites = [],\n    stackFilter = defaultStackFilter;\n\n  this.setOptions = function(options) {\n    if (options.print) {\n      print = options.print;\n    }\n    showColors = options.showColors || false;\n    if (options.timer) {\n      timer = options.timer;\n    }\n    if (options.jasmineCorePath) {\n      jasmineCorePath = options.jasmineCorePath;\n    }\n    if (options.stackFilter) {\n      stackFilter = options.stackFilter;\n    }\n  };\n\n  this.jasmineStarted = function(options) {\n    specCount = 0;\n    executableSpecCount = 0;\n    failureCount = 0;\n    if (options && options.order && options.order.random) {\n      print('Randomized with seed ' + options.order.seed);\n      printNewline();\n    }\n    print('Started');\n    printNewline();\n    timer.start();\n  };\n\n  this.jasmineDone = function(result) {\n    printNewline();\n    printNewline();\n    if(failedSpecs.length > 0) {\n      print('Failures:');\n    }\n    for (var i = 0; i < failedSpecs.length; i++) {\n      specFailureDetails(failedSpecs[i], i + 1);\n    }\n\n    for(i = 0; i < failedSuites.length; i++) {\n      suiteFailureDetails(failedSuites[i]);\n    }\n\n    if (result && result.failedExpectations && result.failedExpectations.length > 0) {\n      suiteFailureDetails(result);\n    }\n\n    if (pendingSpecs.length > 0) {\n      print(\"Pending:\");\n    }\n    for(i = 0; i < pendingSpecs.length; i++) {\n      pendingSpecDetails(pendingSpecs[i], i + 1);\n    }\n\n    if(specCount > 0) {\n      printNewline();\n\n      if(executableSpecCount !== specCount) {\n        print('Ran ' + executableSpecCount + ' of ' + specCount + plural(' spec', specCount));\n        printNewline();\n      }\n      var specCounts = executableSpecCount + ' ' + plural('spec', executableSpecCount) + ', ' +\n        failureCount + ' ' + plural('failure', failureCount);\n\n      if (pendingSpecs.length) {\n        specCounts += ', ' + pendingSpecs.length + ' pending ' + plural('spec', pendingSpecs.length);\n      }\n\n      print(specCounts);\n    } else {\n      print('No specs found');\n    }\n\n    printNewline();\n    var seconds = timer.elapsed() / 1000;\n    print('Finished in ' + seconds + ' ' + plural('second', seconds));\n    printNewline();\n\n    if (result && result.overallStatus === 'incomplete') {\n      print('Incomplete: ' + result.incompleteReason);\n      printNewline();\n    }\n\n    if (result && result.order && result.order.random) {\n      print('Randomized with seed ' + result.order.seed);\n      print(' (jasmine --random=true --seed=' + result.order.seed + ')');\n      printNewline();\n    }\n  };\n\n  this.specDone = function(result) {\n    specCount++;\n\n    if (result.status == 'pending') {\n      pendingSpecs.push(result);\n      executableSpecCount++;\n      print(colored('yellow', '*'));\n      return;\n    }\n\n    if (result.status == 'passed') {\n      executableSpecCount++;\n      print(colored('green', '.'));\n      return;\n    }\n\n    if (result.status == 'failed') {\n      failureCount++;\n      failedSpecs.push(result);\n      executableSpecCount++;\n      print(colored('red', 'F'));\n    }\n  };\n\n  this.suiteDone = function(result) {\n    if (result.failedExpectations && result.failedExpectations.length > 0) {\n      failureCount++;\n      failedSuites.push(result);\n    }\n  };\n\n  return this;\n\n  function printNewline() {\n    print('\\n');\n  }\n\n  function colored(color, str) {\n    return showColors ? (ansi[color] + str + ansi.none) : str;\n  }\n\n  function plural(str, count) {\n    return count == 1 ? str : str + 's';\n  }\n\n  function repeat(thing, times) {\n    var arr = [];\n    for (var i = 0; i < times; i++) {\n      arr.push(thing);\n    }\n    return arr;\n  }\n\n  function indent(str, spaces) {\n    var lines = (str || '').split('\\n');\n    var newArr = [];\n    for (var i = 0; i < lines.length; i++) {\n      newArr.push(repeat(' ', spaces).join('') + lines[i]);\n    }\n    return newArr.join('\\n');\n  }\n\n  function defaultStackFilter(stack) {\n    if (!stack) {\n      return '';\n    }\n\n    var filteredStack = stack.split('\\n').filter(function(stackLine) {\n      return stackLine.indexOf(jasmineCorePath) === -1;\n    }).join('\\n');\n    return filteredStack;\n  }\n\n  function specFailureDetails(result, failedSpecNumber) {\n    printNewline();\n    print(failedSpecNumber + ') ');\n    print(result.fullName);\n    printFailedExpectations(result);\n  }\n\n  function suiteFailureDetails(result) {\n    printNewline();\n    print('Suite error: ' + result.fullName);\n    printFailedExpectations(result);\n  }\n\n  function printFailedExpectations(result) {\n    for (var i = 0; i < result.failedExpectations.length; i++) {\n      var failedExpectation = result.failedExpectations[i];\n      printNewline();\n      print(indent('Message:', 2));\n      printNewline();\n      print(colored('red', indent(failedExpectation.message, 4)));\n      printNewline();\n      print(indent('Stack:', 2));\n      printNewline();\n      print(indent(stackFilter(failedExpectation.stack), 4));\n    }\n\n    printNewline();\n  }\n\n  function pendingSpecDetails(result, pendingSpecNumber) {\n    printNewline();\n    printNewline();\n    print(pendingSpecNumber + ') ');\n    print(result.fullName);\n    printNewline();\n    var pendingReason = \"No reason given\";\n    if (result.pendingReason && result.pendingReason !== '') {\n      pendingReason = result.pendingReason;\n    }\n    print(indent(colored('yellow', pendingReason), 2));\n    printNewline();\n  }\n}\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine/reporters/console_reporter.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core.js":{"text":"module.exports = require(\"./jasmine-core/jasmine.js\");\nmodule.exports.boot = require('./jasmine-core/node_boot.js');\n\nvar path = require('path'),\n    fs = require('fs');\n\nvar rootPath = path.join(__dirname, \"jasmine-core\"),\n    bootFiles = ['boot.js'],\n    nodeBootFiles = ['node_boot.js'],\n    cssFiles = [],\n    jsFiles = [],\n    jsFilesToSkip = ['jasmine.js'].concat(bootFiles, nodeBootFiles);\n\nfs.readdirSync(rootPath).forEach(function(file) {\n  if(fs.statSync(path.join(rootPath, file)).isFile()) {\n    switch(path.extname(file)) {\n      case '.css':\n        cssFiles.push(file);\n      break;\n      case '.js':\n        if (jsFilesToSkip.indexOf(file) < 0) {\n        jsFiles.push(file);\n      }\n      break;\n    }\n  }\n});\n\nmodule.exports.files = {\n  path: rootPath,\n  bootDir: rootPath,\n  bootFiles: bootFiles,\n  nodeBootFiles: nodeBootFiles,\n  cssFiles: cssFiles,\n  jsFiles: ['jasmine.js'].concat(jsFiles),\n  imagesDir: path.join(__dirname, '../images')\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js":{"text":"/*\nCopyright (c) 2008-2019 Pivotal Labs\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/**\n Starting with version 2.0, this file \"boots\" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.\n\n If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.\n\n The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.\n\n [jasmine-gem]: http://github.com/pivotal/jasmine-gem\n */\n\n(function() {\n\n  /**\n   * ## Require &amp; Instantiate\n   *\n   * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.\n   */\n  window.jasmine = jasmineRequire.core(jasmineRequire);\n\n  /**\n   * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.\n   */\n  jasmineRequire.html(jasmine);\n\n  /**\n   * Create the Jasmine environment. This is used to run all specs in a project.\n   */\n  var env = jasmine.getEnv();\n\n  /**\n   * ## The Global Interface\n   *\n   * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.\n   */\n  var jasmineInterface = jasmineRequire.interface(jasmine, env);\n\n  /**\n   * Add all of the Jasmine global/public interface to the global scope, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.\n   */\n  extend(window, jasmineInterface);\n\n  /**\n   * ## Runner Parameters\n   *\n   * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.\n   */\n\n  var queryString = new jasmine.QueryString({\n    getWindowLocation: function() { return window.location; }\n  });\n\n  var filterSpecs = !!queryString.getParam(\"spec\");\n\n  var config = {\n    failFast: queryString.getParam(\"failFast\"),\n    oneFailurePerSpec: queryString.getParam(\"oneFailurePerSpec\"),\n    hideDisabled: queryString.getParam(\"hideDisabled\")\n  };\n\n  var random = queryString.getParam(\"random\");\n\n  if (random !== undefined && random !== \"\") {\n    config.random = random;\n  }\n\n  var seed = queryString.getParam(\"seed\");\n  if (seed) {\n    config.seed = seed;\n  }\n\n  /**\n   * ## Reporters\n   * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).\n   */\n  var htmlReporter = new jasmine.HtmlReporter({\n    env: env,\n    navigateWithNewParam: function(key, value) { return queryString.navigateWithNewParam(key, value); },\n    addToExistingQueryString: function(key, value) { return queryString.fullStringWithNewParam(key, value); },\n    getContainer: function() { return document.body; },\n    createElement: function() { return document.createElement.apply(document, arguments); },\n    createTextNode: function() { return document.createTextNode.apply(document, arguments); },\n    timer: new jasmine.Timer(),\n    filterSpecs: filterSpecs\n  });\n\n  /**\n   * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results  from JavaScript.\n   */\n  env.addReporter(jasmineInterface.jsApiReporter);\n  env.addReporter(htmlReporter);\n\n  /**\n   * Filter which specs will be run by matching the start of the full name against the `spec` query param.\n   */\n  var specFilter = new jasmine.HtmlSpecFilter({\n    filterString: function() { return queryString.getParam(\"spec\"); }\n  });\n\n  config.specFilter = function(spec) {\n    return specFilter.matches(spec.getFullName());\n  };\n\n  env.configure(config);\n\n  /**\n   * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.\n   */\n  window.setTimeout = window.setTimeout;\n  window.setInterval = window.setInterval;\n  window.clearTimeout = window.clearTimeout;\n  window.clearInterval = window.clearInterval;\n\n  /**\n   * ## Execution\n   *\n   * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.\n   */\n  var currentWindowOnload = window.onload;\n\n  window.onload = function() {\n    if (currentWindowOnload) {\n      currentWindowOnload();\n    }\n    htmlReporter.initialize();\n    env.execute();\n  };\n\n  /**\n   * Helper function for readability above.\n   */\n  function extend(destination, source) {\n    for (var property in source) destination[property] = source[property];\n    return destination;\n  }\n\n}());\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js":{"text":"/*\nCopyright (c) 2008-2019 Pivotal Labs\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*/\njasmineRequire.html = function(j$) {\n  j$.ResultsNode = jasmineRequire.ResultsNode();\n  j$.HtmlReporter = jasmineRequire.HtmlReporter(j$);\n  j$.QueryString = jasmineRequire.QueryString();\n  j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter();\n};\n\njasmineRequire.HtmlReporter = function(j$) {\n  function ResultsStateBuilder() {\n    this.topResults = new j$.ResultsNode({}, '', null);\n    this.currentParent = this.topResults;\n    this.specsExecuted = 0;\n    this.failureCount = 0;\n    this.pendingSpecCount = 0;\n  }\n\n  ResultsStateBuilder.prototype.suiteStarted = function(result) {\n    this.currentParent.addChild(result, 'suite');\n    this.currentParent = this.currentParent.last();\n  };\n\n  ResultsStateBuilder.prototype.suiteDone = function(result) {\n    this.currentParent.updateResult(result);\n    if (this.currentParent !== this.topResults) {\n      this.currentParent = this.currentParent.parent;\n    }\n\n    if (result.status === 'failed') {\n      this.failureCount++;\n    }\n  };\n\n  ResultsStateBuilder.prototype.specStarted = function(result) {\n  };\n\n  ResultsStateBuilder.prototype.specDone = function(result) {\n    this.currentParent.addChild(result, 'spec');\n\n    if (result.status !== 'excluded') {\n      this.specsExecuted++;\n    }\n\n    if (result.status === 'failed') {\n      this.failureCount++;\n    }\n\n    if (result.status == 'pending') {\n      this.pendingSpecCount++;\n    }\n  };\n\n\n\n  function HtmlReporter(options) {\n    var config = function() { return (options.env && options.env.configuration()) || {}; },\n      getContainer = options.getContainer,\n      createElement = options.createElement,\n      createTextNode = options.createTextNode,\n      navigateWithNewParam = options.navigateWithNewParam || function() {},\n      addToExistingQueryString = options.addToExistingQueryString || defaultQueryString,\n      filterSpecs = options.filterSpecs,\n      timer = options.timer || j$.noopTimer,\n      htmlReporterMain,\n      symbols,\n      deprecationWarnings = [];\n\n    this.initialize = function() {\n      clearPrior();\n      htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'},\n        createDom('div', {className: 'jasmine-banner'},\n          createDom('a', {className: 'jasmine-title', href: 'http://jasmine.github.io/', target: '_blank'}),\n          createDom('span', {className: 'jasmine-version'}, j$.version)\n        ),\n        createDom('ul', {className: 'jasmine-symbol-summary'}),\n        createDom('div', {className: 'jasmine-alert'}),\n        createDom('div', {className: 'jasmine-results'},\n          createDom('div', {className: 'jasmine-failures'})\n        )\n      );\n      getContainer().appendChild(htmlReporterMain);\n    };\n\n    var totalSpecsDefined;\n    this.jasmineStarted = function(options) {\n      totalSpecsDefined = options.totalSpecsDefined || 0;\n      timer.start();\n    };\n\n    var summary = createDom('div', {className: 'jasmine-summary'});\n\n    var stateBuilder = new ResultsStateBuilder();\n\n    this.suiteStarted = function(result) {\n      stateBuilder.suiteStarted(result);\n    };\n\n    this.suiteDone = function(result) {\n      stateBuilder.suiteDone(result);\n\n      if (result.status === 'failed') {\n        failures.push(failureDom(result));\n      }\n      addDeprecationWarnings(result);\n    };\n\n    this.specStarted = function(result) {\n      stateBuilder.specStarted(result);\n    };\n\n    var failures = [];\n    this.specDone = function(result) {\n      stateBuilder.specDone(result);\n\n      if(noExpectations(result) && typeof console !== 'undefined' && typeof console.error !== 'undefined') {\n        console.error('Spec \\'' + result.fullName + '\\' has no expectations.');\n      }\n\n      if (!symbols){\n        symbols = find('.jasmine-symbol-summary');\n      }\n\n      symbols.appendChild(createDom('li', {\n          className: this.displaySpecInCorrectFormat(result),\n          id: 'spec_' + result.id,\n          title: result.fullName\n        }\n      ));\n\n      if (result.status === 'failed') {\n        failures.push(failureDom(result));\n      }\n\n      addDeprecationWarnings(result);\n    };\n\n    this.displaySpecInCorrectFormat = function(result) {\n      return noExpectations(result) ? 'jasmine-empty' : this.resultStatus(result.status);\n    };\n\n    this.resultStatus = function(status) {\n      if(status === 'excluded') {\n        return config().hideDisabled ? 'jasmine-excluded-no-display' : 'jasmine-excluded';\n      }\n      return 'jasmine-' + status;\n    };\n\n    this.jasmineDone = function(doneResult) {\n      var banner = find('.jasmine-banner');\n      var alert = find('.jasmine-alert');\n      var order = doneResult && doneResult.order;\n      var i;\n      alert.appendChild(createDom('span', {className: 'jasmine-duration'}, 'finished in ' + timer.elapsed() / 1000 + 's'));\n\n      banner.appendChild(optionsMenu(config()));\n\n      if (stateBuilder.specsExecuted < totalSpecsDefined) {\n        var skippedMessage = 'Ran ' + stateBuilder.specsExecuted + ' of ' + totalSpecsDefined + ' specs - run all';\n        var skippedLink = addToExistingQueryString('spec', '');\n        alert.appendChild(\n          createDom('span', {className: 'jasmine-bar jasmine-skipped'},\n            createDom('a', {href: skippedLink, title: 'Run all specs'}, skippedMessage)\n          )\n        );\n      }\n      var statusBarMessage = '';\n      var statusBarClassName = 'jasmine-overall-result jasmine-bar ';\n      var globalFailures = (doneResult && doneResult.failedExpectations) || [];\n      var failed = stateBuilder.failureCount + globalFailures.length > 0;\n\n      if (totalSpecsDefined > 0 || failed) {\n        statusBarMessage += pluralize('spec', stateBuilder.specsExecuted) + ', ' + pluralize('failure', stateBuilder.failureCount);\n        if (stateBuilder.pendingSpecCount) { statusBarMessage += ', ' + pluralize('pending spec', stateBuilder.pendingSpecCount); }\n      }\n\n      if (doneResult.overallStatus === 'passed') {\n        statusBarClassName += ' jasmine-passed ';\n      } else if (doneResult.overallStatus === 'incomplete') {\n        statusBarClassName += ' jasmine-incomplete ';\n        statusBarMessage = 'Incomplete: ' + doneResult.incompleteReason + ', ' + statusBarMessage;\n      } else {\n        statusBarClassName += ' jasmine-failed ';\n      }\n\n      var seedBar;\n      if (order && order.random) {\n        seedBar = createDom('span', {className: 'jasmine-seed-bar'},\n          ', randomized with seed ',\n          createDom('a', {title: 'randomized with seed ' + order.seed, href: seedHref(order.seed)}, order.seed)\n        );\n      }\n\n      alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage, seedBar));\n\n      var errorBarClassName = 'jasmine-bar jasmine-errored';\n      var afterAllMessagePrefix = 'AfterAll ';\n\n      for(i = 0; i < globalFailures.length; i++) {\n        alert.appendChild(createDom('span', {className: errorBarClassName}, globalFailureMessage(globalFailures[i])));\n      }\n\n      function globalFailureMessage(failure) {\n        if (failure.globalErrorType === 'load') {\n          var prefix = 'Error during loading: ' + failure.message;\n\n          if (failure.filename) {\n            return prefix + ' in ' + failure.filename + ' line ' + failure.lineno;\n          } else {\n            return prefix;\n          }\n        } else {\n          return afterAllMessagePrefix + failure.message;\n        }\n      }\n\n      addDeprecationWarnings(doneResult);\n\n      var warningBarClassName = 'jasmine-bar jasmine-warning';\n      for(i = 0; i < deprecationWarnings.length; i++) {\n        var warning = deprecationWarnings[i];\n        alert.appendChild(createDom('span', {className: warningBarClassName}, 'DEPRECATION: ' + warning));\n      }\n\n      var results = find('.jasmine-results');\n      results.appendChild(summary);\n\n      summaryList(stateBuilder.topResults, summary);\n\n      if (failures.length) {\n        alert.appendChild(\n          createDom('span', {className: 'jasmine-menu jasmine-bar jasmine-spec-list'},\n            createDom('span', {}, 'Spec List | '),\n            createDom('a', {className: 'jasmine-failures-menu', href: '#'}, 'Failures')));\n        alert.appendChild(\n          createDom('span', {className: 'jasmine-menu jasmine-bar jasmine-failure-list'},\n            createDom('a', {className: 'jasmine-spec-list-menu', href: '#'}, 'Spec List'),\n            createDom('span', {}, ' | Failures ')));\n\n        find('.jasmine-failures-menu').onclick = function() {\n          setMenuModeTo('jasmine-failure-list');\n        };\n        find('.jasmine-spec-list-menu').onclick = function() {\n          setMenuModeTo('jasmine-spec-list');\n        };\n\n        setMenuModeTo('jasmine-failure-list');\n\n        var failureNode = find('.jasmine-failures');\n        for (i = 0; i < failures.length; i++) {\n          failureNode.appendChild(failures[i]);\n        }\n      }\n    };\n\n    return this;\n\n    function failureDom(result) {\n      var failure =\n        createDom('div', {className: 'jasmine-spec-detail jasmine-failed'},\n          failureDescription(result, stateBuilder.currentParent),\n          createDom('div', {className: 'jasmine-messages'})\n        );\n      var messages = failure.childNodes[1];\n\n      for (var i = 0; i < result.failedExpectations.length; i++) {\n        var expectation = result.failedExpectations[i];\n        messages.appendChild(createDom('div', {className: 'jasmine-result-message'}, expectation.message));\n        messages.appendChild(createDom('div', {className: 'jasmine-stack-trace'}, expectation.stack));\n      }\n\n      return failure;\n    }\n\n    function summaryList(resultsTree, domParent) {\n      var specListNode;\n      for (var i = 0; i < resultsTree.children.length; i++) {\n        var resultNode = resultsTree.children[i];\n        if (filterSpecs && !hasActiveSpec(resultNode)) {\n          continue;\n        }\n        if (resultNode.type === 'suite') {\n          var suiteListNode = createDom('ul', {className: 'jasmine-suite', id: 'suite-' + resultNode.result.id},\n            createDom('li', {className: 'jasmine-suite-detail jasmine-' + resultNode.result.status},\n              createDom('a', {href: specHref(resultNode.result)}, resultNode.result.description)\n            )\n          );\n\n          summaryList(resultNode, suiteListNode);\n          domParent.appendChild(suiteListNode);\n        }\n        if (resultNode.type === 'spec') {\n          if (domParent.getAttribute('class') !== 'jasmine-specs') {\n            specListNode = createDom('ul', {className: 'jasmine-specs'});\n            domParent.appendChild(specListNode);\n          }\n          var specDescription = resultNode.result.description;\n          if(noExpectations(resultNode.result)) {\n            specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;\n          }\n          if(resultNode.result.status === 'pending' && resultNode.result.pendingReason !== '') {\n            specDescription = specDescription + ' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;\n          }\n          specListNode.appendChild(\n            createDom('li', {\n                className: 'jasmine-' + resultNode.result.status,\n                id: 'spec-' + resultNode.result.id\n              },\n              createDom('a', {href: specHref(resultNode.result)}, specDescription)\n            )\n          );\n        }\n      }\n    }\n\n    function optionsMenu(config) {\n      var optionsMenuDom = createDom('div', { className: 'jasmine-run-options' },\n        createDom('span', { className: 'jasmine-trigger' }, 'Options'),\n        createDom('div', { className: 'jasmine-payload' },\n          createDom('div', { className: 'jasmine-stop-on-failure' },\n            createDom('input', {\n              className: 'jasmine-fail-fast',\n              id: 'jasmine-fail-fast',\n              type: 'checkbox'\n            }),\n            createDom('label', { className: 'jasmine-label', 'for': 'jasmine-fail-fast' }, 'stop execution on spec failure')),\n          createDom('div', { className: 'jasmine-throw-failures' },\n            createDom('input', {\n              className: 'jasmine-throw',\n              id: 'jasmine-throw-failures',\n              type: 'checkbox'\n            }),\n            createDom('label', { className: 'jasmine-label', 'for': 'jasmine-throw-failures' }, 'stop spec on expectation failure')),\n          createDom('div', { className: 'jasmine-random-order' },\n            createDom('input', {\n              className: 'jasmine-random',\n              id: 'jasmine-random-order',\n              type: 'checkbox'\n            }),\n            createDom('label', { className: 'jasmine-label', 'for': 'jasmine-random-order' }, 'run tests in random order')),\n          createDom('div', { className: 'jasmine-hide-disabled' },\n            createDom('input', {\n              className: 'jasmine-disabled',\n              id: 'jasmine-hide-disabled',\n              type: 'checkbox'\n            }),\n            createDom('label', { className: 'jasmine-label', 'for': 'jasmine-hide-disabled' }, 'hide disabled tests'))\n        )\n      );\n\n      var failFastCheckbox = optionsMenuDom.querySelector('#jasmine-fail-fast');\n      failFastCheckbox.checked = config.failFast;\n      failFastCheckbox.onclick = function() {\n        navigateWithNewParam('failFast', !config.failFast);\n      };\n\n      var throwCheckbox = optionsMenuDom.querySelector('#jasmine-throw-failures');\n      throwCheckbox.checked = config.oneFailurePerSpec;\n      throwCheckbox.onclick = function() {\n        navigateWithNewParam('throwFailures', !config.oneFailurePerSpec);\n      };\n\n      var randomCheckbox = optionsMenuDom.querySelector('#jasmine-random-order');\n      randomCheckbox.checked = config.random;\n      randomCheckbox.onclick = function() {\n        navigateWithNewParam('random', !config.random);\n      };\n\n      var hideDisabled = optionsMenuDom.querySelector('#jasmine-hide-disabled');\n      hideDisabled.checked = config.hideDisabled;\n      hideDisabled.onclick = function() {\n        navigateWithNewParam('hideDisabled', !config.hideDisabled);\n      };\n\n      var optionsTrigger = optionsMenuDom.querySelector('.jasmine-trigger'),\n        optionsPayload = optionsMenuDom.querySelector('.jasmine-payload'),\n        isOpen = /\\bjasmine-open\\b/;\n\n      optionsTrigger.onclick = function() {\n        if (isOpen.test(optionsPayload.className)) {\n          optionsPayload.className = optionsPayload.className.replace(isOpen, '');\n        } else {\n          optionsPayload.className += ' jasmine-open';\n        }\n      };\n\n      return optionsMenuDom;\n    }\n\n    function failureDescription(result, suite) {\n      var wrapper = createDom('div', {className: 'jasmine-description'},\n        createDom('a', {title: result.description, href: specHref(result)}, result.description)\n      );\n      var suiteLink;\n\n      while (suite && suite.parent) {\n        wrapper.insertBefore(createTextNode(' > '), wrapper.firstChild);\n        suiteLink = createDom('a', {href: suiteHref(suite)}, suite.result.description);\n        wrapper.insertBefore(suiteLink, wrapper.firstChild);\n\n        suite = suite.parent;\n      }\n\n      return wrapper;\n    }\n\n    function suiteHref(suite) {\n      var els = [];\n\n      while (suite && suite.parent) {\n        els.unshift(suite.result.description);\n        suite = suite.parent;\n      }\n\n      return addToExistingQueryString('spec', els.join(' '));\n    }\n\n    function addDeprecationWarnings(result) {\n      if (result && result.deprecationWarnings) {\n        for(var i = 0; i < result.deprecationWarnings.length; i++) {\n          var warning = result.deprecationWarnings[i].message;\n          if (!j$.util.arrayContains(warning)) {\n            deprecationWarnings.push(warning);\n          }\n        }\n      }\n    }\n\n    function find(selector) {\n      return getContainer().querySelector('.jasmine_html-reporter ' + selector);\n    }\n\n    function clearPrior() {\n      // return the reporter\n      var oldReporter = find('');\n\n      if(oldReporter) {\n        getContainer().removeChild(oldReporter);\n      }\n    }\n\n    function createDom(type, attrs, childrenVarArgs) {\n      var el = createElement(type);\n\n      for (var i = 2; i < arguments.length; i++) {\n        var child = arguments[i];\n\n        if (typeof child === 'string') {\n          el.appendChild(createTextNode(child));\n        } else {\n          if (child) {\n            el.appendChild(child);\n          }\n        }\n      }\n\n      for (var attr in attrs) {\n        if (attr == 'className') {\n          el[attr] = attrs[attr];\n        } else {\n          el.setAttribute(attr, attrs[attr]);\n        }\n      }\n\n      return el;\n    }\n\n    function pluralize(singular, count) {\n      var word = (count == 1 ? singular : singular + 's');\n\n      return '' + count + ' ' + word;\n    }\n\n    function specHref(result) {\n      return addToExistingQueryString('spec', result.fullName);\n    }\n\n    function seedHref(seed) {\n      return addToExistingQueryString('seed', seed);\n    }\n\n    function defaultQueryString(key, value) {\n      return '?' + key + '=' + value;\n    }\n\n    function setMenuModeTo(mode) {\n      htmlReporterMain.setAttribute('class', 'jasmine_html-reporter ' + mode);\n    }\n\n    function noExpectations(result) {\n      return (result.failedExpectations.length + result.passedExpectations.length) === 0 &&\n        result.status === 'passed';\n    }\n\n    function hasActiveSpec(resultNode) {\n      if (resultNode.type == 'spec' && resultNode.result.status != 'excluded') {\n        return true;\n      }\n\n      if (resultNode.type == 'suite') {\n        for (var i = 0, j = resultNode.children.length; i < j; i++) {\n          if (hasActiveSpec(resultNode.children[i])) {\n            return true;\n          }\n        }\n      }\n    }\n  }\n\n  return HtmlReporter;\n};\n\njasmineRequire.HtmlSpecFilter = function() {\n  function HtmlSpecFilter(options) {\n    var filterString = options && options.filterString() && options.filterString().replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n    var filterPattern = new RegExp(filterString);\n\n    this.matches = function(specName) {\n      return filterPattern.test(specName);\n    };\n  }\n\n  return HtmlSpecFilter;\n};\n\njasmineRequire.ResultsNode = function() {\n  function ResultsNode(result, type, parent) {\n    this.result = result;\n    this.type = type;\n    this.parent = parent;\n\n    this.children = [];\n\n    this.addChild = function(result, type) {\n      this.children.push(new ResultsNode(result, type, this));\n    };\n\n    this.last = function() {\n      return this.children[this.children.length - 1];\n    };\n\n    this.updateResult = function(result) {\n      this.result = result;\n    };\n  }\n\n  return ResultsNode;\n};\n\njasmineRequire.QueryString = function() {\n  function QueryString(options) {\n\n    this.navigateWithNewParam = function(key, value) {\n      options.getWindowLocation().search = this.fullStringWithNewParam(key, value);\n    };\n\n    this.fullStringWithNewParam = function(key, value) {\n      var paramMap = queryStringToParamMap();\n      paramMap[key] = value;\n      return toQueryString(paramMap);\n    };\n\n    this.getParam = function(key) {\n      return queryStringToParamMap()[key];\n    };\n\n    return this;\n\n    function toQueryString(paramMap) {\n      var qStrPairs = [];\n      for (var prop in paramMap) {\n        qStrPairs.push(encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop]));\n      }\n      return '?' + qStrPairs.join('&');\n    }\n\n    function queryStringToParamMap() {\n      var paramStr = options.getWindowLocation().search.substring(1),\n        params = [],\n        paramMap = {};\n\n      if (paramStr.length > 0) {\n        params = paramStr.split('&');\n        for (var i = 0; i < params.length; i++) {\n          var p = params[i].split('=');\n          var value = decodeURIComponent(p[1]);\n          if (value === 'true' || value === 'false') {\n            value = JSON.parse(value);\n          }\n          paramMap[decodeURIComponent(p[0])] = value;\n        }\n      }\n\n      return paramMap;\n    }\n\n  }\n\n  return QueryString;\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine.js":{"text":"/*\nCopyright (c) 2008-2019 Pivotal Labs\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*/\nvar getJasmineRequireObj = (function (jasmineGlobal) {\n  /* globals exports, global, module, window */\n  var jasmineRequire;\n\n  if (typeof module !== 'undefined' && module.exports && typeof exports !== 'undefined') {\n    if (typeof global !== 'undefined') {\n      jasmineGlobal = global;\n    } else {\n      jasmineGlobal = {};\n    }\n    jasmineRequire = exports;\n  } else {\n    if (typeof window !== 'undefined' && typeof window.toString === 'function' && window.toString() === '[object GjsGlobal]') {\n      jasmineGlobal = window;\n    }\n    jasmineRequire = jasmineGlobal.jasmineRequire = {};\n  }\n\n  function getJasmineRequire() {\n    return jasmineRequire;\n  }\n\n  getJasmineRequire().core = function(jRequire) {\n    var j$ = {};\n\n    jRequire.base(j$, jasmineGlobal);\n    j$.util = jRequire.util(j$);\n    j$.errors = jRequire.errors();\n    j$.formatErrorMsg = jRequire.formatErrorMsg();\n    j$.Any = jRequire.Any(j$);\n    j$.Anything = jRequire.Anything(j$);\n    j$.CallTracker = jRequire.CallTracker(j$);\n    j$.MockDate = jRequire.MockDate();\n    j$.getClearStack = jRequire.clearStack(j$);\n    j$.Clock = jRequire.Clock();\n    j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler(j$);\n    j$.Env = jRequire.Env(j$);\n    j$.StackTrace = jRequire.StackTrace(j$);\n    j$.ExceptionFormatter = jRequire.ExceptionFormatter(j$);\n    j$.ExpectationFilterChain = jRequire.ExpectationFilterChain();\n    j$.Expector = jRequire.Expector(j$);\n    j$.Expectation = jRequire.Expectation(j$);\n    j$.buildExpectationResult = jRequire.buildExpectationResult();\n    j$.noopTimer = jRequire.noopTimer();\n    j$.JsApiReporter = jRequire.JsApiReporter(j$);\n    j$.matchersUtil = jRequire.matchersUtil(j$);\n    j$.ObjectContaining = jRequire.ObjectContaining(j$);\n    j$.ArrayContaining = jRequire.ArrayContaining(j$);\n    j$.ArrayWithExactContents = jRequire.ArrayWithExactContents(j$);\n    j$.pp = jRequire.pp(j$);\n    j$.QueueRunner = jRequire.QueueRunner(j$);\n    j$.ReportDispatcher = jRequire.ReportDispatcher(j$);\n    j$.Spec = jRequire.Spec(j$);\n    j$.Spy = jRequire.Spy(j$);\n    j$.SpyFactory = jRequire.SpyFactory(j$);\n    j$.SpyRegistry = jRequire.SpyRegistry(j$);\n    j$.SpyStrategy = jRequire.SpyStrategy(j$);\n    j$.StringMatching = jRequire.StringMatching(j$);\n    j$.UserContext = jRequire.UserContext(j$);\n    j$.Suite = jRequire.Suite(j$);\n    j$.Timer = jRequire.Timer();\n    j$.TreeProcessor = jRequire.TreeProcessor();\n    j$.version = jRequire.version();\n    j$.Order = jRequire.Order();\n    j$.DiffBuilder = jRequire.DiffBuilder(j$);\n    j$.NullDiffBuilder = jRequire.NullDiffBuilder(j$);\n    j$.ObjectPath = jRequire.ObjectPath(j$);\n    j$.GlobalErrors = jRequire.GlobalErrors(j$);\n\n    j$.Truthy = jRequire.Truthy(j$);\n    j$.Falsy = jRequire.Falsy(j$);\n    j$.Empty = jRequire.Empty(j$);\n    j$.NotEmpty = jRequire.NotEmpty(j$);\n\n    j$.matchers = jRequire.requireMatchers(jRequire, j$);\n    j$.asyncMatchers = jRequire.requireAsyncMatchers(jRequire, j$);\n\n    return j$;\n  };\n\n  return getJasmineRequire;\n})(this);\n\ngetJasmineRequireObj().requireMatchers = function(jRequire, j$) {\n  var availableMatchers = [\n      'nothing',\n      'toBe',\n      'toBeCloseTo',\n      'toBeDefined',\n      'toBeFalsy',\n      'toBeGreaterThan',\n      'toBeGreaterThanOrEqual',\n      'toBeLessThan',\n      'toBeLessThanOrEqual',\n      'toBeNaN',\n      'toBeNegativeInfinity',\n      'toBeNull',\n      'toBePositiveInfinity',\n      'toBeTruthy',\n      'toBeUndefined',\n      'toContain',\n      'toEqual',\n      'toHaveBeenCalled',\n      'toHaveBeenCalledBefore',\n      'toHaveBeenCalledTimes',\n      'toHaveBeenCalledWith',\n      'toHaveClass',\n      'toMatch',\n      'toThrow',\n      'toThrowError',\n      'toThrowMatching',\n    ],\n    matchers = {};\n\n  for (var i = 0; i < availableMatchers.length; i++) {\n    var name = availableMatchers[i];\n    matchers[name] = jRequire[name](j$);\n  }\n\n  return matchers;\n};\n\ngetJasmineRequireObj().base = function(j$, jasmineGlobal) {\n  j$.unimplementedMethod_ = function() {\n    throw new Error('unimplemented method');\n  };\n\n  /**\n   * Maximum object depth the pretty printer will print to.\n   * Set this to a lower value to speed up pretty printing if you have large objects.\n   * @name jasmine.MAX_PRETTY_PRINT_DEPTH\n   */\n  j$.MAX_PRETTY_PRINT_DEPTH = 8;\n  /**\n   * Maximum number of array elements to display when pretty printing objects.\n   * This will also limit the number of keys and values displayed for an object.\n   * Elements past this number will be ellipised.\n   * @name jasmine.MAX_PRETTY_PRINT_ARRAY_LENGTH\n   */\n  j$.MAX_PRETTY_PRINT_ARRAY_LENGTH = 50;\n  /**\n   * Maximum number of characters to display when pretty printing objects.\n   * Characters past this number will be ellipised.\n   * @name jasmine.MAX_PRETTY_PRINT_CHARS\n   */\n  j$.MAX_PRETTY_PRINT_CHARS = 1000;\n  /**\n   * Default number of milliseconds Jasmine will wait for an asynchronous spec to complete.\n   * @name jasmine.DEFAULT_TIMEOUT_INTERVAL\n   */\n  j$.DEFAULT_TIMEOUT_INTERVAL = 5000;\n\n  j$.getGlobal = function() {\n    return jasmineGlobal;\n  };\n\n  /**\n   * Get the currently booted Jasmine Environment.\n   *\n   * @name jasmine.getEnv\n   * @function\n   * @return {Env}\n   */\n  j$.getEnv = function(options) {\n    var env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options);\n    //jasmine. singletons in here (setTimeout blah blah).\n    return env;\n  };\n\n  j$.isArray_ = function(value) {\n    return j$.isA_('Array', value);\n  };\n\n  j$.isObject_ = function(value) {\n    return !j$.util.isUndefined(value) && value !== null && j$.isA_('Object', value);\n  };\n\n  j$.isString_ = function(value) {\n    return j$.isA_('String', value);\n  };\n\n  j$.isNumber_ = function(value) {\n    return j$.isA_('Number', value);\n  };\n\n  j$.isFunction_ = function(value) {\n    return j$.isA_('Function', value);\n  };\n\n  j$.isAsyncFunction_ = function(value) {\n    return j$.isA_('AsyncFunction', value);\n  };\n\n  j$.isTypedArray_ = function(value) {\n    return j$.isA_('Float32Array', value) ||\n      j$.isA_('Float64Array', value) ||\n      j$.isA_('Int16Array', value) ||\n      j$.isA_('Int32Array', value) ||\n      j$.isA_('Int8Array', value) ||\n      j$.isA_('Uint16Array', value) ||\n      j$.isA_('Uint32Array', value) ||\n      j$.isA_('Uint8Array', value) ||\n      j$.isA_('Uint8ClampedArray', value);\n  };\n\n  j$.isA_ = function(typeName, value) {\n    return j$.getType_(value) === '[object ' + typeName + ']';\n  };\n\n  j$.isError_ = function(value) {\n    if (value instanceof Error) {\n      return true;\n    }\n    if (value && value.constructor && value.constructor.constructor) {\n      var valueGlobal = value.constructor.constructor('return this');\n      if (j$.isFunction_(valueGlobal)) {\n        valueGlobal = valueGlobal();\n      }\n\n      if (valueGlobal.Error && value instanceof valueGlobal.Error) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  j$.getType_ = function(value) {\n    return Object.prototype.toString.apply(value);\n  };\n\n  j$.isDomNode = function(obj) {\n    // Node is a function, because constructors\n    return typeof jasmineGlobal.Node !== 'undefined' ?\n      obj instanceof jasmineGlobal.Node :\n          obj !== null &&\n          typeof obj === 'object' &&\n          typeof obj.nodeType === 'number' &&\n          typeof obj.nodeName === 'string';\n    // return obj.nodeType > 0;\n  };\n\n  j$.isMap = function(obj) {\n    return typeof jasmineGlobal.Map !== 'undefined' && obj.constructor === jasmineGlobal.Map;\n  };\n\n  j$.isSet = function(obj) {\n    return typeof jasmineGlobal.Set !== 'undefined' && obj.constructor === jasmineGlobal.Set;\n  };\n\n  j$.isPromise = function(obj) {\n    return typeof jasmineGlobal.Promise !== 'undefined' && !!obj && obj.constructor === jasmineGlobal.Promise;\n  };\n\n  j$.isPromiseLike = function(obj) {\n    return !!obj && j$.isFunction_(obj.then);\n  };\n\n  j$.fnNameFor = function(func) {\n    if (func.name) {\n      return func.name;\n    }\n\n    var matches = func.toString().match(/^\\s*function\\s*(\\w+)\\s*\\(/) ||\n      func.toString().match(/^\\s*\\[object\\s*(\\w+)Constructor\\]/);\n\n    return matches ? matches[1] : '<anonymous>';\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is an instance of the specified class/constructor.\n   * @name jasmine.any\n   * @function\n   * @param {Constructor} clazz - The constructor to check against.\n   */\n  j$.any = function(clazz) {\n    return new j$.Any(clazz);\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is not `null` and not `undefined`.\n   * @name jasmine.anything\n   * @function\n   */\n  j$.anything = function() {\n    return new j$.Anything();\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is `true` or anything truthy.\n   * @name jasmine.truthy\n   * @function\n   */\n  j$.truthy = function() {return new j$.Truthy();};\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is  `null`, `undefined`, `0`, `false` or anything falsey.\n   * @name jasmine.falsy\n   * @function\n   */\n  j$.falsy = function() {return new j$.Falsy();};\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is empty.\n   * @name jasmine.empty\n   * @function\n   */\n  j$.empty = function() {return new j$.Empty();};\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared is not empty.\n   * @name jasmine.notEmpty\n   * @function\n   */\n  j$.notEmpty = function() {return new j$.NotEmpty();};\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value being compared contains at least the keys and values.\n   * @name jasmine.objectContaining\n   * @function\n   * @param {Object} sample - The subset of properties that _must_ be in the actual.\n   */\n  j$.objectContaining = function(sample) {\n    return new j$.ObjectContaining(sample);\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value is a `String` that matches the `RegExp` or `String`.\n   * @name jasmine.stringMatching\n   * @function\n   * @param {RegExp|String} expected\n   */\n  j$.stringMatching = function(expected) {\n    return new j$.StringMatching(expected);\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value is an `Array` that contains at least the elements in the sample.\n   * @name jasmine.arrayContaining\n   * @function\n   * @param {Array} sample\n   */\n  j$.arrayContaining = function(sample) {\n    return new j$.ArrayContaining(sample);\n  };\n\n  /**\n   * Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),\n   * that will succeed if the actual value is an `Array` that contains all of the elements in the sample in any order.\n   * @name jasmine.arrayWithExactContents\n   * @function\n   * @param {Array} sample\n   */\n  j$.arrayWithExactContents = function(sample) {\n    return new j$.ArrayWithExactContents(sample);\n  };\n\n  j$.isSpy = function(putativeSpy) {\n    if (!putativeSpy) {\n      return false;\n    }\n    return putativeSpy.and instanceof j$.SpyStrategy &&\n      putativeSpy.calls instanceof j$.CallTracker;\n  };\n};\n\ngetJasmineRequireObj().util = function(j$) {\n\n  var util = {};\n\n  util.inherit = function(childClass, parentClass) {\n    var Subclass = function() {\n    };\n    Subclass.prototype = parentClass.prototype;\n    childClass.prototype = new Subclass();\n  };\n\n  util.htmlEscape = function(str) {\n    if (!str) {\n      return str;\n    }\n    return str.replace(/&/g, '&amp;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n  };\n\n  util.argsToArray = function(args) {\n    var arrayOfArgs = [];\n    for (var i = 0; i < args.length; i++) {\n      arrayOfArgs.push(args[i]);\n    }\n    return arrayOfArgs;\n  };\n\n  util.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  util.arrayContains = function(array, search) {\n    var i = array.length;\n    while (i--) {\n      if (array[i] === search) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  util.clone = function(obj) {\n    if (Object.prototype.toString.apply(obj) === '[object Array]') {\n      return obj.slice();\n    }\n\n    var cloned = {};\n    for (var prop in obj) {\n      if (obj.hasOwnProperty(prop)) {\n        cloned[prop] = obj[prop];\n      }\n    }\n\n    return cloned;\n  };\n\n  util.cloneArgs = function(args) {\n    var clonedArgs = [];\n    var argsAsArray = j$.util.argsToArray(args);\n    for(var i = 0; i < argsAsArray.length; i++) {\n      var str = Object.prototype.toString.apply(argsAsArray[i]),\n        primitives = /^\\[object (Boolean|String|RegExp|Number)/;\n\n      // All falsey values are either primitives, `null`, or `undefined.\n      if (!argsAsArray[i] || str.match(primitives)) {\n        clonedArgs.push(argsAsArray[i]);\n      } else {\n        clonedArgs.push(j$.util.clone(argsAsArray[i]));\n      }\n    }\n    return clonedArgs;\n  };\n\n  util.getPropertyDescriptor = function(obj, methodName) {\n    var descriptor,\n      proto = obj;\n\n    do {\n      descriptor = Object.getOwnPropertyDescriptor(proto, methodName);\n      proto = Object.getPrototypeOf(proto);\n    } while (!descriptor && proto);\n\n    return descriptor;\n  };\n\n  util.objectDifference = function(obj, toRemove) {\n    var diff = {};\n\n    for (var key in obj) {\n      if (util.has(obj, key) && !util.has(toRemove, key)) {\n        diff[key] = obj[key];\n      }\n    }\n\n    return diff;\n  };\n\n  util.has = function(obj, key) {\n    return Object.prototype.hasOwnProperty.call(obj, key);\n  };\n\n  function anyMatch(pattern, lines) {\n    var i;\n\n    for (i = 0; i < lines.length; i++) {\n      if (lines[i].match(pattern)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  util.errorWithStack = function errorWithStack () {\n    // Don't throw and catch if we don't have to, because it makes it harder\n    // for users to debug their code with exception breakpoints.\n    var error = new Error();\n\n    if (error.stack) {\n      return error;\n    }\n\n    // But some browsers (e.g. Phantom) only provide a stack trace if we throw.\n    try {\n      throw new Error();\n    } catch (e) {\n      return e;\n    }\n  };\n\n  function callerFile() {\n    var trace = new j$.StackTrace(util.errorWithStack());\n    return trace.frames[2].file;\n  }\n\n  util.jasmineFile = (function() {\n    var result;\n\n    return function() {\n      var trace;\n\n      if (!result) {\n        result = callerFile();\n      }\n\n      return result;\n    };\n  }());\n\n  return util;\n};\n\ngetJasmineRequireObj().Spec = function(j$) {\n  function Spec(attrs) {\n    this.expectationFactory = attrs.expectationFactory;\n    this.asyncExpectationFactory = attrs.asyncExpectationFactory;\n    this.resultCallback = attrs.resultCallback || function() {};\n    this.id = attrs.id;\n    this.description = attrs.description || '';\n    this.queueableFn = attrs.queueableFn;\n    this.beforeAndAfterFns = attrs.beforeAndAfterFns || function() { return {befores: [], afters: []}; };\n    this.userContext = attrs.userContext || function() { return {}; };\n    this.onStart = attrs.onStart || function() {};\n    this.getSpecName = attrs.getSpecName || function() { return ''; };\n    this.expectationResultFactory = attrs.expectationResultFactory || function() { };\n    this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};\n    this.catchingExceptions = attrs.catchingExceptions || function() { return true; };\n    this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;\n    this.timer = attrs.timer || j$.noopTimer;\n\n    if (!this.queueableFn.fn) {\n      this.pend();\n    }\n\n    /**\n     * @typedef SpecResult\n     * @property {Int} id - The unique id of this spec.\n     * @property {String} description - The description passed to the {@link it} that created this spec.\n     * @property {String} fullName - The full description including all ancestors of this spec.\n     * @property {Expectation[]} failedExpectations - The list of expectations that failed during execution of this spec.\n     * @property {Expectation[]} passedExpectations - The list of expectations that passed during execution of this spec.\n     * @property {Expectation[]} deprecationWarnings - The list of deprecation warnings that occurred during execution this spec.\n     * @property {String} pendingReason - If the spec is {@link pending}, this will be the reason.\n     * @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec.\n     * @property {number} duration - The time in ms used by the spec execution, including any before/afterEach.\n     */\n    this.result = {\n      id: this.id,\n      description: this.description,\n      fullName: this.getFullName(),\n      failedExpectations: [],\n      passedExpectations: [],\n      deprecationWarnings: [],\n      pendingReason: '',\n      duration: null,\n    };\n  }\n\n  Spec.prototype.addExpectationResult = function(passed, data, isError) {\n    var expectationResult = this.expectationResultFactory(data);\n    if (passed) {\n      this.result.passedExpectations.push(expectationResult);\n    } else {\n      this.result.failedExpectations.push(expectationResult);\n\n      if (this.throwOnExpectationFailure && !isError) {\n        throw new j$.errors.ExpectationFailed();\n      }\n    }\n  };\n\n  Spec.prototype.expect = function(actual) {\n    return this.expectationFactory(actual, this);\n  };\n\n  Spec.prototype.expectAsync = function(actual) {\n    return this.asyncExpectationFactory(actual, this);\n  };\n\n  Spec.prototype.execute = function(onComplete, excluded) {\n    var self = this;\n\n    var onStart = {\n      fn: function(done) {\n        self.timer.start();\n        self.onStart(self, done);\n      }\n    };\n\n    var complete = {\n      fn: function(done) {\n        self.queueableFn.fn = null;\n        self.result.status = self.status(excluded);\n        self.resultCallback(self.result, done);\n      }\n    };\n\n    var fns = this.beforeAndAfterFns();\n    var regularFns = fns.befores.concat(this.queueableFn);\n\n    var runnerConfig = {\n      isLeaf: true,\n      queueableFns: regularFns,\n      cleanupFns: fns.afters,\n      onException: function () {\n        self.onException.apply(self, arguments);\n      },\n      onComplete: function() {\n        self.result.duration = self.timer.elapsed();\n        onComplete(self.result.status === 'failed' && new j$.StopExecutionError('spec failed'));\n      },\n      userContext: this.userContext()\n    };\n\n    if (this.markedPending || excluded === true) {\n      runnerConfig.queueableFns = [];\n      runnerConfig.cleanupFns = [];\n    }\n\n    runnerConfig.queueableFns.unshift(onStart);\n    runnerConfig.cleanupFns.push(complete);\n\n    this.queueRunnerFactory(runnerConfig);\n  };\n\n  Spec.prototype.onException = function onException(e) {\n    if (Spec.isPendingSpecException(e)) {\n      this.pend(extractCustomPendingMessage(e));\n      return;\n    }\n\n    if (e instanceof j$.errors.ExpectationFailed) {\n      return;\n    }\n\n    this.addExpectationResult(false, {\n      matcherName: '',\n      passed: false,\n      expected: '',\n      actual: '',\n      error: e\n    }, true);\n  };\n\n  Spec.prototype.pend = function(message) {\n    this.markedPending = true;\n    if (message) {\n      this.result.pendingReason = message;\n    }\n  };\n\n  Spec.prototype.getResult = function() {\n    this.result.status = this.status();\n    return this.result;\n  };\n\n  Spec.prototype.status = function(excluded) {\n    if (excluded === true) {\n      return 'excluded';\n    }\n\n    if (this.markedPending) {\n      return 'pending';\n    }\n\n    if (this.result.failedExpectations.length > 0) {\n      return 'failed';\n    } else {\n      return 'passed';\n    }\n  };\n\n  Spec.prototype.getFullName = function() {\n    return this.getSpecName(this);\n  };\n\n  Spec.prototype.addDeprecationWarning = function(deprecation) {\n    if (typeof deprecation === 'string') {\n      deprecation = { message: deprecation };\n    }\n    this.result.deprecationWarnings.push(this.expectationResultFactory(deprecation));\n  };\n\n  var extractCustomPendingMessage = function(e) {\n    var fullMessage = e.toString(),\n        boilerplateStart = fullMessage.indexOf(Spec.pendingSpecExceptionMessage),\n        boilerplateEnd = boilerplateStart + Spec.pendingSpecExceptionMessage.length;\n\n    return fullMessage.substr(boilerplateEnd);\n  };\n\n  Spec.pendingSpecExceptionMessage = '=> marked Pending';\n\n  Spec.isPendingSpecException = function(e) {\n    return !!(e && e.toString && e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1);\n  };\n\n  return Spec;\n};\n\nif (typeof window == void 0 && typeof exports == 'object') {\n  /* globals exports */\n  exports.Spec = jasmineRequire.Spec;\n}\n\n/*jshint bitwise: false*/\n\ngetJasmineRequireObj().Order = function() {\n  function Order(options) {\n    this.random = 'random' in options ? options.random : true;\n    var seed = this.seed = options.seed || generateSeed();\n    this.sort = this.random ? randomOrder : naturalOrder;\n\n    function naturalOrder(items) {\n      return items;\n    }\n\n    function randomOrder(items) {\n      var copy = items.slice();\n      copy.sort(function(a, b) {\n        return jenkinsHash(seed + a.id) - jenkinsHash(seed + b.id);\n      });\n      return copy;\n    }\n\n    function generateSeed() {\n      return String(Math.random()).slice(-5);\n    }\n\n    // Bob Jenkins One-at-a-Time Hash algorithm is a non-cryptographic hash function\n    // used to get a different output when the key changes slightly.\n    // We use your return to sort the children randomly in a consistent way when\n    // used in conjunction with a seed\n\n    function jenkinsHash(key) {\n      var hash, i;\n      for(hash = i = 0; i < key.length; ++i) {\n        hash += key.charCodeAt(i);\n        hash += (hash << 10);\n        hash ^= (hash >> 6);\n      }\n      hash += (hash << 3);\n      hash ^= (hash >> 11);\n      hash += (hash << 15);\n      return hash;\n    }\n\n  }\n\n  return Order;\n};\n\ngetJasmineRequireObj().Env = function(j$) {\n  /**\n   * _Note:_ Do not construct this directly, Jasmine will make one during booting.\n   * @name Env\n   * @classdesc The Jasmine environment\n   * @constructor\n   */\n  function Env(options) {\n    options = options || {};\n\n    var self = this;\n    var global = options.global || j$.getGlobal();\n\n    var totalSpecsDefined = 0;\n\n    var realSetTimeout = global.setTimeout;\n    var realClearTimeout = global.clearTimeout;\n    var clearStack = j$.getClearStack(global);\n    this.clock = new j$.Clock(global, function () { return new j$.DelayedFunctionScheduler(); }, new j$.MockDate(global));\n\n    var runnableResources = {};\n\n    var currentSpec = null;\n    var currentlyExecutingSuites = [];\n    var currentDeclarationSuite = null;\n    var hasFailures = false;\n\n    /**\n     * This represents the available options to configure Jasmine.\n     * Options that are not provided will use their default values\n     * @interface Configuration\n     */\n    var config = {\n      /**\n       * Whether to randomize spec execution order\n       * @name Configuration#random\n       * @type Boolean\n       * @default true\n       */\n      random: true,\n      /**\n       * Seed to use as the basis of randomization.\n       * Null causes the seed to be determined randomly at the start of execution.\n       * @name Configuration#seed\n       * @type function\n       * @default null\n       */\n      seed: null,\n      /**\n       * Whether to stop execution of the suite after the first spec failure\n       * @name Configuration#failFast\n       * @type Boolean\n       * @default false\n       */\n      failFast: false,\n      /**\n       * Whether to cause specs to only have one expectation failure.\n       * @name Configuration#oneFailurePerSpec\n       * @type Boolean\n       * @default false\n       */\n      oneFailurePerSpec: false,\n      /**\n       * Function to use to filter specs\n       * @name Configuration#specFilter\n       * @type function\n       * @default true\n       */\n      specFilter: function() {\n        return true;\n      },\n      /**\n       * Whether or not reporters should hide disabled specs from their output.\n       * Currently only supported by Jasmine's HTMLReporter\n       * @name Configuration#hideDisabled\n       * @type Boolean\n       * @default false\n       */\n      hideDisabled: false\n    };\n\n    var currentSuite = function() {\n      return currentlyExecutingSuites[currentlyExecutingSuites.length - 1];\n    };\n\n    var currentRunnable = function() {\n      return currentSpec || currentSuite();\n    };\n\n    var globalErrors = null;\n\n    var installGlobalErrors = function() {\n      if (globalErrors) {\n        return;\n      }\n\n      globalErrors = new j$.GlobalErrors();\n      globalErrors.install();\n    };\n\n    if (!options.suppressLoadErrors) {\n      installGlobalErrors();\n      globalErrors.pushListener(function(message, filename, lineno, colNo, err) {\n        topSuite.result.failedExpectations.push({\n          passed: false,\n          globalErrorType: 'load',\n          message: message,\n          stack: err && err.stack,\n          filename: filename,\n          lineno: lineno\n        });\n      });\n    }\n\n    /**\n     * Configure your jasmine environment\n     * @name Env#configure\n     * @argument {Configuration} configuration\n     * @function\n     */\n    this.configure = function(configuration) {\n      if (configuration.specFilter) {\n        config.specFilter = configuration.specFilter;\n      }\n\n      if (configuration.hasOwnProperty('random')) {\n        config.random = !!configuration.random;\n      }\n\n      if (configuration.hasOwnProperty('seed')) {\n        config.seed = configuration.seed;\n      }\n\n      if (configuration.hasOwnProperty('failFast')) {\n        config.failFast = configuration.failFast;\n      }\n\n      if (configuration.hasOwnProperty('oneFailurePerSpec')) {\n        config.oneFailurePerSpec = configuration.oneFailurePerSpec;\n      }\n\n      if (configuration.hasOwnProperty('hideDisabled')) {\n        config.hideDisabled = configuration.hideDisabled;\n      }\n    };\n\n    /**\n     * Get the current configuration for your jasmine environment\n     * @name Env#configuration\n     * @function\n     * @returns {Configuration}\n     */\n    this.configuration = function() {\n      var result = {};\n      for (var property in config) {\n        result[property] = config[property];\n      }\n      return result;\n    };\n\n    Object.defineProperty(this, 'specFilter', {\n      get: function() {\n        self.deprecated('Getting specFilter directly from Env is deprecated, please check the specFilter option from `configuration`');\n        return config.specFilter;\n      },\n      set: function(val) {\n        self.deprecated('Setting specFilter directly on Env is deprecated, please use the specFilter option in `configure`');\n        config.specFilter = val;\n      }\n    });\n\n    this.addSpyStrategy = function(name, fn) {\n      if(!currentRunnable()) {\n        throw new Error('Custom spy strategies must be added in a before function or a spec');\n      }\n      runnableResources[currentRunnable().id].customSpyStrategies[name] = fn;\n    };\n\n    this.addCustomEqualityTester = function(tester) {\n      if(!currentRunnable()) {\n        throw new Error('Custom Equalities must be added in a before function or a spec');\n      }\n      runnableResources[currentRunnable().id].customEqualityTesters.push(tester);\n    };\n\n    this.addMatchers = function(matchersToAdd) {\n      if(!currentRunnable()) {\n        throw new Error('Matchers must be added in a before function or a spec');\n      }\n      var customMatchers = runnableResources[currentRunnable().id].customMatchers;\n      for (var matcherName in matchersToAdd) {\n        customMatchers[matcherName] = matchersToAdd[matcherName];\n      }\n    };\n\n    j$.Expectation.addCoreMatchers(j$.matchers);\n    j$.Expectation.addAsyncCoreMatchers(j$.asyncMatchers);\n\n    var nextSpecId = 0;\n    var getNextSpecId = function() {\n      return 'spec' + nextSpecId++;\n    };\n\n    var nextSuiteId = 0;\n    var getNextSuiteId = function() {\n      return 'suite' + nextSuiteId++;\n    };\n\n    var expectationFactory = function(actual, spec) {\n      return j$.Expectation.factory({\n        util: j$.matchersUtil,\n        customEqualityTesters: runnableResources[spec.id].customEqualityTesters,\n        customMatchers: runnableResources[spec.id].customMatchers,\n        actual: actual,\n        addExpectationResult: addExpectationResult\n      });\n\n      function addExpectationResult(passed, result) {\n        return spec.addExpectationResult(passed, result);\n      }\n    };\n\n    var asyncExpectationFactory = function(actual, spec) {\n      return j$.Expectation.asyncFactory({\n        util: j$.matchersUtil,\n        customEqualityTesters: runnableResources[spec.id].customEqualityTesters,\n        actual: actual,\n        addExpectationResult: addExpectationResult\n      });\n\n      function addExpectationResult(passed, result) {\n        return spec.addExpectationResult(passed, result);\n      }\n    };\n\n    var defaultResourcesForRunnable = function(id, parentRunnableId) {\n      var resources = {spies: [], customEqualityTesters: [], customMatchers: {}, customSpyStrategies: {}};\n\n      if(runnableResources[parentRunnableId]){\n        resources.customEqualityTesters = j$.util.clone(runnableResources[parentRunnableId].customEqualityTesters);\n        resources.customMatchers = j$.util.clone(runnableResources[parentRunnableId].customMatchers);\n      }\n\n      runnableResources[id] = resources;\n    };\n\n    var clearResourcesForRunnable = function(id) {\n        spyRegistry.clearSpies();\n        delete runnableResources[id];\n    };\n\n    var beforeAndAfterFns = function(suite) {\n      return function() {\n        var befores = [],\n          afters = [];\n\n        while(suite) {\n          befores = befores.concat(suite.beforeFns);\n          afters = afters.concat(suite.afterFns);\n\n          suite = suite.parentSuite;\n        }\n\n        return {\n          befores: befores.reverse(),\n          afters: afters\n        };\n      };\n    };\n\n    var getSpecName = function(spec, suite) {\n      var fullName = [spec.description],\n          suiteFullName = suite.getFullName();\n\n      if (suiteFullName !== '') {\n        fullName.unshift(suiteFullName);\n      }\n      return fullName.join(' ');\n    };\n\n    // TODO: we may just be able to pass in the fn instead of wrapping here\n    var buildExpectationResult = j$.buildExpectationResult,\n        exceptionFormatter = new j$.ExceptionFormatter(),\n        expectationResultFactory = function(attrs) {\n          attrs.messageFormatter = exceptionFormatter.message;\n          attrs.stackFormatter = exceptionFormatter.stack;\n\n          return buildExpectationResult(attrs);\n        };\n\n    var maximumSpecCallbackDepth = 20;\n    var currentSpecCallbackDepth = 0;\n\n    /**\n     * Sets whether Jasmine should throw an Error when an expectation fails.\n     * This causes a spec to only have one expectation failure.\n     * @name Env#throwOnExpectationFailure\n     * @function\n     * @param {Boolean} value Whether to throw when a expectation fails\n     * @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}\n     */\n    this.throwOnExpectationFailure = function(value) {\n      this.deprecated('Setting throwOnExpectationFailure directly on Env is deprecated, please use the oneFailurePerSpec option in `configure`');\n      this.configure({oneFailurePerSpec: !!value});\n    };\n\n    this.throwingExpectationFailures = function() {\n      this.deprecated('Getting throwingExpectationFailures directly from Env is deprecated, please check the oneFailurePerSpec option from `configuration`');\n      return config.oneFailurePerSpec;\n    };\n\n    /**\n     * Set whether to stop suite execution when a spec fails\n     * @name Env#stopOnSpecFailure\n     * @function\n     * @param {Boolean} value Whether to stop suite execution when a spec fails\n     * @deprecated Use the `failFast` option with {@link Env#configure}\n     */\n    this.stopOnSpecFailure = function(value) {\n      this.deprecated('Setting stopOnSpecFailure directly is deprecated, please use the failFast option in `configure`');\n      this.configure({failFast: !!value});\n    };\n\n    this.stoppingOnSpecFailure = function() {\n      this.deprecated('Getting stoppingOnSpecFailure directly from Env is deprecated, please check the failFast option from `configuration`');\n      return config.failFast;\n    };\n\n    /**\n     * Set whether to randomize test execution order\n     * @name Env#randomizeTests\n     * @function\n     * @param {Boolean} value Whether to randomize execution order\n     * @deprecated Use the `random` option with {@link Env#configure}\n     */\n    this.randomizeTests = function(value) {\n      this.deprecated('Setting randomizeTests directly is deprecated, please use the random option in `configure`');\n      config.random = !!value;\n    };\n\n    this.randomTests = function() {\n      this.deprecated('Getting randomTests directly from Env is deprecated, please check the random option from `configuration`');\n      return config.random;\n    };\n\n    /**\n     * Set the random number seed for spec randomization\n     * @name Env#seed\n     * @function\n     * @param {Number} value The seed value\n     * @deprecated Use the `seed` option with {@link Env#configure}\n     */\n    this.seed = function(value) {\n      this.deprecated('Setting seed directly is deprecated, please use the seed option in `configure`');\n      if (value) {\n        config.seed = value;\n      }\n      return config.seed;\n    };\n\n    this.hidingDisabled = function(value) {\n      this.deprecated('Getting hidingDisabled directly from Env is deprecated, please check the hideDisabled option from `configuration`');\n      return config.hideDisabled;\n    };\n\n    /**\n     * @name Env#hideDisabled\n     * @function\n     */\n    this.hideDisabled = function(value) {\n      this.deprecated('Setting hideDisabled directly is deprecated, please use the hideDisabled option in `configure`');\n      config.hideDisabled = !!value;\n    };\n\n    this.deprecated = function(deprecation) {\n      var runnable = currentRunnable() || topSuite;\n      runnable.addDeprecationWarning(deprecation);\n      if(typeof console !== 'undefined' && typeof console.error === 'function') {\n        console.error('DEPRECATION:', deprecation);\n      }\n    };\n\n    var queueRunnerFactory = function(options, args) {\n      var failFast = false;\n      if (options.isLeaf) {\n        failFast = config.oneFailurePerSpec;\n      } else if (!options.isReporter) {\n        failFast = config.failFast;\n      }\n      options.clearStack = options.clearStack || clearStack;\n      options.timeout = {setTimeout: realSetTimeout, clearTimeout: realClearTimeout};\n      options.fail = self.fail;\n      options.globalErrors = globalErrors;\n      options.completeOnFirstError = failFast;\n      options.onException = options.onException || function(e) {\n        (currentRunnable() || topSuite).onException(e);\n      };\n      options.deprecated = self.deprecated;\n\n      new j$.QueueRunner(options).execute(args);\n    };\n\n    var topSuite = new j$.Suite({\n      env: this,\n      id: getNextSuiteId(),\n      description: 'Jasmine__TopLevel__Suite',\n      expectationFactory: expectationFactory,\n      asyncExpectationFactory: asyncExpectationFactory,\n      expectationResultFactory: expectationResultFactory\n    });\n    defaultResourcesForRunnable(topSuite.id);\n    currentDeclarationSuite = topSuite;\n\n    this.topSuite = function() {\n      return topSuite;\n    };\n\n    /**\n     * This represents the available reporter callback for an object passed to {@link Env#addReporter}.\n     * @interface Reporter\n     * @see custom_reporter\n     */\n    var reporter = new j$.ReportDispatcher([\n      /**\n       * `jasmineStarted` is called after all of the specs have been loaded, but just before execution starts.\n       * @function\n       * @name Reporter#jasmineStarted\n       * @param {JasmineStartedInfo} suiteInfo Information about the full Jasmine suite that is being run\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'jasmineStarted',\n      /**\n       * When the entire suite has finished execution `jasmineDone` is called\n       * @function\n       * @name Reporter#jasmineDone\n       * @param {JasmineDoneInfo} suiteInfo Information about the full Jasmine suite that just finished running.\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'jasmineDone',\n      /**\n       * `suiteStarted` is invoked when a `describe` starts to run\n       * @function\n       * @name Reporter#suiteStarted\n       * @param {SuiteResult} result Information about the individual {@link describe} being run\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'suiteStarted',\n      /**\n       * `suiteDone` is invoked when all of the child specs and suites for a given suite have been run\n       *\n       * While jasmine doesn't require any specific functions, not defining a `suiteDone` will make it impossible for a reporter to know when a suite has failures in an `afterAll`.\n       * @function\n       * @name Reporter#suiteDone\n       * @param {SuiteResult} result\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'suiteDone',\n      /**\n       * `specStarted` is invoked when an `it` starts to run (including associated `beforeEach` functions)\n       * @function\n       * @name Reporter#specStarted\n       * @param {SpecResult} result Information about the individual {@link it} being run\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'specStarted',\n      /**\n       * `specDone` is invoked when an `it` and its associated `beforeEach` and `afterEach` functions have been run.\n       *\n       * While jasmine doesn't require any specific functions, not defining a `specDone` will make it impossible for a reporter to know when a spec has failed.\n       * @function\n       * @name Reporter#specDone\n       * @param {SpecResult} result\n       * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n       * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n       * @see async\n       */\n      'specDone'\n    ], queueRunnerFactory);\n\n    this.execute = function(runnablesToRun) {\n      var self = this;\n      installGlobalErrors();\n\n      if(!runnablesToRun) {\n        if (focusedRunnables.length) {\n          runnablesToRun = focusedRunnables;\n        } else {\n          runnablesToRun = [topSuite.id];\n        }\n      }\n\n      var order = new j$.Order({\n        random: config.random,\n        seed: config.seed\n      });\n\n      var processor = new j$.TreeProcessor({\n        tree: topSuite,\n        runnableIds: runnablesToRun,\n        queueRunnerFactory: queueRunnerFactory,\n        nodeStart: function(suite, next) {\n          currentlyExecutingSuites.push(suite);\n          defaultResourcesForRunnable(suite.id, suite.parentSuite.id);\n          reporter.suiteStarted(suite.result, next);\n          suite.startTimer();\n        },\n        nodeComplete: function(suite, result, next) {\n          if (suite !== currentSuite()) {\n            throw new Error('Tried to complete the wrong suite');\n          }\n\n          clearResourcesForRunnable(suite.id);\n          currentlyExecutingSuites.pop();\n\n          if (result.status === 'failed') {\n            hasFailures = true;\n          }\n          suite.endTimer();\n          reporter.suiteDone(result, next);\n        },\n        orderChildren: function(node) {\n          return order.sort(node.children);\n        },\n        excludeNode: function(spec) {\n          return !config.specFilter(spec);\n        }\n      });\n\n      if(!processor.processTree().valid) {\n        throw new Error('Invalid order: would cause a beforeAll or afterAll to be run multiple times');\n      }\n\n      /**\n       * Information passed to the {@link Reporter#jasmineStarted} event.\n       * @typedef JasmineStartedInfo\n       * @property {Int} totalSpecsDefined - The total number of specs defined in this suite.\n       * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.\n       */\n      reporter.jasmineStarted({\n        totalSpecsDefined: totalSpecsDefined,\n        order: order\n      }, function() {\n        currentlyExecutingSuites.push(topSuite);\n\n        processor.execute(function () {\n          clearResourcesForRunnable(topSuite.id);\n          currentlyExecutingSuites.pop();\n          var overallStatus, incompleteReason;\n\n          if (hasFailures || topSuite.result.failedExpectations.length > 0) {\n            overallStatus = 'failed';\n          } else if (focusedRunnables.length > 0) {\n            overallStatus = 'incomplete';\n            incompleteReason = 'fit() or fdescribe() was found';\n          } else if (totalSpecsDefined === 0) {\n            overallStatus = 'incomplete';\n            incompleteReason = 'No specs found';\n          } else {\n            overallStatus = 'passed';\n          }\n\n          /**\n           * Information passed to the {@link Reporter#jasmineDone} event.\n           * @typedef JasmineDoneInfo\n           * @property {OverallStatus} overallStatus - The overall result of the suite: 'passed', 'failed', or 'incomplete'.\n           * @property {IncompleteReason} incompleteReason - Explanation of why the suite was incomplete.\n           * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.\n           * @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level.\n           * @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level.\n           */\n          reporter.jasmineDone({\n            overallStatus: overallStatus,\n            incompleteReason: incompleteReason,\n            order: order,\n            failedExpectations: topSuite.result.failedExpectations,\n            deprecationWarnings: topSuite.result.deprecationWarnings\n          }, function() {});\n        });\n      });\n    };\n\n    /**\n     * Add a custom reporter to the Jasmine environment.\n     * @name Env#addReporter\n     * @function\n     * @param {Reporter} reporterToAdd The reporter to be added.\n     * @see custom_reporter\n     */\n    this.addReporter = function(reporterToAdd) {\n      reporter.addReporter(reporterToAdd);\n    };\n\n    /**\n     * Provide a fallback reporter if no other reporters have been specified.\n     * @name Env#provideFallbackReporter\n     * @function\n     * @param {Reporter} reporterToAdd The reporter\n     * @see custom_reporter\n     */\n    this.provideFallbackReporter = function(reporterToAdd) {\n      reporter.provideFallbackReporter(reporterToAdd);\n    };\n\n    /**\n     * Clear all registered reporters\n     * @name Env#clearReporters\n     * @function\n     */\n    this.clearReporters = function() {\n      reporter.clearReporters();\n    };\n\n    var spyFactory = new j$.SpyFactory(function() {\n      var runnable = currentRunnable();\n\n      if (runnable) {\n        return runnableResources[runnable.id].customSpyStrategies;\n      }\n\n      return {};\n    });\n\n    var spyRegistry = new j$.SpyRegistry({\n      currentSpies: function() {\n        if(!currentRunnable()) {\n          throw new Error('Spies must be created in a before function or a spec');\n        }\n        return runnableResources[currentRunnable().id].spies;\n      },\n      createSpy: function(name, originalFn) {\n        return self.createSpy(name, originalFn);\n      }\n    });\n\n    this.allowRespy = function(allow){\n      spyRegistry.allowRespy(allow);\n    };\n\n    this.spyOn = function() {\n      return spyRegistry.spyOn.apply(spyRegistry, arguments);\n    };\n\n    this.spyOnProperty = function() {\n      return spyRegistry.spyOnProperty.apply(spyRegistry, arguments);\n    };\n\n    this.spyOnAllFunctions = function() {\n      return spyRegistry.spyOnAllFunctions.apply(spyRegistry, arguments);\n    };\n\n    this.createSpy = function(name, originalFn) {\n      if (arguments.length === 1 && j$.isFunction_(name)) {\n        originalFn = name;\n        name = originalFn.name;\n      }\n\n      return spyFactory.createSpy(name, originalFn);\n    };\n\n    this.createSpyObj = function(baseName, methodNames) {\n      return spyFactory.createSpyObj(baseName, methodNames);\n    };\n\n    var ensureIsFunction = function(fn, caller) {\n      if (!j$.isFunction_(fn)) {\n        throw new Error(caller + ' expects a function argument; received ' + j$.getType_(fn));\n      }\n    };\n\n    var ensureIsFunctionOrAsync = function(fn, caller) {\n      if (!j$.isFunction_(fn) && !j$.isAsyncFunction_(fn)) {\n        throw new Error(caller + ' expects a function argument; received ' + j$.getType_(fn));\n      }\n    };\n\n    function ensureIsNotNested(method) {\n      var runnable = currentRunnable();\n      if (runnable !== null && runnable !== undefined) {\n        throw new Error('\\'' + method + '\\' should only be used in \\'describe\\' function');\n      }\n    }\n\n    var suiteFactory = function(description) {\n      var suite = new j$.Suite({\n        env: self,\n        id: getNextSuiteId(),\n        description: description,\n        parentSuite: currentDeclarationSuite,\n        expectationFactory: expectationFactory,\n        asyncExpectationFactory: asyncExpectationFactory,\n        expectationResultFactory: expectationResultFactory,\n        throwOnExpectationFailure: config.oneFailurePerSpec\n      });\n\n      return suite;\n    };\n\n    this.describe = function(description, specDefinitions) {\n      ensureIsNotNested('describe');\n      ensureIsFunction(specDefinitions, 'describe');\n      var suite = suiteFactory(description);\n      if (specDefinitions.length > 0) {\n        throw new Error('describe does not expect any arguments');\n      }\n      if (currentDeclarationSuite.markedPending) {\n        suite.pend();\n      }\n      addSpecsToSuite(suite, specDefinitions);\n      return suite;\n    };\n\n    this.xdescribe = function(description, specDefinitions) {\n      ensureIsNotNested('xdescribe');\n      ensureIsFunction(specDefinitions, 'xdescribe');\n      var suite = suiteFactory(description);\n      suite.pend();\n      addSpecsToSuite(suite, specDefinitions);\n      return suite;\n    };\n\n    var focusedRunnables = [];\n\n    this.fdescribe = function(description, specDefinitions) {\n      ensureIsNotNested('fdescribe');\n      ensureIsFunction(specDefinitions, 'fdescribe');\n      var suite = suiteFactory(description);\n      suite.isFocused = true;\n\n      focusedRunnables.push(suite.id);\n      unfocusAncestor();\n      addSpecsToSuite(suite, specDefinitions);\n\n      return suite;\n    };\n\n    function addSpecsToSuite(suite, specDefinitions) {\n      var parentSuite = currentDeclarationSuite;\n      parentSuite.addChild(suite);\n      currentDeclarationSuite = suite;\n\n      var declarationError = null;\n      try {\n        specDefinitions.call(suite);\n      } catch (e) {\n        declarationError = e;\n      }\n\n      if (declarationError) {\n        suite.onException(declarationError);\n      }\n\n      currentDeclarationSuite = parentSuite;\n    }\n\n    function findFocusedAncestor(suite) {\n      while (suite) {\n        if (suite.isFocused) {\n          return suite.id;\n        }\n        suite = suite.parentSuite;\n      }\n\n      return null;\n    }\n\n    function unfocusAncestor() {\n      var focusedAncestor = findFocusedAncestor(currentDeclarationSuite);\n      if (focusedAncestor) {\n        for (var i = 0; i < focusedRunnables.length; i++) {\n          if (focusedRunnables[i] === focusedAncestor) {\n            focusedRunnables.splice(i, 1);\n            break;\n          }\n        }\n      }\n    }\n\n    var specFactory = function(description, fn, suite, timeout) {\n      totalSpecsDefined++;\n      var spec = new j$.Spec({\n        id: getNextSpecId(),\n        beforeAndAfterFns: beforeAndAfterFns(suite),\n        expectationFactory: expectationFactory,\n        asyncExpectationFactory: asyncExpectationFactory,\n        resultCallback: specResultCallback,\n        getSpecName: function(spec) {\n          return getSpecName(spec, suite);\n        },\n        onStart: specStarted,\n        description: description,\n        expectationResultFactory: expectationResultFactory,\n        queueRunnerFactory: queueRunnerFactory,\n        userContext: function() { return suite.clonedSharedUserContext(); },\n        queueableFn: {\n          fn: fn,\n          timeout: timeout || 0\n        },\n        throwOnExpectationFailure: config.oneFailurePerSpec,\n        timer: new j$.Timer(),\n      });\n      return spec;\n\n      function specResultCallback(result, next) {\n        clearResourcesForRunnable(spec.id);\n        currentSpec = null;\n\n        if (result.status === 'failed') {\n          hasFailures = true;\n        }\n\n        reporter.specDone(result, next);\n      }\n\n      function specStarted(spec, next) {\n        currentSpec = spec;\n        defaultResourcesForRunnable(spec.id, suite.id);\n        reporter.specStarted(spec.result, next);\n      }\n    };\n\n    this.it = function(description, fn, timeout) {\n      ensureIsNotNested('it');\n      // it() sometimes doesn't have a fn argument, so only check the type if\n      // it's given.\n      if (arguments.length > 1 && typeof fn !== 'undefined') {\n        ensureIsFunctionOrAsync(fn, 'it');\n      }\n      var spec = specFactory(description, fn, currentDeclarationSuite, timeout);\n      if (currentDeclarationSuite.markedPending) {\n        spec.pend();\n      }\n      currentDeclarationSuite.addChild(spec);\n      return spec;\n    };\n\n    this.xit = function(description, fn, timeout) {\n      ensureIsNotNested('xit');\n      // xit(), like it(), doesn't always have a fn argument, so only check the\n      // type when needed.\n      if (arguments.length > 1 && typeof fn !== 'undefined') {\n        ensureIsFunctionOrAsync(fn, 'xit');\n      }\n      var spec = this.it.apply(this, arguments);\n      spec.pend('Temporarily disabled with xit');\n      return spec;\n    };\n\n    this.fit = function(description, fn, timeout){\n      ensureIsNotNested('fit');\n      ensureIsFunctionOrAsync(fn, 'fit');\n      var spec = specFactory(description, fn, currentDeclarationSuite, timeout);\n      currentDeclarationSuite.addChild(spec);\n      focusedRunnables.push(spec.id);\n      unfocusAncestor();\n      return spec;\n    };\n\n    this.expect = function(actual) {\n      if (!currentRunnable()) {\n        throw new Error('\\'expect\\' was used when there was no current spec, this could be because an asynchronous test timed out');\n      }\n\n      return currentRunnable().expect(actual);\n    };\n\n    this.expectAsync = function(actual) {\n      if (!currentRunnable()) {\n        throw new Error('\\'expectAsync\\' was used when there was no current spec, this could be because an asynchronous test timed out');\n      }\n\n      return currentRunnable().expectAsync(actual);\n    };\n\n    this.beforeEach = function(beforeEachFunction, timeout) {\n      ensureIsNotNested('beforeEach');\n      ensureIsFunctionOrAsync(beforeEachFunction, 'beforeEach');\n      currentDeclarationSuite.beforeEach({\n        fn: beforeEachFunction,\n        timeout: timeout || 0\n      });\n    };\n\n    this.beforeAll = function(beforeAllFunction, timeout) {\n      ensureIsNotNested('beforeAll');\n      ensureIsFunctionOrAsync(beforeAllFunction, 'beforeAll');\n      currentDeclarationSuite.beforeAll({\n        fn: beforeAllFunction,\n        timeout: timeout || 0\n      });\n    };\n\n    this.afterEach = function(afterEachFunction, timeout) {\n      ensureIsNotNested('afterEach');\n      ensureIsFunctionOrAsync(afterEachFunction, 'afterEach');\n      afterEachFunction.isCleanup = true;\n      currentDeclarationSuite.afterEach({\n        fn: afterEachFunction,\n        timeout: timeout || 0\n      });\n    };\n\n    this.afterAll = function(afterAllFunction, timeout) {\n      ensureIsNotNested('afterAll');\n      ensureIsFunctionOrAsync(afterAllFunction, 'afterAll');\n      currentDeclarationSuite.afterAll({\n        fn: afterAllFunction,\n        timeout: timeout || 0\n      });\n    };\n\n    this.pending = function(message) {\n      var fullMessage = j$.Spec.pendingSpecExceptionMessage;\n      if(message) {\n        fullMessage += message;\n      }\n      throw fullMessage;\n    };\n\n    this.fail = function(error) {\n      if (!currentRunnable()) {\n        throw new Error('\\'fail\\' was used when there was no current spec, this could be because an asynchronous test timed out');\n      }\n\n      var message = 'Failed';\n      if (error) {\n        message += ': ';\n        if (error.message) {\n          message += error.message;\n        } else if (j$.isString_(error)) {\n          message += error;\n        } else {\n          // pretty print all kind of objects. This includes arrays.\n          message += j$.pp(error);\n        }\n      }\n\n      currentRunnable().addExpectationResult(false, {\n        matcherName: '',\n        passed: false,\n        expected: '',\n        actual: '',\n        message: message,\n        error: error && error.message ? error : null\n      });\n\n      if (config.oneFailurePerSpec) {\n        throw new Error(message);\n      }\n    };\n  }\n\n  return Env;\n};\n\ngetJasmineRequireObj().JsApiReporter = function(j$) {\n  /**\n   * @name jsApiReporter\n   * @classdesc {@link Reporter} added by default in `boot.js` to record results for retrieval in javascript code. An instance is made available as `jsApiReporter` on the global object.\n   * @class\n   * @hideconstructor\n   */\n  function JsApiReporter(options) {\n    var timer = options.timer || j$.noopTimer,\n        status = 'loaded';\n\n    this.started = false;\n    this.finished = false;\n    this.runDetails = {};\n\n    this.jasmineStarted = function() {\n      this.started = true;\n      status = 'started';\n      timer.start();\n    };\n\n    var executionTime;\n\n    this.jasmineDone = function(runDetails) {\n      this.finished = true;\n      this.runDetails = runDetails;\n      executionTime = timer.elapsed();\n      status = 'done';\n    };\n\n    /**\n     * Get the current status for the Jasmine environment.\n     * @name jsApiReporter#status\n     * @function\n     * @return {String} - One of `loaded`, `started`, or `done`\n     */\n    this.status = function() {\n      return status;\n    };\n\n    var suites = [],\n      suites_hash = {};\n\n    this.suiteStarted = function(result) {\n      suites_hash[result.id] = result;\n    };\n\n    this.suiteDone = function(result) {\n      storeSuite(result);\n    };\n\n    /**\n     * Get the results for a set of suites.\n     *\n     * Retrievable in slices for easier serialization.\n     * @name jsApiReporter#suiteResults\n     * @function\n     * @param {Number} index - The position in the suites list to start from.\n     * @param {Number} length - Maximum number of suite results to return.\n     * @return {SuiteResult[]}\n     */\n    this.suiteResults = function(index, length) {\n      return suites.slice(index, index + length);\n    };\n\n    function storeSuite(result) {\n      suites.push(result);\n      suites_hash[result.id] = result;\n    }\n\n    /**\n     * Get all of the suites in a single object, with their `id` as the key.\n     * @name jsApiReporter#suites\n     * @function\n     * @return {Object} - Map of suite id to {@link SuiteResult}\n     */\n    this.suites = function() {\n      return suites_hash;\n    };\n\n    var specs = [];\n\n    this.specDone = function(result) {\n      specs.push(result);\n    };\n\n    /**\n     * Get the results for a set of specs.\n     *\n     * Retrievable in slices for easier serialization.\n     * @name jsApiReporter#specResults\n     * @function\n     * @param {Number} index - The position in the specs list to start from.\n     * @param {Number} length - Maximum number of specs results to return.\n     * @return {SpecResult[]}\n     */\n    this.specResults = function(index, length) {\n      return specs.slice(index, index + length);\n    };\n\n    /**\n     * Get all spec results.\n     * @name jsApiReporter#specs\n     * @function\n     * @return {SpecResult[]}\n     */\n    this.specs = function() {\n      return specs;\n    };\n\n    /**\n     * Get the number of milliseconds it took for the full Jasmine suite to run.\n     * @name jsApiReporter#executionTime\n     * @function\n     * @return {Number}\n     */\n    this.executionTime = function() {\n      return executionTime;\n    };\n\n  }\n\n  return JsApiReporter;\n};\n\ngetJasmineRequireObj().Any = function(j$) {\n\n  function Any(expectedObject) {\n    if (typeof expectedObject === 'undefined') {\n      throw new TypeError(\n        'jasmine.any() expects to be passed a constructor function. ' +\n        'Please pass one or use jasmine.anything() to match any object.'\n      );\n    }\n    this.expectedObject = expectedObject;\n  }\n\n  Any.prototype.asymmetricMatch = function(other) {\n    if (this.expectedObject == String) {\n      return typeof other == 'string' || other instanceof String;\n    }\n\n    if (this.expectedObject == Number) {\n      return typeof other == 'number' || other instanceof Number;\n    }\n\n    if (this.expectedObject == Function) {\n      return typeof other == 'function' || other instanceof Function;\n    }\n\n    if (this.expectedObject == Object) {\n      return other !== null && typeof other == 'object';\n    }\n\n    if (this.expectedObject == Boolean) {\n      return typeof other == 'boolean';\n    }\n\n    /* jshint -W122 */\n    /* global Symbol */\n    if (typeof Symbol != 'undefined' && this.expectedObject == Symbol) {\n      return typeof other == 'symbol';\n    }\n    /* jshint +W122 */\n\n    return other instanceof this.expectedObject;\n  };\n\n  Any.prototype.jasmineToString = function() {\n    return '<jasmine.any(' + j$.fnNameFor(this.expectedObject) + ')>';\n  };\n\n  return Any;\n};\n\ngetJasmineRequireObj().Anything = function(j$) {\n\n  function Anything() {}\n\n  Anything.prototype.asymmetricMatch = function(other) {\n    return !j$.util.isUndefined(other) && other !== null;\n  };\n\n  Anything.prototype.jasmineToString = function() {\n    return '<jasmine.anything>';\n  };\n\n  return Anything;\n};\n\ngetJasmineRequireObj().ArrayContaining = function(j$) {\n  function ArrayContaining(sample) {\n    this.sample = sample;\n  }\n\n  ArrayContaining.prototype.asymmetricMatch = function(other, customTesters) {\n    if (!j$.isArray_(this.sample)) {\n      throw new Error('You must provide an array to arrayContaining, not ' + j$.pp(this.sample) + '.');\n    }\n\n    for (var i = 0; i < this.sample.length; i++) {\n      var item = this.sample[i];\n      if (!j$.matchersUtil.contains(other, item, customTesters)) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  ArrayContaining.prototype.jasmineToString = function () {\n    return '<jasmine.arrayContaining(' + j$.pp(this.sample) +')>';\n  };\n\n  return ArrayContaining;\n};\n\ngetJasmineRequireObj().ArrayWithExactContents = function(j$) {\n\n  function ArrayWithExactContents(sample) {\n    this.sample = sample;\n  }\n\n  ArrayWithExactContents.prototype.asymmetricMatch = function(other, customTesters) {\n    if (!j$.isArray_(this.sample)) {\n      throw new Error('You must provide an array to arrayWithExactContents, not ' + j$.pp(this.sample) + '.');\n    }\n\n    if (this.sample.length !== other.length) {\n      return false;\n    }\n\n    for (var i = 0; i < this.sample.length; i++) {\n      var item = this.sample[i];\n      if (!j$.matchersUtil.contains(other, item, customTesters)) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  ArrayWithExactContents.prototype.jasmineToString = function() {\n    return '<jasmine.arrayWithExactContents ' + j$.pp(this.sample) + '>';\n  };\n\n  return ArrayWithExactContents;\n};\n\ngetJasmineRequireObj().Empty = function (j$) {\n\n  function Empty() {}\n\n  Empty.prototype.asymmetricMatch = function (other) {\n    if (j$.isString_(other) || j$.isArray_(other) || j$.isTypedArray_(other)) {\n      return other.length === 0;\n    }\n\n    if (j$.isMap(other) || j$.isSet(other)) {\n      return other.size === 0;\n    }\n\n    if (j$.isObject_(other)) {\n      return Object.keys(other).length === 0;\n    }\n    return false;\n  };\n\n  Empty.prototype.jasmineToString = function () {\n    return '<jasmine.empty>';\n  };\n\n  return Empty;\n};\n\ngetJasmineRequireObj().Falsy = function(j$) {\n\n  function Falsy() {}\n\n  Falsy.prototype.asymmetricMatch = function(other) {\n    return !other;\n  };\n\n  Falsy.prototype.jasmineToString = function() {\n    return '<jasmine.falsy>';\n  };\n\n  return Falsy;\n};\n\ngetJasmineRequireObj().NotEmpty = function (j$) {\n\n  function NotEmpty() {}\n\n  NotEmpty.prototype.asymmetricMatch = function (other) {\n    if (j$.isString_(other) || j$.isArray_(other) || j$.isTypedArray_(other)) {\n      return other.length !== 0;\n    }\n\n    if (j$.isMap(other) || j$.isSet(other)) {\n      return other.size !== 0;\n    }\n\n    if (j$.isObject_(other)) {\n      return Object.keys(other).length !== 0;\n    }\n\n    return false;\n  };\n\n  NotEmpty.prototype.jasmineToString = function () {\n    return '<jasmine.notEmpty>';\n  };\n\n  return NotEmpty;\n};\n\ngetJasmineRequireObj().ObjectContaining = function(j$) {\n\n  function ObjectContaining(sample) {\n    this.sample = sample;\n  }\n\n  function getPrototype(obj) {\n    if (Object.getPrototypeOf) {\n      return Object.getPrototypeOf(obj);\n    }\n\n    if (obj.constructor.prototype == obj) {\n      return null;\n    }\n\n    return obj.constructor.prototype;\n  }\n\n  function hasProperty(obj, property) {\n    if (!obj) {\n      return false;\n    }\n\n    if (Object.prototype.hasOwnProperty.call(obj, property)) {\n      return true;\n    }\n\n    return hasProperty(getPrototype(obj), property);\n  }\n\n  ObjectContaining.prototype.asymmetricMatch = function(other, customTesters) {\n    if (typeof(this.sample) !== 'object') { throw new Error('You must provide an object to objectContaining, not \\''+this.sample+'\\'.'); }\n\n    for (var property in this.sample) {\n      if (!hasProperty(other, property) ||\n          !j$.matchersUtil.equals(this.sample[property], other[property], customTesters)) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  ObjectContaining.prototype.jasmineToString = function() {\n    return '<jasmine.objectContaining(' + j$.pp(this.sample) + ')>';\n  };\n\n  return ObjectContaining;\n};\n\ngetJasmineRequireObj().StringMatching = function(j$) {\n\n  function StringMatching(expected) {\n    if (!j$.isString_(expected) && !j$.isA_('RegExp', expected)) {\n      throw new Error('Expected is not a String or a RegExp');\n    }\n\n    this.regexp = new RegExp(expected);\n  }\n\n  StringMatching.prototype.asymmetricMatch = function(other) {\n    return this.regexp.test(other);\n  };\n\n  StringMatching.prototype.jasmineToString = function() {\n    return '<jasmine.stringMatching(' + this.regexp + ')>';\n  };\n\n  return StringMatching;\n};\n\ngetJasmineRequireObj().Truthy = function(j$) {\n\n  function Truthy() {}\n\n  Truthy.prototype.asymmetricMatch = function(other) {\n    return !!other;\n  };\n\n  Truthy.prototype.jasmineToString = function() {\n    return '<jasmine.truthy>';\n  };\n\n  return Truthy;\n};\n\ngetJasmineRequireObj().CallTracker = function(j$) {\n\n  /**\n   * @namespace Spy#calls\n   */\n  function CallTracker() {\n    var calls = [];\n    var opts = {};\n\n    this.track = function(context) {\n      if(opts.cloneArgs) {\n        context.args = j$.util.cloneArgs(context.args);\n      }\n      calls.push(context);\n    };\n\n    /**\n     * Check whether this spy has been invoked.\n     * @name Spy#calls#any\n     * @function\n     * @return {Boolean}\n     */\n    this.any = function() {\n      return !!calls.length;\n    };\n\n    /**\n     * Get the number of invocations of this spy.\n     * @name Spy#calls#count\n     * @function\n     * @return {Integer}\n     */\n    this.count = function() {\n      return calls.length;\n    };\n\n    /**\n     * Get the arguments that were passed to a specific invocation of this spy.\n     * @name Spy#calls#argsFor\n     * @function\n     * @param {Integer} index The 0-based invocation index.\n     * @return {Array}\n     */\n    this.argsFor = function(index) {\n      var call = calls[index];\n      return call ? call.args : [];\n    };\n\n    /**\n     * Get the raw calls array for this spy.\n     * @name Spy#calls#all\n     * @function\n     * @return {Spy.callData[]}\n     */\n    this.all = function() {\n      return calls;\n    };\n\n    /**\n     * Get all of the arguments for each invocation of this spy in the order they were received.\n     * @name Spy#calls#allArgs\n     * @function\n     * @return {Array}\n     */\n    this.allArgs = function() {\n      var callArgs = [];\n      for(var i = 0; i < calls.length; i++){\n        callArgs.push(calls[i].args);\n      }\n\n      return callArgs;\n    };\n\n    /**\n     * Get the first invocation of this spy.\n     * @name Spy#calls#first\n     * @function\n     * @return {ObjecSpy.callData}\n     */\n    this.first = function() {\n      return calls[0];\n    };\n\n    /**\n     * Get the most recent invocation of this spy.\n     * @name Spy#calls#mostRecent\n     * @function\n     * @return {ObjecSpy.callData}\n     */\n    this.mostRecent = function() {\n      return calls[calls.length - 1];\n    };\n\n    /**\n     * Reset this spy as if it has never been called.\n     * @name Spy#calls#reset\n     * @function\n     */\n    this.reset = function() {\n      calls = [];\n    };\n\n    /**\n     * Set this spy to do a shallow clone of arguments passed to each invocation.\n     * @name Spy#calls#saveArgumentsByValue\n     * @function\n     */\n    this.saveArgumentsByValue = function() {\n      opts.cloneArgs = true;\n    };\n\n  }\n\n  return CallTracker;\n};\n\ngetJasmineRequireObj().clearStack = function(j$) {\n  var maxInlineCallCount = 10;\n\n  function messageChannelImpl(global, setTimeout) {\n    var channel = new global.MessageChannel(),\n        head = {},\n        tail = head;\n\n    var taskRunning = false;\n    channel.port1.onmessage = function() {\n      head = head.next;\n      var task = head.task;\n      delete head.task;\n\n      if (taskRunning) {\n        global.setTimeout(task, 0);\n      } else {\n        try {\n          taskRunning = true;\n          task();\n        } finally {\n          taskRunning = false;\n        }\n      }\n    };\n\n    var currentCallCount = 0;\n    return function clearStack(fn) {\n      currentCallCount++;\n\n      if (currentCallCount < maxInlineCallCount) {\n        tail = tail.next = { task: fn };\n        channel.port2.postMessage(0);\n      } else {\n        currentCallCount = 0;\n        setTimeout(fn);\n      }\n    };\n  }\n\n  function getClearStack(global) {\n    var currentCallCount = 0;\n    var realSetTimeout = global.setTimeout;\n    var setTimeoutImpl = function clearStack(fn) {\n        Function.prototype.apply.apply(realSetTimeout, [global, [fn, 0]]);\n    };\n\n    if (j$.isFunction_(global.setImmediate)) {\n      var realSetImmediate = global.setImmediate;\n      return function(fn) {\n        currentCallCount++;\n\n        if (currentCallCount < maxInlineCallCount) {\n          realSetImmediate(fn);\n        } else {\n          currentCallCount = 0;\n\n          setTimeoutImpl(fn);\n        }\n      };\n    } else if (!j$.util.isUndefined(global.MessageChannel)) {\n      return messageChannelImpl(global, setTimeoutImpl);\n    } else {\n      return setTimeoutImpl;\n    }\n  }\n\n  return getClearStack;\n};\n\ngetJasmineRequireObj().Clock = function() {\n\n  /* global process */\n  var NODE_JS = typeof process !== 'undefined' && process.versions && typeof process.versions.node === 'string';\n\n  /**\n   * _Note:_ Do not construct this directly, Jasmine will make one during booting. You can get the current clock with {@link jasmine.clock}.\n   * @class Clock\n   * @classdesc Jasmine's mock clock is used when testing time dependent code.\n   */\n  function Clock(global, delayedFunctionSchedulerFactory, mockDate) {\n    var self = this,\n      realTimingFunctions = {\n        setTimeout: global.setTimeout,\n        clearTimeout: global.clearTimeout,\n        setInterval: global.setInterval,\n        clearInterval: global.clearInterval\n      },\n      fakeTimingFunctions = {\n        setTimeout: setTimeout,\n        clearTimeout: clearTimeout,\n        setInterval: setInterval,\n        clearInterval: clearInterval\n      },\n      installed = false,\n      delayedFunctionScheduler,\n      timer;\n\n    self.FakeTimeout = FakeTimeout;\n\n    /**\n     * Install the mock clock over the built-in methods.\n     * @name Clock#install\n     * @function\n     * @return {Clock}\n     */\n    self.install = function() {\n      if(!originalTimingFunctionsIntact()) {\n        throw new Error('Jasmine Clock was unable to install over custom global timer functions. Is the clock already installed?');\n      }\n      replace(global, fakeTimingFunctions);\n      timer = fakeTimingFunctions;\n      delayedFunctionScheduler = delayedFunctionSchedulerFactory();\n      installed = true;\n\n      return self;\n    };\n\n    /**\n     * Uninstall the mock clock, returning the built-in methods to their places.\n     * @name Clock#uninstall\n     * @function\n     */\n    self.uninstall = function() {\n      delayedFunctionScheduler = null;\n      mockDate.uninstall();\n      replace(global, realTimingFunctions);\n\n      timer = realTimingFunctions;\n      installed = false;\n    };\n\n    /**\n     * Execute a function with a mocked Clock\n     *\n     * The clock will be {@link Clock#install|install}ed before the function is called and {@link Clock#uninstall|uninstall}ed in a `finally` after the function completes.\n     * @name Clock#withMock\n     * @function\n     * @param {Function} closure The function to be called.\n     */\n    self.withMock = function(closure) {\n      this.install();\n      try {\n        closure();\n      } finally {\n        this.uninstall();\n      }\n    };\n\n    /**\n     * Instruct the installed Clock to also mock the date returned by `new Date()`\n     * @name Clock#mockDate\n     * @function\n     * @param {Date} [initialDate=now] The `Date` to provide.\n     */\n    self.mockDate = function(initialDate) {\n      mockDate.install(initialDate);\n    };\n\n    self.setTimeout = function(fn, delay, params) {\n      return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]);\n    };\n\n    self.setInterval = function(fn, delay, params) {\n      return Function.prototype.apply.apply(timer.setInterval, [global, arguments]);\n    };\n\n    self.clearTimeout = function(id) {\n      return Function.prototype.call.apply(timer.clearTimeout, [global, id]);\n    };\n\n    self.clearInterval = function(id) {\n      return Function.prototype.call.apply(timer.clearInterval, [global, id]);\n    };\n\n    /**\n     * Tick the Clock forward, running any enqueued timeouts along the way\n     * @name Clock#tick\n     * @function\n     * @param {int} millis The number of milliseconds to tick.\n     */\n    self.tick = function(millis) {\n      if (installed) {\n        delayedFunctionScheduler.tick(millis, function(millis) { mockDate.tick(millis); });\n      } else {\n        throw new Error('Mock clock is not installed, use jasmine.clock().install()');\n      }\n    };\n\n    return self;\n\n    function originalTimingFunctionsIntact() {\n      return global.setTimeout === realTimingFunctions.setTimeout &&\n        global.clearTimeout === realTimingFunctions.clearTimeout &&\n        global.setInterval === realTimingFunctions.setInterval &&\n        global.clearInterval === realTimingFunctions.clearInterval;\n    }\n\n    function replace(dest, source) {\n      for (var prop in source) {\n        dest[prop] = source[prop];\n      }\n    }\n\n    function setTimeout(fn, delay) {\n      if (!NODE_JS) {\n        return delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2));\n      }\n\n      var timeout = new FakeTimeout();\n\n      delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2), false, timeout);\n\n      return timeout;\n    }\n\n    function clearTimeout(id) {\n      return delayedFunctionScheduler.removeFunctionWithId(id);\n    }\n\n    function setInterval(fn, interval) {\n      if (!NODE_JS) {\n        return delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true);\n      }\n\n      var timeout = new FakeTimeout();\n\n      delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true, timeout);\n\n      return timeout;\n    }\n\n    function clearInterval(id) {\n      return delayedFunctionScheduler.removeFunctionWithId(id);\n    }\n\n    function argSlice(argsObj, n) {\n      return Array.prototype.slice.call(argsObj, n);\n    }\n  }\n\n  /**\n   * Mocks Node.js Timeout class\n   */\n  function FakeTimeout() {}\n\n  FakeTimeout.prototype.ref = function () {\n    return this;\n  };\n\n  FakeTimeout.prototype.unref = function () {\n    return this;\n  };\n\n  return Clock;\n};\n\ngetJasmineRequireObj().DelayedFunctionScheduler = function(j$) {\n  function DelayedFunctionScheduler() {\n    var self = this;\n    var scheduledLookup = [];\n    var scheduledFunctions = {};\n    var currentTime = 0;\n    var delayedFnCount = 0;\n    var deletedKeys = [];\n\n    self.tick = function(millis, tickDate) {\n      millis = millis || 0;\n      var endTime = currentTime + millis;\n\n      runScheduledFunctions(endTime, tickDate);\n      currentTime = endTime;\n    };\n\n    self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) {\n      var f;\n      if (typeof(funcToCall) === 'string') {\n        /* jshint evil: true */\n        f = function() { return eval(funcToCall); };\n        /* jshint evil: false */\n      } else {\n        f = funcToCall;\n      }\n\n      millis = millis || 0;\n      timeoutKey = timeoutKey || ++delayedFnCount;\n      runAtMillis = runAtMillis || (currentTime + millis);\n\n      var funcToSchedule = {\n        runAtMillis: runAtMillis,\n        funcToCall: f,\n        recurring: recurring,\n        params: params,\n        timeoutKey: timeoutKey,\n        millis: millis\n      };\n\n      if (runAtMillis in scheduledFunctions) {\n        scheduledFunctions[runAtMillis].push(funcToSchedule);\n      } else {\n        scheduledFunctions[runAtMillis] = [funcToSchedule];\n        scheduledLookup.push(runAtMillis);\n        scheduledLookup.sort(function (a, b) {\n          return a - b;\n        });\n      }\n\n      return timeoutKey;\n    };\n\n    self.removeFunctionWithId = function(timeoutKey) {\n      deletedKeys.push(timeoutKey);\n\n      for (var runAtMillis in scheduledFunctions) {\n        var funcs = scheduledFunctions[runAtMillis];\n        var i = indexOfFirstToPass(funcs, function (func) {\n          return func.timeoutKey === timeoutKey;\n        });\n\n        if (i > -1) {\n          if (funcs.length === 1) {\n            delete scheduledFunctions[runAtMillis];\n            deleteFromLookup(runAtMillis);\n          } else {\n            funcs.splice(i, 1);\n          }\n\n          // intervals get rescheduled when executed, so there's never more\n          // than a single scheduled function with a given timeoutKey\n          break;\n        }\n      }\n    };\n\n    return self;\n\n    function indexOfFirstToPass(array, testFn) {\n      var index = -1;\n\n      for (var i = 0; i < array.length; ++i) {\n        if (testFn(array[i])) {\n          index = i;\n          break;\n        }\n      }\n\n      return index;\n    }\n\n    function deleteFromLookup(key) {\n      var value = Number(key);\n      var i = indexOfFirstToPass(scheduledLookup, function (millis) {\n        return millis === value;\n      });\n\n      if (i > -1) {\n        scheduledLookup.splice(i, 1);\n      }\n    }\n\n    function reschedule(scheduledFn) {\n      self.scheduleFunction(scheduledFn.funcToCall,\n        scheduledFn.millis,\n        scheduledFn.params,\n        true,\n        scheduledFn.timeoutKey,\n        scheduledFn.runAtMillis + scheduledFn.millis);\n    }\n\n    function forEachFunction(funcsToRun, callback) {\n      for (var i = 0; i < funcsToRun.length; ++i) {\n        callback(funcsToRun[i]);\n      }\n    }\n\n    function runScheduledFunctions(endTime, tickDate) {\n      tickDate = tickDate || function() {};\n      if (scheduledLookup.length === 0 || scheduledLookup[0] > endTime) {\n        tickDate(endTime - currentTime);\n        return;\n      }\n\n      do {\n        deletedKeys = [];\n        var newCurrentTime = scheduledLookup.shift();\n        tickDate(newCurrentTime - currentTime);\n\n        currentTime = newCurrentTime;\n\n        var funcsToRun = scheduledFunctions[currentTime];\n\n        delete scheduledFunctions[currentTime];\n\n        forEachFunction(funcsToRun, function(funcToRun) {\n          if (funcToRun.recurring) {\n            reschedule(funcToRun);\n          }\n        });\n\n        forEachFunction(funcsToRun, function(funcToRun) {\n          if (j$.util.arrayContains(deletedKeys, funcToRun.timeoutKey)) {\n            // skip a timeoutKey deleted whilst we were running\n            return;\n          }\n          funcToRun.funcToCall.apply(null, funcToRun.params || []);\n        });\n        deletedKeys = [];\n      } while (scheduledLookup.length > 0 &&\n              // checking first if we're out of time prevents setTimeout(0)\n              // scheduled in a funcToRun from forcing an extra iteration\n                 currentTime !== endTime  &&\n                 scheduledLookup[0] <= endTime);\n\n      // ran out of functions to call, but still time left on the clock\n      if (currentTime !== endTime) {\n        tickDate(endTime - currentTime);\n      }\n    }\n  }\n\n  return DelayedFunctionScheduler;\n};\n\ngetJasmineRequireObj().errors = function() {\n  function ExpectationFailed() {}\n\n  ExpectationFailed.prototype = new Error();\n  ExpectationFailed.prototype.constructor = ExpectationFailed;\n\n  return {\n    ExpectationFailed: ExpectationFailed\n  };\n};\ngetJasmineRequireObj().ExceptionFormatter = function(j$) {\n\n  var ignoredProperties = ['name', 'message', 'stack', 'fileName', 'sourceURL', 'line', 'lineNumber', 'column', 'description', 'jasmineMessage'];\n\n  function ExceptionFormatter(options) {\n    var jasmineFile = (options && options.jasmineFile) || j$.util.jasmineFile();\n    this.message = function(error) {\n      var message = '';\n\n      if (error.jasmineMessage) {\n        message += error.jasmineMessage;\n      } else if (error.name && error.message) {\n        message += error.name + ': ' + error.message;\n      } else if (error.message) {\n        message += error.message;\n      } else {\n        message += error.toString() + ' thrown';\n      }\n\n      if (error.fileName || error.sourceURL) {\n        message += ' in ' + (error.fileName || error.sourceURL);\n      }\n\n      if (error.line || error.lineNumber) {\n        message += ' (line ' + (error.line || error.lineNumber) + ')';\n      }\n\n      return message;\n    };\n\n    this.stack = function(error) {\n      if (!error || !error.stack) {\n        return null;\n      }\n\n      var stackTrace = new j$.StackTrace(error);\n      var lines = filterJasmine(stackTrace);\n      var result = '';\n\n      if (stackTrace.message) {\n        lines.unshift(stackTrace.message);\n      }\n\n      result += formatProperties(error);\n      result += lines.join('\\n');\n\n      return result;\n    };\n\n    function filterJasmine(stackTrace) {\n      var result = [],\n        jasmineMarker = stackTrace.style === 'webkit' ? '<Jasmine>' : '    at <Jasmine>';\n\n      stackTrace.frames.forEach(function(frame) {\n        if (frame.file && frame.file !== jasmineFile) {\n          result.push(frame.raw);\n        } else if (result[result.length - 1] !== jasmineMarker) {\n          result.push(jasmineMarker);\n        }\n      });\n\n      return result;\n    }\n\n    function formatProperties(error) {\n      if (!(error instanceof Object)) {\n        return;\n      }\n\n      var result = {};\n      var empty = true;\n\n      for (var prop in error) {\n        if (j$.util.arrayContains(ignoredProperties, prop)) {\n          continue;\n        }\n        result[prop] = error[prop];\n        empty = false;\n      }\n\n      if (!empty) {\n        return 'error properties: ' + j$.pp(result) + '\\n';\n      }\n\n      return '';\n    }\n  }\n\n  return ExceptionFormatter;\n};\n\ngetJasmineRequireObj().Expectation = function(j$) {\n  var promiseForMessage = {\n    jasmineToString: function() { return 'a promise'; }\n  };\n\n  /**\n   * Matchers that come with Jasmine out of the box.\n   * @namespace matchers\n   */\n  function Expectation(options) {\n    this.expector = new j$.Expector(options);\n\n    var customMatchers = options.customMatchers || {};\n    for (var matcherName in customMatchers) {\n      this[matcherName] = wrapSyncCompare(matcherName, customMatchers[matcherName]);\n    }\n  }\n\n  /**\n   * Add some context for an {@link expect}\n   * @function\n   * @name matchers#withContext\n   * @param {String} message - Additional context to show when the matcher fails\n   * @return {matchers}\n   */\n  Expectation.prototype.withContext = function withContext(message) {\n    return addFilter(this, new ContextAddingFilter(message));\n  };\n\n  /**\n   * Invert the matcher following this {@link expect}\n   * @member\n   * @name matchers#not\n   * @type {matchers}\n   * @example\n   * expect(something).not.toBe(true);\n   */\n  Object.defineProperty(Expectation.prototype, 'not', {\n    get: function() {\n      return addFilter(this, syncNegatingFilter);\n    }\n  });\n\n  /**\n   * Asynchronous matchers.\n   * @namespace async-matchers\n   */\n  function AsyncExpectation(options) {\n    var global = options.global || j$.getGlobal();\n    this.expector = new j$.Expector(options);\n\n    if (!global.Promise) {\n      throw new Error('expectAsync is unavailable because the environment does not support promises.');\n    }\n\n    if (!j$.isPromiseLike(this.expector.actual)) {\n      throw new Error('Expected expectAsync to be called with a promise.');\n    }\n  }\n\n  /**\n   * Add some context for an {@link expectAsync}\n   * @function\n   * @name async-matchers#withContext\n   * @param {String} message - Additional context to show when the async matcher fails\n   * @return {async-matchers}\n   */\n  AsyncExpectation.prototype.withContext = function withContext(message) {\n    return addFilter(this, new ContextAddingFilter(message));\n  };\n\n  /**\n   * Invert the matcher following this {@link expectAsync}\n   * @member\n   * @name async-matchers#not\n   * @type {async-matchers}\n   * @example\n   * await expectAsync(myPromise).not.toBeResolved();\n   * @example\n   * return expectAsync(myPromise).not.toBeResolved();\n   */\n  Object.defineProperty(AsyncExpectation.prototype, 'not', {\n    get: function() {\n      return addFilter(this, asyncNegatingFilter);\n    }\n  });\n\n  function wrapSyncCompare(name, matcherFactory) {\n    return function() {\n      var result = this.expector.compare(name, matcherFactory, arguments);\n      this.expector.processResult(result);\n    };\n  }\n\n  function wrapAsyncCompare(name, matcherFactory) {\n    return function() {\n      var self = this;\n\n      // Capture the call stack here, before we go async, so that it will contain\n      // frames that are relevant to the user instead of just parts of Jasmine.\n      var errorForStack = j$.util.errorWithStack();\n\n      return this.expector.compare(name, matcherFactory, arguments).then(function(result) {\n        self.expector.processResult(result, errorForStack, promiseForMessage);\n      });\n    };\n  }\n\n  function addCoreMatchers(prototype, matchers, wrapper) {\n    for (var matcherName in matchers) {\n      var matcher = matchers[matcherName];\n      prototype[matcherName] = wrapper(matcherName, matcher);\n    }\n  }\n\n  function addFilter(source, filter) {\n    var result = Object.create(source);\n    result.expector = source.expector.addFilter(filter);\n    return result;\n  }\n\n  function negatedFailureMessage(result, matcherName, args, util) {\n    if (result.message) {\n      if (j$.isFunction_(result.message)) {\n        return result.message();\n      } else {\n        return result.message;\n      }\n    }\n\n    args = args.slice();\n    args.unshift(true);\n    args.unshift(matcherName);\n    return util.buildFailureMessage.apply(null, args);\n  }\n\n  function negate(result) {\n    result.pass = !result.pass;\n    return result;\n  }\n\n  var syncNegatingFilter = {\n    selectComparisonFunc: function(matcher) {\n      function defaultNegativeCompare() {\n        return negate(matcher.compare.apply(null, arguments));\n      }\n\n      return matcher.negativeCompare || defaultNegativeCompare;\n    },\n    buildFailureMessage: negatedFailureMessage\n  };\n\n  var asyncNegatingFilter = {\n    selectComparisonFunc: function(matcher) {\n      function defaultNegativeCompare() {\n        return matcher.compare.apply(this, arguments).then(negate);\n      }\n\n      return defaultNegativeCompare;\n    },\n    buildFailureMessage: negatedFailureMessage\n  };\n\n  function ContextAddingFilter(message) {\n    this.message = message;\n  }\n\n  ContextAddingFilter.prototype.modifyFailureMessage = function(msg) {\n    return this.message + ': ' + msg;\n  };\n\n  return {\n    factory: function(options) {\n      return new Expectation(options || {});\n    },\n    addCoreMatchers: function(matchers) {\n      addCoreMatchers(Expectation.prototype, matchers, wrapSyncCompare);\n    },\n    asyncFactory: function(options) {\n      return new AsyncExpectation(options || {});\n    },\n    addAsyncCoreMatchers: function(matchers) {\n      addCoreMatchers(AsyncExpectation.prototype, matchers, wrapAsyncCompare);\n    }\n  };\n};\n\ngetJasmineRequireObj().ExpectationFilterChain = function() {\n  function ExpectationFilterChain(maybeFilter, prev) {\n    this.filter_ = maybeFilter;\n    this.prev_ = prev;\n  }\n\n  ExpectationFilterChain.prototype.addFilter = function(filter) {\n    return new ExpectationFilterChain(filter, this);\n  };\n\n  ExpectationFilterChain.prototype.selectComparisonFunc = function(matcher) {\n    return this.callFirst_('selectComparisonFunc', arguments).result;\n  };\n\n  ExpectationFilterChain.prototype.buildFailureMessage = function(result, matcherName, args, util) {\n    return this.callFirst_('buildFailureMessage', arguments).result;\n  };\n\n  ExpectationFilterChain.prototype.modifyFailureMessage = function(msg) {\n    var result = this.callFirst_('modifyFailureMessage', arguments).result;\n    return result || msg;\n  };\n\n  ExpectationFilterChain.prototype.callFirst_ = function(fname, args) {\n    var prevResult;\n\n    if (this.prev_) {\n      prevResult = this.prev_.callFirst_(fname, args);\n\n      if (prevResult.found) {\n        return prevResult;\n      }\n    }\n\n    if (this.filter_ && this.filter_[fname]) {\n      return {\n        found: true,\n        result: this.filter_[fname].apply(this.filter_, args)\n      };\n    }\n\n    return {found: false};\n  };\n\n  return ExpectationFilterChain;\n};\n\n//TODO: expectation result may make more sense as a presentation of an expectation.\ngetJasmineRequireObj().buildExpectationResult = function() {\n  function buildExpectationResult(options) {\n    var messageFormatter = options.messageFormatter || function() {},\n      stackFormatter = options.stackFormatter || function() {};\n\n    /**\n     * @typedef Expectation\n     * @property {String} matcherName - The name of the matcher that was executed for this expectation.\n     * @property {String} message - The failure message for the expectation.\n     * @property {String} stack - The stack trace for the failure if available.\n     * @property {Boolean} passed - Whether the expectation passed or failed.\n     * @property {Object} expected - If the expectation failed, what was the expected value.\n     * @property {Object} actual - If the expectation failed, what actual value was produced.\n     */\n    var result = {\n      matcherName: options.matcherName,\n      message: message(),\n      stack: stack(),\n      passed: options.passed\n    };\n\n    if(!result.passed) {\n      result.expected = options.expected;\n      result.actual = options.actual;\n    }\n\n    return result;\n\n    function message() {\n      if (options.passed) {\n        return 'Passed.';\n      } else if (options.message) {\n        return options.message;\n      } else if (options.error) {\n        return messageFormatter(options.error);\n      }\n      return '';\n    }\n\n    function stack() {\n      if (options.passed) {\n        return '';\n      }\n\n      var error = options.error;\n      if (!error) {\n        if (options.errorForStack) {\n          error = options.errorForStack;\n        } else if (options.stack) {\n          error = options;\n        } else {\n          try {\n            throw new Error(message());\n          } catch (e) {\n            error = e;\n          }\n        }\n      }\n      return stackFormatter(error);\n    }\n  }\n\n  return buildExpectationResult;\n};\n\ngetJasmineRequireObj().Expector = function(j$) {\n  function Expector(options) {\n    this.util = options.util || { buildFailureMessage: function() {} };\n    this.customEqualityTesters = options.customEqualityTesters || [];\n    this.actual = options.actual;\n    this.addExpectationResult = options.addExpectationResult || function(){};\n    this.filters = new j$.ExpectationFilterChain();\n  }\n\n  Expector.prototype.instantiateMatcher = function(matcherName, matcherFactory, args) {\n    this.matcherName = matcherName;\n    this.args = Array.prototype.slice.call(args, 0);\n    this.expected = this.args.slice(0);\n\n    this.args.unshift(this.actual);\n\n    var matcher = matcherFactory(this.util, this.customEqualityTesters);\n    var comparisonFunc = this.filters.selectComparisonFunc(matcher);\n    return comparisonFunc || matcher.compare;\n  };\n\n  Expector.prototype.buildMessage = function(result) {\n    var self = this;\n\n    if (result.pass) {\n      return '';\n    }\n\n    var msg = this.filters.buildFailureMessage(result, this.matcherName, this.args, this.util, defaultMessage);\n    return this.filters.modifyFailureMessage(msg || defaultMessage());\n\n    function defaultMessage() {\n      if (!result.message) {\n        var args = self.args.slice();\n        args.unshift(false);\n        args.unshift(self.matcherName);\n        return self.util.buildFailureMessage.apply(null, args);\n      } else if (j$.isFunction_(result.message)) {\n        return result.message();\n      } else {\n        return result.message;\n      }\n    }\n  };\n\n  Expector.prototype.compare = function(matcherName, matcherFactory, args) {\n    var matcherCompare = this.instantiateMatcher(matcherName, matcherFactory, args);\n    return matcherCompare.apply(null, this.args);\n  };\n\n  Expector.prototype.addFilter = function(filter) {\n    var result = Object.create(this);\n    result.filters = this.filters.addFilter(filter);\n    return result;\n  };\n\n  Expector.prototype.processResult = function(result, errorForStack, actualOverride) {\n    this.args[0] = actualOverride || this.args[0];\n    var message = this.buildMessage(result);\n\n    if (this.expected.length === 1) {\n      this.expected = this.expected[0];\n    }\n\n    this.addExpectationResult(\n      result.pass,\n      {\n        matcherName: this.matcherName,\n        passed: result.pass,\n        message: message,\n        error: errorForStack ? undefined : result.error,\n        errorForStack: errorForStack || undefined,\n        actual: this.actual,\n        expected: this.expected // TODO: this may need to be arrayified/sliced\n      }\n    );\n  };\n\n  return Expector;\n};\n\ngetJasmineRequireObj().formatErrorMsg = function() {\n  function generateErrorMsg(domain, usage) {\n    var usageDefinition = usage ? '\\nUsage: ' + usage : '';\n\n    return function errorMsg(msg) {\n      return domain + ' : ' + msg + usageDefinition;\n    };\n  }\n\n  return generateErrorMsg;\n};\n\ngetJasmineRequireObj().GlobalErrors = function(j$) {\n  function GlobalErrors(global) {\n    var handlers = [];\n    global = global || j$.getGlobal();\n\n    var onerror = function onerror() {\n      var handler = handlers[handlers.length - 1];\n\n      if (handler) {\n        handler.apply(null, Array.prototype.slice.call(arguments, 0));\n      } else {\n        throw arguments[0];\n      }\n    };\n\n    this.originalHandlers = {};\n    this.jasmineHandlers = {};\n    this.installOne_ = function installOne_(errorType, jasmineMessage) {\n      function taggedOnError(error) {\n        error.jasmineMessage = jasmineMessage + ': ' + error;\n\n        var handler = handlers[handlers.length - 1];\n\n        if (handler) {\n          handler(error);\n        } else {\n          throw error;\n        }\n      }\n\n      this.originalHandlers[errorType] = global.process.listeners(errorType);\n      this.jasmineHandlers[errorType] = taggedOnError;\n\n      global.process.removeAllListeners(errorType);\n      global.process.on(errorType, taggedOnError);\n\n      this.uninstall = function uninstall() {\n        var errorTypes = Object.keys(this.originalHandlers);\n        for (var iType = 0; iType < errorTypes.length; iType++) {\n          var errorType = errorTypes[iType];\n          global.process.removeListener(errorType, this.jasmineHandlers[errorType]);\n          for (var i = 0; i < this.originalHandlers[errorType].length; i++) {\n            global.process.on(errorType, this.originalHandlers[errorType][i]);\n          }\n          delete this.originalHandlers[errorType];\n          delete this.jasmineHandlers[errorType];\n        }\n      };\n    };\n\n    this.install = function install() {\n      if (global.process && global.process.listeners && j$.isFunction_(global.process.on)) {\n        this.installOne_('uncaughtException', 'Uncaught exception');\n        this.installOne_('unhandledRejection', 'Unhandled promise rejection');\n      } else {\n        var originalHandler = global.onerror;\n        global.onerror = onerror;\n\n        this.uninstall = function uninstall() {\n          global.onerror = originalHandler;\n        };\n      }\n    };\n\n    this.pushListener = function pushListener(listener) {\n      handlers.push(listener);\n    };\n\n    this.popListener = function popListener() {\n      handlers.pop();\n    };\n  }\n\n  return GlobalErrors;\n};\n\ngetJasmineRequireObj().toBeRejected = function(j$) {\n  /**\n   * Expect a promise to be rejected.\n   * @function\n   * @async\n   * @name async-matchers#toBeRejected\n   * @example\n   * await expectAsync(aPromise).toBeRejected();\n   * @example\n   * return expectAsync(aPromise).toBeRejected();\n   */\n  return function toBeResolved(util) {\n    return {\n      compare: function(actual) {\n        return actual.then(\n          function() { return {pass: false}; },\n          function() { return {pass: true}; }\n        );\n      }\n    };\n  };\n};\n\ngetJasmineRequireObj().toBeRejectedWith = function(j$) {\n  /**\n   * Expect a promise to be rejected with a value equal to the expected, using deep equality comparison.\n   * @function\n   * @async\n   * @name async-matchers#toBeRejectedWith\n   * @param {Object} expected - Value that the promise is expected to be rejected with\n   * @example\n   * await expectAsync(aPromise).toBeRejectedWith({prop: 'value'});\n   * @example\n   * return expectAsync(aPromise).toBeRejectedWith({prop: 'value'});\n   */\n  return function toBeRejectedWith(util, customEqualityTesters) {\n    return {\n      compare: function(actualPromise, expectedValue) {\n        function prefix(passed) {\n          return 'Expected a promise ' +\n            (passed ? 'not ' : '') +\n            'to be rejected with ' + j$.pp(expectedValue);\n        }\n\n        return actualPromise.then(\n          function() {\n          return {\n            pass: false,\n            message: prefix(false) + ' but it was resolved.'\n          };\n        },\n        function(actualValue) {\n          if (util.equals(actualValue, expectedValue, customEqualityTesters)) {\n            return {\n              pass: true,\n              message: prefix(true) + '.'\n            };\n          } else {\n            return {\n              pass: false,\n              message: prefix(false) + ' but it was rejected with ' + j$.pp(actualValue) + '.'\n            };\n          }\n        }\n        );\n      }\n    };\n  };\n};\n\ngetJasmineRequireObj().toBeResolved = function(j$) {\n  /**\n   * Expect a promise to be resolved.\n   * @function\n   * @async\n   * @name async-matchers#toBeResolved\n   * @example\n   * await expectAsync(aPromise).toBeResolved();\n   * @example\n   * return expectAsync(aPromise).toBeResolved();\n   */\n  return function toBeResolved(util) {\n    return {\n      compare: function(actual) {\n        return actual.then(\n          function() { return {pass: true}; },\n          function() { return {pass: false}; }\n        );\n      }\n    };\n  };\n};\n\ngetJasmineRequireObj().toBeResolvedTo = function(j$) {\n  /**\n   * Expect a promise to be resolved to a value equal to the expected, using deep equality comparison.\n   * @function\n   * @async\n   * @name async-matchers#toBeResolvedTo\n   * @param {Object} expected - Value that the promise is expected to resolve to\n   * @example\n   * await expectAsync(aPromise).toBeResolvedTo({prop: 'value'});\n   * @example\n   * return expectAsync(aPromise).toBeResolvedTo({prop: 'value'});\n   */\n  return function toBeResolvedTo(util, customEqualityTesters) {\n    return {\n      compare: function(actualPromise, expectedValue) {\n        function prefix(passed) {\n          return 'Expected a promise ' +\n            (passed ? 'not ' : '') +\n            'to be resolved to ' + j$.pp(expectedValue);\n        }\n\n        return actualPromise.then(\n          function(actualValue) {\n          if (util.equals(actualValue, expectedValue, customEqualityTesters)) {\n            return {\n              pass: true,\n              message: prefix(true) + '.'\n            };\n          } else {\n            return {\n              pass: false,\n              message: prefix(false) + ' but it was resolved to ' + j$.pp(actualValue) + '.'\n            };\n          }\n        },\n        function() {\n          return {\n            pass: false,\n            message: prefix(false) + ' but it was rejected.'\n          };\n        }\n        );\n      }\n    };\n  };\n};\n\ngetJasmineRequireObj().DiffBuilder = function(j$) {\n  return function DiffBuilder() {\n    var path = new j$.ObjectPath(),\n        mismatches = [];\n\n    return {\n      record: function (actual, expected, formatter) {\n        formatter = formatter || defaultFormatter;\n        mismatches.push(formatter(actual, expected, path));\n      },\n\n      getMessage: function () {\n        return mismatches.join('\\n');\n      },\n\n      withPath: function (pathComponent, block) {\n        var oldPath = path;\n        path = path.add(pathComponent);\n        block();\n        path = oldPath;\n      }\n    };\n\n    function defaultFormatter (actual, expected, path) {\n      return 'Expected ' +\n        path + (path.depth() ? ' = ' : '') +\n        j$.pp(actual) +\n        ' to equal ' +\n        j$.pp(expected) +\n        '.';\n    }\n  };\n};\n\ngetJasmineRequireObj().matchersUtil = function(j$) {\n  // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?\n\n  return {\n    equals: equals,\n\n    contains: function(haystack, needle, customTesters) {\n      customTesters = customTesters || [];\n\n      if ((Object.prototype.toString.apply(haystack) === '[object Set]')) {\n        return haystack.has(needle);\n      }\n\n      if ((Object.prototype.toString.apply(haystack) === '[object Array]') ||\n        (!!haystack && !haystack.indexOf))\n      {\n        for (var i = 0; i < haystack.length; i++) {\n          if (equals(haystack[i], needle, customTesters)) {\n            return true;\n          }\n        }\n        return false;\n      }\n\n      return !!haystack && haystack.indexOf(needle) >= 0;\n    },\n\n    buildFailureMessage: function() {\n      var args = Array.prototype.slice.call(arguments, 0),\n        matcherName = args[0],\n        isNot = args[1],\n        actual = args[2],\n        expected = args.slice(3),\n        englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });\n\n      var message = 'Expected ' +\n        j$.pp(actual) +\n        (isNot ? ' not ' : ' ') +\n        englishyPredicate;\n\n      if (expected.length > 0) {\n        for (var i = 0; i < expected.length; i++) {\n          if (i > 0) {\n            message += ',';\n          }\n          message += ' ' + j$.pp(expected[i]);\n        }\n      }\n\n      return message + '.';\n    }\n  };\n\n  function isAsymmetric(obj) {\n    return obj && j$.isA_('Function', obj.asymmetricMatch);\n  }\n\n  function asymmetricMatch(a, b, customTesters, diffBuilder) {\n    var asymmetricA = isAsymmetric(a),\n        asymmetricB = isAsymmetric(b),\n        result;\n\n    if (asymmetricA && asymmetricB) {\n      return undefined;\n    }\n\n    if (asymmetricA) {\n      result = a.asymmetricMatch(b, customTesters);\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n\n    if (asymmetricB) {\n      result = b.asymmetricMatch(a, customTesters);\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n  }\n\n  function equals(a, b, customTesters, diffBuilder) {\n    customTesters = customTesters || [];\n    diffBuilder = diffBuilder || j$.NullDiffBuilder();\n\n    return eq(a, b, [], [], customTesters, diffBuilder);\n  }\n\n  // Equality function lovingly adapted from isEqual in\n  //   [Underscore](http://underscorejs.org)\n  function eq(a, b, aStack, bStack, customTesters, diffBuilder) {\n    var result = true, i;\n\n    var asymmetricResult = asymmetricMatch(a, b, customTesters, diffBuilder);\n    if (!j$.util.isUndefined(asymmetricResult)) {\n      return asymmetricResult;\n    }\n\n    for (i = 0; i < customTesters.length; i++) {\n      var customTesterResult = customTesters[i](a, b);\n      if (!j$.util.isUndefined(customTesterResult)) {\n        if (!customTesterResult) {\n          diffBuilder.record(a, b);\n        }\n        return customTesterResult;\n      }\n    }\n\n    if (a instanceof Error && b instanceof Error) {\n      result = a.message == b.message;\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) {\n      result = a !== 0 || 1 / a == 1 / b;\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n    // A strict comparison is necessary because `null == undefined`.\n    if (a === null || b === null) {\n      result = a === b;\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n    var className = Object.prototype.toString.call(a);\n    if (className != Object.prototype.toString.call(b)) {\n      diffBuilder.record(a, b);\n      return false;\n    }\n    switch (className) {\n      // Strings, numbers, dates, and booleans are compared by value.\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        result = a == String(b);\n        if (!result) {\n          diffBuilder.record(a, b);\n        }\n        return result;\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n        // other numeric values.\n        result = a != +a ? b != +b : (a === 0 ? 1 / a == 1 / b : a == +b);\n        if (!result) {\n          diffBuilder.record(a, b);\n        }\n        return result;\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        result = +a == +b;\n        if (!result) {\n          diffBuilder.record(a, b);\n        }\n        return result;\n      // RegExps are compared by their source patterns and flags.\n      case '[object RegExp]':\n        return a.source == b.source &&\n          a.global == b.global &&\n          a.multiline == b.multiline &&\n          a.ignoreCase == b.ignoreCase;\n    }\n    if (typeof a != 'object' || typeof b != 'object') {\n      diffBuilder.record(a, b);\n      return false;\n    }\n\n    var aIsDomNode = j$.isDomNode(a);\n    var bIsDomNode = j$.isDomNode(b);\n    if (aIsDomNode && bIsDomNode) {\n      // At first try to use DOM3 method isEqualNode\n      result = a.isEqualNode(b);\n      if (!result) {\n        diffBuilder.record(a, b);\n      }\n      return result;\n    }\n    if (aIsDomNode || bIsDomNode) {\n      diffBuilder.record(a, b);\n      return false;\n    }\n\n    var aIsPromise = j$.isPromise(a);\n    var bIsPromise = j$.isPromise(b);\n    if (aIsPromise && bIsPromise) {\n      return a === b;\n    }\n\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] == a) { return bStack[length] == b; }\n    }\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n    var size = 0;\n    // Recursively compare objects and arrays.\n    // Compare array lengths to determine if a deep comparison is necessary.\n    if (className == '[object Array]') {\n      var aLength = a.length;\n      var bLength = b.length;\n\n      diffBuilder.withPath('length', function() {\n        if (aLength !== bLength) {\n          diffBuilder.record(aLength, bLength);\n          result = false;\n        }\n      });\n\n      for (i = 0; i < aLength || i < bLength; i++) {\n        var formatter = false;\n        diffBuilder.withPath(i, function() {\n          if (i >= bLength) {\n            diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);\n            result = false;\n          } else {\n            result = eq(i < aLength ? a[i] : void 0, i < bLength ? b[i] : void 0, aStack, bStack, customTesters, diffBuilder) && result;\n          }\n        });\n      }\n      if (!result) {\n        return false;\n      }\n    } else if (j$.isMap(a) && j$.isMap(b)) {\n      if (a.size != b.size) {\n        diffBuilder.record(a, b);\n        return false;\n      }\n\n      var keysA = [];\n      var keysB = [];\n      a.forEach( function( valueA, keyA ) {\n        keysA.push( keyA );\n      });\n      b.forEach( function( valueB, keyB ) {\n        keysB.push( keyB );\n      });\n\n      // For both sets of keys, check they map to equal values in both maps.\n      // Keep track of corresponding keys (in insertion order) in order to handle asymmetric obj keys.\n      var mapKeys = [keysA, keysB];\n      var cmpKeys = [keysB, keysA];\n      var mapIter, mapKey, mapValueA, mapValueB;\n      var cmpIter, cmpKey;\n      for (i = 0; result && i < mapKeys.length; i++) {\n        mapIter = mapKeys[i];\n        cmpIter = cmpKeys[i];\n\n        for (var j = 0; result && j < mapIter.length; j++) {\n          mapKey = mapIter[j];\n          cmpKey = cmpIter[j];\n          mapValueA = a.get(mapKey);\n\n          // Only use the cmpKey when one of the keys is asymmetric and the corresponding key matches,\n          // otherwise explicitly look up the mapKey in the other Map since we want keys with unique\n          // obj identity (that are otherwise equal) to not match.\n          if (isAsymmetric(mapKey) || isAsymmetric(cmpKey) &&\n              eq(mapKey, cmpKey, aStack, bStack, customTesters, j$.NullDiffBuilder())) {\n            mapValueB = b.get(cmpKey);\n          } else {\n            mapValueB = b.get(mapKey);\n          }\n          result = eq(mapValueA, mapValueB, aStack, bStack, customTesters, j$.NullDiffBuilder());\n        }\n      }\n\n      if (!result) {\n        diffBuilder.record(a, b);\n        return false;\n      }\n    } else if (j$.isSet(a) && j$.isSet(b)) {\n      if (a.size != b.size) {\n        diffBuilder.record(a, b);\n        return false;\n      }\n\n      var valuesA = [];\n      a.forEach( function( valueA ) {\n        valuesA.push( valueA );\n      });\n      var valuesB = [];\n      b.forEach( function( valueB ) {\n        valuesB.push( valueB );\n      });\n\n      // For both sets, check they are all contained in the other set\n      var setPairs = [[valuesA, valuesB], [valuesB, valuesA]];\n      var stackPairs = [[aStack, bStack], [bStack, aStack]];\n      var baseValues, baseValue, baseStack;\n      var otherValues, otherValue, otherStack;\n      var found;\n      var prevStackSize;\n      for (i = 0; result && i < setPairs.length; i++) {\n        baseValues = setPairs[i][0];\n        otherValues = setPairs[i][1];\n        baseStack = stackPairs[i][0];\n        otherStack = stackPairs[i][1];\n        // For each value in the base set...\n        for (var k = 0; result && k < baseValues.length; k++) {\n          baseValue = baseValues[k];\n          found = false;\n          // ... test that it is present in the other set\n          for (var l = 0; !found && l < otherValues.length; l++) {\n            otherValue = otherValues[l];\n            prevStackSize = baseStack.length;\n            // compare by value equality\n            found = eq(baseValue, otherValue, baseStack, otherStack, customTesters, j$.NullDiffBuilder());\n            if (!found && prevStackSize !== baseStack.length) {\n              baseStack.splice(prevStackSize);\n              otherStack.splice(prevStackSize);\n            }\n          }\n          result = result && found;\n        }\n      }\n\n      if (!result) {\n        diffBuilder.record(a, b);\n        return false;\n      }\n    } else {\n\n      // Objects with different constructors are not equivalent, but `Object`s\n      // or `Array`s from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor &&\n          isFunction(aCtor) && isFunction(bCtor) &&\n          a instanceof aCtor && b instanceof bCtor &&\n          !(aCtor instanceof aCtor && bCtor instanceof bCtor)) {\n\n        diffBuilder.record(a, b, constructorsAreDifferentFormatter);\n        return false;\n      }\n    }\n\n    // Deep compare objects.\n    var aKeys = keys(a, className == '[object Array]'), key;\n    size = aKeys.length;\n\n    // Ensure that both objects contain the same number of properties before comparing deep equality.\n    if (keys(b, className == '[object Array]').length !== size) {\n      diffBuilder.record(a, b, objectKeysAreDifferentFormatter);\n      return false;\n    }\n\n    for (i = 0; i < size; i++) {\n      key = aKeys[i];\n      // Deep compare each member\n      if (!j$.util.has(b, key)) {\n        diffBuilder.record(a, b, objectKeysAreDifferentFormatter);\n        result = false;\n        continue;\n      }\n\n      diffBuilder.withPath(key, function() {\n        if(!eq(a[key], b[key], aStack, bStack, customTesters, diffBuilder)) {\n          result = false;\n        }\n      });\n    }\n\n    if (!result) {\n      return false;\n    }\n\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n\n    return result;\n  }\n\n  function keys(obj, isArray) {\n    var allKeys = Object.keys ? Object.keys(obj) :\n      (function(o) {\n          var keys = [];\n          for (var key in o) {\n              if (j$.util.has(o, key)) {\n                  keys.push(key);\n              }\n          }\n          return keys;\n      })(obj);\n\n    if (!isArray) {\n      return allKeys;\n    }\n\n    if (allKeys.length === 0) {\n        return allKeys;\n    }\n\n    var extraKeys = [];\n    for (var i = 0; i < allKeys.length; i++) {\n      if (!/^[0-9]+$/.test(allKeys[i])) {\n        extraKeys.push(allKeys[i]);\n      }\n    }\n\n    return extraKeys;\n  }\n\n  function has(obj, key) {\n    return Object.prototype.hasOwnProperty.call(obj, key);\n  }\n\n  function isFunction(obj) {\n    return typeof obj === 'function';\n  }\n\n  function objectKeysAreDifferentFormatter(actual, expected, path) {\n    var missingProperties = j$.util.objectDifference(expected, actual),\n        extraProperties = j$.util.objectDifference(actual, expected),\n        missingPropertiesMessage = formatKeyValuePairs(missingProperties),\n        extraPropertiesMessage = formatKeyValuePairs(extraProperties),\n        messages = [];\n\n    if (!path.depth()) {\n      path = 'object';\n    }\n\n    if (missingPropertiesMessage.length) {\n      messages.push('Expected ' + path + ' to have properties' + missingPropertiesMessage);\n    }\n\n    if (extraPropertiesMessage.length) {\n      messages.push('Expected ' + path + ' not to have properties' + extraPropertiesMessage);\n    }\n\n    return messages.join('\\n');\n  }\n\n  function constructorsAreDifferentFormatter(actual, expected, path) {\n    if (!path.depth()) {\n      path = 'object';\n    }\n\n    return 'Expected ' +\n      path + ' to be a kind of ' +\n      j$.fnNameFor(expected.constructor) +\n      ', but was ' + j$.pp(actual) + '.';\n  }\n\n  function actualArrayIsLongerFormatter(actual, expected, path) {\n    return 'Unexpected ' +\n      path + (path.depth() ? ' = ' : '') +\n      j$.pp(actual) +\n      ' in array.';\n  }\n\n  function formatKeyValuePairs(obj) {\n    var formatted = '';\n    for (var key in obj) {\n      formatted += '\\n    ' + key + ': ' + j$.pp(obj[key]);\n    }\n    return formatted;\n  }\n};\n\ngetJasmineRequireObj().nothing = function() {\n  /**\n   * {@link expect} nothing explicitly.\n   * @function\n   * @name matchers#nothing\n   * @example\n   * expect().nothing();\n   */\n  function nothing() {\n    return {\n      compare: function() {\n        return {\n          pass: true\n        };\n      }\n    };\n  }\n\n  return nothing;\n};\n\ngetJasmineRequireObj().NullDiffBuilder = function(j$) {\n  return function() {\n    return {\n      withPath: function(_, block) {\n        block();\n      },\n      record: function() {}\n    };\n  };\n};\n\ngetJasmineRequireObj().ObjectPath = function(j$) {\n  function ObjectPath(components) {\n    this.components = components || [];\n  }\n\n  ObjectPath.prototype.toString = function() {\n    if (this.components.length) {\n      return '$' + map(this.components, formatPropertyAccess).join('');\n    } else {\n      return '';\n    }\n  };\n\n  ObjectPath.prototype.add = function(component) {\n    return new ObjectPath(this.components.concat([component]));\n  };\n\n  ObjectPath.prototype.depth = function() {\n    return this.components.length;\n  };\n\n  function formatPropertyAccess(prop) {\n    if (typeof prop === 'number') {\n      return '[' + prop + ']';\n    }\n\n    if (isValidIdentifier(prop)) {\n      return '.' + prop;\n    }\n\n    return '[\\'' + prop + '\\']';\n  }\n\n  function map(array, fn) {\n    var results = [];\n    for (var i = 0; i < array.length; i++) {\n      results.push(fn(array[i]));\n    }\n    return results;\n  }\n\n  function isValidIdentifier(string) {\n    return /^[A-Za-z\\$_][A-Za-z0-9\\$_]*$/.test(string);\n  }\n\n  return ObjectPath;\n};\n\ngetJasmineRequireObj().requireAsyncMatchers = function(jRequire, j$) {\n  var availableMatchers = [\n      'toBeResolved',\n      'toBeRejected',\n      'toBeResolvedTo',\n      'toBeRejectedWith'\n    ],\n    matchers = {};\n\n  for (var i = 0; i < availableMatchers.length; i++) {\n    var name = availableMatchers[i];\n    matchers[name] = jRequire[name](j$);\n  }\n\n  return matchers;\n};\n\ngetJasmineRequireObj().toBe = function(j$) {\n  /**\n   * {@link expect} the actual value to be `===` to the expected value.\n   * @function\n   * @name matchers#toBe\n   * @param {Object} expected - The expected value to compare against.\n   * @example\n   * expect(thing).toBe(realThing);\n   */\n  function toBe(util) {\n    var tip = ' Tip: To check for deep equality, use .toEqual() instead of .toBe().';\n\n    return {\n      compare: function(actual, expected) {\n        var result = {\n          pass: actual === expected,\n        };\n\n        if (typeof expected === 'object') {\n          result.message = util.buildFailureMessage('toBe', result.pass, actual, expected) + tip;\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toBe;\n};\n\ngetJasmineRequireObj().toBeCloseTo = function() {\n  /**\n   * {@link expect} the actual value to be within a specified precision of the expected value.\n   * @function\n   * @name matchers#toBeCloseTo\n   * @param {Object} expected - The expected value to compare against.\n   * @param {Number} [precision=2] - The number of decimal points to check.\n   * @example\n   * expect(number).toBeCloseTo(42.2, 3);\n   */\n  function toBeCloseTo() {\n    return {\n      compare: function(actual, expected, precision) {\n        if (precision !== 0) {\n          precision = precision || 2;\n        }\n\n        if (expected === null || actual === null) {\n          throw new Error('Cannot use toBeCloseTo with null. Arguments evaluated to: ' +\n            'expect(' + actual + ').toBeCloseTo(' + expected + ').'\n          );\n        }\n\n        var pow = Math.pow(10, precision + 1);\n        var delta = Math.abs(expected - actual);\n        var maxDelta = Math.pow(10, -precision) / 2;\n\n        return {\n          pass: Math.round(delta * pow) / pow <= maxDelta\n        };\n      }\n    };\n  }\n\n  return toBeCloseTo;\n};\n\ngetJasmineRequireObj().toBeDefined = function() {\n  /**\n   * {@link expect} the actual value to be defined. (Not `undefined`)\n   * @function\n   * @name matchers#toBeDefined\n   * @example\n   * expect(result).toBeDefined();\n   */\n  function toBeDefined() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: (void 0 !== actual)\n        };\n      }\n    };\n  }\n\n  return toBeDefined;\n};\n\ngetJasmineRequireObj().toBeFalsy = function() {\n  /**\n   * {@link expect} the actual value to be falsy\n   * @function\n   * @name matchers#toBeFalsy\n   * @example\n   * expect(result).toBeFalsy();\n   */\n  function toBeFalsy() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: !!!actual\n        };\n      }\n    };\n  }\n\n  return toBeFalsy;\n};\n\ngetJasmineRequireObj().toBeGreaterThan = function() {\n  /**\n   * {@link expect} the actual value to be greater than the expected value.\n   * @function\n   * @name matchers#toBeGreaterThan\n   * @param {Number} expected - The value to compare against.\n   * @example\n   * expect(result).toBeGreaterThan(3);\n   */\n  function toBeGreaterThan() {\n    return {\n      compare: function(actual, expected) {\n        return {\n          pass: actual > expected\n        };\n      }\n    };\n  }\n\n  return toBeGreaterThan;\n};\n\n\ngetJasmineRequireObj().toBeGreaterThanOrEqual = function() {\n  /**\n   * {@link expect} the actual value to be greater than or equal to the expected value.\n   * @function\n   * @name matchers#toBeGreaterThanOrEqual\n   * @param {Number} expected - The expected value to compare against.\n   * @example\n   * expect(result).toBeGreaterThanOrEqual(25);\n   */\n  function toBeGreaterThanOrEqual() {\n    return {\n      compare: function(actual, expected) {\n        return {\n          pass: actual >= expected\n        };\n      }\n    };\n  }\n\n  return toBeGreaterThanOrEqual;\n};\n\ngetJasmineRequireObj().toBeLessThan = function() {\n  /**\n   * {@link expect} the actual value to be less than the expected value.\n   * @function\n   * @name matchers#toBeLessThan\n   * @param {Number} expected - The expected value to compare against.\n   * @example\n   * expect(result).toBeLessThan(0);\n   */\n  function toBeLessThan() {\n    return {\n\n      compare: function(actual, expected) {\n        return {\n          pass: actual < expected\n        };\n      }\n    };\n  }\n\n  return toBeLessThan;\n};\n\ngetJasmineRequireObj().toBeLessThanOrEqual = function() {\n  /**\n   * {@link expect} the actual value to be less than or equal to the expected value.\n   * @function\n   * @name matchers#toBeLessThanOrEqual\n   * @param {Number} expected - The expected value to compare against.\n   * @example\n   * expect(result).toBeLessThanOrEqual(123);\n   */\n  function toBeLessThanOrEqual() {\n    return {\n\n      compare: function(actual, expected) {\n        return {\n          pass: actual <= expected\n        };\n      }\n    };\n  }\n\n  return toBeLessThanOrEqual;\n};\n\ngetJasmineRequireObj().toBeNaN = function(j$) {\n  /**\n   * {@link expect} the actual value to be `NaN` (Not a Number).\n   * @function\n   * @name matchers#toBeNaN\n   * @example\n   * expect(thing).toBeNaN();\n   */\n  function toBeNaN() {\n    return {\n      compare: function(actual) {\n        var result = {\n          pass: (actual !== actual)\n        };\n\n        if (result.pass) {\n          result.message = 'Expected actual not to be NaN.';\n        } else {\n          result.message = function() { return 'Expected ' + j$.pp(actual) + ' to be NaN.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toBeNaN;\n};\n\ngetJasmineRequireObj().toBeNegativeInfinity = function(j$) {\n  /**\n   * {@link expect} the actual value to be `-Infinity` (-infinity).\n   * @function\n   * @name matchers#toBeNegativeInfinity\n   * @example\n   * expect(thing).toBeNegativeInfinity();\n   */\n  function toBeNegativeInfinity() {\n    return {\n      compare: function(actual) {\n        var result = {\n          pass: (actual === Number.NEGATIVE_INFINITY)\n        };\n\n        if (result.pass) {\n          result.message = 'Expected actual to be -Infinity.';\n        } else {\n          result.message = function() { return 'Expected ' + j$.pp(actual) + ' not to be -Infinity.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toBeNegativeInfinity;\n};\n\ngetJasmineRequireObj().toBeNull = function() {\n  /**\n   * {@link expect} the actual value to be `null`.\n   * @function\n   * @name matchers#toBeNull\n   * @example\n   * expect(result).toBeNull();\n   */\n  function toBeNull() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: actual === null\n        };\n      }\n    };\n  }\n\n  return toBeNull;\n};\n\ngetJasmineRequireObj().toBePositiveInfinity = function(j$) {\n  /**\n   * {@link expect} the actual value to be `Infinity` (infinity).\n   * @function\n   * @name matchers#toBePositiveInfinity\n   * @example\n   * expect(thing).toBePositiveInfinity();\n   */\n  function toBePositiveInfinity() {\n    return {\n      compare: function(actual) {\n        var result = {\n          pass: (actual === Number.POSITIVE_INFINITY)\n        };\n\n        if (result.pass) {\n          result.message = 'Expected actual to be Infinity.';\n        } else {\n          result.message = function() { return 'Expected ' + j$.pp(actual) + ' not to be Infinity.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toBePositiveInfinity;\n};\n\ngetJasmineRequireObj().toBeTruthy = function() {\n  /**\n   * {@link expect} the actual value to be truthy.\n   * @function\n   * @name matchers#toBeTruthy\n   * @example\n   * expect(thing).toBeTruthy();\n   */\n  function toBeTruthy() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: !!actual\n        };\n      }\n    };\n  }\n\n  return toBeTruthy;\n};\n\ngetJasmineRequireObj().toBeUndefined = function() {\n  /**\n   * {@link expect} the actual value to be `undefined`.\n   * @function\n   * @name matchers#toBeUndefined\n   * @example\n   * expect(result).toBeUndefined():\n   */\n  function toBeUndefined() {\n    return {\n      compare: function(actual) {\n        return {\n          pass: void 0 === actual\n        };\n      }\n    };\n  }\n\n  return toBeUndefined;\n};\n\ngetJasmineRequireObj().toContain = function() {\n  /**\n   * {@link expect} the actual value to contain a specific value.\n   * @function\n   * @name matchers#toContain\n   * @param {Object} expected - The value to look for.\n   * @example\n   * expect(array).toContain(anElement);\n   * expect(string).toContain(substring);\n   */\n  function toContain(util, customEqualityTesters) {\n    customEqualityTesters = customEqualityTesters || [];\n\n    return {\n      compare: function(actual, expected) {\n\n        return {\n          pass: util.contains(actual, expected, customEqualityTesters)\n        };\n      }\n    };\n  }\n\n  return toContain;\n};\n\ngetJasmineRequireObj().toEqual = function(j$) {\n  /**\n   * {@link expect} the actual value to be equal to the expected, using deep equality comparison.\n   * @function\n   * @name matchers#toEqual\n   * @param {Object} expected - Expected value\n   * @example\n   * expect(bigObject).toEqual({\"foo\": ['bar', 'baz']});\n   */\n  function toEqual(util, customEqualityTesters) {\n    customEqualityTesters = customEqualityTesters || [];\n\n    return {\n      compare: function(actual, expected) {\n        var result = {\n            pass: false\n          },\n          diffBuilder = j$.DiffBuilder();\n\n        result.pass = util.equals(actual, expected, customEqualityTesters, diffBuilder);\n\n        // TODO: only set error message if test fails\n        result.message = diffBuilder.getMessage();\n\n        return result;\n      }\n    };\n  }\n\n  return toEqual;\n};\n\ngetJasmineRequireObj().toHaveBeenCalled = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalled>', 'expect(<spyObj>).toHaveBeenCalled()');\n\n  /**\n   * {@link expect} the actual (a {@link Spy}) to have been called.\n   * @function\n   * @name matchers#toHaveBeenCalled\n   * @example\n   * expect(mySpy).toHaveBeenCalled();\n   * expect(mySpy).not.toHaveBeenCalled();\n   */\n  function toHaveBeenCalled() {\n    return {\n      compare: function(actual) {\n        var result = {};\n\n        if (!j$.isSpy(actual)) {\n          throw new Error(getErrorMsg('Expected a spy, but got ' + j$.pp(actual) + '.'));\n        }\n\n        if (arguments.length > 1) {\n          throw new Error(getErrorMsg('Does not take arguments, use toHaveBeenCalledWith'));\n        }\n\n        result.pass = actual.calls.any();\n\n        result.message = result.pass ?\n          'Expected spy ' + actual.and.identity + ' not to have been called.' :\n          'Expected spy ' + actual.and.identity + ' to have been called.';\n\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalled;\n};\n\ngetJasmineRequireObj().toHaveBeenCalledBefore = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledBefore>', 'expect(<spyObj>).toHaveBeenCalledBefore(<spyObj>)');\n\n  /**\n   * {@link expect} the actual value (a {@link Spy}) to have been called before another {@link Spy}.\n   * @function\n   * @name matchers#toHaveBeenCalledBefore\n   * @param {Spy} expected - {@link Spy} that should have been called after the `actual` {@link Spy}.\n   * @example\n   * expect(mySpy).toHaveBeenCalledBefore(otherSpy);\n   */\n  function toHaveBeenCalledBefore() {\n    return {\n      compare: function(firstSpy, latterSpy) {\n        if (!j$.isSpy(firstSpy)) {\n          throw new Error(getErrorMsg('Expected a spy, but got ' + j$.pp(firstSpy) + '.'));\n        }\n        if (!j$.isSpy(latterSpy)) {\n          throw new Error(getErrorMsg('Expected a spy, but got ' + j$.pp(latterSpy) + '.'));\n        }\n\n        var result = { pass: false };\n\n        if (!firstSpy.calls.count()) {\n          result.message = 'Expected spy ' +  firstSpy.and.identity + ' to have been called.';\n          return result;\n        }\n        if (!latterSpy.calls.count()) {\n          result.message = 'Expected spy ' +  latterSpy.and.identity + ' to have been called.';\n          return result;\n        }\n\n        var latest1stSpyCall = firstSpy.calls.mostRecent().invocationOrder;\n        var first2ndSpyCall = latterSpy.calls.first().invocationOrder;\n\n        result.pass = latest1stSpyCall < first2ndSpyCall;\n\n        if (result.pass) {\n          result.message = 'Expected spy ' + firstSpy.and.identity + ' to not have been called before spy ' + latterSpy.and.identity + ', but it was';\n        } else {\n          var first1stSpyCall = firstSpy.calls.first().invocationOrder;\n          var latest2ndSpyCall = latterSpy.calls.mostRecent().invocationOrder;\n\n          if(first1stSpyCall < first2ndSpyCall) {\n            result.message = 'Expected latest call to spy ' + firstSpy.and.identity + ' to have been called before first call to spy ' + latterSpy.and.identity + ' (no interleaved calls)';\n          } else if (latest2ndSpyCall > latest1stSpyCall) {\n            result.message = 'Expected first call to spy ' + latterSpy.and.identity + ' to have been called after latest call to spy ' + firstSpy.and.identity + ' (no interleaved calls)';\n          } else {\n            result.message = 'Expected spy ' + firstSpy.and.identity + ' to have been called before spy ' + latterSpy.and.identity;\n          }\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalledBefore;\n};\n\ngetJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledTimes>', 'expect(<spyObj>).toHaveBeenCalledTimes(<Number>)');\n\n  /**\n   * {@link expect} the actual (a {@link Spy}) to have been called the specified number of times.\n   * @function\n   * @name matchers#toHaveBeenCalledTimes\n   * @param {Number} expected - The number of invocations to look for.\n   * @example\n   * expect(mySpy).toHaveBeenCalledTimes(3);\n   */\n  function toHaveBeenCalledTimes() {\n    return {\n      compare: function(actual, expected) {\n        if (!j$.isSpy(actual)) {\n          throw new Error(getErrorMsg('Expected a spy, but got ' + j$.pp(actual) + '.'));\n        }\n\n        var args = Array.prototype.slice.call(arguments, 0),\n          result = { pass: false };\n\n        if (!j$.isNumber_(expected)){\n          throw new Error(getErrorMsg('The expected times failed is a required argument and must be a number.'));\n        }\n\n        actual = args[0];\n        var calls = actual.calls.count();\n        var timesMessage = expected === 1 ? 'once' : expected + ' times';\n        result.pass = calls === expected;\n        result.message = result.pass ?\n          'Expected spy ' + actual.and.identity + ' not to have been called ' + timesMessage + '. It was called ' +  calls + ' times.' :\n          'Expected spy ' + actual.and.identity + ' to have been called ' + timesMessage + '. It was called ' +  calls + ' times.';\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalledTimes;\n};\n\ngetJasmineRequireObj().toHaveBeenCalledWith = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledWith>', 'expect(<spyObj>).toHaveBeenCalledWith(...arguments)');\n\n  /**\n   * {@link expect} the actual (a {@link Spy}) to have been called with particular arguments at least once.\n   * @function\n   * @name matchers#toHaveBeenCalledWith\n   * @param {...Object} - The arguments to look for\n   * @example\n   * expect(mySpy).toHaveBeenCalledWith('foo', 'bar', 2);\n   */\n  function toHaveBeenCalledWith(util, customEqualityTesters) {\n    return {\n      compare: function() {\n        var args = Array.prototype.slice.call(arguments, 0),\n          actual = args[0],\n          expectedArgs = args.slice(1),\n          result = { pass: false };\n\n        if (!j$.isSpy(actual)) {\n          throw new Error(getErrorMsg('Expected a spy, but got ' + j$.pp(actual) + '.'));\n        }\n\n        if (!actual.calls.any()) {\n          result.message = function() { return 'Expected spy ' + actual.and.identity + ' to have been called with ' + j$.pp(expectedArgs) + ' but it was never called.'; };\n          return result;\n        }\n\n        if (util.contains(actual.calls.allArgs(), expectedArgs, customEqualityTesters)) {\n          result.pass = true;\n          result.message = function() { return 'Expected spy ' + actual.and.identity + ' not to have been called with ' + j$.pp(expectedArgs) + ' but it was.'; };\n        } else {\n          result.message = function() { return 'Expected spy ' + actual.and.identity + ' to have been called with ' + j$.pp(expectedArgs) + ' but actual calls were ' + j$.pp(actual.calls.allArgs()).replace(/^\\[ | \\]$/g, '') + '.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toHaveBeenCalledWith;\n};\n\ngetJasmineRequireObj().toHaveClass = function(j$) {\n  /**\n   * {@link expect} the actual value to be a DOM element that has the expected class\n   * @function\n   * @name matchers#toHaveClass\n   * @param {Object} expected - The class name to test for\n   * @example\n   * var el = document.createElement('div');\n   * el.className = 'foo bar baz';\n   * expect(el).toHaveClass('bar');\n   */\n  function toHaveClass(util, customEqualityTesters) {\n    return {\n      compare: function(actual, expected) {\n        if (!isElement(actual)) {\n          throw new Error(j$.pp(actual) + ' is not a DOM element');\n        }\n\n        return {\n          pass: actual.classList.contains(expected)\n        };\n      }\n    };\n  }\n\n  function isElement(maybeEl) {\n    return maybeEl &&\n      maybeEl.classList &&\n      j$.isFunction_(maybeEl.classList.contains);\n  }\n\n  return toHaveClass;\n};\n\ngetJasmineRequireObj().toMatch = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toMatch>', 'expect(<expectation>).toMatch(<string> || <regexp>)');\n\n  /**\n   * {@link expect} the actual value to match a regular expression\n   * @function\n   * @name matchers#toMatch\n   * @param {RegExp|String} expected - Value to look for in the string.\n   * @example\n   * expect(\"my string\").toMatch(/string$/);\n   * expect(\"other string\").toMatch(\"her\");\n   */\n  function toMatch() {\n    return {\n      compare: function(actual, expected) {\n        if (!j$.isString_(expected) && !j$.isA_('RegExp', expected)) {\n          throw new Error(getErrorMsg('Expected is not a String or a RegExp'));\n        }\n\n        var regexp = new RegExp(expected);\n\n        return {\n          pass: regexp.test(actual)\n        };\n      }\n    };\n  }\n\n  return toMatch;\n};\n\ngetJasmineRequireObj().toThrow = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<toThrow>', 'expect(function() {<expectation>}).toThrow()');\n\n  /**\n   * {@link expect} a function to `throw` something.\n   * @function\n   * @name matchers#toThrow\n   * @param {Object} [expected] - Value that should be thrown. If not provided, simply the fact that something was thrown will be checked.\n   * @example\n   * expect(function() { return 'things'; }).toThrow('foo');\n   * expect(function() { return 'stuff'; }).toThrow();\n   */\n  function toThrow(util) {\n    return {\n      compare: function(actual, expected) {\n        var result = { pass: false },\n          threw = false,\n          thrown;\n\n        if (typeof actual != 'function') {\n          throw new Error(getErrorMsg('Actual is not a Function'));\n        }\n\n        try {\n          actual();\n        } catch (e) {\n          threw = true;\n          thrown = e;\n        }\n\n        if (!threw) {\n          result.message = 'Expected function to throw an exception.';\n          return result;\n        }\n\n        if (arguments.length == 1) {\n          result.pass = true;\n          result.message = function() { return 'Expected function not to throw, but it threw ' + j$.pp(thrown) + '.'; };\n\n          return result;\n        }\n\n        if (util.equals(thrown, expected)) {\n          result.pass = true;\n          result.message = function() { return 'Expected function not to throw ' + j$.pp(expected) + '.'; };\n        } else {\n          result.message = function() { return 'Expected function to throw ' + j$.pp(expected) + ', but it threw ' +  j$.pp(thrown) + '.'; };\n        }\n\n        return result;\n      }\n    };\n  }\n\n  return toThrow;\n};\n\ngetJasmineRequireObj().toThrowError = function(j$) {\n\n  var getErrorMsg =  j$.formatErrorMsg('<toThrowError>', 'expect(function() {<expectation>}).toThrowError(<ErrorConstructor>, <message>)');\n\n  /**\n   * {@link expect} a function to `throw` an `Error`.\n   * @function\n   * @name matchers#toThrowError\n   * @param {Error} [expected] - `Error` constructor the object that was thrown needs to be an instance of. If not provided, `Error` will be used.\n   * @param {RegExp|String} [message] - The message that should be set on the thrown `Error`\n   * @example\n   * expect(function() { return 'things'; }).toThrowError(MyCustomError, 'message');\n   * expect(function() { return 'things'; }).toThrowError(MyCustomError, /bar/);\n   * expect(function() { return 'stuff'; }).toThrowError(MyCustomError);\n   * expect(function() { return 'other'; }).toThrowError(/foo/);\n   * expect(function() { return 'other'; }).toThrowError();\n   */\n  function toThrowError () {\n    return {\n      compare: function(actual) {\n        var errorMatcher = getMatcher.apply(null, arguments),\n          thrown;\n\n        if (typeof actual != 'function') {\n          throw new Error(getErrorMsg('Actual is not a Function'));\n        }\n\n        try {\n          actual();\n          return fail('Expected function to throw an Error.');\n        } catch (e) {\n          thrown = e;\n        }\n\n        if (!j$.isError_(thrown)) {\n          return fail(function() { return 'Expected function to throw an Error, but it threw ' + j$.pp(thrown) + '.'; });\n        }\n\n        return errorMatcher.match(thrown);\n      }\n    };\n\n    function getMatcher() {\n      var expected, errorType;\n\n      if (arguments[2]) {\n        errorType = arguments[1];\n        expected = arguments[2];\n        if (!isAnErrorType(errorType)) {\n          throw new Error(getErrorMsg('Expected error type is not an Error.'));\n        }\n\n        return exactMatcher(expected, errorType);\n      } else if (arguments[1]) {\n        expected = arguments[1];\n\n        if (isAnErrorType(arguments[1])) {\n          return exactMatcher(null, arguments[1]);\n        } else {\n          return exactMatcher(arguments[1], null);\n        }\n      } else {\n        return anyMatcher();\n      }\n    }\n\n    function anyMatcher() {\n      return {\n        match: function(error) {\n          return pass('Expected function not to throw an Error, but it threw ' + j$.fnNameFor(error) + '.');\n        }\n      };\n    }\n\n    function exactMatcher(expected, errorType) {\n      if (expected && !isStringOrRegExp(expected)) {\n        if (errorType) {\n          throw new Error(getErrorMsg('Expected error message is not a string or RegExp.'));\n        } else {\n          throw new Error(getErrorMsg('Expected is not an Error, string, or RegExp.'));\n        }\n      }\n\n      function messageMatch(message) {\n        if (typeof expected == 'string') {\n          return expected == message;\n        } else {\n          return expected.test(message);\n        }\n      }\n\n      var errorTypeDescription = errorType ? j$.fnNameFor(errorType) : 'an exception';\n\n      function thrownDescription(thrown) {\n        var thrownName = errorType ? j$.fnNameFor(thrown.constructor) : 'an exception',\n            thrownMessage = '';\n\n        if (expected) {\n          thrownMessage = ' with message ' + j$.pp(thrown.message);\n        }\n\n        return thrownName + thrownMessage;\n      }\n\n      function messageDescription() {\n        if (expected === null) {\n          return '';\n        } else if (expected instanceof RegExp) {\n          return ' with a message matching ' + j$.pp(expected);\n        } else {\n          return ' with message ' + j$.pp(expected);\n        }\n      }\n\n      function matches(error) {\n        return (errorType === null || error instanceof errorType) &&\n          (expected === null || messageMatch(error.message));\n      }\n\n      return {\n        match: function(thrown) {\n          if (matches(thrown)) {\n            return pass(function() {\n              return 'Expected function not to throw ' + errorTypeDescription + messageDescription() + '.';\n            });\n          } else {\n            return fail(function() {\n              return 'Expected function to throw ' + errorTypeDescription + messageDescription() +\n                ', but it threw ' + thrownDescription(thrown) + '.';\n            });\n          }\n        }\n      };\n    }\n\n    function isStringOrRegExp(potential) {\n      return potential instanceof RegExp || (typeof potential == 'string');\n    }\n\n    function isAnErrorType(type) {\n      if (typeof type !== 'function') {\n        return false;\n      }\n\n      var Surrogate = function() {};\n      Surrogate.prototype = type.prototype;\n      return j$.isError_(new Surrogate());\n    }\n  }\n\n  function pass(message) {\n    return {\n      pass: true,\n      message: message\n    };\n  }\n\n  function fail(message) {\n    return {\n      pass: false,\n      message: message\n    };\n  }\n\n  return toThrowError;\n};\n\ngetJasmineRequireObj().toThrowMatching = function(j$) {\n  var usageError =  j$.formatErrorMsg('<toThrowMatching>', 'expect(function() {<expectation>}).toThrowMatching(<Predicate>)');\n\n  /**\n   * {@link expect} a function to `throw` something matching a predicate.\n   * @function\n   * @name matchers#toThrowMatching\n   * @param {Function} predicate - A function that takes the thrown exception as its parameter and returns true if it matches.\n   * @example\n   * expect(function() { throw new Error('nope'); }).toThrowMatching(function(thrown) { return thrown.message === 'nope'; });\n   */\n  function toThrowMatching() {\n    return {\n      compare: function(actual, predicate) {\n        var thrown;\n\n        if (typeof actual !== 'function') {\n          throw new Error(usageError('Actual is not a Function'));\n        }\n\n        if (typeof predicate !== 'function') {\n          throw new Error(usageError('Predicate is not a Function'));\n        }\n\n        try {\n          actual();\n          return fail('Expected function to throw an exception.');\n        } catch (e) {\n          thrown = e;\n        }\n\n        if (predicate(thrown)) {\n          return pass('Expected function not to throw an exception matching a predicate.');\n        } else {\n            return fail(function() {\n              return 'Expected function to throw an exception matching a predicate, ' +\n                'but it threw ' + thrownDescription(thrown) + '.';\n            });\n        }\n      }\n    };\n  }\n\n  function thrownDescription(thrown) {\n    if (thrown && thrown.constructor) {\n      return j$.fnNameFor(thrown.constructor) + ' with message ' +\n        j$.pp(thrown.message);\n    } else {\n      return j$.pp(thrown);\n    }\n  }\n\n  function pass(message) {\n    return {\n      pass: true,\n      message: message\n    };\n  }\n\n  function fail(message) {\n    return {\n      pass: false,\n      message: message\n    };\n  }\n\n  return toThrowMatching;\n};\n\ngetJasmineRequireObj().MockDate = function() {\n  function MockDate(global) {\n    var self = this;\n    var currentTime = 0;\n\n    if (!global || !global.Date) {\n      self.install = function() {};\n      self.tick = function() {};\n      self.uninstall = function() {};\n      return self;\n    }\n\n    var GlobalDate = global.Date;\n\n    self.install = function(mockDate) {\n      if (mockDate instanceof GlobalDate) {\n        currentTime = mockDate.getTime();\n      } else {\n        currentTime = new GlobalDate().getTime();\n      }\n\n      global.Date = FakeDate;\n    };\n\n    self.tick = function(millis) {\n      millis = millis || 0;\n      currentTime = currentTime + millis;\n    };\n\n    self.uninstall = function() {\n      currentTime = 0;\n      global.Date = GlobalDate;\n    };\n\n    createDateProperties();\n\n    return self;\n\n    function FakeDate() {\n      switch(arguments.length) {\n        case 0:\n          return new GlobalDate(currentTime);\n        case 1:\n          return new GlobalDate(arguments[0]);\n        case 2:\n          return new GlobalDate(arguments[0], arguments[1]);\n        case 3:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2]);\n        case 4:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3]);\n        case 5:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4]);\n        case 6:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4], arguments[5]);\n        default:\n          return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],\n                                arguments[4], arguments[5], arguments[6]);\n      }\n    }\n\n    function createDateProperties() {\n      FakeDate.prototype = GlobalDate.prototype;\n\n      FakeDate.now = function() {\n        if (GlobalDate.now) {\n          return currentTime;\n        } else {\n          throw new Error('Browser does not support Date.now()');\n        }\n      };\n\n      FakeDate.toSource = GlobalDate.toSource;\n      FakeDate.toString = GlobalDate.toString;\n      FakeDate.parse = GlobalDate.parse;\n      FakeDate.UTC = GlobalDate.UTC;\n    }\n\t}\n\n  return MockDate;\n};\n\ngetJasmineRequireObj().pp = function(j$) {\n\n  function PrettyPrinter() {\n    this.ppNestLevel_ = 0;\n    this.seen = [];\n    this.length = 0;\n    this.stringParts = [];\n  }\n\n  function hasCustomToString(value) {\n    // value.toString !== Object.prototype.toString if value has no custom toString but is from another context (e.g.\n    // iframe, web worker)\n    return j$.isFunction_(value.toString) && value.toString !== Object.prototype.toString && (value.toString() !== Object.prototype.toString.call(value));\n  }\n\n  PrettyPrinter.prototype.format = function(value) {\n    this.ppNestLevel_++;\n    try {\n      if (j$.util.isUndefined(value)) {\n        this.emitScalar('undefined');\n      } else if (value === null) {\n        this.emitScalar('null');\n      } else if (value === 0 && 1/value === -Infinity) {\n        this.emitScalar('-0');\n      } else if (value === j$.getGlobal()) {\n        this.emitScalar('<global>');\n      } else if (value.jasmineToString) {\n        this.emitScalar(value.jasmineToString());\n      } else if (typeof value === 'string') {\n        this.emitString(value);\n      } else if (j$.isSpy(value)) {\n        this.emitScalar('spy on ' + value.and.identity);\n      } else if (value instanceof RegExp) {\n        this.emitScalar(value.toString());\n      } else if (typeof value === 'function') {\n        this.emitScalar('Function');\n      } else if (j$.isDomNode(value)) {\n        if (value.tagName) {\n          this.emitDomElement(value);\n        } else {\n          this.emitScalar('HTMLNode');\n        }\n      } else if (value instanceof Date) {\n        this.emitScalar('Date(' + value + ')');\n      } else if (j$.isSet(value)) {\n        this.emitSet(value);\n      } else if (j$.isMap(value)) {\n        this.emitMap(value);\n      } else if (j$.isTypedArray_(value)) {\n        this.emitTypedArray(value);\n      } else if (value.toString && typeof value === 'object' && !j$.isArray_(value) && hasCustomToString(value)) {\n        this.emitScalar(value.toString());\n      } else if (j$.util.arrayContains(this.seen, value)) {\n        this.emitScalar('<circular reference: ' + (j$.isArray_(value) ? 'Array' : 'Object') + '>');\n      } else if (j$.isArray_(value) || j$.isA_('Object', value)) {\n        this.seen.push(value);\n        if (j$.isArray_(value)) {\n          this.emitArray(value);\n        } else {\n          this.emitObject(value);\n        }\n        this.seen.pop();\n      } else {\n        this.emitScalar(value.toString());\n      }\n    } catch (e) {\n      if (this.ppNestLevel_ > 1 || !(e instanceof MaxCharsReachedError)) {\n        throw e;\n      }\n    } finally {\n      this.ppNestLevel_--;\n    }\n  };\n\n  PrettyPrinter.prototype.iterateObject = function(obj, fn) {\n    var objKeys = keys(obj, j$.isArray_(obj));\n    var isGetter = function isGetter(prop) {};\n\n    if (obj.__lookupGetter__) {\n      isGetter = function isGetter(prop) {\n        var getter = obj.__lookupGetter__(prop);\n        return !j$.util.isUndefined(getter) && getter !== null;\n      };\n\n    }\n    var length = Math.min(objKeys.length, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);\n    for (var i = 0; i < length; i++) {\n      var property = objKeys[i];\n      fn(property, isGetter(property));\n    }\n\n    return objKeys.length > length;\n  };\n\n  PrettyPrinter.prototype.emitScalar = function(value) {\n    this.append(value);\n  };\n\n  PrettyPrinter.prototype.emitString = function(value) {\n    this.append('\\'' + value + '\\'');\n  };\n\n  PrettyPrinter.prototype.emitArray = function(array) {\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      this.append('Array');\n      return;\n    }\n    var length = Math.min(array.length, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);\n    this.append('[ ');\n    for (var i = 0; i < length; i++) {\n      if (i > 0) {\n        this.append(', ');\n      }\n      this.format(array[i]);\n    }\n    if(array.length > length){\n      this.append(', ...');\n    }\n\n    var self = this;\n    var first = array.length === 0;\n    var truncated = this.iterateObject(array, function(property, isGetter) {\n      if (first) {\n        first = false;\n      } else {\n        self.append(', ');\n      }\n\n      self.formatProperty(array, property, isGetter);\n    });\n\n    if (truncated) { this.append(', ...'); }\n\n    this.append(' ]');\n  };\n\n  PrettyPrinter.prototype.emitSet = function(set) {\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      this.append('Set');\n      return;\n    }\n    this.append('Set( ');\n    var size = Math.min(set.size, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);\n    var i = 0;\n    set.forEach( function( value, key ) {\n      if (i >= size) {\n        return;\n      }\n      if (i > 0) {\n        this.append(', ');\n      }\n      this.format(value);\n\n      i++;\n    }, this );\n    if (set.size > size){\n      this.append(', ...');\n    }\n    this.append(' )');\n  };\n\n  PrettyPrinter.prototype.emitMap = function(map) {\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      this.append('Map');\n      return;\n    }\n    this.append('Map( ');\n    var size = Math.min(map.size, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH);\n    var i = 0;\n    map.forEach( function( value, key ) {\n      if (i >= size) {\n        return;\n      }\n      if (i > 0) {\n        this.append(', ');\n      }\n      this.format([key,value]);\n\n      i++;\n    }, this );\n    if (map.size > size){\n      this.append(', ...');\n    }\n    this.append(' )');\n  };\n\n  PrettyPrinter.prototype.emitObject = function(obj) {\n    var ctor = obj.constructor,\n        constructorName;\n\n    constructorName = typeof ctor === 'function' && obj instanceof ctor ?\n      j$.fnNameFor(obj.constructor) :\n      'null';\n\n    this.append(constructorName);\n\n    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {\n      return;\n    }\n\n    var self = this;\n    this.append('({ ');\n    var first = true;\n\n    var truncated = this.iterateObject(obj, function(property, isGetter) {\n      if (first) {\n        first = false;\n      } else {\n        self.append(', ');\n      }\n\n      self.formatProperty(obj, property, isGetter);\n    });\n\n    if (truncated) { this.append(', ...'); }\n\n    this.append(' })');\n  };\n\n  PrettyPrinter.prototype.emitTypedArray = function(arr) {\n    var constructorName = j$.fnNameFor(arr.constructor),\n      limitedArray = Array.prototype.slice.call(arr, 0, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH),\n      itemsString = Array.prototype.join.call(limitedArray, ', ');\n\n    if (limitedArray.length !== arr.length) {\n      itemsString += ', ...';\n    }\n\n    this.append(constructorName + ' [ ' + itemsString + ' ]');\n  };\n\n  PrettyPrinter.prototype.emitDomElement = function(el) {\n    var tagName = el.tagName.toLowerCase(),\n      attrs = el.attributes,\n      i,\n      len = attrs.length,\n      out = '<' + tagName,\n      attr;\n\n    for (i = 0; i < len; i++) {\n      attr = attrs[i];\n      out += ' ' + attr.name;\n\n      if (attr.value !== '') {\n        out += '=\"' + attr.value + '\"';\n      }\n    }\n\n    out += '>';\n\n    if (el.childElementCount !== 0 || el.textContent !== '') {\n      out += '...</' + tagName + '>';\n    }\n\n    this.append(out);\n  };\n\n  PrettyPrinter.prototype.formatProperty = function(obj, property, isGetter) {\n      this.append(property);\n      this.append(': ');\n      if (isGetter) {\n        this.append('<getter>');\n      } else {\n        this.format(obj[property]);\n      }\n  };\n\n  PrettyPrinter.prototype.append = function(value) {\n    var result = truncate(value, j$.MAX_PRETTY_PRINT_CHARS - this.length);\n    this.length += result.value.length;\n    this.stringParts.push(result.value);\n\n    if (result.truncated) {\n      throw new MaxCharsReachedError();\n    }\n  };\n\n\n  function truncate(s, maxlen) {\n    if (s.length <= maxlen) {\n      return { value: s, truncated: false };\n    }\n\n    s = s.substring(0, maxlen - 4) + ' ...';\n    return { value: s, truncated: true };\n  }\n\n  function MaxCharsReachedError() {\n    this.message = 'Exceeded ' + j$.MAX_PRETTY_PRINT_CHARS +\n      ' characters while pretty-printing a value';\n  }\n\n  MaxCharsReachedError.prototype = new Error();\n\n  function keys(obj, isArray) {\n    var allKeys = Object.keys ? Object.keys(obj) :\n      (function(o) {\n          var keys = [];\n          for (var key in o) {\n              if (j$.util.has(o, key)) {\n                  keys.push(key);\n              }\n          }\n          return keys;\n      })(obj);\n\n    if (!isArray) {\n      return allKeys;\n    }\n\n    if (allKeys.length === 0) {\n        return allKeys;\n    }\n\n    var extraKeys = [];\n    for (var i = 0; i < allKeys.length; i++) {\n      if (!/^[0-9]+$/.test(allKeys[i])) {\n        extraKeys.push(allKeys[i]);\n      }\n    }\n\n    return extraKeys;\n  }\n  return function(value) {\n    var prettyPrinter = new PrettyPrinter();\n    prettyPrinter.format(value);\n    return prettyPrinter.stringParts.join('');\n  };\n};\n\ngetJasmineRequireObj().QueueRunner = function(j$) {\n  function StopExecutionError() {}\n  StopExecutionError.prototype = new Error();\n  j$.StopExecutionError = StopExecutionError;\n\n  function once(fn) {\n    var called = false;\n    return function(arg) {\n      if (!called) {\n        called = true;\n        // Direct call using single parameter, because cleanup/next does not need more\n        fn(arg);\n      }\n      return null;\n    };\n  }\n\n  function emptyFn() {}\n\n  function QueueRunner(attrs) {\n    var queueableFns = attrs.queueableFns || [];\n    this.queueableFns = queueableFns.concat(attrs.cleanupFns || []);\n    this.firstCleanupIx = queueableFns.length;\n    this.onComplete = attrs.onComplete || emptyFn;\n    this.clearStack = attrs.clearStack || function(fn) {fn();};\n    this.onException = attrs.onException || emptyFn;\n    this.userContext = attrs.userContext || new j$.UserContext();\n    this.timeout = attrs.timeout || {setTimeout: setTimeout, clearTimeout: clearTimeout};\n    this.fail = attrs.fail || emptyFn;\n    this.globalErrors = attrs.globalErrors || { pushListener: emptyFn, popListener: emptyFn };\n    this.completeOnFirstError = !!attrs.completeOnFirstError;\n    this.errored = false;\n\n    if (typeof(this.onComplete) !== 'function') {\n      throw new Error('invalid onComplete ' + JSON.stringify(this.onComplete));\n    }\n    this.deprecated = attrs.deprecated;\n  }\n\n  QueueRunner.prototype.execute = function() {\n    var self = this;\n    this.handleFinalError = function(error) {\n      self.onException(error);\n    };\n    this.globalErrors.pushListener(this.handleFinalError);\n    this.run(0);\n  };\n\n  QueueRunner.prototype.skipToCleanup = function(lastRanIndex) {\n    if (lastRanIndex < this.firstCleanupIx) {\n      this.run(this.firstCleanupIx);\n    } else {\n      this.run(lastRanIndex + 1);\n    }\n  };\n\n  QueueRunner.prototype.clearTimeout = function(timeoutId) {\n    Function.prototype.apply.apply(this.timeout.clearTimeout, [j$.getGlobal(), [timeoutId]]);\n  };\n\n  QueueRunner.prototype.setTimeout = function(fn, timeout) {\n    return Function.prototype.apply.apply(this.timeout.setTimeout, [j$.getGlobal(), [fn, timeout]]);\n  };\n\n  QueueRunner.prototype.attempt = function attempt(iterativeIndex) {\n    var self = this, completedSynchronously = true,\n      handleError = function handleError(error) {\n        onException(error);\n        next(error);\n      },\n      cleanup = once(function cleanup() {\n        if (timeoutId !== void 0) {\n          self.clearTimeout(timeoutId);\n        }\n        self.globalErrors.popListener(handleError);\n      }),\n      next = once(function next(err) {\n        cleanup();\n\n        if (j$.isError_(err)) {\n          if (!(err instanceof StopExecutionError) && !err.jasmineMessage) {\n            self.fail(err);\n          }\n          self.errored = errored = true;\n        }\n\n        function runNext() {\n          if (self.completeOnFirstError && errored) {\n            self.skipToCleanup(iterativeIndex);\n          } else {\n            self.run(iterativeIndex + 1);\n          }\n        }\n\n        if (completedSynchronously) {\n          self.setTimeout(runNext);\n        } else {\n          runNext();\n        }\n      }),\n      errored = false,\n      queueableFn = self.queueableFns[iterativeIndex],\n      timeoutId;\n\n    next.fail = function nextFail() {\n      self.fail.apply(null, arguments);\n      self.errored = errored = true;\n      next();\n    };\n\n    self.globalErrors.pushListener(handleError);\n\n    if (queueableFn.timeout !== undefined) {\n      var timeoutInterval = queueableFn.timeout || j$.DEFAULT_TIMEOUT_INTERVAL;\n      timeoutId = self.setTimeout(function() {\n        var error = new Error(\n          'Timeout - Async callback was not invoked within ' + timeoutInterval + 'ms ' +\n          (queueableFn.timeout ? '(custom timeout)' : '(set by jasmine.DEFAULT_TIMEOUT_INTERVAL)')\n        );\n        onException(error);\n        next();\n      }, timeoutInterval);\n    }\n\n    try {\n      if (queueableFn.fn.length === 0) {\n        var maybeThenable = queueableFn.fn.call(self.userContext);\n\n        if (maybeThenable && j$.isFunction_(maybeThenable.then)) {\n          maybeThenable.then(next, onPromiseRejection);\n          completedSynchronously = false;\n          return { completedSynchronously: false };\n        }\n      } else {\n        queueableFn.fn.call(self.userContext, next);\n        completedSynchronously = false;\n        return { completedSynchronously: false };\n      }\n    } catch (e) {\n      onException(e);\n      self.errored = errored = true;\n    }\n\n    cleanup();\n    return { completedSynchronously: true, errored: errored };\n\n    function onException(e) {\n      self.onException(e);\n      self.errored = errored = true;\n    }\n\n    function onPromiseRejection(e) {\n      onException(e);\n      next();\n    }\n  };\n\n  QueueRunner.prototype.run = function(recursiveIndex) {\n    var length = this.queueableFns.length,\n      self = this,\n      iterativeIndex;\n\n\n    for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {\n      var result = this.attempt(iterativeIndex);\n\n      if (!result.completedSynchronously) {\n        return;\n      }\n\n      self.errored = self.errored || result.errored;\n\n      if (this.completeOnFirstError && result.errored) {\n        this.skipToCleanup(iterativeIndex);\n        return;\n      }\n    }\n\n    this.clearStack(function() {\n      self.globalErrors.popListener(self.handleFinalError);\n      self.onComplete(self.errored && new StopExecutionError());\n    });\n\n  };\n\n  return QueueRunner;\n};\n\ngetJasmineRequireObj().ReportDispatcher = function(j$) {\n  function ReportDispatcher(methods, queueRunnerFactory) {\n\n    var dispatchedMethods = methods || [];\n\n    for (var i = 0; i < dispatchedMethods.length; i++) {\n      var method = dispatchedMethods[i];\n      this[method] = (function(m) {\n        return function() {\n          dispatch(m, arguments);\n        };\n      }(method));\n    }\n\n    var reporters = [];\n    var fallbackReporter = null;\n\n    this.addReporter = function(reporter) {\n      reporters.push(reporter);\n    };\n\n    this.provideFallbackReporter = function(reporter) {\n      fallbackReporter = reporter;\n    };\n\n    this.clearReporters = function() {\n      reporters = [];\n    };\n\n    return this;\n\n    function dispatch(method, args) {\n      if (reporters.length === 0 && fallbackReporter !== null) {\n          reporters.push(fallbackReporter);\n      }\n      var onComplete = args[args.length - 1];\n      args = j$.util.argsToArray(args).splice(0, args.length - 1);\n      var fns = [];\n      for (var i = 0; i < reporters.length; i++) {\n        var reporter = reporters[i];\n        addFn(fns, reporter, method, args);\n      }\n\n      queueRunnerFactory({\n        queueableFns: fns,\n        onComplete: onComplete,\n        isReporter: true\n      });\n    }\n\n    function addFn(fns, reporter, method, args) {\n      var fn = reporter[method];\n      if (!fn) {\n        return;\n      }\n\n      var thisArgs = j$.util.cloneArgs(args);\n      if (fn.length <= 1) {\n        fns.push({\n          fn: function () {\n            return fn.apply(reporter, thisArgs);\n          }\n        });\n      } else {\n        fns.push({\n          fn: function (done) {\n            return fn.apply(reporter, thisArgs.concat([done]));\n          }\n        });\n      }\n    }\n  }\n\n  return ReportDispatcher;\n};\n\n\ngetJasmineRequireObj().interface = function(jasmine, env) {\n  var jasmineInterface = {\n    /**\n     * Callback passed to parts of the Jasmine base interface.\n     *\n     * By default Jasmine assumes this function completes synchronously.\n     * If you have code that you need to test asynchronously, you can declare that you receive a `done` callback, return a Promise, or use the `async` keyword if it is supported in your environment.\n     * @callback implementationCallback\n     * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.\n     * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion.\n     */\n\n    /**\n     * Create a group of specs (often called a suite).\n     *\n     * Calls to `describe` can be nested within other calls to compose your suite as a tree.\n     * @name describe\n     * @function\n     * @global\n     * @param {String} description Textual description of the group\n     * @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs\n     */\n    describe: function(description, specDefinitions) {\n      return env.describe(description, specDefinitions);\n    },\n\n    /**\n     * A temporarily disabled [`describe`]{@link describe}\n     *\n     * Specs within an `xdescribe` will be marked pending and not executed\n     * @name xdescribe\n     * @function\n     * @global\n     * @param {String} description Textual description of the group\n     * @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs\n     */\n    xdescribe: function(description, specDefinitions) {\n      return env.xdescribe(description, specDefinitions);\n    },\n\n    /**\n     * A focused [`describe`]{@link describe}\n     *\n     * If suites or specs are focused, only those that are focused will be executed\n     * @see fit\n     * @name fdescribe\n     * @function\n     * @global\n     * @param {String} description Textual description of the group\n     * @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs\n     */\n    fdescribe: function(description, specDefinitions) {\n      return env.fdescribe(description, specDefinitions);\n    },\n\n    /**\n     * Define a single spec. A spec should contain one or more {@link expect|expectations} that test the state of the code.\n     *\n     * A spec whose expectations all succeed will be passing and a spec with any failures will fail.\n     * @name it\n     * @function\n     * @global\n     * @param {String} description Textual description of what this spec is checking\n     * @param {implementationCallback} [testFunction] Function that contains the code of your test. If not provided the test will be `pending`.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.\n     * @see async\n     */\n    it: function() {\n      return env.it.apply(env, arguments);\n    },\n\n    /**\n     * A temporarily disabled [`it`]{@link it}\n     *\n     * The spec will report as `pending` and will not be executed.\n     * @name xit\n     * @function\n     * @global\n     * @param {String} description Textual description of what this spec is checking.\n     * @param {implementationCallback} [testFunction] Function that contains the code of your test. Will not be executed.\n     */\n    xit: function() {\n      return env.xit.apply(env, arguments);\n    },\n\n    /**\n     * A focused [`it`]{@link it}\n     *\n     * If suites or specs are focused, only those that are focused will be executed.\n     * @name fit\n     * @function\n     * @global\n     * @param {String} description Textual description of what this spec is checking.\n     * @param {implementationCallback} testFunction Function that contains the code of your test.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.\n     * @see async\n     */\n    fit: function() {\n      return env.fit.apply(env, arguments);\n    },\n\n    /**\n     * Run some shared setup before each of the specs in the {@link describe} in which it is called.\n     * @name beforeEach\n     * @function\n     * @global\n     * @param {implementationCallback} [function] Function that contains the code to setup your specs.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeEach.\n     * @see async\n     */\n    beforeEach: function() {\n      return env.beforeEach.apply(env, arguments);\n    },\n\n    /**\n     * Run some shared teardown after each of the specs in the {@link describe} in which it is called.\n     * @name afterEach\n     * @function\n     * @global\n     * @param {implementationCallback} [function] Function that contains the code to teardown your specs.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterEach.\n     * @see async\n     */\n    afterEach: function() {\n      return env.afterEach.apply(env, arguments);\n    },\n\n    /**\n     * Run some shared setup once before all of the specs in the {@link describe} are run.\n     *\n     * _Note:_ Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n     * @name beforeAll\n     * @function\n     * @global\n     * @param {implementationCallback} [function] Function that contains the code to setup your specs.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeAll.\n     * @see async\n     */\n    beforeAll: function() {\n      return env.beforeAll.apply(env, arguments);\n    },\n\n    /**\n     * Run some shared teardown once after all of the specs in the {@link describe} are run.\n     *\n     * _Note:_ Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.\n     * @name afterAll\n     * @function\n     * @global\n     * @param {implementationCallback} [function] Function that contains the code to teardown your specs.\n     * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterAll.\n     * @see async\n     */\n    afterAll: function() {\n      return env.afterAll.apply(env, arguments);\n    },\n\n    /**\n     * Create an expectation for a spec.\n     * @name expect\n     * @function\n     * @global\n     * @param {Object} actual - Actual computed value to test expectations against.\n     * @return {matchers}\n     */\n    expect: function(actual) {\n      return env.expect(actual);\n    },\n\n    /**\n     * Create an asynchronous expectation for a spec. Note that the matchers\n     * that are provided by an asynchronous expectation all return promises\n     * which must be either returned from the spec or waited for using `await`\n     * in order for Jasmine to associate them with the correct spec.\n     * @name expectAsync\n     * @function\n     * @global\n     * @param {Object} actual - Actual computed value to test expectations against.\n     * @return {async-matchers}\n     * @example\n     * await expectAsync(somePromise).toBeResolved();\n     * @example\n     * return expectAsync(somePromise).toBeResolved();\n     */\n    expectAsync: function(actual) {\n      return env.expectAsync(actual);\n    },\n\n    /**\n     * Mark a spec as pending, expectation results will be ignored.\n     * @name pending\n     * @function\n     * @global\n     * @param {String} [message] - Reason the spec is pending.\n     */\n    pending: function() {\n      return env.pending.apply(env, arguments);\n    },\n\n    /**\n     * Explicitly mark a spec as failed.\n     * @name fail\n     * @function\n     * @global\n     * @param {String|Error} [error] - Reason for the failure.\n    */\n    fail: function() {\n      return env.fail.apply(env, arguments);\n    },\n\n    /**\n     * Install a spy onto an existing object.\n     * @name spyOn\n     * @function\n     * @global\n     * @param {Object} obj - The object upon which to install the {@link Spy}.\n     * @param {String} methodName - The name of the method to replace with a {@link Spy}.\n     * @returns {Spy}\n     */\n    spyOn: function(obj, methodName) {\n      return env.spyOn(obj, methodName);\n    },\n\n    /**\n     * Install a spy on a property installed with `Object.defineProperty` onto an existing object.\n     * @name spyOnProperty\n     * @function\n     * @global\n     * @param {Object} obj - The object upon which to install the {@link Spy}\n     * @param {String} propertyName - The name of the property to replace with a {@link Spy}.\n     * @param {String} [accessType=get] - The access type (get|set) of the property to {@link Spy} on.\n     * @returns {Spy}\n     */\n    spyOnProperty: function(obj, methodName, accessType) {\n      return env.spyOnProperty(obj, methodName, accessType);\n    },\n\n    /**\n     * Installs spies on all writable and configurable properties of an object.\n     * @name spyOnAllFunctions\n     * @function\n     * @global\n     * @param {Object} obj - The object upon which to install the {@link Spy}s\n     * @returns {Object} the spied object\n     */\n    spyOnAllFunctions: function(obj) {\n      return env.spyOnAllFunctions(obj);\n    },\n\n    jsApiReporter: new jasmine.JsApiReporter({\n      timer: new jasmine.Timer()\n    }),\n\n    /**\n     * @namespace jasmine\n     */\n    jasmine: jasmine\n  };\n\n  /**\n   * Add a custom equality tester for the current scope of specs.\n   *\n   * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.\n   * @name jasmine.addCustomEqualityTester\n   * @function\n   * @param {Function} tester - A function which takes two arguments to compare and returns a `true` or `false` comparison result if it knows how to compare them, and `undefined` otherwise.\n   * @see custom_equality\n   */\n  jasmine.addCustomEqualityTester = function(tester) {\n    env.addCustomEqualityTester(tester);\n  };\n\n  /**\n   * Add custom matchers for the current scope of specs.\n   *\n   * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.\n   * @name jasmine.addMatchers\n   * @function\n   * @param {Object} matchers - Keys from this object will be the new matcher names.\n   * @see custom_matcher\n   */\n  jasmine.addMatchers = function(matchers) {\n    return env.addMatchers(matchers);\n  };\n\n  /**\n   * Get the currently booted mock {Clock} for this Jasmine environment.\n   * @name jasmine.clock\n   * @function\n   * @returns {Clock}\n   */\n  jasmine.clock = function() {\n    return env.clock;\n  };\n\n  /**\n   * Create a bare {@link Spy} object. This won't be installed anywhere and will not have any implementation behind it.\n   * @name jasmine.createSpy\n   * @function\n   * @param {String} [name] - Name to give the spy. This will be displayed in failure messages.\n   * @param {Function} [originalFn] - Function to act as the real implementation.\n   * @return {Spy}\n   */\n  jasmine.createSpy = function(name, originalFn) {\n    return env.createSpy(name, originalFn);\n  };\n\n  /**\n   * Create an object with multiple {@link Spy}s as its members.\n   * @name jasmine.createSpyObj\n   * @function\n   * @param {String} [baseName] - Base name for the spies in the object.\n   * @param {String[]|Object} methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}.\n   * @return {Object}\n   */\n  jasmine.createSpyObj = function(baseName, methodNames) {\n    return env.createSpyObj(baseName, methodNames);\n  };\n\n  /**\n   * Add a custom spy strategy for the current scope of specs.\n   *\n   * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.\n   * @name jasmine.addSpyStrategy\n   * @function\n   * @param {String} name - The name of the strategy (i.e. what you call from `and`)\n   * @param {Function} factory - Factory function that returns the plan to be executed.\n   */\n  jasmine.addSpyStrategy = function(name, factory) {\n    return env.addSpyStrategy(name, factory);\n  };\n\n  return jasmineInterface;\n};\n\ngetJasmineRequireObj().Spy = function (j$) {\n\n  var nextOrder = (function() {\n    var order = 0;\n\n    return function() {\n      return order++;\n    };\n  })();\n\n  /**\n   * _Note:_ Do not construct this directly, use {@link spyOn}, {@link spyOnProperty}, {@link jasmine.createSpy}, or {@link jasmine.createSpyObj}\n   * @constructor\n   * @name Spy\n   */\n  function Spy(name, originalFn, customStrategies) {\n    var numArgs = (typeof originalFn === 'function' ? originalFn.length : 0),\n      wrapper = makeFunc(numArgs, function () {\n        return spy.apply(this, Array.prototype.slice.call(arguments));\n      }),\n      strategyDispatcher = new SpyStrategyDispatcher({\n        name: name,\n        fn: originalFn,\n        getSpy: function () {\n          return wrapper;\n        },\n        customStrategies: customStrategies\n      }),\n      callTracker = new j$.CallTracker(),\n      spy = function () {\n        /**\n         * @name Spy.callData\n         * @property {object} object - `this` context for the invocation.\n         * @property {number} invocationOrder - Order of the invocation.\n         * @property {Array} args - The arguments passed for this invocation.\n         */\n        var callData = {\n          object: this,\n          invocationOrder: nextOrder(),\n          args: Array.prototype.slice.apply(arguments)\n        };\n\n        callTracker.track(callData);\n        var returnValue = strategyDispatcher.exec(this, arguments);\n        callData.returnValue = returnValue;\n\n        return returnValue;\n      };\n\n    function makeFunc(length, fn) {\n      switch (length) {\n        case 1 : return function (a) { return fn.apply(this, arguments); };\n        case 2 : return function (a,b) { return fn.apply(this, arguments); };\n        case 3 : return function (a,b,c) { return fn.apply(this, arguments); };\n        case 4 : return function (a,b,c,d) { return fn.apply(this, arguments); };\n        case 5 : return function (a,b,c,d,e) { return fn.apply(this, arguments); };\n        case 6 : return function (a,b,c,d,e,f) { return fn.apply(this, arguments); };\n        case 7 : return function (a,b,c,d,e,f,g) { return fn.apply(this, arguments); };\n        case 8 : return function (a,b,c,d,e,f,g,h) { return fn.apply(this, arguments); };\n        case 9 : return function (a,b,c,d,e,f,g,h,i) { return fn.apply(this, arguments); };\n        default : return function () { return fn.apply(this, arguments); };\n      }\n    }\n\n    for (var prop in originalFn) {\n      if (prop === 'and' || prop === 'calls') {\n        throw new Error('Jasmine spies would overwrite the \\'and\\' and \\'calls\\' properties on the object being spied upon');\n      }\n\n      wrapper[prop] = originalFn[prop];\n    }\n\n    /**\n     * @member {SpyStrategy} - Accesses the default strategy for the spy. This strategy will be used\n     * whenever the spy is called with arguments that don't match any strategy\n     * created with {@link Spy#withArgs}.\n     * @name Spy#and\n     * @example\n     * spyOn(someObj, 'func').and.returnValue(42);\n     */\n    wrapper.and = strategyDispatcher.and;\n    /**\n     * Specifies a strategy to be used for calls to the spy that have the\n     * specified arguments.\n     * @name Spy#withArgs\n     * @function\n     * @param {...*} args - The arguments to match\n     * @type {SpyStrategy}\n     * @example\n     * spyOn(someObj, 'func').withArgs(1, 2, 3).and.returnValue(42);\n     * someObj.func(1, 2, 3); // returns 42\n     */\n    wrapper.withArgs = function() {\n      return strategyDispatcher.withArgs.apply(strategyDispatcher, arguments);\n    };\n    wrapper.calls = callTracker;\n\n    return wrapper;\n  }\n\n\n  function SpyStrategyDispatcher(strategyArgs) {\n    var baseStrategy = new j$.SpyStrategy(strategyArgs);\n    var argsStrategies = new StrategyDict(function() {\n      return new j$.SpyStrategy(strategyArgs);\n    });\n\n    this.and = baseStrategy;\n\n    this.exec = function(spy, args) {\n      var strategy = argsStrategies.get(args);\n\n      if (!strategy) {\n        if (argsStrategies.any() && !baseStrategy.isConfigured()) {\n          throw new Error('Spy \\'' + strategyArgs.name + '\\' received a call with arguments ' + j$.pp(Array.prototype.slice.call(args)) + ' but all configured strategies specify other arguments.');\n        } else {\n          strategy = baseStrategy;\n        }\n      }\n\n      return strategy.exec(spy, args);\n    };\n\n    this.withArgs = function() {\n      return { and: argsStrategies.getOrCreate(arguments) };\n    };\n  }\n\n  function StrategyDict(strategyFactory) {\n    this.strategies = [];\n    this.strategyFactory = strategyFactory;\n  }\n\n  StrategyDict.prototype.any = function() {\n    return this.strategies.length > 0;\n  };\n\n  StrategyDict.prototype.getOrCreate = function(args) {\n    var strategy = this.get(args);\n\n    if (!strategy) {\n      strategy = this.strategyFactory();\n      this.strategies.push({\n        args: args,\n        strategy: strategy\n      });\n    }\n\n    return strategy;\n  };\n\n  StrategyDict.prototype.get = function(args) {\n    var i;\n\n    for (i = 0; i < this.strategies.length; i++) {\n      if (j$.matchersUtil.equals(args, this.strategies[i].args)) {\n        return this.strategies[i].strategy;\n      }\n    }\n  };\n\n  return Spy;\n};\n\ngetJasmineRequireObj().SpyFactory = function(j$) {\n\n  function SpyFactory(getCustomStrategies) {\n    var self = this;\n\n    this.createSpy = function(name, originalFn) {\n      return j$.Spy(name, originalFn, getCustomStrategies());\n    };\n\n    this.createSpyObj = function(baseName, methodNames) {\n      var baseNameIsCollection = j$.isObject_(baseName) || j$.isArray_(baseName);\n\n      if (baseNameIsCollection && j$.util.isUndefined(methodNames)) {\n        methodNames = baseName;\n        baseName = 'unknown';\n      }\n\n      var obj = {};\n      var spiesWereSet = false;\n\n      if (j$.isArray_(methodNames)) {\n        for (var i = 0; i < methodNames.length; i++) {\n          obj[methodNames[i]] = self.createSpy(baseName + '.' + methodNames[i]);\n          spiesWereSet = true;\n        }\n      } else if (j$.isObject_(methodNames)) {\n        for (var key in methodNames) {\n          if (methodNames.hasOwnProperty(key)) {\n            obj[key] = self.createSpy(baseName + '.' + key);\n            obj[key].and.returnValue(methodNames[key]);\n            spiesWereSet = true;\n          }\n        }\n      }\n\n      if (!spiesWereSet) {\n        throw 'createSpyObj requires a non-empty array or object of method names to create spies for';\n      }\n\n      return obj;\n    };\n  }\n\n  return SpyFactory;\n};\n\ngetJasmineRequireObj().SpyRegistry = function(j$) {\n\n  var getErrorMsg = j$.formatErrorMsg('<spyOn>', 'spyOn(<object>, <methodName>)');\n\n  function SpyRegistry(options) {\n    options = options || {};\n    var global = options.global || j$.getGlobal();\n    var createSpy = options.createSpy;\n    var currentSpies = options.currentSpies || function() { return []; };\n\n    this.allowRespy = function(allow){\n      this.respy = allow;\n    };\n\n    this.spyOn = function(obj, methodName) {\n\n      if (j$.util.isUndefined(obj) || obj === null) {\n        throw new Error(getErrorMsg('could not find an object to spy upon for ' + methodName + '()'));\n      }\n\n      if (j$.util.isUndefined(methodName) || methodName === null) {\n        throw new Error(getErrorMsg('No method name supplied'));\n      }\n\n      if (j$.util.isUndefined(obj[methodName])) {\n        throw new Error(getErrorMsg(methodName + '() method does not exist'));\n      }\n\n      if (obj[methodName] && j$.isSpy(obj[methodName])  ) {\n        if ( !!this.respy ){\n          return obj[methodName];\n        }else {\n          throw new Error(getErrorMsg(methodName + ' has already been spied upon'));\n        }\n      }\n\n      var descriptor = Object.getOwnPropertyDescriptor(obj, methodName);\n\n      if (descriptor && !(descriptor.writable || descriptor.set)) {\n        throw new Error(getErrorMsg(methodName + ' is not declared writable or has no setter'));\n      }\n\n      var originalMethod = obj[methodName],\n        spiedMethod = createSpy(methodName, originalMethod),\n        restoreStrategy;\n\n      if (Object.prototype.hasOwnProperty.call(obj, methodName) || (obj === global && methodName === 'onerror')) {\n        restoreStrategy = function() {\n          obj[methodName] = originalMethod;\n        };\n      } else {\n        restoreStrategy = function() {\n          if (!delete obj[methodName]) {\n            obj[methodName] = originalMethod;\n          }\n        };\n      }\n\n      currentSpies().push({\n        restoreObjectToOriginalState: restoreStrategy\n      });\n\n      obj[methodName] = spiedMethod;\n\n      return spiedMethod;\n    };\n\n    this.spyOnProperty = function (obj, propertyName, accessType) {\n      accessType = accessType || 'get';\n\n      if (j$.util.isUndefined(obj)) {\n        throw new Error('spyOn could not find an object to spy upon for ' + propertyName + '');\n      }\n\n      if (j$.util.isUndefined(propertyName)) {\n        throw new Error('No property name supplied');\n      }\n\n      var descriptor = j$.util.getPropertyDescriptor(obj, propertyName);\n\n      if (!descriptor) {\n        throw new Error(propertyName + ' property does not exist');\n      }\n\n      if (!descriptor.configurable) {\n        throw new Error(propertyName + ' is not declared configurable');\n      }\n\n      if(!descriptor[accessType]) {\n        throw new Error('Property ' + propertyName + ' does not have access type ' + accessType);\n      }\n\n      if (j$.isSpy(descriptor[accessType])) {\n        //TODO?: should this return the current spy? Downside: may cause user confusion about spy state\n        throw new Error(propertyName + ' has already been spied upon');\n      }\n\n      var originalDescriptor = j$.util.clone(descriptor),\n        spy = createSpy(propertyName, descriptor[accessType]),\n        restoreStrategy;\n\n      if (Object.prototype.hasOwnProperty.call(obj, propertyName)) {\n        restoreStrategy = function() {\n          Object.defineProperty(obj, propertyName, originalDescriptor);\n        };\n      } else {\n        restoreStrategy = function() {\n          delete obj[propertyName];\n        };\n      }\n\n      currentSpies().push({\n        restoreObjectToOriginalState: restoreStrategy\n      });\n\n      descriptor[accessType] = spy;\n\n      Object.defineProperty(obj, propertyName, descriptor);\n\n      return spy;\n    };\n\n    this.spyOnAllFunctions = function(obj) {\n      if (j$.util.isUndefined(obj)) {\n        throw new Error('spyOnAllFunctions could not find an object to spy upon');\n      }\n\n      for (var prop in obj) {\n        if (Object.prototype.hasOwnProperty.call(obj, prop) && obj[prop] instanceof Function) {\n          var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n          if ((descriptor.writable || descriptor.set) && descriptor.configurable) {\n            this.spyOn(obj, prop);\n          }\n        }\n      }\n\n      return obj;\n    };\n\n    this.clearSpies = function() {\n      var spies = currentSpies();\n      for (var i = spies.length - 1; i >= 0; i--) {\n        var spyEntry = spies[i];\n        spyEntry.restoreObjectToOriginalState();\n      }\n    };\n  }\n\n  return SpyRegistry;\n};\n\ngetJasmineRequireObj().SpyStrategy = function(j$) {\n\n  /**\n   * @interface SpyStrategy\n   */\n  function SpyStrategy(options) {\n    options = options || {};\n\n    /**\n     * Get the identifying information for the spy.\n     * @name SpyStrategy#identity\n     * @member\n     * @type {String}\n     */\n    this.identity = options.name || 'unknown';\n    this.originalFn = options.fn || function() {};\n    this.getSpy = options.getSpy || function() {};\n    this.plan = this._defaultPlan = function() {};\n\n    var k, cs = options.customStrategies || {};\n    for (k in cs) {\n      if (j$.util.has(cs, k) && !this[k]) {\n        this[k] = createCustomPlan(cs[k]);\n      }\n    }\n  }\n\n  function createCustomPlan(factory) {\n    return function() {\n      var plan = factory.apply(null, arguments);\n\n      if (!j$.isFunction_(plan)) {\n        throw new Error('Spy strategy must return a function');\n      }\n\n      this.plan = plan;\n      return this.getSpy();\n    };\n  }\n\n  /**\n   * Execute the current spy strategy.\n   * @name SpyStrategy#exec\n   * @function\n   */\n  SpyStrategy.prototype.exec = function(context, args) {\n    return this.plan.apply(context, args);\n  };\n\n  /**\n   * Tell the spy to call through to the real implementation when invoked.\n   * @name SpyStrategy#callThrough\n   * @function\n   */\n  SpyStrategy.prototype.callThrough = function() {\n    this.plan = this.originalFn;\n    return this.getSpy();\n  };\n\n  /**\n   * Tell the spy to return the value when invoked.\n   * @name SpyStrategy#returnValue\n   * @function\n   * @param {*} value The value to return.\n   */\n  SpyStrategy.prototype.returnValue = function(value) {\n    this.plan = function() {\n      return value;\n    };\n    return this.getSpy();\n  };\n\n  /**\n   * Tell the spy to return one of the specified values (sequentially) each time the spy is invoked.\n   * @name SpyStrategy#returnValues\n   * @function\n   * @param {...*} values - Values to be returned on subsequent calls to the spy.\n   */\n  SpyStrategy.prototype.returnValues = function() {\n    var values = Array.prototype.slice.call(arguments);\n    this.plan = function () {\n      return values.shift();\n    };\n    return this.getSpy();\n  };\n\n  /**\n   * Tell the spy to throw an error when invoked.\n   * @name SpyStrategy#throwError\n   * @function\n   * @param {Error|String} something Thing to throw\n   */\n  SpyStrategy.prototype.throwError = function(something) {\n    var error = (something instanceof Error) ? something : new Error(something);\n    this.plan = function() {\n      throw error;\n    };\n    return this.getSpy();\n  };\n\n  /**\n   * Tell the spy to call a fake implementation when invoked.\n   * @name SpyStrategy#callFake\n   * @function\n   * @param {Function} fn The function to invoke with the passed parameters.\n   */\n  SpyStrategy.prototype.callFake = function(fn) {\n    if(!(j$.isFunction_(fn) || j$.isAsyncFunction_(fn))) {\n      throw new Error('Argument passed to callFake should be a function, got ' + fn);\n    }\n    this.plan = fn;\n    return this.getSpy();\n  };\n\n  /**\n   * Tell the spy to do nothing when invoked. This is the default.\n   * @name SpyStrategy#stub\n   * @function\n   */\n  SpyStrategy.prototype.stub = function(fn) {\n    this.plan = function() {};\n    return this.getSpy();\n  };\n\n  SpyStrategy.prototype.isConfigured = function() {\n    return this.plan !== this._defaultPlan;\n  };\n\n  return SpyStrategy;\n};\n\ngetJasmineRequireObj().StackTrace = function(j$) {\n  function StackTrace(error) {\n    var lines = error.stack\n      .split('\\n')\n      .filter(function(line) { return line !== ''; });\n\n    var extractResult = extractMessage(error.message, lines);\n\n    if (extractResult) {\n      this.message = extractResult.message;\n      lines = extractResult.remainder;\n    }\n\n    var parseResult = tryParseFrames(lines);\n    this.frames = parseResult.frames;\n    this.style = parseResult.style;\n  }\n\n  var framePatterns = [\n    // PhantomJS on Linux, Node, Chrome, IE, Edge\n    // e.g. \"   at QueueRunner.run (http://localhost:8888/__jasmine__/jasmine.js:4320:20)\"\n    // Note that the \"function name\" can include a surprisingly large set of\n    // characters, including angle brackets and square brackets.\n    { re: /^\\s*at ([^\\)]+) \\(([^\\)]+)\\)$/, fnIx: 1, fileLineColIx: 2, style: 'v8' },\n\n    // NodeJS alternate form, often mixed in with the Chrome style\n    // e.g. \"  at /some/path:4320:20\n    { re: /\\s*at (.+)$/, fileLineColIx: 1, style: 'v8' },\n\n    // PhantomJS on OS X, Safari, Firefox\n    // e.g. \"run@http://localhost:8888/__jasmine__/jasmine.js:4320:27\"\n    // or \"http://localhost:8888/__jasmine__/jasmine.js:4320:27\"\n    { re: /^(([^@\\s]+)@)?([^\\s]+)$/, fnIx: 2, fileLineColIx: 3, style: 'webkit' }\n  ];\n\n  // regexes should capture the function name (if any) as group 1\n  // and the file, line, and column as group 2.\n  function tryParseFrames(lines) {\n    var style = null;\n    var frames = lines.map(function(line) {\n      var convertedLine = first(framePatterns, function(pattern) {\n        var overallMatch = line.match(pattern.re),\n          fileLineColMatch;\n        if (!overallMatch) { return null; }\n\n        fileLineColMatch = overallMatch[pattern.fileLineColIx].match(\n          /^(.*):(\\d+):\\d+$/);\n        if (!fileLineColMatch) { return null; }\n\n        style = style || pattern.style;\n        return {\n          raw: line,\n          file: fileLineColMatch[1],\n          line: parseInt(fileLineColMatch[2], 10),\n          func: overallMatch[pattern.fnIx]\n        };\n      });\n\n      return convertedLine || { raw: line };\n    });\n\n    return {\n      style: style,\n      frames: frames\n    };\n  }\n\n  function first(items, fn) {\n    var i, result;\n\n    for (i = 0; i < items.length; i++) {\n      result = fn(items[i]);\n\n      if (result) {\n        return result;\n      }\n    }\n  }\n\n  function extractMessage(message, stackLines) {\n    var len = messagePrefixLength(message, stackLines);\n\n    if (len > 0) {\n      return {\n        message: stackLines.slice(0, len).join('\\n'),\n        remainder: stackLines.slice(len)\n      };\n    }\n  }\n\n  function messagePrefixLength(message, stackLines) {\n    if (!stackLines[0].match(/^Error/)) {\n      return 0;\n    }\n\n    var messageLines = message.split('\\n');\n    var i;\n\n    for (i = 1; i < messageLines.length; i++) {\n      if (messageLines[i] !== stackLines[i]) {\n        return 0;\n      }\n    }\n\n    return messageLines.length;\n  }\n\n  return StackTrace;\n};\n\ngetJasmineRequireObj().Suite = function(j$) {\n  function Suite(attrs) {\n    this.env = attrs.env;\n    this.id = attrs.id;\n    this.parentSuite = attrs.parentSuite;\n    this.description = attrs.description;\n    this.expectationFactory = attrs.expectationFactory;\n    this.asyncExpectationFactory = attrs.asyncExpectationFactory;\n    this.expectationResultFactory = attrs.expectationResultFactory;\n    this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;\n\n    this.beforeFns = [];\n    this.afterFns = [];\n    this.beforeAllFns = [];\n    this.afterAllFns = [];\n\n    this.timer = attrs.timer || j$.noopTimer;\n\n    this.children = [];\n\n    /**\n     * @typedef SuiteResult\n     * @property {Int} id - The unique id of this suite.\n     * @property {String} description - The description text passed to the {@link describe} that made this suite.\n     * @property {String} fullName - The full description including all ancestors of this suite.\n     * @property {Expectation[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite.\n     * @property {Expectation[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite.\n     * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.\n     * @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach.\n     */\n    this.result = {\n      id: this.id,\n      description: this.description,\n      fullName: this.getFullName(),\n      failedExpectations: [],\n      deprecationWarnings: [],\n      duration: null,\n    };\n  }\n\n  Suite.prototype.expect = function(actual) {\n    return this.expectationFactory(actual, this);\n  };\n\n  Suite.prototype.expectAsync = function(actual) {\n    return this.asyncExpectationFactory(actual, this);\n  };\n\n  Suite.prototype.getFullName = function() {\n    var fullName = [];\n    for (var parentSuite = this; parentSuite; parentSuite = parentSuite.parentSuite) {\n      if (parentSuite.parentSuite) {\n        fullName.unshift(parentSuite.description);\n      }\n    }\n    return fullName.join(' ');\n  };\n\n  Suite.prototype.pend = function() {\n    this.markedPending = true;\n  };\n\n  Suite.prototype.beforeEach = function(fn) {\n    this.beforeFns.unshift(fn);\n  };\n\n  Suite.prototype.beforeAll = function(fn) {\n    this.beforeAllFns.push(fn);\n  };\n\n  Suite.prototype.afterEach = function(fn) {\n    this.afterFns.unshift(fn);\n  };\n\n  Suite.prototype.afterAll = function(fn) {\n    this.afterAllFns.unshift(fn);\n  };\n\n  Suite.prototype.startTimer = function() {\n    this.timer.start();\n  };\n\n  Suite.prototype.endTimer = function() {\n    this.result.duration = this.timer.elapsed();\n  };\n\n  function removeFns(queueableFns) {\n    for(var i = 0; i < queueableFns.length; i++) {\n      queueableFns[i].fn = null;\n    }\n  }\n\n  Suite.prototype.cleanupBeforeAfter = function() {\n    removeFns(this.beforeAllFns);\n    removeFns(this.afterAllFns);\n    removeFns(this.beforeFns);\n    removeFns(this.afterFns);\n  };\n\n  Suite.prototype.addChild = function(child) {\n    this.children.push(child);\n  };\n\n  Suite.prototype.status = function() {\n    if (this.markedPending) {\n      return 'pending';\n    }\n\n    if (this.result.failedExpectations.length > 0) {\n      return 'failed';\n    } else {\n      return 'passed';\n    }\n  };\n\n  Suite.prototype.canBeReentered = function() {\n    return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0;\n  };\n\n  Suite.prototype.getResult = function() {\n    this.result.status = this.status();\n    return this.result;\n  };\n\n  Suite.prototype.sharedUserContext = function() {\n    if (!this.sharedContext) {\n      this.sharedContext = this.parentSuite ? this.parentSuite.clonedSharedUserContext() : new j$.UserContext();\n    }\n\n    return this.sharedContext;\n  };\n\n  Suite.prototype.clonedSharedUserContext = function() {\n    return j$.UserContext.fromExisting(this.sharedUserContext());\n  };\n\n  Suite.prototype.onException = function() {\n    if (arguments[0] instanceof j$.errors.ExpectationFailed) {\n      return;\n    }\n\n    var data = {\n      matcherName: '',\n      passed: false,\n      expected: '',\n      actual: '',\n      error: arguments[0]\n    };\n    var failedExpectation = this.expectationResultFactory(data);\n\n    if (!this.parentSuite) {\n      failedExpectation.globalErrorType = 'afterAll';\n    }\n\n    this.result.failedExpectations.push(failedExpectation);\n  };\n\n  Suite.prototype.addExpectationResult = function () {\n    if(isFailure(arguments)) {\n      var data = arguments[1];\n      this.result.failedExpectations.push(this.expectationResultFactory(data));\n      if(this.throwOnExpectationFailure) {\n        throw new j$.errors.ExpectationFailed();\n      }\n    }\n  };\n\n  Suite.prototype.addDeprecationWarning = function(deprecation) {\n    if (typeof deprecation === 'string') {\n      deprecation = { message: deprecation };\n    }\n    this.result.deprecationWarnings.push(this.expectationResultFactory(deprecation));\n  };\n\n  function isFailure(args) {\n    return !args[0];\n  }\n\n  return Suite;\n};\n\nif (typeof window == void 0 && typeof exports == 'object') {\n  /* globals exports */\n  exports.Suite = jasmineRequire.Suite;\n}\n\ngetJasmineRequireObj().Timer = function() {\n  var defaultNow = (function(Date) {\n    return function() { return new Date().getTime(); };\n  })(Date);\n\n  function Timer(options) {\n    options = options || {};\n\n    var now = options.now || defaultNow,\n      startTime;\n\n    this.start = function() {\n      startTime = now();\n    };\n\n    this.elapsed = function() {\n      return now() - startTime;\n    };\n  }\n\n  return Timer;\n};\n\ngetJasmineRequireObj().noopTimer = function() {\n  return {\n    start: function() {},\n    elapsed: function() { return 0; }\n  };\n};\ngetJasmineRequireObj().TreeProcessor = function() {\n  function TreeProcessor(attrs) {\n    var tree = attrs.tree,\n        runnableIds = attrs.runnableIds,\n        queueRunnerFactory = attrs.queueRunnerFactory,\n        nodeStart = attrs.nodeStart || function() {},\n        nodeComplete = attrs.nodeComplete || function() {},\n        orderChildren = attrs.orderChildren || function(node) { return node.children; },\n        excludeNode = attrs.excludeNode || function(node) { return false; },\n        stats = { valid: true },\n        processed = false,\n        defaultMin = Infinity,\n        defaultMax = 1 - Infinity;\n\n    this.processTree = function() {\n      processNode(tree, true);\n      processed = true;\n      return stats;\n    };\n\n    this.execute = function(done) {\n      if (!processed) {\n        this.processTree();\n      }\n\n      if (!stats.valid) {\n        throw 'invalid order';\n      }\n\n      var childFns = wrapChildren(tree, 0);\n\n      queueRunnerFactory({\n        queueableFns: childFns,\n        userContext: tree.sharedUserContext(),\n        onException: function() {\n          tree.onException.apply(tree, arguments);\n        },\n        onComplete: done\n      });\n    };\n\n    function runnableIndex(id) {\n      for (var i = 0; i < runnableIds.length; i++) {\n        if (runnableIds[i] === id) {\n          return i;\n        }\n      }\n    }\n\n    function processNode(node, parentExcluded) {\n      var executableIndex = runnableIndex(node.id);\n\n      if (executableIndex !== undefined) {\n        parentExcluded = false;\n      }\n\n      if (!node.children) {\n        var excluded = parentExcluded || excludeNode(node);\n        stats[node.id] = {\n          excluded: excluded,\n          willExecute: !excluded && !node.markedPending,\n          segments: [{\n            index: 0,\n            owner: node,\n            nodes: [node],\n            min: startingMin(executableIndex),\n            max: startingMax(executableIndex)\n          }]\n        };\n      } else {\n        var hasExecutableChild = false;\n\n        var orderedChildren = orderChildren(node);\n\n        for (var i = 0; i < orderedChildren.length; i++) {\n          var child = orderedChildren[i];\n\n          processNode(child, parentExcluded);\n\n          if (!stats.valid) {\n            return;\n          }\n\n          var childStats = stats[child.id];\n\n          hasExecutableChild = hasExecutableChild || childStats.willExecute;\n        }\n\n        stats[node.id] = {\n          excluded: parentExcluded,\n          willExecute: hasExecutableChild\n        };\n\n        segmentChildren(node, orderedChildren, stats[node.id], executableIndex);\n\n        if (!node.canBeReentered() && stats[node.id].segments.length > 1) {\n          stats = { valid: false };\n        }\n      }\n    }\n\n    function startingMin(executableIndex) {\n      return executableIndex === undefined ? defaultMin : executableIndex;\n    }\n\n    function startingMax(executableIndex) {\n      return executableIndex === undefined ? defaultMax : executableIndex;\n    }\n\n    function segmentChildren(node, orderedChildren, nodeStats, executableIndex) {\n      var currentSegment = { index: 0, owner: node, nodes: [], min: startingMin(executableIndex), max: startingMax(executableIndex) },\n          result = [currentSegment],\n          lastMax = defaultMax,\n          orderedChildSegments = orderChildSegments(orderedChildren);\n\n      function isSegmentBoundary(minIndex) {\n        return lastMax !== defaultMax && minIndex !== defaultMin && lastMax < minIndex - 1;\n      }\n\n      for (var i = 0; i < orderedChildSegments.length; i++) {\n        var childSegment = orderedChildSegments[i],\n          maxIndex = childSegment.max,\n          minIndex = childSegment.min;\n\n        if (isSegmentBoundary(minIndex)) {\n          currentSegment = {index: result.length, owner: node, nodes: [], min: defaultMin, max: defaultMax};\n          result.push(currentSegment);\n        }\n\n        currentSegment.nodes.push(childSegment);\n        currentSegment.min = Math.min(currentSegment.min, minIndex);\n        currentSegment.max = Math.max(currentSegment.max, maxIndex);\n        lastMax = maxIndex;\n      }\n\n      nodeStats.segments = result;\n    }\n\n    function orderChildSegments(children) {\n      var specifiedOrder = [],\n          unspecifiedOrder = [];\n\n      for (var i = 0; i < children.length; i++) {\n        var child = children[i],\n            segments = stats[child.id].segments;\n\n        for (var j = 0; j < segments.length; j++) {\n          var seg = segments[j];\n\n          if (seg.min === defaultMin) {\n            unspecifiedOrder.push(seg);\n          } else {\n            specifiedOrder.push(seg);\n          }\n        }\n      }\n\n      specifiedOrder.sort(function(a, b) {\n        return a.min - b.min;\n      });\n\n      return specifiedOrder.concat(unspecifiedOrder);\n    }\n\n    function executeNode(node, segmentNumber) {\n      if (node.children) {\n        return {\n          fn: function(done) {\n            var onStart = {\n              fn: function(next) {\n                nodeStart(node, next);\n              }\n            };\n\n            queueRunnerFactory({\n              onComplete: function () {\n                var args = Array.prototype.slice.call(arguments, [0]);\n                node.cleanupBeforeAfter();\n                nodeComplete(node, node.getResult(), function() {\n                  done.apply(undefined, args);\n                });\n              },\n              queueableFns: [onStart].concat(wrapChildren(node, segmentNumber)),\n              userContext: node.sharedUserContext(),\n              onException: function () {\n                node.onException.apply(node, arguments);\n              }\n            });\n          }\n        };\n      } else {\n        return {\n          fn: function(done) { node.execute(done, stats[node.id].excluded); }\n        };\n      }\n    }\n\n    function wrapChildren(node, segmentNumber) {\n      var result = [],\n          segmentChildren = stats[node.id].segments[segmentNumber].nodes;\n\n      for (var i = 0; i < segmentChildren.length; i++) {\n        result.push(executeNode(segmentChildren[i].owner, segmentChildren[i].index));\n      }\n\n      if (!stats[node.id].willExecute) {\n        return result;\n      }\n\n      return node.beforeAllFns.concat(result).concat(node.afterAllFns);\n    }\n  }\n\n  return TreeProcessor;\n};\n\ngetJasmineRequireObj().UserContext = function(j$) {\n  function UserContext() {\n  }\n\n  UserContext.fromExisting = function(oldContext) {\n    var context = new UserContext();\n\n    for (var prop in oldContext) {\n      if (oldContext.hasOwnProperty(prop)) {\n        context[prop] = oldContext[prop];\n      }\n    }\n\n    return context;\n  };\n\n  return  UserContext;\n};\n\ngetJasmineRequireObj().version = function() {\n  return '3.4.0';\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/json2.js":{"text":"/*\n    json2.js\n    2014-02-04\n\n    Public Domain.\n\n    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\n    See http://www.JSON.org/js.html\n\n\n    This code should be minified before deployment.\n    See http://javascript.crockford.com/jsmin.html\n\n    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n    NOT CONTROL.\n\n\n    This file creates a global JSON object containing two methods: stringify\n    and parse.\n\n        JSON.stringify(value, replacer, space)\n            value       any JavaScript value, usually an object or array.\n\n            replacer    an optional parameter that determines how object\n                        values are stringified for objects. It can be a\n                        function or an array of strings.\n\n            space       an optional parameter that specifies the indentation\n                        of nested structures. If it is omitted, the text will\n                        be packed without extra whitespace. If it is a number,\n                        it will specify the number of spaces to indent at each\n                        level. If it is a string (such as '\\t' or '&nbsp;'),\n                        it contains the characters used to indent at each level.\n\n            This method produces a JSON text from a JavaScript value.\n\n            When an object value is found, if the object contains a toJSON\n            method, its toJSON method will be called and the result will be\n            stringified. A toJSON method does not serialize: it returns the\n            value represented by the name/value pair that should be serialized,\n            or undefined if nothing should be serialized. The toJSON method\n            will be passed the key associated with the value, and this will be\n            bound to the value\n\n            For example, this would serialize Dates as ISO strings.\n\n                Date.prototype.toJSON = function (key) {\n                    function f(n) {\n                        // Format integers to have at least two digits.\n                        return n < 10 ? '0' + n : n;\n                    }\n\n                    return this.getUTCFullYear()   + '-' +\n                         f(this.getUTCMonth() + 1) + '-' +\n                         f(this.getUTCDate())      + 'T' +\n                         f(this.getUTCHours())     + ':' +\n                         f(this.getUTCMinutes())   + ':' +\n                         f(this.getUTCSeconds())   + 'Z';\n                };\n\n            You can provide an optional replacer method. It will be passed the\n            key and value of each member, with this bound to the containing\n            object. The value that is returned from your method will be\n            serialized. If your method returns undefined, then the member will\n            be excluded from the serialization.\n\n            If the replacer parameter is an array of strings, then it will be\n            used to select the members to be serialized. It filters the results\n            such that only members with keys listed in the replacer array are\n            stringified.\n\n            Values that do not have JSON representations, such as undefined or\n            functions, will not be serialized. Such values in objects will be\n            dropped; in arrays they will be replaced with null. You can use\n            a replacer function to replace those with JSON values.\n            JSON.stringify(undefined) returns undefined.\n\n            The optional space parameter produces a stringification of the\n            value that is filled with line breaks and indentation to make it\n            easier to read.\n\n            If the space parameter is a non-empty string, then that string will\n            be used for indentation. If the space parameter is a number, then\n            the indentation will be that many spaces.\n\n            Example:\n\n            text = JSON.stringify(['e', {pluribus: 'unum'}]);\n            // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n\n            text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\\t');\n            // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n            text = JSON.stringify([new Date()], function (key, value) {\n                return this[key] instanceof Date ?\n                    'Date(' + this[key] + ')' : value;\n            });\n            // text is '[\"Date(---current time---)\"]'\n\n\n        JSON.parse(text, reviver)\n            This method parses a JSON text to produce an object or array.\n            It can throw a SyntaxError exception.\n\n            The optional reviver parameter is a function that can filter and\n            transform the results. It receives each of the keys and values,\n            and its return value is used instead of the original value.\n            If it returns what it received, then the structure is not modified.\n            If it returns undefined then the member is deleted.\n\n            Example:\n\n            // Parse the text. Values that look like ISO date strings will\n            // be converted to Date objects.\n\n            myData = JSON.parse(text, function (key, value) {\n                var a;\n                if (typeof value === 'string') {\n                    a =\n/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n                    if (a) {\n                        return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n                            +a[5], +a[6]));\n                    }\n                }\n                return value;\n            });\n\n            myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n                var d;\n                if (typeof value === 'string' &&\n                        value.slice(0, 5) === 'Date(' &&\n                        value.slice(-1) === ')') {\n                    d = new Date(value.slice(5, -1));\n                    if (d) {\n                        return d;\n                    }\n                }\n                return value;\n            });\n\n\n    This is a reference implementation. You are free to copy, modify, or\n    redistribute.\n*/\n\n/*jslint evil: true, regexp: true */\n\n/*members \"\", \"\\b\", \"\\t\", \"\\n\", \"\\f\", \"\\r\", \"\\\"\", JSON, \"\\\\\", apply,\n    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n    lastIndex, length, parse, prototype, push, replace, slice, stringify,\n    test, toJSON, toString, valueOf\n*/\n\n\n// Create a JSON object only if one does not already exist. We create the\n// methods in a closure to avoid creating global variables.\n\nif (typeof JSON !== 'object') {\n    JSON = {};\n}\n\n(function () {\n    'use strict';\n\n    function f(n) {\n        // Format integers to have at least two digits.\n        return n < 10 ? '0' + n : n;\n    }\n\n    if (typeof Date.prototype.toJSON !== 'function') {\n\n        Date.prototype.toJSON = function () {\n\n            return isFinite(this.valueOf())\n                ? this.getUTCFullYear()     + '-' +\n                    f(this.getUTCMonth() + 1) + '-' +\n                    f(this.getUTCDate())      + 'T' +\n                    f(this.getUTCHours())     + ':' +\n                    f(this.getUTCMinutes())   + ':' +\n                    f(this.getUTCSeconds())   + 'Z'\n                : null;\n        };\n\n        String.prototype.toJSON      =\n            Number.prototype.toJSON  =\n            Boolean.prototype.toJSON = function () {\n                return this.valueOf();\n            };\n    }\n\n    var cx,\n        escapable,\n        gap,\n        indent,\n        meta,\n        rep;\n\n\n    function quote(string) {\n\n// If the string contains no control characters, no quote characters, and no\n// backslash characters, then we can safely slap some quotes around it.\n// Otherwise we must also replace the offending characters with safe escape\n// sequences.\n\n        escapable.lastIndex = 0;\n        return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n            var c = meta[a];\n            return typeof c === 'string'\n                ? c\n                : '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n        }) + '\"' : '\"' + string + '\"';\n    }\n\n\n    function str(key, holder) {\n\n// Produce a string from holder[key].\n\n        var i,          // The loop counter.\n            k,          // The member key.\n            v,          // The member value.\n            length,\n            mind = gap,\n            partial,\n            value = holder[key];\n\n// If the value has a toJSON method, call it to obtain a replacement value.\n\n        if (value && typeof value === 'object' &&\n                typeof value.toJSON === 'function') {\n            value = value.toJSON(key);\n        }\n\n// If we were called with a replacer function, then call the replacer to\n// obtain a replacement value.\n\n        if (typeof rep === 'function') {\n            value = rep.call(holder, key, value);\n        }\n\n// What happens next depends on the value's type.\n\n        switch (typeof value) {\n        case 'string':\n            return quote(value);\n\n        case 'number':\n\n// JSON numbers must be finite. Encode non-finite numbers as null.\n\n            return isFinite(value) ? String(value) : 'null';\n\n        case 'boolean':\n        case 'null':\n\n// If the value is a boolean or null, convert it to a string. Note:\n// typeof null does not produce 'null'. The case is included here in\n// the remote chance that this gets fixed someday.\n\n            return String(value);\n\n// If the type is 'object', we might be dealing with an object or an array or\n// null.\n\n        case 'object':\n\n// Due to a specification blunder in ECMAScript, typeof null is 'object',\n// so watch out for that case.\n\n            if (!value) {\n                return 'null';\n            }\n\n// Make an array to hold the partial results of stringifying this object value.\n\n            gap += indent;\n            partial = [];\n\n// Is the value an array?\n\n            if (Object.prototype.toString.apply(value) === '[object Array]') {\n\n// The value is an array. Stringify every element. Use null as a placeholder\n// for non-JSON values.\n\n                length = value.length;\n                for (i = 0; i < length; i += 1) {\n                    partial[i] = str(i, value) || 'null';\n                }\n\n// Join all of the elements together, separated with commas, and wrap them in\n// brackets.\n\n                v = partial.length === 0\n                    ? '[]'\n                    : gap\n                    ? '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']'\n                    : '[' + partial.join(',') + ']';\n                gap = mind;\n                return v;\n            }\n\n// If the replacer is an array, use it to select the members to be stringified.\n\n            if (rep && typeof rep === 'object') {\n                length = rep.length;\n                for (i = 0; i < length; i += 1) {\n                    if (typeof rep[i] === 'string') {\n                        k = rep[i];\n                        v = str(k, value);\n                        if (v) {\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\n                        }\n                    }\n                }\n            } else {\n\n// Otherwise, iterate through all of the keys in the object.\n\n                for (k in value) {\n                    if (Object.prototype.hasOwnProperty.call(value, k)) {\n                        v = str(k, value);\n                        if (v) {\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\n                        }\n                    }\n                }\n            }\n\n// Join all of the member texts together, separated with commas,\n// and wrap them in braces.\n\n            v = partial.length === 0\n                ? '{}'\n                : gap\n                ? '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}'\n                : '{' + partial.join(',') + '}';\n            gap = mind;\n            return v;\n        }\n    }\n\n// If the JSON object does not yet have a stringify method, give it one.\n\n    if (typeof JSON.stringify !== 'function') {\n        escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n        meta = {    // table of character substitutions\n            '\\b': '\\\\b',\n            '\\t': '\\\\t',\n            '\\n': '\\\\n',\n            '\\f': '\\\\f',\n            '\\r': '\\\\r',\n            '\"' : '\\\\\"',\n            '\\\\': '\\\\\\\\'\n        };\n        JSON.stringify = function (value, replacer, space) {\n\n// The stringify method takes a value and an optional replacer, and an optional\n// space parameter, and returns a JSON text. The replacer can be a function\n// that can replace values, or an array of strings that will select the keys.\n// A default replacer method can be provided. Use of the space parameter can\n// produce text that is more easily readable.\n\n            var i;\n            gap = '';\n            indent = '';\n\n// If the space parameter is a number, make an indent string containing that\n// many spaces.\n\n            if (typeof space === 'number') {\n                for (i = 0; i < space; i += 1) {\n                    indent += ' ';\n                }\n\n// If the space parameter is a string, it will be used as the indent string.\n\n            } else if (typeof space === 'string') {\n                indent = space;\n            }\n\n// If there is a replacer, it must be a function or an array.\n// Otherwise, throw an error.\n\n            rep = replacer;\n            if (replacer && typeof replacer !== 'function' &&\n                    (typeof replacer !== 'object' ||\n                    typeof replacer.length !== 'number')) {\n                throw new Error('JSON.stringify');\n            }\n\n// Make a fake root object containing our value under the key of ''.\n// Return the result of stringifying the value.\n\n            return str('', {'': value});\n        };\n    }\n\n\n// If the JSON object does not yet have a parse method, give it one.\n\n    if (typeof JSON.parse !== 'function') {\n        cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n        JSON.parse = function (text, reviver) {\n\n// The parse method takes a text and an optional reviver function, and returns\n// a JavaScript value if the text is a valid JSON text.\n\n            var j;\n\n            function walk(holder, key) {\n\n// The walk method is used to recursively walk the resulting structure so\n// that modifications can be made.\n\n                var k, v, value = holder[key];\n                if (value && typeof value === 'object') {\n                    for (k in value) {\n                        if (Object.prototype.hasOwnProperty.call(value, k)) {\n                            v = walk(value, k);\n                            if (v !== undefined) {\n                                value[k] = v;\n                            } else {\n                                delete value[k];\n                            }\n                        }\n                    }\n                }\n                return reviver.call(holder, key, value);\n            }\n\n\n// Parsing happens in four stages. In the first stage, we replace certain\n// Unicode characters with escape sequences. JavaScript handles many characters\n// incorrectly, either silently deleting them, or treating them as line endings.\n\n            text = String(text);\n            cx.lastIndex = 0;\n            if (cx.test(text)) {\n                text = text.replace(cx, function (a) {\n                    return '\\\\u' +\n                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n                });\n            }\n\n// In the second stage, we run the text against regular expressions that look\n// for non-JSON patterns. We are especially concerned with '()' and 'new'\n// because they can cause invocation, and '=' because it can cause mutation.\n// But just to be safe, we want to reject all unexpected forms.\n\n// We split the second stage into 4 regexp operations in order to work around\n// crippling inefficiencies in IE's and Safari's regexp engines. First we\n// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we\n// replace all simple value tokens with ']' characters. Third, we delete all\n// open brackets that follow a colon or comma or that begin the text. Finally,\n// we look to see that the remaining characters are only whitespace or ']' or\n// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.\n\n            if (/^[\\],:{}\\s]*$/\n                    .test(text.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')\n                        .replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, ']')\n                        .replace(/(?:^|:|,)(?:\\s*\\[)+/g, ''))) {\n\n// In the third stage we use the eval function to compile the text into a\n// JavaScript structure. The '{' operator is subject to a syntactic ambiguity\n// in JavaScript: it can begin a block or an object literal. We wrap the text\n// in parens to eliminate the ambiguity.\n\n                j = eval('(' + text + ')');\n\n// In the optional fourth stage, we recursively walk the new structure, passing\n// each name/value pair to a reviver function for possible transformation.\n\n                return typeof reviver === 'function'\n                    ? walk({'': j}, '')\n                    : j;\n            }\n\n// If the text is not JSON parseable, then a SyntaxError is thrown.\n\n            throw new SyntaxError('JSON.parse');\n        };\n    }\n}());\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/json2.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/node_boot.js":{"text":"/*\nCopyright (c) 2008-2019 Pivotal Labs\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*/\nmodule.exports = function(jasmineRequire) {\n  var jasmine = jasmineRequire.core(jasmineRequire);\n\n  var env = jasmine.getEnv({suppressLoadErrors: true});\n\n  var jasmineInterface = jasmineRequire.interface(jasmine, env);\n\n  extend(global, jasmineInterface);\n\n  function extend(destination, source) {\n    for (var property in source) destination[property] = source[property];\n    return destination;\n  }\n\n  return jasmine;\n};\n","type":"application/javascript","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/node_boot.js","module-type":"library"},"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine.css":{"text":"@charset \"UTF-8\";\nbody { overflow-y: scroll; }\n\n.jasmine_html-reporter { background-color: #eee; padding: 5px; margin: -8px; font-size: 11px; font-family: Monaco, \"Lucida Console\", monospace; line-height: 14px; color: #333; }\n\n.jasmine_html-reporter a { text-decoration: none; }\n\n.jasmine_html-reporter a:hover { text-decoration: underline; }\n\n.jasmine_html-reporter p, .jasmine_html-reporter h1, .jasmine_html-reporter h2, .jasmine_html-reporter h3, .jasmine_html-reporter h4, .jasmine_html-reporter h5, .jasmine_html-reporter h6 { margin: 0; line-height: 14px; }\n\n.jasmine_html-reporter .jasmine-banner, .jasmine_html-reporter .jasmine-symbol-summary, .jasmine_html-reporter .jasmine-summary, .jasmine_html-reporter .jasmine-result-message, .jasmine_html-reporter .jasmine-spec .jasmine-description, .jasmine_html-reporter .jasmine-spec-detail .jasmine-description, .jasmine_html-reporter .jasmine-alert .jasmine-bar, .jasmine_html-reporter .jasmine-stack-trace { padding-left: 9px; padding-right: 9px; }\n\n.jasmine_html-reporter .jasmine-banner { position: relative; }\n\n.jasmine_html-reporter .jasmine-banner .jasmine-title { background: url(\"data:image/png;base64, \") no-repeat; background: url(\"data:image/svg+xml;base64, \") no-repeat, none; -moz-background-size: 100%; -o-background-size: 100%; -webkit-background-size: 100%; background-size: 100%; display: block; float: left; width: 90px; height: 25px; }\n\n.jasmine_html-reporter .jasmine-banner .jasmine-version { margin-left: 14px; position: relative; top: 6px; }\n\n.jasmine_html-reporter #jasmine_content { position: fixed; right: 100%; }\n\n.jasmine_html-reporter .jasmine-version { color: #aaa; }\n\n.jasmine_html-reporter .jasmine-banner { margin-top: 14px; }\n\n.jasmine_html-reporter .jasmine-duration { color: #fff; float: right; line-height: 28px; padding-right: 9px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary { overflow: hidden; margin: 14px 0; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li { display: inline-block; height: 10px; width: 14px; font-size: 16px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-passed { font-size: 14px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-passed:before { color: #007069; content: \"•\"; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-failed { line-height: 9px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-failed:before { color: #ca3a11; content: \"×\"; font-weight: bold; margin-left: -1px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-excluded { font-size: 14px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-excluded:before { color: #bababa; content: \"•\"; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-excluded-no-display { font-size: 14px; display: none; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-pending { line-height: 17px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-pending:before { color: #ba9d37; content: \"*\"; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-empty { font-size: 14px; }\n\n.jasmine_html-reporter .jasmine-symbol-summary li.jasmine-empty:before { color: #ba9d37; content: \"•\"; }\n\n.jasmine_html-reporter .jasmine-run-options { float: right; margin-right: 5px; border: 1px solid #8a4182; color: #8a4182; position: relative; line-height: 20px; }\n\n.jasmine_html-reporter .jasmine-run-options .jasmine-trigger { cursor: pointer; padding: 8px 16px; }\n\n.jasmine_html-reporter .jasmine-run-options .jasmine-payload { position: absolute; display: none; right: -1px; border: 1px solid #8a4182; background-color: #eee; white-space: nowrap; padding: 4px 8px; }\n\n.jasmine_html-reporter .jasmine-run-options .jasmine-payload.jasmine-open { display: block; }\n\n.jasmine_html-reporter .jasmine-bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-failed, .jasmine_html-reporter .jasmine-bar.jasmine-errored { background-color: #ca3a11; border-bottom: 1px solid #eee; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-passed { background-color: #007069; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-incomplete { background-color: #bababa; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-skipped { background-color: #bababa; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-warning { background-color: #ba9d37; color: #333; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-menu { background-color: #fff; color: #aaa; }\n\n.jasmine_html-reporter .jasmine-bar.jasmine-menu a { color: #333; }\n\n.jasmine_html-reporter .jasmine-bar a { color: white; }\n\n.jasmine_html-reporter.jasmine-spec-list .jasmine-bar.jasmine-menu.jasmine-failure-list, .jasmine_html-reporter.jasmine-spec-list .jasmine-results .jasmine-failures { display: none; }\n\n.jasmine_html-reporter.jasmine-failure-list .jasmine-bar.jasmine-menu.jasmine-spec-list, .jasmine_html-reporter.jasmine-failure-list .jasmine-summary { display: none; }\n\n.jasmine_html-reporter .jasmine-results { margin-top: 14px; }\n\n.jasmine_html-reporter .jasmine-summary { margin-top: 14px; }\n\n.jasmine_html-reporter .jasmine-summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; }\n\n.jasmine_html-reporter .jasmine-summary ul.jasmine-suite { margin-top: 7px; margin-bottom: 7px; }\n\n.jasmine_html-reporter .jasmine-summary li.jasmine-passed a { color: #007069; }\n\n.jasmine_html-reporter .jasmine-summary li.jasmine-failed a { color: #ca3a11; }\n\n.jasmine_html-reporter .jasmine-summary li.jasmine-empty a { color: #ba9d37; }\n\n.jasmine_html-reporter .jasmine-summary li.jasmine-pending a { color: #ba9d37; }\n\n.jasmine_html-reporter .jasmine-summary li.jasmine-excluded a { color: #bababa; }\n\n.jasmine_html-reporter .jasmine-specs li.jasmine-passed a:before { content: \"• \"; }\n\n.jasmine_html-reporter .jasmine-specs li.jasmine-failed a:before { content: \"× \"; }\n\n.jasmine_html-reporter .jasmine-specs li.jasmine-empty a:before { content: \"* \"; }\n\n.jasmine_html-reporter .jasmine-specs li.jasmine-pending a:before { content: \"• \"; }\n\n.jasmine_html-reporter .jasmine-specs li.jasmine-excluded a:before { content: \"• \"; }\n\n.jasmine_html-reporter .jasmine-description + .jasmine-suite { margin-top: 0; }\n\n.jasmine_html-reporter .jasmine-suite { margin-top: 14px; }\n\n.jasmine_html-reporter .jasmine-suite a { color: #333; }\n\n.jasmine_html-reporter .jasmine-failures .jasmine-spec-detail { margin-bottom: 28px; }\n\n.jasmine_html-reporter .jasmine-failures .jasmine-spec-detail .jasmine-description { background-color: #ca3a11; color: white; }\n\n.jasmine_html-reporter .jasmine-failures .jasmine-spec-detail .jasmine-description a { color: white; }\n\n.jasmine_html-reporter .jasmine-result-message { padding-top: 14px; color: #333; white-space: pre-wrap; }\n\n.jasmine_html-reporter .jasmine-result-message span.jasmine-result { display: block; }\n\n.jasmine_html-reporter .jasmine-stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666; border: 1px solid #ddd; background: white; white-space: pre; }\n","type":"text/css","title":"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine.css","tags":"[[$:/tags/Stylesheet]]"},"$:/plugins/tiddlywiki/jasmine/jasmine-plugin.js":{"title":"$:/plugins/tiddlywiki/jasmine/jasmine-plugin.js","text":"/*\\\ntitle: $:/plugins/tiddlywiki/jasmine/jasmine-plugin.js\ntype: application/javascript\nmodule-type: startup\n\nThe main module of the Jasmine test plugin for TiddlyWiki5\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: true */\n\"use strict\";\n\nvar TEST_TIDDLER_FILTER = \"[type[application/javascript]tag[$:/tags/test-spec]]\";\n\nexports.name = \"jasmine\";\n// Ensure this startup module is executed in the right order.\n// In Node.js, Jasmine calls `process.exit()` with a non-zero exit code if there's\n// any failed tests. Because of that, we want to make sure all critical\n// startup modules are run before this one.\n// * The \"commands\" module handles the --rendertiddler command-line flag,\n//   which is typically given in order to export an HTML file that can be opened with\n//   a browser to run tests.\nexports.after = $tw.node ? [\"commands\"] : [];\n\n/*\nStartup function for running tests\n\nBelow, paths like jasmine-core/jasmine.js refer to files in the 'jasmine-core' npm\npackage, whose repository is https://github.com/jasmine/jasmine.\nPaths like jasmine/jasmine.js refer to files in the 'jasmine' npm package, whose\nrepository is https://github.com/jasmine/jasmine-npm.\n\nThey're all locally checked into the `./files` directory.\n*/\nexports.startup = function() {\n\t// Set up a shared context object.\n\tvar context = {\n\t\tconsole: console,\n\t\tsetInterval: setInterval,\n\t\tclearInterval: clearInterval,\n\t\tsetTimeout: setTimeout,\n\t\tclearTimeout: clearTimeout,\n\t\t$tw: $tw\n\t};\n\t// The `global` property is needed in two places:\n\t// 1. jasmine-core/node_boot.js: extends the global object with jasmine interface.\n\t// 2. jasmine-core/jasmine.js: when it's loaded, if it determines that it's\n\t//    running in a commonjs environment and `global` is undefined, it will set\n\t//    `jasmineGlobal`, its internal reference to the global object, to {},\n\t//    which is not what we want. Alternatively, the `jasmine.getEnv()` API allows\n\t//    you to pass in a `global` object, but the boot scripts we use don't allow\n\t//    the caller to customize the `.getEnv()` call. We'd rather use the boot scripts\n\t//    as-is than duplicating them in order to do minor tweaks.\n\t//\n\t// We need this `$tw.browser ?` conditional because:\n\t// 1. In a browser environment, 'jasmine-core/jasmine.js' calls `setTimeout` like\n\t//    `setTimeout.apply(jasmineGlobal, ...)`; the browser throws an \"illegal invocation\"\n\t//    unless `jasmineGlobal` is the right context object, which is `window`.\n\t// 2. In Node.js, there is no `window` object.\n\t//    Further more, we don't have access to the `global` object when this code\n\t//    is executed, so we use the `context` object instead.\n\tcontext.global = $tw.browser ? window : context;\n\n\tfunction evalInContext(title) {\n\t\tvar code = $tw.wiki.getTiddlerText(title,\"\");\n\t\tvar _exports = {};\n\t\tcontext.exports = _exports;\n\t\tcontext.module = {exports: _exports};\n\t\tcontext.require = function(moduleTitle) {\n\t\t\t// mock out the 'glob' module required in\n\t\t\t// \"$:/plugins/tiddlywiki/jasmine/jasmine/jasmine.js\"\n\t\t\tif (moduleTitle === \"glob\") {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\treturn $tw.modules.execute(moduleTitle,title);\n\t\t};\n\t\tvar contextExports = $tw.utils.evalSandboxed(code,context,title);\n\t\t// jasmine/jasmine.js assigns directly to `module.exports`: check\n\t\t// for it first.\n\t\treturn context.module.exports || contextExports;\n\t}\n\n\t// Get the core Jasmine exports.\n\t// We load 'jasmine-core/jasmine.js' here in order to start with a module\n\t// that is shared between browser and Node.js environments. Browser-specific\n\t// and Node-specific modules are loaded next.\n\tvar jasmineCore = evalInContext(\"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine.js\");\n\t// The core Jasmine instance\n\tvar jasmine;\n\t// Node.js wrapper for calling `.execute()`\n\tvar nodeJasmineWrapper;\n\tif($tw.browser) {\n\t\twindow.jasmineRequire = jasmineCore;\n\t\t$tw.modules.execute(\"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js\");\n\t\t$tw.modules.execute(\"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js\");\n\t\tjasmine = window.jasmine;\n\t} else {\n\t\t// Add missing properties to `jasmineCore` in order to call the Jasmine\n\t\t// constructor in Node.js.\n\t\t//\n\t\t// The constructor loads the `jasmineCore` object automatically, if\n\t\t// not explicitly specified, by calling `require('jasmine-core')`.\n\t\t// What happens internally next is...\n\t\t//\n\t\t//   1. require('jasmine-core')\n\t\t//      a. loads the package's main script, 'jasmine-core/jasmine-core.js'\n\t\t//         i. requires 'jasmine-core/jasmine.js'\n\t\t//         ii. reads some extra files and returns a `jasmineCore` object\n\t\t//\n\t\t// Because we're in TiddlyWiki land, we really don't need step 1.a.ii.\n\t\t//\n\t\t// Since the `jasmineCore` variable already holds the result of 1.a.i,\n\t\t// we'll add a few properties necessary for calling the Jasmine constructor\n\t\t// and pass it in explicitly. The consructor function can be seen here:\n\t\t// https://github.com/jasmine/jasmine-npm/blob/v3.4.0/lib/jasmine.js#L10\n\n\t\t// 'jasmine/jasmine.js' requires the `.boot()` function\n\t\tjasmineCore.boot = evalInContext(\"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/node_boot.js\");\n\t\t// 'jasmine/jasmine.js' references `.files.path`\n\t\tjasmineCore.files = {\n\t\t\tpath: \"$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core\"\n\t\t};\n\t\t// 'jasmine/jasmine.js' references `process.exit`, among other properties\n\t\tcontext.process = process;\n\n\t\tvar NodeJasmine = evalInContext(\"$:/plugins/tiddlywiki/jasmine/jasmine/jasmine.js\");\n\t\tnodeJasmineWrapper = new NodeJasmine({jasmineCore: jasmineCore});\n\t\tjasmine = nodeJasmineWrapper.jasmine;\n\t}\n\t// Add Jasmine's DSL to our context\n\tvar env = jasmine.getEnv();\n\tvar jasmineInterface = jasmineCore.interface(jasmine,env)\n\tcontext = $tw.utils.extend({},jasmineInterface,context);\n\t// Iterate through all the test modules\n\tvar tests = $tw.wiki.filterTiddlers(TEST_TIDDLER_FILTER);\n\t$tw.utils.each(tests,function(title) {\n\t\tevalInContext(title);\n\t});\n\t// In a browser environment, jasmine-core/boot.js calls `execute()` for us.\n\t// In Node.js, we call it manually.\n\tif(!$tw.browser) {\n\t\tnodeJasmineWrapper.execute();\n\t}\n};\n\n})();\n","type":"application/javascript","module-type":"startup"},"$:/plugins/tiddlywiki/jasmine/readme":{"title":"$:/plugins/tiddlywiki/jasmine/readme","text":"This plugin provides a framework for running tests in the browser and under Node.js. It is based on [[Jasmine|https://jasmine.github.io/]] test framework.\n\n[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/jasmine]]\n"},"/mnt/c/Arlen/GitHub/TiddlyWiki5-production/TiddlyWiki5-Jermolene/plugins/tiddlywiki/jasmine/update-packages.sh":{"title":"/mnt/c/Arlen/GitHub/TiddlyWiki5-production/TiddlyWiki5-Jermolene/plugins/tiddlywiki/jasmine/update-packages.sh","text":"#!/bin/bash\n# Download jasmine packages from npm and unpack relevant files\n# into files/.\n\nset -exuo pipefail\n\nJASMINE_VERSION=3.4.0\nJASMINE_CORE_VERSION=3.4.0\n\nrm -rf files/jasmine\nmkdir -p files/jasmine\nif [ ! -f \"jasmine-$JASMINE_VERSION.tgz\" ]; then\n    npm pack jasmine@$JASMINE_VERSION\nfi\ntar xfzv jasmine-$JASMINE_VERSION.tgz \\\n    -C files/jasmine \\\n    --strip-components=1 \\\n    --wildcards \"*/lib/*.js\" \"*/*.LICENSE\" \\\n    --exclude \"example\"\n\nrm -rf files/jasmine-core\nmkdir -p files/jasmine-core\nif [ ! -f \"jasmine-core-$JASMINE_CORE_VERSION.tgz\" ]; then\n    npm pack jasmine-core@$JASMINE_CORE_VERSION\nfi\ntar xfzv jasmine-core-$JASMINE_CORE_VERSION.tgz \\\n    -C files/jasmine-core \\\n    --strip-components=1 \\\n    --wildcards \"*/lib/*.js\" \"*/lib/*.css\" \"*/*.LICENSE\" \\\n    --exclude \"example\"\n","type":".sh"}}}