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.
- package/README.md +1 -1
- package/badges/licenses-badge-dev.svg +1 -1
- package/dist/indexeddbshim-Key.js +90 -82
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +2 -2
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +824 -487
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +947 -774
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +824 -487
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +947 -774
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +2 -2
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +947 -774
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +2 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/index.html +1 -1
- package/package.json +35 -34
- package/src/DOMException.js +3 -4
- package/src/DOMStringList.js +1 -1
- package/src/IDBCursor.js +19 -17
- package/src/IDBDatabase.js +1 -0
- package/src/IDBFactory.js +23 -16
- package/src/IDBIndex.js +17 -23
- package/src/IDBKeyRange.js +4 -4
- package/src/IDBObjectStore.js +29 -26
- package/src/IDBTransaction.js +7 -8
- package/src/Key.d.ts +1 -0
- package/src/Key.js +11 -12
- package/src/setGlobalVars.js +3 -1
- package/src/util.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v13.0.0 - 12/7/2023 */
|
|
2
2
|
|
|
3
3
|
(function (factory) {
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -17,370 +17,370 @@
|
|
|
17
17
|
UnicodeIDStart: UnicodeIDStart
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
function _defineAccessor(
|
|
21
|
-
var
|
|
20
|
+
function _defineAccessor(e, r, n, t) {
|
|
21
|
+
var c = {
|
|
22
22
|
configurable: !0,
|
|
23
23
|
enumerable: !0
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
function _iterableToArrayLimit(
|
|
28
|
-
var
|
|
29
|
-
if (null !=
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
return c[e] = t, Object.defineProperty(r, n, c);
|
|
26
|
+
}
|
|
27
|
+
function _iterableToArrayLimit(r, l) {
|
|
28
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
29
|
+
if (null != t) {
|
|
30
|
+
var e,
|
|
31
|
+
n,
|
|
32
|
+
i,
|
|
33
|
+
u,
|
|
34
|
+
a = [],
|
|
35
|
+
f = !0,
|
|
36
|
+
o = !1;
|
|
37
37
|
try {
|
|
38
|
-
if (
|
|
39
|
-
if (Object(
|
|
40
|
-
|
|
41
|
-
} else for (; !(
|
|
42
|
-
} catch (
|
|
43
|
-
|
|
38
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
39
|
+
if (Object(t) !== t) return;
|
|
40
|
+
f = !1;
|
|
41
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
42
|
+
} catch (r) {
|
|
43
|
+
o = !0, n = r;
|
|
44
44
|
} finally {
|
|
45
45
|
try {
|
|
46
|
-
if (!
|
|
46
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
47
47
|
} finally {
|
|
48
|
-
if (
|
|
48
|
+
if (o) throw n;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
return
|
|
51
|
+
return a;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function ownKeys$1(
|
|
55
|
-
var
|
|
54
|
+
function ownKeys$1(e, r) {
|
|
55
|
+
var t = Object.keys(e);
|
|
56
56
|
if (Object.getOwnPropertySymbols) {
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
return Object.getOwnPropertyDescriptor(
|
|
60
|
-
})),
|
|
61
|
-
}
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
function _objectSpread2$1(
|
|
65
|
-
for (var
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
_defineProperty$1(
|
|
69
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
70
|
-
Object.defineProperty(
|
|
57
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
58
|
+
r && (o = o.filter(function (r) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
60
|
+
})), t.push.apply(t, o);
|
|
61
|
+
}
|
|
62
|
+
return t;
|
|
63
|
+
}
|
|
64
|
+
function _objectSpread2$1(e) {
|
|
65
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
66
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
67
|
+
r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
|
|
68
|
+
_defineProperty$1(e, r, t[r]);
|
|
69
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
|
|
70
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return e;
|
|
74
74
|
}
|
|
75
75
|
function _regeneratorRuntime() {
|
|
76
76
|
_regeneratorRuntime = function () {
|
|
77
|
-
return
|
|
77
|
+
return e;
|
|
78
78
|
};
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
var t,
|
|
80
|
+
e = {},
|
|
81
|
+
r = Object.prototype,
|
|
82
|
+
n = r.hasOwnProperty,
|
|
83
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
84
|
+
t[e] = r.value;
|
|
84
85
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
function define(
|
|
90
|
-
return Object.defineProperty(
|
|
91
|
-
value:
|
|
86
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
87
|
+
a = i.iterator || "@@iterator",
|
|
88
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
89
|
+
u = i.toStringTag || "@@toStringTag";
|
|
90
|
+
function define(t, e, r) {
|
|
91
|
+
return Object.defineProperty(t, e, {
|
|
92
|
+
value: r,
|
|
92
93
|
enumerable: !0,
|
|
93
94
|
configurable: !0,
|
|
94
95
|
writable: !0
|
|
95
|
-
}),
|
|
96
|
+
}), t[e];
|
|
96
97
|
}
|
|
97
98
|
try {
|
|
98
99
|
define({}, "");
|
|
99
|
-
} catch (
|
|
100
|
-
define = function (
|
|
101
|
-
return
|
|
100
|
+
} catch (t) {
|
|
101
|
+
define = function (t, e, r) {
|
|
102
|
+
return t[e] = r;
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
|
-
function wrap(
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return
|
|
109
|
-
value: makeInvokeMethod(
|
|
110
|
-
}),
|
|
105
|
+
function wrap(t, e, r, n) {
|
|
106
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
107
|
+
a = Object.create(i.prototype),
|
|
108
|
+
c = new Context(n || []);
|
|
109
|
+
return o(a, "_invoke", {
|
|
110
|
+
value: makeInvokeMethod(t, r, c)
|
|
111
|
+
}), a;
|
|
111
112
|
}
|
|
112
|
-
function tryCatch(
|
|
113
|
+
function tryCatch(t, e, r) {
|
|
113
114
|
try {
|
|
114
115
|
return {
|
|
115
116
|
type: "normal",
|
|
116
|
-
arg:
|
|
117
|
+
arg: t.call(e, r)
|
|
117
118
|
};
|
|
118
|
-
} catch (
|
|
119
|
+
} catch (t) {
|
|
119
120
|
return {
|
|
120
121
|
type: "throw",
|
|
121
|
-
arg:
|
|
122
|
+
arg: t
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
var
|
|
126
|
+
e.wrap = wrap;
|
|
127
|
+
var h = "suspendedStart",
|
|
128
|
+
l = "suspendedYield",
|
|
129
|
+
f = "executing",
|
|
130
|
+
s = "completed",
|
|
131
|
+
y = {};
|
|
127
132
|
function Generator() {}
|
|
128
133
|
function GeneratorFunction() {}
|
|
129
134
|
function GeneratorFunctionPrototype() {}
|
|
130
|
-
var
|
|
131
|
-
define(
|
|
135
|
+
var p = {};
|
|
136
|
+
define(p, a, function () {
|
|
132
137
|
return this;
|
|
133
138
|
});
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
function defineIteratorMethods(
|
|
139
|
-
["next", "throw", "return"].forEach(function (
|
|
140
|
-
define(
|
|
141
|
-
return this._invoke(
|
|
139
|
+
var d = Object.getPrototypeOf,
|
|
140
|
+
v = d && d(d(values([])));
|
|
141
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
142
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
143
|
+
function defineIteratorMethods(t) {
|
|
144
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
145
|
+
define(t, e, function (t) {
|
|
146
|
+
return this._invoke(e, t);
|
|
142
147
|
});
|
|
143
148
|
});
|
|
144
149
|
}
|
|
145
|
-
function AsyncIterator(
|
|
146
|
-
function invoke(
|
|
147
|
-
var
|
|
148
|
-
if ("throw" !==
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
return
|
|
152
|
-
invoke("next",
|
|
153
|
-
}, function (
|
|
154
|
-
invoke("throw",
|
|
155
|
-
}) :
|
|
156
|
-
|
|
157
|
-
}, function (
|
|
158
|
-
return invoke("throw",
|
|
150
|
+
function AsyncIterator(t, e) {
|
|
151
|
+
function invoke(r, o, i, a) {
|
|
152
|
+
var c = tryCatch(t[r], t, o);
|
|
153
|
+
if ("throw" !== c.type) {
|
|
154
|
+
var u = c.arg,
|
|
155
|
+
h = u.value;
|
|
156
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
157
|
+
invoke("next", t, i, a);
|
|
158
|
+
}, function (t) {
|
|
159
|
+
invoke("throw", t, i, a);
|
|
160
|
+
}) : e.resolve(h).then(function (t) {
|
|
161
|
+
u.value = t, i(u);
|
|
162
|
+
}, function (t) {
|
|
163
|
+
return invoke("throw", t, i, a);
|
|
159
164
|
});
|
|
160
165
|
}
|
|
161
|
-
|
|
166
|
+
a(c.arg);
|
|
162
167
|
}
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
value: function (
|
|
168
|
+
var r;
|
|
169
|
+
o(this, "_invoke", {
|
|
170
|
+
value: function (t, n) {
|
|
166
171
|
function callInvokeWithMethodAndArg() {
|
|
167
|
-
return new
|
|
168
|
-
invoke(
|
|
172
|
+
return new e(function (e, r) {
|
|
173
|
+
invoke(t, n, e, r);
|
|
169
174
|
});
|
|
170
175
|
}
|
|
171
|
-
return
|
|
176
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
172
177
|
}
|
|
173
178
|
});
|
|
174
179
|
}
|
|
175
|
-
function makeInvokeMethod(
|
|
176
|
-
var
|
|
177
|
-
return function (
|
|
178
|
-
if (
|
|
179
|
-
if (
|
|
180
|
-
if ("throw" ===
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
180
|
+
function makeInvokeMethod(e, r, n) {
|
|
181
|
+
var o = h;
|
|
182
|
+
return function (i, a) {
|
|
183
|
+
if (o === f) throw new Error("Generator is already running");
|
|
184
|
+
if (o === s) {
|
|
185
|
+
if ("throw" === i) throw a;
|
|
186
|
+
return {
|
|
187
|
+
value: t,
|
|
188
|
+
done: !0
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
for (n.method = i, n.arg = a;;) {
|
|
192
|
+
var c = n.delegate;
|
|
193
|
+
if (c) {
|
|
194
|
+
var u = maybeInvokeDelegate(c, n);
|
|
195
|
+
if (u) {
|
|
196
|
+
if (u === y) continue;
|
|
197
|
+
return u;
|
|
190
198
|
}
|
|
191
199
|
}
|
|
192
|
-
if ("next" ===
|
|
193
|
-
if (
|
|
194
|
-
|
|
195
|
-
} else "return" ===
|
|
196
|
-
|
|
197
|
-
var
|
|
198
|
-
if ("normal" ===
|
|
199
|
-
if (
|
|
200
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
201
|
+
if (o === h) throw o = s, n.arg;
|
|
202
|
+
n.dispatchException(n.arg);
|
|
203
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
204
|
+
o = f;
|
|
205
|
+
var p = tryCatch(e, r, n);
|
|
206
|
+
if ("normal" === p.type) {
|
|
207
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
200
208
|
return {
|
|
201
|
-
value:
|
|
202
|
-
done:
|
|
209
|
+
value: p.arg,
|
|
210
|
+
done: n.done
|
|
203
211
|
};
|
|
204
212
|
}
|
|
205
|
-
"throw" ===
|
|
213
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
206
214
|
}
|
|
207
215
|
};
|
|
208
216
|
}
|
|
209
|
-
function maybeInvokeDelegate(
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
var
|
|
214
|
-
if ("throw" ===
|
|
215
|
-
var
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
function pushTryEntry(
|
|
219
|
-
var
|
|
220
|
-
tryLoc:
|
|
217
|
+
function maybeInvokeDelegate(e, r) {
|
|
218
|
+
var n = r.method,
|
|
219
|
+
o = e.iterator[n];
|
|
220
|
+
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;
|
|
221
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
222
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
223
|
+
var a = i.arg;
|
|
224
|
+
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);
|
|
225
|
+
}
|
|
226
|
+
function pushTryEntry(t) {
|
|
227
|
+
var e = {
|
|
228
|
+
tryLoc: t[0]
|
|
221
229
|
};
|
|
222
|
-
1 in
|
|
230
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
223
231
|
}
|
|
224
|
-
function resetTryEntry(
|
|
225
|
-
var
|
|
226
|
-
|
|
232
|
+
function resetTryEntry(t) {
|
|
233
|
+
var e = t.completion || {};
|
|
234
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
227
235
|
}
|
|
228
|
-
function Context(
|
|
236
|
+
function Context(t) {
|
|
229
237
|
this.tryEntries = [{
|
|
230
238
|
tryLoc: "root"
|
|
231
|
-
}],
|
|
232
|
-
}
|
|
233
|
-
function values(
|
|
234
|
-
if (
|
|
235
|
-
var
|
|
236
|
-
if (
|
|
237
|
-
if ("function" == typeof
|
|
238
|
-
if (!isNaN(
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
for (; ++
|
|
242
|
-
return next.value =
|
|
239
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
240
|
+
}
|
|
241
|
+
function values(e) {
|
|
242
|
+
if (e || "" === e) {
|
|
243
|
+
var r = e[a];
|
|
244
|
+
if (r) return r.call(e);
|
|
245
|
+
if ("function" == typeof e.next) return e;
|
|
246
|
+
if (!isNaN(e.length)) {
|
|
247
|
+
var o = -1,
|
|
248
|
+
i = function next() {
|
|
249
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
250
|
+
return next.value = t, next.done = !0, next;
|
|
243
251
|
};
|
|
244
|
-
return
|
|
252
|
+
return i.next = i;
|
|
245
253
|
}
|
|
246
254
|
}
|
|
247
|
-
|
|
248
|
-
next: doneResult
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
function doneResult() {
|
|
252
|
-
return {
|
|
253
|
-
value: undefined,
|
|
254
|
-
done: !0
|
|
255
|
-
};
|
|
255
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
256
256
|
}
|
|
257
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
257
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
258
258
|
value: GeneratorFunctionPrototype,
|
|
259
259
|
configurable: !0
|
|
260
|
-
}),
|
|
260
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
261
261
|
value: GeneratorFunction,
|
|
262
262
|
configurable: !0
|
|
263
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
264
|
-
var
|
|
265
|
-
return !!
|
|
266
|
-
},
|
|
267
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
268
|
-
},
|
|
263
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
264
|
+
var e = "function" == typeof t && t.constructor;
|
|
265
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
266
|
+
}, e.mark = function (t) {
|
|
267
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
268
|
+
}, e.awrap = function (t) {
|
|
269
269
|
return {
|
|
270
|
-
__await:
|
|
270
|
+
__await: t
|
|
271
271
|
};
|
|
272
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
272
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
273
273
|
return this;
|
|
274
|
-
}),
|
|
275
|
-
void 0 ===
|
|
276
|
-
var
|
|
277
|
-
return
|
|
278
|
-
return
|
|
274
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
275
|
+
void 0 === i && (i = Promise);
|
|
276
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
277
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
278
|
+
return t.done ? t.value : a.next();
|
|
279
279
|
});
|
|
280
|
-
}, defineIteratorMethods(
|
|
280
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
281
281
|
return this;
|
|
282
|
-
}), define(
|
|
282
|
+
}), define(g, "toString", function () {
|
|
283
283
|
return "[object Generator]";
|
|
284
|
-
}),
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
for (var
|
|
288
|
-
return
|
|
289
|
-
for (;
|
|
290
|
-
var
|
|
291
|
-
if (
|
|
284
|
+
}), e.keys = function (t) {
|
|
285
|
+
var e = Object(t),
|
|
286
|
+
r = [];
|
|
287
|
+
for (var n in e) r.push(n);
|
|
288
|
+
return r.reverse(), function next() {
|
|
289
|
+
for (; r.length;) {
|
|
290
|
+
var t = r.pop();
|
|
291
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
292
292
|
}
|
|
293
293
|
return next.done = !0, next;
|
|
294
294
|
};
|
|
295
|
-
},
|
|
295
|
+
}, e.values = values, Context.prototype = {
|
|
296
296
|
constructor: Context,
|
|
297
|
-
reset: function (
|
|
298
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
297
|
+
reset: function (e) {
|
|
298
|
+
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);
|
|
299
299
|
},
|
|
300
300
|
stop: function () {
|
|
301
301
|
this.done = !0;
|
|
302
|
-
var
|
|
303
|
-
if ("throw" ===
|
|
302
|
+
var t = this.tryEntries[0].completion;
|
|
303
|
+
if ("throw" === t.type) throw t.arg;
|
|
304
304
|
return this.rval;
|
|
305
305
|
},
|
|
306
|
-
dispatchException: function (
|
|
307
|
-
if (this.done) throw
|
|
308
|
-
var
|
|
309
|
-
function handle(
|
|
310
|
-
return
|
|
311
|
-
}
|
|
312
|
-
for (var
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
if ("root" ===
|
|
316
|
-
if (
|
|
317
|
-
var
|
|
318
|
-
|
|
319
|
-
if (
|
|
320
|
-
if (this.prev <
|
|
321
|
-
if (this.prev <
|
|
322
|
-
} else if (
|
|
323
|
-
if (this.prev <
|
|
306
|
+
dispatchException: function (e) {
|
|
307
|
+
if (this.done) throw e;
|
|
308
|
+
var r = this;
|
|
309
|
+
function handle(n, o) {
|
|
310
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
311
|
+
}
|
|
312
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
313
|
+
var i = this.tryEntries[o],
|
|
314
|
+
a = i.completion;
|
|
315
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
316
|
+
if (i.tryLoc <= this.prev) {
|
|
317
|
+
var c = n.call(i, "catchLoc"),
|
|
318
|
+
u = n.call(i, "finallyLoc");
|
|
319
|
+
if (c && u) {
|
|
320
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
321
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
322
|
+
} else if (c) {
|
|
323
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
324
324
|
} else {
|
|
325
|
-
if (!
|
|
326
|
-
if (this.prev <
|
|
325
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
326
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
|
-
abrupt: function (
|
|
332
|
-
for (var
|
|
333
|
-
var
|
|
334
|
-
if (
|
|
335
|
-
var
|
|
331
|
+
abrupt: function (t, e) {
|
|
332
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
333
|
+
var o = this.tryEntries[r];
|
|
334
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
335
|
+
var i = o;
|
|
336
336
|
break;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
var
|
|
341
|
-
return
|
|
339
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
340
|
+
var a = i ? i.completion : {};
|
|
341
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
342
342
|
},
|
|
343
|
-
complete: function (
|
|
344
|
-
if ("throw" ===
|
|
345
|
-
return "break" ===
|
|
343
|
+
complete: function (t, e) {
|
|
344
|
+
if ("throw" === t.type) throw t.arg;
|
|
345
|
+
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;
|
|
346
346
|
},
|
|
347
|
-
finish: function (
|
|
348
|
-
for (var
|
|
349
|
-
var
|
|
350
|
-
if (
|
|
347
|
+
finish: function (t) {
|
|
348
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
349
|
+
var r = this.tryEntries[e];
|
|
350
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
351
351
|
}
|
|
352
352
|
},
|
|
353
|
-
catch: function (
|
|
354
|
-
for (var
|
|
355
|
-
var
|
|
356
|
-
if (
|
|
357
|
-
var
|
|
358
|
-
if ("throw" ===
|
|
359
|
-
var
|
|
360
|
-
resetTryEntry(
|
|
353
|
+
catch: function (t) {
|
|
354
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
355
|
+
var r = this.tryEntries[e];
|
|
356
|
+
if (r.tryLoc === t) {
|
|
357
|
+
var n = r.completion;
|
|
358
|
+
if ("throw" === n.type) {
|
|
359
|
+
var o = n.arg;
|
|
360
|
+
resetTryEntry(r);
|
|
361
361
|
}
|
|
362
|
-
return
|
|
362
|
+
return o;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
throw new Error("illegal catch attempt");
|
|
366
366
|
},
|
|
367
|
-
delegateYield: function (
|
|
367
|
+
delegateYield: function (e, r, n) {
|
|
368
368
|
return this.delegate = {
|
|
369
|
-
iterator: values(
|
|
370
|
-
resultName:
|
|
371
|
-
nextLoc:
|
|
372
|
-
}, "next" === this.method && (this.arg =
|
|
369
|
+
iterator: values(e),
|
|
370
|
+
resultName: r,
|
|
371
|
+
nextLoc: n
|
|
372
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
373
373
|
}
|
|
374
|
-
},
|
|
374
|
+
}, e;
|
|
375
375
|
}
|
|
376
|
-
function _typeof$2(
|
|
376
|
+
function _typeof$2(o) {
|
|
377
377
|
"@babel/helpers - typeof";
|
|
378
378
|
|
|
379
|
-
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
380
|
-
return typeof
|
|
381
|
-
} : function (
|
|
382
|
-
return
|
|
383
|
-
}, _typeof$2(
|
|
379
|
+
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
380
|
+
return typeof o;
|
|
381
|
+
} : function (o) {
|
|
382
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
383
|
+
}, _typeof$2(o);
|
|
384
384
|
}
|
|
385
385
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
386
386
|
try {
|
|
@@ -725,10 +725,9 @@
|
|
|
725
725
|
pr;
|
|
726
726
|
Object.defineProperty(_this, prop, {
|
|
727
727
|
get: function get() {
|
|
728
|
-
return
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
);
|
|
728
|
+
return /* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
|
|
729
|
+
// Defaults
|
|
730
|
+
prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null;
|
|
732
731
|
}
|
|
733
732
|
});
|
|
734
733
|
});
|
|
@@ -1223,7 +1222,6 @@
|
|
|
1223
1222
|
}
|
|
1224
1223
|
});
|
|
1225
1224
|
}
|
|
1226
|
-
|
|
1227
1225
|
var _eventCopy = eventCopy,
|
|
1228
1226
|
type = _eventCopy.type;
|
|
1229
1227
|
|
|
@@ -1977,12 +1975,11 @@
|
|
|
1977
1975
|
*/
|
|
1978
1976
|
function defineOuterInterface(obj, props) {
|
|
1979
1977
|
props.forEach(function (prop) {
|
|
1980
|
-
var
|
|
1981
|
-
var o = (_o = {}, _defineAccessor("get", _o, prop, function () {
|
|
1978
|
+
var o = _defineAccessor("set", _defineAccessor("get", {}, prop, function () {
|
|
1982
1979
|
throw new TypeError('Illegal invocation');
|
|
1983
|
-
}),
|
|
1980
|
+
}), prop, function (val) {
|
|
1984
1981
|
throw new TypeError('Illegal invocation');
|
|
1985
|
-
})
|
|
1982
|
+
});
|
|
1986
1983
|
var desc = /** @type {PropertyDescriptor} */
|
|
1987
1984
|
Object.getOwnPropertyDescriptor(o, prop);
|
|
1988
1985
|
Object.defineProperty(obj, prop, desc);
|
|
@@ -2017,12 +2014,11 @@
|
|
|
2017
2014
|
function defineListenerProperties(obj, listeners) {
|
|
2018
2015
|
listeners = typeof listeners === 'string' ? [listeners] : listeners;
|
|
2019
2016
|
listeners.forEach(function (listener) {
|
|
2020
|
-
var
|
|
2021
|
-
var o = (_o3 = {}, _defineAccessor("get", _o3, listener, function () {
|
|
2017
|
+
var o = _defineAccessor("set", _defineAccessor("get", {}, listener, function () {
|
|
2022
2018
|
return obj['__' + listener];
|
|
2023
|
-
}),
|
|
2019
|
+
}), listener, function (val) {
|
|
2024
2020
|
obj['__' + listener] = val;
|
|
2025
|
-
})
|
|
2021
|
+
});
|
|
2026
2022
|
var desc = /** @type {PropertyDescriptor} */
|
|
2027
2023
|
Object.getOwnPropertyDescriptor(o, listener);
|
|
2028
2024
|
// desc.enumerable = true; // Default
|
|
@@ -2405,7 +2401,7 @@
|
|
|
2405
2401
|
function DOMException(message, name) {
|
|
2406
2402
|
// const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
|
|
2407
2403
|
this[Symbol.toStringTag] = 'DOMException';
|
|
2408
|
-
this._code = name in codes ? codes[/** @type {Code} */name] : legacyCodes[/** @type {LegacyCode} */name] || 0;
|
|
2404
|
+
this._code = name in codes ? codes[( /** @type {Code} */name)] : legacyCodes[( /** @type {LegacyCode} */name)] || 0;
|
|
2409
2405
|
this._name = name || 'Error';
|
|
2410
2406
|
// We avoid `String()` in this next line as it converts Symbols
|
|
2411
2407
|
this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion
|
|
@@ -2542,10 +2538,12 @@
|
|
|
2542
2538
|
*/
|
|
2543
2539
|
function logError(name, message, error) {
|
|
2544
2540
|
if (CFG.DEBUG) {
|
|
2545
|
-
var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : /** @type {string} */error;
|
|
2541
|
+
var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : ( /** @type {string} */error);
|
|
2546
2542
|
var method = typeof console.error === 'function' ? 'error' : 'log';
|
|
2547
2543
|
console[method](name + ': ' + message + '. ' + (msg || ''));
|
|
2548
|
-
|
|
2544
|
+
if (console.trace) {
|
|
2545
|
+
console.trace();
|
|
2546
|
+
}
|
|
2549
2547
|
}
|
|
2550
2548
|
}
|
|
2551
2549
|
|
|
@@ -2653,7 +2651,7 @@
|
|
|
2653
2651
|
}
|
|
2654
2652
|
} catch (e) {}
|
|
2655
2653
|
var createDOMException = useNativeDOMException
|
|
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
|
|
@@ -2665,7 +2663,7 @@
|
|
|
2665
2663
|
logError(name, message, error);
|
|
2666
2664
|
return createNativeDOMException(name, message);
|
|
2667
2665
|
}
|
|
2668
|
-
// eslint-disable-next-line operator-linebreak -- Need JSDoc
|
|
2666
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
|
|
2669
2667
|
:
|
|
2670
2668
|
/**
|
|
2671
2669
|
* @param {string} name
|
|
@@ -2725,7 +2723,6 @@
|
|
|
2725
2723
|
this.__setOptions({
|
|
2726
2724
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
2727
2725
|
});
|
|
2728
|
-
|
|
2729
2726
|
doneFlagGetters.forEach(function (prop) {
|
|
2730
2727
|
Object.defineProperty(_this, '__' + prop, {
|
|
2731
2728
|
enumerable: false,
|
|
@@ -3254,17 +3251,15 @@
|
|
|
3254
3251
|
var types = {
|
|
3255
3252
|
invalid: {
|
|
3256
3253
|
/**
|
|
3257
|
-
* @param {AnyValue} _key
|
|
3258
3254
|
* @returns {string}
|
|
3259
3255
|
*/
|
|
3260
|
-
encode: function encode(
|
|
3256
|
+
encode: function encode() {
|
|
3261
3257
|
return keyTypeToEncodedChar.invalid + '-';
|
|
3262
3258
|
},
|
|
3263
3259
|
/**
|
|
3264
|
-
* @param {string} _key
|
|
3265
3260
|
* @returns {undefined}
|
|
3266
3261
|
*/
|
|
3267
|
-
decode: function decode(
|
|
3262
|
+
decode: function decode() {
|
|
3268
3263
|
return undefined;
|
|
3269
3264
|
}
|
|
3270
3265
|
},
|
|
@@ -3602,11 +3597,17 @@
|
|
|
3602
3597
|
* @returns {KeyType|"invalid"}
|
|
3603
3598
|
*/
|
|
3604
3599
|
function getKeyType(key) {
|
|
3605
|
-
if (Array.isArray(key))
|
|
3606
|
-
|
|
3607
|
-
|
|
3600
|
+
if (Array.isArray(key)) {
|
|
3601
|
+
return 'array';
|
|
3602
|
+
}
|
|
3603
|
+
if (isDate(key)) {
|
|
3604
|
+
return 'date';
|
|
3605
|
+
}
|
|
3606
|
+
if (isBinary(key)) {
|
|
3607
|
+
return 'binary';
|
|
3608
|
+
}
|
|
3608
3609
|
var keyType = _typeof$2(key);
|
|
3609
|
-
return ['string', 'number'].includes(keyType) ? /** @type {"string"|"number"} */keyType : 'invalid';
|
|
3610
|
+
return ['string', 'number'].includes(keyType) ? ( /** @type {"string"|"number"} */keyType) : 'invalid';
|
|
3610
3611
|
}
|
|
3611
3612
|
|
|
3612
3613
|
/**
|
|
@@ -3703,13 +3704,11 @@
|
|
|
3703
3704
|
value: 0
|
|
3704
3705
|
};
|
|
3705
3706
|
}
|
|
3706
|
-
return
|
|
3707
|
-
);
|
|
3707
|
+
return /** @type {{type: KeyType; value: Value}} */ret;
|
|
3708
3708
|
}
|
|
3709
3709
|
case 'string':
|
|
3710
3710
|
{
|
|
3711
|
-
return
|
|
3712
|
-
);
|
|
3711
|
+
return /** @type {{type: KeyType; value: Value}} */ret;
|
|
3713
3712
|
}
|
|
3714
3713
|
case 'binary':
|
|
3715
3714
|
{
|
|
@@ -3732,48 +3731,49 @@
|
|
|
3732
3731
|
/** @type {(KeyValueObject|Value)[]} */
|
|
3733
3732
|
var keys = [];
|
|
3734
3733
|
var _loop = function _loop() {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
return {
|
|
3738
|
-
v: {
|
|
3739
|
-
type: type,
|
|
3740
|
-
invalid: true,
|
|
3741
|
-
message: 'Does not have own index property'
|
|
3742
|
-
}
|
|
3743
|
-
};
|
|
3744
|
-
}
|
|
3745
|
-
try {
|
|
3746
|
-
var entry = arr[i];
|
|
3747
|
-
var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
|
|
3748
|
-
if (key.invalid) {
|
|
3749
|
-
if (multiEntry) {
|
|
3750
|
-
return "continue";
|
|
3751
|
-
}
|
|
3734
|
+
// We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
|
|
3735
|
+
if (!multiEntry && !Object.hasOwn(arr, i)) {
|
|
3752
3736
|
return {
|
|
3753
3737
|
v: {
|
|
3754
3738
|
type: type,
|
|
3755
3739
|
invalid: true,
|
|
3756
|
-
message: '
|
|
3740
|
+
message: 'Does not have own index property'
|
|
3757
3741
|
}
|
|
3758
3742
|
};
|
|
3759
3743
|
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3744
|
+
try {
|
|
3745
|
+
var entry = arr[i];
|
|
3746
|
+
var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
|
|
3747
|
+
if (key.invalid) {
|
|
3748
|
+
if (multiEntry) {
|
|
3749
|
+
return 0; // continue
|
|
3750
|
+
}
|
|
3751
|
+
return {
|
|
3752
|
+
v: {
|
|
3753
|
+
type: type,
|
|
3754
|
+
invalid: true,
|
|
3755
|
+
message: 'Bad array entry value-to-key conversion'
|
|
3756
|
+
}
|
|
3757
|
+
};
|
|
3758
|
+
}
|
|
3759
|
+
if (!multiEntry || !fullKeys && keys.every(function (k) {
|
|
3760
|
+
return cmp(k, key.value) !== 0;
|
|
3761
|
+
}) || fullKeys && keys.every(function (k) {
|
|
3762
|
+
return cmp(k, key) !== 0;
|
|
3763
|
+
})) {
|
|
3764
|
+
keys.push(fullKeys ? key : key.value);
|
|
3765
|
+
}
|
|
3766
|
+
} catch (err) {
|
|
3767
|
+
if (!multiEntry) {
|
|
3768
|
+
throw err;
|
|
3769
|
+
}
|
|
3770
3770
|
}
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3771
|
+
},
|
|
3772
|
+
_ret;
|
|
3773
3773
|
for (var i = 0; i < len; i++) {
|
|
3774
|
-
|
|
3775
|
-
if (_ret ===
|
|
3776
|
-
if (
|
|
3774
|
+
_ret = _loop();
|
|
3775
|
+
if (_ret === 0) continue;
|
|
3776
|
+
if (_ret) return _ret.v;
|
|
3777
3777
|
}
|
|
3778
3778
|
return {
|
|
3779
3779
|
type: type,
|
|
@@ -3935,7 +3935,7 @@
|
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
3937
3937
|
var identifiers = keyPath.split('.');
|
|
3938
|
-
return identifiers.some(function (idntfr
|
|
3938
|
+
return identifiers.some(function (idntfr) {
|
|
3939
3939
|
if (idntfr === 'length' && (typeof value === 'string' || Array.isArray(value))) {
|
|
3940
3940
|
value = value.length;
|
|
3941
3941
|
} else if (isBlob(value)) {
|
|
@@ -3986,7 +3986,7 @@
|
|
|
3986
3986
|
}
|
|
3987
3987
|
value = value[identifier];
|
|
3988
3988
|
});
|
|
3989
|
-
value[/** @type {string} */last] = key; // key is already a `keyValue` in our processing so no need to convert
|
|
3989
|
+
value[( /** @type {string} */last)] = key; // key is already a `keyValue` in our processing so no need to convert
|
|
3990
3990
|
}
|
|
3991
3991
|
|
|
3992
3992
|
/**
|
|
@@ -4158,6 +4158,7 @@
|
|
|
4158
4158
|
return null;
|
|
4159
4159
|
}
|
|
4160
4160
|
// array, date, number, string, binary (should already have detected "invalid")
|
|
4161
|
+
// @ts-expect-error Argument may be ignored
|
|
4161
4162
|
return types[getKeyType(key)].encode(key, inArray);
|
|
4162
4163
|
}
|
|
4163
4164
|
|
|
@@ -4219,7 +4220,7 @@
|
|
|
4219
4220
|
}
|
|
4220
4221
|
}, function (tx, error) {
|
|
4221
4222
|
sqlFailCb(createDOMException('DataError', 'Could not get the auto increment value for key', error));
|
|
4222
|
-
return
|
|
4223
|
+
return false;
|
|
4223
4224
|
});
|
|
4224
4225
|
}
|
|
4225
4226
|
|
|
@@ -4235,12 +4236,14 @@
|
|
|
4235
4236
|
function assignCurrentNumber(tx, store, num, successCb, failCb) {
|
|
4236
4237
|
var sql = 'UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?';
|
|
4237
4238
|
var sqlValues = [num, escapeSQLiteStatement(store.__currentName)];
|
|
4238
|
-
CFG.DEBUG
|
|
4239
|
-
|
|
4239
|
+
if (CFG.DEBUG) {
|
|
4240
|
+
console.log(sql, sqlValues);
|
|
4241
|
+
}
|
|
4242
|
+
tx.executeSql(sql, sqlValues, function () {
|
|
4240
4243
|
successCb(num);
|
|
4241
4244
|
}, function (tx, err) {
|
|
4242
4245
|
failCb(createDOMException('UnknownError', 'Could not set the auto increment value for key', err));
|
|
4243
|
-
return
|
|
4246
|
+
return false;
|
|
4244
4247
|
});
|
|
4245
4248
|
}
|
|
4246
4249
|
|
|
@@ -4407,7 +4410,7 @@
|
|
|
4407
4410
|
convertValueToKeyRethrowingAndIfInvalid(upper);
|
|
4408
4411
|
}
|
|
4409
4412
|
if (lower !== undefined && upper !== undefined && lower !== upper) {
|
|
4410
|
-
if ( /** @type {string} */_encode(lower) > /** @type {string} */_encode(upper)) {
|
|
4413
|
+
if ( /** @type {string} */_encode(lower) > ( /** @type {string} */_encode(upper))) {
|
|
4411
4414
|
throw createDOMException('DataError', '`lower` must not be greater than `upper` argument in `bound()` call.');
|
|
4412
4415
|
}
|
|
4413
4416
|
}
|
|
@@ -4454,7 +4457,7 @@
|
|
|
4454
4457
|
* @param {import('./Key.js').Value} value
|
|
4455
4458
|
* @returns {globalThis.IDBKeyRange}
|
|
4456
4459
|
*/
|
|
4457
|
-
IDBKeyRange.lowerBound = function (value
|
|
4460
|
+
IDBKeyRange.lowerBound = function (value /* , open */) {
|
|
4458
4461
|
if (!arguments.length) {
|
|
4459
4462
|
throw new TypeError('IDBKeyRange.lowerBound requires a value argument');
|
|
4460
4463
|
}
|
|
@@ -4466,7 +4469,7 @@
|
|
|
4466
4469
|
* @param {import('./Key.js').Value} value
|
|
4467
4470
|
* @returns {globalThis.IDBKeyRange}
|
|
4468
4471
|
*/
|
|
4469
|
-
IDBKeyRange.upperBound = function (value
|
|
4472
|
+
IDBKeyRange.upperBound = function (value /* , open */) {
|
|
4470
4473
|
if (!arguments.length) {
|
|
4471
4474
|
throw new TypeError('IDBKeyRange.upperBound requires a value argument');
|
|
4472
4475
|
}
|
|
@@ -4532,7 +4535,9 @@
|
|
|
4532
4535
|
*/
|
|
4533
4536
|
function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, checkCached) {
|
|
4534
4537
|
if (range && (range.lower !== undefined || range.upper !== undefined)) {
|
|
4535
|
-
if (addAnd)
|
|
4538
|
+
if (addAnd) {
|
|
4539
|
+
sql.push('AND');
|
|
4540
|
+
}
|
|
4536
4541
|
var encodedLowerKey, encodedUpperKey;
|
|
4537
4542
|
var hasLower = range.lower !== undefined;
|
|
4538
4543
|
var hasUpper = range.upper !== undefined;
|
|
@@ -4550,7 +4555,9 @@
|
|
|
4550
4555
|
}
|
|
4551
4556
|
sql.push(quotedKeyColumnName, range.lowerOpen ? '>' : '>=', '?');
|
|
4552
4557
|
}
|
|
4553
|
-
hasLower && hasUpper
|
|
4558
|
+
if (hasLower && hasUpper) {
|
|
4559
|
+
sql.push('AND');
|
|
4560
|
+
}
|
|
4554
4561
|
if (hasUpper) {
|
|
4555
4562
|
sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
|
|
4556
4563
|
sqlValues.push(escapeSQLiteStatement( /** @type {string} */encodedUpperKey));
|
|
@@ -4578,12 +4585,10 @@
|
|
|
4578
4585
|
}
|
|
4579
4586
|
return undefined; // Represents unbounded
|
|
4580
4587
|
}
|
|
4581
|
-
|
|
4582
4588
|
convertValueToKeyRethrowingAndIfInvalid(value);
|
|
4583
4589
|
return IDBKeyRange.only(value);
|
|
4584
4590
|
}
|
|
4585
4591
|
|
|
4586
|
-
var _DOMStringList$protot;
|
|
4587
4592
|
/**
|
|
4588
4593
|
* @typedef {number} Integer
|
|
4589
4594
|
*/
|
|
@@ -4636,7 +4641,7 @@
|
|
|
4636
4641
|
};
|
|
4637
4642
|
|
|
4638
4643
|
// @ts-expect-error It's ok
|
|
4639
|
-
DOMStringList.prototype = (
|
|
4644
|
+
DOMStringList.prototype = _defineProperty$1(_defineProperty$1({
|
|
4640
4645
|
constructor: DOMStringList,
|
|
4641
4646
|
// Interface.
|
|
4642
4647
|
/**
|
|
@@ -4747,7 +4752,7 @@
|
|
|
4747
4752
|
}
|
|
4748
4753
|
this.sortList();
|
|
4749
4754
|
}
|
|
4750
|
-
},
|
|
4755
|
+
}, Symbol.toStringTag, 'DOMStringListPrototype'), Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4751
4756
|
var i;
|
|
4752
4757
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4753
4758
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -4768,7 +4773,7 @@
|
|
|
4768
4773
|
return _context.stop();
|
|
4769
4774
|
}
|
|
4770
4775
|
}, _callee, this);
|
|
4771
|
-
}))
|
|
4776
|
+
}));
|
|
4772
4777
|
|
|
4773
4778
|
/**
|
|
4774
4779
|
* @typedef {any} AnyValue
|
|
@@ -4807,8 +4812,7 @@
|
|
|
4807
4812
|
this._length = 0;
|
|
4808
4813
|
};
|
|
4809
4814
|
DOMStringList.prototype = DOMStringListAlias.prototype;
|
|
4810
|
-
return
|
|
4811
|
-
);
|
|
4815
|
+
return /** @type {DOMStringListFull} */new DOMStringList();
|
|
4812
4816
|
}
|
|
4813
4817
|
});
|
|
4814
4818
|
if (cleanInterface) {
|
|
@@ -4955,7 +4959,6 @@
|
|
|
4955
4959
|
me.__setOptions({
|
|
4956
4960
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
4957
4961
|
});
|
|
4958
|
-
|
|
4959
4962
|
readonlyProperties$3.forEach(function (readonlyProp) {
|
|
4960
4963
|
Object.defineProperty(_this, readonlyProp, {
|
|
4961
4964
|
configurable: true
|
|
@@ -4977,6 +4980,7 @@
|
|
|
4977
4980
|
|
|
4978
4981
|
// @ts-expect-error It's ok
|
|
4979
4982
|
IDBTransaction.prototype = EventTargetFactory.createInstance({
|
|
4983
|
+
// eslint-disable-next-line n/no-sync -- API
|
|
4980
4984
|
defaultSync: true,
|
|
4981
4985
|
// Ensure EventTarget preserves our properties
|
|
4982
4986
|
extraProperties: ['complete']
|
|
@@ -4998,7 +5002,9 @@
|
|
|
4998
5002
|
IDBTransaction.prototype.__executeRequests = function () {
|
|
4999
5003
|
var me = this;
|
|
5000
5004
|
if (me.__running) {
|
|
5001
|
-
CFG.DEBUG
|
|
5005
|
+
if (CFG.DEBUG) {
|
|
5006
|
+
console.log('Looks like the request set is already running', me.mode);
|
|
5007
|
+
}
|
|
5002
5008
|
return;
|
|
5003
5009
|
}
|
|
5004
5010
|
me.__running = true;
|
|
@@ -5027,7 +5033,6 @@
|
|
|
5027
5033
|
if (req) {
|
|
5028
5034
|
q.req = req; // Need to do this in case of cursors
|
|
5029
5035
|
}
|
|
5030
|
-
|
|
5031
5036
|
if (!q.req) {
|
|
5032
5037
|
// TS guard
|
|
5033
5038
|
return;
|
|
@@ -5191,7 +5196,9 @@
|
|
|
5191
5196
|
*/
|
|
5192
5197
|
function complete() {
|
|
5193
5198
|
me.__completed = true;
|
|
5194
|
-
CFG.DEBUG
|
|
5199
|
+
if (CFG.DEBUG) {
|
|
5200
|
+
console.log('Transaction completed');
|
|
5201
|
+
}
|
|
5195
5202
|
var evt = createEvent('complete');
|
|
5196
5203
|
try {
|
|
5197
5204
|
me.__internal = true;
|
|
@@ -5416,11 +5423,15 @@
|
|
|
5416
5423
|
*/
|
|
5417
5424
|
function abort(tx, errOrResult) {
|
|
5418
5425
|
if (!tx) {
|
|
5419
|
-
CFG.DEBUG
|
|
5426
|
+
if (CFG.DEBUG) {
|
|
5427
|
+
console.log('Rollback not possible due to missing transaction', me);
|
|
5428
|
+
}
|
|
5420
5429
|
} else if (errOrResult && 'code' in errOrResult && typeof errOrResult.code === 'number') {
|
|
5421
|
-
CFG.DEBUG
|
|
5422
|
-
|
|
5423
|
-
|
|
5430
|
+
if (CFG.DEBUG) {
|
|
5431
|
+
console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
|
|
5432
|
+
}
|
|
5433
|
+
} else if (CFG.DEBUG) {
|
|
5434
|
+
console.log('Rollback succeeded', me);
|
|
5424
5435
|
}
|
|
5425
5436
|
me.dispatchEvent(createEvent('__preabort'));
|
|
5426
5437
|
me.__requests.filter(function (q, i, arr) {
|
|
@@ -5512,7 +5523,9 @@
|
|
|
5512
5523
|
if (!(me instanceof IDBTransaction)) {
|
|
5513
5524
|
throw new TypeError('Illegal invocation');
|
|
5514
5525
|
}
|
|
5515
|
-
CFG.DEBUG
|
|
5526
|
+
if (CFG.DEBUG) {
|
|
5527
|
+
console.log('The transaction was aborted', me);
|
|
5528
|
+
}
|
|
5516
5529
|
IDBTransaction.__assertNotFinished(me);
|
|
5517
5530
|
me.__abortTransaction(null);
|
|
5518
5531
|
};
|
|
@@ -5658,24 +5671,24 @@
|
|
|
5658
5671
|
var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
5659
5672
|
if (null != r) {
|
|
5660
5673
|
var n,
|
|
5661
|
-
o,
|
|
5662
5674
|
a,
|
|
5675
|
+
o,
|
|
5663
5676
|
i,
|
|
5664
5677
|
c = [],
|
|
5665
5678
|
s = !0,
|
|
5666
5679
|
u = !1;
|
|
5667
5680
|
try {
|
|
5668
|
-
if (
|
|
5681
|
+
if (o = (r = r.call(e)).next, 0 === t) {
|
|
5669
5682
|
if (Object(r) !== r) return;
|
|
5670
5683
|
s = !1;
|
|
5671
|
-
} else for (; !(s = (n =
|
|
5684
|
+
} else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
|
|
5672
5685
|
} catch (e) {
|
|
5673
|
-
u = !0,
|
|
5686
|
+
u = !0, a = e;
|
|
5674
5687
|
} finally {
|
|
5675
5688
|
try {
|
|
5676
5689
|
if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
|
|
5677
5690
|
} finally {
|
|
5678
|
-
if (u) throw
|
|
5691
|
+
if (u) throw a;
|
|
5679
5692
|
}
|
|
5680
5693
|
}
|
|
5681
5694
|
return c;
|
|
@@ -5718,12 +5731,12 @@
|
|
|
5718
5731
|
}
|
|
5719
5732
|
}), e.prototype.then = function (t, r) {
|
|
5720
5733
|
var n = this;
|
|
5721
|
-
return new e(function (e,
|
|
5734
|
+
return new e(function (e, a) {
|
|
5722
5735
|
n.p.then(function (r) {
|
|
5723
5736
|
e(t ? t(r) : r);
|
|
5724
5737
|
})["catch"](function (e) {
|
|
5725
5738
|
return r ? r(e) : Promise.reject(e);
|
|
5726
|
-
}).then(e,
|
|
5739
|
+
}).then(e, a);
|
|
5727
5740
|
});
|
|
5728
5741
|
}, e.prototype["catch"] = function (e) {
|
|
5729
5742
|
return this.then(function () {}, e);
|
|
@@ -5764,10 +5777,10 @@
|
|
|
5764
5777
|
}
|
|
5765
5778
|
function hasConstructorOf(e, n) {
|
|
5766
5779
|
if (!e || "object" !== _typeof(e)) return !1;
|
|
5767
|
-
var
|
|
5768
|
-
if (!
|
|
5769
|
-
var
|
|
5770
|
-
return "function" != typeof
|
|
5780
|
+
var a = r(e);
|
|
5781
|
+
if (!a) return null === n;
|
|
5782
|
+
var o = t(a, "constructor") && a.constructor;
|
|
5783
|
+
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__;
|
|
5771
5784
|
}
|
|
5772
5785
|
function isPlainObject(e) {
|
|
5773
5786
|
return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
|
|
@@ -5781,10 +5794,10 @@
|
|
|
5781
5794
|
return null !== e && "object" === _typeof(e);
|
|
5782
5795
|
}
|
|
5783
5796
|
function escapeKeyPathComponent(e) {
|
|
5784
|
-
return e.
|
|
5797
|
+
return e.replaceAll("''", "''''").replace(/^$/, "''").replaceAll("~", "~0").replaceAll(".", "~1");
|
|
5785
5798
|
}
|
|
5786
5799
|
function unescapeKeyPathComponent(e) {
|
|
5787
|
-
return e.
|
|
5800
|
+
return e.replaceAll("~1", ".").replaceAll("~0", "~").replace(/^''$/, "").replaceAll("''''", "''");
|
|
5788
5801
|
}
|
|
5789
5802
|
function getByKeyPath(e, t) {
|
|
5790
5803
|
if ("" === t) return e;
|
|
@@ -5809,8 +5822,8 @@
|
|
|
5809
5822
|
return r ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5810
5823
|
}
|
|
5811
5824
|
var n = Object.keys,
|
|
5812
|
-
|
|
5813
|
-
|
|
5825
|
+
a = Object.hasOwn,
|
|
5826
|
+
o = Array.isArray,
|
|
5814
5827
|
i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
|
|
5815
5828
|
function _async(e) {
|
|
5816
5829
|
return function () {
|
|
@@ -5825,9 +5838,9 @@
|
|
|
5825
5838
|
function nestedPathsFirst(e, t) {
|
|
5826
5839
|
var r, n;
|
|
5827
5840
|
if ("" === e.keypath) return -1;
|
|
5828
|
-
var
|
|
5829
|
-
|
|
5830
|
-
return
|
|
5841
|
+
var a = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
|
|
5842
|
+
o = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
|
|
5843
|
+
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;
|
|
5831
5844
|
}
|
|
5832
5845
|
var c = function () {
|
|
5833
5846
|
function Typeson(e) {
|
|
@@ -5839,8 +5852,8 @@
|
|
|
5839
5852
|
n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
|
|
5840
5853
|
stringification: !0
|
|
5841
5854
|
});
|
|
5842
|
-
var
|
|
5843
|
-
return a
|
|
5855
|
+
var a = this.encapsulate(e, null, n);
|
|
5856
|
+
return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
|
|
5844
5857
|
return JSON.stringify(e, t, r);
|
|
5845
5858
|
});
|
|
5846
5859
|
}
|
|
@@ -5913,7 +5926,7 @@
|
|
|
5913
5926
|
d = [],
|
|
5914
5927
|
v = !("cyclic" in u) || u.cyclic,
|
|
5915
5928
|
b = u.encapsulateObserver,
|
|
5916
|
-
|
|
5929
|
+
m = function finish(e) {
|
|
5917
5930
|
var t = Object.values(f);
|
|
5918
5931
|
if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5919
5932
|
if (t.length) {
|
|
@@ -5926,25 +5939,25 @@
|
|
|
5926
5939
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5927
5940
|
}();
|
|
5928
5941
|
}(new Set(t));
|
|
5929
|
-
e && isPlainObject(e) && !
|
|
5942
|
+
e && isPlainObject(e) && !a(e, "$types") ? e.$types = f : e = {
|
|
5930
5943
|
$: e,
|
|
5931
5944
|
$types: {
|
|
5932
5945
|
$: f
|
|
5933
5946
|
}
|
|
5934
5947
|
};
|
|
5935
|
-
} else isObject(e) &&
|
|
5948
|
+
} else isObject(e) && a(e, "$types") && (e = {
|
|
5936
5949
|
$: e,
|
|
5937
5950
|
$types: !0
|
|
5938
5951
|
});
|
|
5939
5952
|
return !u.returnTypeNames && e;
|
|
5940
5953
|
},
|
|
5941
|
-
|
|
5954
|
+
h = _async(function (t, r) {
|
|
5942
5955
|
return _await(Promise.all(r.map(function (e) {
|
|
5943
5956
|
return e[1].p;
|
|
5944
5957
|
})), function (n) {
|
|
5945
5958
|
return _await(Promise.all(n.map(_async(function (n) {
|
|
5946
|
-
var
|
|
5947
|
-
|
|
5959
|
+
var a = !1,
|
|
5960
|
+
o = [],
|
|
5948
5961
|
i = _slicedToArray(r.splice(0, 1), 1),
|
|
5949
5962
|
c = _slicedToArray(i[0], 7),
|
|
5950
5963
|
s = c[0],
|
|
@@ -5953,7 +5966,7 @@
|
|
|
5953
5966
|
f = c[4],
|
|
5954
5967
|
y = c[5],
|
|
5955
5968
|
p = c[6],
|
|
5956
|
-
d =
|
|
5969
|
+
d = O(s, n, u, l, o, !0, p),
|
|
5957
5970
|
v = hasConstructorOf(d, e);
|
|
5958
5971
|
return function _invoke(e, t) {
|
|
5959
5972
|
var r = e();
|
|
@@ -5961,18 +5974,18 @@
|
|
|
5961
5974
|
}(function () {
|
|
5962
5975
|
if (s && v) return _await(d.p, function (e) {
|
|
5963
5976
|
f[y] = e;
|
|
5964
|
-
var r =
|
|
5965
|
-
return
|
|
5977
|
+
var r = h(t, o);
|
|
5978
|
+
return a = !0, r;
|
|
5966
5979
|
});
|
|
5967
5980
|
}, function (e) {
|
|
5968
|
-
return
|
|
5981
|
+
return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
|
|
5969
5982
|
});
|
|
5970
5983
|
}))), function () {
|
|
5971
5984
|
return t;
|
|
5972
5985
|
});
|
|
5973
5986
|
});
|
|
5974
5987
|
}),
|
|
5975
|
-
|
|
5988
|
+
g = function _adaptBuiltinStateObjectProperties(e, t, r) {
|
|
5976
5989
|
Object.assign(e, t);
|
|
5977
5990
|
var n = i.map(function (t) {
|
|
5978
5991
|
var r = e[t];
|
|
@@ -5982,14 +5995,14 @@
|
|
|
5982
5995
|
e[t] = n[r];
|
|
5983
5996
|
});
|
|
5984
5997
|
},
|
|
5985
|
-
|
|
5986
|
-
var
|
|
5987
|
-
|
|
5988
|
-
|
|
5998
|
+
O = function _encapsulate(t, r, i, c, l, d, v) {
|
|
5999
|
+
var m,
|
|
6000
|
+
h = {},
|
|
6001
|
+
O = _typeof(r),
|
|
5989
6002
|
w = b ? function (n) {
|
|
5990
|
-
var
|
|
5991
|
-
|
|
5992
|
-
b(Object.assign(null != n ? n :
|
|
6003
|
+
var a,
|
|
6004
|
+
o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
|
|
6005
|
+
b(Object.assign(null != n ? n : h, {
|
|
5993
6006
|
keypath: t,
|
|
5994
6007
|
value: r,
|
|
5995
6008
|
cyclic: i,
|
|
@@ -5998,12 +6011,12 @@
|
|
|
5998
6011
|
resolvingTypesonPromise: d,
|
|
5999
6012
|
awaitingTypesonPromise: hasConstructorOf(r, e)
|
|
6000
6013
|
}, {
|
|
6001
|
-
type:
|
|
6014
|
+
type: o
|
|
6002
6015
|
}));
|
|
6003
6016
|
} : null;
|
|
6004
|
-
if (["string", "boolean", "number", "undefined"].includes(
|
|
6005
|
-
replaced:
|
|
6006
|
-
}) :
|
|
6017
|
+
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 = {
|
|
6018
|
+
replaced: m
|
|
6019
|
+
}) : m = r, w && w(), m;
|
|
6007
6020
|
if (null === r) return w && w(), r;
|
|
6008
6021
|
if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
|
|
6009
6022
|
var A = y.indexOf(r);
|
|
@@ -6015,25 +6028,25 @@
|
|
|
6015
6028
|
var S,
|
|
6016
6029
|
j,
|
|
6017
6030
|
T = isPlainObject(r),
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
if (
|
|
6021
|
-
replaced:
|
|
6022
|
-
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]),
|
|
6031
|
+
N = o(r),
|
|
6032
|
+
I = (T || N) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : _(t, r, c, l, T || N, null, w);
|
|
6033
|
+
if (I !== r ? (m = I, h = {
|
|
6034
|
+
replaced: I
|
|
6035
|
+
}) : "" === 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 = {
|
|
6023
6036
|
clone: S
|
|
6024
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ?
|
|
6037
|
+
}) : (["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 = {
|
|
6025
6038
|
clone: S
|
|
6026
|
-
}), w && w(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j :
|
|
6027
|
-
if (!S) return
|
|
6039
|
+
}), w && w(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
|
|
6040
|
+
if (!S) return m;
|
|
6028
6041
|
if (c.iterateIn) {
|
|
6029
6042
|
var P = function _loop(n) {
|
|
6030
|
-
var
|
|
6031
|
-
ownKeys:
|
|
6043
|
+
var o = {
|
|
6044
|
+
ownKeys: a(r, n)
|
|
6032
6045
|
};
|
|
6033
|
-
|
|
6034
|
-
var
|
|
6035
|
-
|
|
6036
|
-
hasConstructorOf(
|
|
6046
|
+
g(c, o, function () {
|
|
6047
|
+
var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
|
|
6048
|
+
o = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
6049
|
+
hasConstructorOf(o, e) ? l.push([a, o, Boolean(i), c, S, n, c.type]) : void 0 !== o && (S[n] = o);
|
|
6037
6050
|
});
|
|
6038
6051
|
};
|
|
6039
6052
|
for (var E in r) P(E);
|
|
@@ -6042,29 +6055,29 @@
|
|
|
6042
6055
|
end: !0
|
|
6043
6056
|
});
|
|
6044
6057
|
} else n(r).forEach(function (n) {
|
|
6045
|
-
var
|
|
6046
|
-
|
|
6058
|
+
var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
|
|
6059
|
+
g(c, {
|
|
6047
6060
|
ownKeys: !0
|
|
6048
6061
|
}, function () {
|
|
6049
|
-
var t = _encapsulate(
|
|
6050
|
-
hasConstructorOf(t, e) ? l.push([
|
|
6062
|
+
var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
6063
|
+
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
6051
6064
|
});
|
|
6052
6065
|
}), w && w({
|
|
6053
6066
|
endIterateOwn: !0,
|
|
6054
6067
|
end: !0
|
|
6055
6068
|
});
|
|
6056
6069
|
if (c.iterateUnsetNumeric) {
|
|
6057
|
-
for (var
|
|
6070
|
+
for (var x = r.length, C = function _loop2(n) {
|
|
6058
6071
|
if (!(n in r)) {
|
|
6059
|
-
var
|
|
6060
|
-
|
|
6072
|
+
var a = "".concat(t).concat(t ? "." : "").concat(n);
|
|
6073
|
+
g(c, {
|
|
6061
6074
|
ownKeys: !1
|
|
6062
6075
|
}, function () {
|
|
6063
|
-
var t = _encapsulate(
|
|
6064
|
-
hasConstructorOf(t, e) ? l.push([
|
|
6076
|
+
var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
|
|
6077
|
+
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
6065
6078
|
});
|
|
6066
6079
|
}
|
|
6067
|
-
}, k = 0; k <
|
|
6080
|
+
}, k = 0; k < x; k++) C(k);
|
|
6068
6081
|
w && w({
|
|
6069
6082
|
endIterateUnsetNumeric: !0,
|
|
6070
6083
|
end: !0
|
|
@@ -6072,8 +6085,8 @@
|
|
|
6072
6085
|
}
|
|
6073
6086
|
return S;
|
|
6074
6087
|
},
|
|
6075
|
-
|
|
6076
|
-
for (var c =
|
|
6088
|
+
_ = function replace(e, t, r, n, a, o, i) {
|
|
6089
|
+
for (var c = a ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
|
|
6077
6090
|
var y = c[u];
|
|
6078
6091
|
if (y.test(t, r)) {
|
|
6079
6092
|
var p = y.type;
|
|
@@ -6086,7 +6099,7 @@
|
|
|
6086
6099
|
replaced: !0
|
|
6087
6100
|
}), (l || !y.replaceAsync) && !y.replace) return i && i({
|
|
6088
6101
|
typeDetected: !0
|
|
6089
|
-
}),
|
|
6102
|
+
}), O(e, t, v && "readonly", r, n, o, p);
|
|
6090
6103
|
i && i({
|
|
6091
6104
|
replacing: !0
|
|
6092
6105
|
});
|
|
@@ -6095,17 +6108,17 @@
|
|
|
6095
6108
|
if (void 0 === y.replace) throw new TypeError("Missing replacer");
|
|
6096
6109
|
b = y.replace(t, r);
|
|
6097
6110
|
} else b = y.replaceAsync(t, r);
|
|
6098
|
-
return
|
|
6111
|
+
return O(e, b, v && "readonly", r, n, o, p);
|
|
6099
6112
|
}
|
|
6100
6113
|
}
|
|
6101
6114
|
return t;
|
|
6102
6115
|
},
|
|
6103
|
-
w =
|
|
6116
|
+
w = O("", t, v, null != r ? r : {}, d);
|
|
6104
6117
|
if (d.length) return l && u.throwOnBadSyncType ? function () {
|
|
6105
6118
|
throw new TypeError("Sync method requested but async result obtained");
|
|
6106
|
-
}() : Promise.resolve(
|
|
6119
|
+
}() : Promise.resolve(h(w, d)).then(m);
|
|
6107
6120
|
if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
6108
|
-
return u.stringification && l ? [
|
|
6121
|
+
return u.stringification && l ? [m(w)] : l ? m(w) : Promise.resolve(m(w));
|
|
6109
6122
|
}
|
|
6110
6123
|
}, {
|
|
6111
6124
|
key: "encapsulateSync",
|
|
@@ -6128,7 +6141,7 @@
|
|
|
6128
6141
|
}, {
|
|
6129
6142
|
key: "revive",
|
|
6130
6143
|
value: function revive(t, r) {
|
|
6131
|
-
var
|
|
6144
|
+
var a = this,
|
|
6132
6145
|
i = _objectSpread2(_objectSpread2({
|
|
6133
6146
|
sync: !0
|
|
6134
6147
|
}, this.options), r),
|
|
@@ -6148,7 +6161,7 @@
|
|
|
6148
6161
|
u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
|
|
6149
6162
|
var p = function executeReviver(e, t) {
|
|
6150
6163
|
var r,
|
|
6151
|
-
n = _slicedToArray(null !== (r =
|
|
6164
|
+
n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
|
|
6152
6165
|
if (!n) throw new Error("Unregistered type: " + e);
|
|
6153
6166
|
if (c && !("revive" in n)) return t;
|
|
6154
6167
|
if (!c && n.reviveAsync) return n.reviveAsync(t, f);
|
|
@@ -6166,63 +6179,63 @@
|
|
|
6166
6179
|
if (Object.entries(u).forEach(function (e) {
|
|
6167
6180
|
var t = _slicedToArray(e, 2),
|
|
6168
6181
|
n = t[0],
|
|
6169
|
-
|
|
6170
|
-
"#" !==
|
|
6182
|
+
o = t[1];
|
|
6183
|
+
"#" !== o && [].concat(o).forEach(function (e) {
|
|
6171
6184
|
var t;
|
|
6172
|
-
_slicedToArray(null !== (t =
|
|
6185
|
+
_slicedToArray(null !== (t = a.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
|
|
6173
6186
|
keypath: n,
|
|
6174
6187
|
type: e
|
|
6175
6188
|
}), delete u[n]);
|
|
6176
6189
|
});
|
|
6177
6190
|
}), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
|
|
6178
|
-
var
|
|
6179
|
-
|
|
6191
|
+
var a = n.keypath,
|
|
6192
|
+
o = n.type;
|
|
6180
6193
|
if (isThenable(r)) return r.then(function (e) {
|
|
6181
6194
|
return reducer(e, {
|
|
6182
|
-
keypath:
|
|
6183
|
-
type:
|
|
6195
|
+
keypath: a,
|
|
6196
|
+
type: o
|
|
6184
6197
|
});
|
|
6185
6198
|
});
|
|
6186
|
-
var i = getByKeyPath(t,
|
|
6187
|
-
if (hasConstructorOf(i = p(
|
|
6188
|
-
var r = setAtKeyPath(t,
|
|
6199
|
+
var i = getByKeyPath(t, a);
|
|
6200
|
+
if (hasConstructorOf(i = p(o, i), e)) return i.then(function (e) {
|
|
6201
|
+
var r = setAtKeyPath(t, a, e);
|
|
6189
6202
|
r === e && (t = r);
|
|
6190
6203
|
});
|
|
6191
|
-
var c = setAtKeyPath(t,
|
|
6204
|
+
var c = setAtKeyPath(t, a, i);
|
|
6192
6205
|
c === i && (t = c);
|
|
6193
6206
|
}, void 0);
|
|
6194
6207
|
}();
|
|
6195
6208
|
return hasConstructorOf(b, e) ? v = b.then(function () {
|
|
6196
6209
|
return t;
|
|
6197
|
-
}) : (v = function _revive(t, r,
|
|
6210
|
+
}) : (v = function _revive(t, r, a, i, c) {
|
|
6198
6211
|
if (!y || "$types" !== t) {
|
|
6199
6212
|
var f = u[t],
|
|
6200
|
-
v =
|
|
6213
|
+
v = o(r);
|
|
6201
6214
|
if (v || isPlainObject(r)) {
|
|
6202
6215
|
var b = v ? new Array(r.length) : {};
|
|
6203
6216
|
for (n(r).forEach(function (n) {
|
|
6204
|
-
var
|
|
6217
|
+
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : b, b, n),
|
|
6205
6218
|
i = function set(e) {
|
|
6206
6219
|
return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
|
|
6207
6220
|
};
|
|
6208
|
-
hasConstructorOf(
|
|
6221
|
+
hasConstructorOf(o, e) ? d.push(o.then(function (e) {
|
|
6209
6222
|
return i(e);
|
|
6210
|
-
})) : i(
|
|
6223
|
+
})) : i(o);
|
|
6211
6224
|
}), r = b; l.length;) {
|
|
6212
|
-
var
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
w = getByKeyPath(
|
|
6225
|
+
var m = _slicedToArray(l[0], 4),
|
|
6226
|
+
h = m[0],
|
|
6227
|
+
g = m[1],
|
|
6228
|
+
O = m[2],
|
|
6229
|
+
_ = m[3],
|
|
6230
|
+
w = getByKeyPath(h, g);
|
|
6218
6231
|
if (void 0 === w) break;
|
|
6219
|
-
_
|
|
6232
|
+
O[_] = w, l.splice(0, 1);
|
|
6220
6233
|
}
|
|
6221
6234
|
}
|
|
6222
6235
|
if (!f) return r;
|
|
6223
6236
|
if ("#" === f) {
|
|
6224
|
-
var A = getByKeyPath(
|
|
6225
|
-
return void 0 === A && l.push([
|
|
6237
|
+
var A = getByKeyPath(a, r.slice(1));
|
|
6238
|
+
return void 0 === A && l.push([a, r.slice(1), i, c]), A;
|
|
6226
6239
|
}
|
|
6227
6240
|
return [].concat(f).reduce(function reducer(t, r) {
|
|
6228
6241
|
if (hasConstructorOf(t, e)) return t.then(function (e) {
|
|
@@ -6264,9 +6277,9 @@
|
|
|
6264
6277
|
key: "register",
|
|
6265
6278
|
value: function register(e, t) {
|
|
6266
6279
|
var r = this,
|
|
6267
|
-
|
|
6280
|
+
a = null != t ? t : {},
|
|
6268
6281
|
i = function R(e) {
|
|
6269
|
-
|
|
6282
|
+
o(e) ? e.forEach(function (e) {
|
|
6270
6283
|
return R(e);
|
|
6271
6284
|
}) : n(e).forEach(function (t) {
|
|
6272
6285
|
var n;
|
|
@@ -6290,7 +6303,7 @@
|
|
|
6290
6303
|
return Object.assign(Object.create(l.prototype), e);
|
|
6291
6304
|
}
|
|
6292
6305
|
};
|
|
6293
|
-
} else if (
|
|
6306
|
+
} else if (o(i)) {
|
|
6294
6307
|
var f = _slicedToArray(i, 3);
|
|
6295
6308
|
i = {
|
|
6296
6309
|
test: f[0],
|
|
@@ -6304,7 +6317,7 @@
|
|
|
6304
6317
|
test: i.test.bind(i)
|
|
6305
6318
|
};
|
|
6306
6319
|
i.replace && (y.replace = i.replace.bind(i)), i.replaceAsync && (y.replaceAsync = i.replaceAsync.bind(i));
|
|
6307
|
-
var p = "number" == typeof
|
|
6320
|
+
var p = "number" == typeof a.fallback ? a.fallback : a.fallback ? 0 : Number.POSITIVE_INFINITY;
|
|
6308
6321
|
if (i.testPlainObjects ? r.plainObjectReplacers.splice(p, 0, y) : r.nonplainObjectReplacers.splice(p, 0, y), i.revive || i.reviveAsync) {
|
|
6309
6322
|
var d = {};
|
|
6310
6323
|
i.revive && (d.revive = i.revive.bind(i)), i.reviveAsync && (d.reviveAsync = i.reviveAsync.bind(i)), r.revivers[t] = [d, {
|
|
@@ -6328,20 +6341,20 @@
|
|
|
6328
6341
|
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;
|
|
6329
6342
|
var p = function encode(e, t, r) {
|
|
6330
6343
|
null == r && (r = e.byteLength);
|
|
6331
|
-
for (var n = new Uint8Array(e, t || 0, r),
|
|
6332
|
-
return
|
|
6344
|
+
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]];
|
|
6345
|
+
return a % 3 == 2 ? o = o.slice(0, -1) + "=" : a % 3 == 1 && (o = o.slice(0, -2) + "=="), o;
|
|
6333
6346
|
},
|
|
6334
6347
|
d = function decode(e) {
|
|
6335
6348
|
var t = e.length;
|
|
6336
6349
|
if (t % 4) throw new Error("Bad base64 length: not divisible by four");
|
|
6337
6350
|
var r,
|
|
6338
6351
|
n,
|
|
6339
|
-
o,
|
|
6340
6352
|
a,
|
|
6353
|
+
o,
|
|
6341
6354
|
i = .75 * e.length,
|
|
6342
6355
|
c = 0;
|
|
6343
6356
|
"=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
|
|
6344
|
-
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)],
|
|
6357
|
+
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;
|
|
6345
6358
|
return s;
|
|
6346
6359
|
};
|
|
6347
6360
|
var v = {
|
|
@@ -6374,7 +6387,7 @@
|
|
|
6374
6387
|
}
|
|
6375
6388
|
}
|
|
6376
6389
|
},
|
|
6377
|
-
|
|
6390
|
+
m = {
|
|
6378
6391
|
bigint: {
|
|
6379
6392
|
test: function test(e) {
|
|
6380
6393
|
return "bigint" == typeof e;
|
|
@@ -6390,7 +6403,7 @@
|
|
|
6390
6403
|
for (var _r = 0; _r < e.length; _r++) t[_r] = e.charCodeAt(_r);
|
|
6391
6404
|
return t.buffer;
|
|
6392
6405
|
}
|
|
6393
|
-
var
|
|
6406
|
+
var h = {
|
|
6394
6407
|
blob: {
|
|
6395
6408
|
test: function test(e) {
|
|
6396
6409
|
return "Blob" === toStringTag(e);
|
|
@@ -6425,7 +6438,7 @@
|
|
|
6425
6438
|
}
|
|
6426
6439
|
}
|
|
6427
6440
|
};
|
|
6428
|
-
var
|
|
6441
|
+
var _ = {
|
|
6429
6442
|
cryptokey: {
|
|
6430
6443
|
test: function test(e) {
|
|
6431
6444
|
return "CryptoKey" === toStringTag(e) && e.extractable;
|
|
@@ -6483,9 +6496,9 @@
|
|
|
6483
6496
|
t = _ref2.byteOffset,
|
|
6484
6497
|
r = _ref2.byteLength;
|
|
6485
6498
|
n.buffers || (n.buffers = []);
|
|
6486
|
-
var
|
|
6487
|
-
return
|
|
6488
|
-
index:
|
|
6499
|
+
var a = n.buffers.indexOf(e);
|
|
6500
|
+
return a > -1 ? {
|
|
6501
|
+
index: a,
|
|
6489
6502
|
byteOffset: t,
|
|
6490
6503
|
byteLength: r
|
|
6491
6504
|
} : (n.buffers.push(e), {
|
|
@@ -6498,10 +6511,10 @@
|
|
|
6498
6511
|
t.buffers || (t.buffers = []);
|
|
6499
6512
|
var r = e.byteOffset,
|
|
6500
6513
|
n = e.byteLength,
|
|
6501
|
-
|
|
6502
|
-
|
|
6514
|
+
a = e.encoded,
|
|
6515
|
+
o = e.index;
|
|
6503
6516
|
var i;
|
|
6504
|
-
return "index" in e ? i = t.buffers[
|
|
6517
|
+
return "index" in e ? i = t.buffers[o] : (i = d(a), t.buffers.push(i)), new DataView(i, r, n);
|
|
6505
6518
|
}
|
|
6506
6519
|
}
|
|
6507
6520
|
},
|
|
@@ -6520,25 +6533,152 @@
|
|
|
6520
6533
|
}
|
|
6521
6534
|
},
|
|
6522
6535
|
S = {
|
|
6536
|
+
domexception: {
|
|
6537
|
+
test: function test(e) {
|
|
6538
|
+
return "DOMException" === toStringTag(e);
|
|
6539
|
+
},
|
|
6540
|
+
replace: function replace(e) {
|
|
6541
|
+
return {
|
|
6542
|
+
name: e.name,
|
|
6543
|
+
message: e.message
|
|
6544
|
+
};
|
|
6545
|
+
},
|
|
6546
|
+
revive: function revive(_ref3) {
|
|
6547
|
+
var e = _ref3.message,
|
|
6548
|
+
t = _ref3.name;
|
|
6549
|
+
return new DOMException(e, t);
|
|
6550
|
+
}
|
|
6551
|
+
}
|
|
6552
|
+
},
|
|
6553
|
+
j = {};
|
|
6554
|
+
function create$5(e) {
|
|
6555
|
+
j[e.name.toLowerCase()] = {
|
|
6556
|
+
test: function test(t) {
|
|
6557
|
+
return toStringTag(t) === e.name;
|
|
6558
|
+
},
|
|
6559
|
+
replace: function replace(e) {
|
|
6560
|
+
return e.is2D ? {
|
|
6561
|
+
a: e.a,
|
|
6562
|
+
b: e.b,
|
|
6563
|
+
c: e.c,
|
|
6564
|
+
d: e.d,
|
|
6565
|
+
e: e.e,
|
|
6566
|
+
f: e.f
|
|
6567
|
+
} : {
|
|
6568
|
+
m11: e.m11,
|
|
6569
|
+
m12: e.m12,
|
|
6570
|
+
m13: e.m13,
|
|
6571
|
+
m14: e.m14,
|
|
6572
|
+
m21: e.m21,
|
|
6573
|
+
m22: e.m22,
|
|
6574
|
+
m23: e.m23,
|
|
6575
|
+
m24: e.m24,
|
|
6576
|
+
m31: e.m31,
|
|
6577
|
+
m32: e.m32,
|
|
6578
|
+
m33: e.m33,
|
|
6579
|
+
m34: e.m34,
|
|
6580
|
+
m41: e.m41,
|
|
6581
|
+
m42: e.m42,
|
|
6582
|
+
m43: e.m43,
|
|
6583
|
+
m44: e.m44
|
|
6584
|
+
};
|
|
6585
|
+
},
|
|
6586
|
+
revive: function revive(t) {
|
|
6587
|
+
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]);
|
|
6588
|
+
}
|
|
6589
|
+
};
|
|
6590
|
+
}
|
|
6591
|
+
"undefined" != typeof DOMMatrix && create$5(DOMMatrix), "undefined" != typeof DOMMatrixReadOnly && create$5(DOMMatrixReadOnly);
|
|
6592
|
+
var T = {};
|
|
6593
|
+
function create$4(e) {
|
|
6594
|
+
T[e.name.toLowerCase()] = {
|
|
6595
|
+
test: function test(t) {
|
|
6596
|
+
return toStringTag(t) === e.name;
|
|
6597
|
+
},
|
|
6598
|
+
replace: function replace(e) {
|
|
6599
|
+
return {
|
|
6600
|
+
x: e.x,
|
|
6601
|
+
y: e.y,
|
|
6602
|
+
z: e.z,
|
|
6603
|
+
w: e.w
|
|
6604
|
+
};
|
|
6605
|
+
},
|
|
6606
|
+
revive: function revive(_ref4) {
|
|
6607
|
+
var t = _ref4.x,
|
|
6608
|
+
r = _ref4.y,
|
|
6609
|
+
n = _ref4.z,
|
|
6610
|
+
a = _ref4.w;
|
|
6611
|
+
return new e(t, r, n, a);
|
|
6612
|
+
}
|
|
6613
|
+
};
|
|
6614
|
+
}
|
|
6615
|
+
"undefined" != typeof DOMPoint && create$4(DOMPoint), "undefined" != typeof DOMPointReadOnly && create$4(DOMPointReadOnly);
|
|
6616
|
+
var N = {
|
|
6617
|
+
domquad: {
|
|
6618
|
+
test: function test(e) {
|
|
6619
|
+
return "DOMQuad" === toStringTag(e);
|
|
6620
|
+
},
|
|
6621
|
+
replace: function replace(e) {
|
|
6622
|
+
return {
|
|
6623
|
+
p1: e.p1,
|
|
6624
|
+
p2: e.p2,
|
|
6625
|
+
p3: e.p3,
|
|
6626
|
+
p4: e.p4
|
|
6627
|
+
};
|
|
6628
|
+
},
|
|
6629
|
+
revive: function revive(_ref5) {
|
|
6630
|
+
var e = _ref5.p1,
|
|
6631
|
+
t = _ref5.p2,
|
|
6632
|
+
r = _ref5.p3,
|
|
6633
|
+
n = _ref5.p4;
|
|
6634
|
+
return new DOMQuad(e, t, r, n);
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6637
|
+
},
|
|
6638
|
+
I = {};
|
|
6639
|
+
function create$3(e) {
|
|
6640
|
+
I[e.name.toLowerCase()] = {
|
|
6641
|
+
test: function test(t) {
|
|
6642
|
+
return toStringTag(t) === e.name;
|
|
6643
|
+
},
|
|
6644
|
+
replace: function replace(e) {
|
|
6645
|
+
return {
|
|
6646
|
+
x: e.x,
|
|
6647
|
+
y: e.y,
|
|
6648
|
+
width: e.width,
|
|
6649
|
+
height: e.height
|
|
6650
|
+
};
|
|
6651
|
+
},
|
|
6652
|
+
revive: function revive(_ref6) {
|
|
6653
|
+
var t = _ref6.x,
|
|
6654
|
+
r = _ref6.y,
|
|
6655
|
+
n = _ref6.width,
|
|
6656
|
+
a = _ref6.height;
|
|
6657
|
+
return new e(t, r, n, a);
|
|
6658
|
+
}
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6661
|
+
"undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
|
|
6662
|
+
var P = {
|
|
6523
6663
|
error: {
|
|
6524
6664
|
test: function test(e) {
|
|
6525
6665
|
return "Error" === toStringTag(e);
|
|
6526
6666
|
},
|
|
6527
|
-
replace: function replace(
|
|
6528
|
-
var e =
|
|
6529
|
-
t =
|
|
6530
|
-
r =
|
|
6531
|
-
n =
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
i =
|
|
6667
|
+
replace: function replace(_ref7) {
|
|
6668
|
+
var e = _ref7.name,
|
|
6669
|
+
t = _ref7.message,
|
|
6670
|
+
r = _ref7.cause,
|
|
6671
|
+
n = _ref7.stack,
|
|
6672
|
+
a = _ref7.fileName,
|
|
6673
|
+
o = _ref7.lineNumber,
|
|
6674
|
+
i = _ref7.columnNumber;
|
|
6535
6675
|
return {
|
|
6536
6676
|
name: e,
|
|
6537
6677
|
message: t,
|
|
6538
6678
|
cause: r,
|
|
6539
6679
|
stack: n,
|
|
6540
|
-
fileName:
|
|
6541
|
-
lineNumber:
|
|
6680
|
+
fileName: a,
|
|
6681
|
+
lineNumber: o,
|
|
6542
6682
|
columnNumber: i
|
|
6543
6683
|
};
|
|
6544
6684
|
},
|
|
@@ -6548,43 +6688,42 @@
|
|
|
6548
6688
|
}
|
|
6549
6689
|
}
|
|
6550
6690
|
},
|
|
6551
|
-
|
|
6691
|
+
E = {};
|
|
6552
6692
|
function create$2(e) {
|
|
6553
|
-
|
|
6693
|
+
E[e.name.toLowerCase()] = {
|
|
6554
6694
|
test: function test(t) {
|
|
6555
6695
|
return hasConstructorOf(t, e);
|
|
6556
6696
|
},
|
|
6557
|
-
replace: function replace(
|
|
6558
|
-
var e =
|
|
6559
|
-
t =
|
|
6560
|
-
r =
|
|
6561
|
-
n =
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
i =
|
|
6565
|
-
c =
|
|
6697
|
+
replace: function replace(_ref8) {
|
|
6698
|
+
var e = _ref8.name,
|
|
6699
|
+
t = _ref8.message,
|
|
6700
|
+
r = _ref8.cause,
|
|
6701
|
+
n = _ref8.stack,
|
|
6702
|
+
a = _ref8.fileName,
|
|
6703
|
+
o = _ref8.lineNumber,
|
|
6704
|
+
i = _ref8.columnNumber,
|
|
6705
|
+
c = _ref8.errors;
|
|
6566
6706
|
return {
|
|
6567
6707
|
name: e,
|
|
6568
6708
|
message: t,
|
|
6569
6709
|
cause: r,
|
|
6570
6710
|
stack: n,
|
|
6571
|
-
fileName:
|
|
6572
|
-
lineNumber:
|
|
6711
|
+
fileName: a,
|
|
6712
|
+
lineNumber: o,
|
|
6573
6713
|
columnNumber: i,
|
|
6574
6714
|
errors: c
|
|
6575
6715
|
};
|
|
6576
6716
|
},
|
|
6577
6717
|
revive: function revive(t) {
|
|
6578
|
-
var r = "undefined" != typeof AggregateError && e === AggregateError,
|
|
6579
|
-
|
|
6580
|
-
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;
|
|
6718
|
+
var r = "undefined" != typeof AggregateError && e === AggregateError ? new e(t.errors, t.message) : new e(t.message);
|
|
6719
|
+
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;
|
|
6581
6720
|
}
|
|
6582
6721
|
};
|
|
6583
6722
|
}
|
|
6584
6723
|
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
|
|
6585
6724
|
return create$2(e);
|
|
6586
6725
|
}), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
|
|
6587
|
-
var
|
|
6726
|
+
var x = {
|
|
6588
6727
|
file: {
|
|
6589
6728
|
test: function test(e) {
|
|
6590
6729
|
return "File" === toStringTag(e);
|
|
@@ -6599,11 +6738,11 @@
|
|
|
6599
6738
|
lastModified: e.lastModified
|
|
6600
6739
|
};
|
|
6601
6740
|
},
|
|
6602
|
-
revive: function revive(
|
|
6603
|
-
var e =
|
|
6604
|
-
t =
|
|
6605
|
-
r =
|
|
6606
|
-
n =
|
|
6741
|
+
revive: function revive(_ref9) {
|
|
6742
|
+
var e = _ref9.name,
|
|
6743
|
+
t = _ref9.type,
|
|
6744
|
+
r = _ref9.stringContents,
|
|
6745
|
+
n = _ref9.lastModified;
|
|
6607
6746
|
return new File([string2arraybuffer(r)], e, {
|
|
6608
6747
|
type: t,
|
|
6609
6748
|
lastModified: n
|
|
@@ -6626,8 +6765,8 @@
|
|
|
6626
6765
|
}
|
|
6627
6766
|
}
|
|
6628
6767
|
},
|
|
6629
|
-
|
|
6630
|
-
file:
|
|
6768
|
+
C = {
|
|
6769
|
+
file: x.file,
|
|
6631
6770
|
filelist: {
|
|
6632
6771
|
test: function test(e) {
|
|
6633
6772
|
return "FileList" === toStringTag(e);
|
|
@@ -6660,7 +6799,7 @@
|
|
|
6660
6799
|
}
|
|
6661
6800
|
}
|
|
6662
6801
|
},
|
|
6663
|
-
|
|
6802
|
+
k = {
|
|
6664
6803
|
imagebitmap: {
|
|
6665
6804
|
test: function test(e) {
|
|
6666
6805
|
return "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag;
|
|
@@ -6680,11 +6819,11 @@
|
|
|
6680
6819
|
reviveAsync: function reviveAsync(t) {
|
|
6681
6820
|
var r = document.createElement("canvas"),
|
|
6682
6821
|
n = r.getContext("2d"),
|
|
6683
|
-
|
|
6684
|
-
return
|
|
6685
|
-
n.drawImage(
|
|
6686
|
-
}),
|
|
6687
|
-
var
|
|
6822
|
+
a = document.createElement("img");
|
|
6823
|
+
return a.addEventListener("load", function () {
|
|
6824
|
+
n.drawImage(a, 0, 0);
|
|
6825
|
+
}), a.src = t, new e( /*#__PURE__*/function () {
|
|
6826
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
|
|
6688
6827
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6689
6828
|
while (1) switch (_context2.prev = _context2.next) {
|
|
6690
6829
|
case 0:
|
|
@@ -6708,13 +6847,13 @@
|
|
|
6708
6847
|
}, _callee2, null, [[0, 8]]);
|
|
6709
6848
|
}));
|
|
6710
6849
|
return function (_x3, _x4) {
|
|
6711
|
-
return
|
|
6850
|
+
return _ref10.apply(this, arguments);
|
|
6712
6851
|
};
|
|
6713
6852
|
}());
|
|
6714
6853
|
}
|
|
6715
6854
|
}
|
|
6716
6855
|
},
|
|
6717
|
-
|
|
6856
|
+
B = {
|
|
6718
6857
|
imagedata: {
|
|
6719
6858
|
test: function test(e) {
|
|
6720
6859
|
return "ImageData" === toStringTag(e);
|
|
@@ -6731,56 +6870,20 @@
|
|
|
6731
6870
|
}
|
|
6732
6871
|
}
|
|
6733
6872
|
},
|
|
6734
|
-
|
|
6873
|
+
U = {
|
|
6735
6874
|
infinity: {
|
|
6736
6875
|
test: function test(e) {
|
|
6737
6876
|
return e === Number.POSITIVE_INFINITY;
|
|
6738
6877
|
},
|
|
6739
|
-
replace: function replace(
|
|
6878
|
+
replace: function replace() {
|
|
6740
6879
|
return "Infinity";
|
|
6741
6880
|
},
|
|
6742
|
-
revive: function revive(
|
|
6881
|
+
revive: function revive() {
|
|
6743
6882
|
return Number.POSITIVE_INFINITY;
|
|
6744
6883
|
}
|
|
6745
6884
|
}
|
|
6746
6885
|
},
|
|
6747
|
-
|
|
6748
|
-
test: function test(e) {
|
|
6749
|
-
return hasConstructorOf(e, Intl.Collator);
|
|
6750
|
-
},
|
|
6751
|
-
replace: function replace(e) {
|
|
6752
|
-
return e.resolvedOptions();
|
|
6753
|
-
},
|
|
6754
|
-
revive: function revive(e) {
|
|
6755
|
-
return new Intl.Collator(e.locale, e);
|
|
6756
|
-
}
|
|
6757
|
-
},
|
|
6758
|
-
x = {
|
|
6759
|
-
IntlCollator: C,
|
|
6760
|
-
IntlDateTimeFormat: {
|
|
6761
|
-
test: function test(e) {
|
|
6762
|
-
return hasConstructorOf(e, Intl.DateTimeFormat);
|
|
6763
|
-
},
|
|
6764
|
-
replace: function replace(e) {
|
|
6765
|
-
return e.resolvedOptions();
|
|
6766
|
-
},
|
|
6767
|
-
revive: function revive(e) {
|
|
6768
|
-
return new Intl.DateTimeFormat(e.locale, e);
|
|
6769
|
-
}
|
|
6770
|
-
},
|
|
6771
|
-
IntlNumberFormat: {
|
|
6772
|
-
test: function test(e) {
|
|
6773
|
-
return hasConstructorOf(e, Intl.NumberFormat);
|
|
6774
|
-
},
|
|
6775
|
-
replace: function replace(e) {
|
|
6776
|
-
return e.resolvedOptions();
|
|
6777
|
-
},
|
|
6778
|
-
revive: function revive(e) {
|
|
6779
|
-
return new Intl.NumberFormat(e.locale, e);
|
|
6780
|
-
}
|
|
6781
|
-
}
|
|
6782
|
-
},
|
|
6783
|
-
k = {
|
|
6886
|
+
K = {
|
|
6784
6887
|
map: {
|
|
6785
6888
|
test: function test(e) {
|
|
6786
6889
|
return "Map" === toStringTag(e);
|
|
@@ -6793,46 +6896,46 @@
|
|
|
6793
6896
|
}
|
|
6794
6897
|
}
|
|
6795
6898
|
},
|
|
6796
|
-
|
|
6899
|
+
L = {
|
|
6797
6900
|
nan: {
|
|
6798
6901
|
test: function test(e) {
|
|
6799
6902
|
return Number.isNaN(e);
|
|
6800
6903
|
},
|
|
6801
|
-
replace: function replace(
|
|
6904
|
+
replace: function replace() {
|
|
6802
6905
|
return "NaN";
|
|
6803
6906
|
},
|
|
6804
|
-
revive: function revive(
|
|
6907
|
+
revive: function revive() {
|
|
6805
6908
|
return Number.NaN;
|
|
6806
6909
|
}
|
|
6807
6910
|
}
|
|
6808
6911
|
},
|
|
6809
|
-
|
|
6912
|
+
F = {
|
|
6810
6913
|
negativeInfinity: {
|
|
6811
6914
|
test: function test(e) {
|
|
6812
6915
|
return e === Number.NEGATIVE_INFINITY;
|
|
6813
6916
|
},
|
|
6814
|
-
replace: function replace(
|
|
6917
|
+
replace: function replace() {
|
|
6815
6918
|
return "-Infinity";
|
|
6816
6919
|
},
|
|
6817
|
-
revive: function revive(
|
|
6920
|
+
revive: function revive() {
|
|
6818
6921
|
return Number.NEGATIVE_INFINITY;
|
|
6819
6922
|
}
|
|
6820
6923
|
}
|
|
6821
6924
|
},
|
|
6822
|
-
|
|
6925
|
+
$ = {
|
|
6823
6926
|
negativeZero: {
|
|
6824
6927
|
test: function test(e) {
|
|
6825
6928
|
return Object.is(e, -0);
|
|
6826
6929
|
},
|
|
6827
|
-
replace: function replace(
|
|
6930
|
+
replace: function replace() {
|
|
6828
6931
|
return 0;
|
|
6829
6932
|
},
|
|
6830
|
-
revive: function revive(
|
|
6933
|
+
revive: function revive() {
|
|
6831
6934
|
return -0;
|
|
6832
6935
|
}
|
|
6833
6936
|
}
|
|
6834
6937
|
},
|
|
6835
|
-
|
|
6938
|
+
V = {
|
|
6836
6939
|
StringObject: {
|
|
6837
6940
|
test: function test(e) {
|
|
6838
6941
|
return "String" === toStringTag(e) && "object" == _typeof$2(e);
|
|
@@ -6861,7 +6964,7 @@
|
|
|
6861
6964
|
}
|
|
6862
6965
|
}
|
|
6863
6966
|
},
|
|
6864
|
-
|
|
6967
|
+
q = {
|
|
6865
6968
|
regexp: {
|
|
6866
6969
|
test: function test(e) {
|
|
6867
6970
|
return "RegExp" === toStringTag(e);
|
|
@@ -6872,14 +6975,14 @@
|
|
|
6872
6975
|
flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
|
|
6873
6976
|
};
|
|
6874
6977
|
},
|
|
6875
|
-
revive: function revive(
|
|
6876
|
-
var e =
|
|
6877
|
-
t =
|
|
6978
|
+
revive: function revive(_ref11) {
|
|
6979
|
+
var e = _ref11.source,
|
|
6980
|
+
t = _ref11.flags;
|
|
6878
6981
|
return new RegExp(e, t);
|
|
6879
6982
|
}
|
|
6880
6983
|
}
|
|
6881
6984
|
},
|
|
6882
|
-
|
|
6985
|
+
G = {
|
|
6883
6986
|
set: {
|
|
6884
6987
|
test: function test(e) {
|
|
6885
6988
|
return "Set" === toStringTag(e);
|
|
@@ -6892,11 +6995,11 @@
|
|
|
6892
6995
|
}
|
|
6893
6996
|
}
|
|
6894
6997
|
},
|
|
6895
|
-
|
|
6998
|
+
H = {};
|
|
6896
6999
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6897
7000
|
return function create$1(e) {
|
|
6898
7001
|
var t = e.name;
|
|
6899
|
-
|
|
7002
|
+
H[t.toLowerCase()] = {
|
|
6900
7003
|
test: function test(e) {
|
|
6901
7004
|
return toStringTag(e) === t;
|
|
6902
7005
|
},
|
|
@@ -6909,22 +7012,22 @@
|
|
|
6909
7012
|
};
|
|
6910
7013
|
}(e);
|
|
6911
7014
|
});
|
|
6912
|
-
var
|
|
7015
|
+
var z = {};
|
|
6913
7016
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6914
7017
|
return function create(e) {
|
|
6915
7018
|
var t = e.name;
|
|
6916
|
-
|
|
7019
|
+
z[t.toLowerCase()] = {
|
|
6917
7020
|
test: function test(e) {
|
|
6918
7021
|
return toStringTag(e) === t;
|
|
6919
7022
|
},
|
|
6920
|
-
replace: function replace(
|
|
6921
|
-
var e =
|
|
6922
|
-
t =
|
|
6923
|
-
r =
|
|
7023
|
+
replace: function replace(_ref12, n) {
|
|
7024
|
+
var e = _ref12.buffer,
|
|
7025
|
+
t = _ref12.byteOffset,
|
|
7026
|
+
r = _ref12.length;
|
|
6924
7027
|
n.buffers || (n.buffers = []);
|
|
6925
|
-
var
|
|
6926
|
-
return
|
|
6927
|
-
index:
|
|
7028
|
+
var a = n.buffers.indexOf(e);
|
|
7029
|
+
return a > -1 ? {
|
|
7030
|
+
index: a,
|
|
6928
7031
|
byteOffset: t,
|
|
6929
7032
|
length: r
|
|
6930
7033
|
} : (n.buffers.push(e), {
|
|
@@ -6936,31 +7039,31 @@
|
|
|
6936
7039
|
revive: function revive(t, r) {
|
|
6937
7040
|
r.buffers || (r.buffers = []);
|
|
6938
7041
|
var n = t.byteOffset,
|
|
6939
|
-
|
|
6940
|
-
|
|
7042
|
+
a = t.length,
|
|
7043
|
+
o = t.encoded,
|
|
6941
7044
|
i = t.index;
|
|
6942
7045
|
var c;
|
|
6943
|
-
return "index" in t ? c = r.buffers[i] : (c = d(
|
|
7046
|
+
return "index" in t ? c = r.buffers[i] : (c = d(o), r.buffers.push(c)), new e(c, n, a);
|
|
6944
7047
|
}
|
|
6945
7048
|
};
|
|
6946
7049
|
}(e);
|
|
6947
7050
|
});
|
|
6948
|
-
var
|
|
7051
|
+
var Q = {
|
|
6949
7052
|
undef: {
|
|
6950
7053
|
test: function test(e, t) {
|
|
6951
7054
|
return void 0 === e && (t.ownKeys || !("ownKeys" in t));
|
|
6952
7055
|
},
|
|
6953
|
-
replace: function replace(
|
|
7056
|
+
replace: function replace() {
|
|
6954
7057
|
return 0;
|
|
6955
7058
|
},
|
|
6956
|
-
revive: function revive(
|
|
7059
|
+
revive: function revive() {
|
|
6957
7060
|
return new s();
|
|
6958
7061
|
}
|
|
6959
7062
|
}
|
|
6960
7063
|
},
|
|
6961
|
-
|
|
7064
|
+
X = {
|
|
6962
7065
|
userObject: {
|
|
6963
|
-
test: function test(e
|
|
7066
|
+
test: function test(e) {
|
|
6964
7067
|
return isUserObject(e);
|
|
6965
7068
|
},
|
|
6966
7069
|
replace: function replace(e) {
|
|
@@ -6971,7 +7074,7 @@
|
|
|
6971
7074
|
}
|
|
6972
7075
|
}
|
|
6973
7076
|
},
|
|
6974
|
-
|
|
7077
|
+
Z = [{
|
|
6975
7078
|
arrayNonindexKeys: {
|
|
6976
7079
|
testPlainObjects: !0,
|
|
6977
7080
|
test: function test(e, t) {
|
|
@@ -6985,10 +7088,10 @@
|
|
|
6985
7088
|
revive: function revive(e) {
|
|
6986
7089
|
if (Array.isArray(e)) return e;
|
|
6987
7090
|
var t = [];
|
|
6988
|
-
return Object.entries(e).forEach(function (
|
|
6989
|
-
var
|
|
6990
|
-
e =
|
|
6991
|
-
r =
|
|
7091
|
+
return Object.entries(e).forEach(function (_ref13) {
|
|
7092
|
+
var _ref14 = _slicedToArray$1(_ref13, 2),
|
|
7093
|
+
e = _ref14[0],
|
|
7094
|
+
r = _ref14[1];
|
|
6992
7095
|
t[e] = r;
|
|
6993
7096
|
}), t;
|
|
6994
7097
|
}
|
|
@@ -6998,19 +7101,19 @@
|
|
|
6998
7101
|
test: function test(e, t) {
|
|
6999
7102
|
return void 0 === e && !1 === t.ownKeys;
|
|
7000
7103
|
},
|
|
7001
|
-
replace: function replace(
|
|
7104
|
+
replace: function replace() {
|
|
7002
7105
|
return 0;
|
|
7003
7106
|
},
|
|
7004
|
-
revive: function revive(
|
|
7107
|
+
revive: function revive() {}
|
|
7005
7108
|
}
|
|
7006
7109
|
}],
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7110
|
+
ee = [L, U, F, $],
|
|
7111
|
+
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 : []),
|
|
7112
|
+
ie = oe.concat({
|
|
7010
7113
|
checkDataCloneException: {
|
|
7011
7114
|
test: function test(e) {
|
|
7012
7115
|
var t = {}.toString.call(e).slice(8, -1);
|
|
7013
|
-
if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "
|
|
7116
|
+
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");
|
|
7014
7117
|
return !1;
|
|
7015
7118
|
}
|
|
7016
7119
|
}
|
|
@@ -7018,7 +7121,7 @@
|
|
|
7018
7121
|
|
|
7019
7122
|
// See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
|
|
7020
7123
|
|
|
7021
|
-
var typeson = new c().register(
|
|
7124
|
+
var typeson = new c().register(ie);
|
|
7022
7125
|
|
|
7023
7126
|
/**
|
|
7024
7127
|
* @param {(preset: import('typeson-registry').Preset) =>
|
|
@@ -7026,7 +7129,7 @@
|
|
|
7026
7129
|
* @returns {void}
|
|
7027
7130
|
*/
|
|
7028
7131
|
function register(func) {
|
|
7029
|
-
typeson = new c().register(func(
|
|
7132
|
+
typeson = new c().register(func(ie));
|
|
7030
7133
|
}
|
|
7031
7134
|
|
|
7032
7135
|
/**
|
|
@@ -7175,7 +7278,7 @@
|
|
|
7175
7278
|
* @returns {string}
|
|
7176
7279
|
*/
|
|
7177
7280
|
get: function get() {
|
|
7178
|
-
return '__pendingName' in me ? /** @type {string} */me.__pendingName : me.name;
|
|
7281
|
+
return '__pendingName' in me ? ( /** @type {string} */me.__pendingName) : me.name;
|
|
7179
7282
|
}
|
|
7180
7283
|
});
|
|
7181
7284
|
Object.defineProperty(me, 'name', {
|
|
@@ -7323,7 +7426,9 @@
|
|
|
7323
7426
|
IDBIndex.__updateIndexList(store, tx, function () {
|
|
7324
7427
|
// Add index entries for all existing records
|
|
7325
7428
|
tx.executeSql('SELECT "key", "value" FROM ' + escapeStoreNameForSQL(storeName), [], function (tx, data) {
|
|
7326
|
-
CFG.DEBUG
|
|
7429
|
+
if (CFG.DEBUG) {
|
|
7430
|
+
console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
|
|
7431
|
+
}
|
|
7327
7432
|
addIndexEntry(0);
|
|
7328
7433
|
|
|
7329
7434
|
/**
|
|
@@ -7349,7 +7454,7 @@
|
|
|
7349
7454
|
}
|
|
7350
7455
|
indexValues[indexKeyStr] = true;
|
|
7351
7456
|
}
|
|
7352
|
-
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function (
|
|
7457
|
+
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
|
|
7353
7458
|
addIndexEntry(i + 1);
|
|
7354
7459
|
}, /** @type {SQLStatementErrorCallback} */error);
|
|
7355
7460
|
} catch (e) {
|
|
@@ -7398,7 +7503,9 @@
|
|
|
7398
7503
|
} else {
|
|
7399
7504
|
// For a new index, add a new column to the object store, then apply the index
|
|
7400
7505
|
var sql = ['ALTER TABLE', escapedStoreNameSQL, 'ADD', escapedIndexNameSQL, 'BLOB'].join(' ');
|
|
7401
|
-
CFG.DEBUG
|
|
7506
|
+
if (CFG.DEBUG) {
|
|
7507
|
+
console.log(sql);
|
|
7508
|
+
}
|
|
7402
7509
|
tx.executeSql(sql, [], addIndexSQL, /** @type {SQLStatementErrorCallback} */error);
|
|
7403
7510
|
}
|
|
7404
7511
|
});
|
|
@@ -7486,7 +7593,9 @@
|
|
|
7486
7593
|
deleted: Boolean(idx.__deleted)
|
|
7487
7594
|
};
|
|
7488
7595
|
}
|
|
7489
|
-
CFG.DEBUG
|
|
7596
|
+
if (CFG.DEBUG) {
|
|
7597
|
+
console.log('Updating the index list for ' + store.__currentName, indexList);
|
|
7598
|
+
}
|
|
7490
7599
|
tx.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?', [JSON.stringify(indexList), escapeSQLiteStatement(store.__currentName)], function () {
|
|
7491
7600
|
success(store);
|
|
7492
7601
|
}, /** @type {SQLStatementErrorCallback} */failure);
|
|
@@ -7520,13 +7629,12 @@
|
|
|
7520
7629
|
throw createDOMException('DataError', 'No key or range was specified');
|
|
7521
7630
|
}
|
|
7522
7631
|
var fetchArgs = buildFetchIndexDataSQL(nullDisallowed, me, range, opType, false);
|
|
7523
|
-
return
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
);
|
|
7632
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
|
|
7633
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7634
|
+
args[_key] = arguments[_key];
|
|
7635
|
+
}
|
|
7636
|
+
executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
|
|
7637
|
+
}, undefined, me);
|
|
7530
7638
|
};
|
|
7531
7639
|
|
|
7532
7640
|
/**
|
|
@@ -7697,17 +7805,25 @@
|
|
|
7697
7805
|
// We don't query for indexes as we already have the info
|
|
7698
7806
|
// This approach has the advantage of auto-deleting indexes via the DROP TABLE
|
|
7699
7807
|
var sql = 'CREATE TABLE ' + escapedTmpStoreNameSQL + '(' + listColInfoToPreserve + escapedNewIndexNameSQL + ' ' + newNameType + ')';
|
|
7700
|
-
CFG.DEBUG
|
|
7808
|
+
if (CFG.DEBUG) {
|
|
7809
|
+
console.log(sql);
|
|
7810
|
+
}
|
|
7701
7811
|
tx.executeSql(sql, [], function () {
|
|
7702
7812
|
var sql = 'INSERT INTO ' + escapedTmpStoreNameSQL + '(' + listColsToPreserve + escapedNewIndexNameSQL + ') SELECT ' + listColsToPreserve + escapeIndexNameForSQL(oldName) + ' FROM ' + escapedStoreNameSQL;
|
|
7703
|
-
CFG.DEBUG
|
|
7813
|
+
if (CFG.DEBUG) {
|
|
7814
|
+
console.log(sql);
|
|
7815
|
+
}
|
|
7704
7816
|
tx.executeSql(sql, [], function () {
|
|
7705
7817
|
var sql = 'DROP TABLE ' + escapedStoreNameSQL;
|
|
7706
|
-
CFG.DEBUG
|
|
7818
|
+
if (CFG.DEBUG) {
|
|
7819
|
+
console.log(sql);
|
|
7820
|
+
}
|
|
7707
7821
|
tx.executeSql(sql, [], function () {
|
|
7708
7822
|
var sql = 'ALTER TABLE ' + escapedTmpStoreNameSQL + ' RENAME TO ' + escapedStoreNameSQL;
|
|
7709
|
-
CFG.DEBUG
|
|
7710
|
-
|
|
7823
|
+
if (CFG.DEBUG) {
|
|
7824
|
+
console.log(sql);
|
|
7825
|
+
}
|
|
7826
|
+
tx.executeSql(sql, [], function (tx) {
|
|
7711
7827
|
if (!CFG.useSQLiteIndexes) {
|
|
7712
7828
|
finish();
|
|
7713
7829
|
return;
|
|
@@ -7717,40 +7833,39 @@
|
|
|
7717
7833
|
return new SyncPromise(function (resolve, reject) {
|
|
7718
7834
|
var escapedIndexToRecreate = sqlQuote(escapedStoreNameSQL.slice(1, -1) + '^5' + escapedIndexNameSQL.slice(1, -1));
|
|
7719
7835
|
// const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
7720
|
-
// CFG.DEBUG
|
|
7836
|
+
// if (CFG.DEBUG) { console.log(sql); }
|
|
7721
7837
|
// tx.executeSql(sql, [], function () {
|
|
7722
7838
|
var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '(' + escapedIndexNameSQL + ')';
|
|
7723
|
-
CFG.DEBUG
|
|
7724
|
-
|
|
7725
|
-
|
|
7839
|
+
if (CFG.DEBUG) {
|
|
7840
|
+
console.log(sql);
|
|
7841
|
+
}
|
|
7842
|
+
tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
|
|
7726
7843
|
function (tx, err) {
|
|
7727
7844
|
reject(err);
|
|
7728
|
-
}
|
|
7729
|
-
/* eslint-enable no-extra-parens -- TS */);
|
|
7845
|
+
});
|
|
7730
7846
|
// }, function (tx, err) {
|
|
7731
7847
|
// reject(err);
|
|
7732
7848
|
// });
|
|
7733
7849
|
});
|
|
7734
7850
|
});
|
|
7735
|
-
|
|
7736
7851
|
indexCreations.push(new SyncPromise(function (resolve, reject) {
|
|
7737
7852
|
var escapedIndexToRecreate = sqlQuote('sk_' + escapedStoreNameSQL.slice(1, -1));
|
|
7738
7853
|
// Chrome erring here if not dropped first; Node does not
|
|
7739
7854
|
var sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
7740
|
-
CFG.DEBUG
|
|
7855
|
+
if (CFG.DEBUG) {
|
|
7856
|
+
console.log(sql);
|
|
7857
|
+
}
|
|
7741
7858
|
tx.executeSql(sql, [], function () {
|
|
7742
7859
|
var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '("key")';
|
|
7743
|
-
CFG.DEBUG
|
|
7744
|
-
|
|
7745
|
-
|
|
7860
|
+
if (CFG.DEBUG) {
|
|
7861
|
+
console.log(sql);
|
|
7862
|
+
}
|
|
7863
|
+
tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
|
|
7746
7864
|
function (tx, err) {
|
|
7747
|
-
/* eslint-enable no-extra-parens -- TS */
|
|
7748
7865
|
reject(err);
|
|
7749
7866
|
});
|
|
7750
|
-
},
|
|
7751
|
-
/** @type {SQLStatementErrorCallback} */
|
|
7867
|
+
}, /** @type {SQLStatementErrorCallback} */
|
|
7752
7868
|
function (tx, err) {
|
|
7753
|
-
/* eslint-enable no-extra-parens -- TS */
|
|
7754
7869
|
reject(err);
|
|
7755
7870
|
});
|
|
7756
7871
|
}));
|
|
@@ -7810,12 +7925,14 @@
|
|
|
7810
7925
|
sql.push('LIMIT', String(count));
|
|
7811
7926
|
}
|
|
7812
7927
|
var isCount = opType === 'count';
|
|
7813
|
-
CFG.DEBUG
|
|
7928
|
+
if (CFG.DEBUG) {
|
|
7929
|
+
console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
|
|
7930
|
+
}
|
|
7814
7931
|
tx.executeSql(sql.join(' '), sqlValues, function (tx, data) {
|
|
7815
7932
|
var records = [];
|
|
7816
7933
|
var recordCount = 0;
|
|
7817
7934
|
var decode$1 = isCount ? function () {/* */} : opType === 'key'
|
|
7818
|
-
// eslint-disable-next-line operator-linebreak -- JSDoc
|
|
7935
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
|
|
7819
7936
|
?
|
|
7820
7937
|
/**
|
|
7821
7938
|
* @param {{
|
|
@@ -7827,7 +7944,7 @@
|
|
|
7827
7944
|
// Key.convertValueToKey(record.key); // Already validated before storage
|
|
7828
7945
|
return _decode(unescapeSQLiteResponse(record.key));
|
|
7829
7946
|
}
|
|
7830
|
-
// eslint-disable-next-line operator-linebreak -- JSDoc
|
|
7947
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
|
|
7831
7948
|
:
|
|
7832
7949
|
/**
|
|
7833
7950
|
* @param {{
|
|
@@ -7869,13 +7986,12 @@
|
|
|
7869
7986
|
if (record) {
|
|
7870
7987
|
records.push(decode$1(record));
|
|
7871
7988
|
if (unboundedDisallowed) {
|
|
7872
|
-
return
|
|
7989
|
+
return 1; // break
|
|
7873
7990
|
}
|
|
7874
7991
|
}
|
|
7875
7992
|
};
|
|
7876
7993
|
for (var i = 0; i < data.rows.length; i++) {
|
|
7877
|
-
|
|
7878
|
-
if (_ret === "break") break;
|
|
7994
|
+
if (_loop()) break;
|
|
7879
7995
|
}
|
|
7880
7996
|
} else {
|
|
7881
7997
|
for (var _i = 0; _i < data.rows.length; _i++) {
|
|
@@ -7925,7 +8041,9 @@
|
|
|
7925
8041
|
sql.push('AND (');
|
|
7926
8042
|
/** @type {import('./Key.js').KeyPathArray} */
|
|
7927
8043
|
range.forEach(function (innerKey, i) {
|
|
7928
|
-
if (i > 0)
|
|
8044
|
+
if (i > 0) {
|
|
8045
|
+
sql.push('OR');
|
|
8046
|
+
}
|
|
7929
8047
|
sql.push(escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^' ");
|
|
7930
8048
|
sqlValues.push('%' + sqlLIKEEscape( /** @type {string} */_encode(innerKey, index.multiEntry)) + '%');
|
|
7931
8049
|
});
|
|
@@ -8073,20 +8191,24 @@
|
|
|
8073
8191
|
me.__pendingName = oldName;
|
|
8074
8192
|
var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
|
|
8075
8193
|
var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
|
|
8076
|
-
CFG.DEBUG
|
|
8194
|
+
if (CFG.DEBUG) {
|
|
8195
|
+
console.log(sql, sqlValues);
|
|
8196
|
+
}
|
|
8077
8197
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8078
8198
|
me.transaction.__addNonRequestToTransactionQueue(function objectStoreClear(tx, args, success, error) {
|
|
8079
|
-
tx.executeSql(sql, sqlValues, function (tx
|
|
8199
|
+
tx.executeSql(sql, sqlValues, function (tx) {
|
|
8080
8200
|
// This SQL preserves indexes per https://www.sqlite.org/lang_altertable.html
|
|
8081
8201
|
var sql = 'ALTER TABLE ' + escapeStoreNameForSQL(oldName) + ' RENAME TO ' + escapeStoreNameForSQL(name);
|
|
8082
|
-
CFG.DEBUG
|
|
8083
|
-
|
|
8202
|
+
if (CFG.DEBUG) {
|
|
8203
|
+
console.log(sql);
|
|
8204
|
+
}
|
|
8205
|
+
tx.executeSql(sql, [], function () {
|
|
8084
8206
|
delete me.__pendingName;
|
|
8085
8207
|
success();
|
|
8086
8208
|
});
|
|
8087
8209
|
}, function (tx, err) {
|
|
8088
8210
|
error(err);
|
|
8089
|
-
return
|
|
8211
|
+
return false;
|
|
8090
8212
|
});
|
|
8091
8213
|
});
|
|
8092
8214
|
}
|
|
@@ -8165,15 +8287,19 @@
|
|
|
8165
8287
|
* @returns {boolean}
|
|
8166
8288
|
*/
|
|
8167
8289
|
function error(tx, err) {
|
|
8168
|
-
CFG.DEBUG
|
|
8290
|
+
if (CFG.DEBUG) {
|
|
8291
|
+
console.log(err);
|
|
8292
|
+
}
|
|
8169
8293
|
failure(createDOMException('UnknownError', 'Could not create object store "' + storeName + '"', err));
|
|
8170
|
-
return
|
|
8294
|
+
return false;
|
|
8171
8295
|
}
|
|
8172
8296
|
var escapedStoreNameSQL = escapeStoreNameForSQL(storeName);
|
|
8173
8297
|
// key INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE
|
|
8174
8298
|
var sql = ['CREATE TABLE', escapedStoreNameSQL, '(key BLOB', store.autoIncrement ? 'UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT' : 'PRIMARY KEY', ', value BLOB)'].join(' ');
|
|
8175
|
-
CFG.DEBUG
|
|
8176
|
-
|
|
8299
|
+
if (CFG.DEBUG) {
|
|
8300
|
+
console.log(sql);
|
|
8301
|
+
}
|
|
8302
|
+
tx.executeSql(sql, [], function (tx) {
|
|
8177
8303
|
/**
|
|
8178
8304
|
* @returns {void}
|
|
8179
8305
|
*/
|
|
@@ -8227,9 +8353,11 @@
|
|
|
8227
8353
|
* @returns {boolean}
|
|
8228
8354
|
*/
|
|
8229
8355
|
function error(tx, err) {
|
|
8230
|
-
CFG.DEBUG
|
|
8356
|
+
if (CFG.DEBUG) {
|
|
8357
|
+
console.log(err);
|
|
8358
|
+
}
|
|
8231
8359
|
failure(createDOMException('UnknownError', 'Could not delete ObjectStore', err));
|
|
8232
|
-
return
|
|
8360
|
+
return false;
|
|
8233
8361
|
}
|
|
8234
8362
|
tx.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?', [escapeSQLiteStatement(store.__currentName)], function (tx, data) {
|
|
8235
8363
|
if (data.rows.length > 0) {
|
|
@@ -8346,6 +8474,7 @@
|
|
|
8346
8474
|
if (me.autoIncrement) {
|
|
8347
8475
|
// If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
|
|
8348
8476
|
if (key === undefined) {
|
|
8477
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8349
8478
|
generateKeyForStore(tx, me, function (failure, key, oldCn) {
|
|
8350
8479
|
if (failure) {
|
|
8351
8480
|
failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
|
|
@@ -8359,6 +8488,7 @@
|
|
|
8359
8488
|
success(key, oldCn);
|
|
8360
8489
|
}, failCb);
|
|
8361
8490
|
} else {
|
|
8491
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8362
8492
|
possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
|
|
8363
8493
|
}
|
|
8364
8494
|
// Not auto-increment
|
|
@@ -8481,13 +8611,15 @@
|
|
|
8481
8611
|
sqlEnd.push('?)');
|
|
8482
8612
|
insertSqlValues.push(escapeSQLiteStatement(encoded));
|
|
8483
8613
|
var insertSql = sqlStart.join(' ') + sqlEnd.join(' ');
|
|
8484
|
-
CFG.DEBUG
|
|
8485
|
-
|
|
8614
|
+
if (CFG.DEBUG) {
|
|
8615
|
+
console.log('SQL for adding', insertSql, insertSqlValues);
|
|
8616
|
+
}
|
|
8617
|
+
tx.executeSql(insertSql, insertSqlValues, function () {
|
|
8486
8618
|
success(clonedKeyOrCurrentNumber);
|
|
8487
8619
|
}, function (tx, err) {
|
|
8488
8620
|
// Should occur for `add` operation
|
|
8489
8621
|
error(createDOMException('ConstraintError', /** @type {string} */err.message, err));
|
|
8490
|
-
return
|
|
8622
|
+
return false;
|
|
8491
8623
|
});
|
|
8492
8624
|
return undefined;
|
|
8493
8625
|
})["catch"](function (err) {
|
|
@@ -8500,6 +8632,7 @@
|
|
|
8500
8632
|
error(err);
|
|
8501
8633
|
}
|
|
8502
8634
|
if (typeof oldCn === 'number') {
|
|
8635
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8503
8636
|
assignCurrentNumber(tx, me, oldCn, fail, fail);
|
|
8504
8637
|
return null;
|
|
8505
8638
|
}
|
|
@@ -8544,7 +8677,7 @@
|
|
|
8544
8677
|
* @this {IDBObjectStoreFull}
|
|
8545
8678
|
* @returns {import('./IDBRequest.js').IDBRequestFull}
|
|
8546
8679
|
*/
|
|
8547
|
-
IDBObjectStore.prototype.put = function (value
|
|
8680
|
+
IDBObjectStore.prototype.put = function (value /* , key */) {
|
|
8548
8681
|
var me = this;
|
|
8549
8682
|
// eslint-disable-next-line prefer-rest-params
|
|
8550
8683
|
var key = arguments[1];
|
|
@@ -8583,11 +8716,13 @@
|
|
|
8583
8716
|
var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__currentName) + ' WHERE "key" = ?';
|
|
8584
8717
|
var encodedKey = /** @type {string} */_encode(key);
|
|
8585
8718
|
tx.executeSql(sql, [escapeSQLiteStatement(encodedKey)], function (tx, data) {
|
|
8586
|
-
CFG.DEBUG
|
|
8719
|
+
if (CFG.DEBUG) {
|
|
8720
|
+
console.log('Did the row with the', key, 'exist?', data.rowsAffected);
|
|
8721
|
+
}
|
|
8587
8722
|
cb(tx);
|
|
8588
8723
|
}, function (tx, err) {
|
|
8589
8724
|
error(err);
|
|
8590
|
-
return
|
|
8725
|
+
return false;
|
|
8591
8726
|
});
|
|
8592
8727
|
};
|
|
8593
8728
|
|
|
@@ -8666,46 +8801,51 @@
|
|
|
8666
8801
|
sql.push('LIMIT', String(count));
|
|
8667
8802
|
}
|
|
8668
8803
|
var sqlStr = sql.join(' ');
|
|
8669
|
-
return
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
}
|
|
8684
|
-
ret = [];
|
|
8685
|
-
if (getKey) {
|
|
8686
|
-
for (var i = 0; i < data.rows.length; i++) {
|
|
8687
|
-
// Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
|
|
8688
|
-
ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
|
|
8689
|
-
}
|
|
8804
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
|
|
8805
|
+
if (CFG.DEBUG) {
|
|
8806
|
+
console.log('Fetching', me.__currentName, sqlValues);
|
|
8807
|
+
}
|
|
8808
|
+
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
8809
|
+
if (CFG.DEBUG) {
|
|
8810
|
+
console.log('Fetched data', data);
|
|
8811
|
+
}
|
|
8812
|
+
var ret;
|
|
8813
|
+
try {
|
|
8814
|
+
// Opera can't deal with the try-catch here.
|
|
8815
|
+
if (data.rows.length === 0) {
|
|
8816
|
+
if (getAll) {
|
|
8817
|
+
success([]);
|
|
8690
8818
|
} else {
|
|
8691
|
-
|
|
8692
|
-
ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
|
|
8693
|
-
}
|
|
8819
|
+
success();
|
|
8694
8820
|
}
|
|
8695
|
-
|
|
8696
|
-
|
|
8821
|
+
return;
|
|
8822
|
+
}
|
|
8823
|
+
ret = [];
|
|
8824
|
+
if (getKey) {
|
|
8825
|
+
for (var i = 0; i < data.rows.length; i++) {
|
|
8826
|
+
// Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
|
|
8827
|
+
ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
|
|
8828
|
+
}
|
|
8829
|
+
} else {
|
|
8830
|
+
for (var _i = 0; _i < data.rows.length; _i++) {
|
|
8831
|
+
ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
|
|
8697
8832
|
}
|
|
8698
|
-
} catch (e) {
|
|
8699
|
-
// If no result is returned, or error occurs when parsing JSON
|
|
8700
|
-
CFG.DEBUG && console.log(e);
|
|
8701
8833
|
}
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8834
|
+
if (!getAll) {
|
|
8835
|
+
ret = ret[0];
|
|
8836
|
+
}
|
|
8837
|
+
} catch (e) {
|
|
8838
|
+
// If no result is returned, or error occurs when parsing JSON
|
|
8839
|
+
if (CFG.DEBUG) {
|
|
8840
|
+
console.log(e);
|
|
8841
|
+
}
|
|
8842
|
+
}
|
|
8843
|
+
success(ret);
|
|
8844
|
+
}, function (tx, err) {
|
|
8845
|
+
error(err);
|
|
8846
|
+
return false;
|
|
8847
|
+
});
|
|
8848
|
+
}, undefined, me);
|
|
8709
8849
|
};
|
|
8710
8850
|
|
|
8711
8851
|
/**
|
|
@@ -8786,21 +8926,23 @@
|
|
|
8786
8926
|
var sqlValues = [];
|
|
8787
8927
|
setSQLForKeyRange(range, sqlQuote('key'), sqlArr, sqlValues);
|
|
8788
8928
|
var sql = sqlArr.join(' ');
|
|
8789
|
-
return
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
error(err);
|
|
8800
|
-
return true;
|
|
8929
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
|
|
8930
|
+
if (CFG.DEBUG) {
|
|
8931
|
+
console.log('Deleting', me.__currentName, sqlValues);
|
|
8932
|
+
}
|
|
8933
|
+
tx.executeSql(sql, sqlValues, function (tx, data) {
|
|
8934
|
+
if (CFG.DEBUG) {
|
|
8935
|
+
console.log('Deleted from database', data.rowsAffected);
|
|
8936
|
+
}
|
|
8937
|
+
me.__cursors.forEach(function (cursor) {
|
|
8938
|
+
cursor.__invalidateCache(); // Delete
|
|
8801
8939
|
});
|
|
8802
|
-
|
|
8803
|
-
|
|
8940
|
+
success();
|
|
8941
|
+
}, function (tx, err) {
|
|
8942
|
+
error(err);
|
|
8943
|
+
return false;
|
|
8944
|
+
});
|
|
8945
|
+
}, undefined, me);
|
|
8804
8946
|
};
|
|
8805
8947
|
|
|
8806
8948
|
/**
|
|
@@ -8816,20 +8958,20 @@
|
|
|
8816
8958
|
IDBTransaction.__assertActive(me.transaction);
|
|
8817
8959
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8818
8960
|
me.transaction.__assertWritable();
|
|
8819
|
-
return
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
success();
|
|
8827
|
-
}, function (tx, err) {
|
|
8828
|
-
error(err);
|
|
8829
|
-
return true;
|
|
8961
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
|
|
8962
|
+
tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
|
|
8963
|
+
if (CFG.DEBUG) {
|
|
8964
|
+
console.log('Cleared all records from database', data.rowsAffected);
|
|
8965
|
+
}
|
|
8966
|
+
me.__cursors.forEach(function (cursor) {
|
|
8967
|
+
cursor.__invalidateCache(); // Clear
|
|
8830
8968
|
});
|
|
8831
|
-
|
|
8832
|
-
|
|
8969
|
+
success();
|
|
8970
|
+
}, function (tx, err) {
|
|
8971
|
+
error(err);
|
|
8972
|
+
return false;
|
|
8973
|
+
});
|
|
8974
|
+
}, undefined, me);
|
|
8833
8975
|
};
|
|
8834
8976
|
|
|
8835
8977
|
/**
|
|
@@ -9292,7 +9434,6 @@
|
|
|
9292
9434
|
this.__setOptions({
|
|
9293
9435
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
9294
9436
|
});
|
|
9295
|
-
|
|
9296
9437
|
this.__transactions = [];
|
|
9297
9438
|
|
|
9298
9439
|
/** @type {{[key: string]: IDBObjectStore}} */
|
|
@@ -9507,6 +9648,7 @@
|
|
|
9507
9648
|
me.close();
|
|
9508
9649
|
var ct = 0;
|
|
9509
9650
|
me.__transactions.forEach(function (trans) {
|
|
9651
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
9510
9652
|
trans.on__abort = function () {
|
|
9511
9653
|
ct++;
|
|
9512
9654
|
if (ct === me.__transactions.length) {
|
|
@@ -9818,14 +9960,14 @@
|
|
|
9818
9960
|
deleteTables(i + 1);
|
|
9819
9961
|
}, function () {
|
|
9820
9962
|
deleteTables(i + 1);
|
|
9821
|
-
return
|
|
9963
|
+
return false;
|
|
9822
9964
|
});
|
|
9823
9965
|
}
|
|
9824
9966
|
})(0);
|
|
9825
|
-
}, function (
|
|
9967
|
+
}, function () {
|
|
9826
9968
|
// __sys__ table does not exist, but that does not mean delete did not happen
|
|
9827
9969
|
databaseDeleted();
|
|
9828
|
-
return
|
|
9970
|
+
return false;
|
|
9829
9971
|
});
|
|
9830
9972
|
});
|
|
9831
9973
|
}
|
|
@@ -9851,7 +9993,9 @@
|
|
|
9851
9993
|
*/
|
|
9852
9994
|
function sysDbCreateError(tx, err) {
|
|
9853
9995
|
var er = webSQLErrback( /** @type {SQLError} */err || tx);
|
|
9854
|
-
CFG.DEBUG
|
|
9996
|
+
if (CFG.DEBUG) {
|
|
9997
|
+
console.log('Error in sysdb transaction - when creating dbVersions', err);
|
|
9998
|
+
}
|
|
9855
9999
|
failure(er);
|
|
9856
10000
|
}
|
|
9857
10001
|
if (sysdb) {
|
|
@@ -9966,9 +10110,9 @@
|
|
|
9966
10110
|
*/
|
|
9967
10111
|
function dbCreateError(tx, err) {
|
|
9968
10112
|
if (calledDbCreateError) {
|
|
9969
|
-
return
|
|
10113
|
+
return false;
|
|
9970
10114
|
}
|
|
9971
|
-
var er = err ? webSQLErrback(err) : /** @type {Error} */tx;
|
|
10115
|
+
var er = err ? webSQLErrback(err) : ( /** @type {Error} */tx);
|
|
9972
10116
|
calledDbCreateError = true;
|
|
9973
10117
|
// Re: why bubbling here (and how cancelable is only really relevant for `window.onerror`) see: https://github.com/w3c/IndexedDB/issues/86
|
|
9974
10118
|
var evt = createEvent('error', er, {
|
|
@@ -9979,7 +10123,7 @@
|
|
|
9979
10123
|
req.__error = er;
|
|
9980
10124
|
req.__result = undefined; // Must be undefined if an error per `result` getter
|
|
9981
10125
|
req.dispatchEvent(evt);
|
|
9982
|
-
return
|
|
10126
|
+
return false;
|
|
9983
10127
|
}
|
|
9984
10128
|
|
|
9985
10129
|
/**
|
|
@@ -10052,7 +10196,6 @@
|
|
|
10052
10196
|
// In browser, should auto-commit
|
|
10053
10197
|
cb(); // eslint-disable-line promise/no-callback-in-promise
|
|
10054
10198
|
};
|
|
10055
|
-
|
|
10056
10199
|
sysdb.transaction(function (systx) {
|
|
10057
10200
|
/**
|
|
10058
10201
|
* @returns {void}
|
|
@@ -10066,7 +10209,7 @@
|
|
|
10066
10209
|
req.__result = connection;
|
|
10067
10210
|
connection.__upgradeTransaction = req.__transaction = req.__result.__versionTransaction = IDBTransaction.__createInstance(req.__result, req.__result.objectStoreNames, 'versionchange');
|
|
10068
10211
|
req.__done = true;
|
|
10069
|
-
req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished, error) {
|
|
10212
|
+
req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished /* , error */) {
|
|
10070
10213
|
req.dispatchEvent(e);
|
|
10071
10214
|
if (e.__legacyOutputDidListenersThrowError) {
|
|
10072
10215
|
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
|
|
@@ -10075,6 +10218,8 @@
|
|
|
10075
10218
|
}
|
|
10076
10219
|
finished();
|
|
10077
10220
|
});
|
|
10221
|
+
|
|
10222
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10078
10223
|
req.transaction.on__beforecomplete = function (ev) {
|
|
10079
10224
|
connection.__upgradeTransaction = null;
|
|
10080
10225
|
/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */
|
|
@@ -10084,9 +10229,11 @@
|
|
|
10084
10229
|
ev.complete();
|
|
10085
10230
|
req.__transaction = null;
|
|
10086
10231
|
});
|
|
10087
|
-
return
|
|
10232
|
+
return false;
|
|
10088
10233
|
});
|
|
10089
10234
|
};
|
|
10235
|
+
|
|
10236
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10090
10237
|
req.transaction.on__preabort = function () {
|
|
10091
10238
|
connection.__upgradeTransaction = null;
|
|
10092
10239
|
// We ensure any cache is deleted before any request error events fire and try to reopen
|
|
@@ -10096,6 +10243,8 @@
|
|
|
10096
10243
|
}
|
|
10097
10244
|
}
|
|
10098
10245
|
};
|
|
10246
|
+
|
|
10247
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10099
10248
|
req.transaction.on__abort = function () {
|
|
10100
10249
|
req.__transaction = null;
|
|
10101
10250
|
// `readyState` and `result` will be reset anyways by `dbCreateError` but we follow spec.
|
|
@@ -10109,13 +10258,15 @@
|
|
|
10109
10258
|
cleanupDatabaseResources(me.__openDatabase, name, escapedDatabaseName, dbCreateError.bind(null, err),
|
|
10110
10259
|
// @ts-expect-error It's ok
|
|
10111
10260
|
reportError || dbCreateError);
|
|
10112
|
-
return
|
|
10261
|
+
return false;
|
|
10113
10262
|
}
|
|
10114
10263
|
dbCreateError(err);
|
|
10115
|
-
return
|
|
10264
|
+
return false;
|
|
10116
10265
|
});
|
|
10117
10266
|
});
|
|
10118
10267
|
};
|
|
10268
|
+
|
|
10269
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10119
10270
|
req.transaction.on__complete = function () {
|
|
10120
10271
|
if ( /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
|
|
10121
10272
|
req.__transaction = null;
|
|
@@ -10142,7 +10293,6 @@
|
|
|
10142
10293
|
// });
|
|
10143
10294
|
};
|
|
10144
10295
|
}
|
|
10145
|
-
|
|
10146
10296
|
if (oldVersion === 0) {
|
|
10147
10297
|
systx.executeSql('INSERT INTO dbVersions VALUES (?,?)', [sqlSafeName, version], versionSet, dbCreateError);
|
|
10148
10298
|
} else {
|
|
@@ -10223,7 +10373,7 @@
|
|
|
10223
10373
|
}, /** @type {SQLStatementErrorCallback} */dbCreateError);
|
|
10224
10374
|
}, dbCreateError);
|
|
10225
10375
|
}
|
|
10226
|
-
addRequestToConnectionQueue(req, name, /* origin */undefined, function (
|
|
10376
|
+
addRequestToConnectionQueue(req, name, /* origin */undefined, function () {
|
|
10227
10377
|
var latestCachedVersion;
|
|
10228
10378
|
if (useDatabaseCache) {
|
|
10229
10379
|
if (!(name in websqlDBCache)) {
|
|
@@ -10280,7 +10430,6 @@
|
|
|
10280
10430
|
} catch (err) {
|
|
10281
10431
|
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.');
|
|
10282
10432
|
}
|
|
10283
|
-
|
|
10284
10433
|
var useMemoryDatabase = typeof CFG.memoryDatabase === 'string';
|
|
10285
10434
|
var useDatabaseCache = CFG.cacheDatabaseInstances !== false || useMemoryDatabase;
|
|
10286
10435
|
var req = IDBOpenDBRequest.__createInstance();
|
|
@@ -10308,7 +10457,7 @@
|
|
|
10308
10457
|
*/
|
|
10309
10458
|
function dbError(tx, err) {
|
|
10310
10459
|
if (calledDBError || err === true) {
|
|
10311
|
-
return
|
|
10460
|
+
return false;
|
|
10312
10461
|
}
|
|
10313
10462
|
var er = webSQLErrback( /** @type {SQLError} */err || tx);
|
|
10314
10463
|
sysdbFinishedCbDelete(true, function () {
|
|
@@ -10323,7 +10472,7 @@
|
|
|
10323
10472
|
req.dispatchEvent(e);
|
|
10324
10473
|
calledDBError = true;
|
|
10325
10474
|
});
|
|
10326
|
-
return
|
|
10475
|
+
return false;
|
|
10327
10476
|
}
|
|
10328
10477
|
addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
|
|
10329
10478
|
createSysDB(me.__openDatabase, function () {
|
|
@@ -10350,7 +10499,6 @@
|
|
|
10350
10499
|
if (useDatabaseCache && name in websqlDBCache) {
|
|
10351
10500
|
delete websqlDBCache[name]; // New calls will treat as though never existed
|
|
10352
10501
|
}
|
|
10353
|
-
|
|
10354
10502
|
delete me.__connections[name];
|
|
10355
10503
|
completeDatabaseDelete();
|
|
10356
10504
|
});
|
|
@@ -10452,12 +10600,12 @@
|
|
|
10452
10600
|
*/
|
|
10453
10601
|
function dbGetDatabaseNamesError(tx, err) {
|
|
10454
10602
|
if (calledDbCreateError) {
|
|
10455
|
-
return
|
|
10603
|
+
return false;
|
|
10456
10604
|
}
|
|
10457
10605
|
var er = err ? webSQLErrback( /** @type {SQLError} */err) : tx;
|
|
10458
10606
|
calledDbCreateError = true;
|
|
10459
10607
|
reject(er);
|
|
10460
|
-
return
|
|
10608
|
+
return false;
|
|
10461
10609
|
}
|
|
10462
10610
|
createSysDB(me.__openDatabase, function () {
|
|
10463
10611
|
sysdb.readTransaction(function (sysReadTx) {
|
|
@@ -10772,25 +10920,33 @@
|
|
|
10772
10920
|
sql.push('LIMIT', String(recordsToLoad));
|
|
10773
10921
|
}
|
|
10774
10922
|
var sqlStr = sql.join(' ');
|
|
10775
|
-
CFG.DEBUG
|
|
10923
|
+
if (CFG.DEBUG) {
|
|
10924
|
+
console.log(sqlStr, sqlValues);
|
|
10925
|
+
}
|
|
10776
10926
|
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
10777
10927
|
if (me.__count) {
|
|
10778
10928
|
success(undefined, data.rows.length, undefined);
|
|
10779
10929
|
} else if (data.rows.length > 1) {
|
|
10780
10930
|
me.__prefetchedIndex = 0;
|
|
10781
10931
|
me.__prefetchedData = data.rows;
|
|
10782
|
-
CFG.DEBUG
|
|
10932
|
+
if (CFG.DEBUG) {
|
|
10933
|
+
console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
|
|
10934
|
+
}
|
|
10783
10935
|
me.__decode(data.rows.item(0), success);
|
|
10784
10936
|
} else if (data.rows.length === 1) {
|
|
10785
10937
|
me.__decode(data.rows.item(0), success);
|
|
10786
10938
|
} else {
|
|
10787
|
-
CFG.DEBUG
|
|
10939
|
+
if (CFG.DEBUG) {
|
|
10940
|
+
console.log('Reached end of cursors');
|
|
10941
|
+
}
|
|
10788
10942
|
success(undefined, undefined, undefined);
|
|
10789
10943
|
}
|
|
10790
10944
|
}, function (tx, err) {
|
|
10791
|
-
CFG.DEBUG
|
|
10945
|
+
if (CFG.DEBUG) {
|
|
10946
|
+
console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
|
|
10947
|
+
}
|
|
10792
10948
|
error(err);
|
|
10793
|
-
return
|
|
10949
|
+
return false;
|
|
10794
10950
|
});
|
|
10795
10951
|
};
|
|
10796
10952
|
var leftBracketRegex = /\[/g;
|
|
@@ -10808,7 +10964,9 @@
|
|
|
10808
10964
|
IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
|
|
10809
10965
|
var me = this;
|
|
10810
10966
|
if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
|
|
10811
|
-
CFG.DEBUG
|
|
10967
|
+
if (CFG.DEBUG) {
|
|
10968
|
+
console.log('Reached end of multiEntry cursor');
|
|
10969
|
+
}
|
|
10812
10970
|
success(undefined, undefined, undefined);
|
|
10813
10971
|
return;
|
|
10814
10972
|
}
|
|
@@ -10860,7 +11018,9 @@
|
|
|
10860
11018
|
}
|
|
10861
11019
|
}
|
|
10862
11020
|
var sqlStr = sql.join(' ');
|
|
10863
|
-
CFG.DEBUG
|
|
11021
|
+
if (CFG.DEBUG) {
|
|
11022
|
+
console.log(sqlStr, sqlValues);
|
|
11023
|
+
}
|
|
10864
11024
|
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
10865
11025
|
if (data.rows.length > 0) {
|
|
10866
11026
|
if (me.__count) {
|
|
@@ -10889,8 +11049,8 @@
|
|
|
10889
11049
|
* @type {RowItemNonNull}
|
|
10890
11050
|
*/
|
|
10891
11051
|
var clone = {
|
|
10892
|
-
matchingKey: /** @type {string} */
|
|
10893
|
-
_encode(matchingKey, true),
|
|
11052
|
+
matchingKey: ( /** @type {string} */
|
|
11053
|
+
_encode(matchingKey, true)),
|
|
10894
11054
|
key: _rowItem.key
|
|
10895
11055
|
};
|
|
10896
11056
|
clone[me.__keyColumnName] = _rowItem[me.__keyColumnName];
|
|
@@ -10932,23 +11092,33 @@
|
|
|
10932
11092
|
return this.data[index];
|
|
10933
11093
|
}
|
|
10934
11094
|
};
|
|
10935
|
-
CFG.DEBUG
|
|
11095
|
+
if (CFG.DEBUG) {
|
|
11096
|
+
console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
|
|
11097
|
+
}
|
|
10936
11098
|
me.__decode(rows[0], success);
|
|
10937
11099
|
} else if (rows.length === 1) {
|
|
10938
|
-
CFG.DEBUG
|
|
11100
|
+
if (CFG.DEBUG) {
|
|
11101
|
+
console.log('Reached end of multiEntry cursor');
|
|
11102
|
+
}
|
|
10939
11103
|
me.__decode(rows[0], success);
|
|
10940
11104
|
} else {
|
|
10941
|
-
CFG.DEBUG
|
|
11105
|
+
if (CFG.DEBUG) {
|
|
11106
|
+
console.log('Reached end of multiEntry cursor');
|
|
11107
|
+
}
|
|
10942
11108
|
success(undefined, undefined, undefined);
|
|
10943
11109
|
}
|
|
10944
11110
|
} else {
|
|
10945
|
-
CFG.DEBUG
|
|
11111
|
+
if (CFG.DEBUG) {
|
|
11112
|
+
console.log('Reached end of multiEntry cursor');
|
|
11113
|
+
}
|
|
10946
11114
|
success(undefined, undefined, undefined);
|
|
10947
11115
|
}
|
|
10948
11116
|
}, function (tx, err) {
|
|
10949
|
-
CFG.DEBUG
|
|
11117
|
+
if (CFG.DEBUG) {
|
|
11118
|
+
console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
|
|
11119
|
+
}
|
|
10950
11120
|
error(err);
|
|
10951
|
-
return
|
|
11121
|
+
return false;
|
|
10952
11122
|
});
|
|
10953
11123
|
};
|
|
10954
11124
|
|
|
@@ -11037,7 +11207,7 @@
|
|
|
11037
11207
|
var key = _decode(encKey, me.__multiEntryIndex);
|
|
11038
11208
|
var val = me.__valueDecoder.decode(encVal);
|
|
11039
11209
|
var primaryKey = _decode(encPrimaryKey);
|
|
11040
|
-
callback(key, val, primaryKey, encKey
|
|
11210
|
+
callback(key, val, primaryKey, encKey /* , encVal, encPrimaryKey */);
|
|
11041
11211
|
};
|
|
11042
11212
|
|
|
11043
11213
|
/**
|
|
@@ -11249,7 +11419,9 @@
|
|
|
11249
11419
|
*/
|
|
11250
11420
|
IDBCursor.prototype.update = function (valueToUpdate) {
|
|
11251
11421
|
var me = this;
|
|
11252
|
-
if (!arguments.length)
|
|
11422
|
+
if (!arguments.length) {
|
|
11423
|
+
throw new TypeError('A value must be passed to update()');
|
|
11424
|
+
}
|
|
11253
11425
|
IDBTransaction.__assertActive(me.__store.transaction);
|
|
11254
11426
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
11255
11427
|
me.__store.transaction.__assertWritable();
|
|
@@ -11303,28 +11475,29 @@
|
|
|
11303
11475
|
if (me.__keyOnly) {
|
|
11304
11476
|
throw createDOMException('InvalidStateError', 'This cursor method cannot be called when the key only flag has been set.');
|
|
11305
11477
|
}
|
|
11306
|
-
return
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11478
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
|
|
11479
|
+
me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
|
|
11480
|
+
function (key, value, primaryKey) {
|
|
11481
|
+
var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
|
|
11482
|
+
if (CFG.DEBUG) {
|
|
11483
|
+
console.log(sql, key, primaryKey);
|
|
11484
|
+
}
|
|
11485
|
+
// Key.convertValueToKey(primaryKey); // Already checked when entered
|
|
11486
|
+
tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
|
|
11487
|
+
if (data.rowsAffected === 1) {
|
|
11488
|
+
// We don't invalidate the cache (as we don't access it anymore
|
|
11489
|
+
// and it will set the index off)
|
|
11490
|
+
success(undefined);
|
|
11491
|
+
} else {
|
|
11492
|
+
// @ts-expect-error Apparently ok
|
|
11493
|
+
error('No rows with key found' + key);
|
|
11494
|
+
}
|
|
11495
|
+
}, function (tx, data) {
|
|
11496
|
+
error(data);
|
|
11497
|
+
return false;
|
|
11498
|
+
});
|
|
11499
|
+
}, error);
|
|
11500
|
+
}, undefined, me);
|
|
11328
11501
|
};
|
|
11329
11502
|
IDBCursor.prototype[Symbol.toStringTag] = 'IDBCursorPrototype';
|
|
11330
11503
|
defineReadonlyOuterInterface(IDBCursor.prototype, ['source', 'direction', 'key', 'primaryKey', 'request']);
|
|
@@ -11522,8 +11695,7 @@
|
|
|
11522
11695
|
}
|
|
11523
11696
|
} else {
|
|
11524
11697
|
var o = _defineAccessor("get", {}, name, function () {
|
|
11525
|
-
return
|
|
11526
|
-
);
|
|
11698
|
+
return /** @type {AnyFunction} */( /** @type {PropertyDescriptor} */propDesc.get).call(this);
|
|
11527
11699
|
});
|
|
11528
11700
|
desc = /** @type {PropertyDescriptor} */
|
|
11529
11701
|
Object.getOwnPropertyDescriptor(o, name);
|
|
@@ -11538,7 +11710,9 @@
|
|
|
11538
11710
|
|
|
11539
11711
|
// @ts-expect-error It's ok
|
|
11540
11712
|
if (IDB[name] !== value) {
|
|
11541
|
-
typeof console !== 'undefined' && console.warn
|
|
11713
|
+
if (typeof console !== 'undefined' && console.warn) {
|
|
11714
|
+
console.warn('Unable to shim ' + name);
|
|
11715
|
+
}
|
|
11542
11716
|
}
|
|
11543
11717
|
}
|
|
11544
11718
|
if (CFG.win.openDatabase !== undefined) {
|
|
@@ -11717,8 +11891,7 @@
|
|
|
11717
11891
|
IDB.IDBCursor = IDB.IDBCursor || 'webkitIDBCursor' in IDB && IDB.webkitIDBCursor;
|
|
11718
11892
|
IDB.IDBKeyRange = IDB.IDBKeyRange || 'webkitIDBKeyRange' in IDB && IDB.webkitIDBKeyRange;
|
|
11719
11893
|
}
|
|
11720
|
-
return
|
|
11721
|
-
);
|
|
11894
|
+
return /** @type {ShimmedObject} */IDB;
|
|
11722
11895
|
}
|
|
11723
11896
|
|
|
11724
11897
|
/* eslint-env browser, worker */
|