indexeddbshim 15.2.0 → 16.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/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/dist/DOMException.d.ts +2 -2
- package/dist/DOMException.d.ts.map +1 -1
- package/dist/DOMStringList.d.ts.map +1 -1
- package/dist/Event.d.ts +1 -1
- package/dist/Event.d.ts.map +1 -1
- package/dist/IDBCursor.d.ts +1 -1
- package/dist/IDBCursor.d.ts.map +1 -1
- package/dist/IDBDatabase.d.ts.map +1 -1
- package/dist/IDBFactory.d.ts +1 -1
- package/dist/IDBFactory.d.ts.map +1 -1
- package/dist/IDBIndex.d.ts +3 -3
- package/dist/IDBIndex.d.ts.map +1 -1
- package/dist/IDBKeyRange.d.ts +2 -2
- package/dist/IDBKeyRange.d.ts.map +1 -1
- package/dist/IDBObjectStore.d.ts +3 -3
- package/dist/IDBObjectStore.d.ts.map +1 -1
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/Key.d.ts +7 -7
- package/dist/Key.d.ts.map +1 -1
- package/dist/Sca.d.ts +1 -1
- package/dist/Sca.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +11 -12
- 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 +794 -696
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +301 -489
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +4 -2
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +794 -696
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +301 -489
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +4 -2
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +301 -489
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +4 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/setGlobalVars.d.ts +1 -1
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/dist/unicode-regex.d.ts +2 -2
- package/dist/unicode-regex.d.ts.map +1 -1
- package/dist/util.d.ts +1 -1
- package/dist/util.d.ts.map +1 -1
- package/package.json +27 -27
- package/src/DOMException.js +0 -1
- package/src/DOMStringList.js +0 -1
- package/src/IDBCursor.js +1 -1
- package/src/IDBFactory.js +2 -3
- package/src/IDBIndex.js +1 -2
- package/src/IDBKeyRange.js +1 -0
- package/src/IDBObjectStore.js +0 -1
- package/src/IDBTransaction.js +0 -1
- package/src/Key.js +1 -1
- package/src/setGlobalVars.js +1 -1
- package/src/unicode-regex.js +12 -3
- package/src/util.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v16.0.0 - 6/14/2025 */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -1160,10 +1160,19 @@ val => {
|
|
|
1160
1160
|
function getDefaultExportFromCjs$1(x) {
|
|
1161
1161
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1162
1162
|
}
|
|
1163
|
-
var regex
|
|
1164
|
-
var
|
|
1163
|
+
var regex$1;
|
|
1164
|
+
var hasRequiredRegex;
|
|
1165
|
+
function requireRegex() {
|
|
1166
|
+
if (hasRequiredRegex) return regex$1;
|
|
1167
|
+
hasRequiredRegex = 1;
|
|
1168
|
+
regex$1 = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
1169
|
+
return regex$1;
|
|
1170
|
+
}
|
|
1171
|
+
var regexExports = requireRegex();
|
|
1172
|
+
var regex = /*@__PURE__*/getDefaultExportFromCjs$1(regexExports);
|
|
1165
1173
|
|
|
1166
1174
|
/* eslint-disable new-cap -- ToString is how it is defined */
|
|
1175
|
+
/* eslint-disable sonarjs/no-control-regex -- Needed */
|
|
1167
1176
|
|
|
1168
1177
|
/**
|
|
1169
1178
|
* @typedef {number} Integer
|
|
@@ -1258,7 +1267,7 @@ function escapeDatabaseNameForSQLAndFiles(db) {
|
|
|
1258
1267
|
db = 'D' + escapeNameForSQLiteIdentifier(db);
|
|
1259
1268
|
if (CFG.escapeNFDForDatabaseNames !== false) {
|
|
1260
1269
|
// ES6 copying of regex with different flags
|
|
1261
|
-
db = db.replaceAll(new RegExp(regex
|
|
1270
|
+
db = db.replaceAll(new RegExp(regex, 'gu'), function (expandable) {
|
|
1262
1271
|
return '^4' + /** @type {Integer} */expandable.codePointAt(0).toString(16).padStart(6, '0');
|
|
1263
1272
|
});
|
|
1264
1273
|
}
|
|
@@ -2082,7 +2091,6 @@ try {
|
|
|
2082
2091
|
// Native DOMException works as expected
|
|
2083
2092
|
useNativeDOMException = true;
|
|
2084
2093
|
}
|
|
2085
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
2086
2094
|
} catch (err) {}
|
|
2087
2095
|
const createDOMException = useNativeDOMException
|
|
2088
2096
|
// eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
|
|
@@ -2689,7 +2697,7 @@ const signValues = ['negativeInfinity', 'bigNegative', 'smallNegative', 'smallPo
|
|
|
2689
2697
|
* }
|
|
2690
2698
|
* }}
|
|
2691
2699
|
*/
|
|
2692
|
-
const types
|
|
2700
|
+
const types = {
|
|
2693
2701
|
invalid: {
|
|
2694
2702
|
/**
|
|
2695
2703
|
* @returns {string}
|
|
@@ -3191,7 +3199,7 @@ function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
|
|
|
3191
3199
|
value: date.getTime()
|
|
3192
3200
|
} : {
|
|
3193
3201
|
type,
|
|
3194
|
-
value: new Date(date
|
|
3202
|
+
value: new Date(date)
|
|
3195
3203
|
};
|
|
3196
3204
|
}
|
|
3197
3205
|
return {
|
|
@@ -3545,7 +3553,7 @@ function encode$1(key, inArray) {
|
|
|
3545
3553
|
return null;
|
|
3546
3554
|
}
|
|
3547
3555
|
// array, date, number, string, binary (should already have detected "invalid")
|
|
3548
|
-
return types
|
|
3556
|
+
return types[getKeyType(key)].encode(key, inArray);
|
|
3549
3557
|
}
|
|
3550
3558
|
|
|
3551
3559
|
/**
|
|
@@ -3559,7 +3567,7 @@ function decode$1(key, inArray) {
|
|
|
3559
3567
|
if (typeof key !== 'string') {
|
|
3560
3568
|
return undefined;
|
|
3561
3569
|
}
|
|
3562
|
-
return types
|
|
3570
|
+
return types[encodedCharToKeyType[key.slice(0, 1)]].decode(key, inArray);
|
|
3563
3571
|
}
|
|
3564
3572
|
|
|
3565
3573
|
/**
|
|
@@ -4011,7 +4019,6 @@ if (Object.defineProperty) {
|
|
|
4011
4019
|
if (testObject.test) {
|
|
4012
4020
|
cleanInterface = true;
|
|
4013
4021
|
}
|
|
4014
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
4015
4022
|
} catch (err) {
|
|
4016
4023
|
// Object.defineProperty does not work as intended.
|
|
4017
4024
|
}
|
|
@@ -4875,7 +4882,6 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4875
4882
|
}
|
|
4876
4883
|
try {
|
|
4877
4884
|
me.__tx.executeSql('ROLLBACK', [], abort, /** @type {SQLStatementErrorCallback} */abort); // Not working in some circumstances, even in Node
|
|
4878
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
4879
4885
|
} catch (err) {
|
|
4880
4886
|
// Browser errs when transaction has ended and since it most likely already erred here,
|
|
4881
4887
|
// we call to abort
|
|
@@ -5002,7 +5008,7 @@ function ownKeys(e, t) {
|
|
|
5002
5008
|
function _objectSpread2(e) {
|
|
5003
5009
|
for (var t = 1; t < arguments.length; t++) {
|
|
5004
5010
|
var r = null != arguments[t] ? arguments[t] : {};
|
|
5005
|
-
t % 2 ? ownKeys(Object(r),
|
|
5011
|
+
t % 2 ? ownKeys(Object(r), true).forEach(function (t) {
|
|
5006
5012
|
_defineProperty(e, t, r[t]);
|
|
5007
5013
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function (t) {
|
|
5008
5014
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
@@ -5024,18 +5030,18 @@ function _createClass(e, t, r) {
|
|
|
5024
5030
|
return t && function _defineProperties(e, t) {
|
|
5025
5031
|
for (var r = 0; r < t.length; r++) {
|
|
5026
5032
|
var n = t[r];
|
|
5027
|
-
n.enumerable = n.enumerable ||
|
|
5033
|
+
n.enumerable = n.enumerable || false, n.configurable = true, "value" in n && (n.writable = true), Object.defineProperty(e, _toPropertyKey(n.key), n);
|
|
5028
5034
|
}
|
|
5029
5035
|
}(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
5030
|
-
writable:
|
|
5036
|
+
writable: false
|
|
5031
5037
|
}), e;
|
|
5032
5038
|
}
|
|
5033
5039
|
function _defineProperty(e, t, r) {
|
|
5034
5040
|
return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
|
|
5035
5041
|
value: r,
|
|
5036
|
-
enumerable:
|
|
5037
|
-
configurable:
|
|
5038
|
-
writable:
|
|
5042
|
+
enumerable: true,
|
|
5043
|
+
configurable: true,
|
|
5044
|
+
writable: true
|
|
5039
5045
|
}) : e[t] = r, e;
|
|
5040
5046
|
}
|
|
5041
5047
|
function _slicedToArray(e, t) {
|
|
@@ -5049,15 +5055,15 @@ function _slicedToArray(e, t) {
|
|
|
5049
5055
|
o,
|
|
5050
5056
|
i,
|
|
5051
5057
|
c = [],
|
|
5052
|
-
s =
|
|
5053
|
-
u =
|
|
5058
|
+
s = true,
|
|
5059
|
+
u = false;
|
|
5054
5060
|
try {
|
|
5055
5061
|
if (o = (r = r.call(e)).next, 0 === t) {
|
|
5056
5062
|
if (Object(r) !== r) return;
|
|
5057
5063
|
s = !1;
|
|
5058
5064
|
} else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
|
|
5059
5065
|
} catch (e) {
|
|
5060
|
-
u =
|
|
5066
|
+
u = true, a = e;
|
|
5061
5067
|
} finally {
|
|
5062
5068
|
try {
|
|
5063
5069
|
if (!s && null != r.return && (i = r.return(), Object(i) !== i)) return;
|
|
@@ -5144,13 +5150,13 @@ e.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && Object.d
|
|
|
5144
5150
|
var t = Object.hasOwn,
|
|
5145
5151
|
r = Object.getPrototypeOf;
|
|
5146
5152
|
function isThenable(e, t) {
|
|
5147
|
-
return isObject(e) && "function" == typeof e.then && (
|
|
5153
|
+
return isObject(e) && "function" == typeof e.then && (true || "function" == typeof e.catch);
|
|
5148
5154
|
}
|
|
5149
5155
|
function toStringTag(e) {
|
|
5150
5156
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
5151
5157
|
}
|
|
5152
5158
|
function hasConstructorOf(e, n) {
|
|
5153
|
-
if (!e || "object" !== _typeof(e)) return
|
|
5159
|
+
if (!e || "object" !== _typeof(e)) return false;
|
|
5154
5160
|
var a = r(e);
|
|
5155
5161
|
if (!a) return null === n;
|
|
5156
5162
|
var o = t(a, "constructor") && a.constructor;
|
|
@@ -5160,7 +5166,7 @@ function isPlainObject(e) {
|
|
|
5160
5166
|
return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
|
|
5161
5167
|
}
|
|
5162
5168
|
function isUserObject(e) {
|
|
5163
|
-
if (!e || "Object" !== toStringTag(e)) return
|
|
5169
|
+
if (!e || "Object" !== toStringTag(e)) return false;
|
|
5164
5170
|
var t = r(e);
|
|
5165
5171
|
return !t || hasConstructorOf(e, Object) || isUserObject(t);
|
|
5166
5172
|
}
|
|
@@ -5198,7 +5204,7 @@ function _await(e, t, r) {
|
|
|
5198
5204
|
var n = Object.keys,
|
|
5199
5205
|
a = Object.hasOwn,
|
|
5200
5206
|
o = Array.isArray,
|
|
5201
|
-
i
|
|
5207
|
+
i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
|
|
5202
5208
|
function _async(e) {
|
|
5203
5209
|
return function () {
|
|
5204
5210
|
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
|
|
@@ -5224,7 +5230,7 @@ var c = function () {
|
|
|
5224
5230
|
key: "stringify",
|
|
5225
5231
|
value: function stringify(e, t, r, n) {
|
|
5226
5232
|
n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
|
|
5227
|
-
stringification:
|
|
5233
|
+
stringification: true
|
|
5228
5234
|
});
|
|
5229
5235
|
var a = this.encapsulate(e, null, n);
|
|
5230
5236
|
return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
|
|
@@ -5235,63 +5241,63 @@ var c = function () {
|
|
|
5235
5241
|
key: "stringifySync",
|
|
5236
5242
|
value: function stringifySync(e, t, r, n) {
|
|
5237
5243
|
return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
|
|
5238
|
-
throwOnBadSyncType:
|
|
5244
|
+
throwOnBadSyncType: true
|
|
5239
5245
|
}, n), {}, {
|
|
5240
|
-
sync:
|
|
5246
|
+
sync: true
|
|
5241
5247
|
}));
|
|
5242
5248
|
}
|
|
5243
5249
|
}, {
|
|
5244
5250
|
key: "stringifyAsync",
|
|
5245
5251
|
value: function stringifyAsync(e, t, r, n) {
|
|
5246
5252
|
return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
|
|
5247
|
-
throwOnBadSyncType:
|
|
5253
|
+
throwOnBadSyncType: true
|
|
5248
5254
|
}, n), {}, {
|
|
5249
|
-
sync:
|
|
5255
|
+
sync: false
|
|
5250
5256
|
}));
|
|
5251
5257
|
}
|
|
5252
5258
|
}, {
|
|
5253
5259
|
key: "parse",
|
|
5254
5260
|
value: function parse(e, t, r) {
|
|
5255
5261
|
return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
|
|
5256
|
-
parse:
|
|
5262
|
+
parse: true
|
|
5257
5263
|
}), this.revive(JSON.parse(e, t), r);
|
|
5258
5264
|
}
|
|
5259
5265
|
}, {
|
|
5260
5266
|
key: "parseSync",
|
|
5261
5267
|
value: function parseSync(e, t, r) {
|
|
5262
5268
|
return this.parse(e, t, _objectSpread2(_objectSpread2({
|
|
5263
|
-
throwOnBadSyncType:
|
|
5269
|
+
throwOnBadSyncType: true
|
|
5264
5270
|
}, r), {}, {
|
|
5265
|
-
sync:
|
|
5271
|
+
sync: true
|
|
5266
5272
|
}));
|
|
5267
5273
|
}
|
|
5268
5274
|
}, {
|
|
5269
5275
|
key: "parseAsync",
|
|
5270
5276
|
value: function parseAsync(e, t, r) {
|
|
5271
5277
|
return this.parse(e, t, _objectSpread2(_objectSpread2({
|
|
5272
|
-
throwOnBadSyncType:
|
|
5278
|
+
throwOnBadSyncType: true
|
|
5273
5279
|
}, r), {}, {
|
|
5274
|
-
sync:
|
|
5280
|
+
sync: false
|
|
5275
5281
|
}));
|
|
5276
5282
|
}
|
|
5277
5283
|
}, {
|
|
5278
5284
|
key: "specialTypeNames",
|
|
5279
5285
|
value: function specialTypeNames(e, t) {
|
|
5280
5286
|
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
5281
|
-
return r.returnTypeNames =
|
|
5287
|
+
return r.returnTypeNames = true, this.encapsulate(e, t, r);
|
|
5282
5288
|
}
|
|
5283
5289
|
}, {
|
|
5284
5290
|
key: "rootTypeName",
|
|
5285
5291
|
value: function rootTypeName(e, t) {
|
|
5286
5292
|
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
5287
|
-
return r.iterateNone =
|
|
5293
|
+
return r.iterateNone = true, this.encapsulate(e, t, r);
|
|
5288
5294
|
}
|
|
5289
5295
|
}, {
|
|
5290
5296
|
key: "encapsulate",
|
|
5291
5297
|
value: function encapsulate(t, r, c) {
|
|
5292
5298
|
var s = this,
|
|
5293
5299
|
u = _objectSpread2(_objectSpread2({
|
|
5294
|
-
sync:
|
|
5300
|
+
sync: true
|
|
5295
5301
|
}, this.options), c),
|
|
5296
5302
|
l = u.sync,
|
|
5297
5303
|
f = {},
|
|
@@ -5299,8 +5305,8 @@ var c = function () {
|
|
|
5299
5305
|
p = [],
|
|
5300
5306
|
d = [],
|
|
5301
5307
|
v = !("cyclic" in u) || u.cyclic,
|
|
5302
|
-
|
|
5303
|
-
|
|
5308
|
+
b = u.encapsulateObserver,
|
|
5309
|
+
m = function finish(e) {
|
|
5304
5310
|
var t = Object.values(f);
|
|
5305
5311
|
if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5306
5312
|
if (t.length) {
|
|
@@ -5321,7 +5327,7 @@ var c = function () {
|
|
|
5321
5327
|
};
|
|
5322
5328
|
} else isObject(e) && a(e, "$types") && (e = {
|
|
5323
5329
|
$: e,
|
|
5324
|
-
$types:
|
|
5330
|
+
$types: true
|
|
5325
5331
|
});
|
|
5326
5332
|
return !u.returnTypeNames && e;
|
|
5327
5333
|
},
|
|
@@ -5330,7 +5336,7 @@ var c = function () {
|
|
|
5330
5336
|
return e[1].p;
|
|
5331
5337
|
})), function (n) {
|
|
5332
5338
|
return _await(Promise.all(n.map(_async(function (n) {
|
|
5333
|
-
var a =
|
|
5339
|
+
var a = false,
|
|
5334
5340
|
o = [],
|
|
5335
5341
|
i = _slicedToArray(r.splice(0, 1), 1),
|
|
5336
5342
|
c = _slicedToArray(i[0], 7),
|
|
@@ -5340,7 +5346,7 @@ var c = function () {
|
|
|
5340
5346
|
f = c[4],
|
|
5341
5347
|
y = c[5],
|
|
5342
5348
|
p = c[6],
|
|
5343
|
-
d = O(s, n, u, l, o,
|
|
5349
|
+
d = O(s, n, u, l, o, true, p),
|
|
5344
5350
|
v = hasConstructorOf(d, e);
|
|
5345
5351
|
return function _invoke(e, t) {
|
|
5346
5352
|
var r = e();
|
|
@@ -5349,7 +5355,7 @@ var c = function () {
|
|
|
5349
5355
|
if (s && v) return _await(d.p, function (e) {
|
|
5350
5356
|
f[y] = e;
|
|
5351
5357
|
var r = h(t, o);
|
|
5352
|
-
return a =
|
|
5358
|
+
return a = true, r;
|
|
5353
5359
|
});
|
|
5354
5360
|
}, function (e) {
|
|
5355
5361
|
return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
|
|
@@ -5361,22 +5367,22 @@ var c = function () {
|
|
|
5361
5367
|
}),
|
|
5362
5368
|
g = function _adaptBuiltinStateObjectProperties(e, t, r) {
|
|
5363
5369
|
Object.assign(e, t);
|
|
5364
|
-
var n = i
|
|
5370
|
+
var n = i.map(function (t) {
|
|
5365
5371
|
var r = e[t];
|
|
5366
5372
|
return delete e[t], r;
|
|
5367
5373
|
});
|
|
5368
|
-
r(), i
|
|
5374
|
+
r(), i.forEach(function (t, r) {
|
|
5369
5375
|
e[t] = n[r];
|
|
5370
5376
|
});
|
|
5371
5377
|
},
|
|
5372
5378
|
O = function _encapsulate(t, r, i, c, l, d, v) {
|
|
5373
|
-
var
|
|
5379
|
+
var m,
|
|
5374
5380
|
h = {},
|
|
5375
5381
|
O = _typeof(r),
|
|
5376
|
-
_ =
|
|
5382
|
+
_ = b ? function (n) {
|
|
5377
5383
|
var a,
|
|
5378
5384
|
o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
|
|
5379
|
-
|
|
5385
|
+
b(Object.assign(null != n ? n : h, {
|
|
5380
5386
|
keypath: t,
|
|
5381
5387
|
value: r,
|
|
5382
5388
|
cyclic: i,
|
|
@@ -5388,30 +5394,30 @@ var c = function () {
|
|
|
5388
5394
|
type: o
|
|
5389
5395
|
}));
|
|
5390
5396
|
} : null;
|
|
5391
|
-
if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (
|
|
5392
|
-
replaced:
|
|
5393
|
-
}) :
|
|
5397
|
+
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 : w(t, r, c, l, false, d, _)) !== r && (h = {
|
|
5398
|
+
replaced: m
|
|
5399
|
+
}) : m = r, _ && _(), m;
|
|
5394
5400
|
if (null === r) return _ && _(), r;
|
|
5395
5401
|
if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
|
|
5396
5402
|
var A = y.indexOf(r);
|
|
5397
5403
|
if (!(A < 0)) return f[t] = "#", _ && _({
|
|
5398
5404
|
cyclicKeypath: p[A]
|
|
5399
5405
|
}), "#" + p[A];
|
|
5400
|
-
|
|
5406
|
+
true === i && (y.push(r), p.push(t));
|
|
5401
5407
|
}
|
|
5402
5408
|
var S,
|
|
5403
5409
|
j,
|
|
5404
5410
|
T = isPlainObject(r),
|
|
5405
5411
|
I = o(r),
|
|
5406
5412
|
N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
|
|
5407
|
-
if (N !== r ? (
|
|
5413
|
+
if (N !== r ? (m = N, h = {
|
|
5408
5414
|
replaced: N
|
|
5409
|
-
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]),
|
|
5415
|
+
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), m = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
|
|
5410
5416
|
clone: S
|
|
5411
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ?
|
|
5417
|
+
}) : (["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 = {
|
|
5412
5418
|
clone: S
|
|
5413
|
-
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j :
|
|
5414
|
-
if (!S) return
|
|
5419
|
+
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
|
|
5420
|
+
if (!S) return m;
|
|
5415
5421
|
if (c.iterateIn) {
|
|
5416
5422
|
var P = function _loop(n) {
|
|
5417
5423
|
var o = {
|
|
@@ -5425,27 +5431,27 @@ var c = function () {
|
|
|
5425
5431
|
};
|
|
5426
5432
|
for (var x in r) P(x);
|
|
5427
5433
|
_ && _({
|
|
5428
|
-
endIterateIn:
|
|
5429
|
-
end:
|
|
5434
|
+
endIterateIn: true,
|
|
5435
|
+
end: true
|
|
5430
5436
|
});
|
|
5431
5437
|
} else n(r).forEach(function (n) {
|
|
5432
5438
|
var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
|
|
5433
5439
|
g(c, {
|
|
5434
|
-
ownKeys:
|
|
5440
|
+
ownKeys: true
|
|
5435
5441
|
}, function () {
|
|
5436
5442
|
var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
5437
5443
|
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
5438
5444
|
});
|
|
5439
5445
|
}), _ && _({
|
|
5440
|
-
endIterateOwn:
|
|
5441
|
-
end:
|
|
5446
|
+
endIterateOwn: true,
|
|
5447
|
+
end: true
|
|
5442
5448
|
});
|
|
5443
5449
|
if (c.iterateUnsetNumeric) {
|
|
5444
5450
|
for (var E = r.length, C = function _loop2(n) {
|
|
5445
5451
|
if (!(n in r)) {
|
|
5446
5452
|
var a = "".concat(t).concat(t ? "." : "").concat(n);
|
|
5447
5453
|
g(c, {
|
|
5448
|
-
ownKeys:
|
|
5454
|
+
ownKeys: false
|
|
5449
5455
|
}, function () {
|
|
5450
5456
|
var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
|
|
5451
5457
|
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
@@ -5453,8 +5459,8 @@ var c = function () {
|
|
|
5453
5459
|
}
|
|
5454
5460
|
}, B = 0; B < E; B++) C(B);
|
|
5455
5461
|
_ && _({
|
|
5456
|
-
endIterateUnsetNumeric:
|
|
5457
|
-
end:
|
|
5462
|
+
endIterateUnsetNumeric: true,
|
|
5463
|
+
end: true
|
|
5458
5464
|
});
|
|
5459
5465
|
}
|
|
5460
5466
|
return S;
|
|
@@ -5470,19 +5476,19 @@ var c = function () {
|
|
|
5470
5476
|
}
|
|
5471
5477
|
if (Object.assign(r, {
|
|
5472
5478
|
type: p,
|
|
5473
|
-
replaced:
|
|
5479
|
+
replaced: true
|
|
5474
5480
|
}), (l || !y.replaceAsync) && !y.replace) return i && i({
|
|
5475
|
-
typeDetected:
|
|
5481
|
+
typeDetected: true
|
|
5476
5482
|
}), O(e, t, v && "readonly", r, n, o, p);
|
|
5477
5483
|
i && i({
|
|
5478
|
-
replacing:
|
|
5484
|
+
replacing: true
|
|
5479
5485
|
});
|
|
5480
|
-
var
|
|
5486
|
+
var b = void 0;
|
|
5481
5487
|
if (l || !y.replaceAsync) {
|
|
5482
5488
|
if (void 0 === y.replace) throw new TypeError("Missing replacer");
|
|
5483
|
-
|
|
5484
|
-
} else
|
|
5485
|
-
return O(e,
|
|
5489
|
+
b = y.replace(t, r);
|
|
5490
|
+
} else b = y.replaceAsync(t, r);
|
|
5491
|
+
return O(e, b, v && "readonly", r, n, o, p);
|
|
5486
5492
|
}
|
|
5487
5493
|
}
|
|
5488
5494
|
return t;
|
|
@@ -5490,26 +5496,26 @@ var c = function () {
|
|
|
5490
5496
|
_ = O("", t, v, null != r ? r : {}, d);
|
|
5491
5497
|
if (d.length) return l && u.throwOnBadSyncType ? function () {
|
|
5492
5498
|
throw new TypeError("Sync method requested but async result obtained");
|
|
5493
|
-
}() : Promise.resolve(h(_, d)).then(
|
|
5499
|
+
}() : Promise.resolve(h(_, d)).then(m);
|
|
5494
5500
|
if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
5495
|
-
return u.stringification && l ? [
|
|
5501
|
+
return u.stringification && l ? [m(_)] : l ? m(_) : Promise.resolve(m(_));
|
|
5496
5502
|
}
|
|
5497
5503
|
}, {
|
|
5498
5504
|
key: "encapsulateSync",
|
|
5499
5505
|
value: function encapsulateSync(e, t, r) {
|
|
5500
5506
|
return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
|
|
5501
|
-
throwOnBadSyncType:
|
|
5507
|
+
throwOnBadSyncType: true
|
|
5502
5508
|
}, r), {}, {
|
|
5503
|
-
sync:
|
|
5509
|
+
sync: true
|
|
5504
5510
|
}));
|
|
5505
5511
|
}
|
|
5506
5512
|
}, {
|
|
5507
5513
|
key: "encapsulateAsync",
|
|
5508
5514
|
value: function encapsulateAsync(e, t, r) {
|
|
5509
5515
|
return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
|
|
5510
|
-
throwOnBadSyncType:
|
|
5516
|
+
throwOnBadSyncType: true
|
|
5511
5517
|
}, r), {}, {
|
|
5512
|
-
sync:
|
|
5518
|
+
sync: false
|
|
5513
5519
|
}));
|
|
5514
5520
|
}
|
|
5515
5521
|
}, {
|
|
@@ -5517,7 +5523,7 @@ var c = function () {
|
|
|
5517
5523
|
value: function revive(t, r) {
|
|
5518
5524
|
var a = this,
|
|
5519
5525
|
i = _objectSpread2(_objectSpread2({
|
|
5520
|
-
sync:
|
|
5526
|
+
sync: true
|
|
5521
5527
|
}, this.options), r),
|
|
5522
5528
|
c = i.sync;
|
|
5523
5529
|
function finishRevival(e) {
|
|
@@ -5527,12 +5533,12 @@ var c = function () {
|
|
|
5527
5533
|
}
|
|
5528
5534
|
if (!t || "object" !== _typeof(t) || Array.isArray(t)) return finishRevival(t);
|
|
5529
5535
|
var u = t.$types;
|
|
5530
|
-
if (
|
|
5536
|
+
if (true === u) return finishRevival(t.$);
|
|
5531
5537
|
if (!u || "object" !== _typeof(u) || Array.isArray(u)) return finishRevival(t);
|
|
5532
5538
|
var l = [],
|
|
5533
5539
|
f = {},
|
|
5534
|
-
y =
|
|
5535
|
-
u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y =
|
|
5540
|
+
y = true;
|
|
5541
|
+
u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = false);
|
|
5536
5542
|
var p = function executeReviver(e, t) {
|
|
5537
5543
|
var r,
|
|
5538
5544
|
n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
|
|
@@ -5547,7 +5553,7 @@ var c = function () {
|
|
|
5547
5553
|
return hasConstructorOf(e, s) ? void 0 : e;
|
|
5548
5554
|
}
|
|
5549
5555
|
var v,
|
|
5550
|
-
|
|
5556
|
+
b = function revivePlainObjects() {
|
|
5551
5557
|
var r = [];
|
|
5552
5558
|
if (!u) throw new Error("Found bad `types`");
|
|
5553
5559
|
if (Object.entries(u).forEach(function (e) {
|
|
@@ -5579,28 +5585,28 @@ var c = function () {
|
|
|
5579
5585
|
c === i && (t = c);
|
|
5580
5586
|
}, void 0);
|
|
5581
5587
|
}();
|
|
5582
|
-
return hasConstructorOf(
|
|
5588
|
+
return hasConstructorOf(b, e) ? v = b.then(function () {
|
|
5583
5589
|
return t;
|
|
5584
5590
|
}) : (v = function _revive(t, r, a, i, c) {
|
|
5585
5591
|
if (!y || "$types" !== t) {
|
|
5586
5592
|
var f = u[t],
|
|
5587
5593
|
v = o(r);
|
|
5588
5594
|
if (v || isPlainObject(r)) {
|
|
5589
|
-
var
|
|
5595
|
+
var b = v ? new Array(r.length) : {};
|
|
5590
5596
|
for (n(r).forEach(function (n) {
|
|
5591
|
-
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a :
|
|
5597
|
+
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : b, b, n),
|
|
5592
5598
|
i = function set(e) {
|
|
5593
|
-
return hasConstructorOf(e, s) ?
|
|
5599
|
+
return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
|
|
5594
5600
|
};
|
|
5595
5601
|
hasConstructorOf(o, e) ? d.push(o.then(function (e) {
|
|
5596
5602
|
return i(e);
|
|
5597
5603
|
})) : i(o);
|
|
5598
|
-
}), r =
|
|
5599
|
-
var
|
|
5600
|
-
h =
|
|
5601
|
-
g =
|
|
5602
|
-
O =
|
|
5603
|
-
w =
|
|
5604
|
+
}), r = b; l.length;) {
|
|
5605
|
+
var m = _slicedToArray(l[0], 4),
|
|
5606
|
+
h = m[0],
|
|
5607
|
+
g = m[1],
|
|
5608
|
+
O = m[2],
|
|
5609
|
+
w = m[3],
|
|
5604
5610
|
_ = getByKeyPath(h, g);
|
|
5605
5611
|
if (void 0 === _) break;
|
|
5606
5612
|
O[w] = _, l.splice(0, 1);
|
|
@@ -5633,18 +5639,18 @@ var c = function () {
|
|
|
5633
5639
|
key: "reviveSync",
|
|
5634
5640
|
value: function reviveSync(e, t) {
|
|
5635
5641
|
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
5636
|
-
throwOnBadSyncType:
|
|
5642
|
+
throwOnBadSyncType: true
|
|
5637
5643
|
}, t), {}, {
|
|
5638
|
-
sync:
|
|
5644
|
+
sync: true
|
|
5639
5645
|
}));
|
|
5640
5646
|
}
|
|
5641
5647
|
}, {
|
|
5642
5648
|
key: "reviveAsync",
|
|
5643
5649
|
value: function reviveAsync(e, t) {
|
|
5644
5650
|
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
5645
|
-
throwOnBadSyncType:
|
|
5651
|
+
throwOnBadSyncType: true
|
|
5646
5652
|
}, t), {}, {
|
|
5647
|
-
sync:
|
|
5653
|
+
sync: false
|
|
5648
5654
|
}));
|
|
5649
5655
|
}
|
|
5650
5656
|
}, {
|
|
@@ -5741,26 +5747,27 @@ const v = {
|
|
|
5741
5747
|
index: r
|
|
5742
5748
|
} : (t.buffers.push(e), {
|
|
5743
5749
|
s: p(e),
|
|
5744
|
-
maxByteLength: e.maxByteLength
|
|
5750
|
+
maxByteLength: e.maxByteLength,
|
|
5751
|
+
resizable: e.resizable
|
|
5745
5752
|
});
|
|
5746
5753
|
},
|
|
5747
5754
|
revive(e, t) {
|
|
5748
5755
|
if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
|
|
5749
|
-
const r = d(e.s, {
|
|
5756
|
+
const r = d(e.s, e.resizable ? {
|
|
5750
5757
|
maxByteLength: e.maxByteLength
|
|
5751
|
-
});
|
|
5758
|
+
} : void 0);
|
|
5752
5759
|
return t.buffers.push(r), r;
|
|
5753
5760
|
}
|
|
5754
5761
|
}
|
|
5755
5762
|
},
|
|
5756
|
-
|
|
5763
|
+
b = {
|
|
5757
5764
|
bigintObject: {
|
|
5758
5765
|
test: e => "object" == typeof e && hasConstructorOf(e, BigInt),
|
|
5759
5766
|
replace: String,
|
|
5760
5767
|
revive: e => new Object(BigInt(e))
|
|
5761
5768
|
}
|
|
5762
5769
|
},
|
|
5763
|
-
|
|
5770
|
+
m = {
|
|
5764
5771
|
bigint: {
|
|
5765
5772
|
test: e => "bigint" == typeof e,
|
|
5766
5773
|
replace: String,
|
|
@@ -5780,7 +5787,7 @@ const h = {
|
|
|
5780
5787
|
test: e => "Blob" === toStringTag(e),
|
|
5781
5788
|
replace(e) {
|
|
5782
5789
|
const t = new XMLHttpRequest();
|
|
5783
|
-
if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e),
|
|
5790
|
+
if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), false), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad Blob access: " + t.status);
|
|
5784
5791
|
return {
|
|
5785
5792
|
type: e.type,
|
|
5786
5793
|
stringContents: t.responseText
|
|
@@ -5830,7 +5837,7 @@ const w = {
|
|
|
5830
5837
|
algorithm: r,
|
|
5831
5838
|
usages: n
|
|
5832
5839
|
} = e;
|
|
5833
|
-
return crypto.subtle.importKey("jwk", t, r,
|
|
5840
|
+
return crypto.subtle.importKey("jwk", t, r, true, n);
|
|
5834
5841
|
}
|
|
5835
5842
|
}
|
|
5836
5843
|
},
|
|
@@ -5851,6 +5858,7 @@ const w = {
|
|
|
5851
5858
|
} : (n.buffers.push(e), {
|
|
5852
5859
|
encoded: p(e),
|
|
5853
5860
|
maxByteLength: e.maxByteLength,
|
|
5861
|
+
resizable: e.resizable,
|
|
5854
5862
|
byteOffset: t,
|
|
5855
5863
|
byteLength: r
|
|
5856
5864
|
});
|
|
@@ -5862,12 +5870,13 @@ const w = {
|
|
|
5862
5870
|
byteLength: n,
|
|
5863
5871
|
encoded: a,
|
|
5864
5872
|
index: o,
|
|
5865
|
-
maxByteLength: i
|
|
5873
|
+
maxByteLength: i,
|
|
5874
|
+
resizable: c
|
|
5866
5875
|
} = e;
|
|
5867
|
-
let
|
|
5868
|
-
return "index" in e ?
|
|
5876
|
+
let s;
|
|
5877
|
+
return "index" in e ? s = t.buffers[o] : (s = d(a, c ? {
|
|
5869
5878
|
maxByteLength: i
|
|
5870
|
-
}), t.buffers.push(
|
|
5879
|
+
} : i), t.buffers.push(s)), new DataView(s, r, n);
|
|
5871
5880
|
}
|
|
5872
5881
|
}
|
|
5873
5882
|
},
|
|
@@ -6043,7 +6052,7 @@ const E = {
|
|
|
6043
6052
|
test: e => "File" === toStringTag(e),
|
|
6044
6053
|
replace(e) {
|
|
6045
6054
|
const t = new XMLHttpRequest();
|
|
6046
|
-
if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e),
|
|
6055
|
+
if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), false), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad File access: " + t.status);
|
|
6047
6056
|
return {
|
|
6048
6057
|
type: e.type,
|
|
6049
6058
|
stringContents: t.responseText,
|
|
@@ -6181,7 +6190,7 @@ const E = {
|
|
|
6181
6190
|
revive: () => -0
|
|
6182
6191
|
}
|
|
6183
6192
|
},
|
|
6184
|
-
|
|
6193
|
+
J = {
|
|
6185
6194
|
StringObject: {
|
|
6186
6195
|
test: e => "String" === toStringTag(e) && "object" == typeof e,
|
|
6187
6196
|
replace: String,
|
|
@@ -6198,7 +6207,7 @@ const E = {
|
|
|
6198
6207
|
revive: e => new Number(e)
|
|
6199
6208
|
}
|
|
6200
6209
|
},
|
|
6201
|
-
|
|
6210
|
+
q = {
|
|
6202
6211
|
regexp: {
|
|
6203
6212
|
test: e => "RegExp" === toStringTag(e),
|
|
6204
6213
|
replace: e => ({
|
|
@@ -6211,7 +6220,7 @@ const E = {
|
|
|
6211
6220
|
}) => new RegExp(e, t)
|
|
6212
6221
|
}
|
|
6213
6222
|
},
|
|
6214
|
-
|
|
6223
|
+
G = {
|
|
6215
6224
|
set: {
|
|
6216
6225
|
test: e => "Set" === toStringTag(e),
|
|
6217
6226
|
replace: e => [...e.values()],
|
|
@@ -6245,6 +6254,7 @@ const X = {};
|
|
|
6245
6254
|
length: r
|
|
6246
6255
|
} : (n.buffers.push(e), {
|
|
6247
6256
|
maxByteLength: e.maxByteLength,
|
|
6257
|
+
resizable: e.resizable,
|
|
6248
6258
|
encoded: p(e),
|
|
6249
6259
|
byteOffset: t,
|
|
6250
6260
|
length: r
|
|
@@ -6257,12 +6267,13 @@ const X = {};
|
|
|
6257
6267
|
length: a,
|
|
6258
6268
|
encoded: o,
|
|
6259
6269
|
index: i,
|
|
6260
|
-
maxByteLength: c
|
|
6270
|
+
maxByteLength: c,
|
|
6271
|
+
resizable: s
|
|
6261
6272
|
} = t;
|
|
6262
|
-
let
|
|
6263
|
-
return "index" in t ?
|
|
6273
|
+
let u;
|
|
6274
|
+
return "index" in t ? u = r.buffers[i] : (u = d(o, s ? {
|
|
6264
6275
|
maxByteLength: c
|
|
6265
|
-
}), r.buffers.push(
|
|
6276
|
+
} : void 0), r.buffers.push(u)), new e(u, n, a);
|
|
6266
6277
|
}
|
|
6267
6278
|
};
|
|
6268
6279
|
}(e));
|
|
@@ -6284,9 +6295,9 @@ const Z = {
|
|
|
6284
6295
|
},
|
|
6285
6296
|
te = [{
|
|
6286
6297
|
arrayNonindexKeys: {
|
|
6287
|
-
testPlainObjects:
|
|
6288
|
-
test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength =
|
|
6289
|
-
replace: (e, t) => (t.iterateUnsetNumeric =
|
|
6298
|
+
testPlainObjects: true,
|
|
6299
|
+
test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = true), true),
|
|
6300
|
+
replace: (e, t) => (t.iterateUnsetNumeric = true, e),
|
|
6290
6301
|
revive(e) {
|
|
6291
6302
|
if (Array.isArray(e)) return e;
|
|
6292
6303
|
const t = [];
|
|
@@ -6297,19 +6308,19 @@ const Z = {
|
|
|
6297
6308
|
}
|
|
6298
6309
|
}, {
|
|
6299
6310
|
sparseUndefined: {
|
|
6300
|
-
test: (e, t) => void 0 === e &&
|
|
6311
|
+
test: (e, t) => void 0 === e && false === t.ownKeys,
|
|
6301
6312
|
replace: () => 0,
|
|
6302
6313
|
revive() {}
|
|
6303
6314
|
}
|
|
6304
6315
|
}],
|
|
6305
6316
|
re = [K, U, F, $],
|
|
6306
|
-
ce = [ee, Z, te,
|
|
6317
|
+
ce = [ee, Z, te, J, re, A, q, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? X : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [m, b] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
|
|
6307
6318
|
se = ce.concat({
|
|
6308
6319
|
checkDataCloneException: {
|
|
6309
6320
|
test(e) {
|
|
6310
6321
|
const t = {}.toString.call(e).slice(8, -1);
|
|
6311
6322
|
if (["symbol", "function"].includes(typeof e) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == typeof e && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
|
|
6312
|
-
return
|
|
6323
|
+
return false;
|
|
6313
6324
|
}
|
|
6314
6325
|
}
|
|
6315
6326
|
});
|
|
@@ -6653,7 +6664,6 @@ IDBIndex.__createIndex = function (store, index) {
|
|
|
6653
6664
|
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
|
|
6654
6665
|
addIndexEntry(i + 1);
|
|
6655
6666
|
}, /** @type {SQLStatementErrorCallback} */error);
|
|
6656
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
6657
6667
|
} catch (err) {
|
|
6658
6668
|
// Not a valid value to insert into index, so just continue
|
|
6659
6669
|
addIndexEntry(i + 1);
|
|
@@ -6780,7 +6790,6 @@ IDBIndex.__deleteIndex = function (store, index) {
|
|
|
6780
6790
|
IDBIndex.__updateIndexList = function (store, tx, success, failure) {
|
|
6781
6791
|
/** @type {IndexList} **/
|
|
6782
6792
|
const indexList = {};
|
|
6783
|
-
// eslint-disable-next-line sonarjs/prefer-for-of -- Implement iterability?
|
|
6784
6793
|
for (let i = 0; i < store.indexNames.length; i++) {
|
|
6785
6794
|
const idx = store.__indexes[store.indexNames[i]];
|
|
6786
6795
|
indexList[idx.name] = {
|
|
@@ -7740,7 +7749,6 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
7740
7749
|
if ('invalid' in indexKey && indexKey.invalid || 'failure' in indexKey && indexKey.failure) {
|
|
7741
7750
|
throw new Error('Go to catch');
|
|
7742
7751
|
}
|
|
7743
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
7744
7752
|
} catch (err) {
|
|
7745
7753
|
resolve(undefined);
|
|
7746
7754
|
return;
|
|
@@ -8840,7 +8848,7 @@ let nameCounter = 0;
|
|
|
8840
8848
|
*/
|
|
8841
8849
|
function getLatestCachedWebSQLVersion(name) {
|
|
8842
8850
|
return Object.keys(websqlDBCache[name]).map(Number).reduce((prev, curr) => {
|
|
8843
|
-
return curr
|
|
8851
|
+
return Math.max(curr, prev);
|
|
8844
8852
|
}, 0);
|
|
8845
8853
|
}
|
|
8846
8854
|
|
|
@@ -9122,7 +9130,6 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9122
9130
|
if (err) {
|
|
9123
9131
|
try {
|
|
9124
9132
|
systx.executeSql('ROLLBACK', [], cb, cb);
|
|
9125
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
9126
9133
|
} catch (err) {
|
|
9127
9134
|
// Browser may fail with expired transaction above so
|
|
9128
9135
|
// no choice but to manually revert
|
|
@@ -9230,7 +9237,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9230
9237
|
// eslint-disable-next-line camelcase -- Clear API
|
|
9231
9238
|
req.transaction.on__complete = function () {
|
|
9232
9239
|
const pos = connection.__transactions.indexOf(req.transaction);
|
|
9233
|
-
if (pos
|
|
9240
|
+
if (pos !== -1) {
|
|
9234
9241
|
connection.__transactions.splice(pos, 1);
|
|
9235
9242
|
}
|
|
9236
9243
|
if (/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
|
|
@@ -10485,6 +10492,8 @@ Object.defineProperty(IDBCursorWithValue, 'prototype', {
|
|
|
10485
10492
|
writable: false
|
|
10486
10493
|
});
|
|
10487
10494
|
|
|
10495
|
+
/* eslint-disable unicorn/prefer-global-this -- Older browsers? */
|
|
10496
|
+
|
|
10488
10497
|
/**
|
|
10489
10498
|
* @typedef {any} AnyValue
|
|
10490
10499
|
*/
|
|
@@ -10630,7 +10639,6 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
10630
10639
|
Object.getOwnPropertyDescriptor(o, name);
|
|
10631
10640
|
}
|
|
10632
10641
|
Object.defineProperty(IDB, name, desc);
|
|
10633
|
-
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
10634
10642
|
} catch (err) {
|
|
10635
10643
|
// With `indexedDB`, PhantomJS fails here and below but
|
|
10636
10644
|
// not above, while Chrome is reverse (and Firefox doesn't
|
|
@@ -10829,237 +10837,301 @@ function getDefaultExportFromCjs (x) {
|
|
|
10829
10837
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10830
10838
|
}
|
|
10831
10839
|
|
|
10832
|
-
var nextTick
|
|
10840
|
+
var nextTick = {};
|
|
10833
10841
|
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
nextTick
|
|
10839
|
-
|
|
10840
|
-
process.
|
|
10842
|
+
var hasRequiredNextTick;
|
|
10843
|
+
function requireNextTick() {
|
|
10844
|
+
if (hasRequiredNextTick) return nextTick;
|
|
10845
|
+
hasRequiredNextTick = 1;
|
|
10846
|
+
nextTick.test = function () {
|
|
10847
|
+
// Don't get fooled by e.g. browserify environments.
|
|
10848
|
+
return typeof process !== 'undefined' && !process.browser;
|
|
10841
10849
|
};
|
|
10842
|
-
|
|
10850
|
+
nextTick.install = function (func) {
|
|
10851
|
+
return function () {
|
|
10852
|
+
process.nextTick(func);
|
|
10853
|
+
};
|
|
10854
|
+
};
|
|
10855
|
+
return nextTick;
|
|
10856
|
+
}
|
|
10843
10857
|
|
|
10844
10858
|
var queueMicrotask = {};
|
|
10845
10859
|
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
commonjsGlobal.queueMicrotask
|
|
10860
|
+
var hasRequiredQueueMicrotask;
|
|
10861
|
+
function requireQueueMicrotask() {
|
|
10862
|
+
if (hasRequiredQueueMicrotask) return queueMicrotask;
|
|
10863
|
+
hasRequiredQueueMicrotask = 1;
|
|
10864
|
+
queueMicrotask.test = function () {
|
|
10865
|
+
return typeof commonjsGlobal.queueMicrotask === 'function';
|
|
10852
10866
|
};
|
|
10853
|
-
|
|
10867
|
+
queueMicrotask.install = function (func) {
|
|
10868
|
+
return function () {
|
|
10869
|
+
commonjsGlobal.queueMicrotask(func);
|
|
10870
|
+
};
|
|
10871
|
+
};
|
|
10872
|
+
return queueMicrotask;
|
|
10873
|
+
}
|
|
10854
10874
|
|
|
10855
10875
|
var mutation = {};
|
|
10856
10876
|
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
var element = commonjsGlobal.document.createTextNode('');
|
|
10869
|
-
observer.observe(element, {
|
|
10870
|
-
characterData: true
|
|
10871
|
-
});
|
|
10872
|
-
return function () {
|
|
10873
|
-
element.data = called = ++called % 2;
|
|
10877
|
+
var hasRequiredMutation;
|
|
10878
|
+
function requireMutation() {
|
|
10879
|
+
if (hasRequiredMutation) return mutation;
|
|
10880
|
+
hasRequiredMutation = 1;
|
|
10881
|
+
//based off rsvp https://github.com/tildeio/rsvp.js
|
|
10882
|
+
//license https://github.com/tildeio/rsvp.js/blob/master/LICENSE
|
|
10883
|
+
//https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/asap.js
|
|
10884
|
+
|
|
10885
|
+
var Mutation = commonjsGlobal.MutationObserver || commonjsGlobal.WebKitMutationObserver;
|
|
10886
|
+
mutation.test = function () {
|
|
10887
|
+
return Mutation;
|
|
10874
10888
|
};
|
|
10875
|
-
|
|
10889
|
+
mutation.install = function (handle) {
|
|
10890
|
+
var called = 0;
|
|
10891
|
+
var observer = new Mutation(handle);
|
|
10892
|
+
var element = commonjsGlobal.document.createTextNode('');
|
|
10893
|
+
observer.observe(element, {
|
|
10894
|
+
characterData: true
|
|
10895
|
+
});
|
|
10896
|
+
return function () {
|
|
10897
|
+
element.data = called = ++called % 2;
|
|
10898
|
+
};
|
|
10899
|
+
};
|
|
10900
|
+
return mutation;
|
|
10901
|
+
}
|
|
10876
10902
|
|
|
10877
10903
|
var messageChannel = {};
|
|
10878
10904
|
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
return function () {
|
|
10891
|
-
channel.port2.postMessage(0);
|
|
10905
|
+
var hasRequiredMessageChannel;
|
|
10906
|
+
function requireMessageChannel() {
|
|
10907
|
+
if (hasRequiredMessageChannel) return messageChannel;
|
|
10908
|
+
hasRequiredMessageChannel = 1;
|
|
10909
|
+
messageChannel.test = function () {
|
|
10910
|
+
if (commonjsGlobal.setImmediate) {
|
|
10911
|
+
// we can only get here in IE10
|
|
10912
|
+
// which doesn't handel postMessage well
|
|
10913
|
+
return false;
|
|
10914
|
+
}
|
|
10915
|
+
return typeof commonjsGlobal.MessageChannel !== 'undefined';
|
|
10892
10916
|
};
|
|
10893
|
-
|
|
10917
|
+
messageChannel.install = function (func) {
|
|
10918
|
+
var channel = new commonjsGlobal.MessageChannel();
|
|
10919
|
+
channel.port1.onmessage = func;
|
|
10920
|
+
return function () {
|
|
10921
|
+
channel.port2.postMessage(0);
|
|
10922
|
+
};
|
|
10923
|
+
};
|
|
10924
|
+
return messageChannel;
|
|
10925
|
+
}
|
|
10894
10926
|
|
|
10895
10927
|
var stateChange = {};
|
|
10896
10928
|
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
scriptEl.
|
|
10909
|
-
scriptEl =
|
|
10929
|
+
var hasRequiredStateChange;
|
|
10930
|
+
function requireStateChange() {
|
|
10931
|
+
if (hasRequiredStateChange) return stateChange;
|
|
10932
|
+
hasRequiredStateChange = 1;
|
|
10933
|
+
stateChange.test = function () {
|
|
10934
|
+
return 'document' in commonjsGlobal && 'onreadystatechange' in commonjsGlobal.document.createElement('script');
|
|
10935
|
+
};
|
|
10936
|
+
stateChange.install = function (handle) {
|
|
10937
|
+
return function () {
|
|
10938
|
+
// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
|
|
10939
|
+
// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
|
|
10940
|
+
var scriptEl = commonjsGlobal.document.createElement('script');
|
|
10941
|
+
scriptEl.onreadystatechange = function () {
|
|
10942
|
+
handle();
|
|
10943
|
+
scriptEl.onreadystatechange = null;
|
|
10944
|
+
scriptEl.parentNode.removeChild(scriptEl);
|
|
10945
|
+
scriptEl = null;
|
|
10946
|
+
};
|
|
10947
|
+
commonjsGlobal.document.documentElement.appendChild(scriptEl);
|
|
10948
|
+
return handle;
|
|
10910
10949
|
};
|
|
10911
|
-
commonjsGlobal.document.documentElement.appendChild(scriptEl);
|
|
10912
|
-
return handle;
|
|
10913
10950
|
};
|
|
10914
|
-
|
|
10951
|
+
return stateChange;
|
|
10952
|
+
}
|
|
10915
10953
|
|
|
10916
10954
|
var timeout = {};
|
|
10917
10955
|
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10956
|
+
var hasRequiredTimeout;
|
|
10957
|
+
function requireTimeout() {
|
|
10958
|
+
if (hasRequiredTimeout) return timeout;
|
|
10959
|
+
hasRequiredTimeout = 1;
|
|
10960
|
+
timeout.test = function () {
|
|
10961
|
+
return true;
|
|
10924
10962
|
};
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10963
|
+
timeout.install = function (t) {
|
|
10964
|
+
return function () {
|
|
10965
|
+
setTimeout(t, 0);
|
|
10966
|
+
};
|
|
10967
|
+
};
|
|
10968
|
+
return timeout;
|
|
10969
|
+
}
|
|
10970
|
+
|
|
10971
|
+
var lib;
|
|
10972
|
+
var hasRequiredLib;
|
|
10973
|
+
function requireLib() {
|
|
10974
|
+
if (hasRequiredLib) return lib;
|
|
10975
|
+
hasRequiredLib = 1;
|
|
10976
|
+
var types = [requireNextTick(), requireQueueMicrotask(), requireMutation(), requireMessageChannel(), requireStateChange(), requireTimeout()];
|
|
10977
|
+
var draining;
|
|
10978
|
+
var currentQueue;
|
|
10979
|
+
var queueIndex = -1;
|
|
10980
|
+
var queue = [];
|
|
10981
|
+
var scheduled = false;
|
|
10982
|
+
function cleanUpNextTick() {
|
|
10983
|
+
if (!draining || !currentQueue) {
|
|
10984
|
+
return;
|
|
10985
|
+
}
|
|
10986
|
+
draining = false;
|
|
10987
|
+
if (currentQueue.length) {
|
|
10988
|
+
queue = currentQueue.concat(queue);
|
|
10989
|
+
} else {
|
|
10990
|
+
queueIndex = -1;
|
|
10991
|
+
}
|
|
10992
|
+
if (queue.length) {
|
|
10993
|
+
nextTick();
|
|
10994
|
+
}
|
|
10945
10995
|
}
|
|
10946
|
-
}
|
|
10947
10996
|
|
|
10948
|
-
//named nextTick for less confusing stack traces
|
|
10949
|
-
function nextTick() {
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10997
|
+
//named nextTick for less confusing stack traces
|
|
10998
|
+
function nextTick() {
|
|
10999
|
+
if (draining) {
|
|
11000
|
+
return;
|
|
11001
|
+
}
|
|
11002
|
+
scheduled = false;
|
|
11003
|
+
draining = true;
|
|
11004
|
+
var len = queue.length;
|
|
11005
|
+
var timeout = setTimeout(cleanUpNextTick);
|
|
11006
|
+
while (len) {
|
|
11007
|
+
currentQueue = queue;
|
|
11008
|
+
queue = [];
|
|
11009
|
+
while (currentQueue && ++queueIndex < len) {
|
|
11010
|
+
currentQueue[queueIndex].run();
|
|
11011
|
+
}
|
|
11012
|
+
queueIndex = -1;
|
|
11013
|
+
len = queue.length;
|
|
10962
11014
|
}
|
|
11015
|
+
currentQueue = null;
|
|
10963
11016
|
queueIndex = -1;
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
while (++i < len) {
|
|
10975
|
-
if (types[i] && types[i].test && types[i].test()) {
|
|
10976
|
-
scheduleDrain = types[i].install(nextTick);
|
|
10977
|
-
break;
|
|
10978
|
-
}
|
|
10979
|
-
}
|
|
10980
|
-
// v8 likes predictible objects
|
|
10981
|
-
function Item(fun, array) {
|
|
10982
|
-
this.fun = fun;
|
|
10983
|
-
this.array = array;
|
|
10984
|
-
}
|
|
10985
|
-
Item.prototype.run = function () {
|
|
10986
|
-
var fun = this.fun;
|
|
10987
|
-
var array = this.array;
|
|
10988
|
-
switch (array.length) {
|
|
10989
|
-
case 0:
|
|
10990
|
-
return fun();
|
|
10991
|
-
case 1:
|
|
10992
|
-
return fun(array[0]);
|
|
10993
|
-
case 2:
|
|
10994
|
-
return fun(array[0], array[1]);
|
|
10995
|
-
case 3:
|
|
10996
|
-
return fun(array[0], array[1], array[2]);
|
|
10997
|
-
default:
|
|
10998
|
-
return fun.apply(null, array);
|
|
10999
|
-
}
|
|
11000
|
-
};
|
|
11001
|
-
var lib = immediate;
|
|
11002
|
-
function immediate(task) {
|
|
11003
|
-
var args = new Array(arguments.length - 1);
|
|
11004
|
-
if (arguments.length > 1) {
|
|
11005
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
11006
|
-
args[i - 1] = arguments[i];
|
|
11017
|
+
draining = false;
|
|
11018
|
+
clearTimeout(timeout);
|
|
11019
|
+
}
|
|
11020
|
+
var scheduleDrain;
|
|
11021
|
+
var i = -1;
|
|
11022
|
+
var len = types.length;
|
|
11023
|
+
while (++i < len) {
|
|
11024
|
+
if (types[i] && types[i].test && types[i].test()) {
|
|
11025
|
+
scheduleDrain = types[i].install(nextTick);
|
|
11026
|
+
break;
|
|
11007
11027
|
}
|
|
11008
11028
|
}
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11029
|
+
// v8 likes predictible objects
|
|
11030
|
+
function Item(fun, array) {
|
|
11031
|
+
this.fun = fun;
|
|
11032
|
+
this.array = array;
|
|
11033
|
+
}
|
|
11034
|
+
Item.prototype.run = function () {
|
|
11035
|
+
var fun = this.fun;
|
|
11036
|
+
var array = this.array;
|
|
11037
|
+
switch (array.length) {
|
|
11038
|
+
case 0:
|
|
11039
|
+
return fun();
|
|
11040
|
+
case 1:
|
|
11041
|
+
return fun(array[0]);
|
|
11042
|
+
case 2:
|
|
11043
|
+
return fun(array[0], array[1]);
|
|
11044
|
+
case 3:
|
|
11045
|
+
return fun(array[0], array[1], array[2]);
|
|
11046
|
+
default:
|
|
11047
|
+
return fun.apply(null, array);
|
|
11048
|
+
}
|
|
11049
|
+
};
|
|
11050
|
+
lib = immediate;
|
|
11051
|
+
function immediate(task) {
|
|
11052
|
+
var args = new Array(arguments.length - 1);
|
|
11053
|
+
if (arguments.length > 1) {
|
|
11054
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
11055
|
+
args[i - 1] = arguments[i];
|
|
11056
|
+
}
|
|
11057
|
+
}
|
|
11058
|
+
queue.push(new Item(task, args));
|
|
11059
|
+
if (!scheduled && !draining) {
|
|
11060
|
+
scheduled = true;
|
|
11061
|
+
scheduleDrain();
|
|
11062
|
+
}
|
|
11013
11063
|
}
|
|
11064
|
+
return lib;
|
|
11014
11065
|
}
|
|
11015
|
-
var immediate$1 = /*@__PURE__*/getDefaultExportFromCjs(lib);
|
|
11016
11066
|
|
|
11017
|
-
|
|
11018
|
-
|
|
11067
|
+
var libExports = requireLib();
|
|
11068
|
+
var immediate = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
11019
11069
|
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
this.
|
|
11070
|
+
var tinyQueue;
|
|
11071
|
+
var hasRequiredTinyQueue;
|
|
11072
|
+
function requireTinyQueue() {
|
|
11073
|
+
if (hasRequiredTinyQueue) return tinyQueue;
|
|
11074
|
+
hasRequiredTinyQueue = 1;
|
|
11075
|
+
|
|
11076
|
+
// Simple FIFO queue implementation to avoid having to do shift()
|
|
11077
|
+
// on an array, which is slow.
|
|
11078
|
+
|
|
11079
|
+
function Queue() {
|
|
11080
|
+
this.length = 0;
|
|
11031
11081
|
}
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
this.last =
|
|
11082
|
+
Queue.prototype.push = function (item) {
|
|
11083
|
+
var node = {
|
|
11084
|
+
item: item
|
|
11085
|
+
};
|
|
11086
|
+
if (this.last) {
|
|
11087
|
+
this.last = this.last.next = node;
|
|
11088
|
+
} else {
|
|
11089
|
+
this.last = this.first = node;
|
|
11040
11090
|
}
|
|
11041
|
-
|
|
11042
|
-
}
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
break;
|
|
11052
|
-
} else if (++i > start) {
|
|
11053
|
-
output.push(node.item);
|
|
11091
|
+
this.length++;
|
|
11092
|
+
};
|
|
11093
|
+
Queue.prototype.shift = function () {
|
|
11094
|
+
var node = this.first;
|
|
11095
|
+
if (node) {
|
|
11096
|
+
this.first = node.next;
|
|
11097
|
+
if (! --this.length) {
|
|
11098
|
+
this.last = undefined;
|
|
11099
|
+
}
|
|
11100
|
+
return node.item;
|
|
11054
11101
|
}
|
|
11055
|
-
}
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
var
|
|
11102
|
+
};
|
|
11103
|
+
Queue.prototype.slice = function (start, end) {
|
|
11104
|
+
start = typeof start === 'undefined' ? 0 : start;
|
|
11105
|
+
end = typeof end === 'undefined' ? Infinity : end;
|
|
11106
|
+
var output = [];
|
|
11107
|
+
var i = 0;
|
|
11108
|
+
for (var node = this.first; node; node = node.next) {
|
|
11109
|
+
if (--end < 0) {
|
|
11110
|
+
break;
|
|
11111
|
+
} else if (++i > start) {
|
|
11112
|
+
output.push(node.item);
|
|
11113
|
+
}
|
|
11114
|
+
}
|
|
11115
|
+
return output;
|
|
11116
|
+
};
|
|
11117
|
+
tinyQueue = Queue;
|
|
11118
|
+
return tinyQueue;
|
|
11119
|
+
}
|
|
11060
11120
|
|
|
11061
|
-
var
|
|
11062
|
-
var
|
|
11121
|
+
var tinyQueueExports = requireTinyQueue();
|
|
11122
|
+
var Queue = /*@__PURE__*/getDefaultExportFromCjs(tinyQueueExports);
|
|
11123
|
+
|
|
11124
|
+
var noopFn;
|
|
11125
|
+
var hasRequiredNoopFn;
|
|
11126
|
+
function requireNoopFn() {
|
|
11127
|
+
if (hasRequiredNoopFn) return noopFn;
|
|
11128
|
+
hasRequiredNoopFn = 1;
|
|
11129
|
+
noopFn = function () {};
|
|
11130
|
+
return noopFn;
|
|
11131
|
+
}
|
|
11132
|
+
|
|
11133
|
+
var noopFnExports = requireNoopFn();
|
|
11134
|
+
var noop = /*@__PURE__*/getDefaultExportFromCjs(noopFnExports);
|
|
11063
11135
|
|
|
11064
11136
|
function WebSQLRows(array) {
|
|
11065
11137
|
this._array = array;
|
|
@@ -11174,8 +11246,8 @@ function WebSQLTransaction(websqlDatabase, executeDelay) {
|
|
|
11174
11246
|
this._error = null;
|
|
11175
11247
|
this._complete = false;
|
|
11176
11248
|
this._runningTimeout = false;
|
|
11177
|
-
this._executeDelay = executeDelay || immediate
|
|
11178
|
-
this._sqlQueue = new Queue
|
|
11249
|
+
this._executeDelay = executeDelay || immediate;
|
|
11250
|
+
this._sqlQueue = new Queue();
|
|
11179
11251
|
if (!websqlDatabase._currentTask.readOnly) {
|
|
11180
11252
|
// Since we serialize all access to the database, there is no need to
|
|
11181
11253
|
// run read-only tasks in a transaction. This is a perf boost.
|
|
@@ -11219,10 +11291,10 @@ function TransactionTask(readOnly, txnCallback, errorCallback, successCallback,
|
|
|
11219
11291
|
function WebSQLDatabase(dbVersion, db, webSQLOverrides) {
|
|
11220
11292
|
this.version = dbVersion;
|
|
11221
11293
|
this._db = db;
|
|
11222
|
-
this._txnQueue = new Queue
|
|
11294
|
+
this._txnQueue = new Queue();
|
|
11223
11295
|
this._running = false;
|
|
11224
11296
|
this._currentTask = null;
|
|
11225
|
-
this._transactionDelay = webSQLOverrides.transactionDelay || immediate
|
|
11297
|
+
this._transactionDelay = webSQLOverrides.transactionDelay || immediate;
|
|
11226
11298
|
this._executeDelay = webSQLOverrides.executeDelay;
|
|
11227
11299
|
}
|
|
11228
11300
|
WebSQLDatabase.prototype._onTransactionComplete = function (err) {
|
|
@@ -11326,7 +11398,7 @@ function customOpenDatabase(SQLiteDatabase, opts) {
|
|
|
11326
11398
|
opts = opts || {};
|
|
11327
11399
|
var sqliteOpts = opts.sqlite;
|
|
11328
11400
|
var webSQLOverrides = opts.websql || {};
|
|
11329
|
-
var openDelay = webSQLOverrides.openDelay || immediate
|
|
11401
|
+
var openDelay = webSQLOverrides.openDelay || immediate;
|
|
11330
11402
|
function createDb(dbName, dbVersion) {
|
|
11331
11403
|
var sqliteDatabase = new SQLiteDatabase(dbName, sqliteOpts);
|
|
11332
11404
|
return new WebSQLDatabase(dbVersion, sqliteDatabase, webSQLOverrides);
|
|
@@ -11358,249 +11430,268 @@ function commonjsRequire(path) {
|
|
|
11358
11430
|
|
|
11359
11431
|
var bindings = {exports: {}};
|
|
11360
11432
|
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11433
|
+
var fileUriToPath_1;
|
|
11434
|
+
var hasRequiredFileUriToPath;
|
|
11435
|
+
function requireFileUriToPath() {
|
|
11436
|
+
if (hasRequiredFileUriToPath) return fileUriToPath_1;
|
|
11437
|
+
hasRequiredFileUriToPath = 1;
|
|
11438
|
+
/**
|
|
11439
|
+
* Module dependencies.
|
|
11440
|
+
*/
|
|
11364
11441
|
|
|
11365
|
-
var sep = path.sep || '/';
|
|
11442
|
+
var sep = path.sep || '/';
|
|
11366
11443
|
|
|
11367
|
-
/**
|
|
11368
|
-
|
|
11369
|
-
|
|
11444
|
+
/**
|
|
11445
|
+
* Module exports.
|
|
11446
|
+
*/
|
|
11370
11447
|
|
|
11371
|
-
|
|
11448
|
+
fileUriToPath_1 = fileUriToPath;
|
|
11372
11449
|
|
|
11373
|
-
/**
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11450
|
+
/**
|
|
11451
|
+
* File URI to Path function.
|
|
11452
|
+
*
|
|
11453
|
+
* @param {String} uri
|
|
11454
|
+
* @return {String} path
|
|
11455
|
+
* @api public
|
|
11456
|
+
*/
|
|
11380
11457
|
|
|
11381
|
-
function fileUriToPath(uri) {
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11458
|
+
function fileUriToPath(uri) {
|
|
11459
|
+
if ('string' != typeof uri || uri.length <= 7 || 'file://' != uri.substring(0, 7)) {
|
|
11460
|
+
throw new TypeError('must pass in a file:// URI to convert to a file path');
|
|
11461
|
+
}
|
|
11462
|
+
var rest = decodeURI(uri.substring(7));
|
|
11463
|
+
var firstSlash = rest.indexOf('/');
|
|
11464
|
+
var host = rest.substring(0, firstSlash);
|
|
11465
|
+
var path = rest.substring(firstSlash + 1);
|
|
11389
11466
|
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11467
|
+
// 2. Scheme Definition
|
|
11468
|
+
// As a special case, <host> can be the string "localhost" or the empty
|
|
11469
|
+
// string; this is interpreted as "the machine from which the URL is
|
|
11470
|
+
// being interpreted".
|
|
11471
|
+
if ('localhost' == host) host = '';
|
|
11472
|
+
if (host) {
|
|
11473
|
+
host = sep + sep + host;
|
|
11474
|
+
}
|
|
11398
11475
|
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11476
|
+
// 3.2 Drives, drive letters, mount points, file system root
|
|
11477
|
+
// Drive letters are mapped into the top of a file URI in various ways,
|
|
11478
|
+
// depending on the implementation; some applications substitute
|
|
11479
|
+
// vertical bar ("|") for the colon after the drive letter, yielding
|
|
11480
|
+
// "file:///c|/tmp/test.txt". In some cases, the colon is left
|
|
11481
|
+
// unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
|
|
11482
|
+
// colon is simply omitted, as in "file:///c/tmp/test.txt".
|
|
11483
|
+
path = path.replace(/^(.+)\|/, '$1:');
|
|
11407
11484
|
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11485
|
+
// for Windows, we need to invert the path separators from what a URI uses
|
|
11486
|
+
if (sep == '\\') {
|
|
11487
|
+
path = path.replace(/\//g, '\\');
|
|
11488
|
+
}
|
|
11489
|
+
if (/^.+\:/.test(path)) ; else {
|
|
11490
|
+
// unix path…
|
|
11491
|
+
path = sep + path;
|
|
11492
|
+
}
|
|
11493
|
+
return host + path;
|
|
11415
11494
|
}
|
|
11416
|
-
return
|
|
11495
|
+
return fileUriToPath_1;
|
|
11417
11496
|
}
|
|
11418
11497
|
|
|
11419
11498
|
/**
|
|
11420
11499
|
* Module dependencies.
|
|
11421
11500
|
*/
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11501
|
+
var hasRequiredBindings;
|
|
11502
|
+
function requireBindings() {
|
|
11503
|
+
if (hasRequiredBindings) return bindings.exports;
|
|
11504
|
+
hasRequiredBindings = 1;
|
|
11505
|
+
(function (module, exports) {
|
|
11506
|
+
var fs = require$$0,
|
|
11507
|
+
path$1 = path,
|
|
11508
|
+
fileURLToPath = requireFileUriToPath(),
|
|
11509
|
+
join = path$1.join,
|
|
11510
|
+
dirname = path$1.dirname,
|
|
11511
|
+
exists = fs.accessSync && function (path) {
|
|
11512
|
+
try {
|
|
11513
|
+
fs.accessSync(path);
|
|
11514
|
+
} catch (e) {
|
|
11515
|
+
return false;
|
|
11516
|
+
}
|
|
11517
|
+
return true;
|
|
11518
|
+
} || fs.existsSync || path$1.existsSync,
|
|
11519
|
+
defaults = {
|
|
11520
|
+
arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
|
|
11521
|
+
compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
|
|
11522
|
+
platform: process.platform,
|
|
11523
|
+
arch: process.arch,
|
|
11524
|
+
nodePreGyp: 'node-v' + process.versions.modules + '-' + process.platform + '-' + process.arch,
|
|
11525
|
+
version: process.versions.node,
|
|
11526
|
+
bindings: 'bindings.node',
|
|
11527
|
+
try: [
|
|
11528
|
+
// node-gyp's linked version in the "build" dir
|
|
11529
|
+
['module_root', 'build', 'bindings'],
|
|
11530
|
+
// node-waf and gyp_addon (a.k.a node-gyp)
|
|
11531
|
+
['module_root', 'build', 'Debug', 'bindings'], ['module_root', 'build', 'Release', 'bindings'],
|
|
11532
|
+
// Debug files, for development (legacy behavior, remove for node v0.9)
|
|
11533
|
+
['module_root', 'out', 'Debug', 'bindings'], ['module_root', 'Debug', 'bindings'],
|
|
11534
|
+
// Release files, but manually compiled (legacy behavior, remove for node v0.9)
|
|
11535
|
+
['module_root', 'out', 'Release', 'bindings'], ['module_root', 'Release', 'bindings'],
|
|
11536
|
+
// Legacy from node-waf, node <= 0.4.x
|
|
11537
|
+
['module_root', 'build', 'default', 'bindings'],
|
|
11538
|
+
// Production "Release" buildtype binary (meh...)
|
|
11539
|
+
['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
|
|
11540
|
+
// node-qbs builds
|
|
11541
|
+
['module_root', 'addon-build', 'release', 'install-root', 'bindings'], ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
|
|
11542
|
+
// node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
|
|
11543
|
+
['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']]
|
|
11544
|
+
};
|
|
11545
|
+
|
|
11546
|
+
/**
|
|
11547
|
+
* The main `bindings()` function loads the compiled bindings for a given module.
|
|
11548
|
+
* It uses V8's Error API to determine the parent filename that this function is
|
|
11549
|
+
* being invoked from, which is then used to find the root directory.
|
|
11550
|
+
*/
|
|
11551
|
+
|
|
11552
|
+
function bindings(opts) {
|
|
11553
|
+
// Argument surgery
|
|
11554
|
+
if (typeof opts == 'string') {
|
|
11555
|
+
opts = {
|
|
11556
|
+
bindings: opts
|
|
11557
|
+
};
|
|
11558
|
+
} else if (!opts) {
|
|
11559
|
+
opts = {};
|
|
11433
11560
|
}
|
|
11434
|
-
return true;
|
|
11435
|
-
} || fs.existsSync || path$1.existsSync,
|
|
11436
|
-
defaults = {
|
|
11437
|
-
arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
|
|
11438
|
-
compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
|
|
11439
|
-
platform: process.platform,
|
|
11440
|
-
arch: process.arch,
|
|
11441
|
-
nodePreGyp: 'node-v' + process.versions.modules + '-' + process.platform + '-' + process.arch,
|
|
11442
|
-
version: process.versions.node,
|
|
11443
|
-
bindings: 'bindings.node',
|
|
11444
|
-
try: [
|
|
11445
|
-
// node-gyp's linked version in the "build" dir
|
|
11446
|
-
['module_root', 'build', 'bindings'],
|
|
11447
|
-
// node-waf and gyp_addon (a.k.a node-gyp)
|
|
11448
|
-
['module_root', 'build', 'Debug', 'bindings'], ['module_root', 'build', 'Release', 'bindings'],
|
|
11449
|
-
// Debug files, for development (legacy behavior, remove for node v0.9)
|
|
11450
|
-
['module_root', 'out', 'Debug', 'bindings'], ['module_root', 'Debug', 'bindings'],
|
|
11451
|
-
// Release files, but manually compiled (legacy behavior, remove for node v0.9)
|
|
11452
|
-
['module_root', 'out', 'Release', 'bindings'], ['module_root', 'Release', 'bindings'],
|
|
11453
|
-
// Legacy from node-waf, node <= 0.4.x
|
|
11454
|
-
['module_root', 'build', 'default', 'bindings'],
|
|
11455
|
-
// Production "Release" buildtype binary (meh...)
|
|
11456
|
-
['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
|
|
11457
|
-
// node-qbs builds
|
|
11458
|
-
['module_root', 'addon-build', 'release', 'install-root', 'bindings'], ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
|
|
11459
|
-
// node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
|
|
11460
|
-
['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']]
|
|
11461
|
-
};
|
|
11462
11561
|
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
*/
|
|
11562
|
+
// maps `defaults` onto `opts` object
|
|
11563
|
+
Object.keys(defaults).map(function (i) {
|
|
11564
|
+
if (!(i in opts)) opts[i] = defaults[i];
|
|
11565
|
+
});
|
|
11468
11566
|
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
bindings: opts
|
|
11474
|
-
};
|
|
11475
|
-
} else if (!opts) {
|
|
11476
|
-
opts = {};
|
|
11477
|
-
}
|
|
11567
|
+
// Get the module root
|
|
11568
|
+
if (!opts.module_root) {
|
|
11569
|
+
opts.module_root = exports.getRoot(exports.getFileName());
|
|
11570
|
+
}
|
|
11478
11571
|
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11572
|
+
// Ensure the given bindings name ends with .node
|
|
11573
|
+
if (path$1.extname(opts.bindings) != '.node') {
|
|
11574
|
+
opts.bindings += '.node';
|
|
11575
|
+
}
|
|
11483
11576
|
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
try {
|
|
11508
|
-
b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
|
|
11509
|
-
if (!opts.path) {
|
|
11510
|
-
b.path = n;
|
|
11511
|
-
}
|
|
11512
|
-
return b;
|
|
11513
|
-
} catch (e) {
|
|
11514
|
-
if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && !/not find/i.test(e.message)) {
|
|
11515
|
-
throw e;
|
|
11577
|
+
// https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
|
|
11578
|
+
var requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : commonjsRequire;
|
|
11579
|
+
var tries = [],
|
|
11580
|
+
i = 0,
|
|
11581
|
+
l = opts.try.length,
|
|
11582
|
+
n,
|
|
11583
|
+
b,
|
|
11584
|
+
err;
|
|
11585
|
+
for (; i < l; i++) {
|
|
11586
|
+
n = join.apply(null, opts.try[i].map(function (p) {
|
|
11587
|
+
return opts[p] || p;
|
|
11588
|
+
}));
|
|
11589
|
+
tries.push(n);
|
|
11590
|
+
try {
|
|
11591
|
+
b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
|
|
11592
|
+
if (!opts.path) {
|
|
11593
|
+
b.path = n;
|
|
11594
|
+
}
|
|
11595
|
+
return b;
|
|
11596
|
+
} catch (e) {
|
|
11597
|
+
if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && !/not find/i.test(e.message)) {
|
|
11598
|
+
throw e;
|
|
11599
|
+
}
|
|
11516
11600
|
}
|
|
11517
11601
|
}
|
|
11602
|
+
err = new Error('Could not locate the bindings file. Tried:\n' + tries.map(function (a) {
|
|
11603
|
+
return opts.arrow + a;
|
|
11604
|
+
}).join('\n'));
|
|
11605
|
+
err.tries = tries;
|
|
11606
|
+
throw err;
|
|
11518
11607
|
}
|
|
11519
|
-
|
|
11520
|
-
return opts.arrow + a;
|
|
11521
|
-
}).join('\n'));
|
|
11522
|
-
err.tries = tries;
|
|
11523
|
-
throw err;
|
|
11524
|
-
}
|
|
11525
|
-
module.exports = exports = bindings;
|
|
11608
|
+
module.exports = exports = bindings;
|
|
11526
11609
|
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11610
|
+
/**
|
|
11611
|
+
* Gets the filename of the JavaScript file that invokes this function.
|
|
11612
|
+
* Used to help find the root directory of a module.
|
|
11613
|
+
* Optionally accepts an filename argument to skip when searching for the invoking filename
|
|
11614
|
+
*/
|
|
11532
11615
|
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11616
|
+
exports.getFileName = function getFileName(calling_file) {
|
|
11617
|
+
var origPST = Error.prepareStackTrace,
|
|
11618
|
+
origSTL = Error.stackTraceLimit,
|
|
11619
|
+
dummy = {},
|
|
11620
|
+
fileName;
|
|
11621
|
+
Error.stackTraceLimit = 10;
|
|
11622
|
+
Error.prepareStackTrace = function (e, st) {
|
|
11623
|
+
for (var i = 0, l = st.length; i < l; i++) {
|
|
11624
|
+
fileName = st[i].getFileName();
|
|
11625
|
+
if (fileName !== __filename) {
|
|
11626
|
+
if (calling_file) {
|
|
11627
|
+
if (fileName !== calling_file) {
|
|
11628
|
+
return;
|
|
11629
|
+
}
|
|
11630
|
+
} else {
|
|
11545
11631
|
return;
|
|
11546
11632
|
}
|
|
11547
|
-
} else {
|
|
11548
|
-
return;
|
|
11549
11633
|
}
|
|
11550
11634
|
}
|
|
11551
|
-
}
|
|
11552
|
-
};
|
|
11635
|
+
};
|
|
11553
11636
|
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11637
|
+
// run the 'prepareStackTrace' function above
|
|
11638
|
+
Error.captureStackTrace(dummy);
|
|
11639
|
+
dummy.stack;
|
|
11557
11640
|
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11641
|
+
// cleanup
|
|
11642
|
+
Error.prepareStackTrace = origPST;
|
|
11643
|
+
Error.stackTraceLimit = origSTL;
|
|
11561
11644
|
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11645
|
+
// handle filename that starts with "file://"
|
|
11646
|
+
var fileSchema = 'file://';
|
|
11647
|
+
if (fileName.indexOf(fileSchema) === 0) {
|
|
11648
|
+
fileName = fileURLToPath(fileName);
|
|
11649
|
+
}
|
|
11650
|
+
return fileName;
|
|
11651
|
+
};
|
|
11569
11652
|
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11653
|
+
/**
|
|
11654
|
+
* Gets the root directory of a module, given an arbitrary filename
|
|
11655
|
+
* somewhere in the module tree. The "root directory" is the directory
|
|
11656
|
+
* containing the `package.json` file.
|
|
11657
|
+
*
|
|
11658
|
+
* In: /home/nate/node-native-module/lib/index.js
|
|
11659
|
+
* Out: /home/nate/node-native-module
|
|
11660
|
+
*/
|
|
11578
11661
|
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11662
|
+
exports.getRoot = function getRoot(file) {
|
|
11663
|
+
var dir = dirname(file),
|
|
11664
|
+
prev;
|
|
11665
|
+
while (true) {
|
|
11666
|
+
if (dir === '.') {
|
|
11667
|
+
// Avoids an infinite loop in rare cases, like the REPL
|
|
11668
|
+
dir = process.cwd();
|
|
11669
|
+
}
|
|
11670
|
+
if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
|
|
11671
|
+
// Found the 'package.json' file or 'node_modules' dir; we're done
|
|
11672
|
+
return dir;
|
|
11673
|
+
}
|
|
11674
|
+
if (prev === dir) {
|
|
11675
|
+
// Got to the top
|
|
11676
|
+
throw new Error('Could not find module root given file: "' + file + '". Do you have a `package.json` file? ');
|
|
11677
|
+
}
|
|
11678
|
+
// Try the parent dir next
|
|
11679
|
+
prev = dir;
|
|
11680
|
+
dir = join(dir, '..');
|
|
11594
11681
|
}
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
};
|
|
11600
|
-
})(bindings, bindings.exports);
|
|
11601
|
-
var bindingsExports = bindings.exports;
|
|
11682
|
+
};
|
|
11683
|
+
})(bindings, bindings.exports);
|
|
11684
|
+
return bindings.exports;
|
|
11685
|
+
}
|
|
11602
11686
|
|
|
11603
|
-
var sqlite3Binding
|
|
11687
|
+
var sqlite3Binding;
|
|
11688
|
+
var hasRequiredSqlite3Binding;
|
|
11689
|
+
function requireSqlite3Binding() {
|
|
11690
|
+
if (hasRequiredSqlite3Binding) return sqlite3Binding;
|
|
11691
|
+
hasRequiredSqlite3Binding = 1;
|
|
11692
|
+
sqlite3Binding = requireBindings()('node_sqlite3.node');
|
|
11693
|
+
return sqlite3Binding;
|
|
11694
|
+
}
|
|
11604
11695
|
|
|
11605
11696
|
var trace = {};
|
|
11606
11697
|
|
|
@@ -11644,177 +11735,184 @@ function requireTrace() {
|
|
|
11644
11735
|
return trace;
|
|
11645
11736
|
}
|
|
11646
11737
|
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
module
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
errBack
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11738
|
+
var hasRequiredSqlite3;
|
|
11739
|
+
function requireSqlite3() {
|
|
11740
|
+
if (hasRequiredSqlite3) return sqlite3$1.exports;
|
|
11741
|
+
hasRequiredSqlite3 = 1;
|
|
11742
|
+
(function (module, exports) {
|
|
11743
|
+
const path$1 = path;
|
|
11744
|
+
const sqlite3 = requireSqlite3Binding();
|
|
11745
|
+
const EventEmitter = require$$2.EventEmitter;
|
|
11746
|
+
module.exports = sqlite3;
|
|
11747
|
+
function normalizeMethod(fn) {
|
|
11748
|
+
return function (sql) {
|
|
11749
|
+
let errBack;
|
|
11750
|
+
const args = Array.prototype.slice.call(arguments, 1);
|
|
11751
|
+
if (typeof args[args.length - 1] === 'function') {
|
|
11752
|
+
const callback = args[args.length - 1];
|
|
11753
|
+
errBack = function (err) {
|
|
11754
|
+
if (err) {
|
|
11755
|
+
callback(err);
|
|
11756
|
+
}
|
|
11757
|
+
};
|
|
11758
|
+
}
|
|
11759
|
+
const statement = new Statement(this, sql, errBack);
|
|
11760
|
+
return fn.call(this, statement, args);
|
|
11761
|
+
};
|
|
11762
|
+
}
|
|
11763
|
+
function inherits(target, source) {
|
|
11764
|
+
for (const k in source.prototype) target.prototype[k] = source.prototype[k];
|
|
11765
|
+
}
|
|
11766
|
+
sqlite3.cached = {
|
|
11767
|
+
Database: function (file, a, b) {
|
|
11768
|
+
if (file === '' || file === ':memory:') {
|
|
11769
|
+
// Don't cache special databases.
|
|
11770
|
+
return new Database(file, a, b);
|
|
11771
|
+
}
|
|
11772
|
+
let db;
|
|
11773
|
+
file = path$1.resolve(file);
|
|
11774
|
+
if (!sqlite3.cached.objects[file]) {
|
|
11775
|
+
db = sqlite3.cached.objects[file] = new Database(file, a, b);
|
|
11776
|
+
} else {
|
|
11777
|
+
// Make sure the callback is called.
|
|
11778
|
+
db = sqlite3.cached.objects[file];
|
|
11779
|
+
const callback = typeof a === 'number' ? b : a;
|
|
11780
|
+
if (typeof callback === 'function') {
|
|
11781
|
+
function cb() {
|
|
11782
|
+
callback.call(db, null);
|
|
11783
|
+
}
|
|
11784
|
+
if (db.open) process.nextTick(cb);else db.once('open', cb);
|
|
11688
11785
|
}
|
|
11689
|
-
if (db.open) process.nextTick(cb);else db.once('open', cb);
|
|
11690
11786
|
}
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
});
|
|
11787
|
+
return db;
|
|
11788
|
+
},
|
|
11789
|
+
objects: {}
|
|
11790
|
+
};
|
|
11791
|
+
const Database = sqlite3.Database;
|
|
11792
|
+
const Statement = sqlite3.Statement;
|
|
11793
|
+
const Backup = sqlite3.Backup;
|
|
11794
|
+
inherits(Database, EventEmitter);
|
|
11795
|
+
inherits(Statement, EventEmitter);
|
|
11796
|
+
inherits(Backup, EventEmitter);
|
|
11797
|
+
|
|
11798
|
+
// Database#prepare(sql, [bind1, bind2, ...], [callback])
|
|
11799
|
+
Database.prototype.prepare = normalizeMethod(function (statement, params) {
|
|
11800
|
+
return params.length ? statement.bind.apply(statement, params) : statement;
|
|
11801
|
+
});
|
|
11707
11802
|
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11803
|
+
// Database#run(sql, [bind1, bind2, ...], [callback])
|
|
11804
|
+
Database.prototype.run = normalizeMethod(function (statement, params) {
|
|
11805
|
+
statement.run.apply(statement, params).finalize();
|
|
11806
|
+
return this;
|
|
11807
|
+
});
|
|
11713
11808
|
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11809
|
+
// Database#get(sql, [bind1, bind2, ...], [callback])
|
|
11810
|
+
Database.prototype.get = normalizeMethod(function (statement, params) {
|
|
11811
|
+
statement.get.apply(statement, params).finalize();
|
|
11812
|
+
return this;
|
|
11813
|
+
});
|
|
11719
11814
|
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11815
|
+
// Database#all(sql, [bind1, bind2, ...], [callback])
|
|
11816
|
+
Database.prototype.all = normalizeMethod(function (statement, params) {
|
|
11817
|
+
statement.all.apply(statement, params).finalize();
|
|
11818
|
+
return this;
|
|
11819
|
+
});
|
|
11725
11820
|
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11821
|
+
// Database#each(sql, [bind1, bind2, ...], [callback], [complete])
|
|
11822
|
+
Database.prototype.each = normalizeMethod(function (statement, params) {
|
|
11823
|
+
statement.each.apply(statement, params).finalize();
|
|
11824
|
+
return this;
|
|
11825
|
+
});
|
|
11826
|
+
Database.prototype.map = normalizeMethod(function (statement, params) {
|
|
11827
|
+
statement.map.apply(statement, params).finalize();
|
|
11828
|
+
return this;
|
|
11829
|
+
});
|
|
11735
11830
|
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11831
|
+
// Database#backup(filename, [callback])
|
|
11832
|
+
// Database#backup(filename, destName, sourceName, filenameIsDest, [callback])
|
|
11833
|
+
Database.prototype.backup = function () {
|
|
11834
|
+
let backup;
|
|
11835
|
+
if (arguments.length <= 2) {
|
|
11836
|
+
// By default, we write the main database out to the main database of the named file.
|
|
11837
|
+
// This is the most likely use of the backup api.
|
|
11838
|
+
backup = new Backup(this, arguments[0], 'main', 'main', true, arguments[1]);
|
|
11839
|
+
} else {
|
|
11840
|
+
// Otherwise, give the user full control over the sqlite3_backup_init arguments.
|
|
11841
|
+
backup = new Backup(this, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
|
|
11842
|
+
}
|
|
11843
|
+
// Per the sqlite docs, exclude the following errors as non-fatal by default.
|
|
11844
|
+
backup.retryErrors = [sqlite3.BUSY, sqlite3.LOCKED];
|
|
11845
|
+
return backup;
|
|
11846
|
+
};
|
|
11847
|
+
Statement.prototype.map = function () {
|
|
11848
|
+
const params = Array.prototype.slice.call(arguments);
|
|
11849
|
+
const callback = params.pop();
|
|
11850
|
+
params.push(function (err, rows) {
|
|
11851
|
+
if (err) return callback(err);
|
|
11852
|
+
const result = {};
|
|
11853
|
+
if (rows.length) {
|
|
11854
|
+
const keys = Object.keys(rows[0]);
|
|
11855
|
+
const key = keys[0];
|
|
11856
|
+
if (keys.length > 2) {
|
|
11857
|
+
// Value is an object
|
|
11858
|
+
for (let i = 0; i < rows.length; i++) {
|
|
11859
|
+
result[rows[i][key]] = rows[i];
|
|
11860
|
+
}
|
|
11861
|
+
} else {
|
|
11862
|
+
const value = keys[1];
|
|
11863
|
+
// Value is a plain value
|
|
11864
|
+
for (let i = 0; i < rows.length; i++) {
|
|
11865
|
+
result[rows[i][key]] = rows[i][value];
|
|
11866
|
+
}
|
|
11771
11867
|
}
|
|
11772
11868
|
}
|
|
11869
|
+
callback(err, result);
|
|
11870
|
+
});
|
|
11871
|
+
return this.all.apply(this, params);
|
|
11872
|
+
};
|
|
11873
|
+
let isVerbose = false;
|
|
11874
|
+
const supportedEvents = ['trace', 'profile', 'change'];
|
|
11875
|
+
Database.prototype.addListener = Database.prototype.on = function (type) {
|
|
11876
|
+
const val = EventEmitter.prototype.addListener.apply(this, arguments);
|
|
11877
|
+
if (supportedEvents.indexOf(type) >= 0) {
|
|
11878
|
+
this.configure(type, true);
|
|
11879
|
+
}
|
|
11880
|
+
return val;
|
|
11881
|
+
};
|
|
11882
|
+
Database.prototype.removeListener = function (type) {
|
|
11883
|
+
const val = EventEmitter.prototype.removeListener.apply(this, arguments);
|
|
11884
|
+
if (supportedEvents.indexOf(type) >= 0 && !this._events[type]) {
|
|
11885
|
+
this.configure(type, false);
|
|
11773
11886
|
}
|
|
11774
|
-
|
|
11775
|
-
}
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
this.configure(type, true);
|
|
11784
|
-
}
|
|
11785
|
-
return val;
|
|
11786
|
-
};
|
|
11787
|
-
Database.prototype.removeListener = function (type) {
|
|
11788
|
-
const val = EventEmitter.prototype.removeListener.apply(this, arguments);
|
|
11789
|
-
if (supportedEvents.indexOf(type) >= 0 && !this._events[type]) {
|
|
11790
|
-
this.configure(type, false);
|
|
11791
|
-
}
|
|
11792
|
-
return val;
|
|
11793
|
-
};
|
|
11794
|
-
Database.prototype.removeAllListeners = function (type) {
|
|
11795
|
-
const val = EventEmitter.prototype.removeAllListeners.apply(this, arguments);
|
|
11796
|
-
if (supportedEvents.indexOf(type) >= 0) {
|
|
11797
|
-
this.configure(type, false);
|
|
11798
|
-
}
|
|
11799
|
-
return val;
|
|
11800
|
-
};
|
|
11887
|
+
return val;
|
|
11888
|
+
};
|
|
11889
|
+
Database.prototype.removeAllListeners = function (type) {
|
|
11890
|
+
const val = EventEmitter.prototype.removeAllListeners.apply(this, arguments);
|
|
11891
|
+
if (supportedEvents.indexOf(type) >= 0) {
|
|
11892
|
+
this.configure(type, false);
|
|
11893
|
+
}
|
|
11894
|
+
return val;
|
|
11895
|
+
};
|
|
11801
11896
|
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
})(sqlite3$1);
|
|
11817
|
-
|
|
11897
|
+
// Save the stack trace over EIO callbacks.
|
|
11898
|
+
sqlite3.verbose = function () {
|
|
11899
|
+
if (!isVerbose) {
|
|
11900
|
+
const trace = requireTrace();
|
|
11901
|
+
['prepare', 'get', 'run', 'all', 'each', 'map', 'close', 'exec'].forEach(function (name) {
|
|
11902
|
+
trace.extendTrace(Database.prototype, name);
|
|
11903
|
+
});
|
|
11904
|
+
['bind', 'get', 'run', 'all', 'each', 'map', 'reset', 'finalize'].forEach(function (name) {
|
|
11905
|
+
trace.extendTrace(Statement.prototype, name);
|
|
11906
|
+
});
|
|
11907
|
+
isVerbose = true;
|
|
11908
|
+
}
|
|
11909
|
+
return sqlite3;
|
|
11910
|
+
};
|
|
11911
|
+
})(sqlite3$1);
|
|
11912
|
+
return sqlite3$1.exports;
|
|
11913
|
+
}
|
|
11914
|
+
|
|
11915
|
+
var sqlite3Exports = requireSqlite3();
|
|
11818
11916
|
var sqlite3 = /*@__PURE__*/getDefaultExportFromCjs(sqlite3Exports);
|
|
11819
11917
|
|
|
11820
11918
|
function SQLiteResult(error, insertId, rowsAffected, rows) {
|