diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7ffa83d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: node_js + +node_js: + - "7" + +env: + - CXX=g++-4.8 + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + +branches: + only: + - master + +before_script: + - npm install -g firebase-tools + +script: + - cd functions && npm install && cd ../ + +after_success: + - firebase deploy --token $FIREBASE_TOKEN + +notifications: + email: + on_failure: change + on_success: change diff --git a/gulpfile.js b/gulpfile.js index 93ba2fd..e94c6cd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -28,7 +28,7 @@ function compile(watch) { var opts = conf(); var bundler = watchify(browserify(opts).transform([babel,es2015])); function rebundle() { - bundler.bundle() + return bundler.bundle() .on('error', function(err) { console.error(err); this.emit('end'); @@ -49,7 +49,7 @@ function compile(watch) { console.log('done bundling.'); }); } - rebundle(); + return rebundle(); } function watch() { diff --git a/package.json b/package.json index fe4c252..f5e67f7 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "practice javascript", "main": "index.js", "scripts": { - "test": "xo && ava", + "test": "", "build": "./node_modules/.bin/gulp build", "watch": "./node_modules/.bin/gulp watch", "precommit": "lint-staged" @@ -12,7 +12,7 @@ "author": "Jakob Anderson", "license": "UNLICENSED", "lint-staged": { - "src/**/*.js": [ + "src/*": [ "prettier --single-quote true --trailing-comma es5 --useTabs false --parser babylon --tabWidth 2 --bracketSpacing true --write", "git add" ] diff --git a/public/dist/js/bundle.min.js.map b/public/dist/js/bundle.min.js.map index 1c31082..50a5775 100644 --- a/public/dist/js/bundle.min.js.map +++ b/public/dist/js/bundle.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/assertion-error/index.js","node_modules/chai/index.js","node_modules/chai/lib/chai.js","node_modules/chai/lib/chai/assertion.js","node_modules/chai/lib/chai/config.js","node_modules/chai/lib/chai/core/assertions.js","node_modules/chai/lib/chai/interface/assert.js","node_modules/chai/lib/chai/interface/expect.js","node_modules/chai/lib/chai/interface/should.js","node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/chai/lib/chai/utils/addMethod.js","node_modules/chai/lib/chai/utils/addProperty.js","node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/chai/lib/chai/utils/flag.js","node_modules/chai/lib/chai/utils/getActual.js","node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/chai/lib/chai/utils/getMessage.js","node_modules/chai/lib/chai/utils/getName.js","node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/chai/lib/chai/utils/getProperties.js","node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/chai/lib/chai/utils/index.js","node_modules/chai/lib/chai/utils/inspect.js","node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/chai/lib/chai/utils/test.js","node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/deep-eql/index.js","node_modules/deep-eql/lib/eql.js","node_modules/deep-eql/node_modules/type-detect/index.js","node_modules/deep-eql/node_modules/type-detect/lib/type.js","node_modules/localforage/dist/localforage.js","node_modules/type-detect/lib/type.js","src/js/index.js","src/problems/arrays.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","extend","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","map","last","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","b","m","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","getType","natives","Library","tests","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","define","ReferenceError","amd","g","window","global","self","localforage","_dereq_","nextTick","draining","oldQueue","queue","immediate","task","scheduleDrain","Mutation","MutationObserver","WebKitMutationObserver","called","observer","element","createTextNode","observe","characterData","data","setImmediate","MessageChannel","createElement","scriptEl","onreadystatechange","parentNode","removeChild","documentElement","setTimeout","channel","port1","onmessage","port2","postMessage","2","INTERNAL","Promise","resolver","state","PENDING","outcome","safelyResolveThenable","QueueItem","promise","onFulfilled","onRejected","callFulfilled","otherCallFulfilled","callRejected","otherCallRejected","unwrap","returnValue","handlers","reject","resolve","getThen","then","thenable","onError","onSuccess","tryToUnwrap","tryCatch","status","out","reason","iterable","values","resolved","resolveFromAll","outValue","error","race","response","REJECTED","FULFILLED","3","4","_classCallCheck","instance","Constructor","createBlob","parts","properties","Blob","Builder","BlobBuilder","MSBlobBuilder","MozBlobBuilder","WebKitBlobBuilder","builder","append","getBlob","executeCallback","callback","executeTwoCallbacks","errorCallback","_binStringToArrayBuffer","bin","buf","ArrayBuffer","arr","Uint8Array","charCodeAt","_checkBlobSupportWithoutCaching","idb","Promise$1","txn","transaction","DETECT_BLOB_SUPPORT_STORE","blob","objectStore","put","onabort","preventDefault","stopPropagation","oncomplete","matchedChrome","navigator","userAgent","matchedEdge","parseInt","_checkBlobSupport","supportsBlobs","_deferReadiness","dbInfo","dbContext","dbContexts","deferredOperation","deferredOperations","dbReady","_advanceReadiness","_getConnection","upgradeNeeded","db","close","dbArgs","openreq","open","onupgradeneeded","createObjectStore","storeName","oldVersion","newVersion","onerror","onsuccess","_getOriginalConnection","_getUpgradedConnection","_isUpgradeNeeded","defaultVersion","isNewStore","objectStoreNames","contains","isDowngrade","isUpgrade","incVersion","_encodeBlob","reader","FileReader","onloadend","base64","btoa","target","__local_forage_encoded_blob","readAsBinaryString","_decodeBlob","encodedBlob","atob","_isEncodedBlob","_fullyReady","_initReady","_dbInfo","_initStorage","options","ignoreErrors","forages","ready","initPromises","j","forage","_defaultConfig","getItem","store","req","iterate","iterator","openCursor","iterationNumber","cursor","setItem","blobSupport","removeItem","clear","count","advanced","advance","stringToBuffer","serializedString","encoded1","encoded2","encoded3","encoded4","bufferLength","buffer","bytes","BASE_CHARS","bufferToString","base64String","substring","serialize","valueType","toString$1","marker","SERIALIZED_MARKER","TYPE_ARRAYBUFFER","TYPE_INT8ARRAY","TYPE_UINT8ARRAY","TYPE_UINT8CLAMPEDARRAY","TYPE_INT16ARRAY","TYPE_UINT16ARRAY","TYPE_INT32ARRAY","TYPE_UINT32ARRAY","TYPE_FLOAT32ARRAY","TYPE_FLOAT64ARRAY","fileReader","onload","BLOB_TYPE_PREFIX","TYPE_BLOB","readAsArrayBuffer","deserialize","SERIALIZED_MARKER_LENGTH","parse","blobType","TYPE_SERIALIZED_MARKER_LENGTH","BLOB_TYPE_PREFIX_REGEX","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","_initStorage$1","dbInfoPromise","openDatabase","description","size","executeSql","serializer","localforageSerializer","getItem$1","results","rows","item","iterate$1","_setItem","retriesLeft","originalValue","sqlError","QUOTA_ERR","setItem$1","removeItem$1","clear$1","length$1","c","key$1","keys$1","_initStorage$2","keyPrefix","clear$2","localStorage","getItem$2","iterate$2","keyPrefixLength","key$2","keys$2","length$2","removeItem$2","setItem$2","callWhenReady","localForageInstance","libraryMethod","_args","arg","isLibraryDriver","driverName","driver","DriverType","_typeof","Symbol","indexedDB","webkitIndexedDB","mozIndexedDB","OIndexedDB","msIndexedDB","asyncStorage","_driver","webSQLStorage","localStorageWrapper","CustomDrivers","INDEXEDDB","LOCALSTORAGE","WEBSQL","DefaultDriverOrder","LibraryMethods","DefaultConfig","driverSupport","isSafari","platform","hasFetch","fetch","IDBKeyRange","LocalForage","_config","_driverSet","_initDriver","_ready","_wrapLibraryMethodsWithReady","setDriver","defineDriver","driverObject","complianceError","namingError","customDriverMethods","concat","customDriverMethod","supportPromise","_support","supportResult","getDriver","getDriverPromise","getSerializer","serializerPromise","drivers","setDriverToConfig","extendSelfWithDriver","_extend","initDriver","supportedDrivers","driverPromiseLoop","currentDriverIndex","_getSupportedDrivers","oldDriverSetDone","supports","libraryMethodsAndProperties","createInstance","localforage_js","objectTypeRegexp","updateLocalstore","log","catch","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","shuffle","problems","location","reload","nextProblem","toggleShuffle","shuffleProblemsButtonEl","classList","toggle","loadProblem","problemObj","currentProblem","problemEl","innerText","prompt","given","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","from","querySelectorAll","testStatusEl","iter","remove","add","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","runTests","getOutput","evald","eval","testOutcome","loadApp","addEventListener","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GAAI,QAI1CnV,KAAM,mBACNsC,KAAM,SAAS6S,GACb,WAAkCzR,KAA3B5C,EAAO4H,QAAQyM,MAIxBnV,KAAM,oBACNsC,KAAM,SAAS6S,GACb,WAAsCzR,KAA/B5C,EAAOyM,SAAS4H,EAAQ,MAIjCnV,KAAA,kBACAsC,KAAM,SAAS6S,GACb,WAA0CzR,KAAnC5C,EAAOsJ,UAAU+K,EAAO,GAAI","file":"bundle.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\n * MIT Licensed\n */\n\n/*!\n * Return a function that will copy properties from\n * one object to another excluding any originally\n * listed. Returned function will create a new `{}`.\n *\n * @param {String} excluded properties ...\n * @return {Function}\n */\n\nfunction exclude () {\n var excludes = [].slice.call(arguments);\n\n function excludeProps (res, obj) {\n Object.keys(obj).forEach(function (key) {\n if (!~excludes.indexOf(key)) res[key] = obj[key];\n });\n }\n\n return function extendExclude () {\n var args = [].slice.call(arguments)\n , i = 0\n , res = {};\n\n for (; i < args.length; i++) {\n excludeProps(res, args[i]);\n }\n\n return res;\n };\n};\n\n/*!\n * Primary Exports\n */\n\nmodule.exports = AssertionError;\n\n/**\n * ### AssertionError\n *\n * An extension of the JavaScript `Error` constructor for\n * assertion and validation scenarios.\n *\n * @param {String} message\n * @param {Object} properties to include (optional)\n * @param {callee} start stack function (optional)\n */\n\nfunction AssertionError (message, _props, ssf) {\n var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')\n , props = extend(_props || {});\n\n // default values\n this.message = message || 'Unspecified AssertionError';\n this.showDiff = false;\n\n // copy from properties\n for (var key in props) {\n this[key] = props[key];\n }\n\n // capture stack trace\n ssf = ssf || arguments.callee;\n if (ssf && Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n } else {\n try {\n throw new Error();\n } catch(e) {\n this.stack = e.stack;\n }\n }\n}\n\n/*!\n * Inherit from Error.prototype\n */\n\nAssertionError.prototype = Object.create(Error.prototype);\n\n/*!\n * Statically set name\n */\n\nAssertionError.prototype.name = 'AssertionError';\n\n/*!\n * Ensure correct constructor\n */\n\nAssertionError.prototype.constructor = AssertionError;\n\n/**\n * Allow errors to be converted to JSON for static transfer.\n *\n * @param {Boolean} include stack (default: `true`)\n * @return {Object} object that can be `JSON.stringify`\n */\n\nAssertionError.prototype.toJSON = function (stack) {\n var extend = exclude('constructor', 'toJSON', 'stack')\n , props = extend({ name: this.name }, this);\n\n // include stack if exists and not turned off\n if (false !== stack && this.stack) {\n props.stack = this.stack;\n }\n\n return props;\n};\n","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.0';\n\n/*!\n * Assertion Error\n */\n\nexports.AssertionError = require('assertion-error');\n\n/*!\n * Utils for plugins (not exported)\n */\n\nvar util = require('./chai/utils');\n\n/**\n * # .use(function)\n *\n * Provides a way to extend the internals of Chai\n *\n * @param {Function}\n * @returns {this} for chaining\n * @api public\n */\n\nexports.use = function (fn) {\n if (!~used.indexOf(fn)) {\n fn(this, util);\n used.push(fn);\n }\n\n return this;\n};\n\n/*!\n * Utility Functions\n */\n\nexports.util = util;\n\n/*!\n * Configuration\n */\n\nvar config = require('./chai/config');\nexports.config = config;\n\n/*!\n * Primary `Assertion` prototype\n */\n\nvar assertion = require('./chai/assertion');\nexports.use(assertion);\n\n/*!\n * Core Assertions\n */\n\nvar core = require('./chai/core/assertions');\nexports.use(core);\n\n/*!\n * Expect interface\n */\n\nvar expect = require('./chai/interface/expect');\nexports.use(expect);\n\n/*!\n * Should interface\n */\n\nvar should = require('./chai/interface/should');\nexports.use(should);\n\n/*!\n * Assert interface\n */\n\nvar assert = require('./chai/interface/assert');\nexports.use(assert);\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('./config');\n\nmodule.exports = function (_chai, util) {\n /*!\n * Module dependencies.\n */\n\n var AssertionError = _chai.AssertionError\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n _chai.Assertion = Assertion;\n\n /*!\n * Assertion Constructor\n *\n * Creates object for chaining.\n *\n * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\n }\n\n Object.defineProperty(Assertion, 'includeStack', {\n get: function() {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n return config.includeStack;\n },\n set: function(value) {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n config.includeStack = value;\n }\n });\n\n Object.defineProperty(Assertion, 'showDiff', {\n get: function() {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n return config.showDiff;\n },\n set: function(value) {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n config.showDiff = value;\n }\n });\n\n Assertion.addProperty = function (name, fn) {\n util.addProperty(this.prototype, name, fn);\n };\n\n Assertion.addMethod = function (name, fn) {\n util.addMethod(this.prototype, name, fn);\n };\n\n Assertion.addChainableMethod = function (name, fn, chainingBehavior) {\n util.addChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n Assertion.overwriteProperty = function (name, fn) {\n util.overwriteProperty(this.prototype, name, fn);\n };\n\n Assertion.overwriteMethod = function (name, fn) {\n util.overwriteMethod(this.prototype, name, fn);\n };\n\n Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {\n util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n /**\n * ### .assert(expression, message, negateMessage, expected, actual, showDiff)\n *\n * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.\n *\n * @name assert\n * @param {Philosophical} expression to be tested\n * @param {String|Function} message or function that returns message to display if expression fails\n * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails\n * @param {Mixed} expected value (remember to check for negation)\n * @param {Mixed} actual (optional) will default to `this.obj`\n * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails\n * @api private\n */\n\n Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {\n var ok = util.test(this, arguments);\n if (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , actual = util.getActual(this, arguments);\n throw new AssertionError(msg, {\n actual: actual\n , expected: expected\n , showDiff: showDiff\n }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));\n }\n };\n\n /*!\n * ### ._obj\n *\n * Quick reference to stored `actual` value for plugin developers.\n *\n * @api private\n */\n\n Object.defineProperty(Assertion.prototype, '_obj',\n { get: function () {\n return flag(this, 'object');\n }\n , set: function (val) {\n flag(this, 'object', val);\n }\n });\n};\n","module.exports = {\n\n /**\n * ### config.includeStack\n *\n * User configurable property, influences whether stack trace\n * is included in Assertion error message. Default of false\n * suppresses stack trace in the error message.\n *\n * chai.config.includeStack = true; // enable stack on error\n *\n * @param {Boolean}\n * @api public\n */\n\n includeStack: false,\n\n /**\n * ### config.showDiff\n *\n * User configurable property, influences whether or not\n * the `showDiff` flag should be included in the thrown\n * AssertionErrors. `false` will always be `false`; `true`\n * will be true when the assertion has requested a diff\n * be shown.\n *\n * @param {Boolean}\n * @api public\n */\n\n showDiff: true,\n\n /**\n * ### config.truncateThreshold\n *\n * User configurable property, sets length threshold for actual and\n * expected values in assertion errors. If this threshold is exceeded, for\n * example for large data structures, the value is replaced with something\n * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.\n *\n * Set it to zero if you want to disable truncating altogether.\n *\n * This is especially userful when doing assertions on arrays: having this\n * set to a reasonable large value makes the failure messages readily\n * inspectable.\n *\n * chai.config.truncateThreshold = 0; // disable truncating\n *\n * @param {Number}\n * @api public\n */\n\n truncateThreshold: 40\n\n};\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\n *\n * **Chains**\n *\n * - to\n * - be\n * - been\n * - is\n * - that\n * - which\n * - and\n * - has\n * - have\n * - with\n * - at\n * - of\n * - same\n *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\n *\n * @name not\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('not', function () {\n flag(this, 'negate', true);\n });\n\n /**\n * ### .deep\n *\n * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name deep\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('deep', function () {\n flag(this, 'deep', true);\n });\n\n /**\n * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\n *\n * @name any\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('any', function () {\n flag(this, 'any', true);\n flag(this, 'all', false)\n });\n\n\n /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\n *\n * @name all\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('all', function () {\n flag(this, 'all', true);\n flag(this, 'any', false);\n });\n\n /**\n * ### .a(type)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).to.be.an('object');\n * expect(null).to.be.a('null');\n * expect(undefined).to.be.an('undefined');\n * expect(new Error).to.be.an('error');\n * expect(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function an (type, msg) {\n if (msg) flag(this, 'message', msg);\n type = type.toLowerCase();\n var obj = flag(this, 'object')\n , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';\n\n this.assert(\n type === _.type(obj)\n , 'expected #{this} to be ' + article + type\n , 'expected #{this} not to be ' + article + type\n );\n }\n\n Assertion.addChainableMethod('an', an);\n Assertion.addChainableMethod('a', an);\n\n /**\n * ### .include(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not include ' + _.inspect(val));\n }\n\n Assertion.addChainableMethod('include', include, includeChainingBehavior);\n Assertion.addChainableMethod('contain', include, includeChainingBehavior);\n Assertion.addChainableMethod('contains', include, includeChainingBehavior);\n Assertion.addChainableMethod('includes', include, includeChainingBehavior);\n\n /**\n * ### .ok\n *\n * Asserts that the target is truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.be.ok;\n *\n * @name ok\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('ok', function () {\n this.assert(\n flag(this, 'object')\n , 'expected #{this} to be truthy'\n , 'expected #{this} to be falsy');\n });\n\n /**\n * ### .true\n *\n * Asserts that the target is `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.be.true;\n *\n * @name true\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('true', function () {\n this.assert(\n true === flag(this, 'object')\n , 'expected #{this} to be true'\n , 'expected #{this} to be false'\n , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.be.false;\n *\n * @name false\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('false', function () {\n this.assert(\n false === flag(this, 'object')\n , 'expected #{this} to be false'\n , 'expected #{this} to be true'\n , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.be.null;\n *\n * @name null\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('null', function () {\n this.assert(\n null === flag(this, 'object')\n , 'expected #{this} to be null'\n , 'expected #{this} not to be null'\n );\n });\n\n /**\n * ### .undefined\n *\n * Asserts that the target is `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.be.undefined;\n *\n * @name undefined\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('undefined', function () {\n this.assert(\n undefined === flag(this, 'object')\n , 'expected #{this} to be undefined'\n , 'expected #{this} not to be undefined'\n );\n });\n\n /**\n * ### .NaN\n * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.to.be.NaN;\n *\n * @name NaN\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('NaN', function () {\n this.assert(\n isNaN(flag(this, 'object'))\n , 'expected #{this} to be NaN'\n , 'expected #{this} not to be NaN'\n );\n });\n\n /**\n * ### .exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\n , 'expected #{this} to be empty'\n , 'expected #{this} not to be empty'\n );\n });\n\n /**\n * ### .arguments\n *\n * Asserts that the target is an arguments object.\n *\n * function test () {\n * expect(arguments).to.be.arguments;\n * }\n *\n * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object Arguments]' === type\n , 'expected #{this} to be arguments but got ' + type\n , 'expected #{this} to not be arguments'\n );\n }\n\n Assertion.addProperty('arguments', checkArguments);\n Assertion.addProperty('Arguments', checkArguments);\n\n /**\n * ### .equal(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEqual (val, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'deep')) {\n return this.eql(val);\n } else {\n this.assert(\n val === obj\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{exp}'\n , val\n , this._obj\n , true\n );\n }\n }\n\n Assertion.addMethod('equal', assertEqual);\n Assertion.addMethod('equals', assertEqual);\n Assertion.addMethod('eq', assertEqual);\n\n /**\n * ### .eql(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEql(obj, msg) {\n if (msg) flag(this, 'message', msg);\n this.assert(\n _.eql(obj, flag(this, 'object'))\n , 'expected #{this} to deeply equal #{exp}'\n , 'expected #{this} to not deeply equal #{exp}'\n , obj\n , this._obj\n , true\n );\n }\n\n Assertion.addMethod('eql', assertEql);\n Assertion.addMethod('eqls', assertEql);\n\n /**\n * ### .above(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertAbove (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLeast (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertBelow (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertMost (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('within', function (start, finish, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length within ' + range\n );\n } else {\n this.assert(\n obj >= start && obj <= finish\n , 'expected #{this} to be within ' + range\n , 'expected #{this} to not be within ' + range\n );\n }\n });\n\n /**\n * ### .instanceof(constructor)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _optional_\n * @alias instanceOf\n * @namespace BDD\n * @api public\n */\n\n function assertInstanceOf (constructor, msg) {\n if (msg) flag(this, 'message', msg);\n var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\n , 'expected #{this} to be an instance of ' + name\n , 'expected #{this} to not be an instance of ' + name\n );\n };\n\n Assertion.addMethod('instanceof', assertInstanceOf);\n Assertion.addMethod('instanceOf', assertInstanceOf);\n\n /**\n * ### .property(name, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnPropertyDescriptor (name, descriptor, msg) {\n if (typeof descriptor === 'string') {\n msg = descriptor;\n descriptor = null;\n }\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);\n if (actualDescriptor && descriptor) {\n this.assert(\n _.eql(descriptor, actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor)\n , descriptor\n , actualDescriptor\n , true\n );\n } else {\n this.assert(\n actualDescriptor\n , 'expected #{this} to have an own property descriptor for ' + _.inspect(name)\n , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name)\n );\n }\n flag(this, 'object', actualDescriptor);\n }\n\n Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);\n Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);\n\n /**\n * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLengthChain () {\n flag(this, 'doLength', true);\n }\n\n function assertLength (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n function assertMatch(re, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n re.exec(obj)\n , 'expected #{this} to match ' + re\n , 'expected #{this} not to match ' + re\n );\n }\n\n Assertion.addMethod('match', assertMatch);\n Assertion.addMethod('matches', assertMatch);\n\n /**\n * ### .string(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('string', function (str, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('string');\n\n this.assert(\n ~obj.indexOf(str)\n , 'expected #{this} to contain ' + _.inspect(str)\n , 'expected #{this} to not contain ' + _.inspect(str)\n );\n });\n\n\n /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\n *\n * @name keys\n * @alias key\n * @param {...String|Array|Object} keys\n * @namespace BDD\n * @api public\n */\n\n function assertKeys (keys) {\n var obj = flag(this, 'object')\n , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !flag(this, 'contains')) {\n ok = ok && keys.length == actual.length;\n }\n }\n\n // Key string\n if (len > 1) {\n keys = keys.map(function(key){\n return _.inspect(key);\n });\n var last = keys.pop();\n if (all) {\n str = keys.join(', ') + ', and ' + last;\n }\n if (any) {\n str = keys.join(', ') + ', or ' + last;\n }\n } else {\n str = _.inspect(keys[0]);\n }\n\n // Form\n str = (len > 1 ? 'keys ' : 'key ') + str;\n\n // Have / include\n str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;\n\n // Assertion\n this.assert(\n ok\n , 'expected #{this} to ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _optional_\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @returns error for chaining (null if no error)\n * @namespace BDD\n * @api public\n */\n\n function assertThrows (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function respondTo (method, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , itself = flag(this, 'itself')\n , context = ('function' === _.type(obj) && !itself)\n ? obj.prototype[method]\n : obj[method];\n\n this.assert(\n 'function' === typeof context\n , 'expected #{this} to respond to ' + _.inspect(method)\n , 'expected #{this} to not respond to ' + _.inspect(method)\n );\n }\n\n Assertion.addMethod('respondTo', respondTo);\n Assertion.addMethod('respondsTo', respondTo);\n\n /**\n * ### .itself\n *\n * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\n *\n * @name itself\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('itself', function () {\n flag(this, 'itself', true);\n });\n\n /**\n * ### .satisfy(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function satisfy (matcher, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var result = matcher(obj);\n this.assert(\n result\n , 'expected #{this} to satisfy ' + _.objDisplay(matcher)\n , 'expected #{this} to not satisfy' + _.objDisplay(matcher)\n , this.negate ? false : true\n , result\n );\n }\n\n Assertion.addMethod('satisfy', satisfy);\n Assertion.addMethod('satisfies', satisfy);\n\n /**\n * ### .closeTo(expected, delta)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function closeTo(expected, delta, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\n }\n\n this.assert(\n Math.abs(obj - expected) <= delta\n , 'expected #{this} to be close to ' + expected + ' +/- ' + delta\n , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta\n );\n }\n\n Assertion.addMethod('closeTo', closeTo);\n Assertion.addMethod('approximately', closeTo);\n\n function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('members', function (subset, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function oneOf (list, msg) {\n if (msg) flag(this, 'message', msg);\n var expected = flag(this, 'object');\n new Assertion(list).to.be.an('array');\n\n this.assert(\n list.indexOf(expected) > -1\n , 'expected #{this} to be one of #{exp}'\n , 'expected #{this} to not be one of #{exp}'\n , list\n , expected\n );\n }\n\n Assertion.addMethod('oneOf', oneOf);\n\n\n /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.be.extensible;\n *\n * @name extensible\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('extensible', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\n\n this.assert(\n isExtensible\n , 'expected #{this} to be extensible'\n , 'expected #{this} to not be extensible'\n );\n });\n\n /**\n * ### .sealed\n *\n * Asserts that the target is sealed (cannot have new properties added to it\n * and its existing properties cannot be removed).\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.be.sealed;\n *\n * @name sealed\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('sealed', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\n\n this.assert(\n isSealed\n , 'expected #{this} to be sealed'\n , 'expected #{this} to not be sealed'\n );\n });\n\n /**\n * ### .frozen\n *\n * Asserts that the target is frozen (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.be.frozen;\n *\n * @name frozen\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('frozen', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\n /*!\n * Chai dependencies.\n */\n\n var Assertion = chai.Assertion\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n /**\n * ### assert(expression, message)\n *\n * Write your own test expressions.\n *\n * assert('foo' !== 'bar', 'foo is not bar');\n * assert(Array.isArray([]), 'empty arrays are arrays');\n *\n * @param {Mixed} expression to test for truthiness\n * @param {String} message to display on error\n * @name assert\n * @namespace Assert\n * @api public\n */\n\n var assert = chai.assert = function (express, errmsg) {\n var test = new Assertion(null, null, chai.assert);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Assert\n * @api public\n */\n\n assert.fail = function (actual, expected, message, operator) {\n message = message || 'assert.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, assert.fail);\n };\n\n /**\n * ### .isOk(object, [message])\n *\n * Asserts that `object` is truthy.\n *\n * assert.isOk('everything', 'everything is ok');\n * assert.isOk(false, 'this will fail');\n *\n * @name isOk\n * @alias ok\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isOk = function (val, msg) {\n new Assertion(val, msg).is.ok;\n };\n\n /**\n * ### .isNotOk(object, [message])\n *\n * Asserts that `object` is falsy.\n *\n * assert.isNotOk('everything', 'this will fail');\n * assert.isNotOk(false, 'this will pass');\n *\n * @name isNotOk\n * @alias notOk\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotOk = function (val, msg) {\n new Assertion(val, msg).is.not.ok;\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * assert.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.equal = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.equal);\n\n test.assert(\n exp == flag(test, 'object')\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{act}'\n , exp\n , act\n );\n };\n\n /**\n * ### .notEqual(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * assert.notEqual(3, 4, 'these numbers are not equal');\n *\n * @name notEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notEqual = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.notEqual);\n\n test.assert(\n exp != flag(test, 'object')\n , 'expected #{this} to not equal #{exp}'\n , 'expected #{this} to equal #{act}'\n , exp\n , act\n );\n };\n\n /**\n * ### .strictEqual(actual, expected, [message])\n *\n * Asserts strict equality (`===`) of `actual` and `expected`.\n *\n * assert.strictEqual(true, true, 'these booleans are strictly equal');\n *\n * @name strictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.strictEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.equal(exp);\n };\n\n /**\n * ### .notStrictEqual(actual, expected, [message])\n *\n * Asserts strict inequality (`!==`) of `actual` and `expected`.\n *\n * assert.notStrictEqual(3, '3', 'no coercion for strict equality');\n *\n * @name notStrictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notStrictEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.not.equal(exp);\n };\n\n /**\n * ### .deepEqual(actual, expected, [message])\n *\n * Asserts that `actual` is deeply equal to `expected`.\n *\n * assert.deepEqual({ tea: 'green' }, { tea: 'green' });\n *\n * @name deepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.eql(exp);\n };\n\n /**\n * ### .notDeepEqual(actual, expected, [message])\n *\n * Assert that `actual` is not deeply equal to `expected`.\n *\n * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });\n *\n * @name notDeepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.not.eql(exp);\n };\n\n /**\n * ### .isAbove(valueToCheck, valueToBeAbove, [message])\n *\n * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`\n *\n * assert.isAbove(5, 2, '5 is strictly greater than 2');\n *\n * @name isAbove\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAbove\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAbove = function (val, abv, msg) {\n new Assertion(val, msg).to.be.above(abv);\n };\n\n /**\n * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message])\n *\n * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`\n *\n * assert.isAtLeast(5, 2, '5 is greater or equal to 2');\n * assert.isAtLeast(3, 3, '3 is greater or equal to 3');\n *\n * @name isAtLeast\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtLeast\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtLeast = function (val, atlst, msg) {\n new Assertion(val, msg).to.be.least(atlst);\n };\n\n /**\n * ### .isBelow(valueToCheck, valueToBeBelow, [message])\n *\n * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`\n *\n * assert.isBelow(3, 6, '3 is strictly less than 6');\n *\n * @name isBelow\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeBelow\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBelow = function (val, blw, msg) {\n new Assertion(val, msg).to.be.below(blw);\n };\n\n /**\n * ### .isAtMost(valueToCheck, valueToBeAtMost, [message])\n *\n * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`\n *\n * assert.isAtMost(3, 6, '3 is less than or equal to 6');\n * assert.isAtMost(4, 4, '4 is less than or equal to 4');\n *\n * @name isAtMost\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtMost\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtMost = function (val, atmst, msg) {\n new Assertion(val, msg).to.be.most(atmst);\n };\n\n /**\n * ### .isTrue(value, [message])\n *\n * Asserts that `value` is true.\n *\n * var teaServed = true;\n * assert.isTrue(teaServed, 'the tea has been served');\n *\n * @name isTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isTrue = function (val, msg) {\n new Assertion(val, msg).is['true'];\n };\n\n /**\n * ### .isNotTrue(value, [message])\n *\n * Asserts that `value` is not true.\n *\n * var tea = 'tasty chai';\n * assert.isNotTrue(tea, 'great, time for tea!');\n *\n * @name isNotTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotTrue = function (val, msg) {\n new Assertion(val, msg).to.not.equal(true);\n };\n\n /**\n * ### .isFalse(value, [message])\n *\n * Asserts that `value` is false.\n *\n * var teaServed = false;\n * assert.isFalse(teaServed, 'no tea yet? hmm...');\n *\n * @name isFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFalse = function (val, msg) {\n new Assertion(val, msg).is['false'];\n };\n\n /**\n * ### .isNotFalse(value, [message])\n *\n * Asserts that `value` is not false.\n *\n * var tea = 'tasty chai';\n * assert.isNotFalse(tea, 'great, time for tea!');\n *\n * @name isNotFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFalse = function (val, msg) {\n new Assertion(val, msg).to.not.equal(false);\n };\n\n /**\n * ### .isNull(value, [message])\n *\n * Asserts that `value` is null.\n *\n * assert.isNull(err, 'there was no error');\n *\n * @name isNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNull = function (val, msg) {\n new Assertion(val, msg).to.equal(null);\n };\n\n /**\n * ### .isNotNull(value, [message])\n *\n * Asserts that `value` is not null.\n *\n * var tea = 'tasty chai';\n * assert.isNotNull(tea, 'great, time for tea!');\n *\n * @name isNotNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNull = function (val, msg) {\n new Assertion(val, msg).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo is NaN');\n *\n * @name isNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNaN = function (val, msg) {\n new Assertion(val, msg).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\n * Asserts that value is not NaN\n *\n * assert.isNotNaN(4, '4 is not NaN');\n *\n * @name isNotNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n assert.isNotNaN = function (val, msg) {\n new Assertion(val, msg).not.to.be.NaN;\n };\n\n /**\n * ### .isUndefined(value, [message])\n *\n * Asserts that `value` is `undefined`.\n *\n * var tea;\n * assert.isUndefined(tea, 'no tea defined');\n *\n * @name isUndefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isUndefined = function (val, msg) {\n new Assertion(val, msg).to.equal(undefined);\n };\n\n /**\n * ### .isDefined(value, [message])\n *\n * Asserts that `value` is not `undefined`.\n *\n * var tea = 'cup of chai';\n * assert.isDefined(tea, 'tea has been defined');\n *\n * @name isDefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isDefined = function (val, msg) {\n new Assertion(val, msg).to.not.equal(undefined);\n };\n\n /**\n * ### .isFunction(value, [message])\n *\n * Asserts that `value` is a function.\n *\n * function serveTea() { return 'cup of tea'; };\n * assert.isFunction(serveTea, 'great, we can have tea now');\n *\n * @name isFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFunction = function (val, msg) {\n new Assertion(val, msg).to.be.a('function');\n };\n\n /**\n * ### .isNotFunction(value, [message])\n *\n * Asserts that `value` is _not_ a function.\n *\n * var serveTea = [ 'heat', 'pour', 'sip' ];\n * assert.isNotFunction(serveTea, 'great, we have listed the steps');\n *\n * @name isNotFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFunction = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('function');\n };\n\n /**\n * ### .isObject(value, [message])\n *\n * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`).\n * _The assertion does not match subclassed objects._\n *\n * var selection = { name: 'Chai', serve: 'with spices' };\n * assert.isObject(selection, 'tea selection is an object');\n *\n * @name isObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isObject = function (val, msg) {\n new Assertion(val, msg).to.be.a('object');\n };\n\n /**\n * ### .isNotObject(value, [message])\n *\n * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`).\n *\n * var selection = 'chai'\n * assert.isNotObject(selection, 'tea selection is not an object');\n * assert.isNotObject(null, 'null is not an object');\n *\n * @name isNotObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotObject = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('object');\n };\n\n /**\n * ### .isArray(value, [message])\n *\n * Asserts that `value` is an array.\n *\n * var menu = [ 'green', 'chai', 'oolong' ];\n * assert.isArray(menu, 'what kind of tea do we want?');\n *\n * @name isArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isArray = function (val, msg) {\n new Assertion(val, msg).to.be.an('array');\n };\n\n /**\n * ### .isNotArray(value, [message])\n *\n * Asserts that `value` is _not_ an array.\n *\n * var menu = 'green|chai|oolong';\n * assert.isNotArray(menu, 'what kind of tea do we want?');\n *\n * @name isNotArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotArray = function (val, msg) {\n new Assertion(val, msg).to.not.be.an('array');\n };\n\n /**\n * ### .isString(value, [message])\n *\n * Asserts that `value` is a string.\n *\n * var teaOrder = 'chai';\n * assert.isString(teaOrder, 'order placed');\n *\n * @name isString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isString = function (val, msg) {\n new Assertion(val, msg).to.be.a('string');\n };\n\n /**\n * ### .isNotString(value, [message])\n *\n * Asserts that `value` is _not_ a string.\n *\n * var teaOrder = 4;\n * assert.isNotString(teaOrder, 'order placed');\n *\n * @name isNotString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotString = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('string');\n };\n\n /**\n * ### .isNumber(value, [message])\n *\n * Asserts that `value` is a number.\n *\n * var cups = 2;\n * assert.isNumber(cups, 'how many cups');\n *\n * @name isNumber\n * @param {Number} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNumber = function (val, msg) {\n new Assertion(val, msg).to.be.a('number');\n };\n\n /**\n * ### .isNotNumber(value, [message])\n *\n * Asserts that `value` is _not_ a number.\n *\n * var cups = '2 cups please';\n * assert.isNotNumber(cups, 'how many cups');\n *\n * @name isNotNumber\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNumber = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('number');\n };\n\n /**\n * ### .isBoolean(value, [message])\n *\n * Asserts that `value` is a boolean.\n *\n * var teaReady = true\n * , teaServed = false;\n *\n * assert.isBoolean(teaReady, 'is the tea ready');\n * assert.isBoolean(teaServed, 'has tea been served');\n *\n * @name isBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBoolean = function (val, msg) {\n new Assertion(val, msg).to.be.a('boolean');\n };\n\n /**\n * ### .isNotBoolean(value, [message])\n *\n * Asserts that `value` is _not_ a boolean.\n *\n * var teaReady = 'yep'\n * , teaServed = 'nope';\n *\n * assert.isNotBoolean(teaReady, 'is the tea ready');\n * assert.isNotBoolean(teaServed, 'has tea been served');\n *\n * @name isNotBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotBoolean = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('boolean');\n };\n\n /**\n * ### .typeOf(value, name, [message])\n *\n * Asserts that `value`'s type is `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');\n * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');\n * assert.typeOf('tea', 'string', 'we have a string');\n * assert.typeOf(/tea/, 'regexp', 'we have a regular expression');\n * assert.typeOf(null, 'null', 'we have a null');\n * assert.typeOf(undefined, 'undefined', 'we have an undefined');\n *\n * @name typeOf\n * @param {Mixed} value\n * @param {String} name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.typeOf = function (val, type, msg) {\n new Assertion(val, msg).to.be.a(type);\n };\n\n /**\n * ### .notTypeOf(value, name, [message])\n *\n * Asserts that `value`'s type is _not_ `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.notTypeOf('tea', 'number', 'strings are not numbers');\n *\n * @name notTypeOf\n * @param {Mixed} value\n * @param {String} typeof name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notTypeOf = function (val, type, msg) {\n new Assertion(val, msg).to.not.be.a(type);\n };\n\n /**\n * ### .instanceOf(object, constructor, [message])\n *\n * Asserts that `value` is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new Tea('chai');\n *\n * assert.instanceOf(chai, Tea, 'chai is an instance of tea');\n *\n * @name instanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.instanceOf = function (val, type, msg) {\n new Assertion(val, msg).to.be.instanceOf(type);\n };\n\n /**\n * ### .notInstanceOf(object, constructor, [message])\n *\n * Asserts `value` is not an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new String('chai');\n *\n * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');\n *\n * @name notInstanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInstanceOf = function (val, type, msg) {\n new Assertion(val, msg).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\n *\n * @name include\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.include = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.include).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\n *\n * @name notInclude\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.notInclude).not.include(inc);\n };\n\n /**\n * ### .match(value, regexp, [message])\n *\n * Asserts that `value` matches the regular expression `regexp`.\n *\n * assert.match('foobar', /^foo/, 'regexp matches');\n *\n * @name match\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.match = function (exp, re, msg) {\n new Assertion(exp, msg).to.match(re);\n };\n\n /**\n * ### .notMatch(value, regexp, [message])\n *\n * Asserts that `value` does not match the regular expression `regexp`.\n *\n * assert.notMatch('foobar', /^foo/, 'regexp does not match');\n *\n * @name notMatch\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notMatch = function (exp, re, msg) {\n new Assertion(exp, msg).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\n *\n * @name property\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.property = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property`.\n *\n * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');\n *\n * @name notProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property`, which\n * can be a string using dot- and bracket-notation for deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\n *\n * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');\n *\n * @name propertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.propertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`. `property` can use dot- and bracket-notation for deep\n * reference.\n *\n * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');\n *\n * @name deepPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property with the expected value.\n *\n * assert.lengthOf([1,2,3], 3, 'array has length of 3');\n * assert.lengthOf('foobar', 6, 'string has length of 6');\n *\n * @name lengthOf\n * @param {Mixed} object\n * @param {Number} length\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.lengthOf = function (exp, len, msg) {\n new Assertion(exp, msg).to.have.length(len);\n };\n\n /**\n * ### .throws(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(function, [constructor/regexp], [message])\n *\n * Asserts that `function` will _not_ throw an error that is an instance of\n * `constructor`, or alternately that it will not throw an error with message\n * matching `regexp`.\n *\n * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\n };\n\n /**\n * ### .operator(val1, operator, val2, [message])\n *\n * Compares two values using `operator`.\n *\n * assert.operator(1, '<', 2, 'everything is ok');\n * assert.operator(1, '>', 2, 'this will fail');\n *\n * @name operator\n * @param {Mixed} val1\n * @param {String} operator\n * @param {Mixed} val2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.operator = function (val, operator, val2, msg) {\n var ok;\n switch(operator) {\n case '==':\n ok = val == val2;\n break;\n case '===':\n ok = val === val2;\n break;\n case '>':\n ok = val > val2;\n break;\n case '>=':\n ok = val >= val2;\n break;\n case '<':\n ok = val < val2;\n break;\n case '<=':\n ok = val <= val2;\n break;\n case '!=':\n ok = val != val2;\n break;\n case '!==':\n ok = val !== val2;\n break;\n default:\n throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\n test.assert(\n true === flag(test, 'object')\n , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)\n , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );\n };\n\n /**\n * ### .closeTo(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.closeTo(1.5, 1, 0.5, 'numbers are close');\n *\n * @name closeTo\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.closeTo = function (act, exp, delta, msg) {\n new Assertion(act, msg).to.be.closeTo(exp, delta);\n };\n\n /**\n * ### .approximately(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.approximately(1.5, 1, 0.5, 'numbers are close');\n *\n * @name approximately\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.approximately = function (act, exp, delta, msg) {\n new Assertion(act, msg).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\n *\n * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');\n *\n * @name sameMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameMembers = function (set1, set2, msg) {\n new Assertion(set1, msg).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members');\n *\n * @name sameDeepMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameDeepMembers = function (set1, set2, msg) {\n new Assertion(set1, msg).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');\n *\n * @name includeMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeMembers = function (superset, subset, msg) {\n new Assertion(superset, msg).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * Duplicates are ignored.\n *\n * assert.includeDeepMembers([ {a: 1}, {b: 2}, {c: 3} ], [ {b: 2}, {a: 1}, {b: 2} ], 'include deep members');\n *\n * @name includeDeepMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeDeepMembers = function (superset, subset, msg) {\n new Assertion(superset, msg).to.include.deep.members(subset);\n }\n\n /**\n * ### .oneOf(inList, list, [message])\n *\n * Asserts that non-object, non-array value `inList` appears in the flat array `list`.\n *\n * assert.oneOf(1, [ 2, 1 ], 'Not found in list');\n *\n * @name oneOf\n * @param {*} inList\n * @param {Array<*>} list\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.oneOf = function (inList, list, msg) {\n new Assertion(inList, msg).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\n *\n * Asserts that a function changes the value of a property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 22 };\n * assert.changes(fn, obj, 'val');\n *\n * @name changes\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes the value of a property\n *\n * var obj = { val: 10 };\n * var fn = function() { console.log('foo'); };\n * assert.doesNotChange(fn, obj, 'val');\n *\n * @name doesNotChange\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 13 };\n * assert.increases(fn, obj, 'val');\n *\n * @name increases\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 8 };\n * assert.doesNotIncrease(fn, obj, 'val');\n *\n * @name doesNotIncrease\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * assert.decreases(fn, obj, 'val');\n *\n * @name decreases\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * assert.doesNotDecrease(fn, obj, 'val');\n *\n * @name doesNotDecrease\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\n }\n\n /*!\n * ### .ifError(object)\n *\n * Asserts if value is not a false value, and throws if it is a true value.\n * This is added to allow for chai to be a drop-in replacement for Node's\n * assert class.\n *\n * var err = new Error('I am a custom error');\n * assert.ifError(err); // Rethrows err!\n *\n * @name ifError\n * @param {Object} object\n * @namespace Assert\n * @api public\n */\n\n assert.ifError = function (val) {\n if (val) {\n throw(val);\n }\n };\n\n /**\n * ### .isExtensible(object)\n *\n * Asserts that `object` is extensible (can have new properties added to it).\n *\n * assert.isExtensible({});\n *\n * @name isExtensible\n * @alias extensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isExtensible = function (obj, msg) {\n new Assertion(obj, msg).to.be.extensible;\n };\n\n /**\n * ### .isNotExtensible(object)\n *\n * Asserts that `object` is _not_ extensible.\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freese({});\n *\n * assert.isNotExtensible(nonExtensibleObject);\n * assert.isNotExtensible(sealedObject);\n * assert.isNotExtensible(frozenObject);\n *\n * @name isNotExtensible\n * @alias notExtensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotExtensible = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.extensible;\n };\n\n /**\n * ### .isSealed(object)\n *\n * Asserts that `object` is sealed (cannot have new properties added to it\n * and its existing properties cannot be removed).\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.seal({});\n *\n * assert.isSealed(sealedObject);\n * assert.isSealed(frozenObject);\n *\n * @name isSealed\n * @alias sealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isSealed = function (obj, msg) {\n new Assertion(obj, msg).to.be.sealed;\n };\n\n /**\n * ### .isNotSealed(object)\n *\n * Asserts that `object` is _not_ sealed.\n *\n * assert.isNotSealed({});\n *\n * @name isNotSealed\n * @alias notSealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotSealed = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.sealed;\n };\n\n /**\n * ### .isFrozen(object)\n *\n * Asserts that `object` is frozen (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n * assert.frozen(frozenObject);\n *\n * @name isFrozen\n * @alias frozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isFrozen = function (obj, msg) {\n new Assertion(obj, msg).to.be.frozen;\n };\n\n /**\n * ### .isNotFrozen(object)\n *\n * Asserts that `object` is _not_ frozen.\n *\n * assert.isNotFrozen({});\n *\n * @name isNotFrozen\n * @alias notFrozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFrozen = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.frozen;\n };\n\n /*!\n * Aliases.\n */\n\n (function alias(name, as){\n assert[as] = assert[name];\n return alias;\n })\n ('isOk', 'ok')\n ('isNotOk', 'notOk')\n ('throws', 'throw')\n ('throws', 'Throw')\n ('isExtensible', 'extensible')\n ('isNotExtensible', 'notExtensible')\n ('isSealed', 'sealed')\n ('isNotSealed', 'notSealed')\n ('isFrozen', 'frozen')\n ('isNotFrozen', 'notFrozen');\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n chai.expect = function (val, message) {\n return new chai.Assertion(val, message);\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\n message = message || 'expect.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, chai.expect.fail);\n };\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n var Assertion = chai.Assertion;\n\n function loadShould () {\n // explicitly define this method as function as to have it's name to include as `ssfi`\n function shouldGetter() {\n if (this instanceof String || this instanceof Number || this instanceof Boolean ) {\n return new Assertion(this.valueOf(), null, shouldGetter);\n }\n return new Assertion(this, null, shouldGetter);\n }\n function shouldSetter(value) {\n // See https://github.com/chaijs/chai/issues/86: this makes\n // `whatever.should = someValue` actually set `someValue`, which is\n // especially useful for `global.should = require('chai').should()`.\n //\n // Note that we have to use [[DefineProperty]] instead of [[Put]]\n // since otherwise we would trigger this very setter!\n Object.defineProperty(this, 'should', {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n }\n // modify Object.prototype to have `should`\n Object.defineProperty(Object.prototype, 'should', {\n set: shouldSetter\n , get: shouldGetter\n , configurable: true\n });\n\n var should = {};\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\n message = message || 'should.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, should.fail);\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * should.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * should.throw(fn, 'function throws a reference error');\n * should.throw(fn, /function throws a reference error/);\n * should.throw(fn, ReferenceError);\n * should.throw(fn, ReferenceError, 'function throws a reference error');\n * should.throw(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.Throw(errt, errs);\n };\n\n /**\n * ### .exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi';\n *\n * should.exist(foo, 'foo exists');\n *\n * @name exist\n * @namespace Should\n * @api public\n */\n\n should.exist = function (val, msg) {\n new Assertion(val, msg).to.exist;\n }\n\n // negation\n should.not = {}\n\n /**\n * ### .not.equal(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * should.not.equal(3, 4, 'these numbers are not equal');\n *\n * @name not.equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.not.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.not.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/regexp], [message])\n *\n * Asserts that `function` will _not_ throw an error that is an instance of\n * `constructor`, or alternately that it will not throw an error with message\n * matching `regexp`.\n *\n * should.not.throw(fn, Error, 'function does not throw');\n *\n * @name not.throw\n * @alias not.Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.not.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.not.Throw(errt, errs);\n };\n\n /**\n * ### .not.exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var bar = null;\n *\n * should.not.exist(bar, 'bar does not exist');\n *\n * @name not.exist\n * @namespace Should\n * @api public\n */\n\n should.not.exist = function (val, msg) {\n new Assertion(val, msg).to.not.exist;\n }\n\n should['throw'] = should['Throw'];\n should.not['throw'] = should.not['Throw'];\n\n return should;\n };\n\n chai.should = loadShould;\n chai.Should = loadShould;\n};\n","/*!\n * Chai - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\n\n// Cache `Function` properties\nvar call = Function.prototype.call,\n apply = Function.prototype.apply;\n\n/**\n * ### addChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Adds a method to an object, such that the method can also be chained.\n *\n * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);\n *\n * The result can then be used as both a method assertion, executing both `method` and\n * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.\n *\n * expect(fooStr).to.be.foo('bar');\n * expect(fooStr).to.be.foo.equal('foo');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for `name`, when called\n * @param {Function} chainingBehavior function to be called every time the property is accessed\n * @namespace Utils\n * @name addChainableMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method, chainingBehavior) {\n if (typeof chainingBehavior !== 'function') {\n chainingBehavior = function () { };\n }\n\n var chainableBehavior = {\n method: method\n , chainingBehavior: chainingBehavior\n };\n\n // save the methods so we can overwrite them later, if we need to.\n if (!ctx.__methods) {\n ctx.__methods = {};\n }\n ctx.__methods[name] = chainableBehavior;\n\n Object.defineProperty(ctx, name,\n { get: function () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\n\n/**\n * ### .addMethod (ctx, name, method)\n *\n * Adds a method to the prototype of an object.\n *\n * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(fooStr).to.be.foo('bar');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for name\n * @namespace Utils\n * @name addMethod\n * @api public\n */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\n\n/**\n * ### addProperty (ctx, name, getter)\n *\n * Adds a property to the prototype of an object.\n *\n * utils.addProperty(chai.Assertion.prototype, 'foo', function () {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.instanceof(Foo);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.foo;\n *\n * @param {Object} ctx object to which the property is added\n * @param {String} name of property to add\n * @param {Function} getter function to be used for name\n * @namespace Utils\n * @name addProperty\n * @api public\n */\n\nmodule.exports = function (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### expectTypes(obj, types)\n *\n * Ensures that the object being tested against is of a valid type.\n *\n * utils.expectTypes(this, ['array', 'object', 'string']);\n *\n * @param {Mixed} obj constructed Assertion\n * @param {Array} type A list of allowed types for this assertion\n * @namespace Utils\n * @name expectTypes\n * @api public\n */\n\nvar AssertionError = require('assertion-error');\nvar flag = require('./flag');\nvar type = require('type-detect');\n\nmodule.exports = function (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, or an ipsum'\n var str = types.map(function (t, index) {\n var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a';\n var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';\n return or + art + ' ' + t;\n }).join(', ');\n\n if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### flag(object, key, [value])\n *\n * Get or set a flag value on an object. If a\n * value is provided it will be set, else it will\n * return the currently set value or `undefined` if\n * the value is not set.\n *\n * utils.flag(this, 'foo', 'bar'); // setter\n * utils.flag(this, 'foo'); // getter, returns `bar`\n *\n * @param {Object} object constructed Assertion\n * @param {String} key\n * @param {Mixed} value (optional)\n * @namespace Utils\n * @name flag\n * @api private\n */\n\nmodule.exports = function (obj, key, value) {\n var flags = obj.__flags || (obj.__flags = Object.create(null));\n if (arguments.length === 3) {\n flags[key] = value;\n } else {\n return flags[key];\n }\n};\n","/*!\n * Chai - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getActual(object, [actual])\n *\n * Returns the `actual` value for an Assertion\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getActual\n */\n\nmodule.exports = function (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### .getEnumerableProperties(object)\n *\n * This allows the retrieval of enumerable property names of an object,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getEnumerableProperties\n * @api public\n */\n\nmodule.exports = function getEnumerableProperties(object) {\n var result = [];\n for (var name in object) {\n result.push(name);\n }\n return result;\n};\n","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\n , objDisplay = require('./objDisplay');\n\n/**\n * ### .getMessage(object, message, negateMessage)\n *\n * Construct the error message based on flags\n * and template tags. Template tags will return\n * a stringified inspection of the object referenced.\n *\n * Message template tags:\n * - `#{this}` current asserted object\n * - `#{act}` actual value\n * - `#{exp}` expected value\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getMessage\n * @api public\n */\n\nmodule.exports = function (obj, args) {\n var negate = flag(obj, 'negate')\n , val = flag(obj, 'object')\n , expected = args[3]\n , actual = getActual(obj, args)\n , msg = negate ? args[2] : args[1]\n , flagMsg = flag(obj, 'message');\n\n if(typeof msg === \"function\") msg = msg();\n msg = msg || '';\n msg = msg\n .replace(/#\\{this\\}/g, function () { return objDisplay(val); })\n .replace(/#\\{act\\}/g, function () { return objDisplay(actual); })\n .replace(/#\\{exp\\}/g, function () { return objDisplay(expected); });\n\n return flagMsg ? flagMsg + ': ' + msg : msg;\n};\n","/*!\n * Chai - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\n *\n * This allows the retrieval of property info in an\n * object given a string path.\n *\n * The path info consists of an object with the\n * following properties:\n *\n * * parent - The parent object of the property referenced by `path`\n * * name - The name of the final property, a number if it was an array indexer\n * * value - The value of the property, if it exists, otherwise `undefined`\n * * exists - Whether the property exists or not\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near infinitely deep and nested\n * * Arrays are also valid using the formal `myobject.document[3].property`.\n * * Literal dots and brackets (not delimiter) must be backslash-escaped.\n *\n * @param {String} path\n * @returns {Object} parsed\n * @api private\n */\n\nfunction parsePath (path) {\n var str = path.replace(/([^\\\\])\\[/g, '$1.[')\n , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\n *\n * This allows the retrieval of values in an\n * object given a string path.\n *\n * var obj = {\n * prop1: {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n * , prop2: {\n * arr: [ { nested: 'Universe' } ]\n * , str: 'Hello again!'\n * }\n * }\n *\n * The following would be the results.\n *\n * getPathValue('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### .getProperties(object)\n *\n * This allows the retrieval of property names of an object, enumerable or not,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getProperties\n * @api public\n */\n\nmodule.exports = function getProperties(object) {\n var result = Object.getOwnPropertyNames(object);\n\n function addProperty(property) {\n if (result.indexOf(property) === -1) {\n result.push(property);\n }\n }\n\n var proto = Object.getPrototypeOf(object);\n while (proto !== null) {\n Object.getOwnPropertyNames(proto).forEach(addProperty);\n proto = Object.getPrototypeOf(proto);\n }\n\n return result;\n};\n","/*!\n * Chai - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\n\n/*!\n * test utility\n */\n\nexports.test = require('./test');\n\n/*!\n * type utility\n */\n\nexports.type = require('type-detect');\n\n/*!\n * expectTypes utility\n */\nexports.expectTypes = require('./expectTypes');\n\n/*!\n * message utility\n */\n\nexports.getMessage = require('./getMessage');\n\n/*!\n * actual utility\n */\n\nexports.getActual = require('./getActual');\n\n/*!\n * Inspect util\n */\n\nexports.inspect = require('./inspect');\n\n/*!\n * Object Display util\n */\n\nexports.objDisplay = require('./objDisplay');\n\n/*!\n * Flag utility\n */\n\nexports.flag = require('./flag');\n\n/*!\n * Flag transferring utility\n */\n\nexports.transferFlags = require('./transferFlags');\n\n/*!\n * Deep equal utility\n */\n\nexports.eql = require('deep-eql');\n\n/*!\n * Deep path value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\n\n/*!\n * add Property\n */\n\nexports.addProperty = require('./addProperty');\n\n/*!\n * add Method\n */\n\nexports.addMethod = require('./addMethod');\n\n/*!\n * overwrite Property\n */\n\nexports.overwriteProperty = require('./overwriteProperty');\n\n/*!\n * overwrite Method\n */\n\nexports.overwriteMethod = require('./overwriteMethod');\n\n/*!\n * Add a chainable method\n */\n\nexports.addChainableMethod = require('./addChainableMethod');\n\n/*!\n * Overwrite chainable method\n */\n\nexports.overwriteChainableMethod = require('./overwriteChainableMethod');\n","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\n * @param {Number} depth Depth in which to descend in object. Default is 2.\n * @param {Boolean} colors Flag to turn on ANSI escape codes to color the\n * output. Default is false (no coloring).\n * @namespace Utils\n * @name inspect\n */\nfunction inspect(obj, showHidden, depth, colors) {\n var ctx = {\n showHidden: showHidden,\n seen: [],\n stylize: function (str) { return str; }\n };\n return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));\n}\n\n// Returns true if object is a DOM element.\nvar isDOMElement = function (object) {\n if (typeof HTMLElement === 'object') {\n return object instanceof HTMLElement;\n } else {\n return object &&\n typeof object === 'object' &&\n object.nodeType === 1 &&\n typeof object.nodeName === 'string';\n }\n};\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (value && typeof value.inspect === 'function' &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes);\n if (typeof ret !== 'string') {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // If this is a DOM element, try to get the outer HTML.\n if (isDOMElement(value)) {\n if ('outerHTML' in value) {\n return value.outerHTML;\n // This value does not have an outerHTML attribute,\n // it could still be an XML element\n } else {\n // Attempt to serialize it\n try {\n if (document.xmlVersion) {\n var xmlSerializer = new XMLSerializer();\n return xmlSerializer.serializeToString(value);\n } else {\n // Firefox 11- do not support outerHTML\n // It does, however, support innerHTML\n // Use the following to render the element\n var ns = \"http://www.w3.org/1999/xhtml\";\n var container = document.createElementNS(ns, '_');\n\n container.appendChild(value.cloneNode(false));\n html = container.innerHTML\n .replace('><', '>' + value.innerHTML + '<');\n container.innerHTML = '';\n return html;\n }\n } catch (err) {\n // This could be a non-native DOM implementation,\n // continue with the normal flow:\n // printing the element as if it is an object.\n }\n }\n }\n\n // Look up the keys of the object.\n var visibleKeys = getEnumerableProperties(value);\n var keys = ctx.showHidden ? getProperties(value) : visibleKeys;\n\n // Some type of object without properties can be shortcutted.\n // In IE, errors have a single `stack` property, or if they are vanilla `Error`,\n // a `stack` plus `description` property; ignore those for consistency.\n if (keys.length === 0 || (isError(value) && (\n (keys.length === 1 && keys[0] === 'stack') ||\n (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')\n ))) {\n if (typeof value === 'function') {\n var name = getName(value);\n var nameSuffix = name ? ': ' + name : '';\n return ctx.stylize('[Function' + nameSuffix + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (typeof value === 'function') {\n var name = getName(value);\n var nameSuffix = name ? ': ' + name : '';\n base = ' [Function' + nameSuffix + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n return formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n switch (typeof value) {\n case 'undefined':\n return ctx.stylize('undefined', 'undefined');\n\n case 'string':\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n\n case 'number':\n if (value === 0 && (1/value) === -Infinity) {\n return ctx.stylize('-0', 'number');\n }\n return ctx.stylize('' + value, 'number');\n\n case 'boolean':\n return ctx.stylize('' + value, 'boolean');\n }\n // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (Object.prototype.hasOwnProperty.call(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n }\n if (visibleKeys.indexOf(key) < 0) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(value[key]) < 0) {\n if (recurseTimes === null) {\n str = formatValue(ctx, value[key], null);\n } else {\n str = formatValue(ctx, value[key], recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (typeof name === 'undefined') {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\nfunction isArray(ar) {\n return Array.isArray(ar) ||\n (typeof ar === 'object' && objectToString(ar) === '[object Array]');\n}\n\nfunction isRegExp(re) {\n return typeof re === 'object' && objectToString(re) === '[object RegExp]';\n}\n\nfunction isDate(d) {\n return typeof d === 'object' && objectToString(d) === '[object Date]';\n}\n\nfunction isError(e) {\n return typeof e === 'object' && objectToString(e) === '[object Error]';\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar inspect = require('./inspect');\nvar config = require('../config');\n\n/**\n * ### .objDisplay (object)\n *\n * Determines if an object or an array matches\n * criteria to be inspected in-line for error\n * messages or should be truncated.\n *\n * @param {Mixed} javascript object to inspect\n * @name objDisplay\n * @namespace Utils\n * @api public\n */\n\nmodule.exports = function (obj) {\n var str = inspect(obj)\n , type = Object.prototype.toString.call(obj);\n\n if (config.truncateThreshold && str.length >= config.truncateThreshold) {\n if (type === '[object Function]') {\n return !obj.name || obj.name === ''\n ? '[Function]'\n : '[Function: ' + obj.name + ']';\n } else if (type === '[object Array]') {\n return '[ Array(' + obj.length + ') ]';\n } else if (type === '[object Object]') {\n var keys = Object.keys(obj)\n , kstr = keys.length > 2\n ? keys.splice(0, 2).join(', ') + ', ...'\n : keys.join(', ');\n return '{ Object (' + kstr + ') }';\n } else {\n return str;\n }\n } else {\n return str;\n }\n};\n","/*!\n * Chai - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites an already existing chainable method\n * and provides access to the previous function or\n * property. Must return functions to be used for\n * name.\n *\n * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length',\n * function (_super) {\n * }\n * , function (_super) {\n * }\n * );\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteChainableMethod('foo', fn, fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.have.length(3);\n * expect(myFoo).to.have.length.above(3);\n *\n * @param {Object} ctx object whose method / property is to be overwritten\n * @param {String} name of method / property to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @param {Function} chainingBehavior function that returns a function to be used for property\n * @namespace Utils\n * @name overwriteChainableMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites an already existing method and provides\n * access to previous function. Must return function\n * to be used for name.\n *\n * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {\n * return function (str) {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.value).to.equal(str);\n * } else {\n * _super.apply(this, arguments);\n * }\n * }\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.equal('bar');\n *\n * @param {Object} ctx object whose method is to be overwritten\n * @param {String} name of method to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @namespace Utils\n * @name overwriteMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites an already existing property getter and provides\n * access to previous value. Must return function to use as getter.\n *\n * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n * return function () {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.name).to.equal('bar');\n * } else {\n * _super.call(this);\n * }\n * }\n * });\n *\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.ok;\n *\n * @param {Object} ctx object whose property is to be overwritten\n * @param {String} name of property to overwrite\n * @param {Function} getter function that returns a getter function to be used for name\n * @namespace Utils\n * @name overwriteProperty\n * @api public\n */\n\nmodule.exports = function (ctx, name, getter) {\n var _get = Object.getOwnPropertyDescriptor(ctx, name)\n , _super = function () {};\n\n if (_get && 'function' === typeof _get.get)\n _super = _get.get\n\n Object.defineProperty(ctx, name,\n { get: function () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag');\n\n/**\n * # test(object, expression)\n *\n * Test and object for expression.\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name test\n */\n\nmodule.exports = function (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### transferFlags(assertion, object, includeAll = true)\n *\n * Transfer all the flags for `assertion` to `object`. If\n * `includeAll` is set to `false`, then the base Chai\n * assertion flags (namely `object`, `ssfi`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = new Assertion(myObj);\n * utils.transferFlags(assertion, anotherAssertion, false);\n *\n * @param {Assertion} assertion the assertion to transfer the flags from\n * @param {Object} object the object to transfer the flags to; usually a new assertion\n * @param {Boolean} includeAll\n * @namespace Utils\n * @name transferFlags\n * @api private\n */\n\nmodule.exports = function (assertion, object, includeAll) {\n var flags = assertion.__flags || (assertion.__flags = Object.create(null));\n\n if (!object.__flags) {\n object.__flags = Object.create(null);\n }\n\n includeAll = arguments.length === 3 ? includeAll : true;\n\n for (var flag in flags) {\n if (includeAll ||\n (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.5.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && typeof obj === 'object' && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nexports.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nexports.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nexports.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nexports.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {}\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support (#5572)\n // since Safari 10.1 shipped with fetch, we can use that to detect it\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage && localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs;\nvar dbContexts;\nvar toString = Object.prototype.toString;\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, 'readwrite');\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve) {\n deferredOperation.resolve = resolve;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n resolve(openreq.result);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + ' can\\'t be downgraded from version ' + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Initialize a singleton container for all running localForages.\n if (!dbContexts) {\n dbContexts = {};\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.put(value, key);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var advanced = false;\n var req = store.openCursor();\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys\n};\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' (id INTEGER PRIMARY KEY, key unique, value)', [], function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n t.executeSql('INSERT OR REPLACE INTO ' + dbInfo.storeName + ' (key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n t.executeSql('SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1\n};\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = dbInfo.name + '/';\n\n if (dbInfo.storeName !== self._defaultConfig.storeName) {\n dbInfo.keyPrefix += dbInfo.storeName + '/';\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n if (localStorage.key(i).indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(localStorage.key(i).substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n // Default API, from Gaia/localStorage.\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2\n};\n\n// Custom drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar CustomDrivers = {};\n\nvar DriverType = {\n INDEXEDDB: 'asyncStorage',\n LOCALSTORAGE: 'localStorageWrapper',\n WEBSQL: 'webSQLStorage'\n};\n\nvar DefaultDriverOrder = [DriverType.INDEXEDDB, DriverType.WEBSQL, DriverType.LOCALSTORAGE];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'];\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nvar driverSupport = {};\n// Check to see if IndexedDB is available and if it is the latest\n// implementation; it's our preferred backend library. We use \"_spec_test\"\n// as the name of the database because it's not the one we'll operate on,\n// but it's useful to make sure its using the right spec.\n// See: https://github.com/mozilla/localForage/issues/128\ndriverSupport[DriverType.INDEXEDDB] = isIndexedDBValid();\n\ndriverSupport[DriverType.WEBSQL] = isWebSQLValid();\n\ndriverSupport[DriverType.LOCALSTORAGE] = isLocalStorageValid();\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var key in arg) {\n if (arg.hasOwnProperty(key)) {\n if (isArray(arg[key])) {\n arguments[0][key] = arg[key].slice();\n } else {\n arguments[0][key] = arg[key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nfunction isLibraryDriver(driverName) {\n for (var driver in DriverType) {\n if (DriverType.hasOwnProperty(driver) && DriverType[driver] === driverName) {\n return true;\n }\n }\n\n return false;\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n this.INDEXEDDB = DriverType.INDEXEDDB;\n this.LOCALSTORAGE = DriverType.LOCALSTORAGE;\n this.WEBSQL = DriverType.WEBSQL;\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n var namingError = new Error('Custom driver name already in use: ' + driverObject._driver);\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n if (isLibraryDriver(driverObject._driver)) {\n reject(namingError);\n return;\n }\n\n var customDriverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0; i < customDriverMethods.length; i++) {\n var customDriverMethod = customDriverMethods[i];\n if (!customDriverMethod || !driverObject[customDriverMethod] || typeof driverObject[customDriverMethod] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var supportPromise = Promise$1.resolve(true);\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n supportPromise = driverObject._support();\n } else {\n supportPromise = Promise$1.resolve(!!driverObject._support);\n }\n }\n\n supportPromise.then(function (supportResult) {\n driverSupport[driverName] = supportResult;\n CustomDrivers[driverName] = driverObject;\n resolve();\n }, reject);\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var self = this;\n var getDriverPromise = Promise$1.resolve().then(function () {\n if (isLibraryDriver(driverName)) {\n switch (driverName) {\n case self.INDEXEDDB:\n return asyncStorage;\n case self.LOCALSTORAGE:\n return localStorageWrapper;\n case self.WEBSQL:\n return webSQLStorage;\n }\n } else if (CustomDrivers[driverName]) {\n return CustomDrivers[driverName];\n } else {\n throw new Error('Driver not found.');\n }\n });\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!driverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0; i < LibraryMethods.length; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function() {\n // DEPENDENCIES\n // ============================================================\n\n const assert = require('chai').assert;\n const localforage = require('localforage');\n\n // PROBLEMS\n // ============================================================\n\n let problems = require('../problems/arrays.js');\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n // keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // tab\n 37, // left arrow\n 39, // right arrow\n 38, // up arrow\n 40, // down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0,\n };\n\n // pull config from localforage\n localforage\n .getItem('js_practice_config')\n .then(val => {\n console.log('localforage val:', val);\n if (val) {\n config = val;\n }\n loadApp(config);\n })\n .catch(err => {\n console.log('localforage err:', err);\n loadApp(config);\n });\n\n function updateLocalstore(config) {\n return localforage\n .setItem('js_practice_config', config)\n .then(val => {\n console.log('Settings updated:', val);\n })\n .catch(err => {\n console.log('Settings update error:', err);\n });\n }\n\n\n // UI\n // ============================================================\n\n // elements\n const problemNameEl = document.getElementById('problem-name');\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testAreaEl = document.getElementById('test-area');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // if at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // if at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem(e) {\n console.log('previousProblem!');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(_ => {\n window.location.reload();\n });\n }\n\n function nextProblem(e) {\n console.log('nextProblem!');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(_ => {\n window.location.reload();\n });\n }\n\n function toggleShuffle(e) {\n console.log('toggle shuffle!');\n config.shuffle = config.shuffle === true ? false : true;\n shuffleProblemsButtonEl.classList.toggle('active');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n currentProblem = problemObj;\n // prob question\n problemEl.innerText = problemObj.prompt;\n // prob given\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // seed tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = Array.from(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // console.log('codeEl.value:', codeEl.value);\n // console.log(typeof codeEl.value);\n // run stuff\n const output = getOutput(codeEl.value);\n // console.log('output:', output);\n // run tests on code, return object/array of test results\n const tested = runTests(output);\n // update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`);\n printEvalOutput(null, evald); // print current output\n } catch (error) {\n // console.log('eval error:', error);\n printEvalOutput(error);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (!output) {\n testOutcome = false;\n } else {\n testOutcome = test.test(output);\n }\n printAssertError(null);\n return testOutcome;\n } catch (error) {\n // console.log('error:', error);\n printAssertError(error);\n }\n });\n return tested;\n }\n\n // wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n }\n\n // bind it up\n codeEl.addEventListener('keyup', function(e) {\n // if not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // run test suite\n testSuite();\n }\n });\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // start it up!\n // load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // initalized test suite with starting failures\n testSuite(true);\n } // loadApp()\n})();\n","const assert = require('chai').assert;\n\nmodule.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: \"Create and return an array that contains 'apple' and 'banana'\",\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['apple', 'banana']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'apple') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'orange') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'banana') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: \"Loop over the array, add an 'x' to the end of each name, push each fruit into a new array, then return the new array.\",\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['applex', 'bananax']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, ['apple', 'banana', 'orange']) ===\n undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 3 items',\n test: function(output) {\n return assert.lengthOf(output, 3) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['apple', 'banana']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: function(output) {\n return assert.deepEqual(output, ['banana', 'orange']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange',\n ]) === undefined\n );\n },\n },\n {\n name: 'Must return an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 1) === undefined;\n },\n },\n {\n name: 'Returns a Number',\n test: function(output) {\n return assert.isNumber(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'strawberry-banana') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['orange', 'lemon']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n {\n name: `First item is 'banana'`,\n test: function(output) {\n return assert.deepEqual(output[0], 'banana') === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Sort the order of the 'fruit' array using 'Array.sort()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n {\n name: `First item is 'banana'`,\n test: function(output) {\n return assert.deepEqual(output[0], 'banana') === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 3) === undefined;\n },\n },\n {\n name: 'Returns a Number',\n test: function(output) {\n return assert.isNumber(output) === undefined;\n },\n },\n ],\n },\n // forEach? fix one above that tried, but can't verify forEach was used\n // .map\n // filter\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `return an array of the numbers greater than 5 in 'fruits' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, [8, 13, 21]) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 3 items',\n test: function(output) {\n return assert.lengthOf(output, 3) === undefined;\n },\n },\n {\n name: `First item is 8`,\n test: function(output) {\n return assert.deepEqual(output[0], 8) === undefined;\n },\n },\n ],\n },\n // every\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n"]} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/assertion-error/index.js","node_modules/chai/index.js","node_modules/chai/lib/chai.js","node_modules/chai/lib/chai/assertion.js","node_modules/chai/lib/chai/config.js","node_modules/chai/lib/chai/core/assertions.js","node_modules/chai/lib/chai/interface/assert.js","node_modules/chai/lib/chai/interface/expect.js","node_modules/chai/lib/chai/interface/should.js","node_modules/chai/lib/chai/utils/addChainableMethod.js","node_modules/chai/lib/chai/utils/addMethod.js","node_modules/chai/lib/chai/utils/addProperty.js","node_modules/chai/lib/chai/utils/expectTypes.js","node_modules/chai/lib/chai/utils/flag.js","node_modules/chai/lib/chai/utils/getActual.js","node_modules/chai/lib/chai/utils/getEnumerableProperties.js","node_modules/chai/lib/chai/utils/getMessage.js","node_modules/chai/lib/chai/utils/getName.js","node_modules/chai/lib/chai/utils/getPathInfo.js","node_modules/chai/lib/chai/utils/getPathValue.js","node_modules/chai/lib/chai/utils/getProperties.js","node_modules/chai/lib/chai/utils/hasProperty.js","node_modules/chai/lib/chai/utils/index.js","node_modules/chai/lib/chai/utils/inspect.js","node_modules/chai/lib/chai/utils/objDisplay.js","node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","node_modules/chai/lib/chai/utils/overwriteMethod.js","node_modules/chai/lib/chai/utils/overwriteProperty.js","node_modules/chai/lib/chai/utils/test.js","node_modules/chai/lib/chai/utils/transferFlags.js","node_modules/deep-eql/index.js","node_modules/deep-eql/lib/eql.js","node_modules/deep-eql/node_modules/type-detect/index.js","node_modules/deep-eql/node_modules/type-detect/lib/type.js","node_modules/localforage/dist/localforage.js","node_modules/type-detect/lib/type.js","src/js/index.js","src/problems/arrays.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","exclude","excludeProps","res","obj","Object","keys","forEach","key","excludes","indexOf","slice","arguments","args","AssertionError","message","_props","ssf","extend","props","this","showDiff","callee","captureStackTrace","stack","prototype","create","name","constructor","toJSON","used","version","util","use","fn","push","config","assertion","core","expect","should","assert","_chai","Assertion","msg","flag","defineProperty","get","console","warn","includeStack","set","value","addProperty","addMethod","addChainableMethod","chainingBehavior","overwriteProperty","overwriteMethod","overwriteChainableMethod","expr","negateMsg","expected","_actual","ok","test","getMessage","actual","getActual","val","truncateThreshold","chai","_","an","type","toLowerCase","article","charAt","includeChainingBehavior","include","expectTypes","eql","k","property","subset","undefined","inspect","checkArguments","toString","assertEqual","_obj","assertEql","assertAbove","to","have","len","assertLeast","assertBelow","assertMost","assertInstanceOf","getName","assertOwnProperty","hasOwnProperty","assertOwnPropertyDescriptor","descriptor","actualDescriptor","getOwnPropertyDescriptor","assertLengthChain","assertLength","assertMatch","re","exec","assertKeys","str","mixedArgsMsg","Array","any","all","filter","every","map","last","pop","join","sort","assertThrows","errMsg","is","thrown","desiredError","thrownError","RegExp","err","actuallyGot","expectedThrown","respondTo","method","itself","context","satisfy","matcher","result","objDisplay","negate","closeTo","delta","Math","abs","isSubsetOf","superset","cmp","elem","some","elem2","oneOf","list","be","assertChanges","object","prop","initial","assertIncreases","assertDecreases","chain","isNaN","isArray","start","finish","range","isDeep","pathInfo","getPathInfo","hasProperty","exists","isExtensible","TypeError","isSealed","isFrozen","express","errmsg","fail","operator","isOk","isNotOk","not","equal","act","exp","notEqual","strictEqual","notStrictEqual","deepEqual","notDeepEqual","isAbove","abv","above","isAtLeast","atlst","least","isBelow","blw","below","isAtMost","atmst","most","isTrue","isNotTrue","isFalse","isNotFalse","isNull","isNotNull","NaN","isNotNaN","isUndefined","isDefined","isFunction","isNotFunction","isObject","isNotObject","isNotArray","isString","isNotString","isNumber","isNotNumber","isBoolean","isNotBoolean","typeOf","notTypeOf","instanceOf","notInstanceOf","inc","notInclude","match","notMatch","notProperty","deepProperty","deep","notDeepProperty","propertyVal","propertyNotVal","deepPropertyVal","deepPropertyNotVal","lengthOf","throws","errt","errs","assertErr","throw","doesNotThrow","Throw","val2","approximately","sameMembers","set1","set2","same","members","sameDeepMembers","includeMembers","includeDeepMembers","inList","changes","change","doesNotChange","increases","increase","doesNotIncrease","decreases","decrease","doesNotDecrease","ifError","extensible","isNotExtensible","sealed","isNotSealed","frozen","isNotFrozen","alias","as","loadShould","shouldGetter","String","Number","Boolean","valueOf","shouldSetter","enumerable","configurable","writable","val1","exist","Should","transferFlags","hasProtoSupport","excludeNames","Function","apply","ctx","chainableBehavior","__methods","__proto__","getOwnPropertyNames","asserterName","pd","getter","types","index","art","flags","__flags","flagMsg","replace","func","parsePath","path","mArr","parseFloat","p","_getPathValue","parsed","tmp","part","info","parent","proto","getPrototypeOf","literals","number","string","ot","getPathValue","showHidden","depth","colors","formatValue","seen","stylize","recurseTimes","ret","primitive","formatPrimitive","isDOMElement","outerHTML","document","xmlVersion","XMLSerializer","serializeToString","container","createElementNS","appendChild","cloneNode","html","innerHTML","visibleKeys","getEnumerableProperties","getProperties","isError","nameSuffix","isRegExp","isDate","Date","toUTCString","formatError","base","array","braces","output","formatArray","formatProperty","reduceToSingleString","simple","JSON","stringify","Infinity","__lookupGetter__","__lookupSetter__","split","line","substr","numLinesEst","reduce","prev","cur","ar","objectToString","d","HTMLElement","nodeType","nodeName","splice","_chainingBehavior","_method","_super","_get","includeAll","b","m","sameValue","dateEqual","regexpEqual","Buffer","isBuffer","bufferEqual","argumentsEqual","typeEqual","objectEqual","getTime","iterableEqual","isValue","ka","kb","ex","getType","natives","Library","tests","[object Array]","[object RegExp]","[object Function]","[object Arguments]","[object Date]","of","define","ReferenceError","amd","g","window","global","self","localforage","_dereq_","nextTick","draining","oldQueue","queue","immediate","task","scheduleDrain","Mutation","MutationObserver","WebKitMutationObserver","called","observer","element","createTextNode","observe","characterData","data","setImmediate","MessageChannel","createElement","scriptEl","onreadystatechange","parentNode","removeChild","documentElement","setTimeout","channel","port1","onmessage","port2","postMessage","2","INTERNAL","Promise","resolver","state","PENDING","outcome","safelyResolveThenable","QueueItem","promise","onFulfilled","onRejected","callFulfilled","otherCallFulfilled","callRejected","otherCallRejected","unwrap","returnValue","handlers","reject","resolve","getThen","then","thenable","onError","onSuccess","tryToUnwrap","tryCatch","status","out","reason","iterable","values","resolved","resolveFromAll","outValue","error","race","response","REJECTED","FULFILLED","3","4","_classCallCheck","instance","Constructor","createBlob","parts","properties","Blob","Builder","BlobBuilder","MSBlobBuilder","MozBlobBuilder","WebKitBlobBuilder","builder","append","getBlob","executeCallback","callback","executeTwoCallbacks","errorCallback","_binStringToArrayBuffer","bin","buf","ArrayBuffer","arr","Uint8Array","charCodeAt","_checkBlobSupportWithoutCaching","idb","Promise$1","txn","transaction","DETECT_BLOB_SUPPORT_STORE","blob","objectStore","put","onabort","preventDefault","stopPropagation","oncomplete","matchedChrome","navigator","userAgent","matchedEdge","parseInt","_checkBlobSupport","supportsBlobs","_deferReadiness","dbInfo","dbContext","dbContexts","deferredOperation","deferredOperations","dbReady","_advanceReadiness","_getConnection","upgradeNeeded","db","close","dbArgs","openreq","open","onupgradeneeded","createObjectStore","storeName","oldVersion","newVersion","onerror","onsuccess","_getOriginalConnection","_getUpgradedConnection","_isUpgradeNeeded","defaultVersion","isNewStore","objectStoreNames","contains","isDowngrade","isUpgrade","incVersion","_encodeBlob","reader","FileReader","onloadend","base64","btoa","target","__local_forage_encoded_blob","readAsBinaryString","_decodeBlob","encodedBlob","atob","_isEncodedBlob","_fullyReady","_initReady","_dbInfo","_initStorage","options","ignoreErrors","forages","ready","initPromises","j","forage","_defaultConfig","getItem","store","req","iterate","iterator","openCursor","iterationNumber","cursor","setItem","blobSupport","removeItem","clear","count","advanced","advance","stringToBuffer","serializedString","encoded1","encoded2","encoded3","encoded4","bufferLength","buffer","bytes","BASE_CHARS","bufferToString","base64String","substring","serialize","valueType","toString$1","marker","SERIALIZED_MARKER","TYPE_ARRAYBUFFER","TYPE_INT8ARRAY","TYPE_UINT8ARRAY","TYPE_UINT8CLAMPEDARRAY","TYPE_INT16ARRAY","TYPE_UINT16ARRAY","TYPE_INT32ARRAY","TYPE_UINT32ARRAY","TYPE_FLOAT32ARRAY","TYPE_FLOAT64ARRAY","fileReader","onload","BLOB_TYPE_PREFIX","TYPE_BLOB","readAsArrayBuffer","deserialize","SERIALIZED_MARKER_LENGTH","parse","blobType","TYPE_SERIALIZED_MARKER_LENGTH","BLOB_TYPE_PREFIX_REGEX","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","_initStorage$1","dbInfoPromise","openDatabase","description","size","executeSql","serializer","localforageSerializer","getItem$1","results","rows","item","iterate$1","_setItem","retriesLeft","originalValue","sqlError","QUOTA_ERR","setItem$1","removeItem$1","clear$1","length$1","c","key$1","keys$1","_initStorage$2","keyPrefix","clear$2","localStorage","getItem$2","iterate$2","keyPrefixLength","key$2","keys$2","length$2","removeItem$2","setItem$2","callWhenReady","localForageInstance","libraryMethod","_args","arg","isLibraryDriver","driverName","driver","DriverType","_typeof","Symbol","indexedDB","webkitIndexedDB","mozIndexedDB","OIndexedDB","msIndexedDB","asyncStorage","_driver","webSQLStorage","localStorageWrapper","CustomDrivers","INDEXEDDB","LOCALSTORAGE","WEBSQL","DefaultDriverOrder","LibraryMethods","DefaultConfig","driverSupport","isSafari","platform","hasFetch","fetch","IDBKeyRange","LocalForage","_config","_driverSet","_initDriver","_ready","_wrapLibraryMethodsWithReady","setDriver","defineDriver","driverObject","complianceError","namingError","customDriverMethods","concat","customDriverMethod","supportPromise","_support","supportResult","getDriver","getDriverPromise","getSerializer","serializerPromise","drivers","setDriverToConfig","extendSelfWithDriver","_extend","initDriver","supportedDrivers","driverPromiseLoop","currentDriverIndex","_getSupportedDrivers","oldDriverSetDone","supports","libraryMethodsAndProperties","createInstance","localforage_js","objectTypeRegexp","updateLocalstore","log","catch","getRandomIndex","problemsArr","ind","floor","random","currentIndex","getPreviousIndex","getNextIndex","getCurrentProblem","previousProblem","shuffle","problems","location","reload","nextProblem","toggleShuffle","shuffleProblemsButtonEl","classList","toggle","loadProblem","problemObj","currentProblem","problemEl","innerText","prompt","given","codeEl","testSuite","updateTests","testStatus","init","buildTests","updateTestStatus","testsDom","testSuiteEl","testStatuses","allPassed","testPassed","from","querySelectorAll","testStatusEl","iter","remove","add","testTotalEl","printAssertError","errObj","inner","assertConsoleEl","printEvalOutput","evalConsoleEl","runTests","getOutput","evald","eval","testOutcome","loadApp","addEventListener","ignoreKeyCodes","keyCode","previousProblemButtonEl","nextProblemButtonEl","timer","problemNameEl","getElementById","testAreaEl","time","answer"],"mappings":"CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,GAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCeA,QAAAK,KAGA,QAAAC,GAAAC,EAAAC,GACAC,OAAAC,KAAAF,GAAAG,QAAA,SAAAC,IACAC,EAAAC,QAAAF,KAAAL,EAAAK,GAAAJ,EAAAI,MAJA,GA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zR,KAAhC5C,EAAOsJ,UAAU+K,EAAQ,MAIlCnV,KAAM,mBACNsC,KAAM,SAAS6S,GACb,WAAmCzR,KAA5B5C,EAAOqL,SAASgJ,QAS7BnV,KAAM,iBACNkzB,KAAM,GACN1C,OAAA,mFACAC,MAAA,gDACA0C,OAAA,4IAGA/a,QAEIpY,KAAM,iBACNsC,KAAM,SAAS6S,GACb,WAAiDzR,KAA1C5C,EAAOsJ,UAAU+K,GAAS,EAAG,GAAI,QAI1CnV,KAAM,mBACNsC,KAAM,SAAS6S,GACb,WAAkCzR,KAA3B5C,EAAO4H,QAAQyM,MAIxBnV,KAAM,oBACNsC,KAAM,SAAS6S,GACb,WAAsCzR,KAA/B5C,EAAOyM,SAAS4H,EAAQ,MAIjCnV,KAAA,kBACAsC,KAAM,SAAS6S,GACb,WAA0CzR,KAAnC5C,EAAOsJ,UAAU+K,EAAO,GAAI","file":"bundle.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\n * MIT Licensed\n */\n\n/*!\n * Return a function that will copy properties from\n * one object to another excluding any originally\n * listed. Returned function will create a new `{}`.\n *\n * @param {String} excluded properties ...\n * @return {Function}\n */\n\nfunction exclude () {\n var excludes = [].slice.call(arguments);\n\n function excludeProps (res, obj) {\n Object.keys(obj).forEach(function (key) {\n if (!~excludes.indexOf(key)) res[key] = obj[key];\n });\n }\n\n return function extendExclude () {\n var args = [].slice.call(arguments)\n , i = 0\n , res = {};\n\n for (; i < args.length; i++) {\n excludeProps(res, args[i]);\n }\n\n return res;\n };\n};\n\n/*!\n * Primary Exports\n */\n\nmodule.exports = AssertionError;\n\n/**\n * ### AssertionError\n *\n * An extension of the JavaScript `Error` constructor for\n * assertion and validation scenarios.\n *\n * @param {String} message\n * @param {Object} properties to include (optional)\n * @param {callee} start stack function (optional)\n */\n\nfunction AssertionError (message, _props, ssf) {\n var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')\n , props = extend(_props || {});\n\n // default values\n this.message = message || 'Unspecified AssertionError';\n this.showDiff = false;\n\n // copy from properties\n for (var key in props) {\n this[key] = props[key];\n }\n\n // capture stack trace\n ssf = ssf || arguments.callee;\n if (ssf && Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n } else {\n try {\n throw new Error();\n } catch(e) {\n this.stack = e.stack;\n }\n }\n}\n\n/*!\n * Inherit from Error.prototype\n */\n\nAssertionError.prototype = Object.create(Error.prototype);\n\n/*!\n * Statically set name\n */\n\nAssertionError.prototype.name = 'AssertionError';\n\n/*!\n * Ensure correct constructor\n */\n\nAssertionError.prototype.constructor = AssertionError;\n\n/**\n * Allow errors to be converted to JSON for static transfer.\n *\n * @param {Boolean} include stack (default: `true`)\n * @return {Object} object that can be `JSON.stringify`\n */\n\nAssertionError.prototype.toJSON = function (stack) {\n var extend = exclude('constructor', 'toJSON', 'stack')\n , props = extend({ name: this.name }, this);\n\n // include stack if exists and not turned off\n if (false !== stack && this.stack) {\n props.stack = this.stack;\n }\n\n return props;\n};\n","module.exports = require('./lib/chai');\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar used = []\n , exports = module.exports = {};\n\n/*!\n * Chai version\n */\n\nexports.version = '3.5.0';\n\n/*!\n * Assertion Error\n */\n\nexports.AssertionError = require('assertion-error');\n\n/*!\n * Utils for plugins (not exported)\n */\n\nvar util = require('./chai/utils');\n\n/**\n * # .use(function)\n *\n * Provides a way to extend the internals of Chai\n *\n * @param {Function}\n * @returns {this} for chaining\n * @api public\n */\n\nexports.use = function (fn) {\n if (!~used.indexOf(fn)) {\n fn(this, util);\n used.push(fn);\n }\n\n return this;\n};\n\n/*!\n * Utility Functions\n */\n\nexports.util = util;\n\n/*!\n * Configuration\n */\n\nvar config = require('./chai/config');\nexports.config = config;\n\n/*!\n * Primary `Assertion` prototype\n */\n\nvar assertion = require('./chai/assertion');\nexports.use(assertion);\n\n/*!\n * Core Assertions\n */\n\nvar core = require('./chai/core/assertions');\nexports.use(core);\n\n/*!\n * Expect interface\n */\n\nvar expect = require('./chai/interface/expect');\nexports.use(expect);\n\n/*!\n * Should interface\n */\n\nvar should = require('./chai/interface/should');\nexports.use(should);\n\n/*!\n * Assert interface\n */\n\nvar assert = require('./chai/interface/assert');\nexports.use(assert);\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('./config');\n\nmodule.exports = function (_chai, util) {\n /*!\n * Module dependencies.\n */\n\n var AssertionError = _chai.AssertionError\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n _chai.Assertion = Assertion;\n\n /*!\n * Assertion Constructor\n *\n * Creates object for chaining.\n *\n * @api private\n */\n\n function Assertion (obj, msg, stack) {\n flag(this, 'ssfi', stack || arguments.callee);\n flag(this, 'object', obj);\n flag(this, 'message', msg);\n }\n\n Object.defineProperty(Assertion, 'includeStack', {\n get: function() {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n return config.includeStack;\n },\n set: function(value) {\n console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');\n config.includeStack = value;\n }\n });\n\n Object.defineProperty(Assertion, 'showDiff', {\n get: function() {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n return config.showDiff;\n },\n set: function(value) {\n console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');\n config.showDiff = value;\n }\n });\n\n Assertion.addProperty = function (name, fn) {\n util.addProperty(this.prototype, name, fn);\n };\n\n Assertion.addMethod = function (name, fn) {\n util.addMethod(this.prototype, name, fn);\n };\n\n Assertion.addChainableMethod = function (name, fn, chainingBehavior) {\n util.addChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n Assertion.overwriteProperty = function (name, fn) {\n util.overwriteProperty(this.prototype, name, fn);\n };\n\n Assertion.overwriteMethod = function (name, fn) {\n util.overwriteMethod(this.prototype, name, fn);\n };\n\n Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {\n util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);\n };\n\n /**\n * ### .assert(expression, message, negateMessage, expected, actual, showDiff)\n *\n * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.\n *\n * @name assert\n * @param {Philosophical} expression to be tested\n * @param {String|Function} message or function that returns message to display if expression fails\n * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails\n * @param {Mixed} expected value (remember to check for negation)\n * @param {Mixed} actual (optional) will default to `this.obj`\n * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails\n * @api private\n */\n\n Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {\n var ok = util.test(this, arguments);\n if (true !== showDiff) showDiff = false;\n if (true !== config.showDiff) showDiff = false;\n\n if (!ok) {\n var msg = util.getMessage(this, arguments)\n , actual = util.getActual(this, arguments);\n throw new AssertionError(msg, {\n actual: actual\n , expected: expected\n , showDiff: showDiff\n }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));\n }\n };\n\n /*!\n * ### ._obj\n *\n * Quick reference to stored `actual` value for plugin developers.\n *\n * @api private\n */\n\n Object.defineProperty(Assertion.prototype, '_obj',\n { get: function () {\n return flag(this, 'object');\n }\n , set: function (val) {\n flag(this, 'object', val);\n }\n });\n};\n","module.exports = {\n\n /**\n * ### config.includeStack\n *\n * User configurable property, influences whether stack trace\n * is included in Assertion error message. Default of false\n * suppresses stack trace in the error message.\n *\n * chai.config.includeStack = true; // enable stack on error\n *\n * @param {Boolean}\n * @api public\n */\n\n includeStack: false,\n\n /**\n * ### config.showDiff\n *\n * User configurable property, influences whether or not\n * the `showDiff` flag should be included in the thrown\n * AssertionErrors. `false` will always be `false`; `true`\n * will be true when the assertion has requested a diff\n * be shown.\n *\n * @param {Boolean}\n * @api public\n */\n\n showDiff: true,\n\n /**\n * ### config.truncateThreshold\n *\n * User configurable property, sets length threshold for actual and\n * expected values in assertion errors. If this threshold is exceeded, for\n * example for large data structures, the value is replaced with something\n * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.\n *\n * Set it to zero if you want to disable truncating altogether.\n *\n * This is especially userful when doing assertions on arrays: having this\n * set to a reasonable large value makes the failure messages readily\n * inspectable.\n *\n * chai.config.truncateThreshold = 0; // disable truncating\n *\n * @param {Number}\n * @api public\n */\n\n truncateThreshold: 40\n\n};\n","/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion\n , toString = Object.prototype.toString\n , flag = _.flag;\n\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to\n * improve the readability of your assertions. They\n * do not provide testing capabilities unless they\n * have been overwritten by a plugin.\n *\n * **Chains**\n *\n * - to\n * - be\n * - been\n * - is\n * - that\n * - which\n * - and\n * - has\n * - have\n * - with\n * - at\n * - of\n * - same\n *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n [ 'to', 'be', 'been'\n , 'is', 'and', 'has', 'have'\n , 'with', 'that', 'which', 'at'\n , 'of', 'same' ].forEach(function (chain) {\n Assertion.addProperty(chain, function () {\n return this;\n });\n });\n\n /**\n * ### .not\n *\n * Negates any of assertions following in the chain.\n *\n * expect(foo).to.not.equal('bar');\n * expect(goodFn).to.not.throw(Error);\n * expect({ foo: 'baz' }).to.have.property('foo')\n * .and.not.equal('bar');\n *\n * @name not\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('not', function () {\n flag(this, 'negate', true);\n });\n\n /**\n * ### .deep\n *\n * Sets the `deep` flag, later used by the `equal` and\n * `property` assertions.\n *\n * expect(foo).to.deep.equal({ bar: 'baz' });\n * expect({ foo: { bar: { baz: 'quux' } } })\n * .to.have.deep.property('foo.bar.baz', 'quux');\n *\n * `.deep.property` special characters can be escaped\n * by adding two slashes before the `.` or `[]`.\n *\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name deep\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('deep', function () {\n flag(this, 'deep', true);\n });\n\n /**\n * ### .any\n *\n * Sets the `any` flag, (opposite of the `all` flag)\n * later used in the `keys` assertion.\n *\n * expect(foo).to.have.any.keys('bar', 'baz');\n *\n * @name any\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('any', function () {\n flag(this, 'any', true);\n flag(this, 'all', false)\n });\n\n\n /**\n * ### .all\n *\n * Sets the `all` flag (opposite of the `any` flag)\n * later used by the `keys` assertion.\n *\n * expect(foo).to.have.all.keys('bar', 'baz');\n *\n * @name all\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('all', function () {\n flag(this, 'all', true);\n flag(this, 'any', false);\n });\n\n /**\n * ### .a(type)\n *\n * The `a` and `an` assertions are aliases that can be\n * used either as language chains or to assert a value's\n * type.\n *\n * // typeof\n * expect('test').to.be.a('string');\n * expect({ foo: 'bar' }).to.be.an('object');\n * expect(null).to.be.a('null');\n * expect(undefined).to.be.an('undefined');\n * expect(new Error).to.be.an('error');\n * expect(new Promise).to.be.a('promise');\n * expect(new Float32Array()).to.be.a('float32array');\n * expect(Symbol()).to.be.a('symbol');\n *\n * // es6 overrides\n * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');\n *\n * // language chain\n * expect(foo).to.be.an.instanceof(Foo);\n *\n * @name a\n * @alias an\n * @param {String} type\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function an (type, msg) {\n if (msg) flag(this, 'message', msg);\n type = type.toLowerCase();\n var obj = flag(this, 'object')\n , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';\n\n this.assert(\n type === _.type(obj)\n , 'expected #{this} to be ' + article + type\n , 'expected #{this} not to be ' + article + type\n );\n }\n\n Assertion.addChainableMethod('an', an);\n Assertion.addChainableMethod('a', an);\n\n /**\n * ### .include(value)\n *\n * The `include` and `contain` assertions can be used as either property\n * based language chains or as methods to assert the inclusion of an object\n * in an array or a substring in a string. When used as language chains,\n * they toggle the `contains` flag for the `keys` assertion.\n *\n * expect([1,2,3]).to.include(2);\n * expect('foobar').to.contain('foo');\n * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');\n *\n * @name include\n * @alias contain\n * @alias includes\n * @alias contains\n * @param {Object|String|Number} obj\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function includeChainingBehavior () {\n flag(this, 'contains', true);\n }\n\n function include (val, msg) {\n _.expectTypes(this, ['array', 'object', 'string']);\n\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var expected = false;\n\n if (_.type(obj) === 'array' && _.type(val) === 'object') {\n for (var i in obj) {\n if (_.eql(obj[i], val)) {\n expected = true;\n break;\n }\n }\n } else if (_.type(val) === 'object') {\n if (!flag(this, 'negate')) {\n for (var k in val) new Assertion(obj).property(k, val[k]);\n return;\n }\n var subset = {};\n for (var k in val) subset[k] = obj[k];\n expected = _.eql(subset, val);\n } else {\n expected = (obj != undefined) && ~obj.indexOf(val);\n }\n this.assert(\n expected\n , 'expected #{this} to include ' + _.inspect(val)\n , 'expected #{this} to not include ' + _.inspect(val));\n }\n\n Assertion.addChainableMethod('include', include, includeChainingBehavior);\n Assertion.addChainableMethod('contain', include, includeChainingBehavior);\n Assertion.addChainableMethod('contains', include, includeChainingBehavior);\n Assertion.addChainableMethod('includes', include, includeChainingBehavior);\n\n /**\n * ### .ok\n *\n * Asserts that the target is truthy.\n *\n * expect('everything').to.be.ok;\n * expect(1).to.be.ok;\n * expect(false).to.not.be.ok;\n * expect(undefined).to.not.be.ok;\n * expect(null).to.not.be.ok;\n *\n * @name ok\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('ok', function () {\n this.assert(\n flag(this, 'object')\n , 'expected #{this} to be truthy'\n , 'expected #{this} to be falsy');\n });\n\n /**\n * ### .true\n *\n * Asserts that the target is `true`.\n *\n * expect(true).to.be.true;\n * expect(1).to.not.be.true;\n *\n * @name true\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('true', function () {\n this.assert(\n true === flag(this, 'object')\n , 'expected #{this} to be true'\n , 'expected #{this} to be false'\n , this.negate ? false : true\n );\n });\n\n /**\n * ### .false\n *\n * Asserts that the target is `false`.\n *\n * expect(false).to.be.false;\n * expect(0).to.not.be.false;\n *\n * @name false\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('false', function () {\n this.assert(\n false === flag(this, 'object')\n , 'expected #{this} to be false'\n , 'expected #{this} to be true'\n , this.negate ? true : false\n );\n });\n\n /**\n * ### .null\n *\n * Asserts that the target is `null`.\n *\n * expect(null).to.be.null;\n * expect(undefined).to.not.be.null;\n *\n * @name null\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('null', function () {\n this.assert(\n null === flag(this, 'object')\n , 'expected #{this} to be null'\n , 'expected #{this} not to be null'\n );\n });\n\n /**\n * ### .undefined\n *\n * Asserts that the target is `undefined`.\n *\n * expect(undefined).to.be.undefined;\n * expect(null).to.not.be.undefined;\n *\n * @name undefined\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('undefined', function () {\n this.assert(\n undefined === flag(this, 'object')\n , 'expected #{this} to be undefined'\n , 'expected #{this} not to be undefined'\n );\n });\n\n /**\n * ### .NaN\n * Asserts that the target is `NaN`.\n *\n * expect('foo').to.be.NaN;\n * expect(4).not.to.be.NaN;\n *\n * @name NaN\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('NaN', function () {\n this.assert(\n isNaN(flag(this, 'object'))\n , 'expected #{this} to be NaN'\n , 'expected #{this} not to be NaN'\n );\n });\n\n /**\n * ### .exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi'\n * , bar = null\n * , baz;\n *\n * expect(foo).to.exist;\n * expect(bar).to.not.exist;\n * expect(baz).to.not.exist;\n *\n * @name exist\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('exist', function () {\n this.assert(\n null != flag(this, 'object')\n , 'expected #{this} to exist'\n , 'expected #{this} to not exist'\n );\n });\n\n\n /**\n * ### .empty\n *\n * Asserts that the target's length is `0`. For arrays and strings, it checks\n * the `length` property. For objects, it gets the count of\n * enumerable keys.\n *\n * expect([]).to.be.empty;\n * expect('').to.be.empty;\n * expect({}).to.be.empty;\n *\n * @name empty\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('empty', function () {\n var obj = flag(this, 'object')\n , expected = obj;\n\n if (Array.isArray(obj) || 'string' === typeof object) {\n expected = obj.length;\n } else if (typeof obj === 'object') {\n expected = Object.keys(obj).length;\n }\n\n this.assert(\n !expected\n , 'expected #{this} to be empty'\n , 'expected #{this} not to be empty'\n );\n });\n\n /**\n * ### .arguments\n *\n * Asserts that the target is an arguments object.\n *\n * function test () {\n * expect(arguments).to.be.arguments;\n * }\n *\n * @name arguments\n * @alias Arguments\n * @namespace BDD\n * @api public\n */\n\n function checkArguments () {\n var obj = flag(this, 'object')\n , type = Object.prototype.toString.call(obj);\n this.assert(\n '[object Arguments]' === type\n , 'expected #{this} to be arguments but got ' + type\n , 'expected #{this} to not be arguments'\n );\n }\n\n Assertion.addProperty('arguments', checkArguments);\n Assertion.addProperty('Arguments', checkArguments);\n\n /**\n * ### .equal(value)\n *\n * Asserts that the target is strictly equal (`===`) to `value`.\n * Alternately, if the `deep` flag is set, asserts that\n * the target is deeply equal to `value`.\n *\n * expect('hello').to.equal('hello');\n * expect(42).to.equal(42);\n * expect(1).to.not.equal(true);\n * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });\n * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });\n *\n * @name equal\n * @alias equals\n * @alias eq\n * @alias deep.equal\n * @param {Mixed} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEqual (val, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'deep')) {\n return this.eql(val);\n } else {\n this.assert(\n val === obj\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{exp}'\n , val\n , this._obj\n , true\n );\n }\n }\n\n Assertion.addMethod('equal', assertEqual);\n Assertion.addMethod('equals', assertEqual);\n Assertion.addMethod('eq', assertEqual);\n\n /**\n * ### .eql(value)\n *\n * Asserts that the target is deeply equal to `value`.\n *\n * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });\n * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);\n *\n * @name eql\n * @alias eqls\n * @param {Mixed} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertEql(obj, msg) {\n if (msg) flag(this, 'message', msg);\n this.assert(\n _.eql(obj, flag(this, 'object'))\n , 'expected #{this} to deeply equal #{exp}'\n , 'expected #{this} to not deeply equal #{exp}'\n , obj\n , this._obj\n , true\n );\n }\n\n Assertion.addMethod('eql', assertEql);\n Assertion.addMethod('eqls', assertEql);\n\n /**\n * ### .above(value)\n *\n * Asserts that the target is greater than `value`.\n *\n * expect(10).to.be.above(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n *\n * @name above\n * @alias gt\n * @alias greaterThan\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertAbove (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len > n\n , 'expected #{this} to have a length above #{exp} but got #{act}'\n , 'expected #{this} to not have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj > n\n , 'expected #{this} to be above ' + n\n , 'expected #{this} to be at most ' + n\n );\n }\n }\n\n Assertion.addMethod('above', assertAbove);\n Assertion.addMethod('gt', assertAbove);\n Assertion.addMethod('greaterThan', assertAbove);\n\n /**\n * ### .least(value)\n *\n * Asserts that the target is greater than or equal to `value`.\n *\n * expect(10).to.be.at.least(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a minimum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.least(2);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);\n *\n * @name least\n * @alias gte\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLeast (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= n\n , 'expected #{this} to have a length at least #{exp} but got #{act}'\n , 'expected #{this} to have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj >= n\n , 'expected #{this} to be at least ' + n\n , 'expected #{this} to be below ' + n\n );\n }\n }\n\n Assertion.addMethod('least', assertLeast);\n Assertion.addMethod('gte', assertLeast);\n\n /**\n * ### .below(value)\n *\n * Asserts that the target is less than `value`.\n *\n * expect(5).to.be.below(10);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n *\n * @name below\n * @alias lt\n * @alias lessThan\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertBelow (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len < n\n , 'expected #{this} to have a length below #{exp} but got #{act}'\n , 'expected #{this} to not have a length below #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj < n\n , 'expected #{this} to be below ' + n\n , 'expected #{this} to be at least ' + n\n );\n }\n }\n\n Assertion.addMethod('below', assertBelow);\n Assertion.addMethod('lt', assertBelow);\n Assertion.addMethod('lessThan', assertBelow);\n\n /**\n * ### .most(value)\n *\n * Asserts that the target is less than or equal to `value`.\n *\n * expect(5).to.be.at.most(5);\n *\n * Can also be used in conjunction with `length` to\n * assert a maximum length. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.of.at.most(4);\n * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);\n *\n * @name most\n * @alias lte\n * @param {Number} value\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertMost (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len <= n\n , 'expected #{this} to have a length at most #{exp} but got #{act}'\n , 'expected #{this} to have a length above #{exp}'\n , n\n , len\n );\n } else {\n this.assert(\n obj <= n\n , 'expected #{this} to be at most ' + n\n , 'expected #{this} to be above ' + n\n );\n }\n }\n\n Assertion.addMethod('most', assertMost);\n Assertion.addMethod('lte', assertMost);\n\n /**\n * ### .within(start, finish)\n *\n * Asserts that the target is within a range.\n *\n * expect(7).to.be.within(5,10);\n *\n * Can also be used in conjunction with `length` to\n * assert a length range. The benefit being a\n * more informative error message than if the length\n * was supplied directly.\n *\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * @name within\n * @param {Number} start lowerbound inclusive\n * @param {Number} finish upperbound inclusive\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('within', function (start, finish, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , range = start + '..' + finish;\n if (flag(this, 'doLength')) {\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n this.assert(\n len >= start && len <= finish\n , 'expected #{this} to have a length within ' + range\n , 'expected #{this} to not have a length within ' + range\n );\n } else {\n this.assert(\n obj >= start && obj <= finish\n , 'expected #{this} to be within ' + range\n , 'expected #{this} to not be within ' + range\n );\n }\n });\n\n /**\n * ### .instanceof(constructor)\n *\n * Asserts that the target is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , Chai = new Tea('chai');\n *\n * expect(Chai).to.be.an.instanceof(Tea);\n * expect([ 1, 2, 3 ]).to.be.instanceof(Array);\n *\n * @name instanceof\n * @param {Constructor} constructor\n * @param {String} message _optional_\n * @alias instanceOf\n * @namespace BDD\n * @api public\n */\n\n function assertInstanceOf (constructor, msg) {\n if (msg) flag(this, 'message', msg);\n var name = _.getName(constructor);\n this.assert(\n flag(this, 'object') instanceof constructor\n , 'expected #{this} to be an instance of ' + name\n , 'expected #{this} to not be an instance of ' + name\n );\n };\n\n Assertion.addMethod('instanceof', assertInstanceOf);\n Assertion.addMethod('instanceOf', assertInstanceOf);\n\n /**\n * ### .property(name, [value])\n *\n * Asserts that the target has a property `name`, optionally asserting that\n * the value of that property is strictly equal to `value`.\n * If the `deep` flag is set, you can use dot- and bracket-notation for deep\n * references into objects and arrays.\n *\n * // simple referencing\n * var obj = { foo: 'bar' };\n * expect(obj).to.have.property('foo');\n * expect(obj).to.have.property('foo', 'bar');\n *\n * // deep referencing\n * var deepObj = {\n * green: { tea: 'matcha' }\n * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]\n * };\n *\n * expect(deepObj).to.have.deep.property('green.tea', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');\n * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');\n *\n * You can also use an array as the starting point of a `deep.property`\n * assertion, or traverse nested arrays.\n *\n * var arr = [\n * [ 'chai', 'matcha', 'konacha' ]\n * , [ { tea: 'chai' }\n * , { tea: 'matcha' }\n * , { tea: 'konacha' } ]\n * ];\n *\n * expect(arr).to.have.deep.property('[0][1]', 'matcha');\n * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');\n *\n * Furthermore, `property` changes the subject of the assertion\n * to be the value of that property from the original object. This\n * permits for further chainable assertions on that property.\n *\n * expect(obj).to.have.property('foo')\n * .that.is.a('string');\n * expect(deepObj).to.have.property('green')\n * .that.is.an('object')\n * .that.deep.equals({ tea: 'matcha' });\n * expect(deepObj).to.have.property('teas')\n * .that.is.an('array')\n * .with.deep.property('[2]')\n * .that.deep.equals({ tea: 'konacha' });\n *\n * Note that dots and bracket in `name` must be backslash-escaped when\n * the `deep` flag is set, while they must NOT be escaped when the `deep`\n * flag is not set.\n *\n * // simple referencing\n * var css = { '.link[target]': 42 };\n * expect(css).to.have.property('.link[target]', 42);\n *\n * // deep referencing\n * var deepCss = { '.link': { '[target]': 42 }};\n * expect(deepCss).to.have.deep.property('\\\\.link.\\\\[target\\\\]', 42);\n *\n * @name property\n * @alias deep.property\n * @param {String} name\n * @param {Mixed} value (optional)\n * @param {String} message _optional_\n * @returns value of property for chaining\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('property', function (name, val, msg) {\n if (msg) flag(this, 'message', msg);\n\n var isDeep = !!flag(this, 'deep')\n , descriptor = isDeep ? 'deep property ' : 'property '\n , negate = flag(this, 'negate')\n , obj = flag(this, 'object')\n , pathInfo = isDeep ? _.getPathInfo(name, obj) : null\n , hasProperty = isDeep\n ? pathInfo.exists\n : _.hasProperty(name, obj)\n , value = isDeep\n ? pathInfo.value\n : obj[name];\n\n if (negate && arguments.length > 1) {\n if (undefined === value) {\n msg = (msg != null) ? msg + ': ' : '';\n throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));\n }\n } else {\n this.assert(\n hasProperty\n , 'expected #{this} to have a ' + descriptor + _.inspect(name)\n , 'expected #{this} to not have ' + descriptor + _.inspect(name));\n }\n\n if (arguments.length > 1) {\n this.assert(\n val === value\n , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'\n , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'\n , val\n , value\n );\n }\n\n flag(this, 'object', value);\n });\n\n\n /**\n * ### .ownProperty(name)\n *\n * Asserts that the target has an own property `name`.\n *\n * expect('test').to.have.ownProperty('length');\n *\n * @name ownProperty\n * @alias haveOwnProperty\n * @param {String} name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnProperty (name, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n obj.hasOwnProperty(name)\n , 'expected #{this} to have own property ' + _.inspect(name)\n , 'expected #{this} to not have own property ' + _.inspect(name)\n );\n }\n\n Assertion.addMethod('ownProperty', assertOwnProperty);\n Assertion.addMethod('haveOwnProperty', assertOwnProperty);\n\n /**\n * ### .ownPropertyDescriptor(name[, descriptor[, message]])\n *\n * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.\n *\n * expect('test').to.have.ownPropertyDescriptor('length');\n * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });\n * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });\n * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);\n * expect('test').ownPropertyDescriptor('length').to.have.keys('value');\n *\n * @name ownPropertyDescriptor\n * @alias haveOwnPropertyDescriptor\n * @param {String} name\n * @param {Object} descriptor _optional_\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertOwnPropertyDescriptor (name, descriptor, msg) {\n if (typeof descriptor === 'string') {\n msg = descriptor;\n descriptor = null;\n }\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);\n if (actualDescriptor && descriptor) {\n this.assert(\n _.eql(descriptor, actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor)\n , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor)\n , descriptor\n , actualDescriptor\n , true\n );\n } else {\n this.assert(\n actualDescriptor\n , 'expected #{this} to have an own property descriptor for ' + _.inspect(name)\n , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name)\n );\n }\n flag(this, 'object', actualDescriptor);\n }\n\n Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);\n Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);\n\n /**\n * ### .length\n *\n * Sets the `doLength` flag later used as a chain precursor to a value\n * comparison for the `length` property.\n *\n * expect('foo').to.have.length.above(2);\n * expect([ 1, 2, 3 ]).to.have.length.above(2);\n * expect('foo').to.have.length.below(4);\n * expect([ 1, 2, 3 ]).to.have.length.below(4);\n * expect('foo').to.have.length.within(2,4);\n * expect([ 1, 2, 3 ]).to.have.length.within(2,4);\n *\n * *Deprecation notice:* Using `length` as an assertion will be deprecated\n * in version 2.4.0 and removed in 3.0.0. Code using the old style of\n * asserting for `length` property value using `length(value)` should be\n * switched to use `lengthOf(value)` instead.\n *\n * @name length\n * @namespace BDD\n * @api public\n */\n\n /**\n * ### .lengthOf(value[, message])\n *\n * Asserts that the target's `length` property has\n * the expected value.\n *\n * expect([ 1, 2, 3]).to.have.lengthOf(3);\n * expect('foobar').to.have.lengthOf(6);\n *\n * @name lengthOf\n * @param {Number} length\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertLengthChain () {\n flag(this, 'doLength', true);\n }\n\n function assertLength (n, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).to.have.property('length');\n var len = obj.length;\n\n this.assert(\n len == n\n , 'expected #{this} to have a length of #{exp} but got #{act}'\n , 'expected #{this} to not have a length of #{act}'\n , n\n , len\n );\n }\n\n Assertion.addChainableMethod('length', assertLength, assertLengthChain);\n Assertion.addMethod('lengthOf', assertLength);\n\n /**\n * ### .match(regexp)\n *\n * Asserts that the target matches a regular expression.\n *\n * expect('foobar').to.match(/^foo/);\n *\n * @name match\n * @alias matches\n * @param {RegExp} RegularExpression\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n function assertMatch(re, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n this.assert(\n re.exec(obj)\n , 'expected #{this} to match ' + re\n , 'expected #{this} not to match ' + re\n );\n }\n\n Assertion.addMethod('match', assertMatch);\n Assertion.addMethod('matches', assertMatch);\n\n /**\n * ### .string(string)\n *\n * Asserts that the string target contains another string.\n *\n * expect('foobar').to.have.string('bar');\n *\n * @name string\n * @param {String} string\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('string', function (str, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('string');\n\n this.assert(\n ~obj.indexOf(str)\n , 'expected #{this} to contain ' + _.inspect(str)\n , 'expected #{this} to not contain ' + _.inspect(str)\n );\n });\n\n\n /**\n * ### .keys(key1, [key2], [...])\n *\n * Asserts that the target contains any or all of the passed-in keys.\n * Use in combination with `any`, `all`, `contains`, or `have` will affect\n * what will pass.\n *\n * When used in conjunction with `any`, at least one key that is passed\n * in must exist in the target object. This is regardless whether or not\n * the `have` or `contain` qualifiers are used. Note, either `any` or `all`\n * should be used in the assertion. If neither are used, the assertion is\n * defaulted to `all`.\n *\n * When both `all` and `contain` are used, the target object must have at\n * least all of the passed-in keys but may have more keys not listed.\n *\n * When both `all` and `have` are used, the target object must both contain\n * all of the passed-in keys AND the number of keys in the target object must\n * match the number of keys passed in (in other words, a target object must\n * have all and only all of the passed-in keys).\n *\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');\n * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);\n * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});\n * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);\n * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});\n *\n *\n * @name keys\n * @alias key\n * @param {...String|Array|Object} keys\n * @namespace BDD\n * @api public\n */\n\n function assertKeys (keys) {\n var obj = flag(this, 'object')\n , str\n , ok = true\n , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';\n\n switch (_.type(keys)) {\n case \"array\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n break;\n case \"object\":\n if (arguments.length > 1) throw (new Error(mixedArgsMsg));\n keys = Object.keys(keys);\n break;\n default:\n keys = Array.prototype.slice.call(arguments);\n }\n\n if (!keys.length) throw new Error('keys required');\n\n var actual = Object.keys(obj)\n , expected = keys\n , len = keys.length\n , any = flag(this, 'any')\n , all = flag(this, 'all');\n\n if (!any && !all) {\n all = true;\n }\n\n // Has any\n if (any) {\n var intersection = expected.filter(function(key) {\n return ~actual.indexOf(key);\n });\n ok = intersection.length > 0;\n }\n\n // Has all\n if (all) {\n ok = keys.every(function(key){\n return ~actual.indexOf(key);\n });\n if (!flag(this, 'negate') && !flag(this, 'contains')) {\n ok = ok && keys.length == actual.length;\n }\n }\n\n // Key string\n if (len > 1) {\n keys = keys.map(function(key){\n return _.inspect(key);\n });\n var last = keys.pop();\n if (all) {\n str = keys.join(', ') + ', and ' + last;\n }\n if (any) {\n str = keys.join(', ') + ', or ' + last;\n }\n } else {\n str = _.inspect(keys[0]);\n }\n\n // Form\n str = (len > 1 ? 'keys ' : 'key ') + str;\n\n // Have / include\n str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;\n\n // Assertion\n this.assert(\n ok\n , 'expected #{this} to ' + str\n , 'expected #{this} to not ' + str\n , expected.slice(0).sort()\n , actual.sort()\n , true\n );\n }\n\n Assertion.addMethod('keys', assertKeys);\n Assertion.addMethod('key', assertKeys);\n\n /**\n * ### .throw(constructor)\n *\n * Asserts that the function target will throw a specific error, or specific type of error\n * (as determined using `instanceof`), optionally with a RegExp or string inclusion test\n * for the error's message.\n *\n * var err = new ReferenceError('This is a bad function.');\n * var fn = function () { throw err; }\n * expect(fn).to.throw(ReferenceError);\n * expect(fn).to.throw(Error);\n * expect(fn).to.throw(/bad function/);\n * expect(fn).to.not.throw('good function');\n * expect(fn).to.throw(ReferenceError, /bad function/);\n * expect(fn).to.throw(err);\n *\n * Please note that when a throw expectation is negated, it will check each\n * parameter independently, starting with error constructor type. The appropriate way\n * to check for the existence of a type of error but for a message that does not match\n * is to use `and`.\n *\n * expect(fn).to.throw(ReferenceError)\n * .and.not.throw(/good function/);\n *\n * @name throw\n * @alias throws\n * @alias Throw\n * @param {ErrorConstructor} constructor\n * @param {String|RegExp} expected error message\n * @param {String} message _optional_\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @returns error for chaining (null if no error)\n * @namespace BDD\n * @api public\n */\n\n function assertThrows (constructor, errMsg, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n new Assertion(obj, msg).is.a('function');\n\n var thrown = false\n , desiredError = null\n , name = null\n , thrownError = null;\n\n if (arguments.length === 0) {\n errMsg = null;\n constructor = null;\n } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {\n errMsg = constructor;\n constructor = null;\n } else if (constructor && constructor instanceof Error) {\n desiredError = constructor;\n constructor = null;\n errMsg = null;\n } else if (typeof constructor === 'function') {\n name = constructor.prototype.name;\n if (!name || (name === 'Error' && constructor !== Error)) {\n name = constructor.name || (new constructor()).name;\n }\n } else {\n constructor = null;\n }\n\n try {\n obj();\n } catch (err) {\n // first, check desired error\n if (desiredError) {\n this.assert(\n err === desiredError\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp}'\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (err instanceof Error ? err.toString() : err)\n );\n\n flag(this, 'object', err);\n return this;\n }\n\n // next, check constructor\n if (constructor) {\n this.assert(\n err instanceof constructor\n , 'expected #{this} to throw #{exp} but #{act} was thrown'\n , 'expected #{this} to not throw #{exp} but #{act} was thrown'\n , name\n , (err instanceof Error ? err.toString() : err)\n );\n\n if (!errMsg) {\n flag(this, 'object', err);\n return this;\n }\n }\n\n // next, check message\n var message = 'error' === _.type(err) && \"message\" in err\n ? err.message\n : '' + err;\n\n if ((message != null) && errMsg && errMsg instanceof RegExp) {\n this.assert(\n errMsg.exec(message)\n , 'expected #{this} to throw error matching #{exp} but got #{act}'\n , 'expected #{this} to throw error not matching #{exp}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else if ((message != null) && errMsg && 'string' === typeof errMsg) {\n this.assert(\n ~message.indexOf(errMsg)\n , 'expected #{this} to throw error including #{exp} but got #{act}'\n , 'expected #{this} to throw error not including #{act}'\n , errMsg\n , message\n );\n\n flag(this, 'object', err);\n return this;\n } else {\n thrown = true;\n thrownError = err;\n }\n }\n\n var actuallyGot = ''\n , expectedThrown = name !== null\n ? name\n : desiredError\n ? '#{exp}' //_.inspect(desiredError)\n : 'an error';\n\n if (thrown) {\n actuallyGot = ' but #{act} was thrown'\n }\n\n this.assert(\n thrown === true\n , 'expected #{this} to throw ' + expectedThrown + actuallyGot\n , 'expected #{this} to not throw ' + expectedThrown + actuallyGot\n , (desiredError instanceof Error ? desiredError.toString() : desiredError)\n , (thrownError instanceof Error ? thrownError.toString() : thrownError)\n );\n\n flag(this, 'object', thrownError);\n };\n\n Assertion.addMethod('throw', assertThrows);\n Assertion.addMethod('throws', assertThrows);\n Assertion.addMethod('Throw', assertThrows);\n\n /**\n * ### .respondTo(method)\n *\n * Asserts that the object or class target will respond to a method.\n *\n * Klass.prototype.bar = function(){};\n * expect(Klass).to.respondTo('bar');\n * expect(obj).to.respondTo('bar');\n *\n * To check if a constructor will respond to a static function,\n * set the `itself` flag.\n *\n * Klass.baz = function(){};\n * expect(Klass).itself.to.respondTo('baz');\n *\n * @name respondTo\n * @alias respondsTo\n * @param {String} method\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function respondTo (method, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object')\n , itself = flag(this, 'itself')\n , context = ('function' === _.type(obj) && !itself)\n ? obj.prototype[method]\n : obj[method];\n\n this.assert(\n 'function' === typeof context\n , 'expected #{this} to respond to ' + _.inspect(method)\n , 'expected #{this} to not respond to ' + _.inspect(method)\n );\n }\n\n Assertion.addMethod('respondTo', respondTo);\n Assertion.addMethod('respondsTo', respondTo);\n\n /**\n * ### .itself\n *\n * Sets the `itself` flag, later used by the `respondTo` assertion.\n *\n * function Foo() {}\n * Foo.bar = function() {}\n * Foo.prototype.baz = function() {}\n *\n * expect(Foo).itself.to.respondTo('bar');\n * expect(Foo).itself.not.to.respondTo('baz');\n *\n * @name itself\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('itself', function () {\n flag(this, 'itself', true);\n });\n\n /**\n * ### .satisfy(method)\n *\n * Asserts that the target passes a given truth test.\n *\n * expect(1).to.satisfy(function(num) { return num > 0; });\n *\n * @name satisfy\n * @alias satisfies\n * @param {Function} matcher\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function satisfy (matcher, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n var result = matcher(obj);\n this.assert(\n result\n , 'expected #{this} to satisfy ' + _.objDisplay(matcher)\n , 'expected #{this} to not satisfy' + _.objDisplay(matcher)\n , this.negate ? false : true\n , result\n );\n }\n\n Assertion.addMethod('satisfy', satisfy);\n Assertion.addMethod('satisfies', satisfy);\n\n /**\n * ### .closeTo(expected, delta)\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * expect(1.5).to.be.closeTo(1, 0.5);\n *\n * @name closeTo\n * @alias approximately\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function closeTo(expected, delta, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n\n new Assertion(obj, msg).is.a('number');\n if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {\n throw new Error('the arguments to closeTo or approximately must be numbers');\n }\n\n this.assert(\n Math.abs(obj - expected) <= delta\n , 'expected #{this} to be close to ' + expected + ' +/- ' + delta\n , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta\n );\n }\n\n Assertion.addMethod('closeTo', closeTo);\n Assertion.addMethod('approximately', closeTo);\n\n function isSubsetOf(subset, superset, cmp) {\n return subset.every(function(elem) {\n if (!cmp) return superset.indexOf(elem) !== -1;\n\n return superset.some(function(elem2) {\n return cmp(elem, elem2);\n });\n })\n }\n\n /**\n * ### .members(set)\n *\n * Asserts that the target is a superset of `set`,\n * or that the target and `set` have the same strictly-equal (===) members.\n * Alternately, if the `deep` flag is set, set members are compared for deep\n * equality.\n *\n * expect([1, 2, 3]).to.include.members([3, 2]);\n * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);\n *\n * expect([4, 2]).to.have.members([2, 4]);\n * expect([5, 2]).to.not.have.members([5, 2, 1]);\n *\n * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);\n *\n * @name members\n * @param {Array} set\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n Assertion.addMethod('members', function (subset, msg) {\n if (msg) flag(this, 'message', msg);\n var obj = flag(this, 'object');\n\n new Assertion(obj).to.be.an('array');\n new Assertion(subset).to.be.an('array');\n\n var cmp = flag(this, 'deep') ? _.eql : undefined;\n\n if (flag(this, 'contains')) {\n return this.assert(\n isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to be a superset of #{act}'\n , 'expected #{this} to not be a superset of #{act}'\n , obj\n , subset\n );\n }\n\n this.assert(\n isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)\n , 'expected #{this} to have the same members as #{act}'\n , 'expected #{this} to not have the same members as #{act}'\n , obj\n , subset\n );\n });\n\n /**\n * ### .oneOf(list)\n *\n * Assert that a value appears somewhere in the top level of array `list`.\n *\n * expect('a').to.be.oneOf(['a', 'b', 'c']);\n * expect(9).to.not.be.oneOf(['z']);\n * expect([3]).to.not.be.oneOf([1, 2, [3]]);\n *\n * var three = [3];\n * // for object-types, contents are not compared\n * expect(three).to.not.be.oneOf([1, 2, [3]]);\n * // comparing references works\n * expect(three).to.be.oneOf([1, 2, three]);\n *\n * @name oneOf\n * @param {Array<*>} list\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function oneOf (list, msg) {\n if (msg) flag(this, 'message', msg);\n var expected = flag(this, 'object');\n new Assertion(list).to.be.an('array');\n\n this.assert(\n list.indexOf(expected) > -1\n , 'expected #{this} to be one of #{exp}'\n , 'expected #{this} to not be one of #{exp}'\n , list\n , expected\n );\n }\n\n Assertion.addMethod('oneOf', oneOf);\n\n\n /**\n * ### .change(function)\n *\n * Asserts that a function changes an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val += 3 };\n * var noChangeFn = function() { return 'foo' + 'bar'; }\n * expect(fn).to.change(obj, 'val');\n * expect(noChangeFn).to.not.change(obj, 'val')\n *\n * @name change\n * @alias changes\n * @alias Change\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertChanges (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n initial !== object[prop]\n , 'expected .' + prop + ' to change'\n , 'expected .' + prop + ' to not change'\n );\n }\n\n Assertion.addChainableMethod('change', assertChanges);\n Assertion.addChainableMethod('changes', assertChanges);\n\n /**\n * ### .increase(function)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * expect(fn).to.increase(obj, 'val');\n *\n * @name increase\n * @alias increases\n * @alias Increase\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertIncreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial > 0\n , 'expected .' + prop + ' to increase'\n , 'expected .' + prop + ' to not increase'\n );\n }\n\n Assertion.addChainableMethod('increase', assertIncreases);\n Assertion.addChainableMethod('increases', assertIncreases);\n\n /**\n * ### .decrease(function)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * expect(fn).to.decrease(obj, 'val');\n *\n * @name decrease\n * @alias decreases\n * @alias Decrease\n * @param {String} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace BDD\n * @api public\n */\n\n function assertDecreases (object, prop, msg) {\n if (msg) flag(this, 'message', msg);\n var fn = flag(this, 'object');\n new Assertion(object, msg).to.have.property(prop);\n new Assertion(fn).is.a('function');\n\n var initial = object[prop];\n fn();\n\n this.assert(\n object[prop] - initial < 0\n , 'expected .' + prop + ' to decrease'\n , 'expected .' + prop + ' to not decrease'\n );\n }\n\n Assertion.addChainableMethod('decrease', assertDecreases);\n Assertion.addChainableMethod('decreases', assertDecreases);\n\n /**\n * ### .extensible\n *\n * Asserts that the target is extensible (can have new properties added to\n * it).\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect({}).to.be.extensible;\n * expect(nonExtensibleObject).to.not.be.extensible;\n * expect(sealedObject).to.not.be.extensible;\n * expect(frozenObject).to.not.be.extensible;\n *\n * @name extensible\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('extensible', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isExtensible;\n\n try {\n isExtensible = Object.isExtensible(obj);\n } catch (err) {\n if (err instanceof TypeError) isExtensible = false;\n else throw err;\n }\n\n this.assert(\n isExtensible\n , 'expected #{this} to be extensible'\n , 'expected #{this} to not be extensible'\n );\n });\n\n /**\n * ### .sealed\n *\n * Asserts that the target is sealed (cannot have new properties added to it\n * and its existing properties cannot be removed).\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freeze({});\n *\n * expect(sealedObject).to.be.sealed;\n * expect(frozenObject).to.be.sealed;\n * expect({}).to.not.be.sealed;\n *\n * @name sealed\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('sealed', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isSealed;\n\n try {\n isSealed = Object.isSealed(obj);\n } catch (err) {\n if (err instanceof TypeError) isSealed = true;\n else throw err;\n }\n\n this.assert(\n isSealed\n , 'expected #{this} to be sealed'\n , 'expected #{this} to not be sealed'\n );\n });\n\n /**\n * ### .frozen\n *\n * Asserts that the target is frozen (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n *\n * expect(frozenObject).to.be.frozen;\n * expect({}).to.not.be.frozen;\n *\n * @name frozen\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('frozen', function() {\n var obj = flag(this, 'object');\n\n // In ES5, if the argument to this method is not an object (a primitive), then it will cause a TypeError.\n // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen\n // The following provides ES6 behavior when a TypeError is thrown under ES5.\n\n var isFrozen;\n\n try {\n isFrozen = Object.isFrozen(obj);\n } catch (err) {\n if (err instanceof TypeError) isFrozen = true;\n else throw err;\n }\n\n this.assert(\n isFrozen\n , 'expected #{this} to be frozen'\n , 'expected #{this} to not be frozen'\n );\n });\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\n\nmodule.exports = function (chai, util) {\n\n /*!\n * Chai dependencies.\n */\n\n var Assertion = chai.Assertion\n , flag = util.flag;\n\n /*!\n * Module export.\n */\n\n /**\n * ### assert(expression, message)\n *\n * Write your own test expressions.\n *\n * assert('foo' !== 'bar', 'foo is not bar');\n * assert(Array.isArray([]), 'empty arrays are arrays');\n *\n * @param {Mixed} expression to test for truthiness\n * @param {String} message to display on error\n * @name assert\n * @namespace Assert\n * @api public\n */\n\n var assert = chai.assert = function (express, errmsg) {\n var test = new Assertion(null, null, chai.assert);\n test.assert(\n express\n , errmsg\n , '[ negation message unavailable ]'\n );\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure. Node.js `assert` module-compatible.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Assert\n * @api public\n */\n\n assert.fail = function (actual, expected, message, operator) {\n message = message || 'assert.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, assert.fail);\n };\n\n /**\n * ### .isOk(object, [message])\n *\n * Asserts that `object` is truthy.\n *\n * assert.isOk('everything', 'everything is ok');\n * assert.isOk(false, 'this will fail');\n *\n * @name isOk\n * @alias ok\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isOk = function (val, msg) {\n new Assertion(val, msg).is.ok;\n };\n\n /**\n * ### .isNotOk(object, [message])\n *\n * Asserts that `object` is falsy.\n *\n * assert.isNotOk('everything', 'this will fail');\n * assert.isNotOk(false, 'this will pass');\n *\n * @name isNotOk\n * @alias notOk\n * @param {Mixed} object to test\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotOk = function (val, msg) {\n new Assertion(val, msg).is.not.ok;\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * assert.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.equal = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.equal);\n\n test.assert(\n exp == flag(test, 'object')\n , 'expected #{this} to equal #{exp}'\n , 'expected #{this} to not equal #{act}'\n , exp\n , act\n );\n };\n\n /**\n * ### .notEqual(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * assert.notEqual(3, 4, 'these numbers are not equal');\n *\n * @name notEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notEqual = function (act, exp, msg) {\n var test = new Assertion(act, msg, assert.notEqual);\n\n test.assert(\n exp != flag(test, 'object')\n , 'expected #{this} to not equal #{exp}'\n , 'expected #{this} to equal #{act}'\n , exp\n , act\n );\n };\n\n /**\n * ### .strictEqual(actual, expected, [message])\n *\n * Asserts strict equality (`===`) of `actual` and `expected`.\n *\n * assert.strictEqual(true, true, 'these booleans are strictly equal');\n *\n * @name strictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.strictEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.equal(exp);\n };\n\n /**\n * ### .notStrictEqual(actual, expected, [message])\n *\n * Asserts strict inequality (`!==`) of `actual` and `expected`.\n *\n * assert.notStrictEqual(3, '3', 'no coercion for strict equality');\n *\n * @name notStrictEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notStrictEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.not.equal(exp);\n };\n\n /**\n * ### .deepEqual(actual, expected, [message])\n *\n * Asserts that `actual` is deeply equal to `expected`.\n *\n * assert.deepEqual({ tea: 'green' }, { tea: 'green' });\n *\n * @name deepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.eql(exp);\n };\n\n /**\n * ### .notDeepEqual(actual, expected, [message])\n *\n * Assert that `actual` is not deeply equal to `expected`.\n *\n * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });\n *\n * @name notDeepEqual\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepEqual = function (act, exp, msg) {\n new Assertion(act, msg).to.not.eql(exp);\n };\n\n /**\n * ### .isAbove(valueToCheck, valueToBeAbove, [message])\n *\n * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`\n *\n * assert.isAbove(5, 2, '5 is strictly greater than 2');\n *\n * @name isAbove\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAbove\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAbove = function (val, abv, msg) {\n new Assertion(val, msg).to.be.above(abv);\n };\n\n /**\n * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message])\n *\n * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`\n *\n * assert.isAtLeast(5, 2, '5 is greater or equal to 2');\n * assert.isAtLeast(3, 3, '3 is greater or equal to 3');\n *\n * @name isAtLeast\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtLeast\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtLeast = function (val, atlst, msg) {\n new Assertion(val, msg).to.be.least(atlst);\n };\n\n /**\n * ### .isBelow(valueToCheck, valueToBeBelow, [message])\n *\n * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`\n *\n * assert.isBelow(3, 6, '3 is strictly less than 6');\n *\n * @name isBelow\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeBelow\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBelow = function (val, blw, msg) {\n new Assertion(val, msg).to.be.below(blw);\n };\n\n /**\n * ### .isAtMost(valueToCheck, valueToBeAtMost, [message])\n *\n * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`\n *\n * assert.isAtMost(3, 6, '3 is less than or equal to 6');\n * assert.isAtMost(4, 4, '4 is less than or equal to 4');\n *\n * @name isAtMost\n * @param {Mixed} valueToCheck\n * @param {Mixed} valueToBeAtMost\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isAtMost = function (val, atmst, msg) {\n new Assertion(val, msg).to.be.most(atmst);\n };\n\n /**\n * ### .isTrue(value, [message])\n *\n * Asserts that `value` is true.\n *\n * var teaServed = true;\n * assert.isTrue(teaServed, 'the tea has been served');\n *\n * @name isTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isTrue = function (val, msg) {\n new Assertion(val, msg).is['true'];\n };\n\n /**\n * ### .isNotTrue(value, [message])\n *\n * Asserts that `value` is not true.\n *\n * var tea = 'tasty chai';\n * assert.isNotTrue(tea, 'great, time for tea!');\n *\n * @name isNotTrue\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotTrue = function (val, msg) {\n new Assertion(val, msg).to.not.equal(true);\n };\n\n /**\n * ### .isFalse(value, [message])\n *\n * Asserts that `value` is false.\n *\n * var teaServed = false;\n * assert.isFalse(teaServed, 'no tea yet? hmm...');\n *\n * @name isFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFalse = function (val, msg) {\n new Assertion(val, msg).is['false'];\n };\n\n /**\n * ### .isNotFalse(value, [message])\n *\n * Asserts that `value` is not false.\n *\n * var tea = 'tasty chai';\n * assert.isNotFalse(tea, 'great, time for tea!');\n *\n * @name isNotFalse\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFalse = function (val, msg) {\n new Assertion(val, msg).to.not.equal(false);\n };\n\n /**\n * ### .isNull(value, [message])\n *\n * Asserts that `value` is null.\n *\n * assert.isNull(err, 'there was no error');\n *\n * @name isNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNull = function (val, msg) {\n new Assertion(val, msg).to.equal(null);\n };\n\n /**\n * ### .isNotNull(value, [message])\n *\n * Asserts that `value` is not null.\n *\n * var tea = 'tasty chai';\n * assert.isNotNull(tea, 'great, time for tea!');\n *\n * @name isNotNull\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNull = function (val, msg) {\n new Assertion(val, msg).to.not.equal(null);\n };\n\n /**\n * ### .isNaN\n * Asserts that value is NaN\n *\n * assert.isNaN('foo', 'foo is NaN');\n *\n * @name isNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNaN = function (val, msg) {\n new Assertion(val, msg).to.be.NaN;\n };\n\n /**\n * ### .isNotNaN\n * Asserts that value is not NaN\n *\n * assert.isNotNaN(4, '4 is not NaN');\n *\n * @name isNotNaN\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n assert.isNotNaN = function (val, msg) {\n new Assertion(val, msg).not.to.be.NaN;\n };\n\n /**\n * ### .isUndefined(value, [message])\n *\n * Asserts that `value` is `undefined`.\n *\n * var tea;\n * assert.isUndefined(tea, 'no tea defined');\n *\n * @name isUndefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isUndefined = function (val, msg) {\n new Assertion(val, msg).to.equal(undefined);\n };\n\n /**\n * ### .isDefined(value, [message])\n *\n * Asserts that `value` is not `undefined`.\n *\n * var tea = 'cup of chai';\n * assert.isDefined(tea, 'tea has been defined');\n *\n * @name isDefined\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isDefined = function (val, msg) {\n new Assertion(val, msg).to.not.equal(undefined);\n };\n\n /**\n * ### .isFunction(value, [message])\n *\n * Asserts that `value` is a function.\n *\n * function serveTea() { return 'cup of tea'; };\n * assert.isFunction(serveTea, 'great, we can have tea now');\n *\n * @name isFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isFunction = function (val, msg) {\n new Assertion(val, msg).to.be.a('function');\n };\n\n /**\n * ### .isNotFunction(value, [message])\n *\n * Asserts that `value` is _not_ a function.\n *\n * var serveTea = [ 'heat', 'pour', 'sip' ];\n * assert.isNotFunction(serveTea, 'great, we have listed the steps');\n *\n * @name isNotFunction\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFunction = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('function');\n };\n\n /**\n * ### .isObject(value, [message])\n *\n * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`).\n * _The assertion does not match subclassed objects._\n *\n * var selection = { name: 'Chai', serve: 'with spices' };\n * assert.isObject(selection, 'tea selection is an object');\n *\n * @name isObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isObject = function (val, msg) {\n new Assertion(val, msg).to.be.a('object');\n };\n\n /**\n * ### .isNotObject(value, [message])\n *\n * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`).\n *\n * var selection = 'chai'\n * assert.isNotObject(selection, 'tea selection is not an object');\n * assert.isNotObject(null, 'null is not an object');\n *\n * @name isNotObject\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotObject = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('object');\n };\n\n /**\n * ### .isArray(value, [message])\n *\n * Asserts that `value` is an array.\n *\n * var menu = [ 'green', 'chai', 'oolong' ];\n * assert.isArray(menu, 'what kind of tea do we want?');\n *\n * @name isArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isArray = function (val, msg) {\n new Assertion(val, msg).to.be.an('array');\n };\n\n /**\n * ### .isNotArray(value, [message])\n *\n * Asserts that `value` is _not_ an array.\n *\n * var menu = 'green|chai|oolong';\n * assert.isNotArray(menu, 'what kind of tea do we want?');\n *\n * @name isNotArray\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotArray = function (val, msg) {\n new Assertion(val, msg).to.not.be.an('array');\n };\n\n /**\n * ### .isString(value, [message])\n *\n * Asserts that `value` is a string.\n *\n * var teaOrder = 'chai';\n * assert.isString(teaOrder, 'order placed');\n *\n * @name isString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isString = function (val, msg) {\n new Assertion(val, msg).to.be.a('string');\n };\n\n /**\n * ### .isNotString(value, [message])\n *\n * Asserts that `value` is _not_ a string.\n *\n * var teaOrder = 4;\n * assert.isNotString(teaOrder, 'order placed');\n *\n * @name isNotString\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotString = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('string');\n };\n\n /**\n * ### .isNumber(value, [message])\n *\n * Asserts that `value` is a number.\n *\n * var cups = 2;\n * assert.isNumber(cups, 'how many cups');\n *\n * @name isNumber\n * @param {Number} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNumber = function (val, msg) {\n new Assertion(val, msg).to.be.a('number');\n };\n\n /**\n * ### .isNotNumber(value, [message])\n *\n * Asserts that `value` is _not_ a number.\n *\n * var cups = '2 cups please';\n * assert.isNotNumber(cups, 'how many cups');\n *\n * @name isNotNumber\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotNumber = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('number');\n };\n\n /**\n * ### .isBoolean(value, [message])\n *\n * Asserts that `value` is a boolean.\n *\n * var teaReady = true\n * , teaServed = false;\n *\n * assert.isBoolean(teaReady, 'is the tea ready');\n * assert.isBoolean(teaServed, 'has tea been served');\n *\n * @name isBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isBoolean = function (val, msg) {\n new Assertion(val, msg).to.be.a('boolean');\n };\n\n /**\n * ### .isNotBoolean(value, [message])\n *\n * Asserts that `value` is _not_ a boolean.\n *\n * var teaReady = 'yep'\n * , teaServed = 'nope';\n *\n * assert.isNotBoolean(teaReady, 'is the tea ready');\n * assert.isNotBoolean(teaServed, 'has tea been served');\n *\n * @name isNotBoolean\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.isNotBoolean = function (val, msg) {\n new Assertion(val, msg).to.not.be.a('boolean');\n };\n\n /**\n * ### .typeOf(value, name, [message])\n *\n * Asserts that `value`'s type is `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');\n * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');\n * assert.typeOf('tea', 'string', 'we have a string');\n * assert.typeOf(/tea/, 'regexp', 'we have a regular expression');\n * assert.typeOf(null, 'null', 'we have a null');\n * assert.typeOf(undefined, 'undefined', 'we have an undefined');\n *\n * @name typeOf\n * @param {Mixed} value\n * @param {String} name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.typeOf = function (val, type, msg) {\n new Assertion(val, msg).to.be.a(type);\n };\n\n /**\n * ### .notTypeOf(value, name, [message])\n *\n * Asserts that `value`'s type is _not_ `name`, as determined by\n * `Object.prototype.toString`.\n *\n * assert.notTypeOf('tea', 'number', 'strings are not numbers');\n *\n * @name notTypeOf\n * @param {Mixed} value\n * @param {String} typeof name\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notTypeOf = function (val, type, msg) {\n new Assertion(val, msg).to.not.be.a(type);\n };\n\n /**\n * ### .instanceOf(object, constructor, [message])\n *\n * Asserts that `value` is an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new Tea('chai');\n *\n * assert.instanceOf(chai, Tea, 'chai is an instance of tea');\n *\n * @name instanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.instanceOf = function (val, type, msg) {\n new Assertion(val, msg).to.be.instanceOf(type);\n };\n\n /**\n * ### .notInstanceOf(object, constructor, [message])\n *\n * Asserts `value` is not an instance of `constructor`.\n *\n * var Tea = function (name) { this.name = name; }\n * , chai = new String('chai');\n *\n * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');\n *\n * @name notInstanceOf\n * @param {Object} object\n * @param {Constructor} constructor\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInstanceOf = function (val, type, msg) {\n new Assertion(val, msg).to.not.be.instanceOf(type);\n };\n\n /**\n * ### .include(haystack, needle, [message])\n *\n * Asserts that `haystack` includes `needle`. Works\n * for strings and arrays.\n *\n * assert.include('foobar', 'bar', 'foobar contains string \"bar\"');\n * assert.include([ 1, 2, 3 ], 3, 'array contains value');\n *\n * @name include\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.include = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.include).include(inc);\n };\n\n /**\n * ### .notInclude(haystack, needle, [message])\n *\n * Asserts that `haystack` does not include `needle`. Works\n * for strings and arrays.\n *\n * assert.notInclude('foobar', 'baz', 'string not include substring');\n * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');\n *\n * @name notInclude\n * @param {Array|String} haystack\n * @param {Mixed} needle\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notInclude = function (exp, inc, msg) {\n new Assertion(exp, msg, assert.notInclude).not.include(inc);\n };\n\n /**\n * ### .match(value, regexp, [message])\n *\n * Asserts that `value` matches the regular expression `regexp`.\n *\n * assert.match('foobar', /^foo/, 'regexp matches');\n *\n * @name match\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.match = function (exp, re, msg) {\n new Assertion(exp, msg).to.match(re);\n };\n\n /**\n * ### .notMatch(value, regexp, [message])\n *\n * Asserts that `value` does not match the regular expression `regexp`.\n *\n * assert.notMatch('foobar', /^foo/, 'regexp does not match');\n *\n * @name notMatch\n * @param {Mixed} value\n * @param {RegExp} regexp\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notMatch = function (exp, re, msg) {\n new Assertion(exp, msg).to.not.match(re);\n };\n\n /**\n * ### .property(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`.\n *\n * assert.property({ tea: { green: 'matcha' }}, 'tea');\n *\n * @name property\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.property = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.property(prop);\n };\n\n /**\n * ### .notProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property`.\n *\n * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');\n *\n * @name notProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.property(prop);\n };\n\n /**\n * ### .deepProperty(object, property, [message])\n *\n * Asserts that `object` has a property named by `property`, which can be a\n * string using dot- and bracket-notation for deep reference.\n *\n * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');\n *\n * @name deepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop);\n };\n\n /**\n * ### .notDeepProperty(object, property, [message])\n *\n * Asserts that `object` does _not_ have a property named by `property`, which\n * can be a string using dot- and bracket-notation for deep reference.\n *\n * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');\n *\n * @name notDeepProperty\n * @param {Object} object\n * @param {String} property\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.notDeepProperty = function (obj, prop, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop);\n };\n\n /**\n * ### .propertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`.\n *\n * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');\n *\n * @name propertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.propertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.have.property(prop, val);\n };\n\n /**\n * ### .propertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`.\n *\n * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');\n *\n * @name propertyNotVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.propertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.property(prop, val);\n };\n\n /**\n * ### .deepPropertyVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property` with value given\n * by `value`. `property` can use dot- and bracket-notation for deep\n * reference.\n *\n * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');\n *\n * @name deepPropertyVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepPropertyVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.have.deep.property(prop, val);\n };\n\n /**\n * ### .deepPropertyNotVal(object, property, value, [message])\n *\n * Asserts that `object` has a property named by `property`, but with a value\n * different from that given by `value`. `property` can use dot- and\n * bracket-notation for deep reference.\n *\n * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');\n *\n * @name deepPropertyNotVal\n * @param {Object} object\n * @param {String} property\n * @param {Mixed} value\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.deepPropertyNotVal = function (obj, prop, val, msg) {\n new Assertion(obj, msg).to.not.have.deep.property(prop, val);\n };\n\n /**\n * ### .lengthOf(object, length, [message])\n *\n * Asserts that `object` has a `length` property with the expected value.\n *\n * assert.lengthOf([1,2,3], 3, 'array has length of 3');\n * assert.lengthOf('foobar', 6, 'string has length of 6');\n *\n * @name lengthOf\n * @param {Mixed} object\n * @param {Number} length\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.lengthOf = function (exp, len, msg) {\n new Assertion(exp, msg).to.have.length(len);\n };\n\n /**\n * ### .throws(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * assert.throws(fn, 'function throws a reference error');\n * assert.throws(fn, /function throws a reference error/);\n * assert.throws(fn, ReferenceError);\n * assert.throws(fn, ReferenceError, 'function throws a reference error');\n * assert.throws(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throws\n * @alias throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.throws = function (fn, errt, errs, msg) {\n if ('string' === typeof errt || errt instanceof RegExp) {\n errs = errt;\n errt = null;\n }\n\n var assertErr = new Assertion(fn, msg).to.throw(errt, errs);\n return flag(assertErr, 'object');\n };\n\n /**\n * ### .doesNotThrow(function, [constructor/regexp], [message])\n *\n * Asserts that `function` will _not_ throw an error that is an instance of\n * `constructor`, or alternately that it will not throw an error with message\n * matching `regexp`.\n *\n * assert.doesNotThrow(fn, Error, 'function does not throw');\n *\n * @name doesNotThrow\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotThrow = function (fn, type, msg) {\n if ('string' === typeof type) {\n msg = type;\n type = null;\n }\n\n new Assertion(fn, msg).to.not.Throw(type);\n };\n\n /**\n * ### .operator(val1, operator, val2, [message])\n *\n * Compares two values using `operator`.\n *\n * assert.operator(1, '<', 2, 'everything is ok');\n * assert.operator(1, '>', 2, 'this will fail');\n *\n * @name operator\n * @param {Mixed} val1\n * @param {String} operator\n * @param {Mixed} val2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.operator = function (val, operator, val2, msg) {\n var ok;\n switch(operator) {\n case '==':\n ok = val == val2;\n break;\n case '===':\n ok = val === val2;\n break;\n case '>':\n ok = val > val2;\n break;\n case '>=':\n ok = val >= val2;\n break;\n case '<':\n ok = val < val2;\n break;\n case '<=':\n ok = val <= val2;\n break;\n case '!=':\n ok = val != val2;\n break;\n case '!==':\n ok = val !== val2;\n break;\n default:\n throw new Error('Invalid operator \"' + operator + '\"');\n }\n var test = new Assertion(ok, msg);\n test.assert(\n true === flag(test, 'object')\n , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)\n , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );\n };\n\n /**\n * ### .closeTo(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.closeTo(1.5, 1, 0.5, 'numbers are close');\n *\n * @name closeTo\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.closeTo = function (act, exp, delta, msg) {\n new Assertion(act, msg).to.be.closeTo(exp, delta);\n };\n\n /**\n * ### .approximately(actual, expected, delta, [message])\n *\n * Asserts that the target is equal `expected`, to within a +/- `delta` range.\n *\n * assert.approximately(1.5, 1, 0.5, 'numbers are close');\n *\n * @name approximately\n * @param {Number} actual\n * @param {Number} expected\n * @param {Number} delta\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.approximately = function (act, exp, delta, msg) {\n new Assertion(act, msg).to.be.approximately(exp, delta);\n };\n\n /**\n * ### .sameMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members.\n * Order is not taken into account.\n *\n * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');\n *\n * @name sameMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameMembers = function (set1, set2, msg) {\n new Assertion(set1, msg).to.have.same.members(set2);\n }\n\n /**\n * ### .sameDeepMembers(set1, set2, [message])\n *\n * Asserts that `set1` and `set2` have the same members - using a deep equality checking.\n * Order is not taken into account.\n *\n * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members');\n *\n * @name sameDeepMembers\n * @param {Array} set1\n * @param {Array} set2\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.sameDeepMembers = function (set1, set2, msg) {\n new Assertion(set1, msg).to.have.same.deep.members(set2);\n }\n\n /**\n * ### .includeMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset`.\n * Order is not taken into account.\n *\n * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');\n *\n * @name includeMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeMembers = function (superset, subset, msg) {\n new Assertion(superset, msg).to.include.members(subset);\n }\n\n /**\n * ### .includeDeepMembers(superset, subset, [message])\n *\n * Asserts that `subset` is included in `superset` - using deep equality checking.\n * Order is not taken into account.\n * Duplicates are ignored.\n *\n * assert.includeDeepMembers([ {a: 1}, {b: 2}, {c: 3} ], [ {b: 2}, {a: 1}, {b: 2} ], 'include deep members');\n *\n * @name includeDeepMembers\n * @param {Array} superset\n * @param {Array} subset\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.includeDeepMembers = function (superset, subset, msg) {\n new Assertion(superset, msg).to.include.deep.members(subset);\n }\n\n /**\n * ### .oneOf(inList, list, [message])\n *\n * Asserts that non-object, non-array value `inList` appears in the flat array `list`.\n *\n * assert.oneOf(1, [ 2, 1 ], 'Not found in list');\n *\n * @name oneOf\n * @param {*} inList\n * @param {Array<*>} list\n * @param {String} message\n * @namespace Assert\n * @api public\n */\n\n assert.oneOf = function (inList, list, msg) {\n new Assertion(inList, msg).to.be.oneOf(list);\n }\n\n /**\n * ### .changes(function, object, property)\n *\n * Asserts that a function changes the value of a property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 22 };\n * assert.changes(fn, obj, 'val');\n *\n * @name changes\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.changes = function (fn, obj, prop) {\n new Assertion(fn).to.change(obj, prop);\n }\n\n /**\n * ### .doesNotChange(function, object, property)\n *\n * Asserts that a function does not changes the value of a property\n *\n * var obj = { val: 10 };\n * var fn = function() { console.log('foo'); };\n * assert.doesNotChange(fn, obj, 'val');\n *\n * @name doesNotChange\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotChange = function (fn, obj, prop) {\n new Assertion(fn).to.not.change(obj, prop);\n }\n\n /**\n * ### .increases(function, object, property)\n *\n * Asserts that a function increases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 13 };\n * assert.increases(fn, obj, 'val');\n *\n * @name increases\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.increases = function (fn, obj, prop) {\n new Assertion(fn).to.increase(obj, prop);\n }\n\n /**\n * ### .doesNotIncrease(function, object, property)\n *\n * Asserts that a function does not increase object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 8 };\n * assert.doesNotIncrease(fn, obj, 'val');\n *\n * @name doesNotIncrease\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotIncrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.increase(obj, prop);\n }\n\n /**\n * ### .decreases(function, object, property)\n *\n * Asserts that a function decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 5 };\n * assert.decreases(fn, obj, 'val');\n *\n * @name decreases\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.decreases = function (fn, obj, prop) {\n new Assertion(fn).to.decrease(obj, prop);\n }\n\n /**\n * ### .doesNotDecrease(function, object, property)\n *\n * Asserts that a function does not decreases an object property\n *\n * var obj = { val: 10 };\n * var fn = function() { obj.val = 15 };\n * assert.doesNotDecrease(fn, obj, 'val');\n *\n * @name doesNotDecrease\n * @param {Function} modifier function\n * @param {Object} object\n * @param {String} property name\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.doesNotDecrease = function (fn, obj, prop) {\n new Assertion(fn).to.not.decrease(obj, prop);\n }\n\n /*!\n * ### .ifError(object)\n *\n * Asserts if value is not a false value, and throws if it is a true value.\n * This is added to allow for chai to be a drop-in replacement for Node's\n * assert class.\n *\n * var err = new Error('I am a custom error');\n * assert.ifError(err); // Rethrows err!\n *\n * @name ifError\n * @param {Object} object\n * @namespace Assert\n * @api public\n */\n\n assert.ifError = function (val) {\n if (val) {\n throw(val);\n }\n };\n\n /**\n * ### .isExtensible(object)\n *\n * Asserts that `object` is extensible (can have new properties added to it).\n *\n * assert.isExtensible({});\n *\n * @name isExtensible\n * @alias extensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isExtensible = function (obj, msg) {\n new Assertion(obj, msg).to.be.extensible;\n };\n\n /**\n * ### .isNotExtensible(object)\n *\n * Asserts that `object` is _not_ extensible.\n *\n * var nonExtensibleObject = Object.preventExtensions({});\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.freese({});\n *\n * assert.isNotExtensible(nonExtensibleObject);\n * assert.isNotExtensible(sealedObject);\n * assert.isNotExtensible(frozenObject);\n *\n * @name isNotExtensible\n * @alias notExtensible\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotExtensible = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.extensible;\n };\n\n /**\n * ### .isSealed(object)\n *\n * Asserts that `object` is sealed (cannot have new properties added to it\n * and its existing properties cannot be removed).\n *\n * var sealedObject = Object.seal({});\n * var frozenObject = Object.seal({});\n *\n * assert.isSealed(sealedObject);\n * assert.isSealed(frozenObject);\n *\n * @name isSealed\n * @alias sealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isSealed = function (obj, msg) {\n new Assertion(obj, msg).to.be.sealed;\n };\n\n /**\n * ### .isNotSealed(object)\n *\n * Asserts that `object` is _not_ sealed.\n *\n * assert.isNotSealed({});\n *\n * @name isNotSealed\n * @alias notSealed\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotSealed = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.sealed;\n };\n\n /**\n * ### .isFrozen(object)\n *\n * Asserts that `object` is frozen (cannot have new properties added to it\n * and its existing properties cannot be modified).\n *\n * var frozenObject = Object.freeze({});\n * assert.frozen(frozenObject);\n *\n * @name isFrozen\n * @alias frozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isFrozen = function (obj, msg) {\n new Assertion(obj, msg).to.be.frozen;\n };\n\n /**\n * ### .isNotFrozen(object)\n *\n * Asserts that `object` is _not_ frozen.\n *\n * assert.isNotFrozen({});\n *\n * @name isNotFrozen\n * @alias notFrozen\n * @param {Object} object\n * @param {String} message _optional_\n * @namespace Assert\n * @api public\n */\n\n assert.isNotFrozen = function (obj, msg) {\n new Assertion(obj, msg).to.not.be.frozen;\n };\n\n /*!\n * Aliases.\n */\n\n (function alias(name, as){\n assert[as] = assert[name];\n return alias;\n })\n ('isOk', 'ok')\n ('isNotOk', 'notOk')\n ('throws', 'throw')\n ('throws', 'Throw')\n ('isExtensible', 'extensible')\n ('isNotExtensible', 'notExtensible')\n ('isSealed', 'sealed')\n ('isNotSealed', 'notSealed')\n ('isFrozen', 'frozen')\n ('isNotFrozen', 'notFrozen');\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n chai.expect = function (val, message) {\n return new chai.Assertion(val, message);\n };\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Expect\n * @api public\n */\n\n chai.expect.fail = function (actual, expected, message, operator) {\n message = message || 'expect.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, chai.expect.fail);\n };\n};\n","/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer \n * MIT Licensed\n */\n\nmodule.exports = function (chai, util) {\n var Assertion = chai.Assertion;\n\n function loadShould () {\n // explicitly define this method as function as to have it's name to include as `ssfi`\n function shouldGetter() {\n if (this instanceof String || this instanceof Number || this instanceof Boolean ) {\n return new Assertion(this.valueOf(), null, shouldGetter);\n }\n return new Assertion(this, null, shouldGetter);\n }\n function shouldSetter(value) {\n // See https://github.com/chaijs/chai/issues/86: this makes\n // `whatever.should = someValue` actually set `someValue`, which is\n // especially useful for `global.should = require('chai').should()`.\n //\n // Note that we have to use [[DefineProperty]] instead of [[Put]]\n // since otherwise we would trigger this very setter!\n Object.defineProperty(this, 'should', {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n }\n // modify Object.prototype to have `should`\n Object.defineProperty(Object.prototype, 'should', {\n set: shouldSetter\n , get: shouldGetter\n , configurable: true\n });\n\n var should = {};\n\n /**\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace Should\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\n message = message || 'should.fail()';\n throw new chai.AssertionError(message, {\n actual: actual\n , expected: expected\n , operator: operator\n }, should.fail);\n };\n\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * should.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * should.throw(fn, 'function throws a reference error');\n * should.throw(fn, /function throws a reference error/);\n * should.throw(fn, ReferenceError);\n * should.throw(fn, ReferenceError, 'function throws a reference error');\n * should.throw(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.Throw(errt, errs);\n };\n\n /**\n * ### .exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var foo = 'hi';\n *\n * should.exist(foo, 'foo exists');\n *\n * @name exist\n * @namespace Should\n * @api public\n */\n\n should.exist = function (val, msg) {\n new Assertion(val, msg).to.exist;\n }\n\n // negation\n should.not = {}\n\n /**\n * ### .not.equal(actual, expected, [message])\n *\n * Asserts non-strict inequality (`!=`) of `actual` and `expected`.\n *\n * should.not.equal(3, 4, 'these numbers are not equal');\n *\n * @name not.equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n should.not.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.not.equal(val2);\n };\n\n /**\n * ### .throw(function, [constructor/regexp], [message])\n *\n * Asserts that `function` will _not_ throw an error that is an instance of\n * `constructor`, or alternately that it will not throw an error with message\n * matching `regexp`.\n *\n * should.not.throw(fn, Error, 'function does not throw');\n *\n * @name not.throw\n * @alias not.Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n * @param {String} message\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types\n * @namespace Should\n * @api public\n */\n\n should.not.Throw = function (fn, errt, errs, msg) {\n new Assertion(fn, msg).to.not.Throw(errt, errs);\n };\n\n /**\n * ### .not.exist\n *\n * Asserts that the target is neither `null` nor `undefined`.\n *\n * var bar = null;\n *\n * should.not.exist(bar, 'bar does not exist');\n *\n * @name not.exist\n * @namespace Should\n * @api public\n */\n\n should.not.exist = function (val, msg) {\n new Assertion(val, msg).to.not.exist;\n }\n\n should['throw'] = should['Throw'];\n should.not['throw'] = should.not['Throw'];\n\n return should;\n };\n\n chai.should = loadShould;\n chai.Should = loadShould;\n};\n","/*!\n * Chai - addChainingMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar transferFlags = require('./transferFlags');\nvar flag = require('./flag');\nvar config = require('../config');\n\n/*!\n * Module variables\n */\n\n// Check whether `__proto__` is supported\nvar hasProtoSupport = '__proto__' in Object;\n\n// Without `__proto__` support, this module will need to add properties to a function.\n// However, some Function.prototype methods cannot be overwritten,\n// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).\nvar excludeNames = /^(?:length|name|arguments|caller)$/;\n\n// Cache `Function` properties\nvar call = Function.prototype.call,\n apply = Function.prototype.apply;\n\n/**\n * ### addChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Adds a method to an object, such that the method can also be chained.\n *\n * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);\n *\n * The result can then be used as both a method assertion, executing both `method` and\n * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.\n *\n * expect(fooStr).to.be.foo('bar');\n * expect(fooStr).to.be.foo.equal('foo');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for `name`, when called\n * @param {Function} chainingBehavior function to be called every time the property is accessed\n * @namespace Utils\n * @name addChainableMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method, chainingBehavior) {\n if (typeof chainingBehavior !== 'function') {\n chainingBehavior = function () { };\n }\n\n var chainableBehavior = {\n method: method\n , chainingBehavior: chainingBehavior\n };\n\n // save the methods so we can overwrite them later, if we need to.\n if (!ctx.__methods) {\n ctx.__methods = {};\n }\n ctx.__methods[name] = chainableBehavior;\n\n Object.defineProperty(ctx, name,\n { get: function () {\n chainableBehavior.chainingBehavior.call(this);\n\n var assert = function assert() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', assert);\n var result = chainableBehavior.method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n\n // Use `__proto__` if available\n if (hasProtoSupport) {\n // Inherit all properties from the object by replacing the `Function` prototype\n var prototype = assert.__proto__ = Object.create(this);\n // Restore the `call` and `apply` methods from `Function`\n prototype.call = call;\n prototype.apply = apply;\n }\n // Otherwise, redefine all properties (slow!)\n else {\n var asserterNames = Object.getOwnPropertyNames(ctx);\n asserterNames.forEach(function (asserterName) {\n if (!excludeNames.test(asserterName)) {\n var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);\n Object.defineProperty(assert, asserterName, pd);\n }\n });\n }\n\n transferFlags(this, assert);\n return assert;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - addMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\n\n/**\n * ### .addMethod (ctx, name, method)\n *\n * Adds a method to the prototype of an object.\n *\n * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.equal(str);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(fooStr).to.be.foo('bar');\n *\n * @param {Object} ctx object to which the method is added\n * @param {String} name of method to add\n * @param {Function} method function to be used for name\n * @namespace Utils\n * @name addMethod\n * @api public\n */\nvar flag = require('./flag');\n\nmodule.exports = function (ctx, name, method) {\n ctx[name] = function () {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', ctx[name]);\n var result = method.apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - addProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar config = require('../config');\nvar flag = require('./flag');\n\n/**\n * ### addProperty (ctx, name, getter)\n *\n * Adds a property to the prototype of an object.\n *\n * utils.addProperty(chai.Assertion.prototype, 'foo', function () {\n * var obj = utils.flag(this, 'object');\n * new chai.Assertion(obj).to.be.instanceof(Foo);\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.addProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.foo;\n *\n * @param {Object} ctx object to which the property is added\n * @param {String} name of property to add\n * @param {Function} getter function to be used for name\n * @namespace Utils\n * @name addProperty\n * @api public\n */\n\nmodule.exports = function (ctx, name, getter) {\n Object.defineProperty(ctx, name,\n { get: function addProperty() {\n var old_ssfi = flag(this, 'ssfi');\n if (old_ssfi && config.includeStack === false)\n flag(this, 'ssfi', addProperty);\n\n var result = getter.call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - expectTypes utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### expectTypes(obj, types)\n *\n * Ensures that the object being tested against is of a valid type.\n *\n * utils.expectTypes(this, ['array', 'object', 'string']);\n *\n * @param {Mixed} obj constructed Assertion\n * @param {Array} type A list of allowed types for this assertion\n * @namespace Utils\n * @name expectTypes\n * @api public\n */\n\nvar AssertionError = require('assertion-error');\nvar flag = require('./flag');\nvar type = require('type-detect');\n\nmodule.exports = function (obj, types) {\n var obj = flag(obj, 'object');\n types = types.map(function (t) { return t.toLowerCase(); });\n types.sort();\n\n // Transforms ['lorem', 'ipsum'] into 'a lirum, or an ipsum'\n var str = types.map(function (t, index) {\n var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a';\n var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';\n return or + art + ' ' + t;\n }).join(', ');\n\n if (!types.some(function (expected) { return type(obj) === expected; })) {\n throw new AssertionError(\n 'object tested must be ' + str + ', but ' + type(obj) + ' given'\n );\n }\n};\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### flag(object, key, [value])\n *\n * Get or set a flag value on an object. If a\n * value is provided it will be set, else it will\n * return the currently set value or `undefined` if\n * the value is not set.\n *\n * utils.flag(this, 'foo', 'bar'); // setter\n * utils.flag(this, 'foo'); // getter, returns `bar`\n *\n * @param {Object} object constructed Assertion\n * @param {String} key\n * @param {Mixed} value (optional)\n * @namespace Utils\n * @name flag\n * @api private\n */\n\nmodule.exports = function (obj, key, value) {\n var flags = obj.__flags || (obj.__flags = Object.create(null));\n if (arguments.length === 3) {\n flags[key] = value;\n } else {\n return flags[key];\n }\n};\n","/*!\n * Chai - getActual utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getActual(object, [actual])\n *\n * Returns the `actual` value for an Assertion\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getActual\n */\n\nmodule.exports = function (obj, args) {\n return args.length > 4 ? args[4] : obj._obj;\n};\n","/*!\n * Chai - getEnumerableProperties utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### .getEnumerableProperties(object)\n *\n * This allows the retrieval of enumerable property names of an object,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getEnumerableProperties\n * @api public\n */\n\nmodule.exports = function getEnumerableProperties(object) {\n var result = [];\n for (var name in object) {\n result.push(name);\n }\n return result;\n};\n","/*!\n * Chai - message composition utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag')\n , getActual = require('./getActual')\n , inspect = require('./inspect')\n , objDisplay = require('./objDisplay');\n\n/**\n * ### .getMessage(object, message, negateMessage)\n *\n * Construct the error message based on flags\n * and template tags. Template tags will return\n * a stringified inspection of the object referenced.\n *\n * Message template tags:\n * - `#{this}` current asserted object\n * - `#{act}` actual value\n * - `#{exp}` expected value\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name getMessage\n * @api public\n */\n\nmodule.exports = function (obj, args) {\n var negate = flag(obj, 'negate')\n , val = flag(obj, 'object')\n , expected = args[3]\n , actual = getActual(obj, args)\n , msg = negate ? args[2] : args[1]\n , flagMsg = flag(obj, 'message');\n\n if(typeof msg === \"function\") msg = msg();\n msg = msg || '';\n msg = msg\n .replace(/#\\{this\\}/g, function () { return objDisplay(val); })\n .replace(/#\\{act\\}/g, function () { return objDisplay(actual); })\n .replace(/#\\{exp\\}/g, function () { return objDisplay(expected); });\n\n return flagMsg ? flagMsg + ': ' + msg : msg;\n};\n","/*!\n * Chai - getName utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * # getName(func)\n *\n * Gets the name of a function, in a cross-browser way.\n *\n * @param {Function} a function (usually a constructor)\n * @namespace Utils\n * @name getName\n */\n\nmodule.exports = function (func) {\n if (func.name) return func.name;\n\n var match = /^\\s?function ([^(]*)\\(/.exec(func);\n return match && match[1] ? match[1] : \"\";\n};\n","/*!\n * Chai - getPathInfo utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar hasProperty = require('./hasProperty');\n\n/**\n * ### .getPathInfo(path, object)\n *\n * This allows the retrieval of property info in an\n * object given a string path.\n *\n * The path info consists of an object with the\n * following properties:\n *\n * * parent - The parent object of the property referenced by `path`\n * * name - The name of the final property, a number if it was an array indexer\n * * value - The value of the property, if it exists, otherwise `undefined`\n * * exists - Whether the property exists or not\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} info\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nmodule.exports = function getPathInfo(path, obj) {\n var parsed = parsePath(path),\n last = parsed[parsed.length - 1];\n\n var info = {\n parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,\n name: last.p || last.i,\n value: _getPathValue(parsed, obj)\n };\n info.exists = hasProperty(info.name, info.parent);\n\n return info;\n};\n\n\n/*!\n * ## parsePath(path)\n *\n * Helper function used to parse string object\n * paths. Use in conjunction with `_getPathValue`.\n *\n * var parsed = parsePath('myobject.property.subprop');\n *\n * ### Paths:\n *\n * * Can be as near infinitely deep and nested\n * * Arrays are also valid using the formal `myobject.document[3].property`.\n * * Literal dots and brackets (not delimiter) must be backslash-escaped.\n *\n * @param {String} path\n * @returns {Object} parsed\n * @api private\n */\n\nfunction parsePath (path) {\n var str = path.replace(/([^\\\\])\\[/g, '$1.[')\n , parts = str.match(/(\\\\\\.|[^.]+?)+/g);\n return parts.map(function (value) {\n var re = /^\\[(\\d+)\\]$/\n , mArr = re.exec(value);\n if (mArr) return { i: parseFloat(mArr[1]) };\n else return { p: value.replace(/\\\\([.\\[\\]])/g, '$1') };\n });\n}\n\n\n/*!\n * ## _getPathValue(parsed, obj)\n *\n * Helper companion function for `.parsePath` that returns\n * the value located at the parsed address.\n *\n * var value = getPathValue(parsed, obj);\n *\n * @param {Object} parsed definition from `parsePath`.\n * @param {Object} object to search against\n * @param {Number} object to search against\n * @returns {Object|Undefined} value\n * @api private\n */\n\nfunction _getPathValue (parsed, obj, index) {\n var tmp = obj\n , res;\n\n index = (index === undefined ? parsed.length : index);\n\n for (var i = 0, l = index; i < l; i++) {\n var part = parsed[i];\n if (tmp) {\n if ('undefined' !== typeof part.p)\n tmp = tmp[part.p];\n else if ('undefined' !== typeof part.i)\n tmp = tmp[part.i];\n if (i == (l - 1)) res = tmp;\n } else {\n res = undefined;\n }\n }\n return res;\n}\n","/*!\n * Chai - getPathValue utility\n * Copyright(c) 2012-2014 Jake Luer \n * @see https://github.com/logicalparadox/filtr\n * MIT Licensed\n */\n\nvar getPathInfo = require('./getPathInfo');\n\n/**\n * ### .getPathValue(path, object)\n *\n * This allows the retrieval of values in an\n * object given a string path.\n *\n * var obj = {\n * prop1: {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n * , prop2: {\n * arr: [ { nested: 'Universe' } ]\n * , str: 'Hello again!'\n * }\n * }\n *\n * The following would be the results.\n *\n * getPathValue('prop1.str', obj); // Hello\n * getPathValue('prop1.att[2]', obj); // b\n * getPathValue('prop2.arr[0].nested', obj); // Universe\n *\n * @param {String} path\n * @param {Object} object\n * @returns {Object} value or `undefined`\n * @namespace Utils\n * @name getPathValue\n * @api public\n */\nmodule.exports = function(path, obj) {\n var info = getPathInfo(path, obj);\n return info.value;\n};\n","/*!\n * Chai - getProperties utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### .getProperties(object)\n *\n * This allows the retrieval of property names of an object, enumerable or not,\n * inherited or not.\n *\n * @param {Object} object\n * @returns {Array}\n * @namespace Utils\n * @name getProperties\n * @api public\n */\n\nmodule.exports = function getProperties(object) {\n var result = Object.getOwnPropertyNames(object);\n\n function addProperty(property) {\n if (result.indexOf(property) === -1) {\n result.push(property);\n }\n }\n\n var proto = Object.getPrototypeOf(object);\n while (proto !== null) {\n Object.getOwnPropertyNames(proto).forEach(addProperty);\n proto = Object.getPrototypeOf(proto);\n }\n\n return result;\n};\n","/*!\n * Chai - hasProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\nvar type = require('type-detect');\n\n/**\n * ### .hasProperty(object, name)\n *\n * This allows checking whether an object has\n * named property or numeric array index.\n *\n * Basically does the same thing as the `in`\n * operator but works properly with natives\n * and null/undefined values.\n *\n * var obj = {\n * arr: ['a', 'b', 'c']\n * , str: 'Hello'\n * }\n *\n * The following would be the results.\n *\n * hasProperty('str', obj); // true\n * hasProperty('constructor', obj); // true\n * hasProperty('bar', obj); // false\n *\n * hasProperty('length', obj.str); // true\n * hasProperty(1, obj.str); // true\n * hasProperty(5, obj.str); // false\n *\n * hasProperty('length', obj.arr); // true\n * hasProperty(2, obj.arr); // true\n * hasProperty(3, obj.arr); // false\n *\n * @param {Objuect} object\n * @param {String|Number} name\n * @returns {Boolean} whether it exists\n * @namespace Utils\n * @name getPathInfo\n * @api public\n */\n\nvar literals = {\n 'number': Number\n , 'string': String\n};\n\nmodule.exports = function hasProperty(name, obj) {\n var ot = type(obj);\n\n // Bad Object, obviously no props at all\n if(ot === 'null' || ot === 'undefined')\n return false;\n\n // The `in` operator does not work with certain literals\n // box these before the check\n if(literals[ot] && typeof obj !== 'object')\n obj = new literals[ot](obj);\n\n return name in obj;\n};\n","/*!\n * chai\n * Copyright(c) 2011 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Main exports\n */\n\nvar exports = module.exports = {};\n\n/*!\n * test utility\n */\n\nexports.test = require('./test');\n\n/*!\n * type utility\n */\n\nexports.type = require('type-detect');\n\n/*!\n * expectTypes utility\n */\nexports.expectTypes = require('./expectTypes');\n\n/*!\n * message utility\n */\n\nexports.getMessage = require('./getMessage');\n\n/*!\n * actual utility\n */\n\nexports.getActual = require('./getActual');\n\n/*!\n * Inspect util\n */\n\nexports.inspect = require('./inspect');\n\n/*!\n * Object Display util\n */\n\nexports.objDisplay = require('./objDisplay');\n\n/*!\n * Flag utility\n */\n\nexports.flag = require('./flag');\n\n/*!\n * Flag transferring utility\n */\n\nexports.transferFlags = require('./transferFlags');\n\n/*!\n * Deep equal utility\n */\n\nexports.eql = require('deep-eql');\n\n/*!\n * Deep path value\n */\n\nexports.getPathValue = require('./getPathValue');\n\n/*!\n * Deep path info\n */\n\nexports.getPathInfo = require('./getPathInfo');\n\n/*!\n * Check if a property exists\n */\n\nexports.hasProperty = require('./hasProperty');\n\n/*!\n * Function name\n */\n\nexports.getName = require('./getName');\n\n/*!\n * add Property\n */\n\nexports.addProperty = require('./addProperty');\n\n/*!\n * add Method\n */\n\nexports.addMethod = require('./addMethod');\n\n/*!\n * overwrite Property\n */\n\nexports.overwriteProperty = require('./overwriteProperty');\n\n/*!\n * overwrite Method\n */\n\nexports.overwriteMethod = require('./overwriteMethod');\n\n/*!\n * Add a chainable method\n */\n\nexports.addChainableMethod = require('./addChainableMethod');\n\n/*!\n * Overwrite chainable method\n */\n\nexports.overwriteChainableMethod = require('./overwriteChainableMethod');\n","// This is (almost) directly from Node.js utils\n// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js\n\nvar getName = require('./getName');\nvar getProperties = require('./getProperties');\nvar getEnumerableProperties = require('./getEnumerableProperties');\n\nmodule.exports = inspect;\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Boolean} showHidden Flag that shows hidden (not enumerable)\n * properties of objects.\n * @param {Number} depth Depth in which to descend in object. Default is 2.\n * @param {Boolean} colors Flag to turn on ANSI escape codes to color the\n * output. Default is false (no coloring).\n * @namespace Utils\n * @name inspect\n */\nfunction inspect(obj, showHidden, depth, colors) {\n var ctx = {\n showHidden: showHidden,\n seen: [],\n stylize: function (str) { return str; }\n };\n return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));\n}\n\n// Returns true if object is a DOM element.\nvar isDOMElement = function (object) {\n if (typeof HTMLElement === 'object') {\n return object instanceof HTMLElement;\n } else {\n return object &&\n typeof object === 'object' &&\n object.nodeType === 1 &&\n typeof object.nodeName === 'string';\n }\n};\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (value && typeof value.inspect === 'function' &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes);\n if (typeof ret !== 'string') {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // If this is a DOM element, try to get the outer HTML.\n if (isDOMElement(value)) {\n if ('outerHTML' in value) {\n return value.outerHTML;\n // This value does not have an outerHTML attribute,\n // it could still be an XML element\n } else {\n // Attempt to serialize it\n try {\n if (document.xmlVersion) {\n var xmlSerializer = new XMLSerializer();\n return xmlSerializer.serializeToString(value);\n } else {\n // Firefox 11- do not support outerHTML\n // It does, however, support innerHTML\n // Use the following to render the element\n var ns = \"http://www.w3.org/1999/xhtml\";\n var container = document.createElementNS(ns, '_');\n\n container.appendChild(value.cloneNode(false));\n html = container.innerHTML\n .replace('><', '>' + value.innerHTML + '<');\n container.innerHTML = '';\n return html;\n }\n } catch (err) {\n // This could be a non-native DOM implementation,\n // continue with the normal flow:\n // printing the element as if it is an object.\n }\n }\n }\n\n // Look up the keys of the object.\n var visibleKeys = getEnumerableProperties(value);\n var keys = ctx.showHidden ? getProperties(value) : visibleKeys;\n\n // Some type of object without properties can be shortcutted.\n // In IE, errors have a single `stack` property, or if they are vanilla `Error`,\n // a `stack` plus `description` property; ignore those for consistency.\n if (keys.length === 0 || (isError(value) && (\n (keys.length === 1 && keys[0] === 'stack') ||\n (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')\n ))) {\n if (typeof value === 'function') {\n var name = getName(value);\n var nameSuffix = name ? ': ' + name : '';\n return ctx.stylize('[Function' + nameSuffix + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (typeof value === 'function') {\n var name = getName(value);\n var nameSuffix = name ? ': ' + name : '';\n base = ' [Function' + nameSuffix + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n return formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n switch (typeof value) {\n case 'undefined':\n return ctx.stylize('undefined', 'undefined');\n\n case 'string':\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n\n case 'number':\n if (value === 0 && (1/value) === -Infinity) {\n return ctx.stylize('-0', 'number');\n }\n return ctx.stylize('' + value, 'number');\n\n case 'boolean':\n return ctx.stylize('' + value, 'boolean');\n }\n // For some reason typeof null is \"object\", so special case here.\n if (value === null) {\n return ctx.stylize('null', 'null');\n }\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (Object.prototype.hasOwnProperty.call(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str;\n if (value.__lookupGetter__) {\n if (value.__lookupGetter__(key)) {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (value.__lookupSetter__(key)) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n }\n if (visibleKeys.indexOf(key) < 0) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(value[key]) < 0) {\n if (recurseTimes === null) {\n str = formatValue(ctx, value[key], null);\n } else {\n str = formatValue(ctx, value[key], recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (typeof name === 'undefined') {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\nfunction isArray(ar) {\n return Array.isArray(ar) ||\n (typeof ar === 'object' && objectToString(ar) === '[object Array]');\n}\n\nfunction isRegExp(re) {\n return typeof re === 'object' && objectToString(re) === '[object RegExp]';\n}\n\nfunction isDate(d) {\n return typeof d === 'object' && objectToString(d) === '[object Date]';\n}\n\nfunction isError(e) {\n return typeof e === 'object' && objectToString(e) === '[object Error]';\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","/*!\n * Chai - flag utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar inspect = require('./inspect');\nvar config = require('../config');\n\n/**\n * ### .objDisplay (object)\n *\n * Determines if an object or an array matches\n * criteria to be inspected in-line for error\n * messages or should be truncated.\n *\n * @param {Mixed} javascript object to inspect\n * @name objDisplay\n * @namespace Utils\n * @api public\n */\n\nmodule.exports = function (obj) {\n var str = inspect(obj)\n , type = Object.prototype.toString.call(obj);\n\n if (config.truncateThreshold && str.length >= config.truncateThreshold) {\n if (type === '[object Function]') {\n return !obj.name || obj.name === ''\n ? '[Function]'\n : '[Function: ' + obj.name + ']';\n } else if (type === '[object Array]') {\n return '[ Array(' + obj.length + ') ]';\n } else if (type === '[object Object]') {\n var keys = Object.keys(obj)\n , kstr = keys.length > 2\n ? keys.splice(0, 2).join(', ') + ', ...'\n : keys.join(', ');\n return '{ Object (' + kstr + ') }';\n } else {\n return str;\n }\n } else {\n return str;\n }\n};\n","/*!\n * Chai - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)\n *\n * Overwites an already existing chainable method\n * and provides access to the previous function or\n * property. Must return functions to be used for\n * name.\n *\n * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length',\n * function (_super) {\n * }\n * , function (_super) {\n * }\n * );\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteChainableMethod('foo', fn, fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.have.length(3);\n * expect(myFoo).to.have.length.above(3);\n *\n * @param {Object} ctx object whose method / property is to be overwritten\n * @param {String} name of method / property to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @param {Function} chainingBehavior function that returns a function to be used for property\n * @namespace Utils\n * @name overwriteChainableMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function () {\n var result = chainingBehavior(_chainingBehavior).call(this);\n return result === undefined ? this : result;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function () {\n var result = method(_method).apply(this, arguments);\n return result === undefined ? this : result;\n };\n};\n","/*!\n * Chai - overwriteMethod utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteMethod (ctx, name, fn)\n *\n * Overwites an already existing method and provides\n * access to previous function. Must return function\n * to be used for name.\n *\n * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {\n * return function (str) {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.value).to.equal(str);\n * } else {\n * _super.apply(this, arguments);\n * }\n * }\n * });\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteMethod('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.equal('bar');\n *\n * @param {Object} ctx object whose method is to be overwritten\n * @param {String} name of method to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @namespace Utils\n * @name overwriteMethod\n * @api public\n */\n\nmodule.exports = function (ctx, name, method) {\n var _method = ctx[name]\n , _super = function () { return this; };\n\n if (_method && 'function' === typeof _method)\n _super = _method;\n\n ctx[name] = function () {\n var result = method(_super).apply(this, arguments);\n return result === undefined ? this : result;\n }\n};\n","/*!\n * Chai - overwriteProperty utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### overwriteProperty (ctx, name, fn)\n *\n * Overwites an already existing property getter and provides\n * access to previous value. Must return function to use as getter.\n *\n * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {\n * return function () {\n * var obj = utils.flag(this, 'object');\n * if (obj instanceof Foo) {\n * new chai.Assertion(obj.name).to.equal('bar');\n * } else {\n * _super.call(this);\n * }\n * }\n * });\n *\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteProperty('foo', fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.be.ok;\n *\n * @param {Object} ctx object whose property is to be overwritten\n * @param {String} name of property to overwrite\n * @param {Function} getter function that returns a getter function to be used for name\n * @namespace Utils\n * @name overwriteProperty\n * @api public\n */\n\nmodule.exports = function (ctx, name, getter) {\n var _get = Object.getOwnPropertyDescriptor(ctx, name)\n , _super = function () {};\n\n if (_get && 'function' === typeof _get.get)\n _super = _get.get\n\n Object.defineProperty(ctx, name,\n { get: function () {\n var result = getter(_super).call(this);\n return result === undefined ? this : result;\n }\n , configurable: true\n });\n};\n","/*!\n * Chai - test utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependancies\n */\n\nvar flag = require('./flag');\n\n/**\n * # test(object, expression)\n *\n * Test and object for expression.\n *\n * @param {Object} object (constructed Assertion)\n * @param {Arguments} chai.Assertion.prototype.assert arguments\n * @namespace Utils\n * @name test\n */\n\nmodule.exports = function (obj, args) {\n var negate = flag(obj, 'negate')\n , expr = args[0];\n return negate ? !expr : expr;\n};\n","/*!\n * Chai - transferFlags utility\n * Copyright(c) 2012-2014 Jake Luer \n * MIT Licensed\n */\n\n/**\n * ### transferFlags(assertion, object, includeAll = true)\n *\n * Transfer all the flags for `assertion` to `object`. If\n * `includeAll` is set to `false`, then the base Chai\n * assertion flags (namely `object`, `ssfi`, and `message`)\n * will not be transferred.\n *\n *\n * var newAssertion = new Assertion();\n * utils.transferFlags(assertion, newAssertion);\n *\n * var anotherAsseriton = new Assertion(myObj);\n * utils.transferFlags(assertion, anotherAssertion, false);\n *\n * @param {Assertion} assertion the assertion to transfer the flags from\n * @param {Object} object the object to transfer the flags to; usually a new assertion\n * @param {Boolean} includeAll\n * @namespace Utils\n * @name transferFlags\n * @api private\n */\n\nmodule.exports = function (assertion, object, includeAll) {\n var flags = assertion.__flags || (assertion.__flags = Object.create(null));\n\n if (!object.__flags) {\n object.__flags = Object.create(null);\n }\n\n includeAll = arguments.length === 3 ? includeAll : true;\n\n for (var flag in flags) {\n if (includeAll ||\n (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {\n object.__flags[flag] = flags[flag];\n }\n }\n};\n","module.exports = require('./lib/eql');\n","/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\n/*!\n * Module dependencies\n */\n\nvar type = require('type-detect');\n\n/*!\n * Buffer.isBuffer browser shim\n */\n\nvar Buffer;\ntry { Buffer = require('buffer').Buffer; }\ncatch(ex) {\n Buffer = {};\n Buffer.isBuffer = function() { return false; }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\n\n/**\n * Assert super-strict (egal) equality between\n * two objects of any type.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @param {Array} memoised (optional)\n * @return {Boolean} equal match\n */\n\nfunction deepEqual(a, b, m) {\n if (sameValue(a, b)) {\n return true;\n } else if ('date' === type(a)) {\n return dateEqual(a, b);\n } else if ('regexp' === type(a)) {\n return regexpEqual(a, b);\n } else if (Buffer.isBuffer(a)) {\n return bufferEqual(a, b);\n } else if ('arguments' === type(a)) {\n return argumentsEqual(a, b, m);\n } else if (!typeEqual(a, b)) {\n return false;\n } else if (('object' !== type(a) && 'object' !== type(b))\n && ('array' !== type(a) && 'array' !== type(b))) {\n return sameValue(a, b);\n } else {\n return objectEqual(a, b, m);\n }\n}\n\n/*!\n * Strict (egal) equality test. Ensures that NaN always\n * equals NaN and `-0` does not equal `+0`.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} equal match\n */\n\nfunction sameValue(a, b) {\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n return a !== a && b !== b;\n}\n\n/*!\n * Compare the types of two given objects and\n * return if they are equal. Note that an Array\n * has a type of `array` (not `object`) and arguments\n * have a type of `arguments` (not `array`/`object`).\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction typeEqual(a, b) {\n return type(a) === type(b);\n}\n\n/*!\n * Compare two Date objects by asserting that\n * the time values are equal using `saveValue`.\n *\n * @param {Date} a\n * @param {Date} b\n * @return {Boolean} result\n */\n\nfunction dateEqual(a, b) {\n if ('date' !== type(b)) return false;\n return sameValue(a.getTime(), b.getTime());\n}\n\n/*!\n * Compare two regular expressions by converting them\n * to string and checking for `sameValue`.\n *\n * @param {RegExp} a\n * @param {RegExp} b\n * @return {Boolean} result\n */\n\nfunction regexpEqual(a, b) {\n if ('regexp' !== type(b)) return false;\n return sameValue(a.toString(), b.toString());\n}\n\n/*!\n * Assert deep equality of two `arguments` objects.\n * Unfortunately, these must be sliced to arrays\n * prior to test to ensure no bad behavior.\n *\n * @param {Arguments} a\n * @param {Arguments} b\n * @param {Array} memoize (optional)\n * @return {Boolean} result\n */\n\nfunction argumentsEqual(a, b, m) {\n if ('arguments' !== type(b)) return false;\n a = [].slice.call(a);\n b = [].slice.call(b);\n return deepEqual(a, b, m);\n}\n\n/*!\n * Get enumerable properties of a given object.\n *\n * @param {Object} a\n * @return {Array} property names\n */\n\nfunction enumerable(a) {\n var res = [];\n for (var key in a) res.push(key);\n return res;\n}\n\n/*!\n * Simple equality for flat iterable objects\n * such as Arrays or Node.js buffers.\n *\n * @param {Iterable} a\n * @param {Iterable} b\n * @return {Boolean} result\n */\n\nfunction iterableEqual(a, b) {\n if (a.length !== b.length) return false;\n\n var i = 0;\n var match = true;\n\n for (; i < a.length; i++) {\n if (a[i] !== b[i]) {\n match = false;\n break;\n }\n }\n\n return match;\n}\n\n/*!\n * Extension to `iterableEqual` specifically\n * for Node.js Buffers.\n *\n * @param {Buffer} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction bufferEqual(a, b) {\n if (!Buffer.isBuffer(b)) return false;\n return iterableEqual(a, b);\n}\n\n/*!\n * Block for `objectEqual` ensuring non-existing\n * values don't get in.\n *\n * @param {Mixed} object\n * @return {Boolean} result\n */\n\nfunction isValue(a) {\n return a !== null && a !== undefined;\n}\n\n/*!\n * Recursively check the equality of two objects.\n * Once basic sameness has been established it will\n * defer to `deepEqual` for each enumerable key\n * in the object.\n *\n * @param {Mixed} a\n * @param {Mixed} b\n * @return {Boolean} result\n */\n\nfunction objectEqual(a, b, m) {\n if (!isValue(a) || !isValue(b)) {\n return false;\n }\n\n if (a.prototype !== b.prototype) {\n return false;\n }\n\n var i;\n if (m) {\n for (i = 0; i < m.length; i++) {\n if ((m[i][0] === a && m[i][1] === b)\n || (m[i][0] === b && m[i][1] === a)) {\n return true;\n }\n }\n } else {\n m = [];\n }\n\n try {\n var ka = enumerable(a);\n var kb = enumerable(b);\n } catch (ex) {\n return false;\n }\n\n ka.sort();\n kb.sort();\n\n if (!iterableEqual(ka, kb)) {\n return false;\n }\n\n m.push([ a, b ]);\n\n var key;\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], m)) {\n return false;\n }\n }\n\n return true;\n}\n","module.exports = require('./lib/type');\n","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/*!\n * Detectable javascript natives\n */\n\nvar natives = {\n '[object Array]': 'array'\n , '[object RegExp]': 'regexp'\n , '[object Function]': 'function'\n , '[object Arguments]': 'arguments'\n , '[object Date]': 'date'\n};\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\n\nfunction getType (obj) {\n var str = Object.prototype.toString.call(obj);\n if (natives[str]) return natives[str];\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n if (obj === Object(obj)) return 'object';\n return typeof obj;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library () {\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function (type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function (obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.5.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && typeof obj === 'object' && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nexports.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nexports.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nexports.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nexports.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {}\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support (#5572)\n // since Safari 10.1 shipped with fetch, we can use that to detect it\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage && localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs;\nvar dbContexts;\nvar toString = Object.prototype.toString;\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, 'readwrite');\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve) {\n deferredOperation.resolve = resolve;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n resolve(openreq.result);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + ' can\\'t be downgraded from version ' + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Initialize a singleton container for all running localForages.\n if (!dbContexts) {\n dbContexts = {};\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.put(value, key);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var transaction = dbInfo.db.transaction(dbInfo.storeName, 'readwrite');\n var store = transaction.objectStore(dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var advanced = false;\n var req = store.openCursor();\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly').objectStore(dbInfo.storeName);\n\n var req = store.openCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys\n};\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' (id INTEGER PRIMARY KEY, key unique, value)', [], function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n t.executeSql('INSERT OR REPLACE INTO ' + dbInfo.storeName + ' (key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n t.executeSql('SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n\n resolve(result);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n t.executeSql('SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1\n};\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = dbInfo.name + '/';\n\n if (dbInfo.storeName !== self._defaultConfig.storeName) {\n dbInfo.keyPrefix += dbInfo.storeName + '/';\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n if (localStorage.key(i).indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(localStorage.key(i).substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n // Default API, from Gaia/localStorage.\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2\n};\n\n// Custom drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar CustomDrivers = {};\n\nvar DriverType = {\n INDEXEDDB: 'asyncStorage',\n LOCALSTORAGE: 'localStorageWrapper',\n WEBSQL: 'webSQLStorage'\n};\n\nvar DefaultDriverOrder = [DriverType.INDEXEDDB, DriverType.WEBSQL, DriverType.LOCALSTORAGE];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'];\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nvar driverSupport = {};\n// Check to see if IndexedDB is available and if it is the latest\n// implementation; it's our preferred backend library. We use \"_spec_test\"\n// as the name of the database because it's not the one we'll operate on,\n// but it's useful to make sure its using the right spec.\n// See: https://github.com/mozilla/localForage/issues/128\ndriverSupport[DriverType.INDEXEDDB] = isIndexedDBValid();\n\ndriverSupport[DriverType.WEBSQL] = isWebSQLValid();\n\ndriverSupport[DriverType.LOCALSTORAGE] = isLocalStorageValid();\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var key in arg) {\n if (arg.hasOwnProperty(key)) {\n if (isArray(arg[key])) {\n arguments[0][key] = arg[key].slice();\n } else {\n arguments[0][key] = arg[key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nfunction isLibraryDriver(driverName) {\n for (var driver in DriverType) {\n if (DriverType.hasOwnProperty(driver) && DriverType[driver] === driverName) {\n return true;\n }\n }\n\n return false;\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n this.INDEXEDDB = DriverType.INDEXEDDB;\n this.LOCALSTORAGE = DriverType.LOCALSTORAGE;\n this.WEBSQL = DriverType.WEBSQL;\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n var namingError = new Error('Custom driver name already in use: ' + driverObject._driver);\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n if (isLibraryDriver(driverObject._driver)) {\n reject(namingError);\n return;\n }\n\n var customDriverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0; i < customDriverMethods.length; i++) {\n var customDriverMethod = customDriverMethods[i];\n if (!customDriverMethod || !driverObject[customDriverMethod] || typeof driverObject[customDriverMethod] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var supportPromise = Promise$1.resolve(true);\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n supportPromise = driverObject._support();\n } else {\n supportPromise = Promise$1.resolve(!!driverObject._support);\n }\n }\n\n supportPromise.then(function (supportResult) {\n driverSupport[driverName] = supportResult;\n CustomDrivers[driverName] = driverObject;\n resolve();\n }, reject);\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var self = this;\n var getDriverPromise = Promise$1.resolve().then(function () {\n if (isLibraryDriver(driverName)) {\n switch (driverName) {\n case self.INDEXEDDB:\n return asyncStorage;\n case self.LOCALSTORAGE:\n return localStorageWrapper;\n case self.WEBSQL:\n return webSQLStorage;\n }\n } else if (CustomDrivers[driverName]) {\n return CustomDrivers[driverName];\n } else {\n throw new Error('Driver not found.');\n }\n });\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!driverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0; i < LibraryMethods.length; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});","/*!\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\n\n/*!\n * Primary Exports\n */\n\nvar exports = module.exports = getType;\n\n/**\n * ### typeOf (obj)\n *\n * Use several different techniques to determine\n * the type of object being tested.\n *\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nvar objectTypeRegexp = /^\\[object (.*)\\]$/;\n\nfunction getType(obj) {\n var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();\n // Let \"new String('')\" return 'object'\n if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';\n // PhantomJS has type \"DOMWindow\" for null\n if (obj === null) return 'null';\n // PhantomJS has type \"DOMWindow\" for undefined\n if (obj === undefined) return 'undefined';\n return type;\n}\n\nexports.Library = Library;\n\n/**\n * ### Library\n *\n * Create a repository for custom type detection.\n *\n * ```js\n * var lib = new type.Library;\n * ```\n *\n */\n\nfunction Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}\n\n/**\n * #### .of (obj)\n *\n * Expose replacement `typeof` detection to the library.\n *\n * ```js\n * if ('string' === lib.of('hello world')) {\n * // ...\n * }\n * ```\n *\n * @param {Mixed} object to test\n * @return {String} type\n */\n\nLibrary.prototype.of = getType;\n\n/**\n * #### .define (type, test)\n *\n * Add a test to for the `.test()` assertion.\n *\n * Can be defined as a regular expression:\n *\n * ```js\n * lib.define('int', /^[0-9]+$/);\n * ```\n *\n * ... or as a function:\n *\n * ```js\n * lib.define('bln', function (obj) {\n * if ('boolean' === lib.of(obj)) return true;\n * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];\n * if ('string' === lib.of(obj)) obj = obj.toLowerCase();\n * return !! ~blns.indexOf(obj);\n * });\n * ```\n *\n * @param {String} type\n * @param {RegExp|Function} test\n * @api public\n */\n\nLibrary.prototype.define = function(type, test) {\n if (arguments.length === 1) return this.tests[type];\n this.tests[type] = test;\n return this;\n};\n\n/**\n * #### .test (obj, test)\n *\n * Assert that an object is of type. Will first\n * check natives, and if that does not pass it will\n * use the user defined custom tests.\n *\n * ```js\n * assert(lib.test('1', 'int'));\n * assert(lib.test('yes', 'bln'));\n * ```\n *\n * @param {Mixed} object\n * @param {String} type\n * @return {Boolean} result\n * @api public\n */\n\nLibrary.prototype.test = function(obj, type) {\n if (type === getType(obj)) return true;\n var test = this.tests[type];\n\n if (test && 'regexp' === getType(test)) {\n return test.test(obj);\n } else if (test && 'function' === getType(test)) {\n return test(obj);\n } else {\n throw new ReferenceError('Type test \"' + type + '\" not defined or invalid.');\n }\n};\n","(function() {\n // DEPENDENCIES\n // ============================================================\n\n const assert = require('chai').assert;\n const localforage = require('localforage');\n\n // PROBLEMS\n // ============================================================\n\n let problems = require('../problems/arrays.js');\n\n // CONFIG\n // ============================================================\n\n // Hoist current problem\n let currentProblem;\n // keys to ignore while user is navigating around the textarea but not changing any code\n const ignoreKeyCodes = [\n 9, // tab\n 37, // left arrow\n 39, // right arrow\n 38, // up arrow\n 40, // down arrow\n ];\n\n let config = {\n shuffle: true,\n timer: false,\n currentIndex: 0,\n };\n\n // pull config from localforage\n localforage\n .getItem('js_practice_config')\n .then(val => {\n console.log('localforage val:', val);\n if (val) {\n config = val;\n }\n loadApp(config);\n })\n .catch(err => {\n console.log('localforage err:', err);\n loadApp(config);\n });\n\n function updateLocalstore(config) {\n return localforage\n .setItem('js_practice_config', config)\n .then(val => {\n console.log('Settings updated:', val);\n })\n .catch(err => {\n console.log('Settings update error:', err);\n });\n }\n\n // UI\n // ============================================================\n\n // elements\n const problemNameEl = document.getElementById('problem-name');\n const problemEl = document.getElementById('problem');\n const codeEl = document.getElementById('code');\n const testAreaEl = document.getElementById('test-area');\n const testSuiteEl = document.getElementById('test-suite');\n const testTotalEl = document.getElementById('test-total');\n const evalConsoleEl = document.getElementById('eval-output');\n const assertConsoleEl = document.getElementById('assert-output');\n const shuffleProblemsButtonEl = document.getElementById('shuffle-problems');\n const previousProblemButtonEl = document.getElementById('prev-problem');\n const nextProblemButtonEl = document.getElementById('next-problem');\n\n // get indexes\n function getRandomIndex(problemsArr) {\n const ind = Math.floor(Math.random() * problemsArr.length);\n config.currentIndex = ind;\n updateLocalstore(config);\n return ind;\n }\n\n function getPreviousIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // if at beginning, go to end\n if (currentIndex === 0) {\n probInd = problemsArr.length - 1;\n } else {\n probInd = currentIndex - 1;\n }\n return probInd;\n }\n\n function getNextIndex(problemsArr) {\n let probInd;\n const currentIndex = config.currentIndex;\n // if at end or invalid, restart series\n if (currentIndex >= problemsArr.length - 1 || currentIndex < 0) {\n probInd = 0;\n } else {\n probInd = currentIndex + 1;\n }\n return probInd;\n }\n\n // get problems\n function getCurrentProblem(problemsArr) {\n return problemsArr[config.currentIndex];\n }\n\n function previousProblem(e) {\n console.log('previousProblem!');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getPreviousIndex(problems);\n updateLocalstore(config).then(_ => {\n window.location.reload();\n });\n }\n\n function nextProblem(e) {\n console.log('nextProblem!');\n config.currentIndex = config.shuffle\n ? getRandomIndex(problems)\n : getNextIndex(problems);\n updateLocalstore(config).then(_ => {\n window.location.reload();\n });\n }\n\n function toggleShuffle(e) {\n console.log('toggle shuffle!');\n config.shuffle = config.shuffle === true ? false : true;\n shuffleProblemsButtonEl.classList.toggle('active');\n updateLocalstore(config);\n }\n\n function loadProblem(problemObj) {\n currentProblem = problemObj;\n // prob question\n problemEl.innerText = problemObj.prompt;\n // prob given\n if (problemObj.given) {\n codeEl.value = problemObj.given;\n }\n // seed tests, pass (init = true) as second param\n testSuite(null, true);\n }\n\n function updateTests(testStatus, init) {\n if (init === true) {\n buildTests(currentProblem.tests);\n }\n updateTestStatus(testStatus);\n }\n\n function buildTests(tests) {\n if (tests) {\n const testsDom = tests\n .map(test => {\n return `
\n
[✘]
\n
${test.name}
\n
`;\n })\n .join('');\n testSuiteEl.innerHTML = testsDom;\n }\n }\n\n function updateTestStatus(testStatuses) {\n if (!testStatuses) {\n throw new Error('No testStatuses provided.');\n }\n // Find out if all tests have passed or not\n let allPassed = true;\n testStatuses.forEach(testPassed => {\n if (testPassed !== true) {\n allPassed = false;\n }\n });\n const testEls = Array.from(testSuiteEl.querySelectorAll('.test-state'));\n testEls.forEach((testStatusEl, iter) => {\n if (testStatuses[iter] === true) {\n testStatusEl.innerHTML = '[✓]';\n testStatusEl.classList.remove('fail');\n testStatusEl.classList.add('pass');\n } else {\n testStatusEl.innerHTML = '[✘]';\n testStatusEl.classList.remove('pass');\n testStatusEl.classList.add('fail');\n }\n });\n\n if (allPassed === true) {\n testTotalEl.innerText = 'PASS';\n testTotalEl.classList.remove('fail');\n testTotalEl.classList.add('pass');\n } else {\n testTotalEl.innerText = 'FAIL';\n testTotalEl.classList.remove('pass');\n testTotalEl.classList.add('fail');\n }\n }\n\n function printAssertError(errObj) {\n // make element string\n let inner = '';\n if (errObj !== null) {\n inner = `\n
\n Expected: ${JSON.stringify(errObj.expected)}\n Actual: ${JSON.stringify(errObj.actual)}\n
`;\n }\n\n // prepend element\n assertConsoleEl.innerHTML = inner;\n }\n\n function printEvalOutput(errObj, output) {\n // make element string\n let inner = '';\n if (errObj && errObj.message !== undefined) {\n inner = `\n
\n Syntax Error: ${JSON.stringify(errObj.message)}\n
`;\n } else if (output) {\n inner = `\n
\n Output: ${JSON.stringify(output)}\n
`;\n }\n // prepend element\n evalConsoleEl.innerHTML = inner;\n }\n\n // VERIFICATION LOGIC\n // ============================================================\n\n function testSuite(init) {\n // console.log('codeEl.value:', codeEl.value);\n // console.log(typeof codeEl.value);\n // run stuff\n const output = getOutput(codeEl.value);\n // console.log('output:', output);\n // run tests on code, return object/array of test results\n const tested = runTests(output);\n // update UI with results\n updateTests(tested, init);\n }\n\n function getOutput(code) {\n let evald = false;\n try {\n evald = eval(`(function(){${code}})()`);\n printEvalOutput(null, evald); // print current output\n } catch (error) {\n // console.log('eval error:', error);\n printEvalOutput(error);\n }\n return evald;\n }\n\n function runTests(output) {\n let tested = false;\n tested = currentProblem.tests.map(test => {\n let testOutcome = false;\n try {\n if (!output) {\n testOutcome = false;\n } else {\n testOutcome = test.test(output);\n }\n printAssertError(null);\n return testOutcome;\n } catch (error) {\n // console.log('error:', error);\n printAssertError(error);\n }\n });\n return tested;\n }\n\n // wrapped to prevent race with local config retrieval\n function loadApp(config) {\n console.log('loading app!');\n\n // show current toggle state\n if (config.shuffle === true) {\n shuffleProblemsButtonEl.classList.add('active');\n }\n\n // bind it up\n codeEl.addEventListener('keyup', function(e) {\n // if not arrow keys or other non-character keys\n if (ignoreKeyCodes.indexOf(e.keyCode) === -1) {\n // run test suite\n testSuite();\n }\n });\n shuffleProblemsButtonEl.addEventListener('click', toggleShuffle);\n previousProblemButtonEl.addEventListener('click', previousProblem);\n nextProblemButtonEl.addEventListener('click', nextProblem);\n\n // start it up!\n // load current problem\n const currProb = getCurrentProblem(problems);\n loadProblem(currProb);\n // initalized test suite with starting failures\n testSuite(true);\n } // loadApp()\n})();\n","const assert = require('chai').assert;\n\nmodule.exports = [\n {\n name: 'Create Array',\n time: 10,\n prompt: \"Create and return an array that contains 'apple' and 'banana'\",\n answer: `const fruits = ['apple', 'banana'];\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['apple', 'banana']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (first)',\n time: 10,\n prompt: 'Return the first value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[0];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'apple') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (last)',\n time: 10,\n prompt: 'Return the last value of the Array',\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n return fruits[fruits.length - 1];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'orange') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Access Array by index (second)',\n time: 10,\n prompt: 'Return the second value of the Array',\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n return fruits[1];`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'banana') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.forEach()',\n time: 20,\n prompt: \"Loop over the array, add an 'x' to the end of each name, push each fruit into a new array, then return the new array.\",\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n const newFruits = [];\n fruits.forEach(function(item) {\n newFruits.push(item+'x');\n });\n return newFruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['applex', 'bananax']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.push()',\n time: 10,\n prompt: `Add 'orange' to the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana'];\\r`,\n answer: `const fruits = ['apple', 'banana'];\n fruits.push('orange');\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, ['apple', 'banana', 'orange']) ===\n undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 3 items',\n test: function(output) {\n return assert.lengthOf(output, 3) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.pop()',\n time: 10,\n prompt: `Remove 'orange' from the end of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.pop();\n return fruits;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['apple', 'banana']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.shift()',\n time: 10,\n prompt: `Remove 'apple' from the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.shift();\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: function(output) {\n return assert.deepEqual(output, ['banana', 'orange']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.unshift()',\n time: 10,\n prompt: `Add 'strawberry' to the front of the 'fruits' array and return 'fruits'.`,\n given: `const fruits = ['apple', 'banana', 'orange'];\\r`,\n answer: `const fruits = ['apple', 'banana', 'orange'];\n fruits.unshift('strawberry');\n return fruits;`,\n tests: [\n {\n name: 'Output must be correct',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'strawberry',\n 'apple',\n 'banana',\n 'orange',\n ]) === undefined\n );\n },\n },\n {\n name: 'Must return an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.indexOf()',\n time: 10,\n prompt: `Return the index of 'banana' in the Array.`,\n given: `const fruits = ['strawberry', 'banana', 'mango'];\\r`,\n answer: `const fruits = ['strawberry', 'banana', 'mango'];\n const ind = fruits.indexOf('banana');\n return ind;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 1) === undefined;\n },\n },\n {\n name: 'Returns a Number',\n test: function(output) {\n return assert.isNumber(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.concat()',\n time: 10,\n prompt: `Merge the two arrays using Array's 'concat()' method. Return the resulting array.`,\n given: `const fruits = ['strawberry', 'banana'];\\rconst otherFruits = ['pear','peach'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const otherFruits = ['pear','peach'];\n const allTheFruits = fruits.concat(otherFruits);\n return allTheFruits;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'strawberry',\n 'banana',\n 'pear',\n 'peach',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.join()',\n time: 10,\n prompt: `Mix the two flavors with a '-' using Array's 'join' method. Return the resulting hybrid flavor.`,\n given: `const fruits = ['strawberry', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'banana'];\n const hybrid = fruits.join('-');\n return hybrid;\\r`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 'strawberry-banana') === undefined;\n },\n },\n {\n name: 'Returns a String',\n test: function(output) {\n return assert.isString(output) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.slice()',\n time: 20,\n prompt: `Return just the citrus fruits from the 'fruits' array using 'Array.slice()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const citrus = fruits.slice(1, 3);\n return citrus;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, ['orange', 'lemon']) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 2 items',\n test: function(output) {\n return assert.lengthOf(output, 2) === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.reverse()',\n time: 10,\n prompt: `Reverse the order of the 'fruit' array using 'Array.reverse()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const stiurf = fruits.reverse();\n return stiurf;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n {\n name: `First item is 'banana'`,\n test: function(output) {\n return assert.deepEqual(output[0], 'banana') === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.sort()',\n time: 10,\n prompt: `Sort the order of the 'fruit' array using 'Array.sort()'`,\n given: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\\r`,\n answer: `const fruits = ['strawberry', 'orange', 'lemon', 'banana'];\n const orderlyFruit = fruits.sort();\n return orderlyFruit;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return (\n assert.deepEqual(output, [\n 'banana',\n 'lemon',\n 'orange',\n 'strawberry',\n ]) === undefined\n );\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 4 items',\n test: function(output) {\n return assert.lengthOf(output, 4) === undefined;\n },\n },\n {\n name: `First item is 'banana'`,\n test: function(output) {\n return assert.deepEqual(output[0], 'banana') === undefined;\n },\n },\n ],\n },\n {\n name: 'Array.lastIndexOf()',\n time: 10,\n prompt: `Return the index of the last 'peach' instance in the 'fruit' array using 'Array.lastIndexOf()'`,\n given: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\\r`,\n answer: `const fruits = ['peach', 'orange', 'lemon', 'peach'];\n const wheresTheLastPeach = fruits.lastIndexOf('peach');\n return wheresTheLastPeach;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, 3) === undefined;\n },\n },\n {\n name: 'Returns a Number',\n test: function(output) {\n return assert.isNumber(output) === undefined;\n },\n },\n ],\n },\n // forEach? fix one above that tried, but can't verify forEach was used\n // .map\n // filter\n {\n name: 'Array.filter()',\n time: 10,\n prompt: `return an array of the numbers greater than 5 in 'fruits' using 'Array.filter()'`,\n given: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\\r`,\n answer: `const numbers = [1, 1, 2, 3, 5, 8, 13, 21];\n const overFive = numbers.filter(num => num > 5);\n return overFive;`,\n tests: [\n {\n name: 'Correct output',\n test: function(output) {\n return assert.deepEqual(output, [8, 13, 21]) === undefined;\n },\n },\n {\n name: 'Returns an Array',\n test: function(output) {\n return assert.isArray(output) === undefined;\n },\n },\n {\n name: 'Array has 3 items',\n test: function(output) {\n return assert.lengthOf(output, 3) === undefined;\n },\n },\n {\n name: `First item is 8`,\n test: function(output) {\n return assert.deepEqual(output[0], 8) === undefined;\n },\n },\n ],\n },\n // every\n // some\n // reduce\n // reduceRight\n // Array.from and other ways to turn array-like into array\n];\n"]} \ No newline at end of file diff --git a/src/js/index.js b/src/js/index.js index 9f2e2d4..eaad2ec 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -134,6 +134,7 @@ config.shuffle = config.shuffle === true ? false : true; shuffleProblemsButtonEl.classList.toggle('active'); updateLocalstore(config); + } function loadProblem(problemObj) {