{"version":3,"file":"dexie.js","sources":["../C:/repos/dexie-release/tools/tmp/src/debug.js","../C:/repos/dexie-release/tools/tmp/src/chaining-functions.js","../C:/repos/dexie-release/tools/tmp/src/utils.js","../C:/repos/dexie-release/tools/tmp/src/errors.js","../C:/repos/dexie-release/tools/tmp/src/Events.js","../C:/repos/dexie-release/tools/tmp/src/Promise.js","../C:/repos/dexie-release/tools/tmp/src/Dexie.js"],"sourcesContent":["// By default, debug will be true only if platform is a web platform and its page is served from localhost.\n// When debug = true, error's stacks will contain asyncronic long stacks.\nexport var debug = typeof location !== 'undefined' &&\n// By default, use debug mode if served from localhost.\n/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);\n\nexport function setDebug(value, filter) {\n debug = value;\n libraryFilter = filter;\n}\n\nexport var libraryFilter = function () {\n return true;\n};\n\nexport var NEEDS_THROW_FOR_STACK = !new Error(\"\").stack;\n\nexport function getErrorWithStack() {\n \"use strict\";\n\n if (NEEDS_THROW_FOR_STACK) try {\n // Doing something naughty in strict mode here to trigger a specific error\n // that can be explicitely ignored in debugger's exception settings.\n // If we'd just throw new Error() here, IE's debugger's exception settings\n // will just consider it as \"exception thrown by javascript code\" which is\n // something you wouldn't want it to ignore.\n getErrorWithStack.arguments;\n throw new Error(); // Fallback if above line don't throw.\n } catch (e) {\n return e;\n }\n return new Error();\n}\n\nexport function prettyStack(exception, numIgnoredFrames) {\n var stack = exception.stack;\n if (!stack) return \"\";\n numIgnoredFrames = numIgnoredFrames || 0;\n if (stack.indexOf(exception.name) === 0) numIgnoredFrames += (exception.name + exception.message).split('\\n').length;\n return stack.split('\\n').slice(numIgnoredFrames).filter(libraryFilter).map(function (frame) {\n return \"\\n\" + frame;\n }).join('');\n}","import { extend } from './utils';\n\nexport function nop() {}\nexport function mirror(val) {\n return val;\n}\nexport function pureFunctionChain(f1, f2) {\n // Enables chained events that takes ONE argument and returns it to the next function in chain.\n // This pattern is used in the hook(\"reading\") event.\n if (f1 == null || f1 === mirror) return f2;\n return function (val) {\n return f2(f1(val));\n };\n}\n\nexport function callBoth(on1, on2) {\n return function () {\n on1.apply(this, arguments);\n on2.apply(this, arguments);\n };\n}\n\nexport function hookCreatingChain(f1, f2) {\n // Enables chained events that takes several arguments and may modify first argument by making a modification and then returning the same instance.\n // This pattern is used in the hook(\"creating\") event.\n if (f1 === nop) return f2;\n return function () {\n var res = f1.apply(this, arguments);\n if (res !== undefined) arguments[0] = res;\n var onsuccess = this.onsuccess,\n // In case event listener has set this.onsuccess\n onerror = this.onerror; // In case event listener has set this.onerror\n this.onsuccess = null;\n this.onerror = null;\n var res2 = f2.apply(this, arguments);\n if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n return res2 !== undefined ? res2 : res;\n };\n}\n\nexport function hookDeletingChain(f1, f2) {\n if (f1 === nop) return f2;\n return function () {\n f1.apply(this, arguments);\n var onsuccess = this.onsuccess,\n // In case event listener has set this.onsuccess\n onerror = this.onerror; // In case event listener has set this.onerror\n this.onsuccess = this.onerror = null;\n f2.apply(this, arguments);\n if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n };\n}\n\nexport function hookUpdatingChain(f1, f2) {\n if (f1 === nop) return f2;\n return function (modifications) {\n var res = f1.apply(this, arguments);\n extend(modifications, res); // If f1 returns new modifications, extend caller's modifications with the result before calling next in chain.\n var onsuccess = this.onsuccess,\n // In case event listener has set this.onsuccess\n onerror = this.onerror; // In case event listener has set this.onerror\n this.onsuccess = null;\n this.onerror = null;\n var res2 = f2.apply(this, arguments);\n if (onsuccess) this.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n if (onerror) this.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n return res === undefined ? res2 === undefined ? undefined : res2 : extend(res, res2);\n };\n}\n\nexport function reverseStoppableEventChain(f1, f2) {\n if (f1 === nop) return f2;\n return function () {\n if (f2.apply(this, arguments) === false) return false;\n return f1.apply(this, arguments);\n };\n}\n\nexport function nonStoppableEventChain(f1, f2) {\n if (f1 === nop) return f2;\n return function () {\n f1.apply(this, arguments);\n f2.apply(this, arguments);\n };\n}\n\nexport function promisableChain(f1, f2) {\n if (f1 === nop) return f2;\n return function () {\n var res = f1.apply(this, arguments);\n if (res && typeof res.then === 'function') {\n var thiz = this,\n i = arguments.length,\n args = new Array(i);\n while (i--) {\n args[i] = arguments[i];\n }return res.then(function () {\n return f2.apply(thiz, args);\n });\n }\n return f2.apply(this, arguments);\n };\n}","/*\r\n* Dexie.js - a minimalistic wrapper for IndexedDB\r\n* ===============================================\r\n*\r\n* By David Fahlander, david.fahlander@gmail.com\r\n*\r\n* Version {version}, {date}\r\n* www.dexie.com\r\n* Apache License Version 2.0, January 2004, http://www.apache.org/licenses/\r\n*/\nimport Promise from './Promise';\nimport { exceptions } from './errors';\n\nexport var keys = Object.keys;\nexport var isArray = Array.isArray;\nexport var _global = typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n\nexport function extend(obj, extension) {\n if (typeof extension !== 'object') return obj;\n keys(extension).forEach(function (key) {\n obj[key] = extension[key];\n });\n return obj;\n}\n\nexport var getProto = Object.getPrototypeOf;\nexport var _hasOwn = {}.hasOwnProperty;\nexport function hasOwn(obj, prop) {\n return _hasOwn.call(obj, prop);\n}\n\nexport function props(proto, extension) {\n if (typeof extension === 'function') extension = extension(getProto(proto));\n keys(extension).forEach(function (key) {\n setProp(proto, key, extension[key]);\n });\n}\n\nexport function setProp(obj, prop, functionOrGetSet, options) {\n Object.defineProperty(obj, prop, extend(functionOrGetSet && hasOwn(functionOrGetSet, \"get\") && typeof functionOrGetSet.get === 'function' ? { get: functionOrGetSet.get, set: functionOrGetSet.set, configurable: true } : { value: functionOrGetSet, configurable: true, writable: true }, options));\n}\n\nexport function derive(Child) {\n return {\n from: function (Parent) {\n Child.prototype = Object.create(Parent.prototype);\n setProp(Child.prototype, \"constructor\", Child);\n return {\n extend: props.bind(null, Child.prototype)\n };\n }\n };\n}\n\nexport var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\nexport function getPropertyDescriptor(obj, prop) {\n var pd = getOwnPropertyDescriptor(obj, prop),\n proto;\n return pd || (proto = getProto(obj)) && getPropertyDescriptor(proto, prop);\n}\n\nvar _slice = [].slice;\nexport function slice(args, start, end) {\n return _slice.call(args, start, end);\n}\n\nexport function override(origFunc, overridedFactory) {\n return overridedFactory(origFunc);\n}\n\nexport function doFakeAutoComplete(fn) {\n var to = setTimeout(fn, 1000);\n clearTimeout(to);\n}\n\nexport function assert(b) {\n if (!b) throw new exceptions.Internal(\"Assertion failed\");\n}\n\nexport function asap(fn) {\n if (_global.setImmediate) setImmediate(fn);else setTimeout(fn, 0);\n}\n\nexport function getUniqueArray(a) {\n return a.filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n}\n\n/** Generate an object (hash map) based on given array.\r\n * @param extractor Function taking an array item and its index and returning an array of 2 items ([key, value]) to\r\n * instert on the resulting object for each item in the array. If this function returns a falsy value, the\r\n * current item wont affect the resulting object.\r\n */\nexport function arrayToObject(array, extractor) {\n return array.reduce(function (result, item, i) {\n var nameAndValue = extractor(item, i);\n if (nameAndValue) result[nameAndValue[0]] = nameAndValue[1];\n return result;\n }, {});\n}\n\nexport function trycatcher(fn, reject) {\n return function () {\n try {\n fn.apply(this, arguments);\n } catch (e) {\n reject(e);\n }\n };\n}\n\nexport function tryCatch(fn, onerror, args) {\n try {\n fn.apply(null, args);\n } catch (ex) {\n onerror && onerror(ex);\n }\n}\n\nexport function rejection(err, uncaughtHandler) {\n // Get the call stack and return a rejected promise.\n var rv = Promise.reject(err);\n return uncaughtHandler ? rv.uncaught(uncaughtHandler) : rv;\n}\n\nexport function getByKeyPath(obj, keyPath) {\n // http://www.w3.org/TR/IndexedDB/#steps-for-extracting-a-key-from-a-value-using-a-key-path\n if (hasOwn(obj, keyPath)) return obj[keyPath]; // This line is moved from last to first for optimization purpose.\n if (!keyPath) return obj;\n if (typeof keyPath !== 'string') {\n var rv = [];\n for (var i = 0, l = keyPath.length; i < l; ++i) {\n var val = getByKeyPath(obj, keyPath[i]);\n rv.push(val);\n }\n return rv;\n }\n var period = keyPath.indexOf('.');\n if (period !== -1) {\n var innerObj = obj[keyPath.substr(0, period)];\n return innerObj === undefined ? undefined : getByKeyPath(innerObj, keyPath.substr(period + 1));\n }\n return undefined;\n}\n\nexport function setByKeyPath(obj, keyPath, value) {\n if (!obj || keyPath === undefined) return;\n if ('isFrozen' in Object && Object.isFrozen(obj)) return;\n if (typeof keyPath !== 'string' && 'length' in keyPath) {\n assert(typeof value !== 'string' && 'length' in value);\n for (var i = 0, l = keyPath.length; i < l; ++i) {\n setByKeyPath(obj, keyPath[i], value[i]);\n }\n } else {\n var period = keyPath.indexOf('.');\n if (period !== -1) {\n var currentKeyPath = keyPath.substr(0, period);\n var remainingKeyPath = keyPath.substr(period + 1);\n if (remainingKeyPath === \"\") {\n if (value === undefined) delete obj[currentKeyPath];else obj[currentKeyPath] = value;\n } else {\n var innerObj = obj[currentKeyPath];\n if (!innerObj) innerObj = obj[currentKeyPath] = {};\n setByKeyPath(innerObj, remainingKeyPath, value);\n }\n } else {\n if (value === undefined) delete obj[keyPath];else obj[keyPath] = value;\n }\n }\n}\n\nexport function delByKeyPath(obj, keyPath) {\n if (typeof keyPath === 'string') setByKeyPath(obj, keyPath, undefined);else if ('length' in keyPath) [].map.call(keyPath, function (kp) {\n setByKeyPath(obj, kp, undefined);\n });\n}\n\nexport function shallowClone(obj) {\n var rv = {};\n for (var m in obj) {\n if (hasOwn(obj, m)) rv[m] = obj[m];\n }\n return rv;\n}\n\nexport function deepClone(any) {\n if (!any || typeof any !== 'object') return any;\n var rv;\n if (isArray(any)) {\n rv = [];\n for (var i = 0, l = any.length; i < l; ++i) {\n rv.push(deepClone(any[i]));\n }\n } else if (any instanceof Date) {\n rv = new Date();\n rv.setTime(any.getTime());\n } else {\n rv = any.constructor ? Object.create(any.constructor.prototype) : {};\n for (var prop in any) {\n if (hasOwn(any, prop)) {\n rv[prop] = deepClone(any[prop]);\n }\n }\n }\n return rv;\n}\n\nexport function getObjectDiff(a, b, rv, prfx) {\n // Compares objects a and b and produces a diff object.\n rv = rv || {};\n prfx = prfx || '';\n keys(a).forEach(function (prop) {\n if (!hasOwn(b, prop)) rv[prfx + prop] = undefined; // Property removed\n else {\n var ap = a[prop],\n bp = b[prop];\n if (typeof ap === 'object' && typeof bp === 'object' && ap && bp && ap.constructor === bp.constructor)\n // Same type of object but its properties may have changed\n getObjectDiff(ap, bp, rv, prfx + prop + \".\");else if (ap !== bp) rv[prfx + prop] = b[prop]; // Primitive value changed\n }\n });\n keys(b).forEach(function (prop) {\n if (!hasOwn(a, prop)) {\n rv[prfx + prop] = b[prop]; // Property added\n }\n });\n return rv;\n}\n\nexport function idbp(idbOperation) {\n return new Promise(function (resolve, reject) {\n var req = idbOperation();\n req.onerror = reject;\n req.onsuccess = resolve;\n });\n}\n\n// If first argument is iterable or array-like, return it as an array\nexport var iteratorSymbol = typeof Symbol !== 'undefined' && Symbol.iterator;\nexport var getIteratorOf = iteratorSymbol ? function (x) {\n var i;\n return x != null && (i = x[iteratorSymbol]) && i.apply(x);\n} : function () {\n return null;\n};\n\nexport var NO_CHAR_ARRAY = {};\n// Takes one or several arguments and returns an array based on the following criteras:\n// * If several arguments provided, return arguments converted to an array in a way that\n// still allows javascript engine to optimize the code.\n// * If single argument is an array, return a clone of it.\n// * If this-pointer equals NO_CHAR_ARRAY, don't accept strings as valid iterables as a special\n// case to the two bullets below.\n// * If single argument is an iterable, convert it to an array and return the resulting array.\n// * If single argument is array-like (has length of type number), convert it to an array.\nexport function getArrayOf(arrayLike) {\n var i, a, x, it;\n if (arguments.length === 1) {\n if (isArray(arrayLike)) return arrayLike.slice();\n if (this === NO_CHAR_ARRAY && typeof arrayLike === 'string') return [arrayLike];\n if (it = getIteratorOf(arrayLike)) {\n a = [];\n while (x = it.next(), !x.done) {\n a.push(x.value);\n }return a;\n }\n if (arrayLike == null) return [arrayLike];\n i = arrayLike.length;\n if (typeof i === 'number') {\n a = new Array(i);\n while (i--) {\n a[i] = arrayLike[i];\n }return a;\n }\n return [arrayLike];\n }\n i = arguments.length;\n a = new Array(i);\n while (i--) {\n a[i] = arguments[i];\n }return a;\n}\n\nvar concat = [].concat;\nexport function flatten(a) {\n return concat.apply([], a);\n}","import { derive, setProp } from './utils';\nimport { getErrorWithStack, prettyStack } from './debug';\n\nvar dexieErrorNames = ['Modify', 'Bulk', 'OpenFailed', 'VersionChange', 'Schema', 'Upgrade', 'InvalidTable', 'MissingAPI', 'NoSuchDatabase', 'InvalidArgument', 'SubTransaction', 'Unsupported', 'Internal', 'DatabaseClosed', 'IncompatiblePromise'];\n\nvar idbDomErrorNames = ['Unknown', 'Constraint', 'Data', 'TransactionInactive', 'ReadOnly', 'Version', 'NotFound', 'InvalidState', 'InvalidAccess', 'Abort', 'Timeout', 'QuotaExceeded', 'Syntax', 'DataClone'];\n\nvar errorList = dexieErrorNames.concat(idbDomErrorNames);\n\nvar defaultTexts = {\n VersionChanged: \"Database version changed by other database connection\",\n DatabaseClosed: \"Database has been closed\",\n Abort: \"Transaction aborted\",\n TransactionInactive: \"Transaction has already completed or failed\"\n};\n\n//\n// DexieError - base class of all out exceptions.\n//\nexport function DexieError(name, msg) {\n // Reason we don't use ES6 classes is because:\n // 1. It bloats transpiled code and increases size of minified code.\n // 2. It doesn't give us much in this case.\n // 3. It would require sub classes to call super(), which\n // is not needed when deriving from Error.\n this._e = getErrorWithStack();\n this.name = name;\n this.message = msg;\n}\n\nderive(DexieError).from(Error).extend({\n stack: {\n get: function () {\n return this._stack || (this._stack = this.name + \": \" + this.message + prettyStack(this._e, 2));\n }\n },\n toString: function () {\n return this.name + \": \" + this.message;\n }\n});\n\nfunction getMultiErrorMessage(msg, failures) {\n return msg + \". Errors: \" + failures.map(function (f) {\n return f.toString();\n }).filter(function (v, i, s) {\n return s.indexOf(v) === i;\n }) // Only unique error strings\n .join('\\n');\n}\n\n//\n// ModifyError - thrown in WriteableCollection.modify()\n// Specific constructor because it contains members failures and failedKeys.\n//\nexport function ModifyError(msg, failures, successCount, failedKeys) {\n this._e = getErrorWithStack();\n this.failures = failures;\n this.failedKeys = failedKeys;\n this.successCount = successCount;\n}\nderive(ModifyError).from(DexieError);\n\nexport function BulkError(msg, failures) {\n this._e = getErrorWithStack();\n this.name = \"BulkError\";\n this.failures = failures;\n this.message = getMultiErrorMessage(msg, failures);\n}\nderive(BulkError).from(DexieError);\n\n//\n//\n// Dynamically generate error names and exception classes based\n// on the names in errorList.\n//\n//\n\n// Map of {ErrorName -> ErrorName + \"Error\"}\nexport var errnames = errorList.reduce(function (obj, name) {\n return obj[name] = name + \"Error\", obj;\n}, {});\n\n// Need an alias for DexieError because we're gonna create subclasses with the same name.\nvar BaseException = DexieError;\n// Map of {ErrorName -> exception constructor}\nexport var exceptions = errorList.reduce(function (obj, name) {\n // Let the name be \"DexieError\" because this name may\n // be shown in call stack and when debugging. DexieError is\n // the most true name because it derives from DexieError,\n // and we cannot change Function.name programatically without\n // dynamically create a Function object, which would be considered\n // 'eval-evil'.\n var fullName = name + \"Error\";\n function DexieError(msgOrInner, inner) {\n this._e = getErrorWithStack();\n this.name = fullName;\n if (!msgOrInner) {\n this.message = defaultTexts[name] || fullName;\n this.inner = null;\n } else if (typeof msgOrInner === 'string') {\n this.message = msgOrInner;\n this.inner = inner || null;\n } else if (typeof msgOrInner === 'object') {\n this.message = msgOrInner.name + ' ' + msgOrInner.message;\n this.inner = msgOrInner;\n }\n }\n derive(DexieError).from(BaseException);\n obj[name] = DexieError;\n return obj;\n}, {});\n\n// Use ECMASCRIPT standard exceptions where applicable:\nexceptions.Syntax = SyntaxError;\nexceptions.Type = TypeError;\nexceptions.Range = RangeError;\n\nexport var exceptionMap = idbDomErrorNames.reduce(function (obj, name) {\n obj[name + \"Error\"] = exceptions[name];\n return obj;\n}, {});\n\nexport function mapError(domError, message) {\n if (!domError || domError instanceof DexieError || domError instanceof TypeError || domError instanceof SyntaxError || !domError.name || !exceptionMap[domError.name]) return domError;\n var rv = new exceptionMap[domError.name](message || domError.message, domError);\n if (\"stack\" in domError) {\n // Derive stack from inner exception if it has a stack\n setProp(rv, \"stack\", { get: function () {\n return this.inner.stack;\n } });\n }\n return rv;\n}\n\nexport var fullNameExceptions = errorList.reduce(function (obj, name) {\n if ([\"Syntax\", \"Type\", \"Range\"].indexOf(name) === -1) obj[name + \"Error\"] = exceptions[name];\n return obj;\n}, {});\n\nfullNameExceptions.ModifyError = ModifyError;\nfullNameExceptions.DexieError = DexieError;\nfullNameExceptions.BulkError = BulkError;","import { keys, isArray, asap } from './utils';\nimport { nop, mirror, reverseStoppableEventChain } from './chaining-functions';\nimport { exceptions } from './errors';\n\nexport default function Events(ctx) {\n var evs = {};\n var rv = function (eventName, subscriber) {\n if (subscriber) {\n // Subscribe. If additional arguments than just the subscriber was provided, forward them as well.\n var i = arguments.length,\n args = new Array(i - 1);\n while (--i) {\n args[i - 1] = arguments[i];\n }evs[eventName].subscribe.apply(null, args);\n return ctx;\n } else if (typeof eventName === 'string') {\n // Return interface allowing to fire or unsubscribe from event\n return evs[eventName];\n }\n };\n rv.addEventType = add;\n\n for (var i = 1, l = arguments.length; i < l; ++i) {\n add(arguments[i]);\n }\n\n return rv;\n\n function add(eventName, chainFunction, defaultFunction) {\n if (typeof eventName === 'object') return addConfiguredEvents(eventName);\n if (!chainFunction) chainFunction = reverseStoppableEventChain;\n if (!defaultFunction) defaultFunction = nop;\n\n var context = {\n subscribers: [],\n fire: defaultFunction,\n subscribe: function (cb) {\n if (context.subscribers.indexOf(cb) === -1) {\n context.subscribers.push(cb);\n context.fire = chainFunction(context.fire, cb);\n }\n },\n unsubscribe: function (cb) {\n context.subscribers = context.subscribers.filter(function (fn) {\n return fn !== cb;\n });\n context.fire = context.subscribers.reduce(chainFunction, defaultFunction);\n }\n };\n evs[eventName] = rv[eventName] = context;\n return context;\n }\n\n function addConfiguredEvents(cfg) {\n // events(this, {reading: [functionChain, nop]});\n keys(cfg).forEach(function (eventName) {\n var args = cfg[eventName];\n if (isArray(args)) {\n add(eventName, cfg[eventName][0], cfg[eventName][1]);\n } else if (args === 'asap') {\n // Rather than approaching event subscription using a functional approach, we here do it in a for-loop where subscriber is executed in its own stack\n // enabling that any exception that occur wont disturb the initiator and also not nescessary be catched and forgotten.\n var context = add(eventName, mirror, function fire() {\n // Optimazation-safe cloning of arguments into args.\n var i = arguments.length,\n args = new Array(i);\n while (i--) {\n args[i] = arguments[i];\n } // All each subscriber:\n context.subscribers.forEach(function (fn) {\n asap(function fireEvent() {\n fn.apply(null, args);\n });\n });\n });\n } else throw new exceptions.InvalidArgument(\"Invalid event config\");\n });\n }\n}","import { doFakeAutoComplete, tryCatch, props, setProp, _global, getPropertyDescriptor, getArrayOf } from './utils';\nimport { reverseStoppableEventChain, nop, callBoth, mirror } from './chaining-functions';\nimport Events from './Events';\nimport { debug, prettyStack, getErrorWithStack } from './debug';\n\n//\n// Promise Class for Dexie library\n//\n// I started out writing this Promise class by copying promise-light (https://github.com/taylorhakes/promise-light) by\n// https://github.com/taylorhakes - an A+ and ECMASCRIPT 6 compliant Promise implementation.\n//\n// Modifications needed to be done to support indexedDB because it wont accept setTimeout()\n// (See discussion: https://github.com/promises-aplus/promises-spec/issues/45) .\n// This topic was also discussed in the following thread: https://github.com/promises-aplus/promises-spec/issues/45\n//\n// This implementation will not use setTimeout or setImmediate when it's not needed. The behavior is 100% Promise/A+ compliant since\n// the caller of new Promise() can be certain that the promise wont be triggered the lines after constructing the promise.\n//\n// In previous versions this was fixed by not calling setTimeout when knowing that the resolve() or reject() came from another\n// tick. In Dexie v1.4.0, I've rewritten the Promise class entirely. Just some fragments of promise-light is left. I use\n// another strategy now that simplifies everything a lot: to always execute callbacks in a new tick, but have an own microTick\n// engine that is used instead of setImmediate() or setTimeout().\n// Promise class has also been optimized a lot with inspiration from bluebird - to avoid closures as much as possible.\n// Also with inspiration from bluebird, asyncronic stacks in debug mode.\n//\n// Specific non-standard features of this Promise class:\n// * Async static context support (Promise.PSD)\n// * Promise.follow() method built upon PSD, that allows user to track all promises created from current stack frame\n// and below + all promises that those promises creates or awaits.\n// * Detect any unhandled promise in a PSD-scope (PSD.onunhandled).\n//\n// David Fahlander, https://github.com/dfahlander\n//\n\n// Just a pointer that only this module knows about.\n// Used in Promise constructor to emulate a private constructor.\nvar INTERNAL = {};\n\n// Async stacks (long stacks) must not grow infinitely.\nvar LONG_STACKS_CLIP_LIMIT = 100,\n\n// When calling error.stack or promise.stack, limit the number of asyncronic stacks to print out.\nMAX_LONG_STACKS = 20,\n stack_being_generated = false;\n\n/* The default \"nextTick\" function used only for the very first promise in a promise chain.\r\n As soon as then promise is resolved or rejected, all next tasks will be executed in micro ticks\r\n emulated in this module. For indexedDB compatibility, this means that every method needs to \r\n execute at least one promise before doing an indexedDB operation. Dexie will always call \r\n db.ready().then() for every operation to make sure the indexedDB event is started in an\r\n emulated micro tick.\r\n*/\nvar schedulePhysicalTick = typeof setImmediate === 'undefined' ?\n// No support for setImmediate. No worry, setTimeout is only called\n// once time. Every tick that follows will be our emulated micro tick.\n// Could have uses setTimeout.bind(null, 0, physicalTick) if it wasnt for that FF13 and below has a bug\nfunction () {\n setTimeout(physicalTick, 0);\n} :\n// setImmediate supported. Modern platform. Also supports Function.bind().\nsetImmediate.bind(null, physicalTick);\n\n// Confifurable through Promise.scheduler.\n// Don't export because it would be unsafe to let unknown\n// code call it unless they do try..catch within their callback.\n// This function can be retrieved through getter of Promise.scheduler though,\n// but users must not do Promise.scheduler (myFuncThatThrows exception)!\nvar asap = function (callback, args) {\n microtickQueue.push([callback, args]);\n if (needsNewPhysicalTick) {\n schedulePhysicalTick();\n needsNewPhysicalTick = false;\n }\n};\n\nvar isOutsideMicroTick = true,\n // True when NOT in a virtual microTick.\nneedsNewPhysicalTick = true,\n // True when a push to microtickQueue must also schedulePhysicalTick()\nunhandledErrors = [],\n // Rejected promises that has occured. Used for firing Promise.on.error and promise.onuncatched.\nrejectingErrors = [],\n // Tracks if errors are being re-rejected during onRejected callback.\ncurrentFulfiller = null,\n rejectionMapper = mirror; // Remove in next major when removing error mapping of DOMErrors and DOMExceptions\n\nexport var globalPSD = {\n global: true,\n ref: 0,\n unhandleds: [],\n onunhandled: globalError,\n //env: null, // Will be set whenever leaving a scope using wrappers.snapshot()\n finalize: function () {\n this.unhandleds.forEach(function (uh) {\n try {\n globalError(uh[0], uh[1]);\n } catch (e) {}\n });\n }\n};\n\nexport var PSD = globalPSD;\n\nexport var microtickQueue = []; // Callbacks to call in this or next physical tick.\nexport var numScheduledCalls = 0; // Number of listener-calls left to do in this physical tick.\nexport var tickFinalizers = []; // Finalizers to call when there are no more async calls scheduled within current physical tick.\n\n// Wrappers are not being used yet. Their framework is functioning and can be used\n// to replace environment during a PSD scope (a.k.a. 'zone').\n/* **KEEP** export var wrappers = (() => {\r\n var wrappers = [];\r\n\r\n return {\r\n snapshot: () => {\r\n var i = wrappers.length,\r\n result = new Array(i);\r\n while (i--) result[i] = wrappers[i].snapshot();\r\n return result;\r\n },\r\n restore: values => {\r\n var i = wrappers.length;\r\n while (i--) wrappers[i].restore(values[i]);\r\n },\r\n wrap: () => wrappers.map(w => w.wrap()),\r\n add: wrapper => {\r\n wrappers.push(wrapper);\r\n }\r\n };\r\n})();\r\n*/\n\nexport default function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n this._listeners = [];\n this.onuncatched = nop; // Deprecate in next major. Not needed. Better to use global error handler.\n\n // A library may set `promise._lib = true;` after promise is created to make resolve() or reject()\n // execute the microtask engine implicitely within the call to resolve() or reject().\n // To remain A+ compliant, a library must only set `_lib=true` if it can guarantee that the stack\n // only contains library code when calling resolve() or reject().\n // RULE OF THUMB: ONLY set _lib = true for promises explicitely resolving/rejecting directly from\n // global scope (event handler, timer etc)!\n this._lib = false;\n // Current async scope\n var psd = this._PSD = PSD;\n\n if (debug) {\n this._stackHolder = getErrorWithStack();\n this._prev = null;\n this._numPrev = 0; // Number of previous promises (for long stacks)\n linkToPreviousPromise(this, currentFulfiller);\n }\n\n if (typeof fn !== 'function') {\n if (fn !== INTERNAL) throw new TypeError('Not a function');\n // Private constructor (INTERNAL, state, value).\n // Used internally by Promise.resolve() and Promise.reject().\n this._state = arguments[1];\n this._value = arguments[2];\n if (this._state === false) handleRejection(this, this._value); // Map error, set stack and addPossiblyUnhandledError().\n return;\n }\n\n this._state = null; // null (=pending), false (=rejected) or true (=resolved)\n this._value = null; // error or result\n ++psd.ref; // Refcounting current scope\n executePromiseTask(this, fn);\n}\n\nprops(Promise.prototype, {\n\n then: function (onFulfilled, onRejected) {\n var _this = this;\n\n var rv = new Promise(function (resolve, reject) {\n propagateToListener(_this, new Listener(onFulfilled, onRejected, resolve, reject));\n });\n debug && (!this._prev || this._state === null) && linkToPreviousPromise(rv, this);\n return rv;\n },\n\n _then: function (onFulfilled, onRejected) {\n // A little tinier version of then() that don't have to create a resulting promise.\n propagateToListener(this, new Listener(null, null, onFulfilled, onRejected));\n },\n\n catch: function (onRejected) {\n if (arguments.length === 1) return this.then(null, onRejected);\n // First argument is the Error type to catch\n var type = arguments[0],\n handler = arguments[1];\n return typeof type === 'function' ? this.then(null, function (err) {\n return(\n // Catching errors by its constructor type (similar to java / c++ / c#)\n // Sample: promise.catch(TypeError, function (e) { ... });\n err instanceof type ? handler(err) : PromiseReject(err)\n );\n }) : this.then(null, function (err) {\n return(\n // Catching errors by the error.name property. Makes sense for indexedDB where error type\n // is always DOMError but where e.name tells the actual error type.\n // Sample: promise.catch('ConstraintError', function (e) { ... });\n err && err.name === type ? handler(err) : PromiseReject(err)\n );\n });\n },\n\n finally: function (onFinally) {\n return this.then(function (value) {\n onFinally();\n return value;\n }, function (err) {\n onFinally();\n return PromiseReject(err);\n });\n },\n\n // Deprecate in next major. Needed only for db.on.error.\n uncaught: function (uncaughtHandler) {\n var _this2 = this;\n\n // Be backward compatible and use \"onuncatched\" as the event name on this.\n // Handle multiple subscribers through reverseStoppableEventChain(). If a handler returns `false`, bubbling stops.\n this.onuncatched = reverseStoppableEventChain(this.onuncatched, uncaughtHandler);\n // In case caller does this on an already rejected promise, assume caller wants to point out the error to this promise and not\n // a previous promise. Reason: the prevous promise may lack onuncatched handler.\n if (this._state === false && unhandledErrors.indexOf(this) === -1) {\n // Replace unhandled error's destinaion promise with this one!\n unhandledErrors.some(function (p, i, l) {\n return p._value === _this2._value && (l[i] = _this2);\n });\n // Actually we do this shit because we need to support db.on.error() correctly during db.open(). If we deprecate db.on.error, we could\n // take away this piece of code as well as the onuncatched and uncaught() method.\n }\n return this;\n },\n\n stack: {\n get: function () {\n if (this._stack) return this._stack;\n try {\n stack_being_generated = true;\n var stacks = getStack(this, [], MAX_LONG_STACKS);\n var stack = stacks.join(\"\\nFrom previous: \");\n if (this._state !== null) this._stack = stack; // Stack may be updated on reject.\n return stack;\n } finally {\n stack_being_generated = false;\n }\n }\n }\n});\n\nfunction Listener(onFulfilled, onRejected, resolve, reject) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.resolve = resolve;\n this.reject = reject;\n this.psd = PSD;\n}\n\n// Promise Static Properties\nprops(Promise, {\n all: function () {\n var values = getArrayOf.apply(null, arguments); // Supports iterables, implicit arguments and array-like.\n return new Promise(function (resolve, reject) {\n if (values.length === 0) resolve([]);\n var remaining = values.length;\n values.forEach(function (a, i) {\n return Promise.resolve(a).then(function (x) {\n values[i] = x;\n if (! --remaining) resolve(values);\n }, reject);\n });\n });\n },\n\n resolve: function (value) {\n if (value && typeof value.then === 'function') return value;\n return new Promise(INTERNAL, true, value);\n },\n\n reject: PromiseReject,\n\n race: function () {\n var values = getArrayOf.apply(null, arguments);\n return new Promise(function (resolve, reject) {\n values.map(function (value) {\n return Promise.resolve(value).then(resolve, reject);\n });\n });\n },\n\n PSD: {\n get: function () {\n return PSD;\n },\n set: function (value) {\n return PSD = value;\n }\n },\n\n newPSD: newScope,\n\n usePSD: usePSD,\n\n scheduler: {\n get: function () {\n return asap;\n },\n set: function (value) {\n asap = value;\n }\n },\n\n rejectionMapper: {\n get: function () {\n return rejectionMapper;\n },\n set: function (value) {\n rejectionMapper = value;\n } // Map reject failures\n },\n\n follow: function (fn) {\n return new Promise(function (resolve, reject) {\n return newScope(function (resolve, reject) {\n var psd = PSD;\n psd.unhandleds = []; // For unhandled standard- or 3rd party Promises. Checked at psd.finalize()\n psd.onunhandled = reject; // Triggered directly on unhandled promises of this library.\n psd.finalize = callBoth(function () {\n var _this3 = this;\n\n // Unhandled standard or 3rd part promises are put in PSD.unhandleds and\n // examined upon scope completion while unhandled rejections in this Promise\n // will trigger directly through psd.onunhandled\n run_at_end_of_this_or_next_physical_tick(function () {\n _this3.unhandleds.length === 0 ? resolve() : reject(_this3.unhandleds[0]);\n });\n }, psd.finalize);\n fn();\n }, resolve, reject);\n });\n },\n\n on: Events(null, { \"error\": [reverseStoppableEventChain, defaultErrorHandler] // Default to defaultErrorHandler\n })\n\n});\n\n/**\r\n* Take a potentially misbehaving resolver function and make sure\r\n* onFulfilled and onRejected are only called once.\r\n*\r\n* Makes no guarantees about asynchrony.\r\n*/\nfunction executePromiseTask(promise, fn) {\n // Promise Resolution Procedure:\n // https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n try {\n fn(function (value) {\n if (promise._state !== null) return;\n if (value === promise) throw new TypeError('A promise cannot be resolved with itself.');\n var shouldExecuteTick = promise._lib && beginMicroTickScope();\n if (value && typeof value.then === 'function') {\n executePromiseTask(promise, function (resolve, reject) {\n value instanceof Promise ? value._then(resolve, reject) : value.then(resolve, reject);\n });\n } else {\n promise._state = true;\n promise._value = value;\n propagateAllListeners(promise);\n }\n if (shouldExecuteTick) endMicroTickScope();\n }, handleRejection.bind(null, promise)); // If Function.bind is not supported. Exception is handled in catch below\n } catch (ex) {\n handleRejection(promise, ex);\n }\n}\n\nfunction handleRejection(promise, reason) {\n rejectingErrors.push(reason);\n if (promise._state !== null) return;\n var shouldExecuteTick = promise._lib && beginMicroTickScope();\n reason = rejectionMapper(reason);\n promise._state = false;\n promise._value = reason;\n debug && reason !== null && typeof reason === 'object' && !reason._promise && tryCatch(function () {\n var origProp = getPropertyDescriptor(reason, \"stack\");\n reason._promise = promise;\n setProp(reason, \"stack\", {\n get: function () {\n return stack_being_generated ? origProp && (origProp.get ? origProp.get.apply(reason) : origProp.value) : promise.stack;\n }\n });\n });\n // Add the failure to a list of possibly uncaught errors\n addPossiblyUnhandledError(promise);\n propagateAllListeners(promise);\n if (shouldExecuteTick) endMicroTickScope();\n}\n\nfunction propagateAllListeners(promise) {\n //debug && linkToPreviousPromise(promise);\n var listeners = promise._listeners;\n promise._listeners = [];\n for (var i = 0, len = listeners.length; i < len; ++i) {\n propagateToListener(promise, listeners[i]);\n }\n var psd = promise._PSD;\n --psd.ref || psd.finalize(); // if psd.ref reaches zero, call psd.finalize();\n if (numScheduledCalls === 0) {\n // If numScheduledCalls is 0, it means that our stack is not in a callback of a scheduled call,\n // and that no deferreds where listening to this rejection or success.\n // Since there is a risk that our stack can contain application code that may\n // do stuff after this code is finished that may generate new calls, we cannot\n // call finalizers here.\n ++numScheduledCalls;\n asap(function () {\n if (--numScheduledCalls === 0) finalizePhysicalTick(); // Will detect unhandled errors\n }, []);\n }\n}\n\nfunction propagateToListener(promise, listener) {\n if (promise._state === null) {\n promise._listeners.push(listener);\n return;\n }\n\n var cb = promise._state ? listener.onFulfilled : listener.onRejected;\n if (cb === null) {\n // This Listener doesnt have a listener for the event being triggered (onFulfilled or onReject) so lets forward the event to any eventual listeners on the Promise instance returned by then() or catch()\n return (promise._state ? listener.resolve : listener.reject)(promise._value);\n }\n var psd = listener.psd;\n ++psd.ref;\n ++numScheduledCalls;\n asap(callListener, [cb, promise, listener]);\n}\n\nfunction callListener(cb, promise, listener) {\n var outerScope = PSD;\n var psd = listener.psd;\n try {\n if (psd !== outerScope) {\n // **KEEP** outerScope.env = wrappers.snapshot(); // Snapshot outerScope's environment.\n PSD = psd;\n // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment.\n }\n\n // Set static variable currentFulfiller to the promise that is being fullfilled,\n // so that we connect the chain of promises (for long stacks support)\n currentFulfiller = promise;\n\n // Call callback and resolve our listener with it's return value.\n var value = promise._value,\n ret;\n if (promise._state) {\n ret = cb(value);\n } else {\n if (rejectingErrors.length) rejectingErrors = [];\n ret = cb(value);\n if (rejectingErrors.indexOf(value) === -1) markErrorAsHandled(promise); // Callback didnt do Promise.reject(err) nor reject(err) onto another promise.\n }\n listener.resolve(ret);\n } catch (e) {\n // Exception thrown in callback. Reject our listener.\n listener.reject(e);\n } finally {\n // Restore PSD, env and currentFulfiller.\n if (psd !== outerScope) {\n PSD = outerScope;\n // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment\n }\n currentFulfiller = null;\n if (--numScheduledCalls === 0) finalizePhysicalTick();\n --psd.ref || psd.finalize();\n }\n}\n\nfunction getStack(promise, stacks, limit) {\n if (stacks.length === limit) return stacks;\n var stack = \"\";\n if (promise._state === false) {\n var failure = promise._value,\n errorName,\n message;\n\n if (failure != null) {\n errorName = failure.name || \"Error\";\n message = failure.message || failure;\n stack = prettyStack(failure, 0);\n } else {\n errorName = failure; // If error is undefined or null, show that.\n message = \"\";\n }\n stacks.push(errorName + (message ? \": \" + message : \"\") + stack);\n }\n if (debug) {\n stack = prettyStack(promise._stackHolder, 2);\n if (stack && stacks.indexOf(stack) === -1) stacks.push(stack);\n if (promise._prev) getStack(promise._prev, stacks, limit);\n }\n return stacks;\n}\n\nfunction linkToPreviousPromise(promise, prev) {\n // Support long stacks by linking to previous completed promise.\n var numPrev = prev ? prev._numPrev + 1 : 0;\n if (numPrev < LONG_STACKS_CLIP_LIMIT) {\n // Prohibit infinite Promise loops to get an infinite long memory consuming \"tail\".\n promise._prev = prev;\n promise._numPrev = numPrev;\n }\n}\n\n/* The callback to schedule with setImmediate() or setTimeout().\r\n It runs a virtual microtick and executes any callback registered in microtickQueue.\r\n */\nfunction physicalTick() {\n beginMicroTickScope() && endMicroTickScope();\n}\n\nfunction beginMicroTickScope() {\n var wasRootExec = isOutsideMicroTick;\n isOutsideMicroTick = false;\n needsNewPhysicalTick = false;\n return wasRootExec;\n}\n\n/* Executes micro-ticks without doing try..catch.\r\n This can be possible because we only use this internally and\r\n the registered functions are exception-safe (they do try..catch\r\n internally before calling any external method). If registering\r\n functions in the microtickQueue that are not exception-safe, this\r\n would destroy the framework and make it instable. So we don't export\r\n our asap method.\r\n*/\nfunction endMicroTickScope() {\n var callbacks, i, l;\n do {\n while (microtickQueue.length > 0) {\n callbacks = microtickQueue;\n microtickQueue = [];\n l = callbacks.length;\n for (i = 0; i < l; ++i) {\n var item = callbacks[i];\n item[0].apply(null, item[1]);\n }\n }\n } while (microtickQueue.length > 0);\n isOutsideMicroTick = true;\n needsNewPhysicalTick = true;\n}\n\nfunction finalizePhysicalTick() {\n var unhandledErrs = unhandledErrors;\n unhandledErrors = [];\n unhandledErrs.forEach(function (p) {\n p._PSD.onunhandled.call(null, p._value, p);\n });\n var finalizers = tickFinalizers.slice(0); // Clone first because finalizer may remove itself from list.\n var i = finalizers.length;\n while (i) {\n finalizers[--i]();\n }\n}\n\nfunction run_at_end_of_this_or_next_physical_tick(fn) {\n function finalizer() {\n fn();\n tickFinalizers.splice(tickFinalizers.indexOf(finalizer), 1);\n }\n tickFinalizers.push(finalizer);\n ++numScheduledCalls;\n asap(function () {\n if (--numScheduledCalls === 0) finalizePhysicalTick();\n }, []);\n}\n\nfunction addPossiblyUnhandledError(promise) {\n // Only add to unhandledErrors if not already there. The first one to add to this list\n // will be upon the first rejection so that the root cause (first promise in the\n // rejection chain) is the one listed.\n if (!unhandledErrors.some(function (p) {\n return p._value === promise._value;\n })) unhandledErrors.push(promise);\n}\n\nfunction markErrorAsHandled(promise) {\n // Called when a reject handled is actually being called.\n // Search in unhandledErrors for any promise whos _value is this promise_value (list\n // contains only rejected promises, and only one item per error)\n var i = unhandledErrors.length;\n while (i) {\n if (unhandledErrors[--i]._value === promise._value) {\n // Found a promise that failed with this same error object pointer,\n // Remove that since there is a listener that actually takes care of it.\n unhandledErrors.splice(i, 1);\n return;\n }\n }\n}\n\n// By default, log uncaught errors to the console\nfunction defaultErrorHandler(e) {\n console.warn('Unhandled rejection: ' + (e.stack || e));\n}\n\nfunction PromiseReject(reason) {\n return new Promise(INTERNAL, false, reason);\n}\n\nexport function wrap(fn, errorCatcher) {\n var psd = PSD;\n return function () {\n var wasRootExec = beginMicroTickScope(),\n outerScope = PSD;\n\n try {\n if (outerScope !== psd) {\n // **KEEP** outerScope.env = wrappers.snapshot(); // Snapshot outerScope's environment\n PSD = psd;\n // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment.\n }\n return fn.apply(this, arguments);\n } catch (e) {\n errorCatcher && errorCatcher(e);\n } finally {\n if (outerScope !== psd) {\n PSD = outerScope;\n // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment\n }\n if (wasRootExec) endMicroTickScope();\n }\n };\n}\n\nexport function newScope(fn, a1, a2, a3) {\n var parent = PSD,\n psd = Object.create(parent);\n psd.parent = parent;\n psd.ref = 0;\n psd.global = false;\n // **KEEP** psd.env = wrappers.wrap(psd);\n\n // unhandleds and onunhandled should not be specifically set here.\n // Leave them on parent prototype.\n // unhandleds.push(err) will push to parent's prototype\n // onunhandled() will call parents onunhandled (with this scope's this-pointer though!)\n ++parent.ref;\n psd.finalize = function () {\n --this.parent.ref || this.parent.finalize();\n };\n var rv = usePSD(psd, fn, a1, a2, a3);\n if (psd.ref === 0) psd.finalize();\n return rv;\n}\n\nexport function usePSD(psd, fn, a1, a2, a3) {\n var outerScope = PSD;\n try {\n if (psd !== outerScope) {\n // **KEEP** outerScope.env = wrappers.snapshot(); // snapshot outerScope's environment.\n PSD = psd;\n // **KEEP** wrappers.restore(psd.env); // Restore PSD's environment.\n }\n return fn(a1, a2, a3);\n } finally {\n if (psd !== outerScope) {\n PSD = outerScope;\n // **KEEP** wrappers.restore(outerScope.env); // Restore outerScope's environment.\n }\n }\n}\n\nfunction globalError(err, promise) {\n var rv;\n try {\n rv = promise.onuncatched(err);\n } catch (e) {}\n if (rv !== false) try {\n Promise.on.error.fire(err, promise); // TODO: Deprecated and use same global handler as bluebird.\n } catch (e) {}\n}\n\n/* **KEEP** \r\n\r\nexport function wrapPromise(PromiseClass) {\r\n var proto = PromiseClass.prototype;\r\n var origThen = proto.then;\r\n \r\n wrappers.add({\r\n snapshot: () => proto.then,\r\n restore: value => {proto.then = value;},\r\n wrap: () => patchedThen\r\n });\r\n\r\n function patchedThen (onFulfilled, onRejected) {\r\n var promise = this;\r\n var onFulfilledProxy = wrap(function(value){\r\n var rv = value;\r\n if (onFulfilled) {\r\n rv = onFulfilled(rv);\r\n if (rv && typeof rv.then === 'function') rv.then(); // Intercept that promise as well.\r\n }\r\n --PSD.ref || PSD.finalize();\r\n return rv;\r\n });\r\n var onRejectedProxy = wrap(function(err){\r\n promise._$err = err;\r\n var unhandleds = PSD.unhandleds;\r\n var idx = unhandleds.length,\r\n rv;\r\n while (idx--) if (unhandleds[idx]._$err === err) break;\r\n if (onRejected) {\r\n if (idx !== -1) unhandleds.splice(idx, 1); // Mark as handled.\r\n rv = onRejected(err);\r\n if (rv && typeof rv.then === 'function') rv.then(); // Intercept that promise as well.\r\n } else {\r\n if (idx === -1) unhandleds.push(promise);\r\n rv = PromiseClass.reject(err);\r\n rv._$nointercept = true; // Prohibit eternal loop.\r\n }\r\n --PSD.ref || PSD.finalize();\r\n return rv;\r\n });\r\n \r\n if (this._$nointercept) return origThen.apply(this, arguments);\r\n ++PSD.ref;\r\n return origThen.call(this, onFulfilledProxy, onRejectedProxy);\r\n }\r\n}\r\n\r\n// Global Promise wrapper\r\nif (_global.Promise) wrapPromise(_global.Promise);\r\n\r\n*/\n\ndoFakeAutoComplete(function () {\n // Simplify the job for VS Intellisense. This piece of code is one of the keys to the new marvellous intellisense support in Dexie.\n asap = function (fn, args) {\n setTimeout(function () {\n fn.apply(null, args);\n }, 0);\n };\n});","/*\r\n * Dexie.js - a minimalistic wrapper for IndexedDB\r\n * ===============================================\r\n *\r\n * By David Fahlander, david.fahlander@gmail.com\r\n *\r\n * Version {version}, {date}\r\n *\r\n * www.dexie.com\r\n *\r\n * Apache License Version 2.0, January 2004, http://www.apache.org/licenses/\r\n */\n\nimport { keys, setProp, isArray, extend, props, derive, slice, override, _global, doFakeAutoComplete, asap, trycatcher, tryCatch, rejection, getByKeyPath, setByKeyPath, delByKeyPath, shallowClone, deepClone, getObjectDiff, assert, NO_CHAR_ARRAY, getArrayOf, arrayToObject, hasOwn, flatten } from './utils';\nimport { ModifyError, BulkError, errnames, exceptions, fullNameExceptions, mapError } from './errors';\nimport Promise, { wrap, PSD, newScope, usePSD } from './Promise';\nimport Events from './Events';\nimport { nop, mirror, pureFunctionChain, hookCreatingChain, hookUpdatingChain, hookDeletingChain, promisableChain } from './chaining-functions';\nimport * as Debug from './debug';\n\nvar DEXIE_VERSION = '{version}',\n maxString = String.fromCharCode(65535),\n\n// maxKey is an Array if indexedDB implementations supports array keys (not supported by IE,Edge or Safari at the moment)\n// Otherwise maxKey is maxString. This is handy when needing an open upper border without limit.\nmaxKey = function () {\n try {\n IDBKeyRange.only([[]]);return [[]];\n } catch (e) {\n return maxString;\n }\n}(),\n INVALID_KEY_ARGUMENT = \"Invalid key provided. Keys must be of type string, number, Date or Array.\",\n STRING_EXPECTED = \"String expected.\",\n connections = [],\n isIEOrEdge = typeof navigator !== 'undefined' && /(MSIE|Trident|Edge)/.test(navigator.userAgent),\n hasIEDeleteObjectStoreBug = isIEOrEdge,\n hangsOnDeleteLargeKeyRange = isIEOrEdge,\n dexieStackFrameFilter = function (frame) {\n return !/(dexie\\.js|dexie\\.min\\.js)/.test(frame);\n};\n\nDebug.setDebug(Debug.debug, dexieStackFrameFilter);\n\nexport default function Dexie(dbName, options) {\n /// Specify only if you wich to control which addons that should run on this instance\n var deps = Dexie.dependencies;\n var opts = extend({\n // Default Options\n addons: Dexie.addons, // Pick statically registered addons by default\n autoOpen: true, // Don't require db.open() explicitely.\n indexedDB: deps.indexedDB, // Backend IndexedDB api. Default to IDBShim or browser env.\n IDBKeyRange: deps.IDBKeyRange // Backend IDBKeyRange api. Default to IDBShim or browser env.\n }, options);\n var addons = opts.addons,\n autoOpen = opts.autoOpen,\n indexedDB = opts.indexedDB,\n IDBKeyRange = opts.IDBKeyRange;\n\n var globalSchema = this._dbSchema = {};\n var versions = [];\n var dbStoreNames = [];\n var allTables = {};\n ///\n var idbdb = null; // Instance of IDBDatabase\n var dbOpenError = null;\n var isBeingOpened = false;\n var openComplete = false;\n var READONLY = \"readonly\",\n READWRITE = \"readwrite\";\n var db = this;\n var dbReadyResolve,\n dbReadyPromise = new Promise(function (resolve) {\n dbReadyResolve = resolve;\n }),\n cancelOpen,\n openCanceller = new Promise(function (_, reject) {\n cancelOpen = reject;\n });\n var autoSchema = true;\n var hasNativeGetDatabaseNames = !!getNativeGetDatabaseNamesFn(indexedDB),\n hasGetAll;\n\n function init() {\n // Default subscribers to \"versionchange\" and \"blocked\".\n // Can be overridden by custom handlers. If custom handlers return false, these default\n // behaviours will be prevented.\n db.on(\"versionchange\", function (ev) {\n // Default behavior for versionchange event is to close database connection.\n // Caller can override this behavior by doing db.on(\"versionchange\", function(){ return false; });\n // Let's not block the other window from making it's delete() or open() call.\n // NOTE! This event is never fired in IE,Edge or Safari.\n if (ev.newVersion > 0) console.warn('Another connection wants to upgrade database \\'' + db.name + '\\'. Closing db now to resume the upgrade.');else console.warn('Another connection wants to delete database \\'' + db.name + '\\'. Closing db now to resume the delete request.');\n db.close();\n // In many web applications, it would be recommended to force window.reload()\n // when this event occurs. To do that, subscribe to the versionchange event\n // and call window.location.reload(true) if ev.newVersion > 0 (not a deletion)\n // The reason for this is that your current web app obviously has old schema code that needs\n // to be updated. Another window got a newer version of the app and needs to upgrade DB but\n // your window is blocking it unless we close it here.\n });\n db.on(\"blocked\", function (ev) {\n if (!ev.newVersion || ev.newVersion < ev.oldVersion) console.warn('Dexie.delete(\\'' + db.name + '\\') was blocked');else console.warn('Upgrade \\'' + db.name + '\\' blocked by other connection holding version ' + ev.oldVersion / 10);\n });\n }\n\n //\n //\n //\n // ------------------------- Versioning Framework---------------------------\n //\n //\n //\n\n this.version = function (versionNumber) {\n /// \n /// \n if (idbdb || isBeingOpened) throw new exceptions.Schema(\"Cannot add version when database is open\");\n this.verno = Math.max(this.verno, versionNumber);\n var versionInstance = versions.filter(function (v) {\n return v._cfg.version === versionNumber;\n })[0];\n if (versionInstance) return versionInstance;\n versionInstance = new Version(versionNumber);\n versions.push(versionInstance);\n versions.sort(lowerVersionFirst);\n return versionInstance;\n };\n\n function Version(versionNumber) {\n this._cfg = {\n version: versionNumber,\n storesSource: null,\n dbschema: {},\n tables: {},\n contentUpgrade: null\n };\n this.stores({}); // Derive earlier schemas by default.\n }\n\n extend(Version.prototype, {\n stores: function (stores) {\n /// \n /// Defines the schema for a particular version\n /// \n /// \n /// Example:
\n /// {users: \"id++,first,last,&username,*email\",
\n /// passwords: \"id++,&username\"}
\n ///
\n /// Syntax: {Table: \"[primaryKey][++],[&][*]index1,[&][*]index2,...\"}

\n /// Special characters:
\n /// \"&\" means unique key,
\n /// \"*\" means value is multiEntry,
\n /// \"++\" means auto-increment and only applicable for primary key
\n /// \n this._cfg.storesSource = this._cfg.storesSource ? extend(this._cfg.storesSource, stores) : stores;\n\n // Derive stores from earlier versions if they are not explicitely specified as null or a new syntax.\n var storesSpec = {};\n versions.forEach(function (version) {\n // 'versions' is always sorted by lowest version first.\n extend(storesSpec, version._cfg.storesSource);\n });\n\n var dbschema = this._cfg.dbschema = {};\n this._parseStoresSpec(storesSpec, dbschema);\n // Update the latest schema to this version\n // Update API\n globalSchema = db._dbSchema = dbschema;\n removeTablesApi([allTables, db, Transaction.prototype]);\n setApiOnPlace([allTables, db, Transaction.prototype, this._cfg.tables], keys(dbschema), READWRITE, dbschema);\n dbStoreNames = keys(dbschema);\n return this;\n },\n upgrade: function (upgradeFunction) {\n /// Function that performs upgrading actions.\n var self = this;\n fakeAutoComplete(function () {\n upgradeFunction(db._createTransaction(READWRITE, keys(self._cfg.dbschema), self._cfg.dbschema)); // BUGBUG: No code completion for prev version's tables wont appear.\n });\n this._cfg.contentUpgrade = upgradeFunction;\n return this;\n },\n _parseStoresSpec: function (stores, outSchema) {\n keys(stores).forEach(function (tableName) {\n if (stores[tableName] !== null) {\n var instanceTemplate = {};\n var indexes = parseIndexSyntax(stores[tableName]);\n var primKey = indexes.shift();\n if (primKey.multi) throw new exceptions.Schema(\"Primary key cannot be multi-valued\");\n if (primKey.keyPath) setByKeyPath(instanceTemplate, primKey.keyPath, primKey.auto ? 0 : primKey.keyPath);\n indexes.forEach(function (idx) {\n if (idx.auto) throw new exceptions.Schema(\"Only primary key can be marked as autoIncrement (++)\");\n if (!idx.keyPath) throw new exceptions.Schema(\"Index must have a name and cannot be an empty string\");\n setByKeyPath(instanceTemplate, idx.keyPath, idx.compound ? idx.keyPath.map(function () {\n return \"\";\n }) : \"\");\n });\n outSchema[tableName] = new TableSchema(tableName, primKey, indexes, instanceTemplate);\n }\n });\n }\n });\n\n function runUpgraders(oldVersion, idbtrans, reject) {\n var trans = db._createTransaction(READWRITE, dbStoreNames, globalSchema);\n trans.create(idbtrans);\n trans._completion.catch(reject);\n var rejectTransaction = trans._reject.bind(trans);\n newScope(function () {\n PSD.trans = trans;\n if (oldVersion === 0) {\n // Create tables:\n keys(globalSchema).forEach(function (tableName) {\n createTable(idbtrans, tableName, globalSchema[tableName].primKey, globalSchema[tableName].indexes);\n });\n Promise.follow(function () {\n return db.on.populate.fire(trans);\n }).catch(rejectTransaction);\n } else updateTablesAndIndexes(oldVersion, trans, idbtrans).catch(rejectTransaction);\n });\n }\n\n function updateTablesAndIndexes(oldVersion, trans, idbtrans) {\n // Upgrade version to version, step-by-step from oldest to newest version.\n // Each transaction object will contain the table set that was current in that version (but also not-yet-deleted tables from its previous version)\n var queue = [];\n var oldVersionStruct = versions.filter(function (version) {\n return version._cfg.version === oldVersion;\n })[0];\n if (!oldVersionStruct) throw new exceptions.Upgrade(\"Dexie specification of currently installed DB version is missing\");\n globalSchema = db._dbSchema = oldVersionStruct._cfg.dbschema;\n var anyContentUpgraderHasRun = false;\n\n var versToRun = versions.filter(function (v) {\n return v._cfg.version > oldVersion;\n });\n versToRun.forEach(function (version) {\n /// \n queue.push(function () {\n var oldSchema = globalSchema;\n var newSchema = version._cfg.dbschema;\n adjustToExistingIndexNames(oldSchema, idbtrans);\n adjustToExistingIndexNames(newSchema, idbtrans);\n globalSchema = db._dbSchema = newSchema;\n var diff = getSchemaDiff(oldSchema, newSchema);\n // Add tables \n diff.add.forEach(function (tuple) {\n createTable(idbtrans, tuple[0], tuple[1].primKey, tuple[1].indexes);\n });\n // Change tables\n diff.change.forEach(function (change) {\n if (change.recreate) {\n throw new exceptions.Upgrade(\"Not yet support for changing primary key\");\n } else {\n var store = idbtrans.objectStore(change.name);\n // Add indexes\n change.add.forEach(function (idx) {\n addIndex(store, idx);\n });\n // Update indexes\n change.change.forEach(function (idx) {\n store.deleteIndex(idx.name);\n addIndex(store, idx);\n });\n // Delete indexes\n change.del.forEach(function (idxName) {\n store.deleteIndex(idxName);\n });\n }\n });\n if (version._cfg.contentUpgrade) {\n anyContentUpgraderHasRun = true;\n return Promise.follow(function () {\n version._cfg.contentUpgrade(trans);\n });\n }\n });\n queue.push(function (idbtrans) {\n if (anyContentUpgraderHasRun && !hasIEDeleteObjectStoreBug) {\n // Dont delete old tables if ieBug is present and a content upgrader has run. Let tables be left in DB so far. This needs to be taken care of.\n var newSchema = version._cfg.dbschema;\n // Delete old tables\n deleteRemovedTables(newSchema, idbtrans);\n }\n });\n });\n\n // Now, create a queue execution engine\n function runQueue() {\n return queue.length ? Promise.resolve(queue.shift()(trans.idbtrans)).then(runQueue) : Promise.resolve();\n }\n\n return runQueue().then(function () {\n createMissingTables(globalSchema, idbtrans); // At last, make sure to create any missing tables. (Needed by addons that add stores to DB without specifying version)\n });\n }\n\n function getSchemaDiff(oldSchema, newSchema) {\n var diff = {\n del: [], // Array of table names\n add: [], // Array of [tableName, newDefinition]\n change: [] // Array of {name: tableName, recreate: newDefinition, del: delIndexNames, add: newIndexDefs, change: changedIndexDefs}\n };\n for (var table in oldSchema) {\n if (!newSchema[table]) diff.del.push(table);\n }\n for (table in newSchema) {\n var oldDef = oldSchema[table],\n newDef = newSchema[table];\n if (!oldDef) {\n diff.add.push([table, newDef]);\n } else {\n var change = {\n name: table,\n def: newDef,\n recreate: false,\n del: [],\n add: [],\n change: []\n };\n if (oldDef.primKey.src !== newDef.primKey.src) {\n // Primary key has changed. Remove and re-add table.\n change.recreate = true;\n diff.change.push(change);\n } else {\n // Same primary key. Just find out what differs:\n var oldIndexes = oldDef.idxByName;\n var newIndexes = newDef.idxByName;\n for (var idxName in oldIndexes) {\n if (!newIndexes[idxName]) change.del.push(idxName);\n }\n for (idxName in newIndexes) {\n var oldIdx = oldIndexes[idxName],\n newIdx = newIndexes[idxName];\n if (!oldIdx) change.add.push(newIdx);else if (oldIdx.src !== newIdx.src) change.change.push(newIdx);\n }\n if (change.del.length > 0 || change.add.length > 0 || change.change.length > 0) {\n diff.change.push(change);\n }\n }\n }\n }\n return diff;\n }\n\n function createTable(idbtrans, tableName, primKey, indexes) {\n /// \n var store = idbtrans.db.createObjectStore(tableName, primKey.keyPath ? { keyPath: primKey.keyPath, autoIncrement: primKey.auto } : { autoIncrement: primKey.auto });\n indexes.forEach(function (idx) {\n addIndex(store, idx);\n });\n return store;\n }\n\n function createMissingTables(newSchema, idbtrans) {\n keys(newSchema).forEach(function (tableName) {\n if (!idbtrans.db.objectStoreNames.contains(tableName)) {\n createTable(idbtrans, tableName, newSchema[tableName].primKey, newSchema[tableName].indexes);\n }\n });\n }\n\n function deleteRemovedTables(newSchema, idbtrans) {\n for (var i = 0; i < idbtrans.db.objectStoreNames.length; ++i) {\n var storeName = idbtrans.db.objectStoreNames[i];\n if (newSchema[storeName] == null) {\n idbtrans.db.deleteObjectStore(storeName);\n }\n }\n }\n\n function addIndex(store, idx) {\n store.createIndex(idx.name, idx.keyPath, { unique: idx.unique, multiEntry: idx.multi });\n }\n\n function dbUncaught(err) {\n return db.on.error.fire(err);\n }\n\n //\n //\n // Dexie Protected API\n //\n //\n\n this._allTables = allTables;\n\n this._tableFactory = function createTable(mode, tableSchema) {\n /// \n if (mode === READONLY) return new Table(tableSchema.name, tableSchema, Collection);else return new WriteableTable(tableSchema.name, tableSchema);\n };\n\n this._createTransaction = function (mode, storeNames, dbschema, parentTransaction) {\n return new Transaction(mode, storeNames, dbschema, parentTransaction);\n };\n\n /* Generate a temporary transaction when db operations are done outside a transactino scope.\r\n */\n function tempTransaction(mode, storeNames, fn) {\n // Last argument is \"writeLocked\". But this doesnt apply to oneshot direct db operations, so we ignore it.\n if (!openComplete && !PSD.letThrough) {\n if (!isBeingOpened) {\n if (!autoOpen) return rejection(new exceptions.DatabaseClosed(), dbUncaught);\n db.open().catch(nop); // Open in background. If if fails, it will be catched by the final promise anyway.\n }\n return dbReadyPromise.then(function () {\n return tempTransaction(mode, storeNames, fn);\n });\n } else {\n var trans = db._createTransaction(mode, storeNames, globalSchema);\n return trans._promise(mode, function (resolve, reject) {\n newScope(function () {\n // OPTIMIZATION POSSIBLE? newScope() not needed because it's already done in _promise.\n PSD.trans = trans;\n fn(resolve, reject, trans);\n });\n }).then(function (result) {\n // Instead of resolving value directly, wait with resolving it until transaction has completed.\n // Otherwise the data would not be in the DB if requesting it in the then() operation.\n // Specifically, to ensure that the following expression will work:\n //\n // db.friends.put({name: \"Arne\"}).then(function () {\n // db.friends.where(\"name\").equals(\"Arne\").count(function(count) {\n // assert (count === 1);\n // });\n // });\n //\n return trans._completion.then(function () {\n return result;\n });\n }); /*.catch(err => { // Don't do this as of now. If would affect bulk- and modify methods in a way that could be more intuitive. But wait! Maybe change in next major.\r\n trans._reject(err);\r\n return rejection(err);\r\n });*/\n }\n }\n\n this._whenReady = function (fn) {\n return new Promise(fake || openComplete || PSD.letThrough ? fn : function (resolve, reject) {\n if (!isBeingOpened) {\n if (!autoOpen) {\n reject(new exceptions.DatabaseClosed());\n return;\n }\n db.open().catch(nop); // Open in background. If if fails, it will be catched by the final promise anyway.\n }\n dbReadyPromise.then(function () {\n fn(resolve, reject);\n });\n }).uncaught(dbUncaught);\n };\n\n //\n //\n //\n //\n // Dexie API\n //\n //\n //\n\n this.verno = 0;\n\n this.open = function () {\n if (isBeingOpened || idbdb) return dbReadyPromise.then(function () {\n return dbOpenError ? rejection(dbOpenError, dbUncaught) : db;\n });\n Debug.debug && (openCanceller._stackHolder = Debug.getErrorWithStack()); // Let stacks point to when open() was called rather than where new Dexie() was called.\n isBeingOpened = true;\n dbOpenError = null;\n openComplete = false;\n\n // Function pointers to call when the core opening process completes.\n var resolveDbReady = dbReadyResolve,\n\n // upgradeTransaction to abort on failure.\n upgradeTransaction = null;\n\n return Promise.race([openCanceller, new Promise(function (resolve, reject) {\n doFakeAutoComplete(function () {\n return resolve();\n });\n\n // Make sure caller has specified at least one version\n if (versions.length > 0) autoSchema = false;\n\n // Multiply db.verno with 10 will be needed to workaround upgrading bug in IE:\n // IE fails when deleting objectStore after reading from it.\n // A future version of Dexie.js will stopover an intermediate version to workaround this.\n // At that point, we want to be backward compatible. Could have been multiplied with 2, but by using 10, it is easier to map the number to the real version number.\n\n // If no API, throw!\n if (!indexedDB) throw new exceptions.MissingAPI(\"indexedDB API not found. If using IE10+, make sure to run your code on a server URL \" + \"(not locally). If using old Safari versions, make sure to include indexedDB polyfill.\");\n\n var req = autoSchema ? indexedDB.open(dbName) : indexedDB.open(dbName, Math.round(db.verno * 10));\n if (!req) throw new exceptions.MissingAPI(\"IndexedDB API not available\"); // May happen in Safari private mode, see https://github.com/dfahlander/Dexie.js/issues/134\n req.onerror = wrap(eventRejectHandler(reject));\n req.onblocked = wrap(fireOnBlocked);\n req.onupgradeneeded = wrap(function (e) {\n upgradeTransaction = req.transaction;\n if (autoSchema && !db._allowEmptyDB) {\n // Unless an addon has specified db._allowEmptyDB, lets make the call fail.\n // Caller did not specify a version or schema. Doing that is only acceptable for opening alread existing databases.\n // If onupgradeneeded is called it means database did not exist. Reject the open() promise and make sure that we\n // do not create a new database by accident here.\n req.onerror = preventDefault; // Prohibit onabort error from firing before we're done!\n upgradeTransaction.abort(); // Abort transaction (would hope that this would make DB disappear but it doesnt.)\n // Close database and delete it.\n req.result.close();\n var delreq = indexedDB.deleteDatabase(dbName); // The upgrade transaction is atomic, and javascript is single threaded - meaning that there is no risk that we delete someone elses database here!\n delreq.onsuccess = delreq.onerror = wrap(function () {\n reject(new exceptions.NoSuchDatabase('Database ' + dbName + ' doesnt exist'));\n });\n } else {\n upgradeTransaction.onerror = wrap(eventRejectHandler(reject));\n var oldVer = e.oldVersion > Math.pow(2, 62) ? 0 : e.oldVersion; // Safari 8 fix.\n runUpgraders(oldVer / 10, upgradeTransaction, reject, req);\n }\n }, reject);\n\n req.onsuccess = wrap(function () {\n // Core opening procedure complete. Now let's just record some stuff.\n upgradeTransaction = null;\n idbdb = req.result;\n connections.push(db); // Used for emulating versionchange event on IE/Edge/Safari.\n\n if (autoSchema) readGlobalSchema();else if (idbdb.objectStoreNames.length > 0) {\n try {\n adjustToExistingIndexNames(globalSchema, idbdb.transaction(safariMultiStoreFix(idbdb.objectStoreNames), READONLY));\n } catch (e) {\n // Safari may bail out if > 1 store names. However, this shouldnt be a showstopper. Issue #120.\n }\n }\n\n idbdb.onversionchange = wrap(function (ev) {\n db._vcFired = true; // detect implementations that not support versionchange (IE/Edge/Safari)\n db.on(\"versionchange\").fire(ev);\n });\n\n if (!hasNativeGetDatabaseNames) {\n // Update localStorage with list of database names\n globalDatabaseList(function (databaseNames) {\n if (databaseNames.indexOf(dbName) === -1) return databaseNames.push(dbName);\n });\n }\n\n resolve();\n }, reject);\n })]).then(function () {\n // Before finally resolving the dbReadyPromise and this promise,\n // call and await all on('ready') subscribers:\n // Dexie.vip() makes subscribers able to use the database while being opened.\n // This is a must since these subscribers take part of the opening procedure.\n return Dexie.vip(db.on.ready.fire);\n }).then(function () {\n // Resolve the db.open() with the db instance.\n isBeingOpened = false;\n return db;\n }).catch(function (err) {\n try {\n // Did we fail within onupgradeneeded? Make sure to abort the upgrade transaction so it doesnt commit.\n upgradeTransaction && upgradeTransaction.abort();\n } catch (e) {}\n isBeingOpened = false; // Set before calling db.close() so that it doesnt reject openCanceller again (leads to unhandled rejection event).\n db.close(); // Closes and resets idbdb, removes connections, resets dbReadyPromise and openCanceller so that a later db.open() is fresh.\n // A call to db.close() may have made on-ready subscribers fail. Use dbOpenError if set, since err could be a follow-up error on that.\n dbOpenError = err; // Record the error. It will be used to reject further promises of db operations.\n return rejection(dbOpenError, dbUncaught); // dbUncaught will make sure any error that happened in any operation before will now bubble to db.on.error() thanks to the special handling in Promise.uncaught().\n }).finally(function () {\n openComplete = true;\n resolveDbReady(); // dbReadyPromise is resolved no matter if open() rejects or resolved. It's just to wake up waiters.\n });\n };\n\n this.close = function () {\n var idx = connections.indexOf(db);\n if (idx >= 0) connections.splice(idx, 1);\n if (idbdb) {\n try {\n idbdb.close();\n } catch (e) {}\n idbdb = null;\n }\n autoOpen = false;\n dbOpenError = new exceptions.DatabaseClosed();\n if (isBeingOpened) cancelOpen(dbOpenError);\n // Reset dbReadyPromise promise:\n dbReadyPromise = new Promise(function (resolve) {\n dbReadyResolve = resolve;\n });\n openCanceller = new Promise(function (_, reject) {\n cancelOpen = reject;\n });\n };\n\n this.delete = function () {\n var hasArguments = arguments.length > 0;\n return new Promise(function (resolve, reject) {\n if (hasArguments) throw new exceptions.InvalidArgument(\"Arguments not allowed in db.delete()\");\n if (isBeingOpened) {\n dbReadyPromise.then(doDelete);\n } else {\n doDelete();\n }\n function doDelete() {\n db.close();\n var req = indexedDB.deleteDatabase(dbName);\n req.onsuccess = wrap(function () {\n if (!hasNativeGetDatabaseNames) {\n globalDatabaseList(function (databaseNames) {\n var pos = databaseNames.indexOf(dbName);\n if (pos >= 0) return databaseNames.splice(pos, 1);\n });\n }\n resolve();\n });\n req.onerror = wrap(eventRejectHandler(reject));\n req.onblocked = fireOnBlocked;\n }\n }).uncaught(dbUncaught);\n };\n\n this.backendDB = function () {\n return idbdb;\n };\n\n this.isOpen = function () {\n return idbdb !== null;\n };\n this.hasFailed = function () {\n return dbOpenError !== null;\n };\n this.dynamicallyOpened = function () {\n return autoSchema;\n };\n\n //\n // Properties\n //\n this.name = dbName;\n\n // db.tables - an array of all Table instances.\n setProp(this, \"tables\", {\n get: function () {\n /// \n return keys(allTables).map(function (name) {\n return allTables[name];\n });\n }\n });\n\n //\n // Events\n //\n this.on = Events(this, \"error\", \"populate\", \"blocked\", \"versionchange\", { ready: [promisableChain, nop] });\n\n this.on.ready.subscribe = override(this.on.ready.subscribe, function (subscribe) {\n return function (subscriber, bSticky) {\n Dexie.vip(function () {\n subscribe(subscriber);\n if (!bSticky) subscribe(function unsubscribe() {\n db.on.ready.unsubscribe(subscriber);\n db.on.ready.unsubscribe(unsubscribe);\n });\n });\n };\n });\n\n fakeAutoComplete(function () {\n db.on(\"populate\").fire(db._createTransaction(READWRITE, dbStoreNames, globalSchema));\n db.on(\"error\").fire(new Error());\n });\n\n this.transaction = function (mode, tableInstances, scopeFunc) {\n /// \n ///\n /// \n /// \"r\" for readonly, or \"rw\" for readwrite\n /// Table instance, Array of Table instances, String or String Array of object stores to include in the transaction\n /// Function to execute with transaction\n\n // Let table arguments be all arguments between mode and last argument.\n var i = arguments.length;\n if (i < 2) throw new exceptions.InvalidArgument(\"Too few arguments\");\n // Prevent optimzation killer (https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments)\n // and clone arguments except the first one into local var 'args'.\n var args = new Array(i - 1);\n while (--i) {\n args[i - 1] = arguments[i];\n } // Let scopeFunc be the last argument and pop it so that args now only contain the table arguments.\n scopeFunc = args.pop();\n var tables = flatten(args); // Support using array as middle argument, or a mix of arrays and non-arrays.\n var parentTransaction = PSD.trans;\n // Check if parent transactions is bound to this db instance, and if caller wants to reuse it\n if (!parentTransaction || parentTransaction.db !== db || mode.indexOf('!') !== -1) parentTransaction = null;\n var onlyIfCompatible = mode.indexOf('?') !== -1;\n mode = mode.replace('!', '').replace('?', ''); // Ok. Will change arguments[0] as well but we wont touch arguments henceforth.\n\n try {\n //\n // Get storeNames from arguments. Either through given table instances, or through given table names.\n //\n var storeNames = tables.map(function (table) {\n var storeName = table instanceof Table ? table.name : table;\n if (typeof storeName !== 'string') throw new TypeError(\"Invalid table argument to Dexie.transaction(). Only Table or String are allowed\");\n return storeName;\n });\n\n //\n // Resolve mode. Allow shortcuts \"r\" and \"rw\".\n //\n if (mode == \"r\" || mode == READONLY) mode = READONLY;else if (mode == \"rw\" || mode == READWRITE) mode = READWRITE;else throw new exceptions.InvalidArgument(\"Invalid transaction mode: \" + mode);\n\n if (parentTransaction) {\n // Basic checks\n if (parentTransaction.mode === READONLY && mode === READWRITE) {\n if (onlyIfCompatible) {\n // Spawn new transaction instead.\n parentTransaction = null;\n } else throw new exceptions.SubTransaction(\"Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY\");\n }\n if (parentTransaction) {\n storeNames.forEach(function (storeName) {\n if (!hasOwn(parentTransaction.tables, storeName)) {\n if (onlyIfCompatible) {\n // Spawn new transaction instead.\n parentTransaction = null;\n } else throw new exceptions.SubTransaction(\"Table \" + storeName + \" not included in parent transaction.\");\n }\n });\n }\n }\n } catch (e) {\n return parentTransaction ? parentTransaction._promise(null, function (_, reject) {\n reject(e);\n }) : rejection(e, dbUncaught);\n }\n // If this is a sub-transaction, lock the parent and then launch the sub-transaction.\n return parentTransaction ? parentTransaction._promise(mode, enterTransactionScope, \"lock\") : db._whenReady(enterTransactionScope);\n\n function enterTransactionScope(resolve) {\n var parentPSD = PSD;\n resolve(Promise.resolve().then(function () {\n return newScope(function () {\n // Keep a pointer to last non-transactional PSD to use if someone calls Dexie.ignoreTransaction().\n PSD.transless = PSD.transless || parentPSD;\n // Our transaction.\n //return new Promise((resolve, reject) => {\n var trans = db._createTransaction(mode, storeNames, globalSchema, parentTransaction);\n // Let the transaction instance be part of a Promise-specific data (PSD) value.\n PSD.trans = trans;\n\n if (parentTransaction) {\n // Emulate transaction commit awareness for inner transaction (must 'commit' when the inner transaction has no more operations ongoing)\n trans.idbtrans = parentTransaction.idbtrans;\n } else {\n trans.create(); // Create the backend transaction so that complete() or error() will trigger even if no operation is made upon it.\n }\n\n // Provide arguments to the scope function (for backward compatibility)\n var tableArgs = storeNames.map(function (name) {\n return trans.tables[name];\n });\n tableArgs.push(trans);\n\n var returnValue;\n return Promise.follow(function () {\n // Finally, call the scope function with our table and transaction arguments.\n returnValue = scopeFunc.apply(trans, tableArgs); // NOTE: returnValue is used in trans.on.complete() not as a returnValue to this func.\n if (returnValue) {\n if (typeof returnValue.next === 'function' && typeof returnValue.throw === 'function') {\n // scopeFunc returned an iterator with throw-support. Handle yield as await.\n returnValue = awaitIterator(returnValue);\n } else if (typeof returnValue.then === 'function' && !hasOwn(returnValue, '_PSD')) {\n throw new exceptions.IncompatiblePromise(\"Incompatible Promise returned from transaction scope (read more at http://tinyurl.com/znyqjqc). Transaction scope: \" + scopeFunc.toString());\n }\n }\n }).uncaught(dbUncaught).then(function () {\n if (parentTransaction) trans._resolve(); // sub transactions don't react to idbtrans.oncomplete. We must trigger a acompletion.\n return trans._completion; // Even if WE believe everything is fine. Await IDBTransaction's oncomplete or onerror as well.\n }).then(function () {\n return returnValue;\n }).catch(function (e) {\n //reject(e);\n trans._reject(e); // Yes, above then-handler were maybe not called because of an unhandled rejection in scopeFunc!\n return rejection(e);\n });\n //});\n });\n }));\n }\n };\n\n this.table = function (tableName) {\n /// \n if (fake && autoSchema) return new WriteableTable(tableName);\n if (!hasOwn(allTables, tableName)) {\n throw new exceptions.InvalidTable('Table ' + tableName + ' does not exist');\n }\n return allTables[tableName];\n };\n\n //\n //\n //\n // Table Class\n //\n //\n //\n function Table(name, tableSchema, collClass) {\n /// \n this.name = name;\n this.schema = tableSchema;\n this.hook = allTables[name] ? allTables[name].hook : Events(null, {\n \"creating\": [hookCreatingChain, nop],\n \"reading\": [pureFunctionChain, mirror],\n \"updating\": [hookUpdatingChain, nop],\n \"deleting\": [hookDeletingChain, nop]\n });\n this._collClass = collClass || Collection;\n }\n\n props(Table.prototype, {\n\n //\n // Table Protected Methods\n //\n\n _trans: function getTransaction(mode, fn, writeLocked) {\n var trans = PSD.trans;\n return trans && trans.db === db ? trans._promise(mode, fn, writeLocked) : tempTransaction(mode, [this.name], fn);\n },\n _idbstore: function getIDBObjectStore(mode, fn, writeLocked) {\n if (fake) return new Promise(fn); // Simplify the work for Intellisense/Code completion.\n var trans = PSD.trans,\n tableName = this.name;\n function supplyIdbStore(resolve, reject, trans) {\n fn(resolve, reject, trans.idbtrans.objectStore(tableName), trans);\n }\n return trans && trans.db === db ? trans._promise(mode, supplyIdbStore, writeLocked) : tempTransaction(mode, [this.name], supplyIdbStore);\n },\n\n //\n // Table Public Methods\n //\n get: function (key, cb) {\n var self = this;\n return this._idbstore(READONLY, function (resolve, reject, idbstore) {\n fake && resolve(self.schema.instanceTemplate);\n var req = idbstore.get(key);\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = function () {\n resolve(self.hook.reading.fire(req.result));\n };\n }).then(cb);\n },\n where: function (indexName) {\n return new WhereClause(this, indexName);\n },\n count: function (cb) {\n return this.toCollection().count(cb);\n },\n offset: function (offset) {\n return this.toCollection().offset(offset);\n },\n limit: function (numRows) {\n return this.toCollection().limit(numRows);\n },\n reverse: function () {\n return this.toCollection().reverse();\n },\n filter: function (filterFunction) {\n return this.toCollection().and(filterFunction);\n },\n each: function (fn) {\n return this.toCollection().each(fn);\n },\n toArray: function (cb) {\n return this.toCollection().toArray(cb);\n },\n orderBy: function (index) {\n return new this._collClass(new WhereClause(this, index));\n },\n\n toCollection: function () {\n return new this._collClass(new WhereClause(this));\n },\n\n mapToClass: function (constructor, structure) {\n /// \n /// Map table to a javascript constructor function. Objects returned from the database will be instances of this class, making\n /// it possible to the instanceOf operator as well as extending the class using constructor.prototype.method = function(){...}.\n /// \n /// Constructor function representing the class.\n /// Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also\n /// know what type each member has. Example: {name: String, emailAddresses: [String], password}\n this.schema.mappedClass = constructor;\n var instanceTemplate = Object.create(constructor.prototype);\n if (structure) {\n // structure and instanceTemplate is for IDE code competion only while constructor.prototype is for actual inheritance.\n applyStructure(instanceTemplate, structure);\n }\n this.schema.instanceTemplate = instanceTemplate;\n\n // Now, subscribe to the when(\"reading\") event to make all objects that come out from this table inherit from given class\n // no matter which method to use for reading (Table.get() or Table.where(...)... )\n var readHook = function (obj) {\n if (!obj) return obj; // No valid object. (Value is null). Return as is.\n // Create a new object that derives from constructor:\n var res = Object.create(constructor.prototype);\n // Clone members:\n for (var m in obj) {\n if (hasOwn(obj, m)) res[m] = obj[m];\n }return res;\n };\n\n if (this.schema.readHook) {\n this.hook.reading.unsubscribe(this.schema.readHook);\n }\n this.schema.readHook = readHook;\n this.hook(\"reading\", readHook);\n return constructor;\n },\n defineClass: function (structure) {\n /// \n /// Define all members of the class that represents the table. This will help code completion of when objects are read from the database\n /// as well as making it possible to extend the prototype of the returned constructor function.\n /// \n /// Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also\n /// know what type each member has. Example: {name: String, emailAddresses: [String], properties: {shoeSize: Number}}\n return this.mapToClass(Dexie.defineClass(structure), structure);\n }\n });\n\n //\n //\n //\n // WriteableTable Class (extends Table)\n //\n //\n //\n function WriteableTable(name, tableSchema, collClass) {\n Table.call(this, name, tableSchema, collClass || WriteableCollection);\n }\n\n function BulkErrorHandlerCatchAll(errorList, done, supportHooks) {\n return (supportHooks ? hookedEventRejectHandler : eventRejectHandler)(function (e) {\n errorList.push(e);\n done && done();\n });\n }\n\n function bulkDelete(idbstore, trans, keysOrTuples, hasDeleteHook, deletingHook) {\n // If hasDeleteHook, keysOrTuples must be an array of tuples: [[key1, value2],[key2,value2],...],\n // else keysOrTuples must be just an array of keys: [key1, key2, ...].\n return new Promise(function (resolve, reject) {\n var len = keysOrTuples.length,\n lastItem = len - 1;\n if (len === 0) return resolve();\n if (!hasDeleteHook) {\n for (var i = 0; i < len; ++i) {\n var req = idbstore.delete(keysOrTuples[i]);\n req.onerror = wrap(eventRejectHandler(reject));\n if (i === lastItem) req.onsuccess = wrap(function () {\n return resolve();\n });\n }\n } else {\n var hookCtx,\n errorHandler = hookedEventRejectHandler(reject),\n successHandler = hookedEventSuccessHandler(null);\n tryCatch(function () {\n for (var i = 0; i < len; ++i) {\n hookCtx = { onsuccess: null, onerror: null };\n var tuple = keysOrTuples[i];\n deletingHook.call(hookCtx, tuple[0], tuple[1], trans);\n var req = idbstore.delete(tuple[0]);\n req._hookCtx = hookCtx;\n req.onerror = errorHandler;\n if (i === lastItem) req.onsuccess = hookedEventSuccessHandler(resolve);else req.onsuccess = successHandler;\n }\n }, function (err) {\n hookCtx.onerror && hookCtx.onerror(err);\n throw err;\n });\n }\n }).uncaught(dbUncaught);\n }\n\n derive(WriteableTable).from(Table).extend({\n bulkDelete: function (keys) {\n if (this.hook.deleting.fire === nop) {\n return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) {\n resolve(bulkDelete(idbstore, trans, keys, false, nop));\n });\n } else {\n return this.where(':id').anyOf(keys).delete().then(function () {}); // Resolve with undefined.\n }\n },\n bulkPut: function (objects, keys) {\n var _this = this;\n\n return this._idbstore(READWRITE, function (resolve, reject, idbstore) {\n if (!idbstore.keyPath && !_this.schema.primKey.auto && !keys) throw new exceptions.InvalidArgument(\"bulkPut() with non-inbound keys requires keys array in second argument\");\n if (idbstore.keyPath && keys) throw new exceptions.InvalidArgument(\"bulkPut(): keys argument invalid on tables with inbound keys\");\n if (keys && keys.length !== objects.length) throw new exceptions.InvalidArgument(\"Arguments objects and keys must have the same length\");\n if (objects.length === 0) return resolve(); // Caller provided empty list.\n var done = function (result) {\n if (errorList.length === 0) resolve(result);else reject(new BulkError(_this.name + '.bulkPut(): ' + errorList.length + ' of ' + numObjs + ' operations failed', errorList));\n };\n var req,\n errorList = [],\n errorHandler,\n numObjs = objects.length,\n table = _this;\n if (_this.hook.creating.fire === nop && _this.hook.updating.fire === nop) {\n //\n // Standard Bulk (no 'creating' or 'updating' hooks to care about)\n //\n errorHandler = BulkErrorHandlerCatchAll(errorList);\n for (var i = 0, l = objects.length; i < l; ++i) {\n req = keys ? idbstore.put(objects[i], keys[i]) : idbstore.put(objects[i]);\n req.onerror = errorHandler;\n }\n // Only need to catch success or error on the last operation\n // according to the IDB spec.\n req.onerror = BulkErrorHandlerCatchAll(errorList, done);\n req.onsuccess = eventSuccessHandler(done);\n } else {\n var effectiveKeys = keys || idbstore.keyPath && objects.map(function (o) {\n return getByKeyPath(o, idbstore.keyPath);\n });\n // Generate map of {[key]: object}\n var objectLookup = effectiveKeys && arrayToObject(effectiveKeys, function (key, i) {\n return key != null && [key, objects[i]];\n });\n var promise = !effectiveKeys ?\n\n // Auto-incremented key-less objects only without any keys argument.\n table.bulkAdd(objects) :\n\n // Keys provided. Either as inbound in provided objects, or as a keys argument.\n // Begin with updating those that exists in DB:\n table.where(':id').anyOf(effectiveKeys.filter(function (key) {\n return key != null;\n })).modify(function () {\n this.value = objectLookup[this.primKey];\n objectLookup[this.primKey] = null; // Mark as \"don't add this\"\n }).catch(ModifyError, function (e) {\n errorList = e.failures; // No need to concat here. These are the first errors added.\n }).then(function () {\n // Now, let's examine which items didnt exist so we can add them:\n var objsToAdd = [],\n keysToAdd = keys && [];\n // Iterate backwards. Why? Because if same key was used twice, just add the last one.\n for (var i = effectiveKeys.length - 1; i >= 0; --i) {\n var key = effectiveKeys[i];\n if (key == null || objectLookup[key]) {\n objsToAdd.push(objects[i]);\n keys && keysToAdd.push(key);\n if (key != null) objectLookup[key] = null; // Mark as \"dont add again\"\n }\n }\n // The items are in reverse order so reverse them before adding.\n // Could be important in order to get auto-incremented keys the way the caller\n // would expect. Could have used unshift instead of push()/reverse(),\n // but: http://jsperf.com/unshift-vs-reverse\n objsToAdd.reverse();\n keys && keysToAdd.reverse();\n return table.bulkAdd(objsToAdd, keysToAdd);\n }).then(function (lastAddedKey) {\n // Resolve with key of the last object in given arguments to bulkPut():\n var lastEffectiveKey = effectiveKeys[effectiveKeys.length - 1]; // Key was provided.\n return lastEffectiveKey != null ? lastEffectiveKey : lastAddedKey;\n });\n\n promise.then(done).catch(BulkError, function (e) {\n // Concat failure from ModifyError and reject using our 'done' method.\n errorList = errorList.concat(e.failures);\n done();\n }).catch(reject);\n }\n }, \"locked\"); // If called from transaction scope, lock transaction til all steps are done.\n },\n bulkAdd: function (objects, keys) {\n var self = this,\n creatingHook = this.hook.creating.fire;\n return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) {\n if (!idbstore.keyPath && !self.schema.primKey.auto && !keys) throw new exceptions.InvalidArgument(\"bulkAdd() with non-inbound keys requires keys array in second argument\");\n if (idbstore.keyPath && keys) throw new exceptions.InvalidArgument(\"bulkAdd(): keys argument invalid on tables with inbound keys\");\n if (keys && keys.length !== objects.length) throw new exceptions.InvalidArgument(\"Arguments objects and keys must have the same length\");\n if (objects.length === 0) return resolve(); // Caller provided empty list.\n function done(result) {\n if (errorList.length === 0) resolve(result);else reject(new BulkError(self.name + '.bulkAdd(): ' + errorList.length + ' of ' + numObjs + ' operations failed', errorList));\n }\n var req,\n errorList = [],\n errorHandler,\n successHandler,\n numObjs = objects.length;\n if (creatingHook !== nop) {\n //\n // There are subscribers to hook('creating')\n // Must behave as documented.\n //\n var keyPath = idbstore.keyPath,\n hookCtx;\n errorHandler = BulkErrorHandlerCatchAll(errorList, null, true);\n successHandler = hookedEventSuccessHandler(null);\n\n tryCatch(function () {\n for (var i = 0, l = objects.length; i < l; ++i) {\n hookCtx = { onerror: null, onsuccess: null };\n var key = keys && keys[i];\n var obj = objects[i],\n effectiveKey = keys ? key : keyPath ? getByKeyPath(obj, keyPath) : undefined,\n keyToUse = creatingHook.call(hookCtx, effectiveKey, obj, trans);\n if (effectiveKey == null && keyToUse != null) {\n if (keyPath) {\n obj = deepClone(obj);\n setByKeyPath(obj, keyPath, keyToUse);\n } else {\n key = keyToUse;\n }\n }\n req = key != null ? idbstore.add(obj, key) : idbstore.add(obj);\n req._hookCtx = hookCtx;\n if (i < l - 1) {\n req.onerror = errorHandler;\n if (hookCtx.onsuccess) req.onsuccess = successHandler;\n }\n }\n }, function (err) {\n hookCtx.onerror && hookCtx.onerror(err);\n throw err;\n });\n\n req.onerror = BulkErrorHandlerCatchAll(errorList, done, true);\n req.onsuccess = hookedEventSuccessHandler(done);\n } else {\n //\n // Standard Bulk (no 'creating' hook to care about)\n //\n errorHandler = BulkErrorHandlerCatchAll(errorList);\n for (var i = 0, l = objects.length; i < l; ++i) {\n req = keys ? idbstore.add(objects[i], keys[i]) : idbstore.add(objects[i]);\n req.onerror = errorHandler;\n }\n // Only need to catch success or error on the last operation\n // according to the IDB spec.\n req.onerror = BulkErrorHandlerCatchAll(errorList, done);\n req.onsuccess = eventSuccessHandler(done);\n }\n });\n },\n add: function (obj, key) {\n /// \n /// Add an object to the database. In case an object with same primary key already exists, the object will not be added.\n /// \n /// A javascript object to insert\n /// Primary key\n var creatingHook = this.hook.creating.fire;\n return this._idbstore(READWRITE, function (resolve, reject, idbstore, trans) {\n var hookCtx = { onsuccess: null, onerror: null };\n if (creatingHook !== nop) {\n var effectiveKey = key != null ? key : idbstore.keyPath ? getByKeyPath(obj, idbstore.keyPath) : undefined;\n var keyToUse = creatingHook.call(hookCtx, effectiveKey, obj, trans); // Allow subscribers to when(\"creating\") to generate the key.\n if (effectiveKey == null && keyToUse != null) {\n // Using \"==\" and \"!=\" to check for either null or undefined!\n if (idbstore.keyPath) setByKeyPath(obj, idbstore.keyPath, keyToUse);else key = keyToUse;\n }\n }\n try {\n var req = key != null ? idbstore.add(obj, key) : idbstore.add(obj);\n req._hookCtx = hookCtx;\n req.onerror = hookedEventRejectHandler(reject);\n req.onsuccess = hookedEventSuccessHandler(function (result) {\n // TODO: Remove these two lines in next major release (2.0?)\n // It's no good practice to have side effects on provided parameters\n var keyPath = idbstore.keyPath;\n if (keyPath) setByKeyPath(obj, keyPath, result);\n resolve(result);\n });\n } catch (e) {\n if (hookCtx.onerror) hookCtx.onerror(e);\n throw e;\n }\n });\n },\n\n put: function (obj, key) {\n /// \n /// Add an object to the database but in case an object with same primary key alread exists, the existing one will get updated.\n /// \n /// A javascript object to insert or update\n /// Primary key\n var self = this,\n creatingHook = this.hook.creating.fire,\n updatingHook = this.hook.updating.fire;\n if (creatingHook !== nop || updatingHook !== nop) {\n //\n // People listens to when(\"creating\") or when(\"updating\") events!\n // We must know whether the put operation results in an CREATE or UPDATE.\n //\n return this._trans(READWRITE, function (resolve, reject, trans) {\n // Since key is optional, make sure we get it from obj if not provided\n var effectiveKey = key !== undefined ? key : self.schema.primKey.keyPath && getByKeyPath(obj, self.schema.primKey.keyPath);\n if (effectiveKey == null) {\n // \"== null\" means checking for either null or undefined.\n // No primary key. Must use add().\n trans.tables[self.name].add(obj).then(resolve, reject);\n } else {\n // Primary key exist. Lock transaction and try modifying existing. If nothing modified, call add().\n trans._lock(); // Needed because operation is splitted into modify() and add().\n // clone obj before this async call. If caller modifies obj the line after put(), the IDB spec requires that it should not affect operation.\n obj = deepClone(obj);\n trans.tables[self.name].where(\":id\").equals(effectiveKey).modify(function () {\n // Replace extisting value with our object\n // CRUD event firing handled in WriteableCollection.modify()\n this.value = obj;\n }).then(function (count) {\n if (count === 0) {\n // Object's key was not found. Add the object instead.\n // CRUD event firing will be done in add()\n return trans.tables[self.name].add(obj, key); // Resolving with another Promise. Returned Promise will then resolve with the new key.\n } else {\n return effectiveKey; // Resolve with the provided key.\n }\n }).finally(function () {\n trans._unlock();\n }).then(resolve, reject);\n }\n });\n } else {\n // Use the standard IDB put() method.\n return this._idbstore(READWRITE, function (resolve, reject, idbstore) {\n var req = key !== undefined ? idbstore.put(obj, key) : idbstore.put(obj);\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = function (ev) {\n var keyPath = idbstore.keyPath;\n if (keyPath) setByKeyPath(obj, keyPath, ev.target.result);\n resolve(req.result);\n };\n });\n }\n },\n\n 'delete': function (key) {\n /// Primary key of the object to delete\n if (this.hook.deleting.subscribers.length) {\n // People listens to when(\"deleting\") event. Must implement delete using WriteableCollection.delete() that will\n // call the CRUD event. Only WriteableCollection.delete() will know whether an object was actually deleted.\n return this.where(\":id\").equals(key).delete();\n } else {\n // No one listens. Use standard IDB delete() method.\n return this._idbstore(READWRITE, function (resolve, reject, idbstore) {\n var req = idbstore.delete(key);\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = function () {\n resolve(req.result);\n };\n });\n }\n },\n\n clear: function () {\n if (this.hook.deleting.subscribers.length) {\n // People listens to when(\"deleting\") event. Must implement delete using WriteableCollection.delete() that will\n // call the CRUD event. Only WriteableCollection.delete() will knows which objects that are actually deleted.\n return this.toCollection().delete();\n } else {\n return this._idbstore(READWRITE, function (resolve, reject, idbstore) {\n var req = idbstore.clear();\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = function () {\n resolve(req.result);\n };\n });\n }\n },\n\n update: function (keyOrObject, modifications) {\n if (typeof modifications !== 'object' || isArray(modifications)) throw new exceptions.InvalidArgument(\"Modifications must be an object.\");\n if (typeof keyOrObject === 'object' && !isArray(keyOrObject)) {\n // object to modify. Also modify given object with the modifications:\n keys(modifications).forEach(function (keyPath) {\n setByKeyPath(keyOrObject, keyPath, modifications[keyPath]);\n });\n var key = getByKeyPath(keyOrObject, this.schema.primKey.keyPath);\n if (key === undefined) return rejection(new exceptions.InvalidArgument(\"Given object does not contain its primary key\"), dbUncaught);\n return this.where(\":id\").equals(key).modify(modifications);\n } else {\n // key to modify\n return this.where(\":id\").equals(keyOrObject).modify(modifications);\n }\n }\n });\n\n //\n //\n //\n // Transaction Class\n //\n //\n //\n function Transaction(mode, storeNames, dbschema, parent) {\n var _this2 = this;\n\n /// \n /// Transaction class. Represents a database transaction. All operations on db goes through a Transaction.\n /// \n /// Any of \"readwrite\" or \"readonly\"\n /// Array of table names to operate on\n this.db = db;\n this.mode = mode;\n this.storeNames = storeNames;\n this.idbtrans = null;\n this.on = Events(this, \"complete\", \"error\", \"abort\");\n this.parent = parent || null;\n this.active = true;\n this._tables = null;\n this._reculock = 0;\n this._blockedFuncs = [];\n this._psd = null;\n this._dbschema = dbschema;\n this._resolve = null;\n this._reject = null;\n this._completion = new Promise(function (resolve, reject) {\n _this2._resolve = resolve;\n _this2._reject = reject;\n }).uncaught(dbUncaught);\n\n this._completion.then(function () {\n _this2.on.complete.fire();\n }, function (e) {\n _this2.on.error.fire(e);\n _this2.parent ? _this2.parent._reject(e) : _this2.active && _this2.idbtrans && _this2.idbtrans.abort();\n _this2.active = false;\n return rejection(e); // Indicate we actually DO NOT catch this error.\n });\n }\n\n props(Transaction.prototype, {\n //\n // Transaction Protected Methods (not required by API users, but needed internally and eventually by dexie extensions)\n //\n _lock: function () {\n assert(!PSD.global); // Locking and unlocking reuires to be within a PSD scope.\n // Temporary set all requests into a pending queue if they are called before database is ready.\n ++this._reculock; // Recursive read/write lock pattern using PSD (Promise Specific Data) instead of TLS (Thread Local Storage)\n if (this._reculock === 1 && !PSD.global) PSD.lockOwnerFor = this;\n return this;\n },\n _unlock: function () {\n assert(!PSD.global); // Locking and unlocking reuires to be within a PSD scope.\n if (--this._reculock === 0) {\n if (!PSD.global) PSD.lockOwnerFor = null;\n while (this._blockedFuncs.length > 0 && !this._locked()) {\n var fn = this._blockedFuncs.shift();\n try {\n fn();\n } catch (e) {}\n }\n }\n return this;\n },\n _locked: function () {\n // Checks if any write-lock is applied on this transaction.\n // To simplify the Dexie API for extension implementations, we support recursive locks.\n // This is accomplished by using \"Promise Specific Data\" (PSD).\n // PSD data is bound to a Promise and any child Promise emitted through then() or resolve( new Promise() ).\n // PSD is local to code executing on top of the call stacks of any of any code executed by Promise():\n // * callback given to the Promise() constructor (function (resolve, reject){...})\n // * callbacks given to then()/catch()/finally() methods (function (value){...})\n // If creating a new independant Promise instance from within a Promise call stack, the new Promise will derive the PSD from the call stack of the parent Promise.\n // Derivation is done so that the inner PSD __proto__ points to the outer PSD.\n // PSD.lockOwnerFor will point to current transaction object if the currently executing PSD scope owns the lock.\n return this._reculock && PSD.lockOwnerFor !== this;\n },\n create: function (idbtrans) {\n var _this3 = this;\n\n assert(!this.idbtrans);\n if (!idbtrans && !idbdb) {\n switch (dbOpenError && dbOpenError.name) {\n case \"DatabaseClosedError\":\n // Errors where it is no difference whether it was caused by the user operation or an earlier call to db.open()\n throw new exceptions.DatabaseClosed(dbOpenError);\n case \"MissingAPIError\":\n // Errors where it is no difference whether it was caused by the user operation or an earlier call to db.open()\n throw new exceptions.MissingAPI(dbOpenError.message, dbOpenError);\n default:\n // Make it clear that the user operation was not what caused the error - the error had occurred earlier on db.open()!\n throw new exceptions.OpenFailed(dbOpenError);\n }\n }\n if (!this.active) throw new exceptions.TransactionInactive();\n assert(this._completion._state === null);\n\n idbtrans = this.idbtrans = idbtrans || idbdb.transaction(safariMultiStoreFix(this.storeNames), this.mode);\n idbtrans.onerror = wrap(function (ev) {\n preventDefault(ev); // Prohibit default bubbling to window.error\n _this3._reject(idbtrans.error);\n });\n idbtrans.onabort = wrap(function (ev) {\n preventDefault(ev);\n _this3.active && _this3._reject(new exceptions.Abort());\n _this3.active = false;\n _this3.on(\"abort\").fire(ev);\n });\n idbtrans.oncomplete = wrap(function () {\n _this3.active = false;\n _this3._resolve();\n });\n return this;\n },\n _promise: function (mode, fn, bWriteLock) {\n var self = this;\n return newScope(function () {\n var p;\n // Read lock always\n if (!self._locked()) {\n p = self.active ? new Promise(function (resolve, reject) {\n if (mode === READWRITE && self.mode !== READWRITE) throw new exceptions.ReadOnly(\"Transaction is readonly\");\n if (!self.idbtrans && mode) self.create();\n if (bWriteLock) self._lock(); // Write lock if write operation is requested\n fn(resolve, reject, self);\n }) : rejection(new exceptions.TransactionInactive());\n if (self.active && bWriteLock) p.finally(function () {\n self._unlock();\n });\n } else {\n // Transaction is write-locked. Wait for mutex.\n p = new Promise(function (resolve, reject) {\n self._blockedFuncs.push(function () {\n self._promise(mode, fn, bWriteLock).then(resolve, reject);\n });\n });\n }\n p._lib = true;\n return p.uncaught(dbUncaught);\n });\n },\n\n //\n // Transaction Public Properties and Methods\n //\n abort: function () {\n this.active && this._reject(new exceptions.Abort());\n this.active = false;\n },\n\n // Deprecate:\n tables: {\n get: function () {\n if (this._tables) return this._tables;\n return this._tables = arrayToObject(this.storeNames, function (name) {\n return [name, allTables[name]];\n });\n }\n },\n\n // Deprecate:\n complete: function (cb) {\n return this.on(\"complete\", cb);\n },\n\n // Deprecate:\n error: function (cb) {\n return this.on(\"error\", cb);\n },\n\n // Deprecate\n table: function (name) {\n if (this.storeNames.indexOf(name) === -1) throw new exceptions.InvalidTable(\"Table \" + name + \" not in transaction\");\n return allTables[name];\n }\n });\n\n //\n //\n //\n // WhereClause\n //\n //\n //\n function WhereClause(table, index, orCollection) {\n /// \n /// \n /// \n this._ctx = {\n table: table,\n index: index === \":id\" ? null : index,\n collClass: table._collClass,\n or: orCollection\n };\n }\n\n props(WhereClause.prototype, function () {\n\n // WhereClause private methods\n\n function fail(collectionOrWhereClause, err, T) {\n var collection = collectionOrWhereClause instanceof WhereClause ? new collectionOrWhereClause._ctx.collClass(collectionOrWhereClause) : collectionOrWhereClause;\n\n collection._ctx.error = T ? new T(err) : new TypeError(err);\n return collection;\n }\n\n function emptyCollection(whereClause) {\n return new whereClause._ctx.collClass(whereClause, function () {\n return IDBKeyRange.only(\"\");\n }).limit(0);\n }\n\n function upperFactory(dir) {\n return dir === \"next\" ? function (s) {\n return s.toUpperCase();\n } : function (s) {\n return s.toLowerCase();\n };\n }\n function lowerFactory(dir) {\n return dir === \"next\" ? function (s) {\n return s.toLowerCase();\n } : function (s) {\n return s.toUpperCase();\n };\n }\n function nextCasing(key, lowerKey, upperNeedle, lowerNeedle, cmp, dir) {\n var length = Math.min(key.length, lowerNeedle.length);\n var llp = -1;\n for (var i = 0; i < length; ++i) {\n var lwrKeyChar = lowerKey[i];\n if (lwrKeyChar !== lowerNeedle[i]) {\n if (cmp(key[i], upperNeedle[i]) < 0) return key.substr(0, i) + upperNeedle[i] + upperNeedle.substr(i + 1);\n if (cmp(key[i], lowerNeedle[i]) < 0) return key.substr(0, i) + lowerNeedle[i] + upperNeedle.substr(i + 1);\n if (llp >= 0) return key.substr(0, llp) + lowerKey[llp] + upperNeedle.substr(llp + 1);\n return null;\n }\n if (cmp(key[i], lwrKeyChar) < 0) llp = i;\n }\n if (length < lowerNeedle.length && dir === \"next\") return key + upperNeedle.substr(key.length);\n if (length < key.length && dir === \"prev\") return key.substr(0, upperNeedle.length);\n return llp < 0 ? null : key.substr(0, llp) + lowerNeedle[llp] + upperNeedle.substr(llp + 1);\n }\n\n function addIgnoreCaseAlgorithm(whereClause, match, needles, suffix) {\n /// \n var upper,\n lower,\n compare,\n upperNeedles,\n lowerNeedles,\n direction,\n nextKeySuffix,\n needlesLen = needles.length;\n if (!needles.every(function (s) {\n return typeof s === 'string';\n })) {\n return fail(whereClause, STRING_EXPECTED);\n }\n function initDirection(dir) {\n upper = upperFactory(dir);\n lower = lowerFactory(dir);\n compare = dir === \"next\" ? simpleCompare : simpleCompareReverse;\n var needleBounds = needles.map(function (needle) {\n return { lower: lower(needle), upper: upper(needle) };\n }).sort(function (a, b) {\n return compare(a.lower, b.lower);\n });\n upperNeedles = needleBounds.map(function (nb) {\n return nb.upper;\n });\n lowerNeedles = needleBounds.map(function (nb) {\n return nb.lower;\n });\n direction = dir;\n nextKeySuffix = dir === \"next\" ? \"\" : suffix;\n }\n initDirection(\"next\");\n\n var c = new whereClause._ctx.collClass(whereClause, function () {\n return IDBKeyRange.bound(upperNeedles[0], lowerNeedles[needlesLen - 1] + suffix);\n });\n\n c._ondirectionchange = function (direction) {\n // This event onlys occur before filter is called the first time.\n initDirection(direction);\n };\n\n var firstPossibleNeedle = 0;\n\n c._addAlgorithm(function (cursor, advance, resolve) {\n /// \n /// \n /// \n var key = cursor.key;\n if (typeof key !== 'string') return false;\n var lowerKey = lower(key);\n if (match(lowerKey, lowerNeedles, firstPossibleNeedle)) {\n return true;\n } else {\n var lowestPossibleCasing = null;\n for (var i = firstPossibleNeedle; i < needlesLen; ++i) {\n var casing = nextCasing(key, lowerKey, upperNeedles[i], lowerNeedles[i], compare, direction);\n if (casing === null && lowestPossibleCasing === null) firstPossibleNeedle = i + 1;else if (lowestPossibleCasing === null || compare(lowestPossibleCasing, casing) > 0) {\n lowestPossibleCasing = casing;\n }\n }\n if (lowestPossibleCasing !== null) {\n advance(function () {\n cursor.continue(lowestPossibleCasing + nextKeySuffix);\n });\n } else {\n advance(resolve);\n }\n return false;\n }\n });\n return c;\n }\n\n //\n // WhereClause public methods\n //\n return {\n between: function (lower, upper, includeLower, includeUpper) {\n /// \n /// Filter out records whose where-field lays between given lower and upper values. Applies to Strings, Numbers and Dates.\n /// \n /// \n /// \n /// Whether items that equals lower should be included. Default true.\n /// Whether items that equals upper should be included. Default false.\n /// \n includeLower = includeLower !== false; // Default to true\n includeUpper = includeUpper === true; // Default to false\n try {\n if (cmp(lower, upper) > 0 || cmp(lower, upper) === 0 && (includeLower || includeUpper) && !(includeLower && includeUpper)) return emptyCollection(this); // Workaround for idiotic W3C Specification that DataError must be thrown if lower > upper. The natural result would be to return an empty collection.\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.bound(lower, upper, !includeLower, !includeUpper);\n });\n } catch (e) {\n return fail(this, INVALID_KEY_ARGUMENT);\n }\n },\n equals: function (value) {\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.only(value);\n });\n },\n above: function (value) {\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.lowerBound(value, true);\n });\n },\n aboveOrEqual: function (value) {\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.lowerBound(value);\n });\n },\n below: function (value) {\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.upperBound(value, true);\n });\n },\n belowOrEqual: function (value) {\n return new this._ctx.collClass(this, function () {\n return IDBKeyRange.upperBound(value);\n });\n },\n startsWith: function (str) {\n /// \n if (typeof str !== 'string') return fail(this, STRING_EXPECTED);\n return this.between(str, str + maxString, true, true);\n },\n startsWithIgnoreCase: function (str) {\n /// \n if (str === \"\") return this.startsWith(str);\n return addIgnoreCaseAlgorithm(this, function (x, a) {\n return x.indexOf(a[0]) === 0;\n }, [str], maxString);\n },\n equalsIgnoreCase: function (str) {\n /// \n return addIgnoreCaseAlgorithm(this, function (x, a) {\n return x === a[0];\n }, [str], \"\");\n },\n anyOfIgnoreCase: function () {\n var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n if (set.length === 0) return emptyCollection(this);\n return addIgnoreCaseAlgorithm(this, function (x, a) {\n return a.indexOf(x) !== -1;\n }, set, \"\");\n },\n startsWithAnyOfIgnoreCase: function () {\n var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n if (set.length === 0) return emptyCollection(this);\n return addIgnoreCaseAlgorithm(this, function (x, a) {\n return a.some(function (n) {\n return x.indexOf(n) === 0;\n });\n }, set, maxString);\n },\n anyOf: function () {\n var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n var compare = ascending;\n try {\n set.sort(compare);\n } catch (e) {\n return fail(this, INVALID_KEY_ARGUMENT);\n }\n if (set.length === 0) return emptyCollection(this);\n var c = new this._ctx.collClass(this, function () {\n return IDBKeyRange.bound(set[0], set[set.length - 1]);\n });\n\n c._ondirectionchange = function (direction) {\n compare = direction === \"next\" ? ascending : descending;\n set.sort(compare);\n };\n var i = 0;\n c._addAlgorithm(function (cursor, advance, resolve) {\n var key = cursor.key;\n while (compare(key, set[i]) > 0) {\n // The cursor has passed beyond this key. Check next.\n ++i;\n if (i === set.length) {\n // There is no next. Stop searching.\n advance(resolve);\n return false;\n }\n }\n if (compare(key, set[i]) === 0) {\n // The current cursor value should be included and we should continue a single step in case next item has the same key or possibly our next key in set.\n return true;\n } else {\n // cursor.key not yet at set[i]. Forward cursor to the next key to hunt for.\n advance(function () {\n cursor.continue(set[i]);\n });\n return false;\n }\n });\n return c;\n },\n\n notEqual: function (value) {\n return this.inAnyRange([[-Infinity, value], [value, maxKey]], { includeLowers: false, includeUppers: false });\n },\n\n noneOf: function () {\n var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n if (set.length === 0) return new this._ctx.collClass(this); // Return entire collection.\n try {\n set.sort(ascending);\n } catch (e) {\n return fail(this, INVALID_KEY_ARGUMENT);\n }\n // Transform [\"a\",\"b\",\"c\"] to a set of ranges for between/above/below: [[-Infinity,\"a\"], [\"a\",\"b\"], [\"b\",\"c\"], [\"c\",maxKey]]\n var ranges = set.reduce(function (res, val) {\n return res ? res.concat([[res[res.length - 1][1], val]]) : [[-Infinity, val]];\n }, null);\n ranges.push([set[set.length - 1], maxKey]);\n return this.inAnyRange(ranges, { includeLowers: false, includeUppers: false });\n },\n\n /** Filter out values withing given set of ranges.\r\n * Example, give children and elders a rebate of 50%:\r\n *\r\n * db.friends.where('age').inAnyRange([[0,18],[65,Infinity]]).modify({Rebate: 1/2});\r\n *\r\n * @param {(string|number|Date|Array)[][]} ranges\r\n * @param {{includeLowers: boolean, includeUppers: boolean}} options\r\n */\n inAnyRange: function (ranges, options) {\n var ctx = this._ctx;\n if (ranges.length === 0) return emptyCollection(this);\n if (!ranges.every(function (range) {\n return range[0] !== undefined && range[1] !== undefined && ascending(range[0], range[1]) <= 0;\n })) {\n return fail(this, \"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower\", exceptions.InvalidArgument);\n }\n var includeLowers = !options || options.includeLowers !== false; // Default to true\n var includeUppers = options && options.includeUppers === true; // Default to false\n\n function addRange(ranges, newRange) {\n for (var i = 0, l = ranges.length; i < l; ++i) {\n var range = ranges[i];\n if (cmp(newRange[0], range[1]) < 0 && cmp(newRange[1], range[0]) > 0) {\n range[0] = min(range[0], newRange[0]);\n range[1] = max(range[1], newRange[1]);\n break;\n }\n }\n if (i === l) ranges.push(newRange);\n return ranges;\n }\n\n var sortDirection = ascending;\n function rangeSorter(a, b) {\n return sortDirection(a[0], b[0]);\n }\n\n // Join overlapping ranges\n var set;\n try {\n set = ranges.reduce(addRange, []);\n set.sort(rangeSorter);\n } catch (ex) {\n return fail(this, INVALID_KEY_ARGUMENT);\n }\n\n var i = 0;\n var keyIsBeyondCurrentEntry = includeUppers ? function (key) {\n return ascending(key, set[i][1]) > 0;\n } : function (key) {\n return ascending(key, set[i][1]) >= 0;\n };\n\n var keyIsBeforeCurrentEntry = includeLowers ? function (key) {\n return descending(key, set[i][0]) > 0;\n } : function (key) {\n return descending(key, set[i][0]) >= 0;\n };\n\n function keyWithinCurrentRange(key) {\n return !keyIsBeyondCurrentEntry(key) && !keyIsBeforeCurrentEntry(key);\n }\n\n var checkKey = keyIsBeyondCurrentEntry;\n\n var c = new ctx.collClass(this, function () {\n return IDBKeyRange.bound(set[0][0], set[set.length - 1][1], !includeLowers, !includeUppers);\n });\n\n c._ondirectionchange = function (direction) {\n if (direction === \"next\") {\n checkKey = keyIsBeyondCurrentEntry;\n sortDirection = ascending;\n } else {\n checkKey = keyIsBeforeCurrentEntry;\n sortDirection = descending;\n }\n set.sort(rangeSorter);\n };\n\n c._addAlgorithm(function (cursor, advance, resolve) {\n var key = cursor.key;\n while (checkKey(key)) {\n // The cursor has passed beyond this key. Check next.\n ++i;\n if (i === set.length) {\n // There is no next. Stop searching.\n advance(resolve);\n return false;\n }\n }\n if (keyWithinCurrentRange(key)) {\n // The current cursor value should be included and we should continue a single step in case next item has the same key or possibly our next key in set.\n return true;\n } else if (cmp(key, set[i][1]) === 0 || cmp(key, set[i][0]) === 0) {\n // includeUpper or includeLower is false so keyWithinCurrentRange() returns false even though we are at range border.\n // Continue to next key but don't include this one.\n return false;\n } else {\n // cursor.key not yet at set[i]. Forward cursor to the next key to hunt for.\n advance(function () {\n if (sortDirection === ascending) cursor.continue(set[i][0]);else cursor.continue(set[i][1]);\n });\n return false;\n }\n });\n return c;\n },\n startsWithAnyOf: function () {\n var set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\n if (!set.every(function (s) {\n return typeof s === 'string';\n })) {\n return fail(this, \"startsWithAnyOf() only works with strings\");\n }\n if (set.length === 0) return emptyCollection(this);\n\n return this.inAnyRange(set.map(function (str) {\n return [str, str + maxString];\n }));\n }\n };\n });\n\n //\n //\n //\n // Collection Class\n //\n //\n //\n function Collection(whereClause, keyRangeGenerator) {\n /// \n ///\n /// \n /// Where clause instance\n /// \n var keyRange = null,\n error = null;\n if (keyRangeGenerator) try {\n keyRange = keyRangeGenerator();\n } catch (ex) {\n error = ex;\n }\n\n var whereCtx = whereClause._ctx,\n table = whereCtx.table;\n this._ctx = {\n table: table,\n index: whereCtx.index,\n isPrimKey: !whereCtx.index || table.schema.primKey.keyPath && whereCtx.index === table.schema.primKey.name,\n range: keyRange,\n keysOnly: false,\n dir: \"next\",\n unique: \"\",\n algorithm: null,\n filter: null,\n replayFilter: null,\n justLimit: true, // True if a replayFilter is just a filter that performs a \"limit\" operation (or none at all)\n isMatch: null,\n offset: 0,\n limit: Infinity,\n error: error, // If set, any promise must be rejected with this error\n or: whereCtx.or,\n valueMapper: table.hook.reading.fire\n };\n }\n\n function isPlainKeyRange(ctx, ignoreLimitFilter) {\n return !(ctx.filter || ctx.algorithm || ctx.or) && (ignoreLimitFilter ? ctx.justLimit : !ctx.replayFilter);\n }\n\n props(Collection.prototype, function () {\n\n //\n // Collection Private Functions\n //\n\n function addFilter(ctx, fn) {\n ctx.filter = combine(ctx.filter, fn);\n }\n\n function addReplayFilter(ctx, factory, isLimitFilter) {\n var curr = ctx.replayFilter;\n ctx.replayFilter = curr ? function () {\n return combine(curr(), factory());\n } : factory;\n ctx.justLimit = isLimitFilter && !curr;\n }\n\n function addMatchFilter(ctx, fn) {\n ctx.isMatch = combine(ctx.isMatch, fn);\n }\n\n /** @param ctx {\r\n * isPrimKey: boolean,\r\n * table: Table,\r\n * index: string\r\n * }\r\n * @param store IDBObjectStore\r\n **/\n function getIndexOrStore(ctx, store) {\n if (ctx.isPrimKey) return store;\n var indexSpec = ctx.table.schema.idxByName[ctx.index];\n if (!indexSpec) throw new exceptions.Schema(\"KeyPath \" + ctx.index + \" on object store \" + store.name + \" is not indexed\");\n return store.index(indexSpec.name);\n }\n\n /** @param ctx {\r\n * isPrimKey: boolean,\r\n * table: Table,\r\n * index: string,\r\n * keysOnly: boolean,\r\n * range?: IDBKeyRange,\r\n * dir: \"next\" | \"prev\"\r\n * }\r\n */\n function openCursor(ctx, store) {\n var idxOrStore = getIndexOrStore(ctx, store);\n return ctx.keysOnly && 'openKeyCursor' in idxOrStore ? idxOrStore.openKeyCursor(ctx.range || null, ctx.dir + ctx.unique) : idxOrStore.openCursor(ctx.range || null, ctx.dir + ctx.unique);\n }\n\n function iter(ctx, fn, resolve, reject, idbstore) {\n var filter = ctx.replayFilter ? combine(ctx.filter, ctx.replayFilter()) : ctx.filter;\n if (!ctx.or) {\n iterate(openCursor(ctx, idbstore), combine(ctx.algorithm, filter), fn, resolve, reject, !ctx.keysOnly && ctx.valueMapper);\n } else (function () {\n var set = {};\n var resolved = 0;\n\n function resolveboth() {\n if (++resolved === 2) resolve(); // Seems like we just support or btwn max 2 expressions, but there are no limit because we do recursion.\n }\n\n function union(item, cursor, advance) {\n if (!filter || filter(cursor, advance, resolveboth, reject)) {\n var key = cursor.primaryKey.toString(); // Converts any Date to String, String to String, Number to String and Array to comma-separated string\n if (!hasOwn(set, key)) {\n set[key] = true;\n fn(item, cursor, advance);\n }\n }\n }\n\n ctx.or._iterate(union, resolveboth, reject, idbstore);\n iterate(openCursor(ctx, idbstore), ctx.algorithm, union, resolveboth, reject, !ctx.keysOnly && ctx.valueMapper);\n })();\n }\n function getInstanceTemplate(ctx) {\n return ctx.table.schema.instanceTemplate;\n }\n\n return {\n\n //\n // Collection Protected Functions\n //\n\n _read: function (fn, cb) {\n var ctx = this._ctx;\n if (ctx.error) return ctx.table._trans(null, function rejector(resolve, reject) {\n reject(ctx.error);\n });else return ctx.table._idbstore(READONLY, fn).then(cb);\n },\n _write: function (fn) {\n var ctx = this._ctx;\n if (ctx.error) return ctx.table._trans(null, function rejector(resolve, reject) {\n reject(ctx.error);\n });else return ctx.table._idbstore(READWRITE, fn, \"locked\"); // When doing write operations on collections, always lock the operation so that upcoming operations gets queued.\n },\n _addAlgorithm: function (fn) {\n var ctx = this._ctx;\n ctx.algorithm = combine(ctx.algorithm, fn);\n },\n\n _iterate: function (fn, resolve, reject, idbstore) {\n return iter(this._ctx, fn, resolve, reject, idbstore);\n },\n\n clone: function (props) {\n var rv = Object.create(this.constructor.prototype),\n ctx = Object.create(this._ctx);\n if (props) extend(ctx, props);\n rv._ctx = ctx;\n return rv;\n },\n\n raw: function () {\n this._ctx.valueMapper = null;\n return this;\n },\n\n //\n // Collection Public methods\n //\n\n each: function (fn) {\n var ctx = this._ctx;\n\n if (fake) {\n var item = getInstanceTemplate(ctx),\n primKeyPath = ctx.table.schema.primKey.keyPath,\n key = getByKeyPath(item, ctx.index ? ctx.table.schema.idxByName[ctx.index].keyPath : primKeyPath),\n primaryKey = getByKeyPath(item, primKeyPath);\n fn(item, { key: key, primaryKey: primaryKey });\n }\n\n return this._read(function (resolve, reject, idbstore) {\n iter(ctx, fn, resolve, reject, idbstore);\n });\n },\n\n count: function (cb) {\n if (fake) return Promise.resolve(0).then(cb);\n var ctx = this._ctx;\n\n if (isPlainKeyRange(ctx, true)) {\n // This is a plain key range. We can use the count() method if the index.\n return this._read(function (resolve, reject, idbstore) {\n var idx = getIndexOrStore(ctx, idbstore);\n var req = ctx.range ? idx.count(ctx.range) : idx.count();\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = function (e) {\n resolve(Math.min(e.target.result, ctx.limit));\n };\n }, cb);\n } else {\n // Algorithms, filters or expressions are applied. Need to count manually.\n var count = 0;\n return this._read(function (resolve, reject, idbstore) {\n iter(ctx, function () {\n ++count;return false;\n }, function () {\n resolve(count);\n }, reject, idbstore);\n }, cb);\n }\n },\n\n sortBy: function (keyPath, cb) {\n /// \n var parts = keyPath.split('.').reverse(),\n lastPart = parts[0],\n lastIndex = parts.length - 1;\n function getval(obj, i) {\n if (i) return getval(obj[parts[i]], i - 1);\n return obj[lastPart];\n }\n var order = this._ctx.dir === \"next\" ? 1 : -1;\n\n function sorter(a, b) {\n var aVal = getval(a, lastIndex),\n bVal = getval(b, lastIndex);\n return aVal < bVal ? -order : aVal > bVal ? order : 0;\n }\n return this.toArray(function (a) {\n return a.sort(sorter);\n }).then(cb);\n },\n\n toArray: function (cb) {\n var ctx = this._ctx;\n return this._read(function (resolve, reject, idbstore) {\n fake && resolve([getInstanceTemplate(ctx)]);\n if (hasGetAll && ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) {\n // Special optimation if we could use IDBObjectStore.getAll() or\n // IDBKeyRange.getAll():\n var readingHook = ctx.table.hook.reading.fire;\n var idxOrStore = getIndexOrStore(ctx, idbstore);\n var req = ctx.limit < Infinity ? idxOrStore.getAll(ctx.range, ctx.limit) : idxOrStore.getAll(ctx.range);\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = readingHook === mirror ? eventSuccessHandler(resolve) : wrap(eventSuccessHandler(function (res) {\n resolve(res.map(readingHook));\n }));\n } else {\n // Getting array through a cursor.\n var a = [];\n iter(ctx, function (item) {\n a.push(item);\n }, function arrayComplete() {\n resolve(a);\n }, reject, idbstore);\n }\n }, cb);\n },\n\n offset: function (offset) {\n var ctx = this._ctx;\n if (offset <= 0) return this;\n ctx.offset += offset; // For count()\n if (isPlainKeyRange(ctx)) {\n addReplayFilter(ctx, function () {\n var offsetLeft = offset;\n return function (cursor, advance) {\n if (offsetLeft === 0) return true;\n if (offsetLeft === 1) {\n --offsetLeft;return false;\n }\n advance(function () {\n cursor.advance(offsetLeft);\n offsetLeft = 0;\n });\n return false;\n };\n });\n } else {\n addReplayFilter(ctx, function () {\n var offsetLeft = offset;\n return function () {\n return --offsetLeft < 0;\n };\n });\n }\n return this;\n },\n\n limit: function (numRows) {\n this._ctx.limit = Math.min(this._ctx.limit, numRows); // For count()\n addReplayFilter(this._ctx, function () {\n var rowsLeft = numRows;\n return function (cursor, advance, resolve) {\n if (--rowsLeft <= 0) advance(resolve); // Stop after this item has been included\n return rowsLeft >= 0; // If numRows is already below 0, return false because then 0 was passed to numRows initially. Otherwise we wouldnt come here.\n };\n }, true);\n return this;\n },\n\n until: function (filterFunction, bIncludeStopEntry) {\n var ctx = this._ctx;\n fake && filterFunction(getInstanceTemplate(ctx));\n addFilter(this._ctx, function (cursor, advance, resolve) {\n if (filterFunction(cursor.value)) {\n advance(resolve);\n return bIncludeStopEntry;\n } else {\n return true;\n }\n });\n return this;\n },\n\n first: function (cb) {\n return this.limit(1).toArray(function (a) {\n return a[0];\n }).then(cb);\n },\n\n last: function (cb) {\n return this.reverse().first(cb);\n },\n\n filter: function (filterFunction) {\n /// function(val){return true/false}\n fake && filterFunction(getInstanceTemplate(this._ctx));\n addFilter(this._ctx, function (cursor) {\n return filterFunction(cursor.value);\n });\n // match filters not used in Dexie.js but can be used by 3rd part libraries to test a\n // collection for a match without querying DB. Used by Dexie.Observable.\n addMatchFilter(this._ctx, filterFunction);\n return this;\n },\n\n and: function (filterFunction) {\n return this.filter(filterFunction);\n },\n\n or: function (indexName) {\n return new WhereClause(this._ctx.table, indexName, this);\n },\n\n reverse: function () {\n this._ctx.dir = this._ctx.dir === \"prev\" ? \"next\" : \"prev\";\n if (this._ondirectionchange) this._ondirectionchange(this._ctx.dir);\n return this;\n },\n\n desc: function () {\n return this.reverse();\n },\n\n eachKey: function (cb) {\n var ctx = this._ctx;\n ctx.keysOnly = !ctx.isMatch;\n return this.each(function (val, cursor) {\n cb(cursor.key, cursor);\n });\n },\n\n eachUniqueKey: function (cb) {\n this._ctx.unique = \"unique\";\n return this.eachKey(cb);\n },\n\n eachPrimaryKey: function (cb) {\n var ctx = this._ctx;\n ctx.keysOnly = !ctx.isMatch;\n return this.each(function (val, cursor) {\n cb(cursor.primaryKey, cursor);\n });\n },\n\n keys: function (cb) {\n var ctx = this._ctx;\n ctx.keysOnly = !ctx.isMatch;\n var a = [];\n return this.each(function (item, cursor) {\n a.push(cursor.key);\n }).then(function () {\n return a;\n }).then(cb);\n },\n\n primaryKeys: function (cb) {\n var ctx = this._ctx;\n if (hasGetAll && ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) {\n // Special optimation if we could use IDBObjectStore.getAllKeys() or\n // IDBKeyRange.getAllKeys():\n return this._read(function (resolve, reject, idbstore) {\n var idxOrStore = getIndexOrStore(ctx, idbstore);\n var req = ctx.limit < Infinity ? idxOrStore.getAllKeys(ctx.range, ctx.limit) : idxOrStore.getAllKeys(ctx.range);\n req.onerror = eventRejectHandler(reject);\n req.onsuccess = eventSuccessHandler(resolve);\n }).then(cb);\n }\n ctx.keysOnly = !ctx.isMatch;\n var a = [];\n return this.each(function (item, cursor) {\n a.push(cursor.primaryKey);\n }).then(function () {\n return a;\n }).then(cb);\n },\n\n uniqueKeys: function (cb) {\n this._ctx.unique = \"unique\";\n return this.keys(cb);\n },\n\n firstKey: function (cb) {\n return this.limit(1).keys(function (a) {\n return a[0];\n }).then(cb);\n },\n\n lastKey: function (cb) {\n return this.reverse().firstKey(cb);\n },\n\n distinct: function () {\n var ctx = this._ctx,\n idx = ctx.index && ctx.table.schema.idxByName[ctx.index];\n if (!idx || !idx.multi) return this; // distinct() only makes differencies on multiEntry indexes.\n var set = {};\n addFilter(this._ctx, function (cursor) {\n var strKey = cursor.primaryKey.toString(); // Converts any Date to String, String to String, Number to String and Array to comma-separated string\n var found = hasOwn(set, strKey);\n set[strKey] = true;\n return !found;\n });\n return this;\n }\n };\n });\n\n //\n //\n // WriteableCollection Class\n //\n //\n function WriteableCollection() {\n Collection.apply(this, arguments);\n }\n\n derive(WriteableCollection).from(Collection).extend({\n\n //\n // WriteableCollection Public Methods\n //\n\n modify: function (changes) {\n var self = this,\n ctx = this._ctx,\n hook = ctx.table.hook,\n updatingHook = hook.updating.fire,\n deletingHook = hook.deleting.fire;\n\n fake && typeof changes === 'function' && changes.call({ value: ctx.table.schema.instanceTemplate }, ctx.table.schema.instanceTemplate);\n\n return this._write(function (resolve, reject, idbstore, trans) {\n var modifyer;\n if (typeof changes === 'function') {\n // Changes is a function that may update, add or delete propterties or even require a deletion the object itself (delete this.item)\n if (updatingHook === nop && deletingHook === nop) {\n // Noone cares about what is being changed. Just let the modifier function be the given argument as is.\n modifyer = changes;\n } else {\n // People want to know exactly what is being modified or deleted.\n // Let modifyer be a proxy function that finds out what changes the caller is actually doing\n // and call the hooks accordingly!\n modifyer = function (item) {\n var origItem = deepClone(item); // Clone the item first so we can compare laters.\n if (changes.call(this, item, this) === false) return false; // Call the real modifyer function (If it returns false explicitely, it means it dont want to modify anyting on this object)\n if (!hasOwn(this, \"value\")) {\n // The real modifyer function requests a deletion of the object. Inform the deletingHook that a deletion is taking place.\n deletingHook.call(this, this.primKey, item, trans);\n } else {\n // No deletion. Check what was changed\n var objectDiff = getObjectDiff(origItem, this.value);\n var additionalChanges = updatingHook.call(this, objectDiff, this.primKey, origItem, trans);\n if (additionalChanges) {\n // Hook want to apply additional modifications. Make sure to fullfill the will of the hook.\n item = this.value;\n keys(additionalChanges).forEach(function (keyPath) {\n setByKeyPath(item, keyPath, additionalChanges[keyPath]); // Adding {keyPath: undefined} means that the keyPath should be deleted. Handled by setByKeyPath\n });\n }\n }\n };\n }\n } else if (updatingHook === nop) {\n // changes is a set of {keyPath: value} and no one is listening to the updating hook.\n var keyPaths = keys(changes);\n var numKeys = keyPaths.length;\n modifyer = function (item) {\n var anythingModified = false;\n for (var i = 0; i < numKeys; ++i) {\n var keyPath = keyPaths[i],\n val = changes[keyPath];\n if (getByKeyPath(item, keyPath) !== val) {\n setByKeyPath(item, keyPath, val); // Adding {keyPath: undefined} means that the keyPath should be deleted. Handled by setByKeyPath\n anythingModified = true;\n }\n }\n return anythingModified;\n };\n } else {\n // changes is a set of {keyPath: value} and people are listening to the updating hook so we need to call it and\n // allow it to add additional modifications to make.\n var origChanges = changes;\n changes = shallowClone(origChanges); // Let's work with a clone of the changes keyPath/value set so that we can restore it in case a hook extends it.\n modifyer = function (item) {\n var anythingModified = false;\n var additionalChanges = updatingHook.call(this, changes, this.primKey, deepClone(item), trans);\n if (additionalChanges) extend(changes, additionalChanges);\n keys(changes).forEach(function (keyPath) {\n var val = changes[keyPath];\n if (getByKeyPath(item, keyPath) !== val) {\n setByKeyPath(item, keyPath, val);\n anythingModified = true;\n }\n });\n if (additionalChanges) changes = shallowClone(origChanges); // Restore original changes for next iteration\n return anythingModified;\n };\n }\n\n var count = 0;\n var successCount = 0;\n var iterationComplete = false;\n var failures = [];\n var failKeys = [];\n var currentKey = null;\n\n function modifyItem(item, cursor) {\n currentKey = cursor.primaryKey;\n var thisContext = {\n primKey: cursor.primaryKey,\n value: item,\n onsuccess: null,\n onerror: null\n };\n\n function onerror(e) {\n failures.push(e);\n failKeys.push(thisContext.primKey);\n checkFinished();\n return true; // Catch these errors and let a final rejection decide whether or not to abort entire transaction\n }\n\n if (modifyer.call(thisContext, item, thisContext) !== false) {\n // If a callback explicitely returns false, do not perform the update!\n var bDelete = !hasOwn(thisContext, \"value\");\n ++count;\n tryCatch(function () {\n var req = bDelete ? cursor.delete() : cursor.update(thisContext.value);\n req._hookCtx = thisContext;\n req.onerror = hookedEventRejectHandler(onerror);\n req.onsuccess = hookedEventSuccessHandler(function () {\n ++successCount;\n checkFinished();\n });\n }, onerror);\n } else if (thisContext.onsuccess) {\n // Hook will expect either onerror or onsuccess to always be called!\n thisContext.onsuccess(thisContext.value);\n }\n }\n\n function doReject(e) {\n if (e) {\n failures.push(e);\n failKeys.push(currentKey);\n }\n return reject(new ModifyError(\"Error modifying one or more objects\", failures, successCount, failKeys));\n }\n\n function checkFinished() {\n if (iterationComplete && successCount + failures.length === count) {\n if (failures.length > 0) doReject();else resolve(successCount);\n }\n }\n self.clone().raw()._iterate(modifyItem, function () {\n iterationComplete = true;\n checkFinished();\n }, doReject, idbstore);\n });\n },\n\n 'delete': function () {\n var _this4 = this;\n\n var ctx = this._ctx,\n range = ctx.range,\n deletingHook = ctx.table.hook.deleting.fire,\n hasDeleteHook = deletingHook !== nop;\n if (!hasDeleteHook && isPlainKeyRange(ctx) && (ctx.isPrimKey && !hangsOnDeleteLargeKeyRange || !range)) // if no range, we'll use clear().\n {\n // May use IDBObjectStore.delete(IDBKeyRange) in this case (Issue #208)\n // For chromium, this is the way most optimized version.\n // For IE/Edge, this could hang the indexedDB engine and make operating system instable\n // (https://gist.github.com/dfahlander/5a39328f029de18222cf2125d56c38f7)\n return this._write(function (resolve, reject, idbstore) {\n // Our API contract is to return a count of deleted items, so we have to count() before delete().\n var onerror = eventRejectHandler(reject),\n countReq = range ? idbstore.count(range) : idbstore.count();\n countReq.onerror = onerror;\n countReq.onsuccess = function () {\n var count = countReq.result;\n tryCatch(function () {\n var delReq = range ? idbstore.delete(range) : idbstore.clear();\n delReq.onerror = onerror;\n delReq.onsuccess = function () {\n return resolve(count);\n };\n }, function (err) {\n return reject(err);\n });\n };\n });\n }\n\n // Default version to use when collection is not a vanilla IDBKeyRange on the primary key.\n // Divide into chunks to not starve RAM.\n // If has delete hook, we will have to collect not just keys but also objects, so it will use\n // more memory and need lower chunk size.\n var CHUNKSIZE = hasDeleteHook ? 2000 : 10000;\n\n return this._write(function (resolve, reject, idbstore, trans) {\n var totalCount = 0;\n // Clone collection and change its table and set a limit of CHUNKSIZE on the cloned Collection instance.\n var collection = _this4.clone({\n keysOnly: !ctx.isMatch && !hasDeleteHook }) // load just keys (unless filter() or and() or deleteHook has subscribers)\n .distinct() // In case multiEntry is used, never delete same key twice because resulting count\n // would become larger than actual delete count.\n .limit(CHUNKSIZE).raw(); // Don't filter through reading-hooks (like mapped classes etc)\n\n var keysOrTuples = [];\n\n // We're gonna do things on as many chunks that are needed.\n // Use recursion of nextChunk function:\n var nextChunk = function () {\n return collection.each(hasDeleteHook ? function (val, cursor) {\n // Somebody subscribes to hook('deleting'). Collect all primary keys and their values,\n // so that the hook can be called with its values in bulkDelete().\n keysOrTuples.push([cursor.primaryKey, cursor.value]);\n } : function (val, cursor) {\n // No one subscribes to hook('deleting'). Collect only primary keys:\n keysOrTuples.push(cursor.primaryKey);\n }).then(function () {\n // Chromium deletes faster when doing it in sort order.\n hasDeleteHook ? keysOrTuples.sort(function (a, b) {\n return ascending(a[0], b[0]);\n }) : keysOrTuples.sort(ascending);\n return bulkDelete(idbstore, trans, keysOrTuples, hasDeleteHook, deletingHook);\n }).then(function () {\n var count = keysOrTuples.length;\n totalCount += count;\n keysOrTuples = [];\n return count < CHUNKSIZE ? totalCount : nextChunk();\n });\n };\n\n resolve(nextChunk());\n });\n }\n });\n\n //\n //\n //\n // ------------------------- Help functions ---------------------------\n //\n //\n //\n\n function lowerVersionFirst(a, b) {\n return a._cfg.version - b._cfg.version;\n }\n\n function setApiOnPlace(objs, tableNames, mode, dbschema) {\n tableNames.forEach(function (tableName) {\n var tableInstance = db._tableFactory(mode, dbschema[tableName]);\n objs.forEach(function (obj) {\n tableName in obj || (obj[tableName] = tableInstance);\n });\n });\n }\n\n function removeTablesApi(objs) {\n objs.forEach(function (obj) {\n for (var key in obj) {\n if (obj[key] instanceof Table) delete obj[key];\n }\n });\n }\n\n function iterate(req, filter, fn, resolve, reject, valueMapper) {\n\n // Apply valueMapper (hook('reading') or mappped class)\n var mappedFn = valueMapper ? function (x, c, a) {\n return fn(valueMapper(x), c, a);\n } : fn;\n // Wrap fn with PSD and microtick stuff from Promise.\n var wrappedFn = wrap(mappedFn, reject);\n\n if (!req.onerror) req.onerror = eventRejectHandler(reject);\n if (filter) {\n req.onsuccess = trycatcher(function filter_record() {\n var cursor = req.result;\n if (cursor) {\n var c = function () {\n cursor.continue();\n };\n if (filter(cursor, function (advancer) {\n c = advancer;\n }, resolve, reject)) wrappedFn(cursor.value, cursor, function (advancer) {\n c = advancer;\n });\n c();\n } else {\n resolve();\n }\n }, reject);\n } else {\n req.onsuccess = trycatcher(function filter_record() {\n var cursor = req.result;\n if (cursor) {\n var c = function () {\n cursor.continue();\n };\n wrappedFn(cursor.value, cursor, function (advancer) {\n c = advancer;\n });\n c();\n } else {\n resolve();\n }\n }, reject);\n }\n }\n\n function parseIndexSyntax(indexes) {\n /// \n /// \n var rv = [];\n indexes.split(',').forEach(function (index) {\n index = index.trim();\n var name = index.replace(/([&*]|\\+\\+)/g, \"\"); // Remove \"&\", \"++\" and \"*\"\n // Let keyPath of \"[a+b]\" be [\"a\",\"b\"]:\n var keyPath = /^\\[/.test(name) ? name.match(/^\\[(.*)\\]$/)[1].split('+') : name;\n\n rv.push(new IndexSpec(name, keyPath || null, /\\&/.test(index), /\\*/.test(index), /\\+\\+/.test(index), isArray(keyPath), /\\./.test(index)));\n });\n return rv;\n }\n\n function cmp(key1, key2) {\n return indexedDB.cmp(key1, key2);\n }\n\n function min(a, b) {\n return cmp(a, b) < 0 ? a : b;\n }\n\n function max(a, b) {\n return cmp(a, b) > 0 ? a : b;\n }\n\n function ascending(a, b) {\n return indexedDB.cmp(a, b);\n }\n\n function descending(a, b) {\n return indexedDB.cmp(b, a);\n }\n\n function simpleCompare(a, b) {\n return a < b ? -1 : a === b ? 0 : 1;\n }\n\n function simpleCompareReverse(a, b) {\n return a > b ? -1 : a === b ? 0 : 1;\n }\n\n function combine(filter1, filter2) {\n return filter1 ? filter2 ? function () {\n return filter1.apply(this, arguments) && filter2.apply(this, arguments);\n } : filter1 : filter2;\n }\n\n function readGlobalSchema() {\n db.verno = idbdb.version / 10;\n db._dbSchema = globalSchema = {};\n dbStoreNames = slice(idbdb.objectStoreNames, 0);\n if (dbStoreNames.length === 0) return; // Database contains no stores.\n var trans = idbdb.transaction(safariMultiStoreFix(dbStoreNames), 'readonly');\n dbStoreNames.forEach(function (storeName) {\n var store = trans.objectStore(storeName),\n keyPath = store.keyPath,\n dotted = keyPath && typeof keyPath === 'string' && keyPath.indexOf('.') !== -1;\n var primKey = new IndexSpec(keyPath, keyPath || \"\", false, false, !!store.autoIncrement, keyPath && typeof keyPath !== 'string', dotted);\n var indexes = [];\n for (var j = 0; j < store.indexNames.length; ++j) {\n var idbindex = store.index(store.indexNames[j]);\n keyPath = idbindex.keyPath;\n dotted = keyPath && typeof keyPath === 'string' && keyPath.indexOf('.') !== -1;\n var index = new IndexSpec(idbindex.name, keyPath, !!idbindex.unique, !!idbindex.multiEntry, false, keyPath && typeof keyPath !== 'string', dotted);\n indexes.push(index);\n }\n globalSchema[storeName] = new TableSchema(storeName, primKey, indexes, {});\n });\n setApiOnPlace([allTables, Transaction.prototype], keys(globalSchema), READWRITE, globalSchema);\n }\n\n function adjustToExistingIndexNames(schema, idbtrans) {\n /// \n /// Issue #30 Problem with existing db - adjust to existing index names when migrating from non-dexie db\n /// \n /// Map between name and TableSchema\n /// \n var storeNames = idbtrans.db.objectStoreNames;\n for (var i = 0; i < storeNames.length; ++i) {\n var storeName = storeNames[i];\n var store = idbtrans.objectStore(storeName);\n hasGetAll = 'getAll' in store;\n for (var j = 0; j < store.indexNames.length; ++j) {\n var indexName = store.indexNames[j];\n var keyPath = store.index(indexName).keyPath;\n var dexieName = typeof keyPath === 'string' ? keyPath : \"[\" + slice(keyPath).join('+') + \"]\";\n if (schema[storeName]) {\n var indexSpec = schema[storeName].idxByName[dexieName];\n if (indexSpec) indexSpec.name = indexName;\n }\n }\n }\n }\n\n function fireOnBlocked(ev) {\n db.on(\"blocked\").fire(ev);\n // Workaround (not fully*) for missing \"versionchange\" event in IE,Edge and Safari:\n connections.filter(function (c) {\n return c.name === db.name && c !== db && !c._vcFired;\n }).map(function (c) {\n return c.on(\"versionchange\").fire(ev);\n });\n }\n\n extend(this, {\n Collection: Collection,\n Table: Table,\n Transaction: Transaction,\n Version: Version,\n WhereClause: WhereClause,\n WriteableCollection: WriteableCollection,\n WriteableTable: WriteableTable\n });\n\n init();\n\n addons.forEach(function (fn) {\n fn(db);\n });\n}\n\nvar fakeAutoComplete = function () {}; // Will never be changed. We just fake for the IDE that we change it (see doFakeAutoComplete())\nvar fake = false; // Will never be changed. We just fake for the IDE that we change it (see doFakeAutoComplete())\n\nfunction parseType(type) {\n if (typeof type === 'function') {\n return new type();\n } else if (isArray(type)) {\n return [parseType(type[0])];\n } else if (type && typeof type === 'object') {\n var rv = {};\n applyStructure(rv, type);\n return rv;\n } else {\n return type;\n }\n}\n\nfunction applyStructure(obj, structure) {\n keys(structure).forEach(function (member) {\n var value = parseType(structure[member]);\n obj[member] = value;\n });\n return obj;\n}\n\nfunction eventSuccessHandler(done) {\n return function (ev) {\n done(ev.target.result);\n };\n}\n\nfunction hookedEventSuccessHandler(resolve) {\n // wrap() is needed when calling hooks because the rare scenario of:\n // * hook does a db operation that fails immediately (IDB throws exception)\n // For calling db operations on correct transaction, wrap makes sure to set PSD correctly.\n // wrap() will also execute in a virtual tick.\n // * If not wrapped in a virtual tick, direct exception will launch a new physical tick.\n // * If this was the last event in the bulk, the promise will resolve after a physical tick\n // and the transaction will have committed already.\n // If no hook, the virtual tick will be executed in the reject()/resolve of the final promise,\n // because it is always marked with _lib = true when created using Transaction._promise().\n return wrap(function (event) {\n var req = event.target,\n result = req.result,\n ctx = req._hookCtx,\n // Contains the hook error handler. Put here instead of closure to boost performance.\n hookSuccessHandler = ctx && ctx.onsuccess;\n hookSuccessHandler && hookSuccessHandler(result);\n resolve && resolve(result);\n }, resolve);\n}\n\nfunction eventRejectHandler(reject) {\n return function (event) {\n preventDefault(event);\n reject(event.target.error);\n return false;\n };\n}\n\nfunction hookedEventRejectHandler(reject) {\n return wrap(function (event) {\n // See comment on hookedEventSuccessHandler() why wrap() is needed only when supporting hooks.\n\n var req = event.target,\n err = req.error,\n ctx = req._hookCtx,\n // Contains the hook error handler. Put here instead of closure to boost performance.\n hookErrorHandler = ctx && ctx.onerror;\n hookErrorHandler && hookErrorHandler(err);\n preventDefault(event);\n reject(err);\n return false;\n });\n}\n\nfunction preventDefault(event) {\n if (event.stopPropagation) // IndexedDBShim doesnt support this on Safari 8 and below.\n event.stopPropagation();\n if (event.preventDefault) // IndexedDBShim doesnt support this on Safari 8 and below.\n event.preventDefault();\n}\n\nfunction globalDatabaseList(cb) {\n var val,\n localStorage = Dexie.dependencies.localStorage;\n if (!localStorage) return cb([]); // Envs without localStorage support\n try {\n val = JSON.parse(localStorage.getItem('Dexie.DatabaseNames') || \"[]\");\n } catch (e) {\n val = [];\n }\n if (cb(val)) {\n localStorage.setItem('Dexie.DatabaseNames', JSON.stringify(val));\n }\n}\n\nfunction awaitIterator(iterator) {\n var callNext = function (result) {\n return iterator.next(result);\n },\n doThrow = function (error) {\n return iterator.throw(error);\n },\n onSuccess = step(callNext),\n onError = step(doThrow);\n\n function step(getNext) {\n return function (val) {\n var next = getNext(val),\n value = next.value;\n\n return next.done ? value : !value || typeof value.then !== 'function' ? isArray(value) ? Promise.all(value).then(onSuccess, onError) : onSuccess(value) : value.then(onSuccess, onError);\n };\n }\n\n return step(callNext)();\n}\n\n//\n// IndexSpec struct\n//\nfunction IndexSpec(name, keyPath, unique, multi, auto, compound, dotted) {\n /// \n /// \n /// \n /// \n /// \n /// \n /// \n this.name = name;\n this.keyPath = keyPath;\n this.unique = unique;\n this.multi = multi;\n this.auto = auto;\n this.compound = compound;\n this.dotted = dotted;\n var keyPathSrc = typeof keyPath === 'string' ? keyPath : keyPath && '[' + [].join.call(keyPath, '+') + ']';\n this.src = (unique ? '&' : '') + (multi ? '*' : '') + (auto ? \"++\" : \"\") + keyPathSrc;\n}\n\n//\n// TableSchema struct\n//\nfunction TableSchema(name, primKey, indexes, instanceTemplate) {\n /// \n /// \n /// \n /// \n this.name = name;\n this.primKey = primKey || new IndexSpec();\n this.indexes = indexes || [new IndexSpec()];\n this.instanceTemplate = instanceTemplate;\n this.mappedClass = null;\n this.idxByName = arrayToObject(indexes, function (index) {\n return [index.name, index];\n });\n}\n\n// Used in when defining dependencies later...\n// (If IndexedDBShim is loaded, prefer it before standard indexedDB)\nvar idbshim = _global.idbModules && _global.idbModules.shimIndexedDB ? _global.idbModules : {};\n\nfunction safariMultiStoreFix(storeNames) {\n return storeNames.length === 1 ? storeNames[0] : storeNames;\n}\n\nfunction getNativeGetDatabaseNamesFn(indexedDB) {\n var fn = indexedDB && (indexedDB.getDatabaseNames || indexedDB.webkitGetDatabaseNames);\n return fn && fn.bind(indexedDB);\n}\n\n// Export Error classes\nprops(Dexie, fullNameExceptions); // Dexie.XXXError = class XXXError {...};\n\n//\n// Static methods and properties\n//\nprops(Dexie, {\n\n //\n // Static delete() method.\n //\n delete: function (databaseName) {\n var db = new Dexie(databaseName),\n promise = db.delete();\n promise.onblocked = function (fn) {\n db.on(\"blocked\", fn);\n return this;\n };\n return promise;\n },\n\n //\n // Static exists() method.\n //\n exists: function (name) {\n return new Dexie(name).open().then(function (db) {\n db.close();\n return true;\n }).catch(Dexie.NoSuchDatabaseError, function () {\n return false;\n });\n },\n\n //\n // Static method for retrieving a list of all existing databases at current host.\n //\n getDatabaseNames: function (cb) {\n return new Promise(function (resolve, reject) {\n var getDatabaseNames = getNativeGetDatabaseNamesFn(indexedDB);\n if (getDatabaseNames) {\n // In case getDatabaseNames() becomes standard, let's prepare to support it:\n var req = getDatabaseNames();\n req.onsuccess = function (event) {\n resolve(slice(event.target.result, 0)); // Converst DOMStringList to Array\n };\n req.onerror = eventRejectHandler(reject);\n } else {\n globalDatabaseList(function (val) {\n resolve(val);\n return false;\n });\n }\n }).then(cb);\n },\n\n defineClass: function (structure) {\n /// \n /// Create a javascript constructor based on given template for which properties to expect in the class.\n /// Any property that is a constructor function will act as a type. So {name: String} will be equal to {name: new String()}.\n /// \n /// Helps IDE code completion by knowing the members that objects contain and not just the indexes. Also\n /// know what type each member has. Example: {name: String, emailAddresses: [String], properties: {shoeSize: Number}}\n\n // Default constructor able to copy given properties into this object.\n function Class(properties) {\n /// Properties to initialize object with.\n /// \n properties ? extend(this, properties) : fake && applyStructure(this, structure);\n }\n return Class;\n },\n\n applyStructure: applyStructure,\n\n ignoreTransaction: function (scopeFunc) {\n // In case caller is within a transaction but needs to create a separate transaction.\n // Example of usage:\n //\n // Let's say we have a logger function in our app. Other application-logic should be unaware of the\n // logger function and not need to include the 'logentries' table in all transaction it performs.\n // The logging should always be done in a separate transaction and not be dependant on the current\n // running transaction context. Then you could use Dexie.ignoreTransaction() to run code that starts a new transaction.\n //\n // Dexie.ignoreTransaction(function() {\n // db.logentries.add(newLogEntry);\n // });\n //\n // Unless using Dexie.ignoreTransaction(), the above example would try to reuse the current transaction\n // in current Promise-scope.\n //\n // An alternative to Dexie.ignoreTransaction() would be setImmediate() or setTimeout(). The reason we still provide an\n // API for this because\n // 1) The intention of writing the statement could be unclear if using setImmediate() or setTimeout().\n // 2) setTimeout() would wait unnescessary until firing. This is however not the case with setImmediate().\n // 3) setImmediate() is not supported in the ES standard.\n // 4) You might want to keep other PSD state that was set in a parent PSD, such as PSD.letThrough.\n return PSD.trans ? usePSD(PSD.transless, scopeFunc) : // Use the closest parent that was non-transactional.\n scopeFunc(); // No need to change scope because there is no ongoing transaction.\n },\n\n vip: function (fn) {\n // To be used by subscribers to the on('ready') event.\n // This will let caller through to access DB even when it is blocked while the db.ready() subscribers are firing.\n // This would have worked automatically if we were certain that the Provider was using Dexie.Promise for all asyncronic operations. The promise PSD\n // from the provider.connect() call would then be derived all the way to when provider would call localDatabase.applyChanges(). But since\n // the provider more likely is using non-promise async APIs or other thenable implementations, we cannot assume that.\n // Note that this method is only useful for on('ready') subscribers that is returning a Promise from the event. If not using vip()\n // the database could deadlock since it wont open until the returned Promise is resolved, and any non-VIPed operation started by\n // the caller will not resolve until database is opened.\n return newScope(function () {\n PSD.letThrough = true; // Make sure we are let through if still blocking db due to onready is firing.\n return fn();\n });\n },\n\n async: function (generatorFn) {\n return function () {\n try {\n var rv = awaitIterator(generatorFn.apply(this, arguments));\n if (!rv || typeof rv.then !== 'function') return Promise.resolve(rv);\n return rv;\n } catch (e) {\n return rejection(e);\n }\n };\n },\n\n spawn: function (generatorFn, args, thiz) {\n try {\n var rv = awaitIterator(generatorFn.apply(thiz, args || []));\n if (!rv || typeof rv.then !== 'function') return Promise.resolve(rv);\n return rv;\n } catch (e) {\n return rejection(e);\n }\n },\n\n // Dexie.currentTransaction property\n currentTransaction: {\n get: function () {\n return PSD.trans || null;\n }\n },\n\n // Export our Promise implementation since it can be handy as a standalone Promise implementation\n Promise: Promise,\n\n // Dexie.debug proptery:\n // Dexie.debug = false\n // Dexie.debug = true\n // Dexie.debug = \"dexie\" - don't hide dexie's stack frames.\n debug: {\n get: function () {\n return Debug.debug;\n },\n set: function (value) {\n Debug.setDebug(value, value === 'dexie' ? function () {\n return true;\n } : dexieStackFrameFilter);\n }\n },\n\n // Export our derive/extend/override methodology\n derive: derive,\n extend: extend,\n props: props,\n override: override,\n // Export our Events() function - can be handy as a toolkit\n Events: Events,\n events: Events, // Backward compatible lowercase version. Deprecate.\n // Utilities\n getByKeyPath: getByKeyPath,\n setByKeyPath: setByKeyPath,\n delByKeyPath: delByKeyPath,\n shallowClone: shallowClone,\n deepClone: deepClone,\n getObjectDiff: getObjectDiff,\n asap: asap,\n maxKey: maxKey,\n // Addon registry\n addons: [],\n // Global DB connection list\n connections: connections,\n\n MultiModifyError: exceptions.Modify, // Backward compatibility 0.9.8. Deprecate.\n errnames: errnames,\n\n // Export other static classes\n IndexSpec: IndexSpec,\n TableSchema: TableSchema,\n\n //\n // Dependencies\n //\n // These will automatically work in browsers with indexedDB support, or where an indexedDB polyfill has been included.\n //\n // In node.js, however, these properties must be set \"manually\" before instansiating a new Dexie().\n // For node.js, you need to require indexeddb-js or similar and then set these deps.\n //\n dependencies: {\n // Required:\n indexedDB: idbshim.shimIndexedDB || _global.indexedDB || _global.mozIndexedDB || _global.webkitIndexedDB || _global.msIndexedDB,\n IDBKeyRange: idbshim.IDBKeyRange || _global.IDBKeyRange || _global.webkitIDBKeyRange\n },\n\n // API Version Number: Type Number, make sure to always set a version number that can be comparable correctly. Example: 0.9, 0.91, 0.92, 1.0, 1.01, 1.1, 1.2, 1.21, etc.\n semVer: DEXIE_VERSION,\n version: DEXIE_VERSION.split('.').map(function (n) {\n return parseInt(n);\n }).reduce(function (p, c, i) {\n return p + c / Math.pow(10, i * 2);\n }),\n fakeAutoComplete: fakeAutoComplete,\n\n // https://github.com/dfahlander/Dexie.js/issues/186\n // typescript compiler tsc in mode ts-->es5 & commonJS, will expect require() to return\n // x.default. Workaround: Set Dexie.default = Dexie.\n default: Dexie\n});\n\ntryCatch(function () {\n // Optional dependencies\n // localStorage\n Dexie.dependencies.localStorage = (typeof chrome !== \"undefined\" && chrome !== null ? chrome.storage : void 0) != null ? null : _global.localStorage;\n});\n\n// Map DOMErrors and DOMExceptions to corresponding Dexie errors. May change in Dexie v2.0.\nPromise.rejectionMapper = mapError;\n\n// Fool IDE to improve autocomplete. Tested with Visual Studio 2013 and 2015.\ndoFakeAutoComplete(function () {\n Dexie.fakeAutoComplete = fakeAutoComplete = doFakeAutoComplete;\n Dexie.fake = fake = true;\n});"],"names":["asap","Debug.setDebug","Debug.debug","Debug.getErrorWithStack"],"mappings":";;;;;;GAAA;;GAEO,IAAI,KAAK,GAAG,OAAO,QAAQ,KAAK,WAAW;;GAElD,4CAA4C,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;;GAEzD,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE;OACpC,KAAK,GAAG,KAAK;OACb,aAAa,GAAG,MAAM;;;GAGnB,IAAI,aAAa,GAAG,YAAY;OACnC,OAAO,IAAI;IACd;;GAEM,IAAI,qBAAqB,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK;;GAEhD,SAAS,iBAAiB,GAAG;OAChC,YAAY;;OAEZ,IAAI,qBAAqB,EAAE,IAAI;;;;;;WAM3B,iBAAi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