indexeddbshim 13.0.0-pre.1 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/badges/licenses-badge-dev.svg +1 -1
  3. package/dist/indexeddbshim-Key.js +90 -82
  4. package/dist/indexeddbshim-Key.js.map +1 -1
  5. package/dist/indexeddbshim-Key.min.js +2 -2
  6. package/dist/indexeddbshim-Key.min.js.map +1 -1
  7. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +824 -487
  8. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  9. package/dist/indexeddbshim-UnicodeIdentifiers.js +947 -774
  10. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  11. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
  12. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  13. package/dist/indexeddbshim-node.cjs +824 -487
  14. package/dist/indexeddbshim-node.cjs.map +1 -1
  15. package/dist/indexeddbshim-noninvasive.js +947 -774
  16. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  17. package/dist/indexeddbshim-noninvasive.min.js +2 -2
  18. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  19. package/dist/indexeddbshim.js +947 -774
  20. package/dist/indexeddbshim.js.map +1 -1
  21. package/dist/indexeddbshim.min.js +2 -2
  22. package/dist/indexeddbshim.min.js.map +1 -1
  23. package/index.html +1 -1
  24. package/package.json +35 -34
  25. package/src/DOMException.js +3 -4
  26. package/src/DOMStringList.js +1 -1
  27. package/src/IDBCursor.js +19 -17
  28. package/src/IDBDatabase.js +1 -0
  29. package/src/IDBFactory.js +23 -16
  30. package/src/IDBIndex.js +17 -23
  31. package/src/IDBKeyRange.js +4 -4
  32. package/src/IDBObjectStore.js +29 -26
  33. package/src/IDBTransaction.js +7 -8
  34. package/src/Key.d.ts +1 -0
  35. package/src/Key.js +11 -12
  36. package/src/setGlobalVars.js +3 -1
  37. package/src/util.js +1 -0
@@ -1,374 +1,374 @@
1
- /*! indexeddbshim - v12.0.0-pre.0 - 6/7/2023 */
1
+ /*! indexeddbshim - v13.0.0 - 12/7/2023 */
2
2
 
3
3
  (function (factory) {
4
4
  typeof define === 'function' && define.amd ? define(factory) :
5
5
  factory();
6
6
  })((function () { 'use strict';
7
7
 
8
- function _defineAccessor(type, obj, key, fn) {
9
- var desc = {
8
+ function _defineAccessor(e, r, n, t) {
9
+ var c = {
10
10
  configurable: !0,
11
11
  enumerable: !0
12
12
  };
13
- return desc[type] = fn, Object.defineProperty(obj, key, desc);
14
- }
15
- function _iterableToArrayLimit(arr, i) {
16
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
17
- if (null != _i) {
18
- var _s,
19
- _e,
20
- _x,
21
- _r,
22
- _arr = [],
23
- _n = !0,
24
- _d = !1;
13
+ return c[e] = t, Object.defineProperty(r, n, c);
14
+ }
15
+ function _iterableToArrayLimit(r, l) {
16
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
17
+ if (null != t) {
18
+ var e,
19
+ n,
20
+ i,
21
+ u,
22
+ a = [],
23
+ f = !0,
24
+ o = !1;
25
25
  try {
26
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
27
- if (Object(_i) !== _i) return;
28
- _n = !1;
29
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
30
- } catch (err) {
31
- _d = !0, _e = err;
26
+ if (i = (t = t.call(r)).next, 0 === l) {
27
+ if (Object(t) !== t) return;
28
+ f = !1;
29
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
30
+ } catch (r) {
31
+ o = !0, n = r;
32
32
  } finally {
33
33
  try {
34
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
34
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
35
35
  } finally {
36
- if (_d) throw _e;
36
+ if (o) throw n;
37
37
  }
38
38
  }
39
- return _arr;
39
+ return a;
40
40
  }
41
41
  }
42
- function ownKeys$1(object, enumerableOnly) {
43
- var keys = Object.keys(object);
42
+ function ownKeys$1(e, r) {
43
+ var t = Object.keys(e);
44
44
  if (Object.getOwnPropertySymbols) {
45
- var symbols = Object.getOwnPropertySymbols(object);
46
- enumerableOnly && (symbols = symbols.filter(function (sym) {
47
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
48
- })), keys.push.apply(keys, symbols);
49
- }
50
- return keys;
51
- }
52
- function _objectSpread2$1(target) {
53
- for (var i = 1; i < arguments.length; i++) {
54
- var source = null != arguments[i] ? arguments[i] : {};
55
- i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
56
- _defineProperty$1(target, key, source[key]);
57
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
58
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
45
+ var o = Object.getOwnPropertySymbols(e);
46
+ r && (o = o.filter(function (r) {
47
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
48
+ })), t.push.apply(t, o);
49
+ }
50
+ return t;
51
+ }
52
+ function _objectSpread2$1(e) {
53
+ for (var r = 1; r < arguments.length; r++) {
54
+ var t = null != arguments[r] ? arguments[r] : {};
55
+ r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
56
+ _defineProperty$1(e, r, t[r]);
57
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
58
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
59
59
  });
60
60
  }
61
- return target;
61
+ return e;
62
62
  }
63
63
  function _regeneratorRuntime() {
64
64
  _regeneratorRuntime = function () {
65
- return exports;
65
+ return e;
66
66
  };
67
- var exports = {},
68
- Op = Object.prototype,
69
- hasOwn = Op.hasOwnProperty,
70
- defineProperty = Object.defineProperty || function (obj, key, desc) {
71
- obj[key] = desc.value;
67
+ var t,
68
+ e = {},
69
+ r = Object.prototype,
70
+ n = r.hasOwnProperty,
71
+ o = Object.defineProperty || function (t, e, r) {
72
+ t[e] = r.value;
72
73
  },
73
- $Symbol = "function" == typeof Symbol ? Symbol : {},
74
- iteratorSymbol = $Symbol.iterator || "@@iterator",
75
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
76
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
77
- function define(obj, key, value) {
78
- return Object.defineProperty(obj, key, {
79
- value: value,
74
+ i = "function" == typeof Symbol ? Symbol : {},
75
+ a = i.iterator || "@@iterator",
76
+ c = i.asyncIterator || "@@asyncIterator",
77
+ u = i.toStringTag || "@@toStringTag";
78
+ function define(t, e, r) {
79
+ return Object.defineProperty(t, e, {
80
+ value: r,
80
81
  enumerable: !0,
81
82
  configurable: !0,
82
83
  writable: !0
83
- }), obj[key];
84
+ }), t[e];
84
85
  }
85
86
  try {
86
87
  define({}, "");
87
- } catch (err) {
88
- define = function (obj, key, value) {
89
- return obj[key] = value;
88
+ } catch (t) {
89
+ define = function (t, e, r) {
90
+ return t[e] = r;
90
91
  };
91
92
  }
92
- function wrap(innerFn, outerFn, self, tryLocsList) {
93
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
94
- generator = Object.create(protoGenerator.prototype),
95
- context = new Context(tryLocsList || []);
96
- return defineProperty(generator, "_invoke", {
97
- value: makeInvokeMethod(innerFn, self, context)
98
- }), generator;
93
+ function wrap(t, e, r, n) {
94
+ var i = e && e.prototype instanceof Generator ? e : Generator,
95
+ a = Object.create(i.prototype),
96
+ c = new Context(n || []);
97
+ return o(a, "_invoke", {
98
+ value: makeInvokeMethod(t, r, c)
99
+ }), a;
99
100
  }
100
- function tryCatch(fn, obj, arg) {
101
+ function tryCatch(t, e, r) {
101
102
  try {
102
103
  return {
103
104
  type: "normal",
104
- arg: fn.call(obj, arg)
105
+ arg: t.call(e, r)
105
106
  };
106
- } catch (err) {
107
+ } catch (t) {
107
108
  return {
108
109
  type: "throw",
109
- arg: err
110
+ arg: t
110
111
  };
111
112
  }
112
113
  }
113
- exports.wrap = wrap;
114
- var ContinueSentinel = {};
114
+ e.wrap = wrap;
115
+ var h = "suspendedStart",
116
+ l = "suspendedYield",
117
+ f = "executing",
118
+ s = "completed",
119
+ y = {};
115
120
  function Generator() {}
116
121
  function GeneratorFunction() {}
117
122
  function GeneratorFunctionPrototype() {}
118
- var IteratorPrototype = {};
119
- define(IteratorPrototype, iteratorSymbol, function () {
123
+ var p = {};
124
+ define(p, a, function () {
120
125
  return this;
121
126
  });
122
- var getProto = Object.getPrototypeOf,
123
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
124
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
125
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
126
- function defineIteratorMethods(prototype) {
127
- ["next", "throw", "return"].forEach(function (method) {
128
- define(prototype, method, function (arg) {
129
- return this._invoke(method, arg);
127
+ var d = Object.getPrototypeOf,
128
+ v = d && d(d(values([])));
129
+ v && v !== r && n.call(v, a) && (p = v);
130
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
131
+ function defineIteratorMethods(t) {
132
+ ["next", "throw", "return"].forEach(function (e) {
133
+ define(t, e, function (t) {
134
+ return this._invoke(e, t);
130
135
  });
131
136
  });
132
137
  }
133
- function AsyncIterator(generator, PromiseImpl) {
134
- function invoke(method, arg, resolve, reject) {
135
- var record = tryCatch(generator[method], generator, arg);
136
- if ("throw" !== record.type) {
137
- var result = record.arg,
138
- value = result.value;
139
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
140
- invoke("next", value, resolve, reject);
141
- }, function (err) {
142
- invoke("throw", err, resolve, reject);
143
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
144
- result.value = unwrapped, resolve(result);
145
- }, function (error) {
146
- return invoke("throw", error, resolve, reject);
138
+ function AsyncIterator(t, e) {
139
+ function invoke(r, o, i, a) {
140
+ var c = tryCatch(t[r], t, o);
141
+ if ("throw" !== c.type) {
142
+ var u = c.arg,
143
+ h = u.value;
144
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
145
+ invoke("next", t, i, a);
146
+ }, function (t) {
147
+ invoke("throw", t, i, a);
148
+ }) : e.resolve(h).then(function (t) {
149
+ u.value = t, i(u);
150
+ }, function (t) {
151
+ return invoke("throw", t, i, a);
147
152
  });
148
153
  }
149
- reject(record.arg);
154
+ a(c.arg);
150
155
  }
151
- var previousPromise;
152
- defineProperty(this, "_invoke", {
153
- value: function (method, arg) {
156
+ var r;
157
+ o(this, "_invoke", {
158
+ value: function (t, n) {
154
159
  function callInvokeWithMethodAndArg() {
155
- return new PromiseImpl(function (resolve, reject) {
156
- invoke(method, arg, resolve, reject);
160
+ return new e(function (e, r) {
161
+ invoke(t, n, e, r);
157
162
  });
158
163
  }
159
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
164
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
160
165
  }
161
166
  });
162
167
  }
163
- function makeInvokeMethod(innerFn, self, context) {
164
- var state = "suspendedStart";
165
- return function (method, arg) {
166
- if ("executing" === state) throw new Error("Generator is already running");
167
- if ("completed" === state) {
168
- if ("throw" === method) throw arg;
169
- return doneResult();
170
- }
171
- for (context.method = method, context.arg = arg;;) {
172
- var delegate = context.delegate;
173
- if (delegate) {
174
- var delegateResult = maybeInvokeDelegate(delegate, context);
175
- if (delegateResult) {
176
- if (delegateResult === ContinueSentinel) continue;
177
- return delegateResult;
168
+ function makeInvokeMethod(e, r, n) {
169
+ var o = h;
170
+ return function (i, a) {
171
+ if (o === f) throw new Error("Generator is already running");
172
+ if (o === s) {
173
+ if ("throw" === i) throw a;
174
+ return {
175
+ value: t,
176
+ done: !0
177
+ };
178
+ }
179
+ for (n.method = i, n.arg = a;;) {
180
+ var c = n.delegate;
181
+ if (c) {
182
+ var u = maybeInvokeDelegate(c, n);
183
+ if (u) {
184
+ if (u === y) continue;
185
+ return u;
178
186
  }
179
187
  }
180
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
181
- if ("suspendedStart" === state) throw state = "completed", context.arg;
182
- context.dispatchException(context.arg);
183
- } else "return" === context.method && context.abrupt("return", context.arg);
184
- state = "executing";
185
- var record = tryCatch(innerFn, self, context);
186
- if ("normal" === record.type) {
187
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
188
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
189
+ if (o === h) throw o = s, n.arg;
190
+ n.dispatchException(n.arg);
191
+ } else "return" === n.method && n.abrupt("return", n.arg);
192
+ o = f;
193
+ var p = tryCatch(e, r, n);
194
+ if ("normal" === p.type) {
195
+ if (o = n.done ? s : l, p.arg === y) continue;
188
196
  return {
189
- value: record.arg,
190
- done: context.done
197
+ value: p.arg,
198
+ done: n.done
191
199
  };
192
200
  }
193
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
201
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
194
202
  }
195
203
  };
196
204
  }
197
- function maybeInvokeDelegate(delegate, context) {
198
- var methodName = context.method,
199
- method = delegate.iterator[methodName];
200
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
201
- var record = tryCatch(method, delegate.iterator, context.arg);
202
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
203
- var info = record.arg;
204
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
205
- }
206
- function pushTryEntry(locs) {
207
- var entry = {
208
- tryLoc: locs[0]
205
+ function maybeInvokeDelegate(e, r) {
206
+ var n = r.method,
207
+ o = e.iterator[n];
208
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
209
+ var i = tryCatch(o, e.iterator, r.arg);
210
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
211
+ var a = i.arg;
212
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
213
+ }
214
+ function pushTryEntry(t) {
215
+ var e = {
216
+ tryLoc: t[0]
209
217
  };
210
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
218
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
211
219
  }
212
- function resetTryEntry(entry) {
213
- var record = entry.completion || {};
214
- record.type = "normal", delete record.arg, entry.completion = record;
220
+ function resetTryEntry(t) {
221
+ var e = t.completion || {};
222
+ e.type = "normal", delete e.arg, t.completion = e;
215
223
  }
216
- function Context(tryLocsList) {
224
+ function Context(t) {
217
225
  this.tryEntries = [{
218
226
  tryLoc: "root"
219
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
220
- }
221
- function values(iterable) {
222
- if (iterable) {
223
- var iteratorMethod = iterable[iteratorSymbol];
224
- if (iteratorMethod) return iteratorMethod.call(iterable);
225
- if ("function" == typeof iterable.next) return iterable;
226
- if (!isNaN(iterable.length)) {
227
- var i = -1,
228
- next = function next() {
229
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
230
- return next.value = undefined, next.done = !0, next;
227
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
228
+ }
229
+ function values(e) {
230
+ if (e || "" === e) {
231
+ var r = e[a];
232
+ if (r) return r.call(e);
233
+ if ("function" == typeof e.next) return e;
234
+ if (!isNaN(e.length)) {
235
+ var o = -1,
236
+ i = function next() {
237
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
238
+ return next.value = t, next.done = !0, next;
231
239
  };
232
- return next.next = next;
240
+ return i.next = i;
233
241
  }
234
242
  }
235
- return {
236
- next: doneResult
237
- };
238
- }
239
- function doneResult() {
240
- return {
241
- value: undefined,
242
- done: !0
243
- };
243
+ throw new TypeError(typeof e + " is not iterable");
244
244
  }
245
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
245
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
246
246
  value: GeneratorFunctionPrototype,
247
247
  configurable: !0
248
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
248
+ }), o(GeneratorFunctionPrototype, "constructor", {
249
249
  value: GeneratorFunction,
250
250
  configurable: !0
251
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
252
- var ctor = "function" == typeof genFun && genFun.constructor;
253
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
254
- }, exports.mark = function (genFun) {
255
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
256
- }, exports.awrap = function (arg) {
251
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
252
+ var e = "function" == typeof t && t.constructor;
253
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
254
+ }, e.mark = function (t) {
255
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
256
+ }, e.awrap = function (t) {
257
257
  return {
258
- __await: arg
258
+ __await: t
259
259
  };
260
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
260
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
261
261
  return this;
262
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
263
- void 0 === PromiseImpl && (PromiseImpl = Promise);
264
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
265
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
266
- return result.done ? result.value : iter.next();
262
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
263
+ void 0 === i && (i = Promise);
264
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
265
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
266
+ return t.done ? t.value : a.next();
267
267
  });
268
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
268
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
269
269
  return this;
270
- }), define(Gp, "toString", function () {
270
+ }), define(g, "toString", function () {
271
271
  return "[object Generator]";
272
- }), exports.keys = function (val) {
273
- var object = Object(val),
274
- keys = [];
275
- for (var key in object) keys.push(key);
276
- return keys.reverse(), function next() {
277
- for (; keys.length;) {
278
- var key = keys.pop();
279
- if (key in object) return next.value = key, next.done = !1, next;
272
+ }), e.keys = function (t) {
273
+ var e = Object(t),
274
+ r = [];
275
+ for (var n in e) r.push(n);
276
+ return r.reverse(), function next() {
277
+ for (; r.length;) {
278
+ var t = r.pop();
279
+ if (t in e) return next.value = t, next.done = !1, next;
280
280
  }
281
281
  return next.done = !0, next;
282
282
  };
283
- }, exports.values = values, Context.prototype = {
283
+ }, e.values = values, Context.prototype = {
284
284
  constructor: Context,
285
- reset: function (skipTempReset) {
286
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
285
+ reset: function (e) {
286
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
287
287
  },
288
288
  stop: function () {
289
289
  this.done = !0;
290
- var rootRecord = this.tryEntries[0].completion;
291
- if ("throw" === rootRecord.type) throw rootRecord.arg;
290
+ var t = this.tryEntries[0].completion;
291
+ if ("throw" === t.type) throw t.arg;
292
292
  return this.rval;
293
293
  },
294
- dispatchException: function (exception) {
295
- if (this.done) throw exception;
296
- var context = this;
297
- function handle(loc, caught) {
298
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
299
- }
300
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
301
- var entry = this.tryEntries[i],
302
- record = entry.completion;
303
- if ("root" === entry.tryLoc) return handle("end");
304
- if (entry.tryLoc <= this.prev) {
305
- var hasCatch = hasOwn.call(entry, "catchLoc"),
306
- hasFinally = hasOwn.call(entry, "finallyLoc");
307
- if (hasCatch && hasFinally) {
308
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
309
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
310
- } else if (hasCatch) {
311
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
294
+ dispatchException: function (e) {
295
+ if (this.done) throw e;
296
+ var r = this;
297
+ function handle(n, o) {
298
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
299
+ }
300
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
301
+ var i = this.tryEntries[o],
302
+ a = i.completion;
303
+ if ("root" === i.tryLoc) return handle("end");
304
+ if (i.tryLoc <= this.prev) {
305
+ var c = n.call(i, "catchLoc"),
306
+ u = n.call(i, "finallyLoc");
307
+ if (c && u) {
308
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
309
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
310
+ } else if (c) {
311
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
312
312
  } else {
313
- if (!hasFinally) throw new Error("try statement without catch or finally");
314
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
313
+ if (!u) throw new Error("try statement without catch or finally");
314
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
315
315
  }
316
316
  }
317
317
  }
318
318
  },
319
- abrupt: function (type, arg) {
320
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
321
- var entry = this.tryEntries[i];
322
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
323
- var finallyEntry = entry;
319
+ abrupt: function (t, e) {
320
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
321
+ var o = this.tryEntries[r];
322
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
323
+ var i = o;
324
324
  break;
325
325
  }
326
326
  }
327
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
328
- var record = finallyEntry ? finallyEntry.completion : {};
329
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
327
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
328
+ var a = i ? i.completion : {};
329
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
330
330
  },
331
- complete: function (record, afterLoc) {
332
- if ("throw" === record.type) throw record.arg;
333
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
331
+ complete: function (t, e) {
332
+ if ("throw" === t.type) throw t.arg;
333
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
334
334
  },
335
- finish: function (finallyLoc) {
336
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
337
- var entry = this.tryEntries[i];
338
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
335
+ finish: function (t) {
336
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
337
+ var r = this.tryEntries[e];
338
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
339
339
  }
340
340
  },
341
- catch: function (tryLoc) {
342
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
343
- var entry = this.tryEntries[i];
344
- if (entry.tryLoc === tryLoc) {
345
- var record = entry.completion;
346
- if ("throw" === record.type) {
347
- var thrown = record.arg;
348
- resetTryEntry(entry);
341
+ catch: function (t) {
342
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
343
+ var r = this.tryEntries[e];
344
+ if (r.tryLoc === t) {
345
+ var n = r.completion;
346
+ if ("throw" === n.type) {
347
+ var o = n.arg;
348
+ resetTryEntry(r);
349
349
  }
350
- return thrown;
350
+ return o;
351
351
  }
352
352
  }
353
353
  throw new Error("illegal catch attempt");
354
354
  },
355
- delegateYield: function (iterable, resultName, nextLoc) {
355
+ delegateYield: function (e, r, n) {
356
356
  return this.delegate = {
357
- iterator: values(iterable),
358
- resultName: resultName,
359
- nextLoc: nextLoc
360
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
357
+ iterator: values(e),
358
+ resultName: r,
359
+ nextLoc: n
360
+ }, "next" === this.method && (this.arg = t), y;
361
361
  }
362
- }, exports;
362
+ }, e;
363
363
  }
364
- function _typeof$2(obj) {
364
+ function _typeof$2(o) {
365
365
  "@babel/helpers - typeof";
366
366
 
367
- return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
368
- return typeof obj;
369
- } : function (obj) {
370
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
371
- }, _typeof$2(obj);
367
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
368
+ return typeof o;
369
+ } : function (o) {
370
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
371
+ }, _typeof$2(o);
372
372
  }
373
373
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
374
374
  try {
@@ -713,10 +713,9 @@
713
713
  pr;
714
714
  Object.defineProperty(_this, prop, {
715
715
  get: function get() {
716
- return (/* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
717
- // Defaults
718
- prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null
719
- );
716
+ return /* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
717
+ // Defaults
718
+ prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null;
720
719
  }
721
720
  });
722
721
  });
@@ -1211,7 +1210,6 @@
1211
1210
  }
1212
1211
  });
1213
1212
  }
1214
-
1215
1213
  var _eventCopy = eventCopy,
1216
1214
  type = _eventCopy.type;
1217
1215
 
@@ -1965,12 +1963,11 @@
1965
1963
  */
1966
1964
  function defineOuterInterface(obj, props) {
1967
1965
  props.forEach(function (prop) {
1968
- var _o;
1969
- var o = (_o = {}, _defineAccessor("get", _o, prop, function () {
1966
+ var o = _defineAccessor("set", _defineAccessor("get", {}, prop, function () {
1970
1967
  throw new TypeError('Illegal invocation');
1971
- }), _defineAccessor("set", _o, prop, function (val) {
1968
+ }), prop, function (val) {
1972
1969
  throw new TypeError('Illegal invocation');
1973
- }), _o);
1970
+ });
1974
1971
  var desc = /** @type {PropertyDescriptor} */
1975
1972
  Object.getOwnPropertyDescriptor(o, prop);
1976
1973
  Object.defineProperty(obj, prop, desc);
@@ -2005,12 +2002,11 @@
2005
2002
  function defineListenerProperties(obj, listeners) {
2006
2003
  listeners = typeof listeners === 'string' ? [listeners] : listeners;
2007
2004
  listeners.forEach(function (listener) {
2008
- var _o3;
2009
- var o = (_o3 = {}, _defineAccessor("get", _o3, listener, function () {
2005
+ var o = _defineAccessor("set", _defineAccessor("get", {}, listener, function () {
2010
2006
  return obj['__' + listener];
2011
- }), _defineAccessor("set", _o3, listener, function (val) {
2007
+ }), listener, function (val) {
2012
2008
  obj['__' + listener] = val;
2013
- }), _o3);
2009
+ });
2014
2010
  var desc = /** @type {PropertyDescriptor} */
2015
2011
  Object.getOwnPropertyDescriptor(o, listener);
2016
2012
  // desc.enumerable = true; // Default
@@ -2393,7 +2389,7 @@
2393
2389
  function DOMException(message, name) {
2394
2390
  // const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
2395
2391
  this[Symbol.toStringTag] = 'DOMException';
2396
- this._code = name in codes ? codes[/** @type {Code} */name] : legacyCodes[/** @type {LegacyCode} */name] || 0;
2392
+ this._code = name in codes ? codes[( /** @type {Code} */name)] : legacyCodes[( /** @type {LegacyCode} */name)] || 0;
2397
2393
  this._name = name || 'Error';
2398
2394
  // We avoid `String()` in this next line as it converts Symbols
2399
2395
  this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion
@@ -2530,10 +2526,12 @@
2530
2526
  */
2531
2527
  function logError(name, message, error) {
2532
2528
  if (CFG.DEBUG) {
2533
- var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : /** @type {string} */error;
2529
+ var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : ( /** @type {string} */error);
2534
2530
  var method = typeof console.error === 'function' ? 'error' : 'log';
2535
2531
  console[method](name + ': ' + message + '. ' + (msg || ''));
2536
- console.trace && console.trace();
2532
+ if (console.trace) {
2533
+ console.trace();
2534
+ }
2537
2535
  }
2538
2536
  }
2539
2537
 
@@ -2641,7 +2639,7 @@
2641
2639
  }
2642
2640
  } catch (e) {}
2643
2641
  var createDOMException = useNativeDOMException
2644
- // eslint-disable-next-line operator-linebreak -- Need JSDoc
2642
+ // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2645
2643
  ?
2646
2644
  /**
2647
2645
  * @param {string} name
@@ -2653,7 +2651,7 @@
2653
2651
  logError(name, message, error);
2654
2652
  return createNativeDOMException(name, message);
2655
2653
  }
2656
- // eslint-disable-next-line operator-linebreak -- Need JSDoc
2654
+ // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
2657
2655
  :
2658
2656
  /**
2659
2657
  * @param {string} name
@@ -2713,7 +2711,6 @@
2713
2711
  this.__setOptions({
2714
2712
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
2715
2713
  });
2716
-
2717
2714
  doneFlagGetters.forEach(function (prop) {
2718
2715
  Object.defineProperty(_this, '__' + prop, {
2719
2716
  enumerable: false,
@@ -3242,17 +3239,15 @@
3242
3239
  var types = {
3243
3240
  invalid: {
3244
3241
  /**
3245
- * @param {AnyValue} _key
3246
3242
  * @returns {string}
3247
3243
  */
3248
- encode: function encode(_key) {
3244
+ encode: function encode() {
3249
3245
  return keyTypeToEncodedChar.invalid + '-';
3250
3246
  },
3251
3247
  /**
3252
- * @param {string} _key
3253
3248
  * @returns {undefined}
3254
3249
  */
3255
- decode: function decode(_key) {
3250
+ decode: function decode() {
3256
3251
  return undefined;
3257
3252
  }
3258
3253
  },
@@ -3590,11 +3585,17 @@
3590
3585
  * @returns {KeyType|"invalid"}
3591
3586
  */
3592
3587
  function getKeyType(key) {
3593
- if (Array.isArray(key)) return 'array';
3594
- if (isDate(key)) return 'date';
3595
- if (isBinary(key)) return 'binary';
3588
+ if (Array.isArray(key)) {
3589
+ return 'array';
3590
+ }
3591
+ if (isDate(key)) {
3592
+ return 'date';
3593
+ }
3594
+ if (isBinary(key)) {
3595
+ return 'binary';
3596
+ }
3596
3597
  var keyType = _typeof$2(key);
3597
- return ['string', 'number'].includes(keyType) ? /** @type {"string"|"number"} */keyType : 'invalid';
3598
+ return ['string', 'number'].includes(keyType) ? ( /** @type {"string"|"number"} */keyType) : 'invalid';
3598
3599
  }
3599
3600
 
3600
3601
  /**
@@ -3691,13 +3692,11 @@
3691
3692
  value: 0
3692
3693
  };
3693
3694
  }
3694
- return (/** @type {{type: KeyType; value: Value}} */ret
3695
- );
3695
+ return /** @type {{type: KeyType; value: Value}} */ret;
3696
3696
  }
3697
3697
  case 'string':
3698
3698
  {
3699
- return (/** @type {{type: KeyType; value: Value}} */ret
3700
- );
3699
+ return /** @type {{type: KeyType; value: Value}} */ret;
3701
3700
  }
3702
3701
  case 'binary':
3703
3702
  {
@@ -3720,48 +3719,49 @@
3720
3719
  /** @type {(KeyValueObject|Value)[]} */
3721
3720
  var keys = [];
3722
3721
  var _loop = function _loop() {
3723
- // We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
3724
- if (!multiEntry && !Object.hasOwn(arr, i)) {
3725
- return {
3726
- v: {
3727
- type: type,
3728
- invalid: true,
3729
- message: 'Does not have own index property'
3730
- }
3731
- };
3732
- }
3733
- try {
3734
- var entry = arr[i];
3735
- var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
3736
- if (key.invalid) {
3737
- if (multiEntry) {
3738
- return "continue";
3739
- }
3722
+ // We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
3723
+ if (!multiEntry && !Object.hasOwn(arr, i)) {
3740
3724
  return {
3741
3725
  v: {
3742
3726
  type: type,
3743
3727
  invalid: true,
3744
- message: 'Bad array entry value-to-key conversion'
3728
+ message: 'Does not have own index property'
3745
3729
  }
3746
3730
  };
3747
3731
  }
3748
- if (!multiEntry || !fullKeys && keys.every(function (k) {
3749
- return cmp(k, key.value) !== 0;
3750
- }) || fullKeys && keys.every(function (k) {
3751
- return cmp(k, key) !== 0;
3752
- })) {
3753
- keys.push(fullKeys ? key : key.value);
3754
- }
3755
- } catch (err) {
3756
- if (!multiEntry) {
3757
- throw err;
3732
+ try {
3733
+ var entry = arr[i];
3734
+ var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
3735
+ if (key.invalid) {
3736
+ if (multiEntry) {
3737
+ return 0; // continue
3738
+ }
3739
+ return {
3740
+ v: {
3741
+ type: type,
3742
+ invalid: true,
3743
+ message: 'Bad array entry value-to-key conversion'
3744
+ }
3745
+ };
3746
+ }
3747
+ if (!multiEntry || !fullKeys && keys.every(function (k) {
3748
+ return cmp(k, key.value) !== 0;
3749
+ }) || fullKeys && keys.every(function (k) {
3750
+ return cmp(k, key) !== 0;
3751
+ })) {
3752
+ keys.push(fullKeys ? key : key.value);
3753
+ }
3754
+ } catch (err) {
3755
+ if (!multiEntry) {
3756
+ throw err;
3757
+ }
3758
3758
  }
3759
- }
3760
- };
3759
+ },
3760
+ _ret;
3761
3761
  for (var i = 0; i < len; i++) {
3762
- var _ret = _loop();
3763
- if (_ret === "continue") continue;
3764
- if (_typeof$2(_ret) === "object") return _ret.v;
3762
+ _ret = _loop();
3763
+ if (_ret === 0) continue;
3764
+ if (_ret) return _ret.v;
3765
3765
  }
3766
3766
  return {
3767
3767
  type: type,
@@ -3923,7 +3923,7 @@
3923
3923
  };
3924
3924
  }
3925
3925
  var identifiers = keyPath.split('.');
3926
- return identifiers.some(function (idntfr, i) {
3926
+ return identifiers.some(function (idntfr) {
3927
3927
  if (idntfr === 'length' && (typeof value === 'string' || Array.isArray(value))) {
3928
3928
  value = value.length;
3929
3929
  } else if (isBlob(value)) {
@@ -3974,7 +3974,7 @@
3974
3974
  }
3975
3975
  value = value[identifier];
3976
3976
  });
3977
- value[/** @type {string} */last] = key; // key is already a `keyValue` in our processing so no need to convert
3977
+ value[( /** @type {string} */last)] = key; // key is already a `keyValue` in our processing so no need to convert
3978
3978
  }
3979
3979
 
3980
3980
  /**
@@ -4146,6 +4146,7 @@
4146
4146
  return null;
4147
4147
  }
4148
4148
  // array, date, number, string, binary (should already have detected "invalid")
4149
+ // @ts-expect-error Argument may be ignored
4149
4150
  return types[getKeyType(key)].encode(key, inArray);
4150
4151
  }
4151
4152
 
@@ -4207,7 +4208,7 @@
4207
4208
  }
4208
4209
  }, function (tx, error) {
4209
4210
  sqlFailCb(createDOMException('DataError', 'Could not get the auto increment value for key', error));
4210
- return true;
4211
+ return false;
4211
4212
  });
4212
4213
  }
4213
4214
 
@@ -4223,12 +4224,14 @@
4223
4224
  function assignCurrentNumber(tx, store, num, successCb, failCb) {
4224
4225
  var sql = 'UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?';
4225
4226
  var sqlValues = [num, escapeSQLiteStatement(store.__currentName)];
4226
- CFG.DEBUG && console.log(sql, sqlValues);
4227
- tx.executeSql(sql, sqlValues, function (tx, data) {
4227
+ if (CFG.DEBUG) {
4228
+ console.log(sql, sqlValues);
4229
+ }
4230
+ tx.executeSql(sql, sqlValues, function () {
4228
4231
  successCb(num);
4229
4232
  }, function (tx, err) {
4230
4233
  failCb(createDOMException('UnknownError', 'Could not set the auto increment value for key', err));
4231
- return true;
4234
+ return false;
4232
4235
  });
4233
4236
  }
4234
4237
 
@@ -4395,7 +4398,7 @@
4395
4398
  convertValueToKeyRethrowingAndIfInvalid(upper);
4396
4399
  }
4397
4400
  if (lower !== undefined && upper !== undefined && lower !== upper) {
4398
- if ( /** @type {string} */_encode(lower) > /** @type {string} */_encode(upper)) {
4401
+ if ( /** @type {string} */_encode(lower) > ( /** @type {string} */_encode(upper))) {
4399
4402
  throw createDOMException('DataError', '`lower` must not be greater than `upper` argument in `bound()` call.');
4400
4403
  }
4401
4404
  }
@@ -4442,7 +4445,7 @@
4442
4445
  * @param {import('./Key.js').Value} value
4443
4446
  * @returns {globalThis.IDBKeyRange}
4444
4447
  */
4445
- IDBKeyRange.lowerBound = function (value /*, open */) {
4448
+ IDBKeyRange.lowerBound = function (value /* , open */) {
4446
4449
  if (!arguments.length) {
4447
4450
  throw new TypeError('IDBKeyRange.lowerBound requires a value argument');
4448
4451
  }
@@ -4454,7 +4457,7 @@
4454
4457
  * @param {import('./Key.js').Value} value
4455
4458
  * @returns {globalThis.IDBKeyRange}
4456
4459
  */
4457
- IDBKeyRange.upperBound = function (value /*, open */) {
4460
+ IDBKeyRange.upperBound = function (value /* , open */) {
4458
4461
  if (!arguments.length) {
4459
4462
  throw new TypeError('IDBKeyRange.upperBound requires a value argument');
4460
4463
  }
@@ -4520,7 +4523,9 @@
4520
4523
  */
4521
4524
  function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, checkCached) {
4522
4525
  if (range && (range.lower !== undefined || range.upper !== undefined)) {
4523
- if (addAnd) sql.push('AND');
4526
+ if (addAnd) {
4527
+ sql.push('AND');
4528
+ }
4524
4529
  var encodedLowerKey, encodedUpperKey;
4525
4530
  var hasLower = range.lower !== undefined;
4526
4531
  var hasUpper = range.upper !== undefined;
@@ -4538,7 +4543,9 @@
4538
4543
  }
4539
4544
  sql.push(quotedKeyColumnName, range.lowerOpen ? '>' : '>=', '?');
4540
4545
  }
4541
- hasLower && hasUpper && sql.push('AND');
4546
+ if (hasLower && hasUpper) {
4547
+ sql.push('AND');
4548
+ }
4542
4549
  if (hasUpper) {
4543
4550
  sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
4544
4551
  sqlValues.push(escapeSQLiteStatement( /** @type {string} */encodedUpperKey));
@@ -4566,12 +4573,10 @@
4566
4573
  }
4567
4574
  return undefined; // Represents unbounded
4568
4575
  }
4569
-
4570
4576
  convertValueToKeyRethrowingAndIfInvalid(value);
4571
4577
  return IDBKeyRange.only(value);
4572
4578
  }
4573
4579
 
4574
- var _DOMStringList$protot;
4575
4580
  /**
4576
4581
  * @typedef {number} Integer
4577
4582
  */
@@ -4624,7 +4629,7 @@
4624
4629
  };
4625
4630
 
4626
4631
  // @ts-expect-error It's ok
4627
- DOMStringList.prototype = (_DOMStringList$protot = {
4632
+ DOMStringList.prototype = _defineProperty$1(_defineProperty$1({
4628
4633
  constructor: DOMStringList,
4629
4634
  // Interface.
4630
4635
  /**
@@ -4735,7 +4740,7 @@
4735
4740
  }
4736
4741
  this.sortList();
4737
4742
  }
4738
- }, _defineProperty$1(_DOMStringList$protot, Symbol.toStringTag, 'DOMStringListPrototype'), _defineProperty$1(_DOMStringList$protot, Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
4743
+ }, Symbol.toStringTag, 'DOMStringListPrototype'), Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
4739
4744
  var i;
4740
4745
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4741
4746
  while (1) switch (_context.prev = _context.next) {
@@ -4756,7 +4761,7 @@
4756
4761
  return _context.stop();
4757
4762
  }
4758
4763
  }, _callee, this);
4759
- })), _DOMStringList$protot);
4764
+ }));
4760
4765
 
4761
4766
  /**
4762
4767
  * @typedef {any} AnyValue
@@ -4795,8 +4800,7 @@
4795
4800
  this._length = 0;
4796
4801
  };
4797
4802
  DOMStringList.prototype = DOMStringListAlias.prototype;
4798
- return (/** @type {DOMStringListFull} */new DOMStringList()
4799
- );
4803
+ return /** @type {DOMStringListFull} */new DOMStringList();
4800
4804
  }
4801
4805
  });
4802
4806
  if (cleanInterface) {
@@ -4943,7 +4947,6 @@
4943
4947
  me.__setOptions({
4944
4948
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
4945
4949
  });
4946
-
4947
4950
  readonlyProperties$3.forEach(function (readonlyProp) {
4948
4951
  Object.defineProperty(_this, readonlyProp, {
4949
4952
  configurable: true
@@ -4965,6 +4968,7 @@
4965
4968
 
4966
4969
  // @ts-expect-error It's ok
4967
4970
  IDBTransaction.prototype = EventTargetFactory.createInstance({
4971
+ // eslint-disable-next-line n/no-sync -- API
4968
4972
  defaultSync: true,
4969
4973
  // Ensure EventTarget preserves our properties
4970
4974
  extraProperties: ['complete']
@@ -4986,7 +4990,9 @@
4986
4990
  IDBTransaction.prototype.__executeRequests = function () {
4987
4991
  var me = this;
4988
4992
  if (me.__running) {
4989
- CFG.DEBUG && console.log('Looks like the request set is already running', me.mode);
4993
+ if (CFG.DEBUG) {
4994
+ console.log('Looks like the request set is already running', me.mode);
4995
+ }
4990
4996
  return;
4991
4997
  }
4992
4998
  me.__running = true;
@@ -5015,7 +5021,6 @@
5015
5021
  if (req) {
5016
5022
  q.req = req; // Need to do this in case of cursors
5017
5023
  }
5018
-
5019
5024
  if (!q.req) {
5020
5025
  // TS guard
5021
5026
  return;
@@ -5179,7 +5184,9 @@
5179
5184
  */
5180
5185
  function complete() {
5181
5186
  me.__completed = true;
5182
- CFG.DEBUG && console.log('Transaction completed');
5187
+ if (CFG.DEBUG) {
5188
+ console.log('Transaction completed');
5189
+ }
5183
5190
  var evt = createEvent('complete');
5184
5191
  try {
5185
5192
  me.__internal = true;
@@ -5404,11 +5411,15 @@
5404
5411
  */
5405
5412
  function abort(tx, errOrResult) {
5406
5413
  if (!tx) {
5407
- CFG.DEBUG && console.log('Rollback not possible due to missing transaction', me);
5414
+ if (CFG.DEBUG) {
5415
+ console.log('Rollback not possible due to missing transaction', me);
5416
+ }
5408
5417
  } else if (errOrResult && 'code' in errOrResult && typeof errOrResult.code === 'number') {
5409
- CFG.DEBUG && console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
5410
- } else {
5411
- CFG.DEBUG && console.log('Rollback succeeded', me);
5418
+ if (CFG.DEBUG) {
5419
+ console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
5420
+ }
5421
+ } else if (CFG.DEBUG) {
5422
+ console.log('Rollback succeeded', me);
5412
5423
  }
5413
5424
  me.dispatchEvent(createEvent('__preabort'));
5414
5425
  me.__requests.filter(function (q, i, arr) {
@@ -5500,7 +5511,9 @@
5500
5511
  if (!(me instanceof IDBTransaction)) {
5501
5512
  throw new TypeError('Illegal invocation');
5502
5513
  }
5503
- CFG.DEBUG && console.log('The transaction was aborted', me);
5514
+ if (CFG.DEBUG) {
5515
+ console.log('The transaction was aborted', me);
5516
+ }
5504
5517
  IDBTransaction.__assertNotFinished(me);
5505
5518
  me.__abortTransaction(null);
5506
5519
  };
@@ -5646,24 +5659,24 @@
5646
5659
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
5647
5660
  if (null != r) {
5648
5661
  var n,
5649
- o,
5650
5662
  a,
5663
+ o,
5651
5664
  i,
5652
5665
  c = [],
5653
5666
  s = !0,
5654
5667
  u = !1;
5655
5668
  try {
5656
- if (a = (r = r.call(e)).next, 0 === t) {
5669
+ if (o = (r = r.call(e)).next, 0 === t) {
5657
5670
  if (Object(r) !== r) return;
5658
5671
  s = !1;
5659
- } else for (; !(s = (n = a.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5672
+ } else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5660
5673
  } catch (e) {
5661
- u = !0, o = e;
5674
+ u = !0, a = e;
5662
5675
  } finally {
5663
5676
  try {
5664
5677
  if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
5665
5678
  } finally {
5666
- if (u) throw o;
5679
+ if (u) throw a;
5667
5680
  }
5668
5681
  }
5669
5682
  return c;
@@ -5706,12 +5719,12 @@
5706
5719
  }
5707
5720
  }), e.prototype.then = function (t, r) {
5708
5721
  var n = this;
5709
- return new e(function (e, o) {
5722
+ return new e(function (e, a) {
5710
5723
  n.p.then(function (r) {
5711
5724
  e(t ? t(r) : r);
5712
5725
  })["catch"](function (e) {
5713
5726
  return r ? r(e) : Promise.reject(e);
5714
- }).then(e, o);
5727
+ }).then(e, a);
5715
5728
  });
5716
5729
  }, e.prototype["catch"] = function (e) {
5717
5730
  return this.then(function () {}, e);
@@ -5752,10 +5765,10 @@
5752
5765
  }
5753
5766
  function hasConstructorOf(e, n) {
5754
5767
  if (!e || "object" !== _typeof(e)) return !1;
5755
- var o = r(e);
5756
- if (!o) return null === n;
5757
- var a = t(o, "constructor") && o.constructor;
5758
- return "function" != typeof a ? null === n : n === a || null !== n && Function.prototype.toString.call(a) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof a.__typeson__type__ && a.__typeson__type__ === n.__typeson__type__;
5768
+ var a = r(e);
5769
+ if (!a) return null === n;
5770
+ var o = t(a, "constructor") && a.constructor;
5771
+ return "function" != typeof o ? null === n : n === o || null !== n && Function.prototype.toString.call(o) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof o.__typeson__type__ && o.__typeson__type__ === n.__typeson__type__;
5759
5772
  }
5760
5773
  function isPlainObject(e) {
5761
5774
  return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
@@ -5769,10 +5782,10 @@
5769
5782
  return null !== e && "object" === _typeof(e);
5770
5783
  }
5771
5784
  function escapeKeyPathComponent(e) {
5772
- return e.replace(/''/g, "''''").replace(/^$/, "''").replace(/~/g, "~0").replace(/\./g, "~1");
5785
+ return e.replaceAll("''", "''''").replace(/^$/, "''").replaceAll("~", "~0").replaceAll(".", "~1");
5773
5786
  }
5774
5787
  function unescapeKeyPathComponent(e) {
5775
- return e.replace(/~1/g, ".").replace(/~0/g, "~").replace(/^''$/, "").replace(/''''/g, "''");
5788
+ return e.replaceAll("~1", ".").replaceAll("~0", "~").replace(/^''$/, "").replaceAll("''''", "''");
5776
5789
  }
5777
5790
  function getByKeyPath(e, t) {
5778
5791
  if ("" === t) return e;
@@ -5797,8 +5810,8 @@
5797
5810
  return r ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
5798
5811
  }
5799
5812
  var n = Object.keys,
5800
- o = Object.hasOwn,
5801
- a = Array.isArray,
5813
+ a = Object.hasOwn,
5814
+ o = Array.isArray,
5802
5815
  i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5803
5816
  function _async(e) {
5804
5817
  return function () {
@@ -5813,9 +5826,9 @@
5813
5826
  function nestedPathsFirst(e, t) {
5814
5827
  var r, n;
5815
5828
  if ("" === e.keypath) return -1;
5816
- var o = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
5817
- a = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
5818
- return o && (o = o.length), a && (a = a.length), o > a ? -1 : o < a ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
5829
+ var a = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
5830
+ o = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
5831
+ return a && (a = a.length), o && (o = o.length), a > o ? -1 : a < o ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
5819
5832
  }
5820
5833
  var c = function () {
5821
5834
  function Typeson(e) {
@@ -5827,8 +5840,8 @@
5827
5840
  n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
5828
5841
  stringification: !0
5829
5842
  });
5830
- var o = this.encapsulate(e, null, n);
5831
- return a(o) ? JSON.stringify(o[0], t, r) : o.then(function (e) {
5843
+ var a = this.encapsulate(e, null, n);
5844
+ return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
5832
5845
  return JSON.stringify(e, t, r);
5833
5846
  });
5834
5847
  }
@@ -5901,7 +5914,7 @@
5901
5914
  d = [],
5902
5915
  v = !("cyclic" in u) || u.cyclic,
5903
5916
  b = u.encapsulateObserver,
5904
- h = function finish(e) {
5917
+ m = function finish(e) {
5905
5918
  var t = Object.values(f);
5906
5919
  if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
5907
5920
  if (t.length) {
@@ -5914,25 +5927,25 @@
5914
5927
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5915
5928
  }();
5916
5929
  }(new Set(t));
5917
- e && isPlainObject(e) && !o(e, "$types") ? e.$types = f : e = {
5930
+ e && isPlainObject(e) && !a(e, "$types") ? e.$types = f : e = {
5918
5931
  $: e,
5919
5932
  $types: {
5920
5933
  $: f
5921
5934
  }
5922
5935
  };
5923
- } else isObject(e) && o(e, "$types") && (e = {
5936
+ } else isObject(e) && a(e, "$types") && (e = {
5924
5937
  $: e,
5925
5938
  $types: !0
5926
5939
  });
5927
5940
  return !u.returnTypeNames && e;
5928
5941
  },
5929
- g = _async(function (t, r) {
5942
+ h = _async(function (t, r) {
5930
5943
  return _await(Promise.all(r.map(function (e) {
5931
5944
  return e[1].p;
5932
5945
  })), function (n) {
5933
5946
  return _await(Promise.all(n.map(_async(function (n) {
5934
- var o = !1,
5935
- a = [],
5947
+ var a = !1,
5948
+ o = [],
5936
5949
  i = _slicedToArray(r.splice(0, 1), 1),
5937
5950
  c = _slicedToArray(i[0], 7),
5938
5951
  s = c[0],
@@ -5941,7 +5954,7 @@
5941
5954
  f = c[4],
5942
5955
  y = c[5],
5943
5956
  p = c[6],
5944
- d = _(s, n, u, l, a, !0, p),
5957
+ d = O(s, n, u, l, o, !0, p),
5945
5958
  v = hasConstructorOf(d, e);
5946
5959
  return function _invoke(e, t) {
5947
5960
  var r = e();
@@ -5949,18 +5962,18 @@
5949
5962
  }(function () {
5950
5963
  if (s && v) return _await(d.p, function (e) {
5951
5964
  f[y] = e;
5952
- var r = g(t, a);
5953
- return o = !0, r;
5965
+ var r = h(t, o);
5966
+ return a = !0, r;
5954
5967
  });
5955
5968
  }, function (e) {
5956
- return o ? e : (s ? f[y] = d : t = v ? d.p : d, g(t, a));
5969
+ return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
5957
5970
  });
5958
5971
  }))), function () {
5959
5972
  return t;
5960
5973
  });
5961
5974
  });
5962
5975
  }),
5963
- m = function _adaptBuiltinStateObjectProperties(e, t, r) {
5976
+ g = function _adaptBuiltinStateObjectProperties(e, t, r) {
5964
5977
  Object.assign(e, t);
5965
5978
  var n = i.map(function (t) {
5966
5979
  var r = e[t];
@@ -5970,14 +5983,14 @@
5970
5983
  e[t] = n[r];
5971
5984
  });
5972
5985
  },
5973
- _ = function _encapsulate(t, r, i, c, l, d, v) {
5974
- var h,
5975
- g = {},
5976
- _ = _typeof(r),
5986
+ O = function _encapsulate(t, r, i, c, l, d, v) {
5987
+ var m,
5988
+ h = {},
5989
+ O = _typeof(r),
5977
5990
  w = b ? function (n) {
5978
- var o,
5979
- a = null !== (o = null != v ? v : c.type) && void 0 !== o ? o : getJSONType(r);
5980
- b(Object.assign(null != n ? n : g, {
5991
+ var a,
5992
+ o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
5993
+ b(Object.assign(null != n ? n : h, {
5981
5994
  keypath: t,
5982
5995
  value: r,
5983
5996
  cyclic: i,
@@ -5986,12 +5999,12 @@
5986
5999
  resolvingTypesonPromise: d,
5987
6000
  awaitingTypesonPromise: hasConstructorOf(r, e)
5988
6001
  }, {
5989
- type: a
6002
+ type: o
5990
6003
  }));
5991
6004
  } : null;
5992
- if (["string", "boolean", "number", "undefined"].includes(_)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (h = c.replaced ? r : O(t, r, c, l, !1, d, w)) !== r && (g = {
5993
- replaced: h
5994
- }) : h = r, w && w(), h;
6005
+ if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (m = c.replaced ? r : _(t, r, c, l, !1, d, w)) !== r && (h = {
6006
+ replaced: m
6007
+ }) : m = r, w && w(), m;
5995
6008
  if (null === r) return w && w(), r;
5996
6009
  if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
5997
6010
  var A = y.indexOf(r);
@@ -6003,25 +6016,25 @@
6003
6016
  var S,
6004
6017
  j,
6005
6018
  T = isPlainObject(r),
6006
- I = a(r),
6007
- N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : O(t, r, c, l, T || I, null, w);
6008
- if (N !== r ? (h = N, g = {
6009
- replaced: N
6010
- }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), h = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), g = {
6019
+ N = o(r),
6020
+ I = (T || N) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : _(t, r, c, l, T || N, null, w);
6021
+ if (I !== r ? (m = I, h = {
6022
+ replaced: I
6023
+ }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), m = r) : N && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
6011
6024
  clone: S
6012
- }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? h = r : (S = {}, c.addLength && (S.length = r.length), g = {
6025
+ }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? m = r : (S = {}, c.addLength && (S.length = r.length), h = {
6013
6026
  clone: S
6014
- }), w && w(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : h;
6015
- if (!S) return h;
6027
+ }), w && w(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
6028
+ if (!S) return m;
6016
6029
  if (c.iterateIn) {
6017
6030
  var P = function _loop(n) {
6018
- var a = {
6019
- ownKeys: o(r, n)
6031
+ var o = {
6032
+ ownKeys: a(r, n)
6020
6033
  };
6021
- m(c, a, function () {
6022
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n),
6023
- a = _encapsulate(o, r[n], Boolean(i), c, l, d);
6024
- hasConstructorOf(a, e) ? l.push([o, a, Boolean(i), c, S, n, c.type]) : void 0 !== a && (S[n] = a);
6034
+ g(c, o, function () {
6035
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
6036
+ o = _encapsulate(a, r[n], Boolean(i), c, l, d);
6037
+ hasConstructorOf(o, e) ? l.push([a, o, Boolean(i), c, S, n, c.type]) : void 0 !== o && (S[n] = o);
6025
6038
  });
6026
6039
  };
6027
6040
  for (var E in r) P(E);
@@ -6030,29 +6043,29 @@
6030
6043
  end: !0
6031
6044
  });
6032
6045
  } else n(r).forEach(function (n) {
6033
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n);
6034
- m(c, {
6046
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
6047
+ g(c, {
6035
6048
  ownKeys: !0
6036
6049
  }, function () {
6037
- var t = _encapsulate(o, r[n], Boolean(i), c, l, d);
6038
- hasConstructorOf(t, e) ? l.push([o, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6050
+ var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
6051
+ hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6039
6052
  });
6040
6053
  }), w && w({
6041
6054
  endIterateOwn: !0,
6042
6055
  end: !0
6043
6056
  });
6044
6057
  if (c.iterateUnsetNumeric) {
6045
- for (var C = r.length, x = function _loop2(n) {
6058
+ for (var x = r.length, C = function _loop2(n) {
6046
6059
  if (!(n in r)) {
6047
- var o = "".concat(t).concat(t ? "." : "").concat(n);
6048
- m(c, {
6060
+ var a = "".concat(t).concat(t ? "." : "").concat(n);
6061
+ g(c, {
6049
6062
  ownKeys: !1
6050
6063
  }, function () {
6051
- var t = _encapsulate(o, void 0, Boolean(i), c, l, d);
6052
- hasConstructorOf(t, e) ? l.push([o, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6064
+ var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
6065
+ hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
6053
6066
  });
6054
6067
  }
6055
- }, k = 0; k < C; k++) x(k);
6068
+ }, k = 0; k < x; k++) C(k);
6056
6069
  w && w({
6057
6070
  endIterateUnsetNumeric: !0,
6058
6071
  end: !0
@@ -6060,8 +6073,8 @@
6060
6073
  }
6061
6074
  return S;
6062
6075
  },
6063
- O = function replace(e, t, r, n, o, a, i) {
6064
- for (var c = o ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
6076
+ _ = function replace(e, t, r, n, a, o, i) {
6077
+ for (var c = a ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
6065
6078
  var y = c[u];
6066
6079
  if (y.test(t, r)) {
6067
6080
  var p = y.type;
@@ -6074,7 +6087,7 @@
6074
6087
  replaced: !0
6075
6088
  }), (l || !y.replaceAsync) && !y.replace) return i && i({
6076
6089
  typeDetected: !0
6077
- }), _(e, t, v && "readonly", r, n, a, p);
6090
+ }), O(e, t, v && "readonly", r, n, o, p);
6078
6091
  i && i({
6079
6092
  replacing: !0
6080
6093
  });
@@ -6083,17 +6096,17 @@
6083
6096
  if (void 0 === y.replace) throw new TypeError("Missing replacer");
6084
6097
  b = y.replace(t, r);
6085
6098
  } else b = y.replaceAsync(t, r);
6086
- return _(e, b, v && "readonly", r, n, a, p);
6099
+ return O(e, b, v && "readonly", r, n, o, p);
6087
6100
  }
6088
6101
  }
6089
6102
  return t;
6090
6103
  },
6091
- w = _("", t, v, null != r ? r : {}, d);
6104
+ w = O("", t, v, null != r ? r : {}, d);
6092
6105
  if (d.length) return l && u.throwOnBadSyncType ? function () {
6093
6106
  throw new TypeError("Sync method requested but async result obtained");
6094
- }() : Promise.resolve(g(w, d)).then(h);
6107
+ }() : Promise.resolve(h(w, d)).then(m);
6095
6108
  if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
6096
- return u.stringification && l ? [h(w)] : l ? h(w) : Promise.resolve(h(w));
6109
+ return u.stringification && l ? [m(w)] : l ? m(w) : Promise.resolve(m(w));
6097
6110
  }
6098
6111
  }, {
6099
6112
  key: "encapsulateSync",
@@ -6116,7 +6129,7 @@
6116
6129
  }, {
6117
6130
  key: "revive",
6118
6131
  value: function revive(t, r) {
6119
- var o = this,
6132
+ var a = this,
6120
6133
  i = _objectSpread2(_objectSpread2({
6121
6134
  sync: !0
6122
6135
  }, this.options), r),
@@ -6136,7 +6149,7 @@
6136
6149
  u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
6137
6150
  var p = function executeReviver(e, t) {
6138
6151
  var r,
6139
- n = _slicedToArray(null !== (r = o.revivers[e]) && void 0 !== r ? r : [], 1)[0];
6152
+ n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
6140
6153
  if (!n) throw new Error("Unregistered type: " + e);
6141
6154
  if (c && !("revive" in n)) return t;
6142
6155
  if (!c && n.reviveAsync) return n.reviveAsync(t, f);
@@ -6154,63 +6167,63 @@
6154
6167
  if (Object.entries(u).forEach(function (e) {
6155
6168
  var t = _slicedToArray(e, 2),
6156
6169
  n = t[0],
6157
- a = t[1];
6158
- "#" !== a && [].concat(a).forEach(function (e) {
6170
+ o = t[1];
6171
+ "#" !== o && [].concat(o).forEach(function (e) {
6159
6172
  var t;
6160
- _slicedToArray(null !== (t = o.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
6173
+ _slicedToArray(null !== (t = a.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
6161
6174
  keypath: n,
6162
6175
  type: e
6163
6176
  }), delete u[n]);
6164
6177
  });
6165
6178
  }), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
6166
- var o = n.keypath,
6167
- a = n.type;
6179
+ var a = n.keypath,
6180
+ o = n.type;
6168
6181
  if (isThenable(r)) return r.then(function (e) {
6169
6182
  return reducer(e, {
6170
- keypath: o,
6171
- type: a
6183
+ keypath: a,
6184
+ type: o
6172
6185
  });
6173
6186
  });
6174
- var i = getByKeyPath(t, o);
6175
- if (hasConstructorOf(i = p(a, i), e)) return i.then(function (e) {
6176
- var r = setAtKeyPath(t, o, e);
6187
+ var i = getByKeyPath(t, a);
6188
+ if (hasConstructorOf(i = p(o, i), e)) return i.then(function (e) {
6189
+ var r = setAtKeyPath(t, a, e);
6177
6190
  r === e && (t = r);
6178
6191
  });
6179
- var c = setAtKeyPath(t, o, i);
6192
+ var c = setAtKeyPath(t, a, i);
6180
6193
  c === i && (t = c);
6181
6194
  }, void 0);
6182
6195
  }();
6183
6196
  return hasConstructorOf(b, e) ? v = b.then(function () {
6184
6197
  return t;
6185
- }) : (v = function _revive(t, r, o, i, c) {
6198
+ }) : (v = function _revive(t, r, a, i, c) {
6186
6199
  if (!y || "$types" !== t) {
6187
6200
  var f = u[t],
6188
- v = a(r);
6201
+ v = o(r);
6189
6202
  if (v || isPlainObject(r)) {
6190
6203
  var b = v ? new Array(r.length) : {};
6191
6204
  for (n(r).forEach(function (n) {
6192
- var a = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != o ? o : b, b, n),
6205
+ var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : b, b, n),
6193
6206
  i = function set(e) {
6194
6207
  return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
6195
6208
  };
6196
- hasConstructorOf(a, e) ? d.push(a.then(function (e) {
6209
+ hasConstructorOf(o, e) ? d.push(o.then(function (e) {
6197
6210
  return i(e);
6198
- })) : i(a);
6211
+ })) : i(o);
6199
6212
  }), r = b; l.length;) {
6200
- var h = _slicedToArray(l[0], 4),
6201
- g = h[0],
6202
- m = h[1],
6203
- _ = h[2],
6204
- O = h[3],
6205
- w = getByKeyPath(g, m);
6213
+ var m = _slicedToArray(l[0], 4),
6214
+ h = m[0],
6215
+ g = m[1],
6216
+ O = m[2],
6217
+ _ = m[3],
6218
+ w = getByKeyPath(h, g);
6206
6219
  if (void 0 === w) break;
6207
- _[O] = w, l.splice(0, 1);
6220
+ O[_] = w, l.splice(0, 1);
6208
6221
  }
6209
6222
  }
6210
6223
  if (!f) return r;
6211
6224
  if ("#" === f) {
6212
- var A = getByKeyPath(o, r.slice(1));
6213
- return void 0 === A && l.push([o, r.slice(1), i, c]), A;
6225
+ var A = getByKeyPath(a, r.slice(1));
6226
+ return void 0 === A && l.push([a, r.slice(1), i, c]), A;
6214
6227
  }
6215
6228
  return [].concat(f).reduce(function reducer(t, r) {
6216
6229
  if (hasConstructorOf(t, e)) return t.then(function (e) {
@@ -6252,9 +6265,9 @@
6252
6265
  key: "register",
6253
6266
  value: function register(e, t) {
6254
6267
  var r = this,
6255
- o = null != t ? t : {},
6268
+ a = null != t ? t : {},
6256
6269
  i = function R(e) {
6257
- a(e) ? e.forEach(function (e) {
6270
+ o(e) ? e.forEach(function (e) {
6258
6271
  return R(e);
6259
6272
  }) : n(e).forEach(function (t) {
6260
6273
  var n;
@@ -6278,7 +6291,7 @@
6278
6291
  return Object.assign(Object.create(l.prototype), e);
6279
6292
  }
6280
6293
  };
6281
- } else if (a(i)) {
6294
+ } else if (o(i)) {
6282
6295
  var f = _slicedToArray(i, 3);
6283
6296
  i = {
6284
6297
  test: f[0],
@@ -6292,7 +6305,7 @@
6292
6305
  test: i.test.bind(i)
6293
6306
  };
6294
6307
  i.replace && (y.replace = i.replace.bind(i)), i.replaceAsync && (y.replaceAsync = i.replaceAsync.bind(i));
6295
- var p = "number" == typeof o.fallback ? o.fallback : o.fallback ? 0 : Number.POSITIVE_INFINITY;
6308
+ var p = "number" == typeof a.fallback ? a.fallback : a.fallback ? 0 : Number.POSITIVE_INFINITY;
6296
6309
  if (i.testPlainObjects ? r.plainObjectReplacers.splice(p, 0, y) : r.nonplainObjectReplacers.splice(p, 0, y), i.revive || i.reviveAsync) {
6297
6310
  var d = {};
6298
6311
  i.revive && (d.revive = i.revive.bind(i)), i.reviveAsync && (d.reviveAsync = i.reviveAsync.bind(i)), r.revivers[t] = [d, {
@@ -6316,20 +6329,20 @@
6316
6329
  for (var u = ["null", "boolean", "number", "string", "array", "object"], l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", f = new Uint8Array(256), y = 0; y < 64; y++) f[l.codePointAt(y)] = y;
6317
6330
  var p = function encode(e, t, r) {
6318
6331
  null == r && (r = e.byteLength);
6319
- for (var n = new Uint8Array(e, t || 0, r), o = n.length, a = "", i = 0; i < o; i += 3) a += l[n[i] >> 2], a += l[(3 & n[i]) << 4 | n[i + 1] >> 4], a += l[(15 & n[i + 1]) << 2 | n[i + 2] >> 6], a += l[63 & n[i + 2]];
6320
- return o % 3 == 2 ? a = a.slice(0, -1) + "=" : o % 3 == 1 && (a = a.slice(0, -2) + "=="), a;
6332
+ for (var n = new Uint8Array(e, t || 0, r), a = n.length, o = "", i = 0; i < a; i += 3) o += l[n[i] >> 2], o += l[(3 & n[i]) << 4 | n[i + 1] >> 4], o += l[(15 & n[i + 1]) << 2 | n[i + 2] >> 6], o += l[63 & n[i + 2]];
6333
+ return a % 3 == 2 ? o = o.slice(0, -1) + "=" : a % 3 == 1 && (o = o.slice(0, -2) + "=="), o;
6321
6334
  },
6322
6335
  d = function decode(e) {
6323
6336
  var t = e.length;
6324
6337
  if (t % 4) throw new Error("Bad base64 length: not divisible by four");
6325
6338
  var r,
6326
6339
  n,
6327
- o,
6328
6340
  a,
6341
+ o,
6329
6342
  i = .75 * e.length,
6330
6343
  c = 0;
6331
6344
  "=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
6332
- for (var s = new ArrayBuffer(i), u = new Uint8Array(s), l = 0; l < t; l += 4) r = f[e.codePointAt(l)], n = f[e.codePointAt(l + 1)], o = f[e.codePointAt(l + 2)], a = f[e.codePointAt(l + 3)], u[c++] = r << 2 | n >> 4, u[c++] = (15 & n) << 4 | o >> 2, u[c++] = (3 & o) << 6 | 63 & a;
6345
+ for (var s = new ArrayBuffer(i), u = new Uint8Array(s), l = 0; l < t; l += 4) r = f[e.codePointAt(l)], n = f[e.codePointAt(l + 1)], a = f[e.codePointAt(l + 2)], o = f[e.codePointAt(l + 3)], u[c++] = r << 2 | n >> 4, u[c++] = (15 & n) << 4 | a >> 2, u[c++] = (3 & a) << 6 | 63 & o;
6333
6346
  return s;
6334
6347
  };
6335
6348
  var v = {
@@ -6362,7 +6375,7 @@
6362
6375
  }
6363
6376
  }
6364
6377
  },
6365
- h = {
6378
+ m = {
6366
6379
  bigint: {
6367
6380
  test: function test(e) {
6368
6381
  return "bigint" == typeof e;
@@ -6378,7 +6391,7 @@
6378
6391
  for (var _r = 0; _r < e.length; _r++) t[_r] = e.charCodeAt(_r);
6379
6392
  return t.buffer;
6380
6393
  }
6381
- var g = {
6394
+ var h = {
6382
6395
  blob: {
6383
6396
  test: function test(e) {
6384
6397
  return "Blob" === toStringTag(e);
@@ -6413,7 +6426,7 @@
6413
6426
  }
6414
6427
  }
6415
6428
  };
6416
- var O = {
6429
+ var _ = {
6417
6430
  cryptokey: {
6418
6431
  test: function test(e) {
6419
6432
  return "CryptoKey" === toStringTag(e) && e.extractable;
@@ -6471,9 +6484,9 @@
6471
6484
  t = _ref2.byteOffset,
6472
6485
  r = _ref2.byteLength;
6473
6486
  n.buffers || (n.buffers = []);
6474
- var o = n.buffers.indexOf(e);
6475
- return o > -1 ? {
6476
- index: o,
6487
+ var a = n.buffers.indexOf(e);
6488
+ return a > -1 ? {
6489
+ index: a,
6477
6490
  byteOffset: t,
6478
6491
  byteLength: r
6479
6492
  } : (n.buffers.push(e), {
@@ -6486,10 +6499,10 @@
6486
6499
  t.buffers || (t.buffers = []);
6487
6500
  var r = e.byteOffset,
6488
6501
  n = e.byteLength,
6489
- o = e.encoded,
6490
- a = e.index;
6502
+ a = e.encoded,
6503
+ o = e.index;
6491
6504
  var i;
6492
- return "index" in e ? i = t.buffers[a] : (i = d(o), t.buffers.push(i)), new DataView(i, r, n);
6505
+ return "index" in e ? i = t.buffers[o] : (i = d(a), t.buffers.push(i)), new DataView(i, r, n);
6493
6506
  }
6494
6507
  }
6495
6508
  },
@@ -6508,25 +6521,152 @@
6508
6521
  }
6509
6522
  },
6510
6523
  S = {
6524
+ domexception: {
6525
+ test: function test(e) {
6526
+ return "DOMException" === toStringTag(e);
6527
+ },
6528
+ replace: function replace(e) {
6529
+ return {
6530
+ name: e.name,
6531
+ message: e.message
6532
+ };
6533
+ },
6534
+ revive: function revive(_ref3) {
6535
+ var e = _ref3.message,
6536
+ t = _ref3.name;
6537
+ return new DOMException(e, t);
6538
+ }
6539
+ }
6540
+ },
6541
+ j = {};
6542
+ function create$5(e) {
6543
+ j[e.name.toLowerCase()] = {
6544
+ test: function test(t) {
6545
+ return toStringTag(t) === e.name;
6546
+ },
6547
+ replace: function replace(e) {
6548
+ return e.is2D ? {
6549
+ a: e.a,
6550
+ b: e.b,
6551
+ c: e.c,
6552
+ d: e.d,
6553
+ e: e.e,
6554
+ f: e.f
6555
+ } : {
6556
+ m11: e.m11,
6557
+ m12: e.m12,
6558
+ m13: e.m13,
6559
+ m14: e.m14,
6560
+ m21: e.m21,
6561
+ m22: e.m22,
6562
+ m23: e.m23,
6563
+ m24: e.m24,
6564
+ m31: e.m31,
6565
+ m32: e.m32,
6566
+ m33: e.m33,
6567
+ m34: e.m34,
6568
+ m41: e.m41,
6569
+ m42: e.m42,
6570
+ m43: e.m43,
6571
+ m44: e.m44
6572
+ };
6573
+ },
6574
+ revive: function revive(t) {
6575
+ return Object.hasOwn(t, "a") ? new e([t.a, t.b, t.c, t.d, t.e, t.f]) : new e([t.m11, t.m12, t.m13, t.m14, t.m21, t.m22, t.m23, t.m24, t.m31, t.m32, t.m33, t.m34, t.m41, t.m42, t.m43, t.m44]);
6576
+ }
6577
+ };
6578
+ }
6579
+ "undefined" != typeof DOMMatrix && create$5(DOMMatrix), "undefined" != typeof DOMMatrixReadOnly && create$5(DOMMatrixReadOnly);
6580
+ var T = {};
6581
+ function create$4(e) {
6582
+ T[e.name.toLowerCase()] = {
6583
+ test: function test(t) {
6584
+ return toStringTag(t) === e.name;
6585
+ },
6586
+ replace: function replace(e) {
6587
+ return {
6588
+ x: e.x,
6589
+ y: e.y,
6590
+ z: e.z,
6591
+ w: e.w
6592
+ };
6593
+ },
6594
+ revive: function revive(_ref4) {
6595
+ var t = _ref4.x,
6596
+ r = _ref4.y,
6597
+ n = _ref4.z,
6598
+ a = _ref4.w;
6599
+ return new e(t, r, n, a);
6600
+ }
6601
+ };
6602
+ }
6603
+ "undefined" != typeof DOMPoint && create$4(DOMPoint), "undefined" != typeof DOMPointReadOnly && create$4(DOMPointReadOnly);
6604
+ var N = {
6605
+ domquad: {
6606
+ test: function test(e) {
6607
+ return "DOMQuad" === toStringTag(e);
6608
+ },
6609
+ replace: function replace(e) {
6610
+ return {
6611
+ p1: e.p1,
6612
+ p2: e.p2,
6613
+ p3: e.p3,
6614
+ p4: e.p4
6615
+ };
6616
+ },
6617
+ revive: function revive(_ref5) {
6618
+ var e = _ref5.p1,
6619
+ t = _ref5.p2,
6620
+ r = _ref5.p3,
6621
+ n = _ref5.p4;
6622
+ return new DOMQuad(e, t, r, n);
6623
+ }
6624
+ }
6625
+ },
6626
+ I = {};
6627
+ function create$3(e) {
6628
+ I[e.name.toLowerCase()] = {
6629
+ test: function test(t) {
6630
+ return toStringTag(t) === e.name;
6631
+ },
6632
+ replace: function replace(e) {
6633
+ return {
6634
+ x: e.x,
6635
+ y: e.y,
6636
+ width: e.width,
6637
+ height: e.height
6638
+ };
6639
+ },
6640
+ revive: function revive(_ref6) {
6641
+ var t = _ref6.x,
6642
+ r = _ref6.y,
6643
+ n = _ref6.width,
6644
+ a = _ref6.height;
6645
+ return new e(t, r, n, a);
6646
+ }
6647
+ };
6648
+ }
6649
+ "undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
6650
+ var P = {
6511
6651
  error: {
6512
6652
  test: function test(e) {
6513
6653
  return "Error" === toStringTag(e);
6514
6654
  },
6515
- replace: function replace(_ref3) {
6516
- var e = _ref3.name,
6517
- t = _ref3.message,
6518
- r = _ref3.cause,
6519
- n = _ref3.stack,
6520
- o = _ref3.fileName,
6521
- a = _ref3.lineNumber,
6522
- i = _ref3.columnNumber;
6655
+ replace: function replace(_ref7) {
6656
+ var e = _ref7.name,
6657
+ t = _ref7.message,
6658
+ r = _ref7.cause,
6659
+ n = _ref7.stack,
6660
+ a = _ref7.fileName,
6661
+ o = _ref7.lineNumber,
6662
+ i = _ref7.columnNumber;
6523
6663
  return {
6524
6664
  name: e,
6525
6665
  message: t,
6526
6666
  cause: r,
6527
6667
  stack: n,
6528
- fileName: o,
6529
- lineNumber: a,
6668
+ fileName: a,
6669
+ lineNumber: o,
6530
6670
  columnNumber: i
6531
6671
  };
6532
6672
  },
@@ -6536,43 +6676,42 @@
6536
6676
  }
6537
6677
  }
6538
6678
  },
6539
- j = {};
6679
+ E = {};
6540
6680
  function create$2(e) {
6541
- j[e.name.toLowerCase()] = {
6681
+ E[e.name.toLowerCase()] = {
6542
6682
  test: function test(t) {
6543
6683
  return hasConstructorOf(t, e);
6544
6684
  },
6545
- replace: function replace(_ref4) {
6546
- var e = _ref4.name,
6547
- t = _ref4.message,
6548
- r = _ref4.cause,
6549
- n = _ref4.stack,
6550
- o = _ref4.fileName,
6551
- a = _ref4.lineNumber,
6552
- i = _ref4.columnNumber,
6553
- c = _ref4.errors;
6685
+ replace: function replace(_ref8) {
6686
+ var e = _ref8.name,
6687
+ t = _ref8.message,
6688
+ r = _ref8.cause,
6689
+ n = _ref8.stack,
6690
+ a = _ref8.fileName,
6691
+ o = _ref8.lineNumber,
6692
+ i = _ref8.columnNumber,
6693
+ c = _ref8.errors;
6554
6694
  return {
6555
6695
  name: e,
6556
6696
  message: t,
6557
6697
  cause: r,
6558
6698
  stack: n,
6559
- fileName: o,
6560
- lineNumber: a,
6699
+ fileName: a,
6700
+ lineNumber: o,
6561
6701
  columnNumber: i,
6562
6702
  errors: c
6563
6703
  };
6564
6704
  },
6565
6705
  revive: function revive(t) {
6566
- var r = "undefined" != typeof AggregateError && e === AggregateError,
6567
- n = r ? new e(t.errors, t.message) : new e(t.message);
6568
- return n.name = t.name, n.cause = t.cause, n.stack = t.stack, n.fileName = t.fileName, n.lineNumber = t.lineNumber, n.columnNumber = t.columnNumber, r && (n.errors = t.errors), n;
6706
+ var r = "undefined" != typeof AggregateError && e === AggregateError ? new e(t.errors, t.message) : new e(t.message);
6707
+ return r.name = t.name, r.cause = t.cause, r.stack = t.stack, r.fileName = t.fileName, r.lineNumber = t.lineNumber, r.columnNumber = t.columnNumber, r;
6569
6708
  }
6570
6709
  };
6571
6710
  }
6572
6711
  [TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
6573
6712
  return create$2(e);
6574
6713
  }), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
6575
- var T = {
6714
+ var x = {
6576
6715
  file: {
6577
6716
  test: function test(e) {
6578
6717
  return "File" === toStringTag(e);
@@ -6587,11 +6726,11 @@
6587
6726
  lastModified: e.lastModified
6588
6727
  };
6589
6728
  },
6590
- revive: function revive(_ref5) {
6591
- var e = _ref5.name,
6592
- t = _ref5.type,
6593
- r = _ref5.stringContents,
6594
- n = _ref5.lastModified;
6729
+ revive: function revive(_ref9) {
6730
+ var e = _ref9.name,
6731
+ t = _ref9.type,
6732
+ r = _ref9.stringContents,
6733
+ n = _ref9.lastModified;
6595
6734
  return new File([string2arraybuffer(r)], e, {
6596
6735
  type: t,
6597
6736
  lastModified: n
@@ -6614,8 +6753,8 @@
6614
6753
  }
6615
6754
  }
6616
6755
  },
6617
- I = {
6618
- file: T.file,
6756
+ C = {
6757
+ file: x.file,
6619
6758
  filelist: {
6620
6759
  test: function test(e) {
6621
6760
  return "FileList" === toStringTag(e);
@@ -6648,7 +6787,7 @@
6648
6787
  }
6649
6788
  }
6650
6789
  },
6651
- N = {
6790
+ k = {
6652
6791
  imagebitmap: {
6653
6792
  test: function test(e) {
6654
6793
  return "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag;
@@ -6668,11 +6807,11 @@
6668
6807
  reviveAsync: function reviveAsync(t) {
6669
6808
  var r = document.createElement("canvas"),
6670
6809
  n = r.getContext("2d"),
6671
- o = document.createElement("img");
6672
- return o.addEventListener("load", function () {
6673
- n.drawImage(o, 0, 0);
6674
- }), o.src = t, new e( /*#__PURE__*/function () {
6675
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
6810
+ a = document.createElement("img");
6811
+ return a.addEventListener("load", function () {
6812
+ n.drawImage(a, 0, 0);
6813
+ }), a.src = t, new e( /*#__PURE__*/function () {
6814
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
6676
6815
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6677
6816
  while (1) switch (_context2.prev = _context2.next) {
6678
6817
  case 0:
@@ -6696,13 +6835,13 @@
6696
6835
  }, _callee2, null, [[0, 8]]);
6697
6836
  }));
6698
6837
  return function (_x3, _x4) {
6699
- return _ref6.apply(this, arguments);
6838
+ return _ref10.apply(this, arguments);
6700
6839
  };
6701
6840
  }());
6702
6841
  }
6703
6842
  }
6704
6843
  },
6705
- P = {
6844
+ B = {
6706
6845
  imagedata: {
6707
6846
  test: function test(e) {
6708
6847
  return "ImageData" === toStringTag(e);
@@ -6719,56 +6858,20 @@
6719
6858
  }
6720
6859
  }
6721
6860
  },
6722
- E = {
6861
+ U = {
6723
6862
  infinity: {
6724
6863
  test: function test(e) {
6725
6864
  return e === Number.POSITIVE_INFINITY;
6726
6865
  },
6727
- replace: function replace(e) {
6866
+ replace: function replace() {
6728
6867
  return "Infinity";
6729
6868
  },
6730
- revive: function revive(e) {
6869
+ revive: function revive() {
6731
6870
  return Number.POSITIVE_INFINITY;
6732
6871
  }
6733
6872
  }
6734
6873
  },
6735
- C = {
6736
- test: function test(e) {
6737
- return hasConstructorOf(e, Intl.Collator);
6738
- },
6739
- replace: function replace(e) {
6740
- return e.resolvedOptions();
6741
- },
6742
- revive: function revive(e) {
6743
- return new Intl.Collator(e.locale, e);
6744
- }
6745
- },
6746
- x = {
6747
- IntlCollator: C,
6748
- IntlDateTimeFormat: {
6749
- test: function test(e) {
6750
- return hasConstructorOf(e, Intl.DateTimeFormat);
6751
- },
6752
- replace: function replace(e) {
6753
- return e.resolvedOptions();
6754
- },
6755
- revive: function revive(e) {
6756
- return new Intl.DateTimeFormat(e.locale, e);
6757
- }
6758
- },
6759
- IntlNumberFormat: {
6760
- test: function test(e) {
6761
- return hasConstructorOf(e, Intl.NumberFormat);
6762
- },
6763
- replace: function replace(e) {
6764
- return e.resolvedOptions();
6765
- },
6766
- revive: function revive(e) {
6767
- return new Intl.NumberFormat(e.locale, e);
6768
- }
6769
- }
6770
- },
6771
- k = {
6874
+ K = {
6772
6875
  map: {
6773
6876
  test: function test(e) {
6774
6877
  return "Map" === toStringTag(e);
@@ -6781,46 +6884,46 @@
6781
6884
  }
6782
6885
  }
6783
6886
  },
6784
- B = {
6887
+ L = {
6785
6888
  nan: {
6786
6889
  test: function test(e) {
6787
6890
  return Number.isNaN(e);
6788
6891
  },
6789
- replace: function replace(e) {
6892
+ replace: function replace() {
6790
6893
  return "NaN";
6791
6894
  },
6792
- revive: function revive(e) {
6895
+ revive: function revive() {
6793
6896
  return Number.NaN;
6794
6897
  }
6795
6898
  }
6796
6899
  },
6797
- U = {
6900
+ F = {
6798
6901
  negativeInfinity: {
6799
6902
  test: function test(e) {
6800
6903
  return e === Number.NEGATIVE_INFINITY;
6801
6904
  },
6802
- replace: function replace(e) {
6905
+ replace: function replace() {
6803
6906
  return "-Infinity";
6804
6907
  },
6805
- revive: function revive(e) {
6908
+ revive: function revive() {
6806
6909
  return Number.NEGATIVE_INFINITY;
6807
6910
  }
6808
6911
  }
6809
6912
  },
6810
- K = {
6913
+ $ = {
6811
6914
  negativeZero: {
6812
6915
  test: function test(e) {
6813
6916
  return Object.is(e, -0);
6814
6917
  },
6815
- replace: function replace(e) {
6918
+ replace: function replace() {
6816
6919
  return 0;
6817
6920
  },
6818
- revive: function revive(e) {
6921
+ revive: function revive() {
6819
6922
  return -0;
6820
6923
  }
6821
6924
  }
6822
6925
  },
6823
- F = {
6926
+ V = {
6824
6927
  StringObject: {
6825
6928
  test: function test(e) {
6826
6929
  return "String" === toStringTag(e) && "object" == _typeof$2(e);
@@ -6849,7 +6952,7 @@
6849
6952
  }
6850
6953
  }
6851
6954
  },
6852
- M = {
6955
+ q = {
6853
6956
  regexp: {
6854
6957
  test: function test(e) {
6855
6958
  return "RegExp" === toStringTag(e);
@@ -6860,14 +6963,14 @@
6860
6963
  flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
6861
6964
  };
6862
6965
  },
6863
- revive: function revive(_ref7) {
6864
- var e = _ref7.source,
6865
- t = _ref7.flags;
6966
+ revive: function revive(_ref11) {
6967
+ var e = _ref11.source,
6968
+ t = _ref11.flags;
6866
6969
  return new RegExp(e, t);
6867
6970
  }
6868
6971
  }
6869
6972
  },
6870
- J = {
6973
+ G = {
6871
6974
  set: {
6872
6975
  test: function test(e) {
6873
6976
  return "Set" === toStringTag(e);
@@ -6880,11 +6983,11 @@
6880
6983
  }
6881
6984
  }
6882
6985
  },
6883
- V = {};
6986
+ H = {};
6884
6987
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
6885
6988
  return function create$1(e) {
6886
6989
  var t = e.name;
6887
- V[t.toLowerCase()] = {
6990
+ H[t.toLowerCase()] = {
6888
6991
  test: function test(e) {
6889
6992
  return toStringTag(e) === t;
6890
6993
  },
@@ -6897,22 +7000,22 @@
6897
7000
  };
6898
7001
  }(e);
6899
7002
  });
6900
- var Y = {};
7003
+ var z = {};
6901
7004
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
6902
7005
  return function create(e) {
6903
7006
  var t = e.name;
6904
- Y[t.toLowerCase()] = {
7007
+ z[t.toLowerCase()] = {
6905
7008
  test: function test(e) {
6906
7009
  return toStringTag(e) === t;
6907
7010
  },
6908
- replace: function replace(_ref8, n) {
6909
- var e = _ref8.buffer,
6910
- t = _ref8.byteOffset,
6911
- r = _ref8.length;
7011
+ replace: function replace(_ref12, n) {
7012
+ var e = _ref12.buffer,
7013
+ t = _ref12.byteOffset,
7014
+ r = _ref12.length;
6912
7015
  n.buffers || (n.buffers = []);
6913
- var o = n.buffers.indexOf(e);
6914
- return o > -1 ? {
6915
- index: o,
7016
+ var a = n.buffers.indexOf(e);
7017
+ return a > -1 ? {
7018
+ index: a,
6916
7019
  byteOffset: t,
6917
7020
  length: r
6918
7021
  } : (n.buffers.push(e), {
@@ -6924,31 +7027,31 @@
6924
7027
  revive: function revive(t, r) {
6925
7028
  r.buffers || (r.buffers = []);
6926
7029
  var n = t.byteOffset,
6927
- o = t.length,
6928
- a = t.encoded,
7030
+ a = t.length,
7031
+ o = t.encoded,
6929
7032
  i = t.index;
6930
7033
  var c;
6931
- return "index" in t ? c = r.buffers[i] : (c = d(a), r.buffers.push(c)), new e(c, n, o);
7034
+ return "index" in t ? c = r.buffers[i] : (c = d(o), r.buffers.push(c)), new e(c, n, a);
6932
7035
  }
6933
7036
  };
6934
7037
  }(e);
6935
7038
  });
6936
- var q = {
7039
+ var Q = {
6937
7040
  undef: {
6938
7041
  test: function test(e, t) {
6939
7042
  return void 0 === e && (t.ownKeys || !("ownKeys" in t));
6940
7043
  },
6941
- replace: function replace(e) {
7044
+ replace: function replace() {
6942
7045
  return 0;
6943
7046
  },
6944
- revive: function revive(e) {
7047
+ revive: function revive() {
6945
7048
  return new s();
6946
7049
  }
6947
7050
  }
6948
7051
  },
6949
- W = {
7052
+ X = {
6950
7053
  userObject: {
6951
- test: function test(e, t) {
7054
+ test: function test(e) {
6952
7055
  return isUserObject(e);
6953
7056
  },
6954
7057
  replace: function replace(e) {
@@ -6959,7 +7062,7 @@
6959
7062
  }
6960
7063
  }
6961
7064
  },
6962
- G = [{
7065
+ Z = [{
6963
7066
  arrayNonindexKeys: {
6964
7067
  testPlainObjects: !0,
6965
7068
  test: function test(e, t) {
@@ -6973,10 +7076,10 @@
6973
7076
  revive: function revive(e) {
6974
7077
  if (Array.isArray(e)) return e;
6975
7078
  var t = [];
6976
- return Object.entries(e).forEach(function (_ref9) {
6977
- var _ref10 = _slicedToArray$1(_ref9, 2),
6978
- e = _ref10[0],
6979
- r = _ref10[1];
7079
+ return Object.entries(e).forEach(function (_ref13) {
7080
+ var _ref14 = _slicedToArray$1(_ref13, 2),
7081
+ e = _ref14[0],
7082
+ r = _ref14[1];
6980
7083
  t[e] = r;
6981
7084
  }), t;
6982
7085
  }
@@ -6986,19 +7089,19 @@
6986
7089
  test: function test(e, t) {
6987
7090
  return void 0 === e && !1 === t.ownKeys;
6988
7091
  },
6989
- replace: function replace(e) {
7092
+ replace: function replace() {
6990
7093
  return 0;
6991
7094
  },
6992
- revive: function revive(e) {}
7095
+ revive: function revive() {}
6993
7096
  }
6994
7097
  }],
6995
- H = [B, E, U, K],
6996
- ee = [W, q, G, F, H, A, M, P, N, T, I, g, S, j].concat("function" == typeof Map ? k : [], "function" == typeof Set ? J : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? Y : [], "function" == typeof DataView ? w : [], "undefined" != typeof Intl ? x : [], "undefined" != typeof crypto ? O : [], "undefined" != typeof BigInt ? [h, b] : []),
6997
- te = ee.concat({
7098
+ ee = [L, U, F, $],
7099
+ oe = [X, Q, Z, V, ee, A, q, B, k, x, C, h, P, E].concat("function" == typeof Map ? K : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? z : [], "function" == typeof DataView ? w : [], "undefined" != typeof crypto ? _ : [], "undefined" != typeof BigInt ? [m, b] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? I : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? N : [], "undefined" != typeof DOMMatrix ? j : []),
7100
+ ie = oe.concat({
6998
7101
  checkDataCloneException: {
6999
7102
  test: function test(e) {
7000
7103
  var t = {}.toString.call(e).slice(8, -1);
7001
- if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "Error", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$2(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
7104
+ if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$2(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
7002
7105
  return !1;
7003
7106
  }
7004
7107
  }
@@ -7006,7 +7109,7 @@
7006
7109
 
7007
7110
  // See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
7008
7111
 
7009
- var typeson = new c().register(te);
7112
+ var typeson = new c().register(ie);
7010
7113
 
7011
7114
  /**
7012
7115
  * @param {(preset: import('typeson-registry').Preset) =>
@@ -7014,7 +7117,7 @@
7014
7117
  * @returns {void}
7015
7118
  */
7016
7119
  function register(func) {
7017
- typeson = new c().register(func(te));
7120
+ typeson = new c().register(func(ie));
7018
7121
  }
7019
7122
 
7020
7123
  /**
@@ -7163,7 +7266,7 @@
7163
7266
  * @returns {string}
7164
7267
  */
7165
7268
  get: function get() {
7166
- return '__pendingName' in me ? /** @type {string} */me.__pendingName : me.name;
7269
+ return '__pendingName' in me ? ( /** @type {string} */me.__pendingName) : me.name;
7167
7270
  }
7168
7271
  });
7169
7272
  Object.defineProperty(me, 'name', {
@@ -7311,7 +7414,9 @@
7311
7414
  IDBIndex.__updateIndexList(store, tx, function () {
7312
7415
  // Add index entries for all existing records
7313
7416
  tx.executeSql('SELECT "key", "value" FROM ' + escapeStoreNameForSQL(storeName), [], function (tx, data) {
7314
- CFG.DEBUG && console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
7417
+ if (CFG.DEBUG) {
7418
+ console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
7419
+ }
7315
7420
  addIndexEntry(0);
7316
7421
 
7317
7422
  /**
@@ -7337,7 +7442,7 @@
7337
7442
  }
7338
7443
  indexValues[indexKeyStr] = true;
7339
7444
  }
7340
- tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function (tx, data) {
7445
+ tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
7341
7446
  addIndexEntry(i + 1);
7342
7447
  }, /** @type {SQLStatementErrorCallback} */error);
7343
7448
  } catch (e) {
@@ -7386,7 +7491,9 @@
7386
7491
  } else {
7387
7492
  // For a new index, add a new column to the object store, then apply the index
7388
7493
  var sql = ['ALTER TABLE', escapedStoreNameSQL, 'ADD', escapedIndexNameSQL, 'BLOB'].join(' ');
7389
- CFG.DEBUG && console.log(sql);
7494
+ if (CFG.DEBUG) {
7495
+ console.log(sql);
7496
+ }
7390
7497
  tx.executeSql(sql, [], addIndexSQL, /** @type {SQLStatementErrorCallback} */error);
7391
7498
  }
7392
7499
  });
@@ -7474,7 +7581,9 @@
7474
7581
  deleted: Boolean(idx.__deleted)
7475
7582
  };
7476
7583
  }
7477
- CFG.DEBUG && console.log('Updating the index list for ' + store.__currentName, indexList);
7584
+ if (CFG.DEBUG) {
7585
+ console.log('Updating the index list for ' + store.__currentName, indexList);
7586
+ }
7478
7587
  tx.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?', [JSON.stringify(indexList), escapeSQLiteStatement(store.__currentName)], function () {
7479
7588
  success(store);
7480
7589
  }, /** @type {SQLStatementErrorCallback} */failure);
@@ -7508,13 +7617,12 @@
7508
7617
  throw createDOMException('DataError', 'No key or range was specified');
7509
7618
  }
7510
7619
  var fetchArgs = buildFetchIndexDataSQL(nullDisallowed, me, range, opType, false);
7511
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
7512
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7513
- args[_key] = arguments[_key];
7514
- }
7515
- executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
7516
- }, undefined, me)
7517
- );
7620
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
7621
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7622
+ args[_key] = arguments[_key];
7623
+ }
7624
+ executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
7625
+ }, undefined, me);
7518
7626
  };
7519
7627
 
7520
7628
  /**
@@ -7685,17 +7793,25 @@
7685
7793
  // We don't query for indexes as we already have the info
7686
7794
  // This approach has the advantage of auto-deleting indexes via the DROP TABLE
7687
7795
  var sql = 'CREATE TABLE ' + escapedTmpStoreNameSQL + '(' + listColInfoToPreserve + escapedNewIndexNameSQL + ' ' + newNameType + ')';
7688
- CFG.DEBUG && console.log(sql);
7796
+ if (CFG.DEBUG) {
7797
+ console.log(sql);
7798
+ }
7689
7799
  tx.executeSql(sql, [], function () {
7690
7800
  var sql = 'INSERT INTO ' + escapedTmpStoreNameSQL + '(' + listColsToPreserve + escapedNewIndexNameSQL + ') SELECT ' + listColsToPreserve + escapeIndexNameForSQL(oldName) + ' FROM ' + escapedStoreNameSQL;
7691
- CFG.DEBUG && console.log(sql);
7801
+ if (CFG.DEBUG) {
7802
+ console.log(sql);
7803
+ }
7692
7804
  tx.executeSql(sql, [], function () {
7693
7805
  var sql = 'DROP TABLE ' + escapedStoreNameSQL;
7694
- CFG.DEBUG && console.log(sql);
7806
+ if (CFG.DEBUG) {
7807
+ console.log(sql);
7808
+ }
7695
7809
  tx.executeSql(sql, [], function () {
7696
7810
  var sql = 'ALTER TABLE ' + escapedTmpStoreNameSQL + ' RENAME TO ' + escapedStoreNameSQL;
7697
- CFG.DEBUG && console.log(sql);
7698
- tx.executeSql(sql, [], function (tx, data) {
7811
+ if (CFG.DEBUG) {
7812
+ console.log(sql);
7813
+ }
7814
+ tx.executeSql(sql, [], function (tx) {
7699
7815
  if (!CFG.useSQLiteIndexes) {
7700
7816
  finish();
7701
7817
  return;
@@ -7705,40 +7821,39 @@
7705
7821
  return new SyncPromise(function (resolve, reject) {
7706
7822
  var escapedIndexToRecreate = sqlQuote(escapedStoreNameSQL.slice(1, -1) + '^5' + escapedIndexNameSQL.slice(1, -1));
7707
7823
  // const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
7708
- // CFG.DEBUG && console.log(sql);
7824
+ // if (CFG.DEBUG) { console.log(sql); }
7709
7825
  // tx.executeSql(sql, [], function () {
7710
7826
  var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '(' + escapedIndexNameSQL + ')';
7711
- CFG.DEBUG && console.log(sql);
7712
- tx.executeSql(sql, [], resolve, /* eslint-disable no-extra-parens -- TS */
7713
- /** @type {SQLStatementErrorCallback} */
7827
+ if (CFG.DEBUG) {
7828
+ console.log(sql);
7829
+ }
7830
+ tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
7714
7831
  function (tx, err) {
7715
7832
  reject(err);
7716
- }
7717
- /* eslint-enable no-extra-parens -- TS */);
7833
+ });
7718
7834
  // }, function (tx, err) {
7719
7835
  // reject(err);
7720
7836
  // });
7721
7837
  });
7722
7838
  });
7723
-
7724
7839
  indexCreations.push(new SyncPromise(function (resolve, reject) {
7725
7840
  var escapedIndexToRecreate = sqlQuote('sk_' + escapedStoreNameSQL.slice(1, -1));
7726
7841
  // Chrome erring here if not dropped first; Node does not
7727
7842
  var sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
7728
- CFG.DEBUG && console.log(sql);
7843
+ if (CFG.DEBUG) {
7844
+ console.log(sql);
7845
+ }
7729
7846
  tx.executeSql(sql, [], function () {
7730
7847
  var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '("key")';
7731
- CFG.DEBUG && console.log(sql);
7732
- tx.executeSql(sql, [], resolve, /* eslint-disable no-extra-parens -- TS */
7733
- /** @type {SQLStatementErrorCallback} */
7848
+ if (CFG.DEBUG) {
7849
+ console.log(sql);
7850
+ }
7851
+ tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
7734
7852
  function (tx, err) {
7735
- /* eslint-enable no-extra-parens -- TS */
7736
7853
  reject(err);
7737
7854
  });
7738
- }, /* eslint-disable no-extra-parens -- TS */
7739
- /** @type {SQLStatementErrorCallback} */
7855
+ }, /** @type {SQLStatementErrorCallback} */
7740
7856
  function (tx, err) {
7741
- /* eslint-enable no-extra-parens -- TS */
7742
7857
  reject(err);
7743
7858
  });
7744
7859
  }));
@@ -7798,12 +7913,14 @@
7798
7913
  sql.push('LIMIT', String(count));
7799
7914
  }
7800
7915
  var isCount = opType === 'count';
7801
- CFG.DEBUG && console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
7916
+ if (CFG.DEBUG) {
7917
+ console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
7918
+ }
7802
7919
  tx.executeSql(sql.join(' '), sqlValues, function (tx, data) {
7803
7920
  var records = [];
7804
7921
  var recordCount = 0;
7805
7922
  var decode$1 = isCount ? function () {/* */} : opType === 'key'
7806
- // eslint-disable-next-line operator-linebreak -- JSDoc
7923
+ // eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
7807
7924
  ?
7808
7925
  /**
7809
7926
  * @param {{
@@ -7815,7 +7932,7 @@
7815
7932
  // Key.convertValueToKey(record.key); // Already validated before storage
7816
7933
  return _decode(unescapeSQLiteResponse(record.key));
7817
7934
  }
7818
- // eslint-disable-next-line operator-linebreak -- JSDoc
7935
+ // eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
7819
7936
  :
7820
7937
  /**
7821
7938
  * @param {{
@@ -7857,13 +7974,12 @@
7857
7974
  if (record) {
7858
7975
  records.push(decode$1(record));
7859
7976
  if (unboundedDisallowed) {
7860
- return "break";
7977
+ return 1; // break
7861
7978
  }
7862
7979
  }
7863
7980
  };
7864
7981
  for (var i = 0; i < data.rows.length; i++) {
7865
- var _ret = _loop();
7866
- if (_ret === "break") break;
7982
+ if (_loop()) break;
7867
7983
  }
7868
7984
  } else {
7869
7985
  for (var _i = 0; _i < data.rows.length; _i++) {
@@ -7913,7 +8029,9 @@
7913
8029
  sql.push('AND (');
7914
8030
  /** @type {import('./Key.js').KeyPathArray} */
7915
8031
  range.forEach(function (innerKey, i) {
7916
- if (i > 0) sql.push('OR');
8032
+ if (i > 0) {
8033
+ sql.push('OR');
8034
+ }
7917
8035
  sql.push(escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^' ");
7918
8036
  sqlValues.push('%' + sqlLIKEEscape( /** @type {string} */_encode(innerKey, index.multiEntry)) + '%');
7919
8037
  });
@@ -8061,20 +8179,24 @@
8061
8179
  me.__pendingName = oldName;
8062
8180
  var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
8063
8181
  var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
8064
- CFG.DEBUG && console.log(sql, sqlValues);
8182
+ if (CFG.DEBUG) {
8183
+ console.log(sql, sqlValues);
8184
+ }
8065
8185
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
8066
8186
  me.transaction.__addNonRequestToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8067
- tx.executeSql(sql, sqlValues, function (tx, data) {
8187
+ tx.executeSql(sql, sqlValues, function (tx) {
8068
8188
  // This SQL preserves indexes per https://www.sqlite.org/lang_altertable.html
8069
8189
  var sql = 'ALTER TABLE ' + escapeStoreNameForSQL(oldName) + ' RENAME TO ' + escapeStoreNameForSQL(name);
8070
- CFG.DEBUG && console.log(sql);
8071
- tx.executeSql(sql, [], function (tx, data) {
8190
+ if (CFG.DEBUG) {
8191
+ console.log(sql);
8192
+ }
8193
+ tx.executeSql(sql, [], function () {
8072
8194
  delete me.__pendingName;
8073
8195
  success();
8074
8196
  });
8075
8197
  }, function (tx, err) {
8076
8198
  error(err);
8077
- return true;
8199
+ return false;
8078
8200
  });
8079
8201
  });
8080
8202
  }
@@ -8153,15 +8275,19 @@
8153
8275
  * @returns {boolean}
8154
8276
  */
8155
8277
  function error(tx, err) {
8156
- CFG.DEBUG && console.log(err);
8278
+ if (CFG.DEBUG) {
8279
+ console.log(err);
8280
+ }
8157
8281
  failure(createDOMException('UnknownError', 'Could not create object store "' + storeName + '"', err));
8158
- return true;
8282
+ return false;
8159
8283
  }
8160
8284
  var escapedStoreNameSQL = escapeStoreNameForSQL(storeName);
8161
8285
  // key INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE
8162
8286
  var sql = ['CREATE TABLE', escapedStoreNameSQL, '(key BLOB', store.autoIncrement ? 'UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT' : 'PRIMARY KEY', ', value BLOB)'].join(' ');
8163
- CFG.DEBUG && console.log(sql);
8164
- tx.executeSql(sql, [], function (tx, data) {
8287
+ if (CFG.DEBUG) {
8288
+ console.log(sql);
8289
+ }
8290
+ tx.executeSql(sql, [], function (tx) {
8165
8291
  /**
8166
8292
  * @returns {void}
8167
8293
  */
@@ -8215,9 +8341,11 @@
8215
8341
  * @returns {boolean}
8216
8342
  */
8217
8343
  function error(tx, err) {
8218
- CFG.DEBUG && console.log(err);
8344
+ if (CFG.DEBUG) {
8345
+ console.log(err);
8346
+ }
8219
8347
  failure(createDOMException('UnknownError', 'Could not delete ObjectStore', err));
8220
- return true;
8348
+ return false;
8221
8349
  }
8222
8350
  tx.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?', [escapeSQLiteStatement(store.__currentName)], function (tx, data) {
8223
8351
  if (data.rows.length > 0) {
@@ -8334,6 +8462,7 @@
8334
8462
  if (me.autoIncrement) {
8335
8463
  // If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
8336
8464
  if (key === undefined) {
8465
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8337
8466
  generateKeyForStore(tx, me, function (failure, key, oldCn) {
8338
8467
  if (failure) {
8339
8468
  failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
@@ -8347,6 +8476,7 @@
8347
8476
  success(key, oldCn);
8348
8477
  }, failCb);
8349
8478
  } else {
8479
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8350
8480
  possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
8351
8481
  }
8352
8482
  // Not auto-increment
@@ -8469,13 +8599,15 @@
8469
8599
  sqlEnd.push('?)');
8470
8600
  insertSqlValues.push(escapeSQLiteStatement(encoded));
8471
8601
  var insertSql = sqlStart.join(' ') + sqlEnd.join(' ');
8472
- CFG.DEBUG && console.log('SQL for adding', insertSql, insertSqlValues);
8473
- tx.executeSql(insertSql, insertSqlValues, function (tx, data) {
8602
+ if (CFG.DEBUG) {
8603
+ console.log('SQL for adding', insertSql, insertSqlValues);
8604
+ }
8605
+ tx.executeSql(insertSql, insertSqlValues, function () {
8474
8606
  success(clonedKeyOrCurrentNumber);
8475
8607
  }, function (tx, err) {
8476
8608
  // Should occur for `add` operation
8477
8609
  error(createDOMException('ConstraintError', /** @type {string} */err.message, err));
8478
- return true;
8610
+ return false;
8479
8611
  });
8480
8612
  return undefined;
8481
8613
  })["catch"](function (err) {
@@ -8488,6 +8620,7 @@
8488
8620
  error(err);
8489
8621
  }
8490
8622
  if (typeof oldCn === 'number') {
8623
+ // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
8491
8624
  assignCurrentNumber(tx, me, oldCn, fail, fail);
8492
8625
  return null;
8493
8626
  }
@@ -8532,7 +8665,7 @@
8532
8665
  * @this {IDBObjectStoreFull}
8533
8666
  * @returns {import('./IDBRequest.js').IDBRequestFull}
8534
8667
  */
8535
- IDBObjectStore.prototype.put = function (value /*, key */) {
8668
+ IDBObjectStore.prototype.put = function (value /* , key */) {
8536
8669
  var me = this;
8537
8670
  // eslint-disable-next-line prefer-rest-params
8538
8671
  var key = arguments[1];
@@ -8571,11 +8704,13 @@
8571
8704
  var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__currentName) + ' WHERE "key" = ?';
8572
8705
  var encodedKey = /** @type {string} */_encode(key);
8573
8706
  tx.executeSql(sql, [escapeSQLiteStatement(encodedKey)], function (tx, data) {
8574
- CFG.DEBUG && console.log('Did the row with the', key, 'exist?', data.rowsAffected);
8707
+ if (CFG.DEBUG) {
8708
+ console.log('Did the row with the', key, 'exist?', data.rowsAffected);
8709
+ }
8575
8710
  cb(tx);
8576
8711
  }, function (tx, err) {
8577
8712
  error(err);
8578
- return true;
8713
+ return false;
8579
8714
  });
8580
8715
  };
8581
8716
 
@@ -8654,46 +8789,51 @@
8654
8789
  sql.push('LIMIT', String(count));
8655
8790
  }
8656
8791
  var sqlStr = sql.join(' ');
8657
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
8658
- CFG.DEBUG && console.log('Fetching', me.__currentName, sqlValues);
8659
- tx.executeSql(sqlStr, sqlValues, function (tx, data) {
8660
- CFG.DEBUG && console.log('Fetched data', data);
8661
- var ret;
8662
- try {
8663
- // Opera can't deal with the try-catch here.
8664
- if (data.rows.length === 0) {
8665
- if (getAll) {
8666
- success([]);
8667
- } else {
8668
- success();
8669
- }
8670
- return;
8671
- }
8672
- ret = [];
8673
- if (getKey) {
8674
- for (var i = 0; i < data.rows.length; i++) {
8675
- // Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
8676
- ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
8677
- }
8792
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
8793
+ if (CFG.DEBUG) {
8794
+ console.log('Fetching', me.__currentName, sqlValues);
8795
+ }
8796
+ tx.executeSql(sqlStr, sqlValues, function (tx, data) {
8797
+ if (CFG.DEBUG) {
8798
+ console.log('Fetched data', data);
8799
+ }
8800
+ var ret;
8801
+ try {
8802
+ // Opera can't deal with the try-catch here.
8803
+ if (data.rows.length === 0) {
8804
+ if (getAll) {
8805
+ success([]);
8678
8806
  } else {
8679
- for (var _i = 0; _i < data.rows.length; _i++) {
8680
- ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
8681
- }
8807
+ success();
8682
8808
  }
8683
- if (!getAll) {
8684
- ret = ret[0];
8809
+ return;
8810
+ }
8811
+ ret = [];
8812
+ if (getKey) {
8813
+ for (var i = 0; i < data.rows.length; i++) {
8814
+ // Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
8815
+ ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
8816
+ }
8817
+ } else {
8818
+ for (var _i = 0; _i < data.rows.length; _i++) {
8819
+ ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
8685
8820
  }
8686
- } catch (e) {
8687
- // If no result is returned, or error occurs when parsing JSON
8688
- CFG.DEBUG && console.log(e);
8689
8821
  }
8690
- success(ret);
8691
- }, function (tx, err) {
8692
- error(err);
8693
- return true;
8694
- });
8695
- }, undefined, me)
8696
- );
8822
+ if (!getAll) {
8823
+ ret = ret[0];
8824
+ }
8825
+ } catch (e) {
8826
+ // If no result is returned, or error occurs when parsing JSON
8827
+ if (CFG.DEBUG) {
8828
+ console.log(e);
8829
+ }
8830
+ }
8831
+ success(ret);
8832
+ }, function (tx, err) {
8833
+ error(err);
8834
+ return false;
8835
+ });
8836
+ }, undefined, me);
8697
8837
  };
8698
8838
 
8699
8839
  /**
@@ -8774,21 +8914,23 @@
8774
8914
  var sqlValues = [];
8775
8915
  setSQLForKeyRange(range, sqlQuote('key'), sqlArr, sqlValues);
8776
8916
  var sql = sqlArr.join(' ');
8777
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
8778
- CFG.DEBUG && console.log('Deleting', me.__currentName, sqlValues);
8779
- tx.executeSql(sql, sqlValues, function (tx, data) {
8780
- CFG.DEBUG && console.log('Deleted from database', data.rowsAffected);
8781
- me.__cursors.forEach(function (cursor) {
8782
- cursor.__invalidateCache(); // Delete
8783
- });
8784
-
8785
- success();
8786
- }, function (tx, err) {
8787
- error(err);
8788
- return true;
8917
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
8918
+ if (CFG.DEBUG) {
8919
+ console.log('Deleting', me.__currentName, sqlValues);
8920
+ }
8921
+ tx.executeSql(sql, sqlValues, function (tx, data) {
8922
+ if (CFG.DEBUG) {
8923
+ console.log('Deleted from database', data.rowsAffected);
8924
+ }
8925
+ me.__cursors.forEach(function (cursor) {
8926
+ cursor.__invalidateCache(); // Delete
8789
8927
  });
8790
- }, undefined, me)
8791
- );
8928
+ success();
8929
+ }, function (tx, err) {
8930
+ error(err);
8931
+ return false;
8932
+ });
8933
+ }, undefined, me);
8792
8934
  };
8793
8935
 
8794
8936
  /**
@@ -8804,20 +8946,20 @@
8804
8946
  IDBTransaction.__assertActive(me.transaction);
8805
8947
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
8806
8948
  me.transaction.__assertWritable();
8807
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8808
- tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
8809
- CFG.DEBUG && console.log('Cleared all records from database', data.rowsAffected);
8810
- me.__cursors.forEach(function (cursor) {
8811
- cursor.__invalidateCache(); // Clear
8812
- });
8813
-
8814
- success();
8815
- }, function (tx, err) {
8816
- error(err);
8817
- return true;
8949
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
8950
+ tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
8951
+ if (CFG.DEBUG) {
8952
+ console.log('Cleared all records from database', data.rowsAffected);
8953
+ }
8954
+ me.__cursors.forEach(function (cursor) {
8955
+ cursor.__invalidateCache(); // Clear
8818
8956
  });
8819
- }, undefined, me)
8820
- );
8957
+ success();
8958
+ }, function (tx, err) {
8959
+ error(err);
8960
+ return false;
8961
+ });
8962
+ }, undefined, me);
8821
8963
  };
8822
8964
 
8823
8965
  /**
@@ -9280,7 +9422,6 @@
9280
9422
  this.__setOptions({
9281
9423
  legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
9282
9424
  });
9283
-
9284
9425
  this.__transactions = [];
9285
9426
 
9286
9427
  /** @type {{[key: string]: IDBObjectStore}} */
@@ -9495,6 +9636,7 @@
9495
9636
  me.close();
9496
9637
  var ct = 0;
9497
9638
  me.__transactions.forEach(function (trans) {
9639
+ // eslint-disable-next-line camelcase -- Clear API
9498
9640
  trans.on__abort = function () {
9499
9641
  ct++;
9500
9642
  if (ct === me.__transactions.length) {
@@ -9806,14 +9948,14 @@
9806
9948
  deleteTables(i + 1);
9807
9949
  }, function () {
9808
9950
  deleteTables(i + 1);
9809
- return true;
9951
+ return false;
9810
9952
  });
9811
9953
  }
9812
9954
  })(0);
9813
- }, function (e) {
9955
+ }, function () {
9814
9956
  // __sys__ table does not exist, but that does not mean delete did not happen
9815
9957
  databaseDeleted();
9816
- return true;
9958
+ return false;
9817
9959
  });
9818
9960
  });
9819
9961
  }
@@ -9839,7 +9981,9 @@
9839
9981
  */
9840
9982
  function sysDbCreateError(tx, err) {
9841
9983
  var er = webSQLErrback( /** @type {SQLError} */err || tx);
9842
- CFG.DEBUG && console.log('Error in sysdb transaction - when creating dbVersions', err);
9984
+ if (CFG.DEBUG) {
9985
+ console.log('Error in sysdb transaction - when creating dbVersions', err);
9986
+ }
9843
9987
  failure(er);
9844
9988
  }
9845
9989
  if (sysdb) {
@@ -9954,9 +10098,9 @@
9954
10098
  */
9955
10099
  function dbCreateError(tx, err) {
9956
10100
  if (calledDbCreateError) {
9957
- return true;
10101
+ return false;
9958
10102
  }
9959
- var er = err ? webSQLErrback(err) : /** @type {Error} */tx;
10103
+ var er = err ? webSQLErrback(err) : ( /** @type {Error} */tx);
9960
10104
  calledDbCreateError = true;
9961
10105
  // Re: why bubbling here (and how cancelable is only really relevant for `window.onerror`) see: https://github.com/w3c/IndexedDB/issues/86
9962
10106
  var evt = createEvent('error', er, {
@@ -9967,7 +10111,7 @@
9967
10111
  req.__error = er;
9968
10112
  req.__result = undefined; // Must be undefined if an error per `result` getter
9969
10113
  req.dispatchEvent(evt);
9970
- return true;
10114
+ return false;
9971
10115
  }
9972
10116
 
9973
10117
  /**
@@ -10040,7 +10184,6 @@
10040
10184
  // In browser, should auto-commit
10041
10185
  cb(); // eslint-disable-line promise/no-callback-in-promise
10042
10186
  };
10043
-
10044
10187
  sysdb.transaction(function (systx) {
10045
10188
  /**
10046
10189
  * @returns {void}
@@ -10054,7 +10197,7 @@
10054
10197
  req.__result = connection;
10055
10198
  connection.__upgradeTransaction = req.__transaction = req.__result.__versionTransaction = IDBTransaction.__createInstance(req.__result, req.__result.objectStoreNames, 'versionchange');
10056
10199
  req.__done = true;
10057
- req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished, error) {
10200
+ req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished /* , error */) {
10058
10201
  req.dispatchEvent(e);
10059
10202
  if (e.__legacyOutputDidListenersThrowError) {
10060
10203
  logError('Error', 'An error occurred in an upgradeneeded handler attached to request chain', /** @type {Error} */e.__legacyOutputDidListenersThrowError); // We do nothing else with this error as per spec
@@ -10063,6 +10206,8 @@
10063
10206
  }
10064
10207
  finished();
10065
10208
  });
10209
+
10210
+ // eslint-disable-next-line camelcase -- Clear API
10066
10211
  req.transaction.on__beforecomplete = function (ev) {
10067
10212
  connection.__upgradeTransaction = null;
10068
10213
  /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */
@@ -10072,9 +10217,11 @@
10072
10217
  ev.complete();
10073
10218
  req.__transaction = null;
10074
10219
  });
10075
- return true;
10220
+ return false;
10076
10221
  });
10077
10222
  };
10223
+
10224
+ // eslint-disable-next-line camelcase -- Clear API
10078
10225
  req.transaction.on__preabort = function () {
10079
10226
  connection.__upgradeTransaction = null;
10080
10227
  // We ensure any cache is deleted before any request error events fire and try to reopen
@@ -10084,6 +10231,8 @@
10084
10231
  }
10085
10232
  }
10086
10233
  };
10234
+
10235
+ // eslint-disable-next-line camelcase -- Clear API
10087
10236
  req.transaction.on__abort = function () {
10088
10237
  req.__transaction = null;
10089
10238
  // `readyState` and `result` will be reset anyways by `dbCreateError` but we follow spec.
@@ -10097,13 +10246,15 @@
10097
10246
  cleanupDatabaseResources(me.__openDatabase, name, escapedDatabaseName, dbCreateError.bind(null, err),
10098
10247
  // @ts-expect-error It's ok
10099
10248
  reportError || dbCreateError);
10100
- return true;
10249
+ return false;
10101
10250
  }
10102
10251
  dbCreateError(err);
10103
- return true;
10252
+ return false;
10104
10253
  });
10105
10254
  });
10106
10255
  };
10256
+
10257
+ // eslint-disable-next-line camelcase -- Clear API
10107
10258
  req.transaction.on__complete = function () {
10108
10259
  if ( /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
10109
10260
  req.__transaction = null;
@@ -10130,7 +10281,6 @@
10130
10281
  // });
10131
10282
  };
10132
10283
  }
10133
-
10134
10284
  if (oldVersion === 0) {
10135
10285
  systx.executeSql('INSERT INTO dbVersions VALUES (?,?)', [sqlSafeName, version], versionSet, dbCreateError);
10136
10286
  } else {
@@ -10211,7 +10361,7 @@
10211
10361
  }, /** @type {SQLStatementErrorCallback} */dbCreateError);
10212
10362
  }, dbCreateError);
10213
10363
  }
10214
- addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
10364
+ addRequestToConnectionQueue(req, name, /* origin */undefined, function () {
10215
10365
  var latestCachedVersion;
10216
10366
  if (useDatabaseCache) {
10217
10367
  if (!(name in websqlDBCache)) {
@@ -10268,7 +10418,6 @@
10268
10418
  } catch (err) {
10269
10419
  throw err; // throw new TypeError('You have supplied a database name which does not match the currently supported configuration, possibly due to a length limit enforced for Node compatibility.');
10270
10420
  }
10271
-
10272
10421
  var useMemoryDatabase = typeof CFG.memoryDatabase === 'string';
10273
10422
  var useDatabaseCache = CFG.cacheDatabaseInstances !== false || useMemoryDatabase;
10274
10423
  var req = IDBOpenDBRequest.__createInstance();
@@ -10296,7 +10445,7 @@
10296
10445
  */
10297
10446
  function dbError(tx, err) {
10298
10447
  if (calledDBError || err === true) {
10299
- return true;
10448
+ return false;
10300
10449
  }
10301
10450
  var er = webSQLErrback( /** @type {SQLError} */err || tx);
10302
10451
  sysdbFinishedCbDelete(true, function () {
@@ -10311,7 +10460,7 @@
10311
10460
  req.dispatchEvent(e);
10312
10461
  calledDBError = true;
10313
10462
  });
10314
- return true;
10463
+ return false;
10315
10464
  }
10316
10465
  addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
10317
10466
  createSysDB(me.__openDatabase, function () {
@@ -10338,7 +10487,6 @@
10338
10487
  if (useDatabaseCache && name in websqlDBCache) {
10339
10488
  delete websqlDBCache[name]; // New calls will treat as though never existed
10340
10489
  }
10341
-
10342
10490
  delete me.__connections[name];
10343
10491
  completeDatabaseDelete();
10344
10492
  });
@@ -10440,12 +10588,12 @@
10440
10588
  */
10441
10589
  function dbGetDatabaseNamesError(tx, err) {
10442
10590
  if (calledDbCreateError) {
10443
- return true;
10591
+ return false;
10444
10592
  }
10445
10593
  var er = err ? webSQLErrback( /** @type {SQLError} */err) : tx;
10446
10594
  calledDbCreateError = true;
10447
10595
  reject(er);
10448
- return true;
10596
+ return false;
10449
10597
  }
10450
10598
  createSysDB(me.__openDatabase, function () {
10451
10599
  sysdb.readTransaction(function (sysReadTx) {
@@ -10760,25 +10908,33 @@
10760
10908
  sql.push('LIMIT', String(recordsToLoad));
10761
10909
  }
10762
10910
  var sqlStr = sql.join(' ');
10763
- CFG.DEBUG && console.log(sqlStr, sqlValues);
10911
+ if (CFG.DEBUG) {
10912
+ console.log(sqlStr, sqlValues);
10913
+ }
10764
10914
  tx.executeSql(sqlStr, sqlValues, function (tx, data) {
10765
10915
  if (me.__count) {
10766
10916
  success(undefined, data.rows.length, undefined);
10767
10917
  } else if (data.rows.length > 1) {
10768
10918
  me.__prefetchedIndex = 0;
10769
10919
  me.__prefetchedData = data.rows;
10770
- CFG.DEBUG && console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
10920
+ if (CFG.DEBUG) {
10921
+ console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
10922
+ }
10771
10923
  me.__decode(data.rows.item(0), success);
10772
10924
  } else if (data.rows.length === 1) {
10773
10925
  me.__decode(data.rows.item(0), success);
10774
10926
  } else {
10775
- CFG.DEBUG && console.log('Reached end of cursors');
10927
+ if (CFG.DEBUG) {
10928
+ console.log('Reached end of cursors');
10929
+ }
10776
10930
  success(undefined, undefined, undefined);
10777
10931
  }
10778
10932
  }, function (tx, err) {
10779
- CFG.DEBUG && console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
10933
+ if (CFG.DEBUG) {
10934
+ console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
10935
+ }
10780
10936
  error(err);
10781
- return true;
10937
+ return false;
10782
10938
  });
10783
10939
  };
10784
10940
  var leftBracketRegex = /\[/g;
@@ -10796,7 +10952,9 @@
10796
10952
  IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
10797
10953
  var me = this;
10798
10954
  if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
10799
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
10955
+ if (CFG.DEBUG) {
10956
+ console.log('Reached end of multiEntry cursor');
10957
+ }
10800
10958
  success(undefined, undefined, undefined);
10801
10959
  return;
10802
10960
  }
@@ -10848,7 +11006,9 @@
10848
11006
  }
10849
11007
  }
10850
11008
  var sqlStr = sql.join(' ');
10851
- CFG.DEBUG && console.log(sqlStr, sqlValues);
11009
+ if (CFG.DEBUG) {
11010
+ console.log(sqlStr, sqlValues);
11011
+ }
10852
11012
  tx.executeSql(sqlStr, sqlValues, function (tx, data) {
10853
11013
  if (data.rows.length > 0) {
10854
11014
  if (me.__count) {
@@ -10877,8 +11037,8 @@
10877
11037
  * @type {RowItemNonNull}
10878
11038
  */
10879
11039
  var clone = {
10880
- matchingKey: /** @type {string} */
10881
- _encode(matchingKey, true),
11040
+ matchingKey: ( /** @type {string} */
11041
+ _encode(matchingKey, true)),
10882
11042
  key: _rowItem.key
10883
11043
  };
10884
11044
  clone[me.__keyColumnName] = _rowItem[me.__keyColumnName];
@@ -10920,23 +11080,33 @@
10920
11080
  return this.data[index];
10921
11081
  }
10922
11082
  };
10923
- CFG.DEBUG && console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
11083
+ if (CFG.DEBUG) {
11084
+ console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
11085
+ }
10924
11086
  me.__decode(rows[0], success);
10925
11087
  } else if (rows.length === 1) {
10926
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11088
+ if (CFG.DEBUG) {
11089
+ console.log('Reached end of multiEntry cursor');
11090
+ }
10927
11091
  me.__decode(rows[0], success);
10928
11092
  } else {
10929
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11093
+ if (CFG.DEBUG) {
11094
+ console.log('Reached end of multiEntry cursor');
11095
+ }
10930
11096
  success(undefined, undefined, undefined);
10931
11097
  }
10932
11098
  } else {
10933
- CFG.DEBUG && console.log('Reached end of multiEntry cursor');
11099
+ if (CFG.DEBUG) {
11100
+ console.log('Reached end of multiEntry cursor');
11101
+ }
10934
11102
  success(undefined, undefined, undefined);
10935
11103
  }
10936
11104
  }, function (tx, err) {
10937
- CFG.DEBUG && console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
11105
+ if (CFG.DEBUG) {
11106
+ console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
11107
+ }
10938
11108
  error(err);
10939
- return true;
11109
+ return false;
10940
11110
  });
10941
11111
  };
10942
11112
 
@@ -11025,7 +11195,7 @@
11025
11195
  var key = _decode(encKey, me.__multiEntryIndex);
11026
11196
  var val = me.__valueDecoder.decode(encVal);
11027
11197
  var primaryKey = _decode(encPrimaryKey);
11028
- callback(key, val, primaryKey, encKey /*, encVal, encPrimaryKey */);
11198
+ callback(key, val, primaryKey, encKey /* , encVal, encPrimaryKey */);
11029
11199
  };
11030
11200
 
11031
11201
  /**
@@ -11237,7 +11407,9 @@
11237
11407
  */
11238
11408
  IDBCursor.prototype.update = function (valueToUpdate) {
11239
11409
  var me = this;
11240
- if (!arguments.length) throw new TypeError('A value must be passed to update()');
11410
+ if (!arguments.length) {
11411
+ throw new TypeError('A value must be passed to update()');
11412
+ }
11241
11413
  IDBTransaction.__assertActive(me.__store.transaction);
11242
11414
  /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
11243
11415
  me.__store.transaction.__assertWritable();
@@ -11291,28 +11463,29 @@
11291
11463
  if (me.__keyOnly) {
11292
11464
  throw createDOMException('InvalidStateError', 'This cursor method cannot be called when the key only flag has been set.');
11293
11465
  }
11294
- return (/** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
11295
- me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
11296
- function (key, value, primaryKey) {
11297
- var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
11298
- CFG.DEBUG && console.log(sql, key, primaryKey);
11299
- // Key.convertValueToKey(primaryKey); // Already checked when entered
11300
- tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
11301
- if (data.rowsAffected === 1) {
11302
- // We don't invalidate the cache (as we don't access it anymore
11303
- // and it will set the index off)
11304
- success(undefined);
11305
- } else {
11306
- // @ts-expect-error Apparently ok
11307
- error('No rows with key found' + key);
11308
- }
11309
- }, function (tx, data) {
11310
- error(data);
11311
- return true;
11312
- });
11313
- }, error);
11314
- }, undefined, me)
11315
- );
11466
+ return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
11467
+ me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
11468
+ function (key, value, primaryKey) {
11469
+ var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
11470
+ if (CFG.DEBUG) {
11471
+ console.log(sql, key, primaryKey);
11472
+ }
11473
+ // Key.convertValueToKey(primaryKey); // Already checked when entered
11474
+ tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
11475
+ if (data.rowsAffected === 1) {
11476
+ // We don't invalidate the cache (as we don't access it anymore
11477
+ // and it will set the index off)
11478
+ success(undefined);
11479
+ } else {
11480
+ // @ts-expect-error Apparently ok
11481
+ error('No rows with key found' + key);
11482
+ }
11483
+ }, function (tx, data) {
11484
+ error(data);
11485
+ return false;
11486
+ });
11487
+ }, error);
11488
+ }, undefined, me);
11316
11489
  };
11317
11490
  IDBCursor.prototype[Symbol.toStringTag] = 'IDBCursorPrototype';
11318
11491
  defineReadonlyOuterInterface(IDBCursor.prototype, ['source', 'direction', 'key', 'primaryKey', 'request']);
@@ -11510,8 +11683,7 @@
11510
11683
  }
11511
11684
  } else {
11512
11685
  var o = _defineAccessor("get", {}, name, function () {
11513
- return (/** @type {AnyFunction} */ /** @type {PropertyDescriptor} */propDesc.get.call(this)
11514
- );
11686
+ return /** @type {AnyFunction} */( /** @type {PropertyDescriptor} */propDesc.get).call(this);
11515
11687
  });
11516
11688
  desc = /** @type {PropertyDescriptor} */
11517
11689
  Object.getOwnPropertyDescriptor(o, name);
@@ -11526,7 +11698,9 @@
11526
11698
 
11527
11699
  // @ts-expect-error It's ok
11528
11700
  if (IDB[name] !== value) {
11529
- typeof console !== 'undefined' && console.warn && console.warn('Unable to shim ' + name);
11701
+ if (typeof console !== 'undefined' && console.warn) {
11702
+ console.warn('Unable to shim ' + name);
11703
+ }
11530
11704
  }
11531
11705
  }
11532
11706
  if (CFG.win.openDatabase !== undefined) {
@@ -11705,8 +11879,7 @@
11705
11879
  IDB.IDBCursor = IDB.IDBCursor || 'webkitIDBCursor' in IDB && IDB.webkitIDBCursor;
11706
11880
  IDB.IDBKeyRange = IDB.IDBKeyRange || 'webkitIDBKeyRange' in IDB && IDB.webkitIDBKeyRange;
11707
11881
  }
11708
- return (/** @type {ShimmedObject} */IDB
11709
- );
11882
+ return /** @type {ShimmedObject} */IDB;
11710
11883
  }
11711
11884
 
11712
11885
  /* eslint-env browser, worker */