buzzcasting-storage 3.0.8 → 3.0.10
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/dist/buzzcasting-storage.esm.js +1105 -1064
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var xi = Object.defineProperty;
|
|
2
2
|
var Ai = (d, r, s) => r in d ? xi(d, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[r] = s;
|
|
3
3
|
var k = (d, r, s) => Ai(d, typeof r != "symbol" ? r + "" : r, s);
|
|
4
|
-
var
|
|
5
|
-
const ki = "3.0.
|
|
4
|
+
var K = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(K || {}), v = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(v || {}), re = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_UPDATE = "widgetUpdate", d))(re || {}), Zt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Zt || {}), ye = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ye || {});
|
|
5
|
+
const ki = "3.0.9";
|
|
6
6
|
class Di {
|
|
7
7
|
constructor(r) {
|
|
8
8
|
k(this, "options");
|
|
@@ -37,27 +37,26 @@ class Di {
|
|
|
37
37
|
const D = Object.keys(x).length > 0 ? `?${new URLSearchParams(x).toString()}` : "";
|
|
38
38
|
return console.info(
|
|
39
39
|
"%capi%c %cfetch",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
r.slide,
|
|
40
|
+
v.API,
|
|
41
|
+
v.NONE,
|
|
42
|
+
v.GET_DATA,
|
|
44
43
|
r.widget
|
|
45
|
-
), console.debug(x), await fetch(
|
|
44
|
+
), console.debug("%capi%c %cfetch", v.API, v.NONE, v.GET_DATA, x), await fetch(
|
|
46
45
|
[this.url, "api", s, r.type].join("/") + D,
|
|
47
46
|
{ ...l, method: "get" }
|
|
48
|
-
).then(async (
|
|
49
|
-
if (!
|
|
50
|
-
throw new Error(`${
|
|
51
|
-
return
|
|
52
|
-
}).then((
|
|
47
|
+
).then(async (j) => {
|
|
48
|
+
if (!j.ok)
|
|
49
|
+
throw new Error(`${j.status}`);
|
|
50
|
+
return j;
|
|
51
|
+
}).then((j) => j.json()).then((j) => (j.query = r, j)).catch((j) => ({ success: !1, message: `${j}`, data: null }));
|
|
53
52
|
}
|
|
54
53
|
async hideMessage(r) {
|
|
55
54
|
const { version: s } = this.options, l = this.headers(), x = "?action=visible";
|
|
56
55
|
return console.info(
|
|
57
56
|
"%capi%c %cput",
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
v.API,
|
|
58
|
+
v.NONE,
|
|
59
|
+
v.GET_DATA,
|
|
61
60
|
re.HIDE_MESSAGE,
|
|
62
61
|
r.widget,
|
|
63
62
|
r.id
|
|
@@ -72,32 +71,32 @@ class Di {
|
|
|
72
71
|
}
|
|
73
72
|
async hideLabels(r) {
|
|
74
73
|
const { version: s } = this.options, l = this.formHeaders(), x = new URLSearchParams(), D = r.labels || [];
|
|
75
|
-
for (const [
|
|
76
|
-
x.append(`custom_filters[${
|
|
74
|
+
for (const [j, F] of D.entries())
|
|
75
|
+
x.append(`custom_filters[${j}]`, F);
|
|
77
76
|
return console.info(
|
|
78
77
|
"%capi%c %cput",
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
v.API,
|
|
79
|
+
v.NONE,
|
|
80
|
+
v.GET_DATA,
|
|
82
81
|
re.HIDE_LABELS,
|
|
83
82
|
r.widget,
|
|
84
83
|
D
|
|
85
84
|
), await fetch(
|
|
86
85
|
[this.url, "api", s, r.type, r.widget].join("/"),
|
|
87
86
|
{ ...l, body: x, method: "put" }
|
|
88
|
-
).then((
|
|
89
|
-
if (!
|
|
90
|
-
throw new Error(
|
|
91
|
-
return
|
|
92
|
-
}).then((
|
|
87
|
+
).then((j) => {
|
|
88
|
+
if (!j.ok)
|
|
89
|
+
throw new Error(j.statusText);
|
|
90
|
+
return j;
|
|
91
|
+
}).then((j) => j.json()).catch((j) => ({ succes: !1, message: j, data: [] }));
|
|
93
92
|
}
|
|
94
93
|
async loadSlide(r) {
|
|
95
94
|
const { version: s } = this.options, l = this.headers(), x = Object.assign({}, r);
|
|
96
95
|
return delete x.slide, delete x.type, delete x.hash, console.debug(
|
|
97
96
|
"%capi%c %cloadSlide",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
v.API,
|
|
98
|
+
v.NONE,
|
|
99
|
+
v.SLIDE,
|
|
101
100
|
re.SLIDE_LOAD,
|
|
102
101
|
r.slide
|
|
103
102
|
), await fetch(
|
|
@@ -122,9 +121,9 @@ class Di {
|
|
|
122
121
|
const x = JSON.stringify(r);
|
|
123
122
|
return console.info(
|
|
124
123
|
"%capi%c %cput",
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
v.API,
|
|
125
|
+
v.NONE,
|
|
126
|
+
v.SLIDE,
|
|
128
127
|
re.SLIDE_STORE,
|
|
129
128
|
r.id
|
|
130
129
|
), await fetch(
|
|
@@ -141,7 +140,7 @@ var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
141
140
|
function Pi(d) {
|
|
142
141
|
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
143
142
|
}
|
|
144
|
-
var
|
|
143
|
+
var Tr = { exports: {} };
|
|
145
144
|
(function(d, r) {
|
|
146
145
|
(function(s, l) {
|
|
147
146
|
d.exports = l();
|
|
@@ -162,33 +161,33 @@ var Mr = { exports: {} };
|
|
|
162
161
|
for (var i, o = 0, a = t.length; o < a; o++) !i && o in t || ((i = i || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
|
|
163
162
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
164
163
|
}
|
|
165
|
-
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr,
|
|
166
|
-
function
|
|
167
|
-
return typeof t != "object" ||
|
|
164
|
+
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, j = Object.keys, F = Array.isArray;
|
|
165
|
+
function N(e, t) {
|
|
166
|
+
return typeof t != "object" || j(t).forEach(function(n) {
|
|
168
167
|
e[n] = t[n];
|
|
169
168
|
}), e;
|
|
170
169
|
}
|
|
171
170
|
typeof Promise > "u" || D.Promise || (D.Promise = Promise);
|
|
172
|
-
var
|
|
173
|
-
function
|
|
174
|
-
return
|
|
171
|
+
var X = Object.getPrototypeOf, ae = {}.hasOwnProperty;
|
|
172
|
+
function ee(e, t) {
|
|
173
|
+
return ae.call(e, t);
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
typeof t == "function" && (t = t(
|
|
175
|
+
function le(e, t) {
|
|
176
|
+
typeof t == "function" && (t = t(X(e))), (typeof Reflect > "u" ? j : Reflect.ownKeys)(t).forEach(function(n) {
|
|
178
177
|
Ae(e, n, t[n]);
|
|
179
178
|
});
|
|
180
179
|
}
|
|
181
180
|
var He = Object.defineProperty;
|
|
182
181
|
function Ae(e, t, n, i) {
|
|
183
|
-
He(e, t,
|
|
182
|
+
He(e, t, N(n && ee(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, i));
|
|
184
183
|
}
|
|
185
184
|
function Ye(e) {
|
|
186
185
|
return { from: function(t) {
|
|
187
|
-
return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend:
|
|
186
|
+
return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend: le.bind(null, e.prototype) };
|
|
188
187
|
} };
|
|
189
188
|
}
|
|
190
189
|
var Fr = Object.getOwnPropertyDescriptor, Ur = [].slice;
|
|
191
|
-
function
|
|
190
|
+
function _t(e, t, n) {
|
|
192
191
|
return Ur.call(e, t, n);
|
|
193
192
|
}
|
|
194
193
|
function zn(e, t) {
|
|
@@ -201,7 +200,7 @@ var Mr = { exports: {} };
|
|
|
201
200
|
D.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
202
201
|
}
|
|
203
202
|
function we(e, t) {
|
|
204
|
-
if (typeof t == "string" &&
|
|
203
|
+
if (typeof t == "string" && ee(e, t)) return e[t];
|
|
205
204
|
if (!t) return e;
|
|
206
205
|
if (typeof t != "string") {
|
|
207
206
|
for (var n = [], i = 0, o = t.length; i < o; ++i) {
|
|
@@ -216,18 +215,18 @@ var Mr = { exports: {} };
|
|
|
216
215
|
return u == null ? void 0 : we(u, t.substr(c + 1));
|
|
217
216
|
}
|
|
218
217
|
}
|
|
219
|
-
function
|
|
218
|
+
function fe(e, t, n) {
|
|
220
219
|
if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
|
|
221
220
|
it(typeof n != "string" && "length" in n);
|
|
222
|
-
for (var i = 0, o = t.length; i < o; ++i)
|
|
221
|
+
for (var i = 0, o = t.length; i < o; ++i) fe(e, t[i], n[i]);
|
|
223
222
|
} else {
|
|
224
223
|
var a, c, u = t.indexOf(".");
|
|
225
|
-
u !== -1 ? (a = t.substr(0, u), (c = t.substr(u + 1)) === "" ? n === void 0 ?
|
|
224
|
+
u !== -1 ? (a = t.substr(0, u), (c = t.substr(u + 1)) === "" ? n === void 0 ? F(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : fe(u = !(u = e[a]) || !ee(e, a) ? e[a] = {} : u, c, n)) : n === void 0 ? F(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
226
225
|
}
|
|
227
226
|
}
|
|
228
227
|
function Yn(e) {
|
|
229
228
|
var t, n = {};
|
|
230
|
-
for (t in e)
|
|
229
|
+
for (t in e) ee(e, t) && (n[t] = e[t]);
|
|
231
230
|
return n;
|
|
232
231
|
}
|
|
233
232
|
var Wr = [].concat;
|
|
@@ -243,18 +242,18 @@ var Mr = { exports: {} };
|
|
|
243
242
|
}), Xn = new Set(Ee.map(function(e) {
|
|
244
243
|
return D[e];
|
|
245
244
|
})), ot = null;
|
|
246
|
-
function
|
|
245
|
+
function Me(e) {
|
|
247
246
|
return ot = /* @__PURE__ */ new WeakMap(), e = function t(n) {
|
|
248
247
|
if (!n || typeof n != "object") return n;
|
|
249
248
|
var i = ot.get(n);
|
|
250
249
|
if (i) return i;
|
|
251
|
-
if (
|
|
250
|
+
if (F(n)) {
|
|
252
251
|
i = [], ot.set(n, i);
|
|
253
252
|
for (var o = 0, a = n.length; o < a; ++o) i.push(t(n[o]));
|
|
254
253
|
} else if (Xn.has(n.constructor)) i = n;
|
|
255
254
|
else {
|
|
256
|
-
var c, u =
|
|
257
|
-
for (c in i = u === Object.prototype ? {} : Object.create(u), ot.set(n, i), n)
|
|
255
|
+
var c, u = X(n);
|
|
256
|
+
for (c in i = u === Object.prototype ? {} : Object.create(u), ot.set(n, i), n) ee(n, c) && (i[c] = t(n[c]));
|
|
258
257
|
}
|
|
259
258
|
return i;
|
|
260
259
|
}(e), ot = null, e;
|
|
@@ -273,10 +272,10 @@ var Mr = { exports: {} };
|
|
|
273
272
|
return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
|
|
274
273
|
}
|
|
275
274
|
var Qe = {};
|
|
276
|
-
function
|
|
275
|
+
function Se(e) {
|
|
277
276
|
var t, n, i, o;
|
|
278
277
|
if (arguments.length === 1) {
|
|
279
|
-
if (
|
|
278
|
+
if (F(e)) return e.slice();
|
|
280
279
|
if (this === Qe && typeof e == "string") return [e];
|
|
281
280
|
if (o = Hr(e)) {
|
|
282
281
|
for (n = []; !(i = o.next()).done; ) n.push(i.value);
|
|
@@ -294,7 +293,7 @@ var Mr = { exports: {} };
|
|
|
294
293
|
return e[Symbol.toStringTag] === "AsyncFunction";
|
|
295
294
|
} : function() {
|
|
296
295
|
return !1;
|
|
297
|
-
}, ct = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
|
|
296
|
+
}, ct = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], ge = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(ct), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
|
|
298
297
|
function Xe(e, t) {
|
|
299
298
|
this.name = e, this.message = t;
|
|
300
299
|
}
|
|
@@ -317,9 +316,9 @@ var Mr = { exports: {} };
|
|
|
317
316
|
Ye(Xe).from(Error).extend({ toString: function() {
|
|
318
317
|
return this.name + ": " + this.message;
|
|
319
318
|
} }), Ye(Et).from(Xe), Ye(Je).from(Xe);
|
|
320
|
-
var rn =
|
|
319
|
+
var rn = ge.reduce(function(e, t) {
|
|
321
320
|
return e[t] = t + "Error", e;
|
|
322
|
-
}, {}), Qr = Xe, $ =
|
|
321
|
+
}, {}), Qr = Xe, $ = ge.reduce(function(e, t) {
|
|
323
322
|
var n = t + "Error";
|
|
324
323
|
function i(o, a) {
|
|
325
324
|
this.name = n, o ? typeof o == "string" ? (this.message = "".concat(o).concat(a ? `
|
|
@@ -330,10 +329,10 @@ var Mr = { exports: {} };
|
|
|
330
329
|
$.Syntax = SyntaxError, $.Type = TypeError, $.Range = RangeError;
|
|
331
330
|
var Vn = ct.reduce(function(e, t) {
|
|
332
331
|
return e[t + "Error"] = $[t], e;
|
|
333
|
-
}, {}), Ot =
|
|
332
|
+
}, {}), Ot = ge.reduce(function(e, t) {
|
|
334
333
|
return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = $[t]), e;
|
|
335
334
|
}, {});
|
|
336
|
-
function
|
|
335
|
+
function J() {
|
|
337
336
|
}
|
|
338
337
|
function at(e) {
|
|
339
338
|
return e;
|
|
@@ -343,43 +342,43 @@ var Mr = { exports: {} };
|
|
|
343
342
|
return t(e(n));
|
|
344
343
|
};
|
|
345
344
|
}
|
|
346
|
-
function
|
|
345
|
+
function Ne(e, t) {
|
|
347
346
|
return function() {
|
|
348
347
|
e.apply(this, arguments), t.apply(this, arguments);
|
|
349
348
|
};
|
|
350
349
|
}
|
|
351
350
|
function Jr(e, t) {
|
|
352
|
-
return e ===
|
|
351
|
+
return e === J ? t : function() {
|
|
353
352
|
var n = e.apply(this, arguments);
|
|
354
353
|
n !== void 0 && (arguments[0] = n);
|
|
355
354
|
var i = this.onsuccess, o = this.onerror;
|
|
356
355
|
this.onsuccess = null, this.onerror = null;
|
|
357
356
|
var a = t.apply(this, arguments);
|
|
358
|
-
return i && (this.onsuccess = this.onsuccess ?
|
|
357
|
+
return i && (this.onsuccess = this.onsuccess ? Ne(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Ne(o, this.onerror) : o), a !== void 0 ? a : n;
|
|
359
358
|
};
|
|
360
359
|
}
|
|
361
360
|
function Vr(e, t) {
|
|
362
|
-
return e ===
|
|
361
|
+
return e === J ? t : function() {
|
|
363
362
|
e.apply(this, arguments);
|
|
364
363
|
var n = this.onsuccess, i = this.onerror;
|
|
365
|
-
this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ?
|
|
364
|
+
this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? Ne(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? Ne(i, this.onerror) : i);
|
|
366
365
|
};
|
|
367
366
|
}
|
|
368
367
|
function Zr(e, t) {
|
|
369
|
-
return e ===
|
|
368
|
+
return e === J ? t : function(n) {
|
|
370
369
|
var i = e.apply(this, arguments);
|
|
371
|
-
|
|
370
|
+
N(n, i);
|
|
372
371
|
var o = this.onsuccess, a = this.onerror;
|
|
373
|
-
return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ?
|
|
372
|
+
return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? Ne(o, this.onsuccess) : o), a && (this.onerror = this.onerror ? Ne(a, this.onerror) : a), i === void 0 ? n === void 0 ? void 0 : n : N(i, n);
|
|
374
373
|
};
|
|
375
374
|
}
|
|
376
375
|
function qr(e, t) {
|
|
377
|
-
return e ===
|
|
376
|
+
return e === J ? t : function() {
|
|
378
377
|
return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
|
|
379
378
|
};
|
|
380
379
|
}
|
|
381
380
|
function on(e, t) {
|
|
382
|
-
return e ===
|
|
381
|
+
return e === J ? t : function() {
|
|
383
382
|
var n = e.apply(this, arguments);
|
|
384
383
|
if (n && typeof n.then == "function") {
|
|
385
384
|
for (var i = this, o = arguments.length, a = new Array(o); o--; ) a[o] = arguments[o];
|
|
@@ -391,18 +390,18 @@ var Mr = { exports: {} };
|
|
|
391
390
|
};
|
|
392
391
|
}
|
|
393
392
|
Ot.ModifyError = Et, Ot.DexieError = Xe, Ot.BulkError = Je;
|
|
394
|
-
var
|
|
393
|
+
var me = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
|
|
395
394
|
function Zn(e) {
|
|
396
|
-
|
|
395
|
+
me = e;
|
|
397
396
|
}
|
|
398
397
|
var st = {}, qn = 100, Ee = typeof Promise > "u" ? [] : function() {
|
|
399
398
|
var e = Promise.resolve();
|
|
400
|
-
if (typeof crypto > "u" || !crypto.subtle) return [e,
|
|
399
|
+
if (typeof crypto > "u" || !crypto.subtle) return [e, X(e), e];
|
|
401
400
|
var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
|
|
402
|
-
return [t,
|
|
403
|
-
}(), ct = Ee[0],
|
|
401
|
+
return [t, X(t), e];
|
|
402
|
+
}(), ct = Ee[0], ge = Ee[1], Ee = Ee[2], ge = ge && ge.then, Ke = ct && ct.constructor, an = !!Ee, ut = function(e, t) {
|
|
404
403
|
lt.push([e, t]), xt && (queueMicrotask(ti), xt = !1);
|
|
405
|
-
}, sn = !0, xt = !0, Be = [], At = [], cn = at, ke = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled:
|
|
404
|
+
}, sn = !0, xt = !0, Be = [], At = [], cn = at, ke = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: J, pgp: !1, env: {}, finalize: J }, G = ke, lt = [], Le = 0, kt = [];
|
|
406
405
|
function B(e) {
|
|
407
406
|
if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
|
|
408
407
|
this._listeners = [], this._lib = !1;
|
|
@@ -469,7 +468,7 @@ var Mr = { exports: {} };
|
|
|
469
468
|
function ei(e, t, n) {
|
|
470
469
|
try {
|
|
471
470
|
var i, o = t._value;
|
|
472
|
-
!t._state && At.length && (At = []), i =
|
|
471
|
+
!t._state && At.length && (At = []), i = me && t._consoleTask ? t._consoleTask.run(function() {
|
|
473
472
|
return e(o);
|
|
474
473
|
}) : e(o), t._state || At.indexOf(o) !== -1 || function(a) {
|
|
475
474
|
for (var c = Be.length; c; ) if (Be[--c]._value === a._value) return Be.splice(c, 1);
|
|
@@ -509,7 +508,7 @@ var Mr = { exports: {} };
|
|
|
509
508
|
function Dt(e) {
|
|
510
509
|
return new B(st, !1, e);
|
|
511
510
|
}
|
|
512
|
-
function
|
|
511
|
+
function q(e, t) {
|
|
513
512
|
var n = G;
|
|
514
513
|
return function() {
|
|
515
514
|
var i = Ve(), o = G;
|
|
@@ -522,7 +521,7 @@ var Mr = { exports: {} };
|
|
|
522
521
|
}
|
|
523
522
|
};
|
|
524
523
|
}
|
|
525
|
-
|
|
524
|
+
le(B.prototype, { then: un, _then: function(e, t) {
|
|
526
525
|
dn(this, new er(null, null, e, t, G));
|
|
527
526
|
}, catch: function(e) {
|
|
528
527
|
if (arguments.length === 1) return this.then(null, e);
|
|
@@ -550,8 +549,8 @@ var Mr = { exports: {} };
|
|
|
550
549
|
}, e);
|
|
551
550
|
n.then(i, o).finally(clearTimeout.bind(null, a));
|
|
552
551
|
}) : this;
|
|
553
|
-
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(B.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(),
|
|
554
|
-
var e =
|
|
552
|
+
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(B.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(), le(B, { all: function() {
|
|
553
|
+
var e = Se.apply(null, arguments).map(Rt);
|
|
555
554
|
return new B(function(t, n) {
|
|
556
555
|
e.length === 0 && t([]);
|
|
557
556
|
var i = e.length;
|
|
@@ -566,7 +565,7 @@ var Mr = { exports: {} };
|
|
|
566
565
|
e.then(t, n);
|
|
567
566
|
}) : new B(st, !0, e);
|
|
568
567
|
}, reject: Dt, race: function() {
|
|
569
|
-
var e =
|
|
568
|
+
var e = Se.apply(null, arguments).map(Rt);
|
|
570
569
|
return new B(function(t, n) {
|
|
571
570
|
e.map(function(i) {
|
|
572
571
|
return B.resolve(i).then(t, n);
|
|
@@ -590,7 +589,7 @@ var Mr = { exports: {} };
|
|
|
590
589
|
return new B(function(n, i) {
|
|
591
590
|
return De(function(o, a) {
|
|
592
591
|
var c = G;
|
|
593
|
-
c.unhandleds = [], c.onunhandled = a, c.finalize =
|
|
592
|
+
c.unhandleds = [], c.onunhandled = a, c.finalize = Ne(function() {
|
|
594
593
|
var u, h = this;
|
|
595
594
|
u = function() {
|
|
596
595
|
h.unhandleds.length === 0 ? o() : a(h.unhandleds[0]);
|
|
@@ -602,8 +601,8 @@ var Mr = { exports: {} };
|
|
|
602
601
|
}, c.finalize), e();
|
|
603
602
|
}, t, n, i);
|
|
604
603
|
});
|
|
605
|
-
} }),
|
|
606
|
-
var e =
|
|
604
|
+
} }), Ke && (Ke.allSettled && Ae(B, "allSettled", function() {
|
|
605
|
+
var e = Se.apply(null, arguments).map(Rt);
|
|
607
606
|
return new B(function(t) {
|
|
608
607
|
e.length === 0 && t([]);
|
|
609
608
|
var n = e.length, i = new Array(n);
|
|
@@ -617,8 +616,8 @@ var Mr = { exports: {} };
|
|
|
617
616
|
});
|
|
618
617
|
});
|
|
619
618
|
});
|
|
620
|
-
}),
|
|
621
|
-
var e =
|
|
619
|
+
}), Ke.any && typeof AggregateError < "u" && Ae(B, "any", function() {
|
|
620
|
+
var e = Se.apply(null, arguments).map(Rt);
|
|
622
621
|
return new B(function(t, n) {
|
|
623
622
|
e.length === 0 && n(new AggregateError([]));
|
|
624
623
|
var i = e.length, o = new Array(i);
|
|
@@ -630,11 +629,11 @@ var Mr = { exports: {} };
|
|
|
630
629
|
});
|
|
631
630
|
});
|
|
632
631
|
});
|
|
633
|
-
}),
|
|
632
|
+
}), Ke.withResolvers && (B.withResolvers = Ke.withResolvers));
|
|
634
633
|
var ie = { awaits: 0, echoes: 0, id: 0 }, ni = 0, Pt = [], It = 0, Ct = 0, ri = 0;
|
|
635
634
|
function De(e, t, n, i) {
|
|
636
635
|
var o = G, a = Object.create(o);
|
|
637
|
-
return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ri, ke.env, a.env = an ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t &&
|
|
636
|
+
return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ri, ke.env, a.env = an ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && N(a, t), ++o.ref, a.finalize = function() {
|
|
638
637
|
--this.parent.ref || this.parent.finalize();
|
|
639
638
|
}, i = Ge(a, e, n, i), a.ref === 0 && a.finalize(), i;
|
|
640
639
|
}
|
|
@@ -645,7 +644,7 @@ var Mr = { exports: {} };
|
|
|
645
644
|
return !!ie.awaits && (--ie.awaits == 0 && (ie.id = 0), ie.echoes = ie.awaits * qn, !0);
|
|
646
645
|
}
|
|
647
646
|
function Rt(e) {
|
|
648
|
-
return ie.echoes && e && e.constructor ===
|
|
647
|
+
return ie.echoes && e && e.constructor === Ke ? (qe(), e.then(function(t) {
|
|
649
648
|
return Pe(), t;
|
|
650
649
|
}, function(t) {
|
|
651
650
|
return Pe(), te(t);
|
|
@@ -685,27 +684,27 @@ var Mr = { exports: {} };
|
|
|
685
684
|
};
|
|
686
685
|
}
|
|
687
686
|
function hn(e) {
|
|
688
|
-
Promise ===
|
|
687
|
+
Promise === Ke && ie.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
689
688
|
}
|
|
690
|
-
("" +
|
|
691
|
-
var te = B.reject, $e = "",
|
|
689
|
+
("" + ge).indexOf("[native code]") === -1 && (qe = Pe = J);
|
|
690
|
+
var te = B.reject, $e = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", et = [], Tt = "__dbnames", pn = "readonly", gn = "readwrite";
|
|
692
691
|
function Fe(e, t) {
|
|
693
692
|
return e ? t ? function() {
|
|
694
693
|
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
695
694
|
} : e : t;
|
|
696
695
|
}
|
|
697
696
|
var or = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
|
|
698
|
-
function
|
|
697
|
+
function Mt(e) {
|
|
699
698
|
return typeof e != "string" || /\./.test(e) ? function(t) {
|
|
700
699
|
return t;
|
|
701
700
|
} : function(t) {
|
|
702
|
-
return t[e] === void 0 && e in t && delete (t =
|
|
701
|
+
return t[e] === void 0 && e in t && delete (t = Me(t))[e], t;
|
|
703
702
|
};
|
|
704
703
|
}
|
|
705
704
|
function ar() {
|
|
706
705
|
throw $.Type();
|
|
707
706
|
}
|
|
708
|
-
function
|
|
707
|
+
function Y(e, t) {
|
|
709
708
|
try {
|
|
710
709
|
var n = sr(e), i = sr(t);
|
|
711
710
|
if (n !== i) return n === "Array" ? 1 : i === "Array" ? -1 : n === "binary" ? 1 : i === "binary" ? -1 : n === "string" ? 1 : i === "string" ? -1 : n === "Date" ? 1 : i !== "Date" ? NaN : -1;
|
|
@@ -722,7 +721,7 @@ var Mr = { exports: {} };
|
|
|
722
721
|
case "Array":
|
|
723
722
|
return function(o, a) {
|
|
724
723
|
for (var c = o.length, u = a.length, h = c < u ? c : u, g = 0; g < h; ++g) {
|
|
725
|
-
var b =
|
|
724
|
+
var b = Y(o[g], a[g]);
|
|
726
725
|
if (b !== 0) return b;
|
|
727
726
|
}
|
|
728
727
|
return c === u ? 0 : c < u ? -1 : 1;
|
|
@@ -740,7 +739,7 @@ var Mr = { exports: {} };
|
|
|
740
739
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
741
740
|
}
|
|
742
741
|
var ur = (Z.prototype._trans = function(e, t, n) {
|
|
743
|
-
var i = this._tx || G.trans, o = this.name, a =
|
|
742
|
+
var i = this._tx || G.trans, o = this.name, a = me && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
744
743
|
function c(g, b, f) {
|
|
745
744
|
if (!f.schema[o]) throw new $.NotFound("Table " + o + " not part of transaction");
|
|
746
745
|
return t(f.idbtrans, f);
|
|
@@ -749,37 +748,37 @@ var Mr = { exports: {} };
|
|
|
749
748
|
try {
|
|
750
749
|
var h = i && i.db._novip === this.db._novip ? i === G.trans ? i._promise(e, c, n) : De(function() {
|
|
751
750
|
return i._promise(e, c, n);
|
|
752
|
-
}, { trans: i, transless: G.transless || G }) : function g(b, f,
|
|
751
|
+
}, { trans: i, transless: G.transless || G }) : function g(b, f, S, p) {
|
|
753
752
|
if (b.idbdb && (b._state.openComplete || G.letThrough || b._vip)) {
|
|
754
|
-
var m = b._createTransaction(f,
|
|
753
|
+
var m = b._createTransaction(f, S, b._dbSchema);
|
|
755
754
|
try {
|
|
756
755
|
m.create(), b._state.PR1398_maxLoop = 3;
|
|
757
|
-
} catch (
|
|
758
|
-
return
|
|
759
|
-
return g(b, f,
|
|
760
|
-
})) : te(
|
|
756
|
+
} catch (w) {
|
|
757
|
+
return w.name === rn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
|
|
758
|
+
return g(b, f, S, p);
|
|
759
|
+
})) : te(w);
|
|
761
760
|
}
|
|
762
|
-
return m._promise(f, function(
|
|
761
|
+
return m._promise(f, function(w, y) {
|
|
763
762
|
return De(function() {
|
|
764
|
-
return G.trans = m, p(
|
|
763
|
+
return G.trans = m, p(w, y, m);
|
|
765
764
|
});
|
|
766
|
-
}).then(function(
|
|
765
|
+
}).then(function(w) {
|
|
767
766
|
if (f === "readwrite") try {
|
|
768
767
|
m.idbtrans.commit();
|
|
769
768
|
} catch {
|
|
770
769
|
}
|
|
771
|
-
return f === "readonly" ?
|
|
772
|
-
return
|
|
770
|
+
return f === "readonly" ? w : m._completion.then(function() {
|
|
771
|
+
return w;
|
|
773
772
|
});
|
|
774
773
|
});
|
|
775
774
|
}
|
|
776
775
|
if (b._state.openComplete) return te(new $.DatabaseClosed(b._state.dbOpenError));
|
|
777
776
|
if (!b._state.isBeingOpened) {
|
|
778
777
|
if (!b._state.autoOpen) return te(new $.DatabaseClosed());
|
|
779
|
-
b.open().catch(
|
|
778
|
+
b.open().catch(J);
|
|
780
779
|
}
|
|
781
780
|
return b._state.dbReadyPromise.then(function() {
|
|
782
|
-
return g(b, f,
|
|
781
|
+
return g(b, f, S, p);
|
|
783
782
|
});
|
|
784
783
|
}(this.db, e, [this.name], c);
|
|
785
784
|
return a && (h._consoleTask = a, h = h.catch(function(g) {
|
|
@@ -797,8 +796,8 @@ var Mr = { exports: {} };
|
|
|
797
796
|
}).then(t);
|
|
798
797
|
}, Z.prototype.where = function(e) {
|
|
799
798
|
if (typeof e == "string") return new this.db.WhereClause(this, e);
|
|
800
|
-
if (
|
|
801
|
-
var t =
|
|
799
|
+
if (F(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
800
|
+
var t = j(e);
|
|
802
801
|
if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
|
|
803
802
|
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(u) {
|
|
804
803
|
if (u.compound && t.every(function(g) {
|
|
@@ -817,19 +816,19 @@ var Mr = { exports: {} };
|
|
|
817
816
|
return e[h];
|
|
818
817
|
}));
|
|
819
818
|
}
|
|
820
|
-
!n &&
|
|
819
|
+
!n && me && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
821
820
|
var i = this.schema.idxByName;
|
|
822
821
|
function o(u, h) {
|
|
823
|
-
return
|
|
822
|
+
return Y(u, h) === 0;
|
|
824
823
|
}
|
|
825
824
|
var c = t.reduce(function(f, h) {
|
|
826
|
-
var g = f[0], b = f[1], f = i[h],
|
|
825
|
+
var g = f[0], b = f[1], f = i[h], S = e[h];
|
|
827
826
|
return [g || f, g || !f ? Fe(b, f && f.multi ? function(p) {
|
|
828
|
-
return p = we(p, h),
|
|
829
|
-
return o(
|
|
827
|
+
return p = we(p, h), F(p) && p.some(function(m) {
|
|
828
|
+
return o(S, m);
|
|
830
829
|
});
|
|
831
830
|
} : function(p) {
|
|
832
|
-
return o(
|
|
831
|
+
return o(S, we(p, h));
|
|
833
832
|
}) : b];
|
|
834
833
|
}, [null, null]), a = c[0], c = c[1];
|
|
835
834
|
return a ? this.where(a.name).equals(e[a.keyPath]).filter(c) : n ? this.filter(c) : this.where(t).equals("");
|
|
@@ -848,7 +847,7 @@ var Mr = { exports: {} };
|
|
|
848
847
|
}, Z.prototype.toCollection = function() {
|
|
849
848
|
return new this.db.Collection(new this.db.WhereClause(this));
|
|
850
849
|
}, Z.prototype.orderBy = function(e) {
|
|
851
|
-
return new this.db.Collection(new this.db.WhereClause(this,
|
|
850
|
+
return new this.db.Collection(new this.db.WhereClause(this, F(e) ? "[".concat(e.join("+"), "]") : e));
|
|
852
851
|
}, Z.prototype.reverse = function() {
|
|
853
852
|
return this.toCollection().reverse();
|
|
854
853
|
}, Z.prototype.mapToClass = function(e) {
|
|
@@ -867,7 +866,7 @@ var Mr = { exports: {} };
|
|
|
867
866
|
}, enumerable: !1, configurable: !0 }), o.prototype.table = function() {
|
|
868
867
|
return i;
|
|
869
868
|
}, e = o);
|
|
870
|
-
for (var a = /* @__PURE__ */ new Set(), c = e.prototype; c; c =
|
|
869
|
+
for (var a = /* @__PURE__ */ new Set(), c = e.prototype; c; c = X(c)) Object.getOwnPropertyNames(c).forEach(function(h) {
|
|
871
870
|
return a.add(h);
|
|
872
871
|
});
|
|
873
872
|
function u(h) {
|
|
@@ -882,32 +881,32 @@ var Mr = { exports: {} };
|
|
|
882
881
|
return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = u, this.hook("reading", u), e;
|
|
883
882
|
}, Z.prototype.defineClass = function() {
|
|
884
883
|
return this.mapToClass(function(e) {
|
|
885
|
-
|
|
884
|
+
N(this, e);
|
|
886
885
|
});
|
|
887
886
|
}, Z.prototype.add = function(e, t) {
|
|
888
887
|
var n = this, i = this.schema.primKey, o = i.auto, a = i.keyPath, c = e;
|
|
889
|
-
return a && o && (c =
|
|
888
|
+
return a && o && (c = Mt(a)(e)), this._trans("readwrite", function(u) {
|
|
890
889
|
return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [c] });
|
|
891
890
|
}).then(function(u) {
|
|
892
891
|
return u.numFailures ? B.reject(u.failures[0]) : u.lastResult;
|
|
893
892
|
}).then(function(u) {
|
|
894
893
|
if (a) try {
|
|
895
|
-
|
|
894
|
+
fe(e, a, u);
|
|
896
895
|
} catch {
|
|
897
896
|
}
|
|
898
897
|
return u;
|
|
899
898
|
});
|
|
900
899
|
}, Z.prototype.update = function(e, t) {
|
|
901
|
-
return typeof e != "object" ||
|
|
900
|
+
return typeof e != "object" || F(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? te(new $.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
|
|
902
901
|
}, Z.prototype.put = function(e, t) {
|
|
903
902
|
var n = this, i = this.schema.primKey, o = i.auto, a = i.keyPath, c = e;
|
|
904
|
-
return a && o && (c =
|
|
903
|
+
return a && o && (c = Mt(a)(e)), this._trans("readwrite", function(u) {
|
|
905
904
|
return n.core.mutate({ trans: u, type: "put", values: [c], keys: t != null ? [t] : null });
|
|
906
905
|
}).then(function(u) {
|
|
907
906
|
return u.numFailures ? B.reject(u.failures[0]) : u.lastResult;
|
|
908
907
|
}).then(function(u) {
|
|
909
908
|
if (a) try {
|
|
910
|
-
|
|
909
|
+
fe(e, a, u);
|
|
911
910
|
} catch {
|
|
912
911
|
}
|
|
913
912
|
return u;
|
|
@@ -941,10 +940,10 @@ var Mr = { exports: {} };
|
|
|
941
940
|
var g = i.schema.primKey, u = g.auto, g = g.keyPath;
|
|
942
941
|
if (g && o) throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
943
942
|
if (o && o.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
|
|
944
|
-
var h = e.length, g = g && u ? e.map(
|
|
943
|
+
var h = e.length, g = g && u ? e.map(Mt(g)) : e;
|
|
945
944
|
return i.core.mutate({ trans: c, type: "add", keys: o, values: g, wantResults: a }).then(function(m) {
|
|
946
|
-
var f = m.numFailures,
|
|
947
|
-
if (f === 0) return a ?
|
|
945
|
+
var f = m.numFailures, S = m.results, p = m.lastResult, m = m.failures;
|
|
946
|
+
if (f === 0) return a ? S : p;
|
|
948
947
|
throw new Je("".concat(i.name, ".bulkAdd(): ").concat(f, " of ").concat(h, " operations failed"), m);
|
|
949
948
|
});
|
|
950
949
|
});
|
|
@@ -954,10 +953,10 @@ var Mr = { exports: {} };
|
|
|
954
953
|
var g = i.schema.primKey, u = g.auto, g = g.keyPath;
|
|
955
954
|
if (g && o) throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
956
955
|
if (o && o.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
|
|
957
|
-
var h = e.length, g = g && u ? e.map(
|
|
956
|
+
var h = e.length, g = g && u ? e.map(Mt(g)) : e;
|
|
958
957
|
return i.core.mutate({ trans: c, type: "put", keys: o, values: g, wantResults: a }).then(function(m) {
|
|
959
|
-
var f = m.numFailures,
|
|
960
|
-
if (f === 0) return a ?
|
|
958
|
+
var f = m.numFailures, S = m.results, p = m.lastResult, m = m.failures;
|
|
959
|
+
if (f === 0) return a ? S : p;
|
|
961
960
|
throw new Je("".concat(i.name, ".bulkPut(): ").concat(f, " of ").concat(h, " operations failed"), m);
|
|
962
961
|
});
|
|
963
962
|
});
|
|
@@ -970,27 +969,27 @@ var Mr = { exports: {} };
|
|
|
970
969
|
return this._trans("readwrite", function(c) {
|
|
971
970
|
return n.getMany({ trans: c, keys: i, cache: "clone" }).then(function(u) {
|
|
972
971
|
var h = [], g = [];
|
|
973
|
-
e.forEach(function(f,
|
|
974
|
-
var p = f.key, m = f.changes,
|
|
975
|
-
if (
|
|
976
|
-
for (var y = 0,
|
|
977
|
-
var E =
|
|
972
|
+
e.forEach(function(f, S) {
|
|
973
|
+
var p = f.key, m = f.changes, w = u[S];
|
|
974
|
+
if (w) {
|
|
975
|
+
for (var y = 0, _ = Object.keys(m); y < _.length; y++) {
|
|
976
|
+
var E = _[y], O = m[E];
|
|
978
977
|
if (E === t.schema.primKey.keyPath) {
|
|
979
|
-
if (
|
|
980
|
-
} else
|
|
978
|
+
if (Y(O, p) !== 0) throw new $.Constraint("Cannot update primary key in bulkUpdate()");
|
|
979
|
+
} else fe(w, E, O);
|
|
981
980
|
}
|
|
982
|
-
a.push(
|
|
981
|
+
a.push(S), h.push(p), g.push(w);
|
|
983
982
|
}
|
|
984
983
|
});
|
|
985
984
|
var b = h.length;
|
|
986
985
|
return n.mutate({ trans: c, type: "put", keys: h, values: g, updates: { keys: i, changeSpecs: o } }).then(function(f) {
|
|
987
|
-
var
|
|
988
|
-
if (
|
|
989
|
-
for (var m = 0,
|
|
990
|
-
var y,
|
|
991
|
-
E != null && (y = p[
|
|
986
|
+
var S = f.numFailures, p = f.failures;
|
|
987
|
+
if (S === 0) return b;
|
|
988
|
+
for (var m = 0, w = Object.keys(p); m < w.length; m++) {
|
|
989
|
+
var y, _ = w[m], E = a[Number(_)];
|
|
990
|
+
E != null && (y = p[_], delete p[_], p[E] = y);
|
|
992
991
|
}
|
|
993
|
-
throw new Je("".concat(t.name, ".bulkUpdate(): ").concat(
|
|
992
|
+
throw new Je("".concat(t.name, ".bulkUpdate(): ").concat(S, " of ").concat(b, " operations failed"), p);
|
|
994
993
|
});
|
|
995
994
|
});
|
|
996
995
|
});
|
|
@@ -1022,25 +1021,25 @@ var Mr = { exports: {} };
|
|
|
1022
1021
|
if (typeof c != "object") {
|
|
1023
1022
|
var g;
|
|
1024
1023
|
u = u || qr;
|
|
1025
|
-
var b = { subscribers: [], fire: h = h ||
|
|
1024
|
+
var b = { subscribers: [], fire: h = h || J, subscribe: function(f) {
|
|
1026
1025
|
b.subscribers.indexOf(f) === -1 && (b.subscribers.push(f), b.fire = u(b.fire, f));
|
|
1027
1026
|
}, unsubscribe: function(f) {
|
|
1028
|
-
b.subscribers = b.subscribers.filter(function(
|
|
1029
|
-
return
|
|
1027
|
+
b.subscribers = b.subscribers.filter(function(S) {
|
|
1028
|
+
return S !== f;
|
|
1030
1029
|
}), b.fire = b.subscribers.reduce(u, h);
|
|
1031
1030
|
} };
|
|
1032
1031
|
return n[c] = t[c] = b;
|
|
1033
1032
|
}
|
|
1034
|
-
|
|
1035
|
-
var
|
|
1036
|
-
if (
|
|
1033
|
+
j(g = c).forEach(function(f) {
|
|
1034
|
+
var S = g[f];
|
|
1035
|
+
if (F(S)) a(f, g[f][0], g[f][1]);
|
|
1037
1036
|
else {
|
|
1038
|
-
if (
|
|
1037
|
+
if (S !== "asap") throw new $.InvalidArgument("Invalid event config");
|
|
1039
1038
|
var p = a(f, at, function() {
|
|
1040
|
-
for (var m = arguments.length,
|
|
1039
|
+
for (var m = arguments.length, w = new Array(m); m--; ) w[m] = arguments[m];
|
|
1041
1040
|
p.subscribers.forEach(function(y) {
|
|
1042
1041
|
Hn(function() {
|
|
1043
|
-
y.apply(null,
|
|
1042
|
+
y.apply(null, w);
|
|
1044
1043
|
});
|
|
1045
1044
|
});
|
|
1046
1045
|
});
|
|
@@ -1073,23 +1072,23 @@ var Mr = { exports: {} };
|
|
|
1073
1072
|
var i = jt(e, t.schema);
|
|
1074
1073
|
return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: i, range: e.range } });
|
|
1075
1074
|
}
|
|
1076
|
-
function
|
|
1075
|
+
function Nt(e, t, n, i) {
|
|
1077
1076
|
var o = e.replayFilter ? Fe(e.filter, e.replayFilter()) : e.filter;
|
|
1078
1077
|
if (e.or) {
|
|
1079
1078
|
var a = {}, c = function(u, h, g) {
|
|
1080
1079
|
var b, f;
|
|
1081
|
-
o && !o(h, g, function(
|
|
1082
|
-
return h.stop(
|
|
1083
|
-
}, function(
|
|
1084
|
-
return h.fail(
|
|
1085
|
-
}) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)),
|
|
1080
|
+
o && !o(h, g, function(S) {
|
|
1081
|
+
return h.stop(S);
|
|
1082
|
+
}, function(S) {
|
|
1083
|
+
return h.fail(S);
|
|
1084
|
+
}) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)), ee(a, f) || (a[f] = !0, t(u, h, g)));
|
|
1086
1085
|
};
|
|
1087
1086
|
return Promise.all([e.or._iterate(c, n), dr(lr(e, i, n), e.algorithm, c, !e.keysOnly && e.valueMapper)]);
|
|
1088
1087
|
}
|
|
1089
1088
|
return dr(lr(e, i, n), Fe(e.algorithm, o), t, !e.keysOnly && e.valueMapper);
|
|
1090
1089
|
}
|
|
1091
1090
|
function dr(e, t, n, i) {
|
|
1092
|
-
var o =
|
|
1091
|
+
var o = q(i ? function(a, c, u) {
|
|
1093
1092
|
return n(i(a), c, u);
|
|
1094
1093
|
} : n);
|
|
1095
1094
|
return e.then(function(a) {
|
|
@@ -1100,9 +1099,9 @@ var Mr = { exports: {} };
|
|
|
1100
1099
|
t && !t(a, function(u) {
|
|
1101
1100
|
return c = u;
|
|
1102
1101
|
}, function(u) {
|
|
1103
|
-
a.stop(u), c =
|
|
1102
|
+
a.stop(u), c = J;
|
|
1104
1103
|
}, function(u) {
|
|
1105
|
-
a.fail(u), c =
|
|
1104
|
+
a.fail(u), c = J;
|
|
1106
1105
|
}) || o(a.value, a, function(u) {
|
|
1107
1106
|
return c = u;
|
|
1108
1107
|
}), c();
|
|
@@ -1112,7 +1111,7 @@ var Mr = { exports: {} };
|
|
|
1112
1111
|
var Ee = Symbol(), ht = (fr.prototype.execute = function(e) {
|
|
1113
1112
|
if (this.add !== void 0) {
|
|
1114
1113
|
var t = this.add;
|
|
1115
|
-
if (
|
|
1114
|
+
if (F(t)) return x(x([], F(e) ? e : [], !0), t).sort();
|
|
1116
1115
|
if (typeof t == "number") return (Number(e) || 0) + t;
|
|
1117
1116
|
if (typeof t == "bigint") try {
|
|
1118
1117
|
return BigInt(e) + t;
|
|
@@ -1123,7 +1122,7 @@ var Mr = { exports: {} };
|
|
|
1123
1122
|
}
|
|
1124
1123
|
if (this.remove !== void 0) {
|
|
1125
1124
|
var n = this.remove;
|
|
1126
|
-
if (
|
|
1125
|
+
if (F(n)) return F(e) ? e.filter(function(i) {
|
|
1127
1126
|
return !n.includes(i);
|
|
1128
1127
|
}).sort() : [];
|
|
1129
1128
|
if (typeof n == "number") return Number(e) - n;
|
|
@@ -1139,28 +1138,28 @@ var Mr = { exports: {} };
|
|
|
1139
1138
|
function fr(e) {
|
|
1140
1139
|
Object.assign(this, e);
|
|
1141
1140
|
}
|
|
1142
|
-
var oi = (
|
|
1141
|
+
var oi = (Q.prototype._read = function(e, t) {
|
|
1143
1142
|
var n = this._ctx;
|
|
1144
1143
|
return n.error ? n.table._trans(null, te.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
|
|
1145
|
-
},
|
|
1144
|
+
}, Q.prototype._write = function(e) {
|
|
1146
1145
|
var t = this._ctx;
|
|
1147
1146
|
return t.error ? t.table._trans(null, te.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
|
|
1148
|
-
},
|
|
1147
|
+
}, Q.prototype._addAlgorithm = function(e) {
|
|
1149
1148
|
var t = this._ctx;
|
|
1150
1149
|
t.algorithm = Fe(t.algorithm, e);
|
|
1151
|
-
},
|
|
1152
|
-
return
|
|
1153
|
-
},
|
|
1150
|
+
}, Q.prototype._iterate = function(e, t) {
|
|
1151
|
+
return Nt(this._ctx, e, t, this._ctx.table.core);
|
|
1152
|
+
}, Q.prototype.clone = function(e) {
|
|
1154
1153
|
var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
|
|
1155
|
-
return e &&
|
|
1156
|
-
},
|
|
1154
|
+
return e && N(n, e), t._ctx = n, t;
|
|
1155
|
+
}, Q.prototype.raw = function() {
|
|
1157
1156
|
return this._ctx.valueMapper = null, this;
|
|
1158
|
-
},
|
|
1157
|
+
}, Q.prototype.each = function(e) {
|
|
1159
1158
|
var t = this._ctx;
|
|
1160
1159
|
return this._read(function(n) {
|
|
1161
|
-
return
|
|
1160
|
+
return Nt(t, e, n, t.table.core);
|
|
1162
1161
|
});
|
|
1163
|
-
},
|
|
1162
|
+
}, Q.prototype.count = function(e) {
|
|
1164
1163
|
var t = this;
|
|
1165
1164
|
return this._read(function(n) {
|
|
1166
1165
|
var i = t._ctx, o = i.table.core;
|
|
@@ -1168,25 +1167,25 @@ var Mr = { exports: {} };
|
|
|
1168
1167
|
return Math.min(c, i.limit);
|
|
1169
1168
|
});
|
|
1170
1169
|
var a = 0;
|
|
1171
|
-
return
|
|
1170
|
+
return Nt(i, function() {
|
|
1172
1171
|
return ++a, !1;
|
|
1173
1172
|
}, n, o).then(function() {
|
|
1174
1173
|
return a;
|
|
1175
1174
|
});
|
|
1176
1175
|
}).then(e);
|
|
1177
|
-
},
|
|
1176
|
+
}, Q.prototype.sortBy = function(e, t) {
|
|
1178
1177
|
var n = e.split(".").reverse(), i = n[0], o = n.length - 1;
|
|
1179
1178
|
function a(h, g) {
|
|
1180
1179
|
return g ? a(h[n[g]], g - 1) : h[i];
|
|
1181
1180
|
}
|
|
1182
1181
|
var c = this._ctx.dir === "next" ? 1 : -1;
|
|
1183
1182
|
function u(h, g) {
|
|
1184
|
-
return
|
|
1183
|
+
return Y(a(h, o), a(g, o)) * c;
|
|
1185
1184
|
}
|
|
1186
1185
|
return this.toArray(function(h) {
|
|
1187
1186
|
return h.sort(u);
|
|
1188
1187
|
}).then(t);
|
|
1189
|
-
},
|
|
1188
|
+
}, Q.prototype.toArray = function(e) {
|
|
1190
1189
|
var t = this;
|
|
1191
1190
|
return this._read(function(n) {
|
|
1192
1191
|
var i = t._ctx;
|
|
@@ -1197,13 +1196,13 @@ var Mr = { exports: {} };
|
|
|
1197
1196
|
});
|
|
1198
1197
|
}
|
|
1199
1198
|
var c = [];
|
|
1200
|
-
return
|
|
1199
|
+
return Nt(i, function(u) {
|
|
1201
1200
|
return c.push(u);
|
|
1202
1201
|
}, n, i.table.core).then(function() {
|
|
1203
1202
|
return c;
|
|
1204
1203
|
});
|
|
1205
1204
|
}, e);
|
|
1206
|
-
},
|
|
1205
|
+
}, Q.prototype.offset = function(e) {
|
|
1207
1206
|
var t = this._ctx;
|
|
1208
1207
|
return e <= 0 || (t.offset += e, tt(t) ? mn(t, function() {
|
|
1209
1208
|
var n = e;
|
|
@@ -1218,49 +1217,49 @@ var Mr = { exports: {} };
|
|
|
1218
1217
|
return --n < 0;
|
|
1219
1218
|
};
|
|
1220
1219
|
})), this;
|
|
1221
|
-
},
|
|
1220
|
+
}, Q.prototype.limit = function(e) {
|
|
1222
1221
|
return this._ctx.limit = Math.min(this._ctx.limit, e), mn(this._ctx, function() {
|
|
1223
1222
|
var t = e;
|
|
1224
1223
|
return function(n, i, o) {
|
|
1225
1224
|
return --t <= 0 && i(o), 0 <= t;
|
|
1226
1225
|
};
|
|
1227
1226
|
}, !0), this;
|
|
1228
|
-
},
|
|
1227
|
+
}, Q.prototype.until = function(e, t) {
|
|
1229
1228
|
return yn(this._ctx, function(n, i, o) {
|
|
1230
1229
|
return !e(n.value) || (i(o), t);
|
|
1231
1230
|
}), this;
|
|
1232
|
-
},
|
|
1231
|
+
}, Q.prototype.first = function(e) {
|
|
1233
1232
|
return this.limit(1).toArray(function(t) {
|
|
1234
1233
|
return t[0];
|
|
1235
1234
|
}).then(e);
|
|
1236
|
-
},
|
|
1235
|
+
}, Q.prototype.last = function(e) {
|
|
1237
1236
|
return this.reverse().first(e);
|
|
1238
|
-
},
|
|
1237
|
+
}, Q.prototype.filter = function(e) {
|
|
1239
1238
|
var t;
|
|
1240
1239
|
return yn(this._ctx, function(n) {
|
|
1241
1240
|
return e(n.value);
|
|
1242
1241
|
}), (t = this._ctx).isMatch = Fe(t.isMatch, e), this;
|
|
1243
|
-
},
|
|
1242
|
+
}, Q.prototype.and = function(e) {
|
|
1244
1243
|
return this.filter(e);
|
|
1245
|
-
},
|
|
1244
|
+
}, Q.prototype.or = function(e) {
|
|
1246
1245
|
return new this.db.WhereClause(this._ctx.table, e, this);
|
|
1247
|
-
},
|
|
1246
|
+
}, Q.prototype.reverse = function() {
|
|
1248
1247
|
return this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
|
|
1249
|
-
},
|
|
1248
|
+
}, Q.prototype.desc = function() {
|
|
1250
1249
|
return this.reverse();
|
|
1251
|
-
},
|
|
1250
|
+
}, Q.prototype.eachKey = function(e) {
|
|
1252
1251
|
var t = this._ctx;
|
|
1253
1252
|
return t.keysOnly = !t.isMatch, this.each(function(n, i) {
|
|
1254
1253
|
e(i.key, i);
|
|
1255
1254
|
});
|
|
1256
|
-
},
|
|
1255
|
+
}, Q.prototype.eachUniqueKey = function(e) {
|
|
1257
1256
|
return this._ctx.unique = "unique", this.eachKey(e);
|
|
1258
|
-
},
|
|
1257
|
+
}, Q.prototype.eachPrimaryKey = function(e) {
|
|
1259
1258
|
var t = this._ctx;
|
|
1260
1259
|
return t.keysOnly = !t.isMatch, this.each(function(n, i) {
|
|
1261
1260
|
e(i.primaryKey, i);
|
|
1262
1261
|
});
|
|
1263
|
-
},
|
|
1262
|
+
}, Q.prototype.keys = function(e) {
|
|
1264
1263
|
var t = this._ctx;
|
|
1265
1264
|
t.keysOnly = !t.isMatch;
|
|
1266
1265
|
var n = [];
|
|
@@ -1269,7 +1268,7 @@ var Mr = { exports: {} };
|
|
|
1269
1268
|
}).then(function() {
|
|
1270
1269
|
return n;
|
|
1271
1270
|
}).then(e);
|
|
1272
|
-
},
|
|
1271
|
+
}, Q.prototype.primaryKeys = function(e) {
|
|
1273
1272
|
var t = this._ctx;
|
|
1274
1273
|
if (t.dir === "next" && tt(t, !0) && 0 < t.limit) return this._read(function(i) {
|
|
1275
1274
|
var o = jt(t, t.table.core.schema);
|
|
@@ -1284,76 +1283,76 @@ var Mr = { exports: {} };
|
|
|
1284
1283
|
}).then(function() {
|
|
1285
1284
|
return n;
|
|
1286
1285
|
}).then(e);
|
|
1287
|
-
},
|
|
1286
|
+
}, Q.prototype.uniqueKeys = function(e) {
|
|
1288
1287
|
return this._ctx.unique = "unique", this.keys(e);
|
|
1289
|
-
},
|
|
1288
|
+
}, Q.prototype.firstKey = function(e) {
|
|
1290
1289
|
return this.limit(1).keys(function(t) {
|
|
1291
1290
|
return t[0];
|
|
1292
1291
|
}).then(e);
|
|
1293
|
-
},
|
|
1292
|
+
}, Q.prototype.lastKey = function(e) {
|
|
1294
1293
|
return this.reverse().firstKey(e);
|
|
1295
|
-
},
|
|
1294
|
+
}, Q.prototype.distinct = function() {
|
|
1296
1295
|
var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
|
|
1297
1296
|
if (!e || !e.multi) return this;
|
|
1298
1297
|
var t = {};
|
|
1299
1298
|
return yn(this._ctx, function(o) {
|
|
1300
|
-
var i = o.primaryKey.toString(), o =
|
|
1299
|
+
var i = o.primaryKey.toString(), o = ee(t, i);
|
|
1301
1300
|
return t[i] = !0, !o;
|
|
1302
1301
|
}), this;
|
|
1303
|
-
},
|
|
1302
|
+
}, Q.prototype.modify = function(e) {
|
|
1304
1303
|
var t = this, n = this._ctx;
|
|
1305
1304
|
return this._write(function(i) {
|
|
1306
1305
|
var o, a, c;
|
|
1307
|
-
c = typeof e == "function" ? e : (o =
|
|
1308
|
-
for (var
|
|
1306
|
+
c = typeof e == "function" ? e : (o = j(e), a = o.length, function(y) {
|
|
1307
|
+
for (var _ = !1, E = 0; E < a; ++E) {
|
|
1309
1308
|
var O = o[E], A = e[O], P = we(y, O);
|
|
1310
|
-
A instanceof ht ? (
|
|
1309
|
+
A instanceof ht ? (fe(y, O, A.execute(P)), _ = !0) : P !== A && (fe(y, O, A), _ = !0);
|
|
1311
1310
|
}
|
|
1312
|
-
return
|
|
1311
|
+
return _;
|
|
1313
1312
|
});
|
|
1314
1313
|
var u = n.table.core, f = u.schema.primaryKey, h = f.outbound, g = f.extractKey, b = 200, f = t.db._options.modifyChunkSize;
|
|
1315
1314
|
f && (b = typeof f == "object" ? f[u.name] || f["*"] || 200 : f);
|
|
1316
|
-
function
|
|
1315
|
+
function S(y, O) {
|
|
1317
1316
|
var E = O.failures, O = O.numFailures;
|
|
1318
1317
|
m += y - O;
|
|
1319
|
-
for (var A = 0, P =
|
|
1320
|
-
var
|
|
1321
|
-
p.push(E[
|
|
1318
|
+
for (var A = 0, P = j(E); A < P.length; A++) {
|
|
1319
|
+
var T = P[A];
|
|
1320
|
+
p.push(E[T]);
|
|
1322
1321
|
}
|
|
1323
1322
|
}
|
|
1324
|
-
var p = [], m = 0,
|
|
1323
|
+
var p = [], m = 0, w = [];
|
|
1325
1324
|
return t.clone().primaryKeys().then(function(y) {
|
|
1326
|
-
function
|
|
1325
|
+
function _(O) {
|
|
1327
1326
|
var A = Math.min(b, y.length - O);
|
|
1328
1327
|
return u.getMany({ trans: i, keys: y.slice(O, O + A), cache: "immutable" }).then(function(P) {
|
|
1329
|
-
for (var
|
|
1330
|
-
var L = P[R],
|
|
1331
|
-
c.call(
|
|
1328
|
+
for (var T = [], I = [], C = h ? [] : null, M = [], R = 0; R < A; ++R) {
|
|
1329
|
+
var L = P[R], W = { value: Me(L), primKey: y[O + R] };
|
|
1330
|
+
c.call(W, W.value, W) !== !1 && (W.value == null ? M.push(y[O + R]) : h || Y(g(L), g(W.value)) === 0 ? (I.push(W.value), h && C.push(y[O + R])) : (M.push(y[O + R]), T.push(W.value)));
|
|
1332
1331
|
}
|
|
1333
|
-
return Promise.resolve(0 <
|
|
1334
|
-
for (var
|
|
1335
|
-
|
|
1332
|
+
return Promise.resolve(0 < T.length && u.mutate({ trans: i, type: "add", values: T }).then(function(z) {
|
|
1333
|
+
for (var H in z.failures) M.splice(parseInt(H), 1);
|
|
1334
|
+
S(T.length, z);
|
|
1336
1335
|
})).then(function() {
|
|
1337
|
-
return (0 < I.length || E && typeof e == "object") && u.mutate({ trans: i, type: "put", keys: C, values: I, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(
|
|
1338
|
-
return
|
|
1336
|
+
return (0 < I.length || E && typeof e == "object") && u.mutate({ trans: i, type: "put", keys: C, values: I, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(z) {
|
|
1337
|
+
return S(I.length, z);
|
|
1339
1338
|
});
|
|
1340
1339
|
}).then(function() {
|
|
1341
|
-
return (0 <
|
|
1342
|
-
return
|
|
1340
|
+
return (0 < M.length || E && e === bn) && u.mutate({ trans: i, type: "delete", keys: M, criteria: E, isAdditionalChunk: 0 < O }).then(function(z) {
|
|
1341
|
+
return S(M.length, z);
|
|
1343
1342
|
});
|
|
1344
1343
|
}).then(function() {
|
|
1345
|
-
return y.length > O + A &&
|
|
1344
|
+
return y.length > O + A && _(O + b);
|
|
1346
1345
|
});
|
|
1347
1346
|
});
|
|
1348
1347
|
}
|
|
1349
1348
|
var E = tt(n) && n.limit === 1 / 0 && (typeof e != "function" || e === bn) && { index: n.index, range: n.range };
|
|
1350
|
-
return
|
|
1351
|
-
if (0 < p.length) throw new Et("Error modifying one or more objects", p, m,
|
|
1349
|
+
return _(0).then(function() {
|
|
1350
|
+
if (0 < p.length) throw new Et("Error modifying one or more objects", p, m, w);
|
|
1352
1351
|
return y.length;
|
|
1353
1352
|
});
|
|
1354
1353
|
});
|
|
1355
1354
|
});
|
|
1356
|
-
},
|
|
1355
|
+
}, Q.prototype.delete = function() {
|
|
1357
1356
|
var e = this._ctx, t = e.range;
|
|
1358
1357
|
return tt(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
|
|
1359
1358
|
var i = e.table.core.schema.primaryKey, o = t;
|
|
@@ -1367,8 +1366,8 @@ var Mr = { exports: {} };
|
|
|
1367
1366
|
});
|
|
1368
1367
|
});
|
|
1369
1368
|
}) : this.modify(bn);
|
|
1370
|
-
},
|
|
1371
|
-
function
|
|
1369
|
+
}, Q);
|
|
1370
|
+
function Q() {
|
|
1372
1371
|
}
|
|
1373
1372
|
var bn = function(e, t) {
|
|
1374
1373
|
return t.value = null;
|
|
@@ -1379,7 +1378,7 @@ var Mr = { exports: {} };
|
|
|
1379
1378
|
function si(e, t) {
|
|
1380
1379
|
return t < e ? -1 : e === t ? 0 : 1;
|
|
1381
1380
|
}
|
|
1382
|
-
function
|
|
1381
|
+
function he(e, t, n) {
|
|
1383
1382
|
return e = e instanceof pr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
|
|
1384
1383
|
}
|
|
1385
1384
|
function nt(e) {
|
|
@@ -1387,12 +1386,12 @@ var Mr = { exports: {} };
|
|
|
1387
1386
|
return hr("");
|
|
1388
1387
|
}).limit(0);
|
|
1389
1388
|
}
|
|
1390
|
-
function
|
|
1389
|
+
function Kt(e, t, n, i) {
|
|
1391
1390
|
var o, a, c, u, h, g, b, f = n.length;
|
|
1392
1391
|
if (!n.every(function(m) {
|
|
1393
1392
|
return typeof m == "string";
|
|
1394
|
-
})) return
|
|
1395
|
-
function
|
|
1393
|
+
})) return he(e, ir);
|
|
1394
|
+
function S(m) {
|
|
1396
1395
|
o = m === "next" ? function(y) {
|
|
1397
1396
|
return y.toUpperCase();
|
|
1398
1397
|
} : function(y) {
|
|
@@ -1402,40 +1401,40 @@ var Mr = { exports: {} };
|
|
|
1402
1401
|
} : function(y) {
|
|
1403
1402
|
return y.toUpperCase();
|
|
1404
1403
|
}, c = m === "next" ? ai : si;
|
|
1405
|
-
var
|
|
1404
|
+
var w = n.map(function(y) {
|
|
1406
1405
|
return { lower: a(y), upper: o(y) };
|
|
1407
|
-
}).sort(function(y,
|
|
1408
|
-
return c(y.lower,
|
|
1406
|
+
}).sort(function(y, _) {
|
|
1407
|
+
return c(y.lower, _.lower);
|
|
1409
1408
|
});
|
|
1410
|
-
u =
|
|
1409
|
+
u = w.map(function(y) {
|
|
1411
1410
|
return y.upper;
|
|
1412
|
-
}), h =
|
|
1411
|
+
}), h = w.map(function(y) {
|
|
1413
1412
|
return y.lower;
|
|
1414
1413
|
}), b = (g = m) === "next" ? "" : i;
|
|
1415
1414
|
}
|
|
1416
|
-
|
|
1415
|
+
S("next"), e = new e.Collection(e, function() {
|
|
1417
1416
|
return Ce(u[0], h[f - 1] + i);
|
|
1418
1417
|
}), e._ondirectionchange = function(m) {
|
|
1419
|
-
|
|
1418
|
+
S(m);
|
|
1420
1419
|
};
|
|
1421
1420
|
var p = 0;
|
|
1422
|
-
return e._addAlgorithm(function(m,
|
|
1423
|
-
var
|
|
1424
|
-
if (typeof
|
|
1425
|
-
var E = a(
|
|
1421
|
+
return e._addAlgorithm(function(m, w, y) {
|
|
1422
|
+
var _ = m.key;
|
|
1423
|
+
if (typeof _ != "string") return !1;
|
|
1424
|
+
var E = a(_);
|
|
1426
1425
|
if (t(E, h, p)) return !0;
|
|
1427
1426
|
for (var O = null, A = p; A < f; ++A) {
|
|
1428
|
-
var P = function(
|
|
1429
|
-
for (var
|
|
1430
|
-
var
|
|
1431
|
-
if (
|
|
1432
|
-
R(
|
|
1427
|
+
var P = function(T, I, C, M, R, L) {
|
|
1428
|
+
for (var W = Math.min(T.length, M.length), z = -1, H = 0; H < W; ++H) {
|
|
1429
|
+
var pe = I[H];
|
|
1430
|
+
if (pe !== M[H]) return R(T[H], C[H]) < 0 ? T.substr(0, H) + C[H] + C.substr(H + 1) : R(T[H], M[H]) < 0 ? T.substr(0, H) + M[H] + C.substr(H + 1) : 0 <= z ? T.substr(0, z) + I[z] + C.substr(z + 1) : null;
|
|
1431
|
+
R(T[H], pe) < 0 && (z = H);
|
|
1433
1432
|
}
|
|
1434
|
-
return
|
|
1435
|
-
}(
|
|
1433
|
+
return W < M.length && L === "next" ? T + C.substr(T.length) : W < T.length && L === "prev" ? T.substr(0, C.length) : z < 0 ? null : T.substr(0, z) + M[z] + C.substr(z + 1);
|
|
1434
|
+
}(_, E, u[A], h[A], c, g);
|
|
1436
1435
|
P === null && O === null ? p = A + 1 : (O === null || 0 < c(O, P)) && (O = P);
|
|
1437
1436
|
}
|
|
1438
|
-
return
|
|
1437
|
+
return w(O !== null ? function() {
|
|
1439
1438
|
m.continue(O + b);
|
|
1440
1439
|
} : y), !1;
|
|
1441
1440
|
}), e;
|
|
@@ -1455,56 +1454,56 @@ var Mr = { exports: {} };
|
|
|
1455
1454
|
return Ce(e, t, !n, !i);
|
|
1456
1455
|
});
|
|
1457
1456
|
} catch {
|
|
1458
|
-
return
|
|
1457
|
+
return he(this, _e);
|
|
1459
1458
|
}
|
|
1460
1459
|
}, oe.prototype.equals = function(e) {
|
|
1461
|
-
return e == null ?
|
|
1460
|
+
return e == null ? he(this, _e) : new this.Collection(this, function() {
|
|
1462
1461
|
return hr(e);
|
|
1463
1462
|
});
|
|
1464
1463
|
}, oe.prototype.above = function(e) {
|
|
1465
|
-
return e == null ?
|
|
1464
|
+
return e == null ? he(this, _e) : new this.Collection(this, function() {
|
|
1466
1465
|
return Ce(e, void 0, !0);
|
|
1467
1466
|
});
|
|
1468
1467
|
}, oe.prototype.aboveOrEqual = function(e) {
|
|
1469
|
-
return e == null ?
|
|
1468
|
+
return e == null ? he(this, _e) : new this.Collection(this, function() {
|
|
1470
1469
|
return Ce(e, void 0, !1);
|
|
1471
1470
|
});
|
|
1472
1471
|
}, oe.prototype.below = function(e) {
|
|
1473
|
-
return e == null ?
|
|
1472
|
+
return e == null ? he(this, _e) : new this.Collection(this, function() {
|
|
1474
1473
|
return Ce(void 0, e, !1, !0);
|
|
1475
1474
|
});
|
|
1476
1475
|
}, oe.prototype.belowOrEqual = function(e) {
|
|
1477
|
-
return e == null ?
|
|
1476
|
+
return e == null ? he(this, _e) : new this.Collection(this, function() {
|
|
1478
1477
|
return Ce(void 0, e);
|
|
1479
1478
|
});
|
|
1480
1479
|
}, oe.prototype.startsWith = function(e) {
|
|
1481
|
-
return typeof e != "string" ?
|
|
1480
|
+
return typeof e != "string" ? he(this, ir) : this.between(e, e + $e, !0, !0);
|
|
1482
1481
|
}, oe.prototype.startsWithIgnoreCase = function(e) {
|
|
1483
|
-
return e === "" ? this.startsWith(e) :
|
|
1482
|
+
return e === "" ? this.startsWith(e) : Kt(this, function(t, n) {
|
|
1484
1483
|
return t.indexOf(n[0]) === 0;
|
|
1485
1484
|
}, [e], $e);
|
|
1486
1485
|
}, oe.prototype.equalsIgnoreCase = function(e) {
|
|
1487
|
-
return
|
|
1486
|
+
return Kt(this, function(t, n) {
|
|
1488
1487
|
return t === n[0];
|
|
1489
1488
|
}, [e], "");
|
|
1490
1489
|
}, oe.prototype.anyOfIgnoreCase = function() {
|
|
1491
|
-
var e =
|
|
1492
|
-
return e.length === 0 ? nt(this) :
|
|
1490
|
+
var e = Se.apply(Qe, arguments);
|
|
1491
|
+
return e.length === 0 ? nt(this) : Kt(this, function(t, n) {
|
|
1493
1492
|
return n.indexOf(t) !== -1;
|
|
1494
1493
|
}, e, "");
|
|
1495
1494
|
}, oe.prototype.startsWithAnyOfIgnoreCase = function() {
|
|
1496
|
-
var e =
|
|
1497
|
-
return e.length === 0 ? nt(this) :
|
|
1495
|
+
var e = Se.apply(Qe, arguments);
|
|
1496
|
+
return e.length === 0 ? nt(this) : Kt(this, function(t, n) {
|
|
1498
1497
|
return n.some(function(i) {
|
|
1499
1498
|
return t.indexOf(i) === 0;
|
|
1500
1499
|
});
|
|
1501
1500
|
}, e, $e);
|
|
1502
1501
|
}, oe.prototype.anyOf = function() {
|
|
1503
|
-
var e = this, t =
|
|
1502
|
+
var e = this, t = Se.apply(Qe, arguments), n = this._cmp;
|
|
1504
1503
|
try {
|
|
1505
1504
|
t.sort(n);
|
|
1506
1505
|
} catch {
|
|
1507
|
-
return
|
|
1506
|
+
return he(this, _e);
|
|
1508
1507
|
}
|
|
1509
1508
|
if (t.length === 0) return nt(this);
|
|
1510
1509
|
var i = new this.Collection(this, function() {
|
|
@@ -1523,81 +1522,81 @@ var Mr = { exports: {} };
|
|
|
1523
1522
|
}, oe.prototype.notEqual = function(e) {
|
|
1524
1523
|
return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
|
|
1525
1524
|
}, oe.prototype.noneOf = function() {
|
|
1526
|
-
var e =
|
|
1525
|
+
var e = Se.apply(Qe, arguments);
|
|
1527
1526
|
if (e.length === 0) return new this.Collection(this);
|
|
1528
1527
|
try {
|
|
1529
1528
|
e.sort(this._ascending);
|
|
1530
1529
|
} catch {
|
|
1531
|
-
return
|
|
1530
|
+
return he(this, _e);
|
|
1532
1531
|
}
|
|
1533
1532
|
var t = e.reduce(function(n, i) {
|
|
1534
1533
|
return n ? n.concat([[n[n.length - 1][1], i]]) : [[-1 / 0, i]];
|
|
1535
1534
|
}, null);
|
|
1536
1535
|
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
|
|
1537
|
-
}, oe.prototype.inAnyRange = function(
|
|
1536
|
+
}, oe.prototype.inAnyRange = function(_, t) {
|
|
1538
1537
|
var n = this, i = this._cmp, o = this._ascending, a = this._descending, c = this._min, u = this._max;
|
|
1539
|
-
if (
|
|
1540
|
-
if (!
|
|
1538
|
+
if (_.length === 0) return nt(this);
|
|
1539
|
+
if (!_.every(function(E) {
|
|
1541
1540
|
return E[0] !== void 0 && E[1] !== void 0 && o(E[0], E[1]) <= 0;
|
|
1542
|
-
})) return
|
|
1541
|
+
})) return he(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", $.InvalidArgument);
|
|
1543
1542
|
var h = !t || t.includeLowers !== !1, g = t && t.includeUppers === !0, b, f = o;
|
|
1544
|
-
function
|
|
1543
|
+
function S(E, O) {
|
|
1545
1544
|
return f(E[0], O[0]);
|
|
1546
1545
|
}
|
|
1547
1546
|
try {
|
|
1548
|
-
(b =
|
|
1547
|
+
(b = _.reduce(function(E, O) {
|
|
1549
1548
|
for (var A = 0, P = E.length; A < P; ++A) {
|
|
1550
|
-
var
|
|
1551
|
-
if (i(O[0],
|
|
1552
|
-
|
|
1549
|
+
var T = E[A];
|
|
1550
|
+
if (i(O[0], T[1]) < 0 && 0 < i(O[1], T[0])) {
|
|
1551
|
+
T[0] = c(T[0], O[0]), T[1] = u(T[1], O[1]);
|
|
1553
1552
|
break;
|
|
1554
1553
|
}
|
|
1555
1554
|
}
|
|
1556
1555
|
return A === P && E.push(O), E;
|
|
1557
|
-
}, [])).sort(
|
|
1556
|
+
}, [])).sort(S);
|
|
1558
1557
|
} catch {
|
|
1559
|
-
return
|
|
1558
|
+
return he(this, _e);
|
|
1560
1559
|
}
|
|
1561
1560
|
var p = 0, m = g ? function(E) {
|
|
1562
1561
|
return 0 < o(E, b[p][1]);
|
|
1563
1562
|
} : function(E) {
|
|
1564
1563
|
return 0 <= o(E, b[p][1]);
|
|
1565
|
-
},
|
|
1564
|
+
}, w = h ? function(E) {
|
|
1566
1565
|
return 0 < a(E, b[p][0]);
|
|
1567
1566
|
} : function(E) {
|
|
1568
1567
|
return 0 <= a(E, b[p][0]);
|
|
1569
|
-
}, y = m,
|
|
1568
|
+
}, y = m, _ = new this.Collection(this, function() {
|
|
1570
1569
|
return Ce(b[0][0], b[b.length - 1][1], !h, !g);
|
|
1571
1570
|
});
|
|
1572
|
-
return
|
|
1573
|
-
f = E === "next" ? (y = m, o) : (y =
|
|
1574
|
-
},
|
|
1575
|
-
for (var P,
|
|
1576
|
-
return !m(P =
|
|
1571
|
+
return _._ondirectionchange = function(E) {
|
|
1572
|
+
f = E === "next" ? (y = m, o) : (y = w, a), b.sort(S);
|
|
1573
|
+
}, _._addAlgorithm(function(E, O, A) {
|
|
1574
|
+
for (var P, T = E.key; y(T); ) if (++p === b.length) return O(A), !1;
|
|
1575
|
+
return !m(P = T) && !w(P) || (n._cmp(T, b[p][1]) === 0 || n._cmp(T, b[p][0]) === 0 || O(function() {
|
|
1577
1576
|
f === o ? E.continue(b[p][0]) : E.continue(b[p][1]);
|
|
1578
1577
|
}), !1);
|
|
1579
|
-
}),
|
|
1578
|
+
}), _;
|
|
1580
1579
|
}, oe.prototype.startsWithAnyOf = function() {
|
|
1581
|
-
var e =
|
|
1580
|
+
var e = Se.apply(Qe, arguments);
|
|
1582
1581
|
return e.every(function(t) {
|
|
1583
1582
|
return typeof t == "string";
|
|
1584
1583
|
}) ? e.length === 0 ? nt(this) : this.inAnyRange(e.map(function(t) {
|
|
1585
1584
|
return [t, t + $e];
|
|
1586
|
-
})) :
|
|
1585
|
+
})) : he(this, "startsWithAnyOf() only works with strings");
|
|
1587
1586
|
}, oe);
|
|
1588
1587
|
function oe() {
|
|
1589
1588
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
1589
|
+
function be(e) {
|
|
1590
|
+
return q(function(t) {
|
|
1592
1591
|
return pt(t), e(t.target.error), !1;
|
|
1593
1592
|
});
|
|
1594
1593
|
}
|
|
1595
1594
|
function pt(e) {
|
|
1596
1595
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1597
1596
|
}
|
|
1598
|
-
var gt = "storagemutated", vn = "x-storagemutated-1", Re = dt(null, gt), ci = (
|
|
1597
|
+
var gt = "storagemutated", vn = "x-storagemutated-1", Re = dt(null, gt), ci = (ve.prototype._lock = function() {
|
|
1599
1598
|
return it(!G.global), ++this._reculock, this._reculock !== 1 || G.global || (G.lockOwnerFor = this), this;
|
|
1600
|
-
},
|
|
1599
|
+
}, ve.prototype._unlock = function() {
|
|
1601
1600
|
if (it(!G.global), --this._reculock == 0) for (G.global || (G.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1602
1601
|
var e = this._blockedFuncs.shift();
|
|
1603
1602
|
try {
|
|
@@ -1606,9 +1605,9 @@ var Mr = { exports: {} };
|
|
|
1606
1605
|
}
|
|
1607
1606
|
}
|
|
1608
1607
|
return this;
|
|
1609
|
-
},
|
|
1608
|
+
}, ve.prototype._locked = function() {
|
|
1610
1609
|
return this._reculock && G.lockOwnerFor !== this;
|
|
1611
|
-
},
|
|
1610
|
+
}, ve.prototype.create = function(e) {
|
|
1612
1611
|
var t = this;
|
|
1613
1612
|
if (!this.mode) return this;
|
|
1614
1613
|
var n = this.db.idbdb, i = this.db._state.dbOpenError;
|
|
@@ -1621,14 +1620,14 @@ var Mr = { exports: {} };
|
|
|
1621
1620
|
throw new $.OpenFailed(i);
|
|
1622
1621
|
}
|
|
1623
1622
|
if (!this.active) throw new $.TransactionInactive();
|
|
1624
|
-
return it(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror =
|
|
1623
|
+
return it(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = q(function(o) {
|
|
1625
1624
|
pt(o), t._reject(e.error);
|
|
1626
|
-
}), e.onabort =
|
|
1625
|
+
}), e.onabort = q(function(o) {
|
|
1627
1626
|
pt(o), t.active && t._reject(new $.Abort(e.error)), t.active = !1, t.on("abort").fire(o);
|
|
1628
|
-
}), e.oncomplete =
|
|
1627
|
+
}), e.oncomplete = q(function() {
|
|
1629
1628
|
t.active = !1, t._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
|
|
1630
1629
|
}), this;
|
|
1631
|
-
},
|
|
1630
|
+
}, ve.prototype._promise = function(e, t, n) {
|
|
1632
1631
|
var i = this;
|
|
1633
1632
|
if (e === "readwrite" && this.mode !== "readwrite") return te(new $.ReadOnly("Transaction is readonly"));
|
|
1634
1633
|
if (!this.active) return te(new $.TransactionInactive());
|
|
@@ -1652,9 +1651,9 @@ var Mr = { exports: {} };
|
|
|
1652
1651
|
u && u.then && u.then(a, c);
|
|
1653
1652
|
});
|
|
1654
1653
|
return o._lib = !0, o;
|
|
1655
|
-
},
|
|
1654
|
+
}, ve.prototype._root = function() {
|
|
1656
1655
|
return this.parent ? this.parent._root() : this;
|
|
1657
|
-
},
|
|
1656
|
+
}, ve.prototype.waitFor = function(e) {
|
|
1658
1657
|
var t, n = this._root(), i = B.resolve(e);
|
|
1659
1658
|
n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
|
|
1660
1659
|
return i;
|
|
@@ -1665,23 +1664,23 @@ var Mr = { exports: {} };
|
|
|
1665
1664
|
var o = n._waitingFor;
|
|
1666
1665
|
return new B(function(a, c) {
|
|
1667
1666
|
i.then(function(u) {
|
|
1668
|
-
return n._waitingQueue.push(
|
|
1667
|
+
return n._waitingQueue.push(q(a.bind(null, u)));
|
|
1669
1668
|
}, function(u) {
|
|
1670
|
-
return n._waitingQueue.push(
|
|
1669
|
+
return n._waitingQueue.push(q(c.bind(null, u)));
|
|
1671
1670
|
}).finally(function() {
|
|
1672
1671
|
n._waitingFor === o && (n._waitingFor = null);
|
|
1673
1672
|
});
|
|
1674
1673
|
});
|
|
1675
|
-
},
|
|
1674
|
+
}, ve.prototype.abort = function() {
|
|
1676
1675
|
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new $.Abort()));
|
|
1677
|
-
},
|
|
1676
|
+
}, ve.prototype.table = function(e) {
|
|
1678
1677
|
var t = this._memoizedTables || (this._memoizedTables = {});
|
|
1679
|
-
if (
|
|
1678
|
+
if (ee(t, e)) return t[e];
|
|
1680
1679
|
var n = this.schema[e];
|
|
1681
1680
|
if (!n) throw new $.NotFound("Table " + e + " not part of transaction");
|
|
1682
1681
|
return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
|
|
1683
|
-
},
|
|
1684
|
-
function
|
|
1682
|
+
}, ve);
|
|
1683
|
+
function ve() {
|
|
1685
1684
|
}
|
|
1686
1685
|
function wn(e, t, n, i, o, a, c) {
|
|
1687
1686
|
return { name: e, keyPath: t, unique: n, multi: i, auto: o, compound: a, src: (n && !c ? "&" : "") + (i ? "*" : "") + (o ? "++" : "") + gr(t) };
|
|
@@ -1689,7 +1688,7 @@ var Mr = { exports: {} };
|
|
|
1689
1688
|
function gr(e) {
|
|
1690
1689
|
return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
|
|
1691
1690
|
}
|
|
1692
|
-
function
|
|
1691
|
+
function Sn(e, t, n) {
|
|
1693
1692
|
return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (i = function(o) {
|
|
1694
1693
|
return [o.name, o];
|
|
1695
1694
|
}, n.reduce(function(o, a, c) {
|
|
@@ -1708,7 +1707,7 @@ var Mr = { exports: {} };
|
|
|
1708
1707
|
}, $e;
|
|
1709
1708
|
}
|
|
1710
1709
|
};
|
|
1711
|
-
function
|
|
1710
|
+
function _n(e) {
|
|
1712
1711
|
return e == null ? function() {
|
|
1713
1712
|
} : typeof e == "string" ? (t = e).split(".").length === 1 ? function(n) {
|
|
1714
1713
|
return n[t];
|
|
@@ -1730,141 +1729,141 @@ var Mr = { exports: {} };
|
|
|
1730
1729
|
function i(y) {
|
|
1731
1730
|
if (y.type === 3) return null;
|
|
1732
1731
|
if (y.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
|
|
1733
|
-
var p = y.lower, m = y.upper,
|
|
1734
|
-
return p === void 0 ? m === void 0 ? null : t.upperBound(m, !!y) : m === void 0 ? t.lowerBound(p, !!
|
|
1732
|
+
var p = y.lower, m = y.upper, w = y.lowerOpen, y = y.upperOpen;
|
|
1733
|
+
return p === void 0 ? m === void 0 ? null : t.upperBound(m, !!y) : m === void 0 ? t.lowerBound(p, !!w) : t.bound(p, m, !!w, !!y);
|
|
1735
1734
|
}
|
|
1736
|
-
function o(
|
|
1737
|
-
var p, m =
|
|
1738
|
-
return { name: m, schema:
|
|
1739
|
-
var y =
|
|
1740
|
-
return new Promise(function(P,
|
|
1741
|
-
P =
|
|
1742
|
-
var I = y.objectStore(m), C = I.keyPath == null,
|
|
1743
|
-
if (!
|
|
1735
|
+
function o(S) {
|
|
1736
|
+
var p, m = S.name;
|
|
1737
|
+
return { name: m, schema: S, mutate: function(w) {
|
|
1738
|
+
var y = w.trans, _ = w.type, E = w.keys, O = w.values, A = w.range;
|
|
1739
|
+
return new Promise(function(P, T) {
|
|
1740
|
+
P = q(P);
|
|
1741
|
+
var I = y.objectStore(m), C = I.keyPath == null, M = _ === "put" || _ === "add";
|
|
1742
|
+
if (!M && _ !== "delete" && _ !== "deleteRange") throw new Error("Invalid operation type: " + _);
|
|
1744
1743
|
var R, L = (E || O || { length: 1 }).length;
|
|
1745
1744
|
if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1746
1745
|
if (L === 0) return P({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1747
|
-
function
|
|
1748
|
-
++
|
|
1746
|
+
function W(de) {
|
|
1747
|
+
++pe, pt(de);
|
|
1749
1748
|
}
|
|
1750
|
-
var
|
|
1751
|
-
if (
|
|
1752
|
-
if (A.type === 4) return P({ numFailures:
|
|
1753
|
-
A.type === 3 ?
|
|
1749
|
+
var z = [], H = [], pe = 0;
|
|
1750
|
+
if (_ === "deleteRange") {
|
|
1751
|
+
if (A.type === 4) return P({ numFailures: pe, failures: H, results: [], lastResult: void 0 });
|
|
1752
|
+
A.type === 3 ? z.push(R = I.clear()) : z.push(R = I.delete(i(A)));
|
|
1754
1753
|
} else {
|
|
1755
|
-
var C =
|
|
1756
|
-
if (
|
|
1757
|
-
else for (
|
|
1754
|
+
var C = M ? C ? [O, E] : [O, null] : [E, null], U = C[0], ce = C[1];
|
|
1755
|
+
if (M) for (var ue = 0; ue < L; ++ue) z.push(R = ce && ce[ue] !== void 0 ? I[_](U[ue], ce[ue]) : I[_](U[ue])), R.onerror = W;
|
|
1756
|
+
else for (ue = 0; ue < L; ++ue) z.push(R = I[_](U[ue])), R.onerror = W;
|
|
1758
1757
|
}
|
|
1759
|
-
function Jt(
|
|
1760
|
-
|
|
1761
|
-
return ze.error != null && (
|
|
1762
|
-
}), P({ numFailures:
|
|
1758
|
+
function Jt(de) {
|
|
1759
|
+
de = de.target.result, z.forEach(function(ze, Gn) {
|
|
1760
|
+
return ze.error != null && (H[Gn] = ze.error);
|
|
1761
|
+
}), P({ numFailures: pe, failures: H, results: _ === "delete" ? E : z.map(function(ze) {
|
|
1763
1762
|
return ze.result;
|
|
1764
|
-
}), lastResult:
|
|
1763
|
+
}), lastResult: de });
|
|
1765
1764
|
}
|
|
1766
|
-
R.onerror = function(
|
|
1767
|
-
|
|
1765
|
+
R.onerror = function(de) {
|
|
1766
|
+
W(de), Jt(de);
|
|
1768
1767
|
}, R.onsuccess = Jt;
|
|
1769
1768
|
});
|
|
1770
|
-
}, getMany: function(
|
|
1771
|
-
var y =
|
|
1769
|
+
}, getMany: function(w) {
|
|
1770
|
+
var y = w.trans, _ = w.keys;
|
|
1772
1771
|
return new Promise(function(E, O) {
|
|
1773
|
-
E =
|
|
1774
|
-
for (var A, P = y.objectStore(m),
|
|
1775
|
-
|
|
1776
|
-
}, L =
|
|
1772
|
+
E = q(E);
|
|
1773
|
+
for (var A, P = y.objectStore(m), T = _.length, I = new Array(T), C = 0, M = 0, R = function(z) {
|
|
1774
|
+
z = z.target, I[z._pos] = z.result, ++M === C && E(I);
|
|
1775
|
+
}, L = be(O), W = 0; W < T; ++W) _[W] != null && ((A = P.get(_[W]))._pos = W, A.onsuccess = R, A.onerror = L, ++C);
|
|
1777
1776
|
C === 0 && E(I);
|
|
1778
1777
|
});
|
|
1779
|
-
}, get: function(
|
|
1780
|
-
var y =
|
|
1778
|
+
}, get: function(w) {
|
|
1779
|
+
var y = w.trans, _ = w.key;
|
|
1781
1780
|
return new Promise(function(E, O) {
|
|
1782
|
-
E =
|
|
1783
|
-
var A = y.objectStore(m).get(
|
|
1781
|
+
E = q(E);
|
|
1782
|
+
var A = y.objectStore(m).get(_);
|
|
1784
1783
|
A.onsuccess = function(P) {
|
|
1785
1784
|
return E(P.target.result);
|
|
1786
|
-
}, A.onerror =
|
|
1785
|
+
}, A.onerror = be(O);
|
|
1787
1786
|
});
|
|
1788
|
-
}, query: (p = g, function(
|
|
1789
|
-
return new Promise(function(y,
|
|
1790
|
-
y =
|
|
1791
|
-
var E, O, A, C =
|
|
1792
|
-
if (
|
|
1793
|
-
p ? ((I = P ?
|
|
1787
|
+
}, query: (p = g, function(w) {
|
|
1788
|
+
return new Promise(function(y, _) {
|
|
1789
|
+
y = q(y);
|
|
1790
|
+
var E, O, A, C = w.trans, P = w.values, T = w.limit, R = w.query, I = T === 1 / 0 ? void 0 : T, M = R.index, R = R.range, C = C.objectStore(m), M = M.isPrimaryKey ? C : C.index(M.name), R = i(R);
|
|
1791
|
+
if (T === 0) return y({ result: [] });
|
|
1792
|
+
p ? ((I = P ? M.getAll(R, I) : M.getAllKeys(R, I)).onsuccess = function(L) {
|
|
1794
1793
|
return y({ result: L.target.result });
|
|
1795
|
-
}, I.onerror =
|
|
1796
|
-
var
|
|
1797
|
-
return
|
|
1798
|
-
}, O.onerror =
|
|
1794
|
+
}, I.onerror = be(_)) : (E = 0, O = !P && "openKeyCursor" in M ? M.openKeyCursor(R) : M.openCursor(R), A = [], O.onsuccess = function(L) {
|
|
1795
|
+
var W = O.result;
|
|
1796
|
+
return W ? (A.push(P ? W.value : W.primaryKey), ++E === T ? y({ result: A }) : void W.continue()) : y({ result: A });
|
|
1797
|
+
}, O.onerror = be(_));
|
|
1799
1798
|
});
|
|
1800
|
-
}), openCursor: function(
|
|
1801
|
-
var y =
|
|
1802
|
-
return new Promise(function(P,
|
|
1803
|
-
P =
|
|
1804
|
-
var
|
|
1805
|
-
R.onerror =
|
|
1806
|
-
var
|
|
1807
|
-
|
|
1799
|
+
}), openCursor: function(w) {
|
|
1800
|
+
var y = w.trans, _ = w.values, E = w.query, O = w.reverse, A = w.unique;
|
|
1801
|
+
return new Promise(function(P, T) {
|
|
1802
|
+
P = q(P);
|
|
1803
|
+
var M = E.index, I = E.range, C = y.objectStore(m), C = M.isPrimaryKey ? C : C.index(M.name), M = O ? A ? "prevunique" : "prev" : A ? "nextunique" : "next", R = !_ && "openKeyCursor" in C ? C.openKeyCursor(i(I), M) : C.openCursor(i(I), M);
|
|
1804
|
+
R.onerror = be(T), R.onsuccess = q(function(L) {
|
|
1805
|
+
var W, z, H, pe, U = R.result;
|
|
1806
|
+
U ? (U.___id = ++ui, U.done = !1, W = U.continue.bind(U), z = (z = U.continuePrimaryKey) && z.bind(U), H = U.advance.bind(U), pe = function() {
|
|
1808
1807
|
throw new Error("Cursor not stopped");
|
|
1809
|
-
},
|
|
1808
|
+
}, U.trans = y, U.stop = U.continue = U.continuePrimaryKey = U.advance = function() {
|
|
1810
1809
|
throw new Error("Cursor not started");
|
|
1811
|
-
},
|
|
1812
|
-
var
|
|
1810
|
+
}, U.fail = q(T), U.next = function() {
|
|
1811
|
+
var ce = this, ue = 1;
|
|
1813
1812
|
return this.start(function() {
|
|
1814
|
-
return
|
|
1813
|
+
return ue-- ? ce.continue() : ce.stop();
|
|
1815
1814
|
}).then(function() {
|
|
1816
|
-
return
|
|
1815
|
+
return ce;
|
|
1817
1816
|
});
|
|
1818
|
-
},
|
|
1819
|
-
function
|
|
1817
|
+
}, U.start = function(ce) {
|
|
1818
|
+
function ue() {
|
|
1820
1819
|
if (R.result) try {
|
|
1821
|
-
|
|
1822
|
-
} catch (
|
|
1823
|
-
|
|
1820
|
+
ce();
|
|
1821
|
+
} catch (de) {
|
|
1822
|
+
U.fail(de);
|
|
1824
1823
|
}
|
|
1825
|
-
else
|
|
1824
|
+
else U.done = !0, U.start = function() {
|
|
1826
1825
|
throw new Error("Cursor behind last entry");
|
|
1827
|
-
},
|
|
1826
|
+
}, U.stop();
|
|
1828
1827
|
}
|
|
1829
|
-
var Jt = new Promise(function(
|
|
1830
|
-
|
|
1831
|
-
|
|
1828
|
+
var Jt = new Promise(function(de, ze) {
|
|
1829
|
+
de = q(de), R.onerror = be(ze), U.fail = ze, U.stop = function(Gn) {
|
|
1830
|
+
U.stop = U.continue = U.continuePrimaryKey = U.advance = pe, de(Gn);
|
|
1832
1831
|
};
|
|
1833
1832
|
});
|
|
1834
|
-
return R.onsuccess =
|
|
1835
|
-
R.onsuccess =
|
|
1836
|
-
}),
|
|
1837
|
-
}, P(
|
|
1838
|
-
},
|
|
1833
|
+
return R.onsuccess = q(function(de) {
|
|
1834
|
+
R.onsuccess = ue, ue();
|
|
1835
|
+
}), U.continue = W, U.continuePrimaryKey = z, U.advance = H, ue(), Jt;
|
|
1836
|
+
}, P(U)) : P(null);
|
|
1837
|
+
}, T);
|
|
1839
1838
|
});
|
|
1840
|
-
}, count: function(
|
|
1841
|
-
var y =
|
|
1839
|
+
}, count: function(w) {
|
|
1840
|
+
var y = w.query, _ = w.trans, E = y.index, O = y.range;
|
|
1842
1841
|
return new Promise(function(A, P) {
|
|
1843
|
-
var
|
|
1844
|
-
I.onsuccess =
|
|
1842
|
+
var T = _.objectStore(m), I = E.isPrimaryKey ? T : T.index(E.name), T = i(O), I = T ? I.count(T) : I.count();
|
|
1843
|
+
I.onsuccess = q(function(C) {
|
|
1845
1844
|
return A(C.target.result);
|
|
1846
|
-
}), I.onerror =
|
|
1845
|
+
}), I.onerror = be(P);
|
|
1847
1846
|
});
|
|
1848
1847
|
} };
|
|
1849
1848
|
}
|
|
1850
|
-
var a, c, u, b = (c = h, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(
|
|
1851
|
-
return c.objectStore(
|
|
1852
|
-
}).map(function(
|
|
1853
|
-
var p =
|
|
1854
|
-
return
|
|
1849
|
+
var a, c, u, b = (c = h, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(S) {
|
|
1850
|
+
return c.objectStore(S);
|
|
1851
|
+
}).map(function(S) {
|
|
1852
|
+
var p = S.keyPath, y = S.autoIncrement, m = F(p), w = {}, y = { name: S.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: _n(p) }, indexes: yr(S.indexNames).map(function(_) {
|
|
1853
|
+
return S.index(_);
|
|
1855
1854
|
}).map(function(A) {
|
|
1856
|
-
var E = A.name, O = A.unique, P = A.multiEntry, A = A.keyPath, P = { name: E, compound:
|
|
1857
|
-
return
|
|
1858
|
-
}), getIndexByKeyPath: function(
|
|
1859
|
-
return
|
|
1855
|
+
var E = A.name, O = A.unique, P = A.multiEntry, A = A.keyPath, P = { name: E, compound: F(A), keyPath: A, unique: O, multiEntry: P, extractKey: _n(A) };
|
|
1856
|
+
return w[mt(A)] = P;
|
|
1857
|
+
}), getIndexByKeyPath: function(_) {
|
|
1858
|
+
return w[mt(_)];
|
|
1860
1859
|
} };
|
|
1861
|
-
return
|
|
1860
|
+
return w[":id"] = y.primaryKey, p != null && (w[mt(p)] = y.primaryKey), y;
|
|
1862
1861
|
}) }, hasGetAll: 0 < u.length && "getAll" in c.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = b.schema, g = b.hasGetAll, b = h.tables.map(o), f = {};
|
|
1863
|
-
return b.forEach(function(
|
|
1864
|
-
return f[
|
|
1865
|
-
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(
|
|
1866
|
-
if (!f[
|
|
1867
|
-
return f[
|
|
1862
|
+
return b.forEach(function(S) {
|
|
1863
|
+
return f[S.name] = S;
|
|
1864
|
+
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(S) {
|
|
1865
|
+
if (!f[S]) throw new Error("Table '".concat(S, "' not found"));
|
|
1866
|
+
return f[S];
|
|
1868
1867
|
}, MIN_KEY: -1 / 0, MAX_KEY: yt(t), schema: h };
|
|
1869
1868
|
}
|
|
1870
1869
|
function di(e, t, n, i) {
|
|
@@ -1887,7 +1886,7 @@ var Mr = { exports: {} };
|
|
|
1887
1886
|
var a = i[o];
|
|
1888
1887
|
t.forEach(function(c) {
|
|
1889
1888
|
var u = function h(g, b) {
|
|
1890
|
-
return Fr(g, b) || (g =
|
|
1889
|
+
return Fr(g, b) || (g = X(g)) && h(g, b);
|
|
1891
1890
|
}(c, o);
|
|
1892
1891
|
(!u || "value" in u && u.value === void 0) && (c === e.Transaction.prototype || c instanceof e.Transaction ? Ae(c, o, { get: function() {
|
|
1893
1892
|
return this.table(o);
|
|
@@ -1907,7 +1906,7 @@ var Mr = { exports: {} };
|
|
|
1907
1906
|
}
|
|
1908
1907
|
function hi(e, t, n, i) {
|
|
1909
1908
|
var o = e._dbSchema;
|
|
1910
|
-
n.objectStoreNames.contains("$meta") && !o.$meta && (o.$meta =
|
|
1909
|
+
n.objectStoreNames.contains("$meta") && !o.$meta && (o.$meta = Sn("$meta", br("")[0], []), e._storeNames.push("$meta"));
|
|
1911
1910
|
var a = e._createTransaction("readwrite", e._storeNames, o);
|
|
1912
1911
|
a.create(n), a._completion.catch(i);
|
|
1913
1912
|
var c = a._reject.bind(a), u = G.transless || G;
|
|
@@ -1915,58 +1914,58 @@ var Mr = { exports: {} };
|
|
|
1915
1914
|
return G.trans = a, G.transless = u, t !== 0 ? (Bt(e, n), g = t, ((h = a).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(b) {
|
|
1916
1915
|
return b ?? g;
|
|
1917
1916
|
}) : B.resolve(g)).then(function(b) {
|
|
1918
|
-
return
|
|
1919
|
-
return
|
|
1920
|
-
})).length !== 0 ? (b.forEach(function(
|
|
1921
|
-
|
|
1922
|
-
var E = y, O =
|
|
1917
|
+
return S = b, p = a, m = n, w = [], b = (f = e)._versions, y = f._dbSchema = $t(0, f.idbdb, m), (b = b.filter(function(_) {
|
|
1918
|
+
return _._cfg.version >= S;
|
|
1919
|
+
})).length !== 0 ? (b.forEach(function(_) {
|
|
1920
|
+
w.push(function() {
|
|
1921
|
+
var E = y, O = _._cfg.dbschema;
|
|
1923
1922
|
Ft(f, E, m), Ft(f, O, m), y = f._dbSchema = O;
|
|
1924
1923
|
var A = On(E, O);
|
|
1925
|
-
A.add.forEach(function(
|
|
1926
|
-
xn(m,
|
|
1927
|
-
}), A.change.forEach(function(
|
|
1928
|
-
if (
|
|
1929
|
-
var R = m.objectStore(
|
|
1930
|
-
|
|
1924
|
+
A.add.forEach(function(M) {
|
|
1925
|
+
xn(m, M[0], M[1].primKey, M[1].indexes);
|
|
1926
|
+
}), A.change.forEach(function(M) {
|
|
1927
|
+
if (M.recreate) throw new $.Upgrade("Not yet support for changing primary key");
|
|
1928
|
+
var R = m.objectStore(M.name);
|
|
1929
|
+
M.add.forEach(function(L) {
|
|
1931
1930
|
return Gt(R, L);
|
|
1932
|
-
}),
|
|
1931
|
+
}), M.change.forEach(function(L) {
|
|
1933
1932
|
R.deleteIndex(L.name), Gt(R, L);
|
|
1934
|
-
}),
|
|
1933
|
+
}), M.del.forEach(function(L) {
|
|
1935
1934
|
return R.deleteIndex(L);
|
|
1936
1935
|
});
|
|
1937
1936
|
});
|
|
1938
|
-
var P =
|
|
1939
|
-
if (P &&
|
|
1937
|
+
var P = _._cfg.contentUpgrade;
|
|
1938
|
+
if (P && _._cfg.version > S) {
|
|
1940
1939
|
Bt(f, m), p._memoizedTables = {};
|
|
1941
|
-
var
|
|
1942
|
-
A.del.forEach(function(
|
|
1943
|
-
M
|
|
1944
|
-
}), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], T
|
|
1940
|
+
var T = Yn(O);
|
|
1941
|
+
A.del.forEach(function(M) {
|
|
1942
|
+
T[M] = E[M];
|
|
1943
|
+
}), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], j(T), T), p.schema = T;
|
|
1945
1944
|
var I, C = nn(P);
|
|
1946
1945
|
return C && qe(), A = B.follow(function() {
|
|
1947
|
-
var
|
|
1948
|
-
(I = P(p)) && C && (
|
|
1946
|
+
var M;
|
|
1947
|
+
(I = P(p)) && C && (M = Pe.bind(null, null), I.then(M, M));
|
|
1949
1948
|
}), I && typeof I.then == "function" ? B.resolve(I) : A.then(function() {
|
|
1950
1949
|
return I;
|
|
1951
1950
|
});
|
|
1952
1951
|
}
|
|
1953
|
-
}),
|
|
1954
|
-
var O, A, P =
|
|
1955
|
-
O = P, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(
|
|
1956
|
-
return O[
|
|
1952
|
+
}), w.push(function(E) {
|
|
1953
|
+
var O, A, P = _._cfg.dbschema;
|
|
1954
|
+
O = P, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(T) {
|
|
1955
|
+
return O[T] == null && A.db.deleteObjectStore(T);
|
|
1957
1956
|
}), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), p.schema = f._dbSchema;
|
|
1958
|
-
}),
|
|
1959
|
-
f.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(f.idbdb.version / 10) ===
|
|
1957
|
+
}), w.push(function(E) {
|
|
1958
|
+
f.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(f.idbdb.version / 10) === _._cfg.version ? (f.idbdb.deleteObjectStore("$meta"), delete f._dbSchema.$meta, f._storeNames = f._storeNames.filter(function(O) {
|
|
1960
1959
|
return O !== "$meta";
|
|
1961
|
-
})) : E.objectStore("$meta").put(
|
|
1960
|
+
})) : E.objectStore("$meta").put(_._cfg.version, "version"));
|
|
1962
1961
|
});
|
|
1963
|
-
}), function
|
|
1964
|
-
return
|
|
1962
|
+
}), function _() {
|
|
1963
|
+
return w.length ? B.resolve(w.shift()(p.idbtrans)).then(_) : B.resolve();
|
|
1965
1964
|
}().then(function() {
|
|
1966
1965
|
mr(y, m);
|
|
1967
1966
|
})) : B.resolve();
|
|
1968
|
-
var f,
|
|
1969
|
-
}).catch(c)) : (
|
|
1967
|
+
var f, S, p, m, w, y;
|
|
1968
|
+
}).catch(c)) : (j(o).forEach(function(b) {
|
|
1970
1969
|
xn(n, b, o[b].primKey, o[b].indexes);
|
|
1971
1970
|
}), Bt(e, n), void B.follow(function() {
|
|
1972
1971
|
return e.on.populate.fire(a);
|
|
@@ -1983,7 +1982,7 @@ var Mr = { exports: {} };
|
|
|
1983
1982
|
if (c.change.length || c.recreate) return console.warn("Unable to patch indexes of table ".concat(c.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
1984
1983
|
var u = t.objectStore(c.name);
|
|
1985
1984
|
c.add.forEach(function(h) {
|
|
1986
|
-
|
|
1985
|
+
me && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(h.src)), Gt(u, h);
|
|
1987
1986
|
});
|
|
1988
1987
|
}(o[i]);
|
|
1989
1988
|
if (typeof a == "object") return a.value;
|
|
@@ -2017,8 +2016,8 @@ var Mr = { exports: {} };
|
|
|
2017
2016
|
}), o;
|
|
2018
2017
|
}
|
|
2019
2018
|
function mr(e, t) {
|
|
2020
|
-
|
|
2021
|
-
t.db.objectStoreNames.contains(n) || (
|
|
2019
|
+
j(e).forEach(function(n) {
|
|
2020
|
+
t.db.objectStoreNames.contains(n) || (me && console.debug("Dexie: Creating missing table", n), xn(t, n, e[n].primKey, e[n].indexes));
|
|
2022
2021
|
});
|
|
2023
2022
|
}
|
|
2024
2023
|
function Gt(e, t) {
|
|
@@ -2026,12 +2025,12 @@ var Mr = { exports: {} };
|
|
|
2026
2025
|
}
|
|
2027
2026
|
function $t(e, t, n) {
|
|
2028
2027
|
var i = {};
|
|
2029
|
-
return
|
|
2028
|
+
return _t(t.objectStoreNames, 0).forEach(function(o) {
|
|
2030
2029
|
for (var a = n.objectStore(o), c = wn(gr(g = a.keyPath), g || "", !0, !1, !!a.autoIncrement, g && typeof g != "string", !0), u = [], h = 0; h < a.indexNames.length; ++h) {
|
|
2031
2030
|
var b = a.index(a.indexNames[h]), g = b.keyPath, b = wn(b.name, g, !!b.unique, !!b.multiEntry, !1, g && typeof g != "string", !1);
|
|
2032
2031
|
u.push(b);
|
|
2033
2032
|
}
|
|
2034
|
-
i[o] =
|
|
2033
|
+
i[o] = Sn(o, c, u);
|
|
2035
2034
|
}), i;
|
|
2036
2035
|
}
|
|
2037
2036
|
function Ft(e, t, n) {
|
|
@@ -2039,7 +2038,7 @@ var Mr = { exports: {} };
|
|
|
2039
2038
|
var a = i[o], c = n.objectStore(a);
|
|
2040
2039
|
e._hasGetAll = "getAll" in c;
|
|
2041
2040
|
for (var u = 0; u < c.indexNames.length; ++u) {
|
|
2042
|
-
var h = c.indexNames[u], g = c.index(h).keyPath, b = typeof g == "string" ? g : "[" +
|
|
2041
|
+
var h = c.indexNames[u], g = c.index(h).keyPath, b = typeof g == "string" ? g : "[" + _t(g).join("+") + "]";
|
|
2043
2042
|
!t[a] || (g = t[a].idxByName[b]) && (g.name = h, delete t[a].idxByName[b], t[a].idxByName[h] = g);
|
|
2044
2043
|
}
|
|
2045
2044
|
}
|
|
@@ -2048,35 +2047,35 @@ var Mr = { exports: {} };
|
|
|
2048
2047
|
function br(e) {
|
|
2049
2048
|
return e.split(",").map(function(t, n) {
|
|
2050
2049
|
var i = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(i) ? i.match(/^\[(.*)\]$/)[1].split("+") : i;
|
|
2051
|
-
return wn(i, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t),
|
|
2050
|
+
return wn(i, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), F(o), n === 0);
|
|
2052
2051
|
});
|
|
2053
2052
|
}
|
|
2054
2053
|
var gi = (Ut.prototype._parseStoresSpec = function(e, t) {
|
|
2055
|
-
|
|
2054
|
+
j(e).forEach(function(n) {
|
|
2056
2055
|
if (e[n] !== null) {
|
|
2057
2056
|
var i = br(e[n]), o = i.shift();
|
|
2058
2057
|
if (o.unique = !0, o.multi) throw new $.Schema("Primary key cannot be multi-valued");
|
|
2059
2058
|
i.forEach(function(a) {
|
|
2060
2059
|
if (a.auto) throw new $.Schema("Only primary key can be marked as autoIncrement (++)");
|
|
2061
2060
|
if (!a.keyPath) throw new $.Schema("Index must have a name and cannot be an empty string");
|
|
2062
|
-
}), t[n] =
|
|
2061
|
+
}), t[n] = Sn(n, o, i);
|
|
2063
2062
|
}
|
|
2064
2063
|
});
|
|
2065
2064
|
}, Ut.prototype.stores = function(n) {
|
|
2066
2065
|
var t = this.db;
|
|
2067
|
-
this._cfg.storesSource = this._cfg.storesSource ?
|
|
2066
|
+
this._cfg.storesSource = this._cfg.storesSource ? N(this._cfg.storesSource, n) : n;
|
|
2068
2067
|
var n = t._versions, i = {}, o = {};
|
|
2069
2068
|
return n.forEach(function(a) {
|
|
2070
|
-
|
|
2071
|
-
}), t._dbSchema = o, En(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables],
|
|
2069
|
+
N(i, a._cfg.storesSource), o = a._cfg.dbschema = {}, a._parseStoresSpec(i, o);
|
|
2070
|
+
}), t._dbSchema = o, En(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], j(o), o), t._storeNames = j(o), this;
|
|
2072
2071
|
}, Ut.prototype.upgrade = function(e) {
|
|
2073
|
-
return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade ||
|
|
2072
|
+
return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || J, e), this;
|
|
2074
2073
|
}, Ut);
|
|
2075
2074
|
function Ut() {
|
|
2076
2075
|
}
|
|
2077
2076
|
function An(e, t) {
|
|
2078
2077
|
var n = e._dbNamesDB;
|
|
2079
|
-
return n || (n = e._dbNamesDB = new Oe(
|
|
2078
|
+
return n || (n = e._dbNamesDB = new Oe(Tt, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
|
|
2080
2079
|
}
|
|
2081
2080
|
function kn(e) {
|
|
2082
2081
|
return e && typeof e.databases == "function";
|
|
@@ -2089,22 +2088,22 @@ var Mr = { exports: {} };
|
|
|
2089
2088
|
function Pn(e) {
|
|
2090
2089
|
return !("from" in e);
|
|
2091
2090
|
}
|
|
2092
|
-
var
|
|
2091
|
+
var se = function(e, t) {
|
|
2093
2092
|
if (!this) {
|
|
2094
|
-
var n = new
|
|
2095
|
-
return e && "d" in e &&
|
|
2093
|
+
var n = new se();
|
|
2094
|
+
return e && "d" in e && N(n, e), n;
|
|
2096
2095
|
}
|
|
2097
|
-
|
|
2096
|
+
N(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
|
|
2098
2097
|
};
|
|
2099
2098
|
function bt(e, t, n) {
|
|
2100
|
-
var i =
|
|
2099
|
+
var i = Y(t, n);
|
|
2101
2100
|
if (!isNaN(i)) {
|
|
2102
2101
|
if (0 < i) throw RangeError();
|
|
2103
|
-
if (Pn(e)) return
|
|
2102
|
+
if (Pn(e)) return N(e, { from: t, to: n, d: 1 });
|
|
2104
2103
|
var o = e.l, i = e.r;
|
|
2105
|
-
if (
|
|
2106
|
-
if (0 <
|
|
2107
|
-
|
|
2104
|
+
if (Y(n, e.from) < 0) return o ? bt(o, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, wr(e);
|
|
2105
|
+
if (0 < Y(t, e.to)) return i ? bt(i, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, wr(e);
|
|
2106
|
+
Y(t, e.from) < 0 && (e.from = t, e.l = null, e.d = i ? i.d + 1 : 1), 0 < Y(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, o && !e.l && vt(e, o), i && n && vt(e, i);
|
|
2108
2107
|
}
|
|
2109
2108
|
}
|
|
2110
2109
|
function vt(e, t) {
|
|
@@ -2117,8 +2116,8 @@ var Mr = { exports: {} };
|
|
|
2117
2116
|
var n = Wt(t), i = n.next();
|
|
2118
2117
|
if (i.done) return !1;
|
|
2119
2118
|
for (var o = i.value, a = Wt(e), c = a.next(o.from), u = c.value; !i.done && !c.done; ) {
|
|
2120
|
-
if (
|
|
2121
|
-
|
|
2119
|
+
if (Y(u.from, o.to) <= 0 && 0 <= Y(u.to, o.from)) return !0;
|
|
2120
|
+
Y(o.from, u.from) < 0 ? o = (i = n.next(u.from)).value : u = (c = a.next(o.from)).value;
|
|
2122
2121
|
}
|
|
2123
2122
|
return !1;
|
|
2124
2123
|
}
|
|
@@ -2127,10 +2126,10 @@ var Mr = { exports: {} };
|
|
|
2127
2126
|
return { next: function(n) {
|
|
2128
2127
|
for (var i = 0 < arguments.length; t; ) switch (t.s) {
|
|
2129
2128
|
case 0:
|
|
2130
|
-
if (t.s = 1, i) for (; t.n.l &&
|
|
2129
|
+
if (t.s = 1, i) for (; t.n.l && Y(n, t.n.from) < 0; ) t = { up: t, n: t.n.l, s: 1 };
|
|
2131
2130
|
else for (; t.n.l; ) t = { up: t, n: t.n.l, s: 1 };
|
|
2132
2131
|
case 1:
|
|
2133
|
-
if (t.s = 2, !i ||
|
|
2132
|
+
if (t.s = 2, !i || Y(n, t.n.to) <= 0) return { value: t.n, done: !1 };
|
|
2134
2133
|
case 2:
|
|
2135
2134
|
if (t.n.r) {
|
|
2136
2135
|
t.s = 3, t = { up: t, n: t.n.r, s: 0 };
|
|
@@ -2144,17 +2143,17 @@ var Mr = { exports: {} };
|
|
|
2144
2143
|
}
|
|
2145
2144
|
function wr(e) {
|
|
2146
2145
|
var t, n, i = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), o = 1 < i ? "r" : i < -1 ? "l" : "";
|
|
2147
|
-
o && (t = o == "r" ? "l" : "r", n = l({}, e), i = e[o], e.from = i.from, e.to = i.to, e[o] = i[o], n[o] = i[t], (e[t] = n).d =
|
|
2146
|
+
o && (t = o == "r" ? "l" : "r", n = l({}, e), i = e[o], e.from = i.from, e.to = i.to, e[o] = i[o], n[o] = i[t], (e[t] = n).d = Sr(n)), e.d = Sr(e);
|
|
2148
2147
|
}
|
|
2149
|
-
function
|
|
2148
|
+
function Sr(n) {
|
|
2150
2149
|
var t = n.r, n = n.l;
|
|
2151
2150
|
return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
|
|
2152
2151
|
}
|
|
2153
2152
|
function zt(e, t) {
|
|
2154
|
-
return
|
|
2153
|
+
return j(t).forEach(function(n) {
|
|
2155
2154
|
e[n] ? vt(e[n], t[n]) : e[n] = function i(o) {
|
|
2156
2155
|
var a, c, u = {};
|
|
2157
|
-
for (a in o)
|
|
2156
|
+
for (a in o) ee(o, a) && (c = o[a], u[a] = !c || typeof c != "object" || Xn.has(c.constructor) ? c : i(c));
|
|
2158
2157
|
return u;
|
|
2159
2158
|
}(t[n]);
|
|
2160
2159
|
}), e;
|
|
@@ -2164,7 +2163,7 @@ var Mr = { exports: {} };
|
|
|
2164
2163
|
return t[n] && vr(t[n], e[n]);
|
|
2165
2164
|
});
|
|
2166
2165
|
}
|
|
2167
|
-
|
|
2166
|
+
le(se.prototype, ((ge = { add: function(e) {
|
|
2168
2167
|
return vt(this, e), this;
|
|
2169
2168
|
}, addKey: function(e) {
|
|
2170
2169
|
return bt(this, e, e), this;
|
|
@@ -2175,40 +2174,40 @@ var Mr = { exports: {} };
|
|
|
2175
2174
|
}), this;
|
|
2176
2175
|
}, hasKey: function(e) {
|
|
2177
2176
|
var t = Wt(this).next(e).value;
|
|
2178
|
-
return t &&
|
|
2177
|
+
return t && Y(t.from, e) <= 0 && 0 <= Y(t.to, e);
|
|
2179
2178
|
} })[tn] = function() {
|
|
2180
2179
|
return Wt(this);
|
|
2181
|
-
},
|
|
2180
|
+
}, ge));
|
|
2182
2181
|
var Ue = {}, Cn = {}, Rn = !1;
|
|
2183
2182
|
function Ht(e) {
|
|
2184
2183
|
zt(Cn, e), Rn || (Rn = !0, setTimeout(function() {
|
|
2185
|
-
Rn = !1,
|
|
2184
|
+
Rn = !1, Tn(Cn, !(Cn = {}));
|
|
2186
2185
|
}, 0));
|
|
2187
2186
|
}
|
|
2188
|
-
function
|
|
2187
|
+
function Tn(e, t) {
|
|
2189
2188
|
t === void 0 && (t = !1);
|
|
2190
2189
|
var n = /* @__PURE__ */ new Set();
|
|
2191
|
-
if (e.all) for (var i = 0, o = Object.values(Ue); i < o.length; i++)
|
|
2190
|
+
if (e.all) for (var i = 0, o = Object.values(Ue); i < o.length; i++) _r(c = o[i], e, n, t);
|
|
2192
2191
|
else for (var a in e) {
|
|
2193
2192
|
var c, u = /^idb\:\/\/(.*)\/(.*)\//.exec(a);
|
|
2194
|
-
u && (a = u[1], u = u[2], (c = Ue["idb://".concat(a, "/").concat(u)]) &&
|
|
2193
|
+
u && (a = u[1], u = u[2], (c = Ue["idb://".concat(a, "/").concat(u)]) && _r(c, e, n, t));
|
|
2195
2194
|
}
|
|
2196
2195
|
n.forEach(function(h) {
|
|
2197
2196
|
return h();
|
|
2198
2197
|
});
|
|
2199
2198
|
}
|
|
2200
|
-
function
|
|
2199
|
+
function _r(e, t, n, i) {
|
|
2201
2200
|
for (var o = [], a = 0, c = Object.entries(e.queries.query); a < c.length; a++) {
|
|
2202
2201
|
for (var u = c[a], h = u[0], g = [], b = 0, f = u[1]; b < f.length; b++) {
|
|
2203
|
-
var
|
|
2204
|
-
In(t,
|
|
2202
|
+
var S = f[b];
|
|
2203
|
+
In(t, S.obsSet) ? S.subscribers.forEach(function(y) {
|
|
2205
2204
|
return n.add(y);
|
|
2206
|
-
}) : i && g.push(
|
|
2205
|
+
}) : i && g.push(S);
|
|
2207
2206
|
}
|
|
2208
2207
|
i && o.push([h, g]);
|
|
2209
2208
|
}
|
|
2210
2209
|
if (i) for (var p = 0, m = o; p < m.length; p++) {
|
|
2211
|
-
var
|
|
2210
|
+
var w = m[p], h = w[0], g = w[1];
|
|
2212
2211
|
e.queries.query[h] = g;
|
|
2213
2212
|
}
|
|
2214
2213
|
}
|
|
@@ -2223,48 +2222,48 @@ var Mr = { exports: {} };
|
|
|
2223
2222
|
if (t.openCanceller !== i) throw new $.DatabaseClosed("db.open() was cancelled");
|
|
2224
2223
|
}
|
|
2225
2224
|
function u() {
|
|
2226
|
-
return new B(function(
|
|
2225
|
+
return new B(function(S, p) {
|
|
2227
2226
|
if (c(), !n) throw new $.MissingAPI();
|
|
2228
|
-
var m = e.name,
|
|
2229
|
-
if (!
|
|
2230
|
-
|
|
2231
|
-
var
|
|
2232
|
-
b =
|
|
2227
|
+
var m = e.name, w = t.autoSchema || !o ? n.open(m) : n.open(m, o);
|
|
2228
|
+
if (!w) throw new $.MissingAPI();
|
|
2229
|
+
w.onerror = be(p), w.onblocked = q(e._fireOnBlocked), w.onupgradeneeded = q(function(y) {
|
|
2230
|
+
var _;
|
|
2231
|
+
b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (_ = n.deleteDatabase(m)).onsuccess = _.onerror = q(function() {
|
|
2233
2232
|
p(new $.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
|
|
2234
|
-
})) : (b.onerror =
|
|
2235
|
-
}, p),
|
|
2233
|
+
})) : (b.onerror = be(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, f = y < 1, e.idbdb = w.result, a && pi(e, b), hi(e, y / 10, b, p));
|
|
2234
|
+
}, p), w.onsuccess = q(function() {
|
|
2236
2235
|
b = null;
|
|
2237
|
-
var y,
|
|
2238
|
-
if (0 <
|
|
2239
|
-
var I = P.transaction((O =
|
|
2240
|
-
if (t.autoSchema)
|
|
2236
|
+
var y, _, E, O, A, P = e.idbdb = w.result, T = _t(P.objectStoreNames);
|
|
2237
|
+
if (0 < T.length) try {
|
|
2238
|
+
var I = P.transaction((O = T).length === 1 ? O[0] : O, "readonly");
|
|
2239
|
+
if (t.autoSchema) _ = P, E = I, (y = e).verno = _.version / 10, E = y._dbSchema = $t(0, _, E), y._storeNames = _t(_.objectStoreNames, 0), Lt(y, [y._allTables], j(E), E);
|
|
2241
2240
|
else if (Ft(e, e._dbSchema, I), ((A = On($t(0, (A = e).idbdb, I), A._dbSchema)).add.length || A.change.some(function(C) {
|
|
2242
2241
|
return C.add.length || C.change.length;
|
|
2243
|
-
})) && !a) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), P.close(), o = P.version + 1, a = !0,
|
|
2242
|
+
})) && !a) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), P.close(), o = P.version + 1, a = !0, S(u());
|
|
2244
2243
|
Bt(e, I);
|
|
2245
2244
|
} catch {
|
|
2246
2245
|
}
|
|
2247
|
-
et.push(e), P.onversionchange =
|
|
2246
|
+
et.push(e), P.onversionchange = q(function(C) {
|
|
2248
2247
|
t.vcFired = !0, e.on("versionchange").fire(C);
|
|
2249
|
-
}), P.onclose =
|
|
2248
|
+
}), P.onclose = q(function(C) {
|
|
2250
2249
|
e.on("close").fire(C);
|
|
2251
|
-
}), f && (A = e._deps, I = m, P = A.indexedDB, A = A.IDBKeyRange, kn(P) || I ===
|
|
2250
|
+
}), f && (A = e._deps, I = m, P = A.indexedDB, A = A.IDBKeyRange, kn(P) || I === Tt || An(P, A).put({ name: I }).catch(J)), S();
|
|
2252
2251
|
}, p);
|
|
2253
|
-
}).catch(function(
|
|
2254
|
-
switch (
|
|
2252
|
+
}).catch(function(S) {
|
|
2253
|
+
switch (S == null ? void 0 : S.name) {
|
|
2255
2254
|
case "UnknownError":
|
|
2256
2255
|
if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), u();
|
|
2257
2256
|
break;
|
|
2258
2257
|
case "VersionError":
|
|
2259
2258
|
if (0 < o) return o = 0, u();
|
|
2260
2259
|
}
|
|
2261
|
-
return B.reject(
|
|
2260
|
+
return B.reject(S);
|
|
2262
2261
|
});
|
|
2263
2262
|
}
|
|
2264
2263
|
var h, g = t.dbReadyResolve, b = null, f = !1;
|
|
2265
|
-
return B.race([i, (typeof navigator > "u" ? B.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(
|
|
2264
|
+
return B.race([i, (typeof navigator > "u" ? B.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(S) {
|
|
2266
2265
|
function p() {
|
|
2267
|
-
return indexedDB.databases().finally(
|
|
2266
|
+
return indexedDB.databases().finally(S);
|
|
2268
2267
|
}
|
|
2269
2268
|
h = setInterval(p, 100), p();
|
|
2270
2269
|
}).finally(function() {
|
|
@@ -2272,35 +2271,35 @@ var Mr = { exports: {} };
|
|
|
2272
2271
|
}) : Promise.resolve()).then(u)]).then(function() {
|
|
2273
2272
|
return c(), t.onReadyBeingFired = [], B.resolve(Dn(function() {
|
|
2274
2273
|
return e.on.ready.fire(e.vip);
|
|
2275
|
-
})).then(function
|
|
2274
|
+
})).then(function S() {
|
|
2276
2275
|
if (0 < t.onReadyBeingFired.length) {
|
|
2277
|
-
var p = t.onReadyBeingFired.reduce(on,
|
|
2276
|
+
var p = t.onReadyBeingFired.reduce(on, J);
|
|
2278
2277
|
return t.onReadyBeingFired = [], B.resolve(Dn(function() {
|
|
2279
2278
|
return p(e.vip);
|
|
2280
|
-
})).then(
|
|
2279
|
+
})).then(S);
|
|
2281
2280
|
}
|
|
2282
2281
|
});
|
|
2283
2282
|
}).finally(function() {
|
|
2284
2283
|
t.openCanceller === i && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
|
|
2285
|
-
}).catch(function(
|
|
2286
|
-
t.dbOpenError =
|
|
2284
|
+
}).catch(function(S) {
|
|
2285
|
+
t.dbOpenError = S;
|
|
2287
2286
|
try {
|
|
2288
2287
|
b && b.abort();
|
|
2289
2288
|
} catch {
|
|
2290
2289
|
}
|
|
2291
|
-
return i === t.openCanceller && e._close(), te(
|
|
2290
|
+
return i === t.openCanceller && e._close(), te(S);
|
|
2292
2291
|
}).finally(function() {
|
|
2293
2292
|
t.openComplete = !0, g();
|
|
2294
2293
|
}).then(function() {
|
|
2295
|
-
var
|
|
2296
|
-
return f && (
|
|
2294
|
+
var S;
|
|
2295
|
+
return f && (S = {}, e.tables.forEach(function(p) {
|
|
2297
2296
|
p.schema.indexes.forEach(function(m) {
|
|
2298
|
-
m.name && (
|
|
2299
|
-
}),
|
|
2300
|
-
}), Re(gt).fire(
|
|
2297
|
+
m.name && (S["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new se(-1 / 0, [[[]]]));
|
|
2298
|
+
}), S["idb://".concat(e.name, "/").concat(p.name, "/")] = S["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new se(-1 / 0, [[[]]]);
|
|
2299
|
+
}), Re(gt).fire(S), Tn(S, !0)), e;
|
|
2301
2300
|
});
|
|
2302
2301
|
}
|
|
2303
|
-
function
|
|
2302
|
+
function Mn(e) {
|
|
2304
2303
|
function t(a) {
|
|
2305
2304
|
return e.next(a);
|
|
2306
2305
|
}
|
|
@@ -2310,23 +2309,23 @@ var Mr = { exports: {} };
|
|
|
2310
2309
|
function o(a) {
|
|
2311
2310
|
return function(h) {
|
|
2312
2311
|
var u = a(h), h = u.value;
|
|
2313
|
-
return u.done ? h : h && typeof h.then == "function" ? h.then(n, i) :
|
|
2312
|
+
return u.done ? h : h && typeof h.then == "function" ? h.then(n, i) : F(h) ? Promise.all(h).then(n, i) : n(h);
|
|
2314
2313
|
};
|
|
2315
2314
|
}
|
|
2316
2315
|
return o(t)();
|
|
2317
2316
|
}
|
|
2318
2317
|
function Yt(e, t, n) {
|
|
2319
|
-
for (var i =
|
|
2318
|
+
for (var i = F(e) ? e.slice() : [e], o = 0; o < n; ++o) i.push(t);
|
|
2320
2319
|
return i;
|
|
2321
2320
|
}
|
|
2322
2321
|
var mi = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
|
|
2323
2322
|
return l(l({}, e), { table: function(t) {
|
|
2324
2323
|
var n = e.table(t), i = n.schema, o = {}, a = [];
|
|
2325
|
-
function c(f,
|
|
2326
|
-
var m = mt(f),
|
|
2327
|
-
return
|
|
2324
|
+
function c(f, S, p) {
|
|
2325
|
+
var m = mt(f), w = o[m] = o[m] || [], y = f == null ? 0 : typeof f == "string" ? 1 : f.length, _ = 0 < S, _ = l(l({}, p), { name: _ ? "".concat(m, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: _, keyTail: S, keyLength: y, extractKey: _n(f), unique: !_ && p.unique });
|
|
2326
|
+
return w.push(_), _.isPrimaryKey || a.push(_), 1 < y && c(y === 2 ? f[0] : f.slice(0, y - 1), S + 1, p), w.sort(function(E, O) {
|
|
2328
2327
|
return E.keyTail - O.keyTail;
|
|
2329
|
-
}),
|
|
2328
|
+
}), _;
|
|
2330
2329
|
}
|
|
2331
2330
|
t = c(i.primaryKey.keyPath, 0, i.primaryKey), o[":id"] = [t];
|
|
2332
2331
|
for (var u = 0, h = i.indexes; u < h.length; u++) {
|
|
@@ -2334,8 +2333,8 @@ var Mr = { exports: {} };
|
|
|
2334
2333
|
c(g.keyPath, 0, g);
|
|
2335
2334
|
}
|
|
2336
2335
|
function b(f) {
|
|
2337
|
-
var
|
|
2338
|
-
return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (
|
|
2336
|
+
var S, p = f.query.index;
|
|
2337
|
+
return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (S = f.query.range, p = p.keyTail, { type: S.type === 1 ? 2 : S.type, lower: Yt(S.lower, S.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Yt(S.upper, S.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
|
|
2339
2338
|
}
|
|
2340
2339
|
return l(l({}, n), { schema: l(l({}, i), { primaryKey: t, indexes: a, getIndexByKeyPath: function(f) {
|
|
2341
2340
|
return (f = o[mt(f)]) && f[0];
|
|
@@ -2344,36 +2343,36 @@ var Mr = { exports: {} };
|
|
|
2344
2343
|
}, query: function(f) {
|
|
2345
2344
|
return n.query(b(f));
|
|
2346
2345
|
}, openCursor: function(f) {
|
|
2347
|
-
var
|
|
2348
|
-
return m ? n.openCursor(b(f)).then(function(
|
|
2349
|
-
return
|
|
2346
|
+
var S = f.query.index, p = S.keyTail, m = S.isVirtual, w = S.keyLength;
|
|
2347
|
+
return m ? n.openCursor(b(f)).then(function(_) {
|
|
2348
|
+
return _ && y(_);
|
|
2350
2349
|
}) : n.openCursor(f);
|
|
2351
|
-
function y(
|
|
2352
|
-
return Object.create(
|
|
2353
|
-
E != null ?
|
|
2350
|
+
function y(_) {
|
|
2351
|
+
return Object.create(_, { continue: { value: function(E) {
|
|
2352
|
+
E != null ? _.continue(Yt(E, f.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : f.unique ? _.continue(_.key.slice(0, w).concat(f.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : _.continue();
|
|
2354
2353
|
} }, continuePrimaryKey: { value: function(E, O) {
|
|
2355
|
-
|
|
2354
|
+
_.continuePrimaryKey(Yt(E, e.MAX_KEY, p), O);
|
|
2356
2355
|
} }, primaryKey: { get: function() {
|
|
2357
|
-
return
|
|
2356
|
+
return _.primaryKey;
|
|
2358
2357
|
} }, key: { get: function() {
|
|
2359
|
-
var E =
|
|
2360
|
-
return
|
|
2358
|
+
var E = _.key;
|
|
2359
|
+
return w === 1 ? E[0] : E.slice(0, w);
|
|
2361
2360
|
} }, value: { get: function() {
|
|
2362
|
-
return
|
|
2361
|
+
return _.value;
|
|
2363
2362
|
} } });
|
|
2364
2363
|
}
|
|
2365
2364
|
} });
|
|
2366
2365
|
} });
|
|
2367
2366
|
} };
|
|
2368
2367
|
function jn(e, t, n, i) {
|
|
2369
|
-
return n = n || {}, i = i || "",
|
|
2368
|
+
return n = n || {}, i = i || "", j(e).forEach(function(o) {
|
|
2370
2369
|
var a, c, u;
|
|
2371
|
-
|
|
2372
|
-
}),
|
|
2373
|
-
|
|
2370
|
+
ee(t, o) ? (a = e[o], c = t[o], typeof a == "object" && typeof c == "object" && a && c ? (u = en(a)) !== en(c) ? n[i + o] = t[o] : u === "Object" ? jn(a, c, n, i + o + ".") : a !== c && (n[i + o] = t[o]) : a !== c && (n[i + o] = t[o])) : n[i + o] = void 0;
|
|
2371
|
+
}), j(t).forEach(function(o) {
|
|
2372
|
+
ee(e, o) || (n[i + o] = t[o]);
|
|
2374
2373
|
}), n;
|
|
2375
2374
|
}
|
|
2376
|
-
function
|
|
2375
|
+
function Nn(e, t) {
|
|
2377
2376
|
return t.type === "delete" ? t.keys : t.keys || t.values.map(e.extractKey);
|
|
2378
2377
|
}
|
|
2379
2378
|
var bi = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
|
|
@@ -2383,28 +2382,28 @@ var Mr = { exports: {} };
|
|
|
2383
2382
|
var a = G.trans, c = a.table(t).hook, u = c.deleting, h = c.creating, g = c.updating;
|
|
2384
2383
|
switch (o.type) {
|
|
2385
2384
|
case "add":
|
|
2386
|
-
if (h.fire ===
|
|
2385
|
+
if (h.fire === J) break;
|
|
2387
2386
|
return a._promise("readwrite", function() {
|
|
2388
2387
|
return b(o);
|
|
2389
2388
|
}, !0);
|
|
2390
2389
|
case "put":
|
|
2391
|
-
if (h.fire ===
|
|
2390
|
+
if (h.fire === J && g.fire === J) break;
|
|
2392
2391
|
return a._promise("readwrite", function() {
|
|
2393
2392
|
return b(o);
|
|
2394
2393
|
}, !0);
|
|
2395
2394
|
case "delete":
|
|
2396
|
-
if (u.fire ===
|
|
2395
|
+
if (u.fire === J) break;
|
|
2397
2396
|
return a._promise("readwrite", function() {
|
|
2398
2397
|
return b(o);
|
|
2399
2398
|
}, !0);
|
|
2400
2399
|
case "deleteRange":
|
|
2401
|
-
if (u.fire ===
|
|
2400
|
+
if (u.fire === J) break;
|
|
2402
2401
|
return a._promise("readwrite", function() {
|
|
2403
|
-
return function f(
|
|
2404
|
-
return n.query({ trans:
|
|
2405
|
-
var y =
|
|
2406
|
-
return b({ type: "delete", keys: y, trans:
|
|
2407
|
-
return 0 <
|
|
2402
|
+
return function f(S, p, m) {
|
|
2403
|
+
return n.query({ trans: S, values: !1, query: { index: i, range: p }, limit: m }).then(function(w) {
|
|
2404
|
+
var y = w.result;
|
|
2405
|
+
return b({ type: "delete", keys: y, trans: S }).then(function(_) {
|
|
2406
|
+
return 0 < _.numFailures ? Promise.reject(_.failures[0]) : y.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : f(S, l(l({}, p), { lower: y[y.length - 1], lowerOpen: !0 }), m);
|
|
2408
2407
|
});
|
|
2409
2408
|
});
|
|
2410
2409
|
}(o.trans, o.range, 1e4);
|
|
@@ -2412,21 +2411,21 @@ var Mr = { exports: {} };
|
|
|
2412
2411
|
}
|
|
2413
2412
|
return n.mutate(o);
|
|
2414
2413
|
function b(f) {
|
|
2415
|
-
var
|
|
2414
|
+
var S, p, m, w = G.trans, y = f.keys || Nn(i, f);
|
|
2416
2415
|
if (!y) throw new Error("Keys missing");
|
|
2417
|
-
return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: y }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)),
|
|
2416
|
+
return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: y }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)), S = n, m = y, ((p = f).type === "add" ? Promise.resolve([]) : S.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(_) {
|
|
2418
2417
|
var E = y.map(function(O, A) {
|
|
2419
|
-
var P,
|
|
2420
|
-
return f.type === "delete" ? u.fire.call(
|
|
2421
|
-
|
|
2422
|
-
}))),
|
|
2418
|
+
var P, T, I, C = _[A], M = { onerror: null, onsuccess: null };
|
|
2419
|
+
return f.type === "delete" ? u.fire.call(M, O, C, w) : f.type === "add" || C === void 0 ? (P = h.fire.call(M, O, f.values[A], w), O == null && P != null && (f.keys[A] = O = P, i.outbound || fe(f.values[A], i.keyPath, O))) : (P = jn(C, f.values[A]), (T = g.fire.call(M, P, O, C, w)) && (I = f.values[A], Object.keys(T).forEach(function(R) {
|
|
2420
|
+
ee(I, R) ? I[R] = T[R] : fe(I, R, T[R]);
|
|
2421
|
+
}))), M;
|
|
2423
2422
|
});
|
|
2424
2423
|
return n.mutate(f).then(function(O) {
|
|
2425
|
-
for (var A = O.failures, P = O.results,
|
|
2426
|
-
var C = (P || y)[I],
|
|
2427
|
-
C == null ?
|
|
2424
|
+
for (var A = O.failures, P = O.results, T = O.numFailures, O = O.lastResult, I = 0; I < y.length; ++I) {
|
|
2425
|
+
var C = (P || y)[I], M = E[I];
|
|
2426
|
+
C == null ? M.onerror && M.onerror(A[I]) : M.onsuccess && M.onsuccess(f.type === "put" && _[I] ? f.values[I] : C);
|
|
2428
2427
|
}
|
|
2429
|
-
return { failures: A, results: P, numFailures:
|
|
2428
|
+
return { failures: A, results: P, numFailures: T, lastResult: O };
|
|
2430
2429
|
}).catch(function(O) {
|
|
2431
2430
|
return E.forEach(function(A) {
|
|
2432
2431
|
return A.onerror && A.onerror(O);
|
|
@@ -2440,7 +2439,7 @@ var Mr = { exports: {} };
|
|
|
2440
2439
|
function Er(e, t, n) {
|
|
2441
2440
|
try {
|
|
2442
2441
|
if (!t || t.keys.length < e.length) return null;
|
|
2443
|
-
for (var i = [], o = 0, a = 0; o < t.keys.length && a < e.length; ++o)
|
|
2442
|
+
for (var i = [], o = 0, a = 0; o < t.keys.length && a < e.length; ++o) Y(t.keys[o], e[a]) === 0 && (i.push(n ? Me(t.values[o]) : t.values[o]), ++a);
|
|
2444
2443
|
return i.length === e.length ? i : null;
|
|
2445
2444
|
} catch {
|
|
2446
2445
|
return null;
|
|
@@ -2453,7 +2452,7 @@ var Mr = { exports: {} };
|
|
|
2453
2452
|
if (!i.cache) return n.getMany(i);
|
|
2454
2453
|
var o = Er(i.keys, i.trans._cache, i.cache === "clone");
|
|
2455
2454
|
return o ? B.resolve(o) : n.getMany(i).then(function(a) {
|
|
2456
|
-
return i.trans._cache = { keys: i.keys, values: i.cache === "clone" ?
|
|
2455
|
+
return i.trans._cache = { keys: i.keys, values: i.cache === "clone" ? Me(a) : a }, a;
|
|
2457
2456
|
});
|
|
2458
2457
|
}, mutate: function(i) {
|
|
2459
2458
|
return i.type !== "add" && (i.trans._cache = null), n.mutate(i);
|
|
@@ -2475,7 +2474,7 @@ var Mr = { exports: {} };
|
|
|
2475
2474
|
}
|
|
2476
2475
|
}
|
|
2477
2476
|
var wi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
|
|
2478
|
-
var t = e.schema.name, n = new
|
|
2477
|
+
var t = e.schema.name, n = new se(e.MIN_KEY, e.MAX_KEY);
|
|
2479
2478
|
return l(l({}, e), { transaction: function(i, o, a) {
|
|
2480
2479
|
if (G.subscr && o !== "readonly") throw new $.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(G.querier));
|
|
2481
2480
|
return e.transaction(i, o, a);
|
|
@@ -2484,69 +2483,69 @@ var Mr = { exports: {} };
|
|
|
2484
2483
|
return p.compound && p.keyPath.includes(c.keyPath);
|
|
2485
2484
|
}), b = l(l({}, o), { mutate: function(p) {
|
|
2486
2485
|
function m(R) {
|
|
2487
|
-
return R = "idb://".concat(t, "/").concat(i, "/").concat(R), O[R] || (O[R] = new
|
|
2486
|
+
return R = "idb://".concat(t, "/").concat(i, "/").concat(R), O[R] || (O[R] = new se());
|
|
2488
2487
|
}
|
|
2489
|
-
var
|
|
2488
|
+
var w, y, _, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), A = m(""), P = m(":dels"), T = p.type, M = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Nn(c, p).filter(function(R) {
|
|
2490
2489
|
return R;
|
|
2491
|
-
}), p.values] : [], I =
|
|
2492
|
-
return
|
|
2493
|
-
var L =
|
|
2494
|
-
function
|
|
2495
|
-
return
|
|
2490
|
+
}), p.values] : [], I = M[0], C = M[1], M = p.trans._cache;
|
|
2491
|
+
return F(I) ? (A.addKeys(I), (M = T === "delete" || I.length === C.length ? Er(I, M) : null) || P.addKeys(I), (M || C) && (w = m, y = M, _ = C, a.indexes.forEach(function(R) {
|
|
2492
|
+
var L = w(R.name || "");
|
|
2493
|
+
function W(H) {
|
|
2494
|
+
return H != null ? R.extractKey(H) : null;
|
|
2496
2495
|
}
|
|
2497
|
-
function
|
|
2498
|
-
return R.multiEntry &&
|
|
2499
|
-
return L.addKey(
|
|
2500
|
-
}) : L.addKey(
|
|
2496
|
+
function z(H) {
|
|
2497
|
+
return R.multiEntry && F(H) ? H.forEach(function(pe) {
|
|
2498
|
+
return L.addKey(pe);
|
|
2499
|
+
}) : L.addKey(H);
|
|
2501
2500
|
}
|
|
2502
|
-
(y ||
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2501
|
+
(y || _).forEach(function(H, ce) {
|
|
2502
|
+
var U = y && W(y[ce]), ce = _ && W(_[ce]);
|
|
2503
|
+
Y(U, ce) !== 0 && (U != null && z(U), ce != null && z(ce));
|
|
2505
2504
|
});
|
|
2506
2505
|
}))) : I ? (C = { from: (C = I.lower) !== null && C !== void 0 ? C : e.MIN_KEY, to: (C = I.upper) !== null && C !== void 0 ? C : e.MAX_KEY }, P.add(C), A.add(C)) : (A.add(n), P.add(n), a.indexes.forEach(function(R) {
|
|
2507
2506
|
return m(R.name).add(n);
|
|
2508
2507
|
})), o.mutate(p).then(function(R) {
|
|
2509
2508
|
return !I || p.type !== "add" && p.type !== "put" || (A.addKeys(R.results), g && g.forEach(function(L) {
|
|
2510
|
-
for (var
|
|
2511
|
-
return L.extractKey(
|
|
2512
|
-
}),
|
|
2513
|
-
return
|
|
2514
|
-
}),
|
|
2515
|
-
m(L.name).addKeys(
|
|
2509
|
+
for (var W = p.values.map(function(U) {
|
|
2510
|
+
return L.extractKey(U);
|
|
2511
|
+
}), z = L.keyPath.findIndex(function(U) {
|
|
2512
|
+
return U === c.keyPath;
|
|
2513
|
+
}), H = 0, pe = R.results.length; H < pe; ++H) W[H][z] = R.results[H];
|
|
2514
|
+
m(L.name).addKeys(W);
|
|
2516
2515
|
})), E.mutatedParts = zt(E.mutatedParts || {}, O), R;
|
|
2517
2516
|
});
|
|
2518
2517
|
} }), f = function(m) {
|
|
2519
|
-
var
|
|
2520
|
-
return [m, new
|
|
2521
|
-
},
|
|
2522
|
-
return [c, new
|
|
2518
|
+
var w = m.query, m = w.index, w = w.range;
|
|
2519
|
+
return [m, new se((m = w.lower) !== null && m !== void 0 ? m : e.MIN_KEY, (w = w.upper) !== null && w !== void 0 ? w : e.MAX_KEY)];
|
|
2520
|
+
}, S = { get: function(p) {
|
|
2521
|
+
return [c, new se(p.key)];
|
|
2523
2522
|
}, getMany: function(p) {
|
|
2524
|
-
return [c, new
|
|
2523
|
+
return [c, new se().addKeys(p.keys)];
|
|
2525
2524
|
}, count: f, query: f, openCursor: f };
|
|
2526
|
-
return
|
|
2525
|
+
return j(S).forEach(function(p) {
|
|
2527
2526
|
b[p] = function(m) {
|
|
2528
|
-
var
|
|
2527
|
+
var w = G.subscr, y = !!w, _ = Or(G, o) && xr(p, m) ? m.obsSet = {} : w;
|
|
2529
2528
|
if (y) {
|
|
2530
2529
|
var E = function(C) {
|
|
2531
|
-
return C = "idb://".concat(t, "/").concat(i, "/").concat(C),
|
|
2532
|
-
}, O = E(""), A = E(":dels"),
|
|
2533
|
-
if ((p === "query" && y.isPrimaryKey && !m.values ? A : E(y.name || "")).add(
|
|
2530
|
+
return C = "idb://".concat(t, "/").concat(i, "/").concat(C), _[C] || (_[C] = new se());
|
|
2531
|
+
}, O = E(""), A = E(":dels"), w = S[p](m), y = w[0], w = w[1];
|
|
2532
|
+
if ((p === "query" && y.isPrimaryKey && !m.values ? A : E(y.name || "")).add(w), !y.isPrimaryKey) {
|
|
2534
2533
|
if (p !== "count") {
|
|
2535
2534
|
var P = p === "query" && h && m.values && o.query(l(l({}, m), { values: !1 }));
|
|
2536
2535
|
return o[p].apply(this, arguments).then(function(C) {
|
|
2537
2536
|
if (p === "query") {
|
|
2538
|
-
if (h && m.values) return P.then(function(
|
|
2539
|
-
return
|
|
2537
|
+
if (h && m.values) return P.then(function(W) {
|
|
2538
|
+
return W = W.result, O.addKeys(W), C;
|
|
2540
2539
|
});
|
|
2541
|
-
var
|
|
2542
|
-
(m.values ? O : A).addKeys(
|
|
2540
|
+
var M = m.values ? C.result.map(u) : C.result;
|
|
2541
|
+
(m.values ? O : A).addKeys(M);
|
|
2543
2542
|
} else if (p === "openCursor") {
|
|
2544
2543
|
var R = C, L = m.values;
|
|
2545
2544
|
return R && Object.create(R, { key: { get: function() {
|
|
2546
2545
|
return A.addKey(R.primaryKey), R.key;
|
|
2547
2546
|
} }, primaryKey: { get: function() {
|
|
2548
|
-
var
|
|
2549
|
-
return A.addKey(
|
|
2547
|
+
var W = R.primaryKey;
|
|
2548
|
+
return A.addKey(W), W;
|
|
2550
2549
|
} }, value: { get: function() {
|
|
2551
2550
|
return L && O.addKey(R.primaryKey), R.value;
|
|
2552
2551
|
} } });
|
|
@@ -2566,74 +2565,74 @@ var Mr = { exports: {} };
|
|
|
2566
2565
|
if (n.numFailures === 0) return t;
|
|
2567
2566
|
if (t.type === "deleteRange") return null;
|
|
2568
2567
|
var i = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
|
|
2569
|
-
return n.numFailures === i ? null : (t = l({}, t),
|
|
2568
|
+
return n.numFailures === i ? null : (t = l({}, t), F(t.keys) && (t.keys = t.keys.filter(function(o, a) {
|
|
2570
2569
|
return !(a in n.failures);
|
|
2571
|
-
})), "values" in t &&
|
|
2570
|
+
})), "values" in t && F(t.values) && (t.values = t.values.filter(function(o, a) {
|
|
2572
2571
|
return !(a in n.failures);
|
|
2573
2572
|
})), t);
|
|
2574
2573
|
}
|
|
2575
|
-
function
|
|
2576
|
-
return n = e, ((i = t).lower === void 0 || (i.lowerOpen ? 0 <
|
|
2574
|
+
function Kn(e, t) {
|
|
2575
|
+
return n = e, ((i = t).lower === void 0 || (i.lowerOpen ? 0 < Y(n, i.lower) : 0 <= Y(n, i.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? Y(e, t.upper) < 0 : Y(e, t.upper) <= 0));
|
|
2577
2576
|
var n, i;
|
|
2578
2577
|
}
|
|
2579
|
-
function kr(e, t,
|
|
2580
|
-
if (!
|
|
2581
|
-
var c = t.query.index, u = c.multiEntry, h = t.query.range, g = i.schema.primaryKey.extractKey, b = c.extractKey, f = (c.lowLevelIndex || c).extractKey,
|
|
2582
|
-
var
|
|
2583
|
-
if (m.type === "add" || m.type === "put") for (var
|
|
2578
|
+
function kr(e, t, S, i, o, a) {
|
|
2579
|
+
if (!S || S.length === 0) return e;
|
|
2580
|
+
var c = t.query.index, u = c.multiEntry, h = t.query.range, g = i.schema.primaryKey.extractKey, b = c.extractKey, f = (c.lowLevelIndex || c).extractKey, S = S.reduce(function(p, m) {
|
|
2581
|
+
var w = p, y = [];
|
|
2582
|
+
if (m.type === "add" || m.type === "put") for (var _ = new se(), E = m.values.length - 1; 0 <= E; --E) {
|
|
2584
2583
|
var O, A = m.values[E], P = g(A);
|
|
2585
|
-
|
|
2586
|
-
return
|
|
2587
|
-
}) :
|
|
2584
|
+
_.hasKey(P) || (O = b(A), (u && F(O) ? O.some(function(R) {
|
|
2585
|
+
return Kn(R, h);
|
|
2586
|
+
}) : Kn(O, h)) && (_.addKey(P), y.push(A)));
|
|
2588
2587
|
}
|
|
2589
2588
|
switch (m.type) {
|
|
2590
2589
|
case "add":
|
|
2591
|
-
var
|
|
2590
|
+
var T = new se().addKeys(t.values ? p.map(function(L) {
|
|
2592
2591
|
return g(L);
|
|
2593
|
-
}) : p),
|
|
2594
|
-
return L = g(L), !
|
|
2592
|
+
}) : p), w = p.concat(t.values ? y.filter(function(L) {
|
|
2593
|
+
return L = g(L), !T.hasKey(L) && (T.addKey(L), !0);
|
|
2595
2594
|
}) : y.map(function(L) {
|
|
2596
2595
|
return g(L);
|
|
2597
2596
|
}).filter(function(L) {
|
|
2598
|
-
return !
|
|
2597
|
+
return !T.hasKey(L) && (T.addKey(L), !0);
|
|
2599
2598
|
}));
|
|
2600
2599
|
break;
|
|
2601
2600
|
case "put":
|
|
2602
|
-
var I = new
|
|
2601
|
+
var I = new se().addKeys(m.values.map(function(L) {
|
|
2603
2602
|
return g(L);
|
|
2604
2603
|
}));
|
|
2605
|
-
|
|
2604
|
+
w = p.filter(function(L) {
|
|
2606
2605
|
return !I.hasKey(t.values ? g(L) : L);
|
|
2607
2606
|
}).concat(t.values ? y : y.map(function(L) {
|
|
2608
2607
|
return g(L);
|
|
2609
2608
|
}));
|
|
2610
2609
|
break;
|
|
2611
2610
|
case "delete":
|
|
2612
|
-
var C = new
|
|
2613
|
-
|
|
2611
|
+
var C = new se().addKeys(m.keys);
|
|
2612
|
+
w = p.filter(function(L) {
|
|
2614
2613
|
return !C.hasKey(t.values ? g(L) : L);
|
|
2615
2614
|
});
|
|
2616
2615
|
break;
|
|
2617
2616
|
case "deleteRange":
|
|
2618
|
-
var
|
|
2619
|
-
|
|
2620
|
-
return !
|
|
2617
|
+
var M = m.range;
|
|
2618
|
+
w = p.filter(function(L) {
|
|
2619
|
+
return !Kn(g(L), M);
|
|
2621
2620
|
});
|
|
2622
2621
|
}
|
|
2623
|
-
return
|
|
2622
|
+
return w;
|
|
2624
2623
|
}, e);
|
|
2625
|
-
return
|
|
2626
|
-
return
|
|
2627
|
-
}), t.limit && t.limit < 1 / 0 && (
|
|
2624
|
+
return S === e ? e : (S.sort(function(p, m) {
|
|
2625
|
+
return Y(f(p), f(m)) || Y(g(p), g(m));
|
|
2626
|
+
}), t.limit && t.limit < 1 / 0 && (S.length > t.limit ? S.length = t.limit : e.length === t.limit && S.length < t.limit && (o.dirty = !0)), a ? Object.freeze(S) : S);
|
|
2628
2627
|
}
|
|
2629
2628
|
function Dr(e, t) {
|
|
2630
|
-
return
|
|
2629
|
+
return Y(e.lower, t.lower) === 0 && Y(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
|
|
2631
2630
|
}
|
|
2632
|
-
function
|
|
2631
|
+
function Si(e, t) {
|
|
2633
2632
|
return function(n, i, o, a) {
|
|
2634
2633
|
if (n === void 0) return i !== void 0 ? -1 : 0;
|
|
2635
2634
|
if (i === void 0) return 1;
|
|
2636
|
-
if ((i =
|
|
2635
|
+
if ((i = Y(n, i)) === 0) {
|
|
2637
2636
|
if (o && a) return 0;
|
|
2638
2637
|
if (o) return 1;
|
|
2639
2638
|
if (a) return -1;
|
|
@@ -2642,7 +2641,7 @@ var Mr = { exports: {} };
|
|
|
2642
2641
|
}(e.lower, t.lower, e.lowerOpen, t.lowerOpen) <= 0 && 0 <= function(n, i, o, a) {
|
|
2643
2642
|
if (n === void 0) return i !== void 0 ? 1 : 0;
|
|
2644
2643
|
if (i === void 0) return -1;
|
|
2645
|
-
if ((i =
|
|
2644
|
+
if ((i = Y(n, i)) === 0) {
|
|
2646
2645
|
if (o && a) return 0;
|
|
2647
2646
|
if (o) return -1;
|
|
2648
2647
|
if (a) return 1;
|
|
@@ -2650,7 +2649,7 @@ var Mr = { exports: {} };
|
|
|
2650
2649
|
return i;
|
|
2651
2650
|
}(e.upper, t.upper, e.upperOpen, t.upperOpen);
|
|
2652
2651
|
}
|
|
2653
|
-
function
|
|
2652
|
+
function _i(e, t, n, i) {
|
|
2654
2653
|
e.subscribers.add(n), i.addEventListener("abort", function() {
|
|
2655
2654
|
var o, a;
|
|
2656
2655
|
e.subscribers.delete(n), e.subscribers.size === 0 && (o = e, a = t, setTimeout(function() {
|
|
@@ -2666,21 +2665,21 @@ var Mr = { exports: {} };
|
|
|
2666
2665
|
return function() {
|
|
2667
2666
|
if (a.abort(), i === "readwrite") {
|
|
2668
2667
|
for (var g = /* @__PURE__ */ new Set(), b = 0, f = n; b < f.length; b++) {
|
|
2669
|
-
var
|
|
2668
|
+
var S = f[b], p = Ue["idb://".concat(t, "/").concat(S)];
|
|
2670
2669
|
if (p) {
|
|
2671
|
-
var m = e.table(
|
|
2670
|
+
var m = e.table(S), w = p.optimisticOps.filter(function(L) {
|
|
2672
2671
|
return L.trans === u;
|
|
2673
2672
|
});
|
|
2674
|
-
if (u._explicit && h && u.mutatedParts) for (var y = 0,
|
|
2673
|
+
if (u._explicit && h && u.mutatedParts) for (var y = 0, _ = Object.values(p.queries.query); y < _.length; y++) for (var E = 0, O = (T = _[y]).slice(); E < O.length; E++) In((I = O[E]).obsSet, u.mutatedParts) && (je(T, I), I.subscribers.forEach(function(L) {
|
|
2675
2674
|
return g.add(L);
|
|
2676
2675
|
}));
|
|
2677
|
-
else if (0 <
|
|
2676
|
+
else if (0 < w.length) {
|
|
2678
2677
|
p.optimisticOps = p.optimisticOps.filter(function(L) {
|
|
2679
2678
|
return L.trans !== u;
|
|
2680
2679
|
});
|
|
2681
|
-
for (var A = 0, P = Object.values(p.queries.query); A < P.length; A++) for (var
|
|
2680
|
+
for (var A = 0, P = Object.values(p.queries.query); A < P.length; A++) for (var T, I, C, M = 0, R = (T = P[A]).slice(); M < R.length; M++) (I = R[M]).res != null && u.mutatedParts && (h && !I.dirty ? (C = Object.isFrozen(I.res), C = kr(I.res, I.req, w, m, I, C), I.dirty ? (je(T, I), I.subscribers.forEach(function(L) {
|
|
2682
2681
|
return g.add(L);
|
|
2683
|
-
})) : C !== I.res && (I.res = C, I.promise = B.resolve({ result: C }))) : (I.dirty && je(
|
|
2682
|
+
})) : C !== I.res && (I.res = C, I.promise = B.resolve({ result: C }))) : (I.dirty && je(T, I), I.subscribers.forEach(function(L) {
|
|
2684
2683
|
return g.add(L);
|
|
2685
2684
|
})));
|
|
2686
2685
|
}
|
|
@@ -2698,7 +2697,7 @@ var Mr = { exports: {} };
|
|
|
2698
2697
|
var c = G.trans;
|
|
2699
2698
|
if (o.outbound || c.db._options.cache === "disabled" || c.explicit || c.idbtrans.mode !== "readwrite") return i.mutate(a);
|
|
2700
2699
|
var u = Ue["idb://".concat(t, "/").concat(n)];
|
|
2701
|
-
return u ? (c = i.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length ||
|
|
2700
|
+
return u ? (c = i.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || Nn(o, a).some(function(h) {
|
|
2702
2701
|
return h == null;
|
|
2703
2702
|
})) ? (u.optimisticOps.push(a), a.mutatedParts && Ht(a.mutatedParts), c.then(function(h) {
|
|
2704
2703
|
0 < h.numFailures && (je(u.optimisticOps, a), (h = Ar(0, a, h)) && u.optimisticOps.push(h), a.mutatedParts && Ht(a.mutatedParts));
|
|
@@ -2706,8 +2705,8 @@ var Mr = { exports: {} };
|
|
|
2706
2705
|
je(u.optimisticOps, a), a.mutatedParts && Ht(a.mutatedParts);
|
|
2707
2706
|
})) : c.then(function(h) {
|
|
2708
2707
|
var g = Ar(0, l(l({}, a), { values: a.values.map(function(b, f) {
|
|
2709
|
-
var
|
|
2710
|
-
return h.failures[f] ? b : (b = (
|
|
2708
|
+
var S;
|
|
2709
|
+
return h.failures[f] ? b : (b = (S = o.keyPath) !== null && S !== void 0 && S.includes(".") ? Me(b) : l({}, b), fe(b, o.keyPath, h.results[f]), b);
|
|
2711
2710
|
}) }), h);
|
|
2712
2711
|
u.optimisticOps.push(g), queueMicrotask(function() {
|
|
2713
2712
|
return a.mutatedParts && Ht(a.mutatedParts);
|
|
@@ -2715,37 +2714,37 @@ var Mr = { exports: {} };
|
|
|
2715
2714
|
}), c) : i.mutate(a);
|
|
2716
2715
|
}, query: function(a) {
|
|
2717
2716
|
if (!Or(G, i) || !xr("query", a)) return i.query(a);
|
|
2718
|
-
var c = ((g = G.trans) === null || g === void 0 ? void 0 : g.db._options.cache) === "immutable", f = G, u = f.requery, h = f.signal, g = function(m,
|
|
2719
|
-
var E = Ue["idb://".concat(m, "/").concat(
|
|
2717
|
+
var c = ((g = G.trans) === null || g === void 0 ? void 0 : g.db._options.cache) === "immutable", f = G, u = f.requery, h = f.signal, g = function(m, w, y, _) {
|
|
2718
|
+
var E = Ue["idb://".concat(m, "/").concat(w)];
|
|
2720
2719
|
if (!E) return [];
|
|
2721
|
-
if (!(
|
|
2722
|
-
var O =
|
|
2720
|
+
if (!(w = E.queries[y])) return [null, !1, E, null];
|
|
2721
|
+
var O = w[(_.query ? _.query.index.name : null) || ""];
|
|
2723
2722
|
if (!O) return [null, !1, E, null];
|
|
2724
2723
|
switch (y) {
|
|
2725
2724
|
case "query":
|
|
2726
2725
|
var A = O.find(function(P) {
|
|
2727
|
-
return P.req.limit ===
|
|
2726
|
+
return P.req.limit === _.limit && P.req.values === _.values && Dr(P.req.query.range, _.query.range);
|
|
2728
2727
|
});
|
|
2729
2728
|
return A ? [A, !0, E, O] : [O.find(function(P) {
|
|
2730
|
-
return ("limit" in P.req ? P.req.limit : 1 / 0) >=
|
|
2729
|
+
return ("limit" in P.req ? P.req.limit : 1 / 0) >= _.limit && (!_.values || P.req.values) && Si(P.req.query.range, _.query.range);
|
|
2731
2730
|
}), !1, E, O];
|
|
2732
2731
|
case "count":
|
|
2733
2732
|
return A = O.find(function(P) {
|
|
2734
|
-
return Dr(P.req.query.range,
|
|
2733
|
+
return Dr(P.req.query.range, _.query.range);
|
|
2735
2734
|
}), [A, !!A, E, O];
|
|
2736
2735
|
}
|
|
2737
|
-
}(t, n, "query", a), b = g[0], f = g[1],
|
|
2736
|
+
}(t, n, "query", a), b = g[0], f = g[1], S = g[2], p = g[3];
|
|
2738
2737
|
return b && f ? b.obsSet = a.obsSet : (f = i.query(a).then(function(m) {
|
|
2739
|
-
var
|
|
2740
|
-
if (b && (b.res =
|
|
2741
|
-
for (var y = 0,
|
|
2742
|
-
Object.freeze(
|
|
2743
|
-
} else m.result =
|
|
2738
|
+
var w = m.result;
|
|
2739
|
+
if (b && (b.res = w), c) {
|
|
2740
|
+
for (var y = 0, _ = w.length; y < _; ++y) Object.freeze(w[y]);
|
|
2741
|
+
Object.freeze(w);
|
|
2742
|
+
} else m.result = Me(w);
|
|
2744
2743
|
return m;
|
|
2745
2744
|
}).catch(function(m) {
|
|
2746
2745
|
return p && b && je(p, b), Promise.reject(m);
|
|
2747
|
-
}), b = { obsSet: a.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (
|
|
2748
|
-
return { result: kr(m.result, a,
|
|
2746
|
+
}), b = { obsSet: a.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (S = S || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), _i(b, p, u, h), b.promise.then(function(m) {
|
|
2747
|
+
return { result: kr(m.result, a, S == null ? void 0 : S.optimisticOps, i, b, c) };
|
|
2749
2748
|
});
|
|
2750
2749
|
} });
|
|
2751
2750
|
} });
|
|
@@ -2769,7 +2768,7 @@ var Mr = { exports: {} };
|
|
|
2769
2768
|
if (t._state.openComplete) return i(new $.DatabaseClosed(t._state.dbOpenError));
|
|
2770
2769
|
if (!t._state.isBeingOpened) {
|
|
2771
2770
|
if (!t._state.autoOpen) return void i(new $.DatabaseClosed());
|
|
2772
|
-
t.open().catch(
|
|
2771
|
+
t.open().catch(J);
|
|
2773
2772
|
}
|
|
2774
2773
|
t._state.dbReadyPromise.then(n, i);
|
|
2775
2774
|
}).then(e);
|
|
@@ -2813,10 +2812,10 @@ var Mr = { exports: {} };
|
|
|
2813
2812
|
function c() {
|
|
2814
2813
|
t.close(e);
|
|
2815
2814
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2816
|
-
u.onsuccess =
|
|
2815
|
+
u.onsuccess = q(function() {
|
|
2817
2816
|
var h, g, b;
|
|
2818
|
-
h = t._deps, g = t.name, b = h.indexedDB, h = h.IDBKeyRange, kn(b) || g ===
|
|
2819
|
-
}), u.onerror =
|
|
2817
|
+
h = t._deps, g = t.name, b = h.indexedDB, h = h.IDBKeyRange, kn(b) || g === Tt || An(b, h).delete(g).catch(J), o();
|
|
2818
|
+
}), u.onerror = be(a), u.onblocked = t._fireOnBlocked;
|
|
2820
2819
|
}
|
|
2821
2820
|
if (n) throw new $.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
2822
2821
|
i.isBeingOpened ? i.dbReadyPromise.then(c) : c();
|
|
@@ -2834,7 +2833,7 @@ var Mr = { exports: {} };
|
|
|
2834
2833
|
return this._state.autoSchema;
|
|
2835
2834
|
}, Object.defineProperty(ne.prototype, "tables", { get: function() {
|
|
2836
2835
|
var e = this;
|
|
2837
|
-
return
|
|
2836
|
+
return j(this._allTables).map(function(t) {
|
|
2838
2837
|
return e._allTables[t];
|
|
2839
2838
|
});
|
|
2840
2839
|
}, enumerable: !1, configurable: !0 }), ne.prototype.transaction = function() {
|
|
@@ -2876,25 +2875,25 @@ var Mr = { exports: {} };
|
|
|
2876
2875
|
f(g);
|
|
2877
2876
|
}) : te(g);
|
|
2878
2877
|
}
|
|
2879
|
-
var h = (function g(b, f,
|
|
2878
|
+
var h = (function g(b, f, S, p, m) {
|
|
2880
2879
|
return B.resolve().then(function() {
|
|
2881
|
-
var
|
|
2882
|
-
if (y.explicit = !0,
|
|
2880
|
+
var w = G.transless || G, y = b._createTransaction(f, S, b._dbSchema, p);
|
|
2881
|
+
if (y.explicit = !0, w = { trans: y, transless: w }, p) y.idbtrans = p.idbtrans;
|
|
2883
2882
|
else try {
|
|
2884
2883
|
y.create(), y.idbtrans._explicit = !0, b._state.PR1398_maxLoop = 3;
|
|
2885
2884
|
} catch (O) {
|
|
2886
2885
|
return O.name === rn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
|
|
2887
|
-
return g(b, f,
|
|
2886
|
+
return g(b, f, S, null, m);
|
|
2888
2887
|
})) : te(O);
|
|
2889
2888
|
}
|
|
2890
|
-
var
|
|
2891
|
-
return E && qe(),
|
|
2889
|
+
var _, E = nn(m);
|
|
2890
|
+
return E && qe(), w = B.follow(function() {
|
|
2892
2891
|
var O;
|
|
2893
|
-
(
|
|
2894
|
-
},
|
|
2892
|
+
(_ = m.call(y, y)) && (E ? (O = Pe.bind(null, null), _.then(O, O)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Mn(_)));
|
|
2893
|
+
}, w), (_ && typeof _.then == "function" ? B.resolve(_).then(function(O) {
|
|
2895
2894
|
return y.active ? O : te(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
2896
|
-
}) :
|
|
2897
|
-
return
|
|
2895
|
+
}) : w.then(function() {
|
|
2896
|
+
return _;
|
|
2898
2897
|
})).then(function(O) {
|
|
2899
2898
|
return p && y._resolve(), y._completion.then(function() {
|
|
2900
2899
|
return O;
|
|
@@ -2908,7 +2907,7 @@ var Mr = { exports: {} };
|
|
|
2908
2907
|
return i._whenReady(h);
|
|
2909
2908
|
}) : this._whenReady(h);
|
|
2910
2909
|
}, ne.prototype.table = function(e) {
|
|
2911
|
-
if (!
|
|
2910
|
+
if (!ee(this._allTables, e)) throw new $.InvalidTable("Table ".concat(e, " does not exist"));
|
|
2912
2911
|
return this._allTables[e];
|
|
2913
2912
|
}, ne);
|
|
2914
2913
|
function ne(e, t) {
|
|
@@ -2916,21 +2915,21 @@ var Mr = { exports: {} };
|
|
|
2916
2915
|
this._middlewares = {}, this.verno = 0;
|
|
2917
2916
|
var i = ne.dependencies;
|
|
2918
2917
|
this._options = t = l({ addons: ne.addons, autoOpen: !0, indexedDB: i.indexedDB, IDBKeyRange: i.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, i = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
2919
|
-
var o, a, c, u, h, g = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve:
|
|
2918
|
+
var o, a, c, u, h, g = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: J, dbReadyPromise: null, cancelOpen: J, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
2920
2919
|
g.dbReadyPromise = new B(function(f) {
|
|
2921
2920
|
g.dbReadyResolve = f;
|
|
2922
|
-
}), g.openCanceller = new B(function(f,
|
|
2923
|
-
g.cancelOpen =
|
|
2924
|
-
}), this._state = g, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [on,
|
|
2925
|
-
return function(
|
|
2921
|
+
}), g.openCanceller = new B(function(f, S) {
|
|
2922
|
+
g.cancelOpen = S;
|
|
2923
|
+
}), this._state = g, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [on, J] }), this.on.ready.subscribe = zn(this.on.ready.subscribe, function(f) {
|
|
2924
|
+
return function(S, p) {
|
|
2926
2925
|
ne.vip(function() {
|
|
2927
|
-
var m,
|
|
2928
|
-
|
|
2929
|
-
m.on.ready.unsubscribe(
|
|
2926
|
+
var m, w = n._state;
|
|
2927
|
+
w.openComplete ? (w.dbOpenError || B.resolve().then(S), p && f(S)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(S), p && f(S)) : (f(S), m = n, p || f(function y() {
|
|
2928
|
+
m.on.ready.unsubscribe(S), m.on.ready.unsubscribe(y);
|
|
2930
2929
|
}));
|
|
2931
2930
|
});
|
|
2932
2931
|
};
|
|
2933
|
-
}), this.Collection = (o = this, ft(oi.prototype, function(
|
|
2932
|
+
}), this.Collection = (o = this, ft(oi.prototype, function(_, y) {
|
|
2934
2933
|
this.db = o;
|
|
2935
2934
|
var p = or, m = null;
|
|
2936
2935
|
if (y) try {
|
|
@@ -2938,52 +2937,52 @@ var Mr = { exports: {} };
|
|
|
2938
2937
|
} catch (E) {
|
|
2939
2938
|
m = E;
|
|
2940
2939
|
}
|
|
2941
|
-
var
|
|
2942
|
-
this._ctx = { table: y, index:
|
|
2943
|
-
})), this.Table = (a = this, ft(ur.prototype, function(f,
|
|
2944
|
-
this.db = a, this._tx = p, this.name = f, this.schema =
|
|
2945
|
-
})), this.Transaction = (c = this, ft(ci.prototype, function(f,
|
|
2940
|
+
var w = _._ctx, y = w.table, _ = y.hook.reading.fire;
|
|
2941
|
+
this._ctx = { table: y, index: w.index, isPrimKey: !w.index || y.schema.primKey.keyPath && w.index === y.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: m, or: w.or, valueMapper: _ !== at ? _ : null };
|
|
2942
|
+
})), this.Table = (a = this, ft(ur.prototype, function(f, S, p) {
|
|
2943
|
+
this.db = a, this._tx = p, this.name = f, this.schema = S, this.hook = a._allTables[f] ? a._allTables[f].hook : dt(null, { creating: [Jr, J], reading: [Xr, at], updating: [Zr, J], deleting: [Vr, J] });
|
|
2944
|
+
})), this.Transaction = (c = this, ft(ci.prototype, function(f, S, p, m, w) {
|
|
2946
2945
|
var y = this;
|
|
2947
|
-
this.db = c, this.mode = f, this.storeNames =
|
|
2948
|
-
y._resolve =
|
|
2946
|
+
this.db = c, this.mode = f, this.storeNames = S, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new B(function(_, E) {
|
|
2947
|
+
y._resolve = _, y._reject = E;
|
|
2949
2948
|
}), this._completion.then(function() {
|
|
2950
2949
|
y.active = !1, y.on.complete.fire();
|
|
2951
|
-
}, function(
|
|
2950
|
+
}, function(_) {
|
|
2952
2951
|
var E = y.active;
|
|
2953
|
-
return y.active = !1, y.on.error.fire(
|
|
2952
|
+
return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), te(_);
|
|
2954
2953
|
});
|
|
2955
2954
|
})), this.Version = (u = this, ft(gi.prototype, function(f) {
|
|
2956
2955
|
this.db = u, this._cfg = { version: f, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
2957
|
-
})), this.WhereClause = (h = this, ft(pr.prototype, function(f,
|
|
2958
|
-
if (this.db = h, this._ctx = { table: f, index:
|
|
2959
|
-
return
|
|
2960
|
-
}, this._max = function(m,
|
|
2961
|
-
return 0 <
|
|
2962
|
-
}, this._min = function(m,
|
|
2963
|
-
return
|
|
2956
|
+
})), this.WhereClause = (h = this, ft(pr.prototype, function(f, S, p) {
|
|
2957
|
+
if (this.db = h, this._ctx = { table: f, index: S === ":id" ? null : S, or: p }, this._cmp = this._ascending = Y, this._descending = function(m, w) {
|
|
2958
|
+
return Y(w, m);
|
|
2959
|
+
}, this._max = function(m, w) {
|
|
2960
|
+
return 0 < Y(m, w) ? m : w;
|
|
2961
|
+
}, this._min = function(m, w) {
|
|
2962
|
+
return Y(m, w) < 0 ? m : w;
|
|
2964
2963
|
}, this._IDBKeyRange = h._deps.IDBKeyRange, !this._IDBKeyRange) throw new $.MissingAPI();
|
|
2965
2964
|
})), this.on("versionchange", function(f) {
|
|
2966
2965
|
0 < f.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
|
|
2967
2966
|
}), this.on("blocked", function(f) {
|
|
2968
2967
|
!f.newVersion || f.newVersion < f.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(f.oldVersion / 10));
|
|
2969
|
-
}), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f,
|
|
2970
|
-
return new n.Transaction(f,
|
|
2968
|
+
}), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f, S, p, m) {
|
|
2969
|
+
return new n.Transaction(f, S, p, n._options.chromeTransactionDurability, m);
|
|
2971
2970
|
}, this._fireOnBlocked = function(f) {
|
|
2972
|
-
n.on("blocked").fire(f), et.filter(function(
|
|
2973
|
-
return
|
|
2974
|
-
}).map(function(
|
|
2975
|
-
return
|
|
2971
|
+
n.on("blocked").fire(f), et.filter(function(S) {
|
|
2972
|
+
return S.name === n.name && S !== n && !S._state.vcFired;
|
|
2973
|
+
}).map(function(S) {
|
|
2974
|
+
return S.on("versionchange").fire(f);
|
|
2976
2975
|
});
|
|
2977
2976
|
}, this.use(vi), this.use(Ei), this.use(wi), this.use(mi), this.use(bi);
|
|
2978
|
-
var b = new Proxy(this, { get: function(f,
|
|
2979
|
-
if (
|
|
2980
|
-
if (
|
|
2981
|
-
return Qt(n.table(
|
|
2977
|
+
var b = new Proxy(this, { get: function(f, S, p) {
|
|
2978
|
+
if (S === "_vip") return !0;
|
|
2979
|
+
if (S === "table") return function(w) {
|
|
2980
|
+
return Qt(n.table(w), b);
|
|
2982
2981
|
};
|
|
2983
|
-
var m = Reflect.get(f,
|
|
2984
|
-
return m instanceof ur ? Qt(m, b) :
|
|
2985
|
-
return Qt(
|
|
2986
|
-
}) :
|
|
2982
|
+
var m = Reflect.get(f, S, p);
|
|
2983
|
+
return m instanceof ur ? Qt(m, b) : S === "tables" ? m.map(function(w) {
|
|
2984
|
+
return Qt(w, b);
|
|
2985
|
+
}) : S === "_createTransaction" ? function() {
|
|
2987
2986
|
return Qt(m.apply(this, arguments), b);
|
|
2988
2987
|
} : m;
|
|
2989
2988
|
} });
|
|
@@ -2991,9 +2990,9 @@ var Mr = { exports: {} };
|
|
|
2991
2990
|
return f(n);
|
|
2992
2991
|
});
|
|
2993
2992
|
}
|
|
2994
|
-
var Xt,
|
|
2993
|
+
var Xt, ge = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Oi = (Bn.prototype.subscribe = function(e, t, n) {
|
|
2995
2994
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
|
|
2996
|
-
}, Bn.prototype[
|
|
2995
|
+
}, Bn.prototype[ge] = function() {
|
|
2997
2996
|
return this;
|
|
2998
2997
|
}, Bn);
|
|
2999
2998
|
function Bn(e) {
|
|
@@ -3012,13 +3011,13 @@ var Mr = { exports: {} };
|
|
|
3012
3011
|
u || (u = !0, c && c.abort(), f && Re.storagemutated.unsubscribe(p));
|
|
3013
3012
|
} };
|
|
3014
3013
|
o.start && o.start(b);
|
|
3015
|
-
var f = !1,
|
|
3014
|
+
var f = !1, S = function() {
|
|
3016
3015
|
return hn(m);
|
|
3017
|
-
}, p = function(
|
|
3018
|
-
zt(h,
|
|
3016
|
+
}, p = function(w) {
|
|
3017
|
+
zt(h, w), In(g, h) && S();
|
|
3019
3018
|
}, m = function() {
|
|
3020
|
-
var
|
|
3021
|
-
!u && Xt.indexedDB && (h = {},
|
|
3019
|
+
var w, y, _;
|
|
3020
|
+
!u && Xt.indexedDB && (h = {}, w = {}, c && c.abort(), c = new AbortController(), _ = function(E) {
|
|
3022
3021
|
var O = Ve();
|
|
3023
3022
|
try {
|
|
3024
3023
|
a && qe();
|
|
@@ -3027,11 +3026,11 @@ var Mr = { exports: {} };
|
|
|
3027
3026
|
} finally {
|
|
3028
3027
|
O && Ze();
|
|
3029
3028
|
}
|
|
3030
|
-
}(y = { subscr:
|
|
3029
|
+
}(y = { subscr: w, signal: c.signal, requery: S, querier: e, trans: null }), Promise.resolve(_).then(function(E) {
|
|
3031
3030
|
n = !0, t = E, u || y.signal.aborted || (h = {}, function(O) {
|
|
3032
|
-
for (var A in O) if (
|
|
3031
|
+
for (var A in O) if (ee(O, A)) return;
|
|
3033
3032
|
return 1;
|
|
3034
|
-
}(g =
|
|
3033
|
+
}(g = w) || f || (Re(gt, p), f = !0), hn(function() {
|
|
3035
3034
|
return !u && o.next && o.next(E);
|
|
3036
3035
|
}));
|
|
3037
3036
|
}, function(E) {
|
|
@@ -3040,7 +3039,7 @@ var Mr = { exports: {} };
|
|
|
3040
3039
|
});
|
|
3041
3040
|
}));
|
|
3042
3041
|
};
|
|
3043
|
-
return setTimeout(
|
|
3042
|
+
return setTimeout(S, 0), b;
|
|
3044
3043
|
});
|
|
3045
3044
|
return i.hasValue = function() {
|
|
3046
3045
|
return n;
|
|
@@ -3050,14 +3049,14 @@ var Mr = { exports: {} };
|
|
|
3050
3049
|
}
|
|
3051
3050
|
var We = Oe;
|
|
3052
3051
|
function Ln(e) {
|
|
3053
|
-
var t =
|
|
3052
|
+
var t = Te;
|
|
3054
3053
|
try {
|
|
3055
|
-
|
|
3054
|
+
Te = !0, Re.storagemutated.fire(e), Tn(e, !0);
|
|
3056
3055
|
} finally {
|
|
3057
|
-
|
|
3056
|
+
Te = t;
|
|
3058
3057
|
}
|
|
3059
3058
|
}
|
|
3060
|
-
|
|
3059
|
+
le(We, l(l({}, Ot), { delete: function(e) {
|
|
3061
3060
|
return new We(e, { addons: [] }).delete();
|
|
3062
3061
|
}, exists: function(e) {
|
|
3063
3062
|
return new We(e, { addons: [] }).open().then(function(t) {
|
|
@@ -3071,7 +3070,7 @@ var Mr = { exports: {} };
|
|
|
3071
3070
|
return i.map(function(o) {
|
|
3072
3071
|
return o.name;
|
|
3073
3072
|
}).filter(function(o) {
|
|
3074
|
-
return o !==
|
|
3073
|
+
return o !== Tt;
|
|
3075
3074
|
});
|
|
3076
3075
|
}) : An(n, t).toCollection().primaryKeys()).then(e);
|
|
3077
3076
|
} catch {
|
|
@@ -3080,14 +3079,14 @@ var Mr = { exports: {} };
|
|
|
3080
3079
|
var t, n;
|
|
3081
3080
|
}, defineClass: function() {
|
|
3082
3081
|
return function(e) {
|
|
3083
|
-
|
|
3082
|
+
N(this, e);
|
|
3084
3083
|
};
|
|
3085
3084
|
}, ignoreTransaction: function(e) {
|
|
3086
3085
|
return G.trans ? Ge(G.transless, e) : e();
|
|
3087
3086
|
}, vip: Dn, async: function(e) {
|
|
3088
3087
|
return function() {
|
|
3089
3088
|
try {
|
|
3090
|
-
var t =
|
|
3089
|
+
var t = Mn(e.apply(this, arguments));
|
|
3091
3090
|
return t && typeof t.then == "function" ? t : B.resolve(t);
|
|
3092
3091
|
} catch (n) {
|
|
3093
3092
|
return te(n);
|
|
@@ -3095,7 +3094,7 @@ var Mr = { exports: {} };
|
|
|
3095
3094
|
};
|
|
3096
3095
|
}, spawn: function(e, t, n) {
|
|
3097
3096
|
try {
|
|
3098
|
-
var i =
|
|
3097
|
+
var i = Mn(e.apply(n, t || []));
|
|
3099
3098
|
return i && typeof i.then == "function" ? i : B.resolve(i);
|
|
3100
3099
|
} catch (o) {
|
|
3101
3100
|
return te(o);
|
|
@@ -3105,59 +3104,59 @@ var Mr = { exports: {} };
|
|
|
3105
3104
|
} }, waitFor: function(e, t) {
|
|
3106
3105
|
return t = B.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), G.trans ? G.trans.waitFor(t) : t;
|
|
3107
3106
|
}, Promise: B, debug: { get: function() {
|
|
3108
|
-
return
|
|
3107
|
+
return me;
|
|
3109
3108
|
}, set: function(e) {
|
|
3110
3109
|
Zn(e);
|
|
3111
|
-
} }, derive: Ye, extend:
|
|
3112
|
-
typeof t == "string" ?
|
|
3113
|
-
|
|
3110
|
+
} }, derive: Ye, extend: N, props: le, override: zn, Events: dt, on: Re, liveQuery: Pr, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
|
|
3111
|
+
typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
|
|
3112
|
+
fe(e, n, void 0);
|
|
3114
3113
|
});
|
|
3115
|
-
}, shallowClone: Yn, deepClone:
|
|
3114
|
+
}, shallowClone: Yn, deepClone: Me, getObjectDiff: jn, cmp: Y, asap: Hn, minKey: -1 / 0, addons: [], connections: et, errnames: rn, dependencies: Xt, cache: Ue, semVer: "4.0.10", version: "4.0.10".split(".").map(function(e) {
|
|
3116
3115
|
return parseInt(e);
|
|
3117
3116
|
}).reduce(function(e, t, n) {
|
|
3118
3117
|
return e + t / Math.pow(10, 2 * n);
|
|
3119
3118
|
}) })), We.maxKey = yt(We.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Re(gt, function(e) {
|
|
3120
|
-
|
|
3119
|
+
Te || (e = new CustomEvent(vn, { detail: e }), Te = !0, dispatchEvent(e), Te = !1);
|
|
3121
3120
|
}), addEventListener(vn, function(e) {
|
|
3122
|
-
e = e.detail,
|
|
3121
|
+
e = e.detail, Te || Ln(e);
|
|
3123
3122
|
}));
|
|
3124
|
-
var rt,
|
|
3123
|
+
var rt, Te = !1, Ir = function() {
|
|
3125
3124
|
};
|
|
3126
3125
|
return typeof BroadcastChannel < "u" && ((Ir = function() {
|
|
3127
3126
|
(rt = new BroadcastChannel(vn)).onmessage = function(e) {
|
|
3128
3127
|
return e.data && Ln(e.data);
|
|
3129
3128
|
};
|
|
3130
3129
|
})(), typeof rt.unref == "function" && rt.unref(), Re(gt, function(e) {
|
|
3131
|
-
|
|
3130
|
+
Te || rt.postMessage(e);
|
|
3132
3131
|
})), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
|
|
3133
3132
|
if (!Oe.disableBfCache && e.persisted) {
|
|
3134
|
-
|
|
3133
|
+
me && console.debug("Dexie: handling persisted pagehide"), rt != null && rt.close();
|
|
3135
3134
|
for (var t = 0, n = et; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
|
|
3136
3135
|
}
|
|
3137
3136
|
}), addEventListener("pageshow", function(e) {
|
|
3138
|
-
!Oe.disableBfCache && e.persisted && (
|
|
3137
|
+
!Oe.disableBfCache && e.persisted && (me && console.debug("Dexie: handling persisted pageshow"), Ir(), Ln({ all: new se(-1 / 0, [[]]) }));
|
|
3139
3138
|
})), B.rejectionMapper = function(e, t) {
|
|
3140
3139
|
return !e || e instanceof Xe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Vn[e.name] ? e : (t = new Vn[e.name](t || e.message, e), "stack" in e && Ae(t, "stack", { get: function() {
|
|
3141
3140
|
return this.inner.stack;
|
|
3142
3141
|
} }), t);
|
|
3143
|
-
}, Zn(
|
|
3142
|
+
}, Zn(me), l(Oe, Object.freeze({ __proto__: null, Dexie: Oe, liveQuery: Pr, Entity: ar, cmp: Y, PropModSymbol: Ee, PropModification: ht, replacePrefix: function(e, t) {
|
|
3144
3143
|
return new ht({ replacePrefix: [e, t] });
|
|
3145
3144
|
}, add: function(e) {
|
|
3146
3145
|
return new ht({ add: e });
|
|
3147
3146
|
}, remove: function(e) {
|
|
3148
3147
|
return new ht({ remove: e });
|
|
3149
|
-
}, default: Oe, RangeSet:
|
|
3148
|
+
}, default: Oe, RangeSet: se, mergeRanges: vt, rangesOverlap: vr }), { default: Oe }), Oe;
|
|
3150
3149
|
});
|
|
3151
|
-
})(
|
|
3152
|
-
var Ii =
|
|
3150
|
+
})(Tr);
|
|
3151
|
+
var Ii = Tr.exports;
|
|
3153
3152
|
const Un = /* @__PURE__ */ Pi(Ii), Rr = Symbol.for("Dexie"), qt = globalThis[Rr] || (globalThis[Rr] = Un);
|
|
3154
3153
|
if (Un.semVer !== qt.semVer)
|
|
3155
3154
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${qt.semVer}`);
|
|
3156
|
-
function
|
|
3155
|
+
function V(d) {
|
|
3157
3156
|
let r = `${d.type}.${d.topics}`;
|
|
3158
3157
|
return d.order && (r += `.${d.order}`), d.period && (r += `.${d.period}`), r;
|
|
3159
3158
|
}
|
|
3160
|
-
function
|
|
3159
|
+
function Mr(d) {
|
|
3161
3160
|
var r;
|
|
3162
3161
|
if (d.widget === void 0) {
|
|
3163
3162
|
const s = (r = d.topics) == null ? void 0 : r.split("-");
|
|
@@ -3165,12 +3164,12 @@ function Tr(d) {
|
|
|
3165
3164
|
}
|
|
3166
3165
|
return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
|
|
3167
3166
|
}
|
|
3168
|
-
function
|
|
3169
|
-
var
|
|
3170
|
-
let s, l, x, D,
|
|
3167
|
+
function St(d, r) {
|
|
3168
|
+
var F;
|
|
3169
|
+
let s, l, x, D, j;
|
|
3171
3170
|
switch (d.moderation) {
|
|
3172
3171
|
case Zt.BEFORE:
|
|
3173
|
-
s = /* @__PURE__ */ new Date(), l = (
|
|
3172
|
+
s = /* @__PURE__ */ new Date(), l = (F = d.beforeTime) == null ? void 0 : F.split(":"), x = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), j = Number.parseInt(l ? l[2] : "00"), r.before = s.setHours(x, D, j, 0) / 1e3, r.period || (r.period = s.getDay() === 1 ? 72 : 24);
|
|
3174
3173
|
break;
|
|
3175
3174
|
case Zt.DELAYED:
|
|
3176
3175
|
d.delay && d.delay > 0 && (r.delay = `${d.delay}`);
|
|
@@ -3194,56 +3193,56 @@ class jr {
|
|
|
3194
3193
|
* @returns IResponse
|
|
3195
3194
|
*/
|
|
3196
3195
|
k(this, "getCloud", async (r) => {
|
|
3197
|
-
const s = await this.db.table(
|
|
3196
|
+
const s = await this.db.table(K.CLOUD).where({ id: r.widget }).last().catch(() => {
|
|
3198
3197
|
console.warn(
|
|
3199
3198
|
"%capi%C %ccloud",
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3199
|
+
v.API,
|
|
3200
|
+
v.NONE,
|
|
3201
|
+
v.CLOUD,
|
|
3203
3202
|
r.slide,
|
|
3204
3203
|
r.widget
|
|
3205
3204
|
);
|
|
3206
3205
|
});
|
|
3207
|
-
return s
|
|
3206
|
+
return typeof s > "u" ? { data: null, message: "Cloud Data error", success: !1 } : (s.data.presentation = (r == null ? void 0 : r.presentation) || "not set", s.data.slide = (r == null ? void 0 : r.slide) || "not set", s.data.query = r, s.query = r, s.message = "Messages retrieved successfully", s.success = !0, s);
|
|
3208
3207
|
});
|
|
3209
3208
|
/**
|
|
3210
|
-
* Retrieve
|
|
3209
|
+
* Retrieve Series Data
|
|
3211
3210
|
* @param query IQuery
|
|
3212
3211
|
* @returns IResponse
|
|
3213
3212
|
*/
|
|
3214
3213
|
k(this, "getSeries", async (r) => {
|
|
3215
|
-
const s = await this.db.table(
|
|
3214
|
+
const s = await this.db.table(K.SERIES).where({ id: r.widget }).last().catch(() => {
|
|
3216
3215
|
console.warn(
|
|
3217
3216
|
"%capi%c %cseries",
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3217
|
+
v.API,
|
|
3218
|
+
v.NONE,
|
|
3219
|
+
v.SERIES,
|
|
3221
3220
|
r.slide,
|
|
3222
3221
|
r.widget
|
|
3223
3222
|
);
|
|
3224
3223
|
});
|
|
3225
|
-
return s === void 0 ? { data: null, message: "Series Data error", success: !1 } : (s.data.presentation = (r == null ? void 0 : r.presentation) || "not set", s.data.slide = (r == null ? void 0 : r.slide) || "not set", s.message = "Messages retrieved successfully", s.success = !0, s);
|
|
3224
|
+
return s === void 0 ? { data: null, message: "Series Data error", success: !1 } : (s.data.presentation = (r == null ? void 0 : r.presentation) || "not set", s.data.slide = (r == null ? void 0 : r.slide) || "not set", s.data.query = r, s.query = r, s.message = "Messages retrieved successfully", s.success = !0, s);
|
|
3226
3225
|
});
|
|
3227
3226
|
/**
|
|
3228
|
-
* Retrieve
|
|
3227
|
+
* Retrieve Messages Data
|
|
3229
3228
|
* @param query IQuery
|
|
3230
3229
|
* @returns IResponse
|
|
3231
3230
|
*/
|
|
3232
3231
|
k(this, "getMessages", async (r) => {
|
|
3233
3232
|
const s = (r == null ? void 0 : r.order) ?? "utc";
|
|
3234
3233
|
s !== "utc" && (r.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? r.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : r.before = Math.floor(Date.now() / 1e3);
|
|
3235
|
-
const l = (
|
|
3234
|
+
const l = (j) => j.utc > ((r == null ? void 0 : r.since) || 0), x = (j) => j.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (j) => (j == null ? void 0 : j.visible) !== 0;
|
|
3236
3235
|
try {
|
|
3237
|
-
const
|
|
3238
|
-
if (
|
|
3236
|
+
const F = await this.db.table(K.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(l).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(s);
|
|
3237
|
+
if (F.length === 0)
|
|
3239
3238
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3240
|
-
let
|
|
3241
|
-
return qt.Promise.all(
|
|
3242
|
-
const
|
|
3239
|
+
let N = F.map((X) => this.db.table(K.MESSAGES).get({ id: X.message_id }));
|
|
3240
|
+
return qt.Promise.all(N).then(async (X) => {
|
|
3241
|
+
const ae = X.map((le) => le.data), ee = {
|
|
3243
3242
|
data: {
|
|
3244
3243
|
presentation: (r == null ? void 0 : r.presentation) || "not set",
|
|
3245
3244
|
slide: (r == null ? void 0 : r.slide) || "not set",
|
|
3246
|
-
messages:
|
|
3245
|
+
messages: ae,
|
|
3247
3246
|
dashboard: r.dashboard,
|
|
3248
3247
|
widget: r.widget,
|
|
3249
3248
|
query: r
|
|
@@ -3253,20 +3252,20 @@ class jr {
|
|
|
3253
3252
|
};
|
|
3254
3253
|
return console.debug(
|
|
3255
3254
|
"%cstorage%c %cmessages",
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
),
|
|
3255
|
+
v.STORAGE,
|
|
3256
|
+
v.NONE,
|
|
3257
|
+
v.MESSAGES,
|
|
3258
|
+
ee
|
|
3259
|
+
), ee;
|
|
3261
3260
|
});
|
|
3262
|
-
} catch (
|
|
3261
|
+
} catch (j) {
|
|
3263
3262
|
return console.warn(
|
|
3264
3263
|
"%cstorage%c %cmessages",
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3264
|
+
v.STORAGE,
|
|
3265
|
+
v.NONE,
|
|
3266
|
+
v.MESSAGES,
|
|
3268
3267
|
r,
|
|
3269
|
-
|
|
3268
|
+
j
|
|
3270
3269
|
), { data: null, message: "Messages Data error", success: !1 };
|
|
3271
3270
|
}
|
|
3272
3271
|
});
|
|
@@ -3276,22 +3275,24 @@ class jr {
|
|
|
3276
3275
|
* @param data
|
|
3277
3276
|
* @returns number
|
|
3278
3277
|
*/
|
|
3279
|
-
k(this, "setCloud", async (r, s) => r.type ===
|
|
3278
|
+
k(this, "setCloud", async (r, s) => r.type === K.CLOUD && s !== "" ? await this.db.table(K.CLOUD).put({
|
|
3280
3279
|
id: r.widget,
|
|
3281
3280
|
dashboard_id: r.dashboard,
|
|
3282
|
-
data:
|
|
3283
|
-
|
|
3281
|
+
//data: data.data,
|
|
3282
|
+
data: s
|
|
3283
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", v.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3284
3284
|
/**
|
|
3285
3285
|
* Update Series
|
|
3286
3286
|
* @param query IQuery
|
|
3287
3287
|
* @param data
|
|
3288
3288
|
* @returns number
|
|
3289
3289
|
*/
|
|
3290
|
-
k(this, "setSeries", async (r, s) => r.type ===
|
|
3290
|
+
k(this, "setSeries", async (r, s) => r.type === K.SERIES && s !== "" ? await this.db.table(K.SERIES).put({
|
|
3291
3291
|
id: r.widget,
|
|
3292
3292
|
dashboard_id: r.dashboard,
|
|
3293
|
-
data:
|
|
3294
|
-
|
|
3293
|
+
//data: data.data,
|
|
3294
|
+
data: s
|
|
3295
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", v.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3295
3296
|
/**
|
|
3296
3297
|
* Update Messages
|
|
3297
3298
|
* @param query IQuery
|
|
@@ -3299,13 +3300,13 @@ class jr {
|
|
|
3299
3300
|
* @returns number
|
|
3300
3301
|
*/
|
|
3301
3302
|
k(this, "setMessages", async (r, s) => {
|
|
3302
|
-
if (r.type !==
|
|
3303
|
+
if (r.type !== K.MESSAGES)
|
|
3303
3304
|
return 400;
|
|
3304
3305
|
const l = s.data.title;
|
|
3305
3306
|
let x = 0;
|
|
3306
3307
|
return s.data.messages.forEach(async (D) => {
|
|
3307
|
-
var
|
|
3308
|
-
D.id !== null && (await this.db.table(
|
|
3308
|
+
var j, F, N, X, ae, ee, le;
|
|
3309
|
+
D.id !== null && (await this.db.table(K.MESSAGES).put({
|
|
3309
3310
|
id: D.id,
|
|
3310
3311
|
utc: D.utc,
|
|
3311
3312
|
data: D,
|
|
@@ -3313,27 +3314,27 @@ class jr {
|
|
|
3313
3314
|
}).catch((He) => {
|
|
3314
3315
|
x++, console.error(
|
|
3315
3316
|
"%cstorage",
|
|
3316
|
-
|
|
3317
|
+
v.STORAGE,
|
|
3317
3318
|
"set message",
|
|
3318
3319
|
`title: ${l}`,
|
|
3319
3320
|
D,
|
|
3320
3321
|
He.message
|
|
3321
3322
|
);
|
|
3322
|
-
}), await this.db.table(
|
|
3323
|
+
}), await this.db.table(K.TOPICS).put({
|
|
3323
3324
|
title: l,
|
|
3324
3325
|
widget_id: r.widget,
|
|
3325
3326
|
message_id: D.id,
|
|
3326
3327
|
dashboard_id: r.dashboard,
|
|
3327
|
-
engagement: ((
|
|
3328
|
-
impressions: ((
|
|
3329
|
-
reach: ((
|
|
3330
|
-
sentiment: ((
|
|
3328
|
+
engagement: ((j = D.topics[0]) == null ? void 0 : j.engagement) || ((F = D.dynamics) == null ? void 0 : F.engagement) || 0,
|
|
3329
|
+
impressions: ((N = D.topics[0]) == null ? void 0 : N.impressions) || ((X = D.dynamics) == null ? void 0 : X.semrush_visits) || 0,
|
|
3330
|
+
reach: ((ae = D.topics[0]) == null ? void 0 : ae.reach) || ((ee = D.dynamics) == null ? void 0 : ee.potential_reach) || 0,
|
|
3331
|
+
sentiment: ((le = D.topics[0]) == null ? void 0 : le.sentiment) || 0,
|
|
3331
3332
|
utc: D.utc,
|
|
3332
3333
|
expires: D.expires
|
|
3333
3334
|
}).catch((He) => {
|
|
3334
3335
|
x++, console.error(
|
|
3335
3336
|
"%cstorage",
|
|
3336
|
-
|
|
3337
|
+
v.STORAGE,
|
|
3337
3338
|
"set topic",
|
|
3338
3339
|
`title: ${l}`,
|
|
3339
3340
|
D,
|
|
@@ -3341,15 +3342,15 @@ class jr {
|
|
|
3341
3342
|
);
|
|
3342
3343
|
}));
|
|
3343
3344
|
}), s.data.topics.forEach(async (D) => {
|
|
3344
|
-
const
|
|
3345
|
-
await this.db.table(
|
|
3345
|
+
const j = D.message_id, F = D.visible ? 1 : 0, N = D.title;
|
|
3346
|
+
await this.db.table(K.TOPICS).where("message_id").equals(j).modify({ visible: F }).catch((X) => {
|
|
3346
3347
|
x++, console.error(
|
|
3347
3348
|
"%cstorage",
|
|
3348
|
-
|
|
3349
|
+
v.STORAGE,
|
|
3349
3350
|
"update message visibility",
|
|
3350
|
-
`title: ${
|
|
3351
|
+
`title: ${N}`,
|
|
3351
3352
|
`widget: ${D.widget_id}`,
|
|
3352
|
-
|
|
3353
|
+
X.message
|
|
3353
3354
|
);
|
|
3354
3355
|
});
|
|
3355
3356
|
}), x === 0 ? 201 : 400;
|
|
@@ -3359,26 +3360,26 @@ class jr {
|
|
|
3359
3360
|
*/
|
|
3360
3361
|
k(this, "cleanMessages", async () => {
|
|
3361
3362
|
const r = Date.now() / 1e3, s = (D) => D.expires < r, l = (D) => D.expires < r;
|
|
3362
|
-
return await this.db.table(
|
|
3363
|
+
return await this.db.table(K.TOPICS).orderBy("expires").filter(s).delete().catch((D) => (console.error(
|
|
3363
3364
|
"%cstorage%c %cclean",
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3365
|
+
v.STORAGE,
|
|
3366
|
+
v.NONE,
|
|
3367
|
+
v.MESSAGES,
|
|
3367
3368
|
D.message
|
|
3368
|
-
), 0)), await this.db.table(
|
|
3369
|
+
), 0)), await this.db.table(K.MESSAGES).orderBy("expires").filter(l).delete().catch((D) => (console.error(
|
|
3369
3370
|
"%cstorage%c %clean",
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3371
|
+
v.STORAGE,
|
|
3372
|
+
v.NONE,
|
|
3373
|
+
v.MESSAGES,
|
|
3373
3374
|
D.message
|
|
3374
3375
|
), 0));
|
|
3375
3376
|
});
|
|
3376
3377
|
k(this, "hideMessage", async (r, s) => {
|
|
3377
|
-
await this.db.table(
|
|
3378
|
+
await this.db.table(K.TOPICS).where("message_id").equals(r).modify({ visible: s ? 1 : 0 }).catch((l) => (console.error(
|
|
3378
3379
|
"%cstorage%c %chide",
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3380
|
+
v.STORAGE,
|
|
3381
|
+
v.NONE,
|
|
3382
|
+
v.HIDE,
|
|
3382
3383
|
l.message
|
|
3383
3384
|
), 0));
|
|
3384
3385
|
});
|
|
@@ -3387,14 +3388,14 @@ class jr {
|
|
|
3387
3388
|
* @param query IQuery
|
|
3388
3389
|
* @returns number
|
|
3389
3390
|
*/
|
|
3390
|
-
k(this, "setWidget", async (r) => await this.db.table(
|
|
3391
|
+
k(this, "setWidget", async (r) => await this.db.table(K.WIDGETS).put({
|
|
3391
3392
|
id: r.widget,
|
|
3392
3393
|
dashboard_id: r.dashboard,
|
|
3393
3394
|
type: r.type
|
|
3394
3395
|
}).then(() => 201).catch((s) => (console.error(
|
|
3395
3396
|
"%cstorage",
|
|
3396
|
-
|
|
3397
|
-
|
|
3397
|
+
v.STORAGE,
|
|
3398
|
+
K.WIDGET,
|
|
3398
3399
|
r,
|
|
3399
3400
|
s.message
|
|
3400
3401
|
), 400)));
|
|
@@ -3403,15 +3404,21 @@ class jr {
|
|
|
3403
3404
|
* @param query IQuery
|
|
3404
3405
|
* @returns null
|
|
3405
3406
|
*/
|
|
3406
|
-
k(this, "subscribe", (r) => (r =
|
|
3407
|
+
k(this, "subscribe", (r) => (r = Mr(r), this.subscribers.filter(
|
|
3407
3408
|
(l) => l.widget === r.widget
|
|
3408
|
-
).length > 0 || (r.type ===
|
|
3409
|
+
).length > 0 || (r.type === K.MESSAGES && (r = St(this.options, r)), console.info(
|
|
3409
3410
|
"%cstorage%c %csubscribe",
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3411
|
+
v.STORAGE,
|
|
3412
|
+
v.NONE,
|
|
3413
|
+
v.SUBSCRIBE,
|
|
3413
3414
|
r.slide,
|
|
3414
3415
|
r.widget
|
|
3416
|
+
), console.debug(
|
|
3417
|
+
"%cstorage%c %csubscribe",
|
|
3418
|
+
v.STORAGE,
|
|
3419
|
+
v.NONE,
|
|
3420
|
+
v.SUBSCRIBE,
|
|
3421
|
+
r
|
|
3415
3422
|
), this.subscribers.push(r)), null));
|
|
3416
3423
|
/**
|
|
3417
3424
|
* Get current subscribers
|
|
@@ -3424,12 +3431,12 @@ class jr {
|
|
|
3424
3431
|
* @returns IResponse
|
|
3425
3432
|
*/
|
|
3426
3433
|
k(this, "loadSlide", async (r) => {
|
|
3427
|
-
const s = await this.db.table(
|
|
3434
|
+
const s = await this.db.table(K.SLIDE).where({ id: r.id }).last().catch(() => {
|
|
3428
3435
|
console.warn(
|
|
3429
3436
|
"%capi%c %cseries",
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3437
|
+
v.API,
|
|
3438
|
+
v.NONE,
|
|
3439
|
+
v.SERIES,
|
|
3433
3440
|
r.id
|
|
3434
3441
|
);
|
|
3435
3442
|
});
|
|
@@ -3440,7 +3447,7 @@ class jr {
|
|
|
3440
3447
|
* @param query IQuery
|
|
3441
3448
|
* @returns number
|
|
3442
3449
|
*/
|
|
3443
|
-
k(this, "storeSlide", async (r) => r.type ===
|
|
3450
|
+
k(this, "storeSlide", async (r) => r.type === K.SLIDE && r.data !== "" ? await this.db.table(K.SLIDE).put({
|
|
3444
3451
|
id: r.id,
|
|
3445
3452
|
title: r.data.title || "Not set",
|
|
3446
3453
|
json: r.data.json || {},
|
|
@@ -3448,7 +3455,7 @@ class jr {
|
|
|
3448
3455
|
css: r.data.css || ""
|
|
3449
3456
|
}).then(() => 200).catch((s) => (console.error(
|
|
3450
3457
|
"%cstorage",
|
|
3451
|
-
|
|
3458
|
+
v.STORAGE,
|
|
3452
3459
|
re.SLIDE_STORE,
|
|
3453
3460
|
r,
|
|
3454
3461
|
s.message
|
|
@@ -3477,33 +3484,33 @@ function Ci(d, r) {
|
|
|
3477
3484
|
const s = indexedDB.open(d);
|
|
3478
3485
|
s.onupgradeneeded = () => s.result.createObjectStore(r);
|
|
3479
3486
|
const l = Wn(s);
|
|
3480
|
-
return (x, D) => l.then((
|
|
3487
|
+
return (x, D) => l.then((j) => D(j.transaction(r, x).objectStore(r)));
|
|
3481
3488
|
}
|
|
3482
3489
|
let $n;
|
|
3483
|
-
function
|
|
3490
|
+
function Nr() {
|
|
3484
3491
|
return $n || ($n = Ci("keyval-store", "keyval")), $n;
|
|
3485
3492
|
}
|
|
3486
|
-
function Vt(d, r =
|
|
3493
|
+
function Vt(d, r = Nr()) {
|
|
3487
3494
|
return r("readonly", (s) => Wn(s.get(d)));
|
|
3488
3495
|
}
|
|
3489
|
-
function wt(d, r, s =
|
|
3496
|
+
function wt(d, r, s = Nr()) {
|
|
3490
3497
|
return s("readwrite", (l) => (l.put(r, d), Wn(l.transaction)));
|
|
3491
3498
|
}
|
|
3492
|
-
class
|
|
3499
|
+
class Kr {
|
|
3493
3500
|
constructor(r) {
|
|
3494
3501
|
k(this, "subscribers", []);
|
|
3495
3502
|
k(this, "options");
|
|
3496
3503
|
k(this, "getCloud", async (r) => {
|
|
3497
|
-
const s =
|
|
3498
|
-
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi",
|
|
3504
|
+
const s = V(r);
|
|
3505
|
+
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", v.API, K.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3499
3506
|
});
|
|
3500
3507
|
k(this, "getSeries", async (r) => {
|
|
3501
|
-
const s =
|
|
3502
|
-
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi",
|
|
3508
|
+
const s = V(r);
|
|
3509
|
+
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", v.API, K.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3503
3510
|
});
|
|
3504
3511
|
k(this, "getMessages", async (r) => {
|
|
3505
|
-
const s =
|
|
3506
|
-
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi",
|
|
3512
|
+
const s = V(r);
|
|
3513
|
+
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", v.API, K.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3507
3514
|
});
|
|
3508
3515
|
/**
|
|
3509
3516
|
* Update Cloud
|
|
@@ -3514,8 +3521,8 @@ class Nr {
|
|
|
3514
3521
|
k(this, "setCloud", async (r, s) => {
|
|
3515
3522
|
if (!s.success)
|
|
3516
3523
|
return 400;
|
|
3517
|
-
const l =
|
|
3518
|
-
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage",
|
|
3524
|
+
const l = V(r);
|
|
3525
|
+
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", v.STORAGE, K.CLOUD, r, x.message), 400));
|
|
3519
3526
|
});
|
|
3520
3527
|
/**
|
|
3521
3528
|
* Update Series
|
|
@@ -3526,8 +3533,8 @@ class Nr {
|
|
|
3526
3533
|
k(this, "setSeries", async (r, s) => {
|
|
3527
3534
|
if (!s.success)
|
|
3528
3535
|
return 400;
|
|
3529
|
-
const l =
|
|
3530
|
-
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage",
|
|
3536
|
+
const l = V(r);
|
|
3537
|
+
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", v.STORAGE, K.SERIES, r, x.message), 400));
|
|
3531
3538
|
});
|
|
3532
3539
|
/**
|
|
3533
3540
|
* Update Messages
|
|
@@ -3538,8 +3545,8 @@ class Nr {
|
|
|
3538
3545
|
k(this, "setMessages", async (r, s) => {
|
|
3539
3546
|
if (!s.success)
|
|
3540
3547
|
return 400;
|
|
3541
|
-
const l =
|
|
3542
|
-
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage",
|
|
3548
|
+
const l = V(r);
|
|
3549
|
+
return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", v.STORAGE, K.MESSAGES, r, x.message), 400));
|
|
3543
3550
|
});
|
|
3544
3551
|
k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
3545
3552
|
k(this, "hideMessage", async (r, s) => {
|
|
@@ -3553,25 +3560,25 @@ class Nr {
|
|
|
3553
3560
|
* @returns number
|
|
3554
3561
|
*/
|
|
3555
3562
|
k(this, "setWidget", async (r) => {
|
|
3556
|
-
const s =
|
|
3563
|
+
const s = V(r), l = {
|
|
3557
3564
|
id: r.widget,
|
|
3558
3565
|
dashboard_id: r.dashboard,
|
|
3559
3566
|
type: r.type
|
|
3560
3567
|
};
|
|
3561
|
-
return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage",
|
|
3568
|
+
return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", v.STORAGE, K.WIDGET, r, x.message), 400));
|
|
3562
3569
|
});
|
|
3563
3570
|
/**
|
|
3564
3571
|
* Add component subscriber
|
|
3565
3572
|
* @param query IQuery
|
|
3566
3573
|
* @returns null
|
|
3567
3574
|
*/
|
|
3568
|
-
k(this, "subscribe", (r) => (r.type ===
|
|
3575
|
+
k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
|
|
3569
3576
|
(l) => l.widget === r.widget
|
|
3570
3577
|
).length > 0 || (console.debug(
|
|
3571
3578
|
"%cstorage%c %csubscribe",
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3579
|
+
v.STORAGE,
|
|
3580
|
+
v.NONE,
|
|
3581
|
+
v.SUBSCRIBE,
|
|
3575
3582
|
r.slide,
|
|
3576
3583
|
r.widget
|
|
3577
3584
|
), this.subscribers.push(r)), null));
|
|
@@ -3581,8 +3588,8 @@ class Nr {
|
|
|
3581
3588
|
*/
|
|
3582
3589
|
k(this, "getSubscribers", async () => await new Promise((r) => r(this.subscribers)));
|
|
3583
3590
|
k(this, "loadSlide", async (r) => {
|
|
3584
|
-
const s =
|
|
3585
|
-
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi",
|
|
3591
|
+
const s = V(r);
|
|
3592
|
+
return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", v.API, K.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
|
|
3586
3593
|
});
|
|
3587
3594
|
/**
|
|
3588
3595
|
* Update Slide
|
|
@@ -3590,14 +3597,14 @@ class Nr {
|
|
|
3590
3597
|
* @returns number
|
|
3591
3598
|
*/
|
|
3592
3599
|
k(this, "storeSlide", async (r) => {
|
|
3593
|
-
const s =
|
|
3600
|
+
const s = V(r), l = {
|
|
3594
3601
|
id: r.id,
|
|
3595
3602
|
title: r.data.title || "Not set",
|
|
3596
3603
|
json: r.data.json || {},
|
|
3597
3604
|
html: r.data.html || "",
|
|
3598
3605
|
css: r.data.css || ""
|
|
3599
3606
|
};
|
|
3600
|
-
return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage",
|
|
3607
|
+
return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", v.STORAGE, K.SLIDE, r, x.message), 400));
|
|
3601
3608
|
});
|
|
3602
3609
|
this.options = r;
|
|
3603
3610
|
}
|
|
@@ -3607,27 +3614,27 @@ class Br {
|
|
|
3607
3614
|
k(this, "subscribers", []);
|
|
3608
3615
|
k(this, "options");
|
|
3609
3616
|
k(this, "getCloud", async (r) => {
|
|
3610
|
-
const s =
|
|
3617
|
+
const s = V(r);
|
|
3611
3618
|
try {
|
|
3612
3619
|
return localStorage.getObject(s);
|
|
3613
3620
|
} catch (l) {
|
|
3614
|
-
return console.warn("%capi",
|
|
3621
|
+
return console.warn("%capi", v.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3615
3622
|
}
|
|
3616
3623
|
});
|
|
3617
3624
|
k(this, "getSeries", async (r) => {
|
|
3618
|
-
const s =
|
|
3625
|
+
const s = V(r);
|
|
3619
3626
|
try {
|
|
3620
3627
|
return localStorage.getObject(s);
|
|
3621
3628
|
} catch (l) {
|
|
3622
|
-
return console.warn("%capi",
|
|
3629
|
+
return console.warn("%capi", v.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3623
3630
|
}
|
|
3624
3631
|
});
|
|
3625
3632
|
k(this, "getMessages", async (r) => {
|
|
3626
|
-
const s =
|
|
3633
|
+
const s = V(r);
|
|
3627
3634
|
try {
|
|
3628
3635
|
return localStorage.getObject(s);
|
|
3629
3636
|
} catch (l) {
|
|
3630
|
-
return console.warn("%capi",
|
|
3637
|
+
return console.warn("%capi", v.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3631
3638
|
}
|
|
3632
3639
|
});
|
|
3633
3640
|
/**
|
|
@@ -3637,11 +3644,11 @@ class Br {
|
|
|
3637
3644
|
* @returns number
|
|
3638
3645
|
*/
|
|
3639
3646
|
k(this, "setCloud", async (r, s) => {
|
|
3640
|
-
const l =
|
|
3647
|
+
const l = V(r);
|
|
3641
3648
|
try {
|
|
3642
3649
|
return localStorage.setObject(l, s), 201;
|
|
3643
3650
|
} catch (x) {
|
|
3644
|
-
return console.error("%cstorage",
|
|
3651
|
+
return console.error("%cstorage", v.STORAGE, K.CLOUD, r, x), 400;
|
|
3645
3652
|
}
|
|
3646
3653
|
});
|
|
3647
3654
|
/**
|
|
@@ -3651,11 +3658,11 @@ class Br {
|
|
|
3651
3658
|
* @returns number
|
|
3652
3659
|
*/
|
|
3653
3660
|
k(this, "setSeries", async (r, s) => {
|
|
3654
|
-
const l =
|
|
3661
|
+
const l = V(r);
|
|
3655
3662
|
try {
|
|
3656
3663
|
return localStorage.setObject(l, s), 201;
|
|
3657
3664
|
} catch (x) {
|
|
3658
|
-
return console.error("%cstorage",
|
|
3665
|
+
return console.error("%cstorage", v.STORAGE, K.SERIES, r, x), 400;
|
|
3659
3666
|
}
|
|
3660
3667
|
});
|
|
3661
3668
|
/**
|
|
@@ -3665,11 +3672,11 @@ class Br {
|
|
|
3665
3672
|
* @returns number
|
|
3666
3673
|
*/
|
|
3667
3674
|
k(this, "setMessages", async (r, s) => {
|
|
3668
|
-
const l =
|
|
3675
|
+
const l = V(r);
|
|
3669
3676
|
try {
|
|
3670
3677
|
return localStorage.setObject(l, s), 200;
|
|
3671
3678
|
} catch (x) {
|
|
3672
|
-
return console.error("%cstorage",
|
|
3679
|
+
return console.error("%cstorage", v.STORAGE, K.MESSAGES, r, x), 400;
|
|
3673
3680
|
}
|
|
3674
3681
|
});
|
|
3675
3682
|
k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -3681,7 +3688,7 @@ class Br {
|
|
|
3681
3688
|
try {
|
|
3682
3689
|
return localStorage.setObject(s, r), 201;
|
|
3683
3690
|
} catch (l) {
|
|
3684
|
-
return console.error("%cstorage",
|
|
3691
|
+
return console.error("%cstorage", v.STORAGE, K.WIDGET, r, l), 400;
|
|
3685
3692
|
}
|
|
3686
3693
|
});
|
|
3687
3694
|
/**
|
|
@@ -3689,13 +3696,13 @@ class Br {
|
|
|
3689
3696
|
* @param query IQuery
|
|
3690
3697
|
* @returns null
|
|
3691
3698
|
*/
|
|
3692
|
-
k(this, "subscribe", (r) => (r.type ===
|
|
3699
|
+
k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
|
|
3693
3700
|
(l) => l.widget === r.widget
|
|
3694
3701
|
).length || (console.debug(
|
|
3695
3702
|
"%cstorage%c %csubscribe",
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3703
|
+
v.STORAGE,
|
|
3704
|
+
v.NONE,
|
|
3705
|
+
v.SUBSCRIBE,
|
|
3699
3706
|
r.slide,
|
|
3700
3707
|
r.widget
|
|
3701
3708
|
), this.subscribers.push(r)), null));
|
|
@@ -3708,7 +3715,7 @@ class Br {
|
|
|
3708
3715
|
try {
|
|
3709
3716
|
return localStorage.getObject(`${r.type}.${r.id}`);
|
|
3710
3717
|
} catch (s) {
|
|
3711
|
-
return console.warn("%capi",
|
|
3718
|
+
return console.warn("%capi", v.API, K.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
|
|
3712
3719
|
}
|
|
3713
3720
|
});
|
|
3714
3721
|
k(this, "storeSlide", async (r) => {
|
|
@@ -3721,7 +3728,7 @@ class Br {
|
|
|
3721
3728
|
css: r.data.css || ""
|
|
3722
3729
|
}), 201;
|
|
3723
3730
|
} catch (s) {
|
|
3724
|
-
return console.error("%cstorage",
|
|
3731
|
+
return console.error("%cstorage", v.STORAGE, K.SLIDE, r, s), 400;
|
|
3725
3732
|
}
|
|
3726
3733
|
});
|
|
3727
3734
|
this.options = r, Storage.prototype.setObject = function(s, l) {
|
|
@@ -3737,27 +3744,27 @@ class Lr {
|
|
|
3737
3744
|
k(this, "subscribers", []);
|
|
3738
3745
|
k(this, "options");
|
|
3739
3746
|
k(this, "getCloud", async (r) => {
|
|
3740
|
-
const s =
|
|
3747
|
+
const s = V(r);
|
|
3741
3748
|
try {
|
|
3742
3749
|
return sessionStorage.getObject(s);
|
|
3743
3750
|
} catch (l) {
|
|
3744
|
-
return console.warn("%capi",
|
|
3751
|
+
return console.warn("%capi", v.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3745
3752
|
}
|
|
3746
3753
|
});
|
|
3747
3754
|
k(this, "getSeries", async (r) => {
|
|
3748
|
-
const s =
|
|
3755
|
+
const s = V(r);
|
|
3749
3756
|
try {
|
|
3750
3757
|
return sessionStorage.getObject(s);
|
|
3751
3758
|
} catch (l) {
|
|
3752
|
-
return console.warn("%capi",
|
|
3759
|
+
return console.warn("%capi", v.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3753
3760
|
}
|
|
3754
3761
|
});
|
|
3755
3762
|
k(this, "getMessages", async (r) => {
|
|
3756
|
-
const s =
|
|
3763
|
+
const s = V(r);
|
|
3757
3764
|
try {
|
|
3758
3765
|
return sessionStorage.getObject(s);
|
|
3759
3766
|
} catch (l) {
|
|
3760
|
-
return console.warn("%capi",
|
|
3767
|
+
return console.warn("%capi", v.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3761
3768
|
}
|
|
3762
3769
|
});
|
|
3763
3770
|
/**
|
|
@@ -3767,11 +3774,11 @@ class Lr {
|
|
|
3767
3774
|
* @returns number
|
|
3768
3775
|
*/
|
|
3769
3776
|
k(this, "setCloud", async (r, s) => {
|
|
3770
|
-
const l =
|
|
3777
|
+
const l = V(r);
|
|
3771
3778
|
try {
|
|
3772
3779
|
return sessionStorage.setObject(l, s), 201;
|
|
3773
3780
|
} catch (x) {
|
|
3774
|
-
return console.error("%cstorage",
|
|
3781
|
+
return console.error("%cstorage", v.STORAGE, K.CLOUD, r, x), 400;
|
|
3775
3782
|
}
|
|
3776
3783
|
});
|
|
3777
3784
|
/**
|
|
@@ -3781,11 +3788,11 @@ class Lr {
|
|
|
3781
3788
|
* @returns number
|
|
3782
3789
|
*/
|
|
3783
3790
|
k(this, "setSeries", async (r, s) => {
|
|
3784
|
-
const l =
|
|
3791
|
+
const l = V(r);
|
|
3785
3792
|
try {
|
|
3786
3793
|
return sessionStorage.setObject(l, s), 201;
|
|
3787
3794
|
} catch (x) {
|
|
3788
|
-
return console.error("%cstorage",
|
|
3795
|
+
return console.error("%cstorage", v.STORAGE, K.SERIES, r, x), 400;
|
|
3789
3796
|
}
|
|
3790
3797
|
});
|
|
3791
3798
|
/**
|
|
@@ -3795,11 +3802,11 @@ class Lr {
|
|
|
3795
3802
|
* @returns number
|
|
3796
3803
|
*/
|
|
3797
3804
|
k(this, "setMessages", async (r, s) => {
|
|
3798
|
-
const l =
|
|
3805
|
+
const l = V(r);
|
|
3799
3806
|
try {
|
|
3800
3807
|
return sessionStorage.setObject(l, s), 200;
|
|
3801
3808
|
} catch (x) {
|
|
3802
|
-
return console.error("%cstorage",
|
|
3809
|
+
return console.error("%cstorage", v.STORAGE, K.MESSAGES, r, x), 400;
|
|
3803
3810
|
}
|
|
3804
3811
|
});
|
|
3805
3812
|
k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -3811,7 +3818,7 @@ class Lr {
|
|
|
3811
3818
|
try {
|
|
3812
3819
|
return sessionStorage.setObject(s, r), 201;
|
|
3813
3820
|
} catch (l) {
|
|
3814
|
-
return console.error("%cstorage",
|
|
3821
|
+
return console.error("%cstorage", v.STORAGE, K.WIDGET, r, l), 400;
|
|
3815
3822
|
}
|
|
3816
3823
|
});
|
|
3817
3824
|
/**
|
|
@@ -3819,13 +3826,13 @@ class Lr {
|
|
|
3819
3826
|
* @param query IQuery
|
|
3820
3827
|
* @returns null
|
|
3821
3828
|
*/
|
|
3822
|
-
k(this, "subscribe", (r) => (r.type ===
|
|
3829
|
+
k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
|
|
3823
3830
|
(l) => l.widget === r.widget
|
|
3824
3831
|
).length || (console.debug(
|
|
3825
3832
|
"%cstorage%c %csubscribe",
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3833
|
+
v.STORAGE,
|
|
3834
|
+
v.NONE,
|
|
3835
|
+
v.SUBSCRIBE,
|
|
3829
3836
|
r.slide,
|
|
3830
3837
|
r.widget
|
|
3831
3838
|
), this.subscribers.push(r)), null));
|
|
@@ -3838,7 +3845,7 @@ class Lr {
|
|
|
3838
3845
|
try {
|
|
3839
3846
|
return sessionStorage.getObject(`${r.type}.${r.id}`);
|
|
3840
3847
|
} catch (s) {
|
|
3841
|
-
return console.warn("%capi",
|
|
3848
|
+
return console.warn("%capi", v.API, K.SLIDE, r.id, s), { data: null, message: "Store Load error", success: !1 };
|
|
3842
3849
|
}
|
|
3843
3850
|
});
|
|
3844
3851
|
/**
|
|
@@ -3856,7 +3863,7 @@ class Lr {
|
|
|
3856
3863
|
css: r.data.css || ""
|
|
3857
3864
|
}), 200;
|
|
3858
3865
|
} catch (s) {
|
|
3859
|
-
return console.error("%cstorage",
|
|
3866
|
+
return console.error("%cstorage", v.STORAGE, K.SLIDE, r, s), 400;
|
|
3860
3867
|
}
|
|
3861
3868
|
});
|
|
3862
3869
|
this.options = r, Storage.prototype.setObject = function(s, l) {
|
|
@@ -3872,27 +3879,27 @@ class Gr {
|
|
|
3872
3879
|
k(this, "subscribers", []);
|
|
3873
3880
|
k(this, "options");
|
|
3874
3881
|
k(this, "getCloud", async (r) => {
|
|
3875
|
-
const s =
|
|
3882
|
+
const s = V(r);
|
|
3876
3883
|
try {
|
|
3877
3884
|
return window.BuzzCasting.WidgetData[s];
|
|
3878
3885
|
} catch (l) {
|
|
3879
|
-
return console.warn("%capi",
|
|
3886
|
+
return console.warn("%capi", v.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
|
|
3880
3887
|
}
|
|
3881
3888
|
});
|
|
3882
3889
|
k(this, "getSeries", async (r) => {
|
|
3883
|
-
const s =
|
|
3890
|
+
const s = V(r);
|
|
3884
3891
|
try {
|
|
3885
3892
|
return window.BuzzCasting.WidgetData[s];
|
|
3886
3893
|
} catch (l) {
|
|
3887
|
-
return console.warn("%capi",
|
|
3894
|
+
return console.warn("%capi", v.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
|
|
3888
3895
|
}
|
|
3889
3896
|
});
|
|
3890
3897
|
k(this, "getMessages", async (r) => {
|
|
3891
|
-
const s =
|
|
3898
|
+
const s = V(r);
|
|
3892
3899
|
try {
|
|
3893
3900
|
return window.BuzzCasting.WidgetData[s];
|
|
3894
3901
|
} catch (l) {
|
|
3895
|
-
return console.warn("%capi",
|
|
3902
|
+
return console.warn("%capi", v.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
|
|
3896
3903
|
}
|
|
3897
3904
|
});
|
|
3898
3905
|
/**
|
|
@@ -3902,11 +3909,11 @@ class Gr {
|
|
|
3902
3909
|
* @returns number
|
|
3903
3910
|
*/
|
|
3904
3911
|
k(this, "setCloud", async (r, s) => {
|
|
3905
|
-
const l =
|
|
3912
|
+
const l = V(r);
|
|
3906
3913
|
try {
|
|
3907
3914
|
return window.BuzzCasting.WidgetData[l] = s, 201;
|
|
3908
3915
|
} catch (x) {
|
|
3909
|
-
return console.error("%cstorage",
|
|
3916
|
+
return console.error("%cstorage", v.STORAGE, "set", r, x), 400;
|
|
3910
3917
|
}
|
|
3911
3918
|
});
|
|
3912
3919
|
/**
|
|
@@ -3916,11 +3923,11 @@ class Gr {
|
|
|
3916
3923
|
* @returns number
|
|
3917
3924
|
*/
|
|
3918
3925
|
k(this, "setSeries", async (r, s) => {
|
|
3919
|
-
const l =
|
|
3926
|
+
const l = V(r);
|
|
3920
3927
|
try {
|
|
3921
3928
|
return window.BuzzCasting.WidgetData[l] = s, 201;
|
|
3922
3929
|
} catch (x) {
|
|
3923
|
-
return console.error("%cstorage",
|
|
3930
|
+
return console.error("%cstorage", v.STORAGE, "set", r, x), 400;
|
|
3924
3931
|
}
|
|
3925
3932
|
});
|
|
3926
3933
|
/**
|
|
@@ -3930,11 +3937,11 @@ class Gr {
|
|
|
3930
3937
|
* @returns number
|
|
3931
3938
|
*/
|
|
3932
3939
|
k(this, "setMessages", async (r, s) => {
|
|
3933
|
-
const l =
|
|
3940
|
+
const l = V(r);
|
|
3934
3941
|
try {
|
|
3935
3942
|
return window.BuzzCasting.WidgetData[l] = s, 201;
|
|
3936
3943
|
} catch (x) {
|
|
3937
|
-
return console.error("%cstorage",
|
|
3944
|
+
return console.error("%cstorage", v.STORAGE, "set", r, x), 400;
|
|
3938
3945
|
}
|
|
3939
3946
|
});
|
|
3940
3947
|
k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
|
|
@@ -3946,7 +3953,7 @@ class Gr {
|
|
|
3946
3953
|
try {
|
|
3947
3954
|
return window.BuzzCasting.WidgetData[s] = r, 201;
|
|
3948
3955
|
} catch (l) {
|
|
3949
|
-
return console.error("%cstorage",
|
|
3956
|
+
return console.error("%cstorage", v.STORAGE, K.WIDGET, r, l), 400;
|
|
3950
3957
|
}
|
|
3951
3958
|
});
|
|
3952
3959
|
/**
|
|
@@ -3954,13 +3961,13 @@ class Gr {
|
|
|
3954
3961
|
* @param query IQuery
|
|
3955
3962
|
* @returns null
|
|
3956
3963
|
*/
|
|
3957
|
-
k(this, "subscribe", (r) => (r.type ===
|
|
3964
|
+
k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
|
|
3958
3965
|
(l) => l.widget === r.widget
|
|
3959
3966
|
).length || (console.debug(
|
|
3960
3967
|
"%cstorage%c %csubscribe",
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3968
|
+
v.STORAGE,
|
|
3969
|
+
v.NONE,
|
|
3970
|
+
v.SUBSCRIBE,
|
|
3964
3971
|
r.slide,
|
|
3965
3972
|
r.widget
|
|
3966
3973
|
), this.subscribers.push(r)), null));
|
|
@@ -3973,7 +3980,7 @@ class Gr {
|
|
|
3973
3980
|
try {
|
|
3974
3981
|
return window.BuzzCasting.SlideData[r.id];
|
|
3975
3982
|
} catch (s) {
|
|
3976
|
-
return console.warn("%capi",
|
|
3983
|
+
return console.warn("%capi", v.API, K.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
|
|
3977
3984
|
}
|
|
3978
3985
|
});
|
|
3979
3986
|
k(this, "storeSlide", async (r) => {
|
|
@@ -3986,7 +3993,7 @@ class Gr {
|
|
|
3986
3993
|
css: r.data.css || ""
|
|
3987
3994
|
}, 201;
|
|
3988
3995
|
} catch (s) {
|
|
3989
|
-
return console.error("%cstorage",
|
|
3996
|
+
return console.error("%cstorage", v.STORAGE, K.SLIDE, r, s), 400;
|
|
3990
3997
|
}
|
|
3991
3998
|
});
|
|
3992
3999
|
this.options = r, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
@@ -4077,16 +4084,16 @@ function zi(d) {
|
|
|
4077
4084
|
return d.toLowerCase().split("-").reduce((r, s) => r + (s.charAt(0).toUpperCase() + s.slice(1)));
|
|
4078
4085
|
}
|
|
4079
4086
|
const Hi = (d) => d.charAt(0).toUpperCase() + d.slice(1);
|
|
4080
|
-
function
|
|
4087
|
+
function Ti(d) {
|
|
4081
4088
|
const r = document.createRange();
|
|
4082
4089
|
r.selectNodeContents(d), r.deleteContents();
|
|
4083
4090
|
}
|
|
4084
|
-
function
|
|
4091
|
+
function Mi(d) {
|
|
4085
4092
|
d.reduce(
|
|
4086
4093
|
(r, s) => Object.keys(s).reduce(
|
|
4087
4094
|
(l, x) => ({
|
|
4088
4095
|
...l,
|
|
4089
|
-
[x]: x in r && typeof r[x] == "object" && r[x] !== null && typeof s[x] == "object" && s[x] !== null ?
|
|
4096
|
+
[x]: x in r && typeof r[x] == "object" && r[x] !== null && typeof s[x] == "object" && s[x] !== null ? Mi([r[x], s[x]]) : s[x]
|
|
4090
4097
|
}),
|
|
4091
4098
|
r
|
|
4092
4099
|
),
|
|
@@ -4110,14 +4117,14 @@ function xe(d, r) {
|
|
|
4110
4117
|
l = r.charCodeAt(s), d = (d << 5) - d + l, d |= 0;
|
|
4111
4118
|
return d < 0 ? d * -2 : d;
|
|
4112
4119
|
}
|
|
4113
|
-
function
|
|
4120
|
+
function Ni(d, r, s) {
|
|
4114
4121
|
return Object.keys(r).sort().reduce(l, d);
|
|
4115
4122
|
function l(x, D) {
|
|
4116
4123
|
return $r(x, r[D], D, s);
|
|
4117
4124
|
}
|
|
4118
4125
|
}
|
|
4119
4126
|
function $r(d, r, s, l) {
|
|
4120
|
-
const x = xe(xe(xe(d, s),
|
|
4127
|
+
const x = xe(xe(xe(d, s), Ki(r)), typeof r);
|
|
4121
4128
|
if (r === null)
|
|
4122
4129
|
return xe(x, "null");
|
|
4123
4130
|
if (r === void 0)
|
|
@@ -4126,18 +4133,18 @@ function $r(d, r, s, l) {
|
|
|
4126
4133
|
if (l.includes(r))
|
|
4127
4134
|
return xe(x, `[Circular]${s}`);
|
|
4128
4135
|
l.push(r);
|
|
4129
|
-
const D =
|
|
4136
|
+
const D = Ni(x, r, l);
|
|
4130
4137
|
if (!("valueOf" in r) || typeof r.valueOf != "function")
|
|
4131
4138
|
return D;
|
|
4132
4139
|
try {
|
|
4133
4140
|
return xe(D, String(r.valueOf()));
|
|
4134
|
-
} catch (
|
|
4135
|
-
return xe(D, `[valueOf exception]${
|
|
4141
|
+
} catch (j) {
|
|
4142
|
+
return xe(D, `[valueOf exception]${j.stack || j.message}`);
|
|
4136
4143
|
}
|
|
4137
4144
|
}
|
|
4138
4145
|
return xe(x, r.toString());
|
|
4139
4146
|
}
|
|
4140
|
-
function
|
|
4147
|
+
function Ki(d) {
|
|
4141
4148
|
return Object.prototype.toString.call(d);
|
|
4142
4149
|
}
|
|
4143
4150
|
function Fn(d) {
|
|
@@ -4188,10 +4195,10 @@ function Ji(d) {
|
|
|
4188
4195
|
function Vi(d) {
|
|
4189
4196
|
const r = window.BuzzCasting.getOptions().suspended ?? !1;
|
|
4190
4197
|
return d.forEach((s) => {
|
|
4191
|
-
var l, x, D,
|
|
4192
|
-
if (r ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((l = s.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", s.sender !== null ? ((((x = s.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = s.sender) == null ? void 0 : D.title) === null) && (s.sender.title = ""), ((
|
|
4193
|
-
const
|
|
4194
|
-
s.sender.title =
|
|
4198
|
+
var l, x, D, j, F;
|
|
4199
|
+
if (r ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((l = s.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", s.sender !== null ? ((((x = s.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = s.sender) == null ? void 0 : D.title) === null) && (s.sender.title = ""), ((j = s.sender) == null ? void 0 : j.name) !== "" && s.sender.title === "" && (s.sender.title = s.sender.name), ((F = s.sender) == null ? void 0 : F.name) !== "" && s.channel === "tw" && (s.sender.name = `@${s.sender.name}`)) : s.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, s.sender.title === "" && s.link !== "") {
|
|
4200
|
+
const N = new URL(s.link);
|
|
4201
|
+
s.sender.title = N.hostname.replace("www.", "");
|
|
4195
4202
|
}
|
|
4196
4203
|
}), d;
|
|
4197
4204
|
}
|
|
@@ -4245,119 +4252,147 @@ class ro {
|
|
|
4245
4252
|
l.push(this.api.get(x));
|
|
4246
4253
|
}), await Promise.allSettled(l).then(
|
|
4247
4254
|
(x) => x.forEach(async (D) => {
|
|
4248
|
-
let
|
|
4255
|
+
let j, F = 400;
|
|
4249
4256
|
if (D.status === "fulfilled") {
|
|
4250
|
-
let
|
|
4257
|
+
let N = D.value;
|
|
4251
4258
|
if (this.sm === null)
|
|
4252
4259
|
return 400;
|
|
4253
|
-
if (
|
|
4254
|
-
const
|
|
4255
|
-
(
|
|
4260
|
+
if (N.success === !0) {
|
|
4261
|
+
const X = this.sm.subscribers.filter(
|
|
4262
|
+
(le) => le.widget === N.query.widget
|
|
4256
4263
|
)[0];
|
|
4257
|
-
let
|
|
4258
|
-
switch (
|
|
4259
|
-
case
|
|
4260
|
-
if (
|
|
4261
|
-
(
|
|
4262
|
-
),
|
|
4264
|
+
let ae = "", ee;
|
|
4265
|
+
switch (N.query.type) {
|
|
4266
|
+
case K.MESSAGES:
|
|
4267
|
+
if (ee = N.data.messages.filter(
|
|
4268
|
+
(le) => le.id !== null
|
|
4269
|
+
), N.data.messages = ee, ae = Fn(N.data.messages), X.hash === ae)
|
|
4263
4270
|
return console.debug(
|
|
4264
4271
|
"%capi%c %cno updates",
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4272
|
+
v.API,
|
|
4273
|
+
v.NONE,
|
|
4274
|
+
v.NO_UPDATES,
|
|
4275
|
+
K.MESSAGES,
|
|
4276
|
+
N.query.slide,
|
|
4277
|
+
N.query.widget
|
|
4271
4278
|
), 204;
|
|
4272
|
-
|
|
4279
|
+
j = N, X.hash = ae, F = await this.sm.setMessages(N.query, N);
|
|
4273
4280
|
break;
|
|
4274
|
-
case
|
|
4275
|
-
|
|
4281
|
+
case K.CLOUD:
|
|
4282
|
+
ae = Fn(N.data), X.hash === ae ? (console.debug(
|
|
4276
4283
|
"%capi%c %cno updates",
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
),
|
|
4284
|
+
v.API,
|
|
4285
|
+
v.NONE,
|
|
4286
|
+
v.NO_UPDATES,
|
|
4287
|
+
K.CLOUD,
|
|
4288
|
+
N.query.slide,
|
|
4289
|
+
N.query.widget
|
|
4290
|
+
), F = 204) : (X.hash = ae, j = {
|
|
4291
|
+
data: {
|
|
4292
|
+
dashboard: N.query.dashboard,
|
|
4293
|
+
cloud: N.data,
|
|
4294
|
+
query: N.query,
|
|
4295
|
+
slide: N.query.slide
|
|
4296
|
+
},
|
|
4297
|
+
query: N.query,
|
|
4298
|
+
message: N.message,
|
|
4299
|
+
success: N.success
|
|
4300
|
+
}, F = await this.sm.setCloud(N.query, j.data.cloud));
|
|
4284
4301
|
break;
|
|
4285
|
-
case
|
|
4286
|
-
|
|
4302
|
+
case K.SERIES:
|
|
4303
|
+
ae = Fn(N.data), X.hash === ae ? (console.debug(
|
|
4287
4304
|
"%capi%c %cno updates",
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
),
|
|
4305
|
+
v.API,
|
|
4306
|
+
v.NONE,
|
|
4307
|
+
v.NO_UPDATES,
|
|
4308
|
+
K.SERIES,
|
|
4309
|
+
N.query.slide,
|
|
4310
|
+
N.query.widget
|
|
4311
|
+
), F = 204) : (X.hash = ae, j = {
|
|
4312
|
+
data: {
|
|
4313
|
+
dashboard: N.query.dashboard,
|
|
4314
|
+
series: N.data,
|
|
4315
|
+
query: N.query,
|
|
4316
|
+
slide: N.query.slide
|
|
4317
|
+
},
|
|
4318
|
+
query: N.query,
|
|
4319
|
+
message: N.message,
|
|
4320
|
+
success: N.success
|
|
4321
|
+
}, F = await this.sm.setSeries(N.query, j.data.series));
|
|
4295
4322
|
break;
|
|
4296
4323
|
default:
|
|
4297
4324
|
console.warn(
|
|
4298
4325
|
"%capi%c %cstorage",
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4326
|
+
v.API,
|
|
4327
|
+
v.NONE,
|
|
4328
|
+
v.STORAGE,
|
|
4302
4329
|
"error",
|
|
4303
|
-
`data type ${
|
|
4330
|
+
`data type ${N.query.type} unknown`
|
|
4304
4331
|
);
|
|
4305
4332
|
}
|
|
4306
4333
|
} else
|
|
4307
|
-
|
|
4308
|
-
switch (
|
|
4334
|
+
F = 401;
|
|
4335
|
+
switch (F) {
|
|
4309
4336
|
case 201:
|
|
4310
|
-
|
|
4337
|
+
console.info(
|
|
4338
|
+
"%capp%c %cbroadcast",
|
|
4339
|
+
v.API,
|
|
4340
|
+
v.NONE,
|
|
4341
|
+
v.BROADCAST,
|
|
4342
|
+
N.query.slide,
|
|
4343
|
+
N.data.title ?? N.query.widget
|
|
4344
|
+
), console.debug(
|
|
4311
4345
|
"%capp%c %cbroadcast",
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4346
|
+
v.API,
|
|
4347
|
+
v.NONE,
|
|
4348
|
+
v.BROADCAST,
|
|
4349
|
+
N
|
|
4350
|
+
);
|
|
4351
|
+
const X = structuredClone(j.query);
|
|
4352
|
+
switch (N.query.type) {
|
|
4318
4353
|
case "messages":
|
|
4319
|
-
|
|
4354
|
+
N = await this.sm.getMessages(X);
|
|
4320
4355
|
break;
|
|
4321
4356
|
case "cloud":
|
|
4322
|
-
|
|
4357
|
+
N = await this.sm.getCloud(X), N && (N.query = X);
|
|
4323
4358
|
break;
|
|
4324
4359
|
case "series":
|
|
4325
|
-
|
|
4360
|
+
N = await this.sm.getSeries(X), N && (N.query = X);
|
|
4326
4361
|
break;
|
|
4327
4362
|
default:
|
|
4328
4363
|
console.warn(
|
|
4329
4364
|
"%capp%c %cbroadcast",
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4365
|
+
v.API,
|
|
4366
|
+
v.NONE,
|
|
4367
|
+
v.BROADCAST,
|
|
4333
4368
|
"Unhandled data type",
|
|
4334
|
-
|
|
4369
|
+
N.query
|
|
4335
4370
|
);
|
|
4336
4371
|
}
|
|
4337
|
-
|
|
4372
|
+
N && this.bc.postMessage({
|
|
4338
4373
|
event: re.WIDGET_UPDATE,
|
|
4339
|
-
data:
|
|
4374
|
+
data: N.data
|
|
4340
4375
|
});
|
|
4341
4376
|
break;
|
|
4342
4377
|
default:
|
|
4343
4378
|
console.warn(
|
|
4344
4379
|
"%capp%c %cbroadcast",
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4380
|
+
v.API,
|
|
4381
|
+
v.NONE,
|
|
4382
|
+
v.BROADCAST,
|
|
4348
4383
|
"Fetch error",
|
|
4349
|
-
|
|
4350
|
-
|
|
4384
|
+
N.query.slide,
|
|
4385
|
+
N.data.title ?? N.query.widget
|
|
4351
4386
|
);
|
|
4352
4387
|
break;
|
|
4353
4388
|
}
|
|
4354
|
-
return
|
|
4389
|
+
return F;
|
|
4355
4390
|
} else
|
|
4356
4391
|
return console.warn(
|
|
4357
4392
|
"%capi%c %cstorage",
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4393
|
+
v.API,
|
|
4394
|
+
v.NONE,
|
|
4395
|
+
v.STORAGE,
|
|
4361
4396
|
re.ERROR
|
|
4362
4397
|
), 400;
|
|
4363
4398
|
})
|
|
@@ -4375,9 +4410,9 @@ class ro {
|
|
|
4375
4410
|
case re.UPDATE:
|
|
4376
4411
|
console.debug(
|
|
4377
4412
|
"%capi%c %cstorage",
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4413
|
+
v.API,
|
|
4414
|
+
v.NONE,
|
|
4415
|
+
v.STORAGE,
|
|
4381
4416
|
re.UPDATE,
|
|
4382
4417
|
r.data
|
|
4383
4418
|
), await this.update();
|
|
@@ -4389,9 +4424,9 @@ class ro {
|
|
|
4389
4424
|
if ((l = this.options) != null && l.suspended) {
|
|
4390
4425
|
console.info(
|
|
4391
4426
|
"%cstorage%c %cstorage",
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4427
|
+
v.STORAGE,
|
|
4428
|
+
v.NONE,
|
|
4429
|
+
v.MESSAGES,
|
|
4395
4430
|
"Account suspended"
|
|
4396
4431
|
);
|
|
4397
4432
|
return;
|
|
@@ -4401,9 +4436,9 @@ class ro {
|
|
|
4401
4436
|
));
|
|
4402
4437
|
console.info(
|
|
4403
4438
|
"%cstorage%c %cstorage",
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4439
|
+
v.STORAGE,
|
|
4440
|
+
v.NONE,
|
|
4441
|
+
v.MESSAGES,
|
|
4407
4442
|
`${s} messages deleted`
|
|
4408
4443
|
);
|
|
4409
4444
|
});
|
|
@@ -4412,9 +4447,9 @@ class ro {
|
|
|
4412
4447
|
const s = await ((l = this.sm) == null ? void 0 : l.hideMessage(r.id, 0));
|
|
4413
4448
|
return console.info(
|
|
4414
4449
|
"%cstorage%c %cstorage",
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4450
|
+
v.STORAGE,
|
|
4451
|
+
v.NONE,
|
|
4452
|
+
v.HIDE,
|
|
4418
4453
|
`${s} messages hidden`
|
|
4419
4454
|
), await this.api.hideMessage(r);
|
|
4420
4455
|
});
|
|
@@ -4426,15 +4461,15 @@ class ro {
|
|
|
4426
4461
|
k(this, "loadSlide", async (r) => await this.api.loadSlide(r));
|
|
4427
4462
|
k(this, "storeSlide", async (r) => {
|
|
4428
4463
|
var s;
|
|
4429
|
-
return
|
|
4464
|
+
return await ((s = this.sm) == null ? void 0 : s.storeSlide(r).then(async () => r != null && r.update && r.update ? await this.api.storeSlide(r) : new Promise((l, x) => {
|
|
4430
4465
|
l(201);
|
|
4431
4466
|
})));
|
|
4432
4467
|
});
|
|
4433
4468
|
console.info(
|
|
4434
4469
|
"%cstorage%c %cslide",
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4470
|
+
v.STORAGE,
|
|
4471
|
+
v.NONE,
|
|
4472
|
+
v.SLIDE,
|
|
4438
4473
|
r.slide,
|
|
4439
4474
|
re.VERSION,
|
|
4440
4475
|
ki
|
|
@@ -4442,27 +4477,27 @@ class ro {
|
|
|
4442
4477
|
const s = (r == null ? void 0 : r.slide) || r.app;
|
|
4443
4478
|
switch (this.bc = new BroadcastChannel(s), console.info(
|
|
4444
4479
|
"%capi%c %cbroadcast",
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4480
|
+
v.API,
|
|
4481
|
+
v.NONE,
|
|
4482
|
+
v.BROADCAST,
|
|
4448
4483
|
re.CHANNEL,
|
|
4449
4484
|
s
|
|
4450
4485
|
), this.bc.onmessage = (l) => {
|
|
4451
4486
|
this.actions(l);
|
|
4452
4487
|
}, this.bc.postMessage({ event: re.STORAGE_INIT, data: {} }), this.api = new Di(r), r.storage) {
|
|
4453
|
-
case
|
|
4488
|
+
case ye.DEXIE:
|
|
4454
4489
|
this.sm = new jr(r);
|
|
4455
4490
|
break;
|
|
4456
|
-
case
|
|
4491
|
+
case ye.LOCAL:
|
|
4457
4492
|
this.sm = new Lr(r);
|
|
4458
4493
|
break;
|
|
4459
|
-
case
|
|
4494
|
+
case ye.SESSION:
|
|
4460
4495
|
this.sm = new Br(r);
|
|
4461
4496
|
break;
|
|
4462
|
-
case
|
|
4463
|
-
this.sm = new
|
|
4497
|
+
case ye.KEYVAL:
|
|
4498
|
+
this.sm = new Kr(r);
|
|
4464
4499
|
break;
|
|
4465
|
-
case
|
|
4500
|
+
case ye.WINDOW:
|
|
4466
4501
|
this.sm = new Gr(r);
|
|
4467
4502
|
break;
|
|
4468
4503
|
}
|
|
@@ -4478,11 +4513,11 @@ class Bi {
|
|
|
4478
4513
|
*/
|
|
4479
4514
|
k(this, "getCloud", async (r) => {
|
|
4480
4515
|
var s;
|
|
4481
|
-
return r.type !==
|
|
4516
|
+
return r.type !== K.CLOUD ? (console.warn(
|
|
4482
4517
|
"%capp%c %get",
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4518
|
+
v.APP,
|
|
4519
|
+
v.NONE,
|
|
4520
|
+
v.GET_DATA,
|
|
4486
4521
|
r.widget,
|
|
4487
4522
|
"wrong method call for getMessages, type used is",
|
|
4488
4523
|
r.type
|
|
@@ -4499,11 +4534,11 @@ class Bi {
|
|
|
4499
4534
|
*/
|
|
4500
4535
|
k(this, "getMessages", async (r) => {
|
|
4501
4536
|
var s;
|
|
4502
|
-
return r.type !==
|
|
4537
|
+
return r.type !== K.MESSAGES ? (console.warn(
|
|
4503
4538
|
"%capp%c %get",
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4539
|
+
v.APP,
|
|
4540
|
+
v.NONE,
|
|
4541
|
+
v.GET_DATA,
|
|
4507
4542
|
r.widget,
|
|
4508
4543
|
"wrong method call for getMessages, type used is",
|
|
4509
4544
|
r.type
|
|
@@ -4520,11 +4555,11 @@ class Bi {
|
|
|
4520
4555
|
*/
|
|
4521
4556
|
k(this, "getSeries", async (r) => {
|
|
4522
4557
|
var s;
|
|
4523
|
-
return r.type !==
|
|
4558
|
+
return r.type !== K.SERIES ? (console.warn(
|
|
4524
4559
|
"%capp%c %get",
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4560
|
+
v.APP,
|
|
4561
|
+
v.NONE,
|
|
4562
|
+
v.GET_DATA,
|
|
4528
4563
|
r.widget,
|
|
4529
4564
|
"wrong method call for getMessages, type used is",
|
|
4530
4565
|
r.type
|
|
@@ -4535,19 +4570,19 @@ class Bi {
|
|
|
4535
4570
|
}) : await ((s = this.sm) == null ? void 0 : s.getSeries(r));
|
|
4536
4571
|
});
|
|
4537
4572
|
switch (this.sm = null, r.storage) {
|
|
4538
|
-
case
|
|
4573
|
+
case ye.DEXIE:
|
|
4539
4574
|
this.sm = new jr(r);
|
|
4540
4575
|
break;
|
|
4541
|
-
case
|
|
4576
|
+
case ye.LOCAL:
|
|
4542
4577
|
this.sm = new Lr(r);
|
|
4543
4578
|
break;
|
|
4544
|
-
case
|
|
4579
|
+
case ye.SESSION:
|
|
4545
4580
|
this.sm = new Br(r);
|
|
4546
4581
|
break;
|
|
4547
|
-
case
|
|
4548
|
-
this.sm = new
|
|
4582
|
+
case ye.KEYVAL:
|
|
4583
|
+
this.sm = new Kr(r);
|
|
4549
4584
|
break;
|
|
4550
|
-
case
|
|
4585
|
+
case ye.WINDOW:
|
|
4551
4586
|
this.sm = new Gr(r);
|
|
4552
4587
|
break;
|
|
4553
4588
|
}
|
|
@@ -4574,11 +4609,11 @@ class io {
|
|
|
4574
4609
|
*/
|
|
4575
4610
|
k(this, "getData", async () => {
|
|
4576
4611
|
switch (this.query.type) {
|
|
4577
|
-
case
|
|
4612
|
+
case K.CLOUD:
|
|
4578
4613
|
return await this.getCloud();
|
|
4579
|
-
case
|
|
4614
|
+
case K.MESSAGES:
|
|
4580
4615
|
return await this.getMessages();
|
|
4581
|
-
case
|
|
4616
|
+
case K.SERIES:
|
|
4582
4617
|
return await this.getSeries();
|
|
4583
4618
|
}
|
|
4584
4619
|
return {
|
|
@@ -4592,11 +4627,11 @@ class io {
|
|
|
4592
4627
|
*
|
|
4593
4628
|
* @returns IResponse
|
|
4594
4629
|
*/
|
|
4595
|
-
k(this, "getCloud", async () => this.query.type !==
|
|
4630
|
+
k(this, "getCloud", async () => this.query.type !== K.CLOUD ? (console.warn(
|
|
4596
4631
|
"%cstorage%c %cwidget",
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4632
|
+
v.STORAGE,
|
|
4633
|
+
v.NONE,
|
|
4634
|
+
v.WIDGET,
|
|
4600
4635
|
this.query.widget,
|
|
4601
4636
|
"Wrong method call for getCloud, expected type is",
|
|
4602
4637
|
this.query.type
|
|
@@ -4610,11 +4645,11 @@ class io {
|
|
|
4610
4645
|
*
|
|
4611
4646
|
* @returns IResponse
|
|
4612
4647
|
*/
|
|
4613
|
-
k(this, "getMessages", async () => this.query.type !==
|
|
4648
|
+
k(this, "getMessages", async () => this.query.type !== K.MESSAGES ? (console.warn(
|
|
4614
4649
|
"%cstorage%c %cwidget",
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4650
|
+
v.STORAGE,
|
|
4651
|
+
v.NONE,
|
|
4652
|
+
v.WIDGET,
|
|
4618
4653
|
this.query.widget,
|
|
4619
4654
|
"Wrong method call for getMessages, expected type is",
|
|
4620
4655
|
this.query.type
|
|
@@ -4624,9 +4659,9 @@ class io {
|
|
|
4624
4659
|
success: !1
|
|
4625
4660
|
}) : (console.debug(
|
|
4626
4661
|
"%cstorage%c %cwidget",
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4662
|
+
v.API,
|
|
4663
|
+
v.NONE,
|
|
4664
|
+
v.MESSAGES,
|
|
4630
4665
|
this.query
|
|
4631
4666
|
), await this.storageReader.getMessages(this.query)));
|
|
4632
4667
|
/**
|
|
@@ -4634,11 +4669,11 @@ class io {
|
|
|
4634
4669
|
*
|
|
4635
4670
|
* @returns IResponse
|
|
4636
4671
|
*/
|
|
4637
|
-
k(this, "getSeries", async () => this.query.type !==
|
|
4672
|
+
k(this, "getSeries", async () => this.query.type !== K.SERIES ? (console.warn(
|
|
4638
4673
|
"%cstorage%c %cwidget",
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4674
|
+
v.STORAGE,
|
|
4675
|
+
v.NONE,
|
|
4676
|
+
v.WIDGET,
|
|
4642
4677
|
this.query.widget,
|
|
4643
4678
|
"Wrong method call for getSeries, expected type is",
|
|
4644
4679
|
this.query.type
|
|
@@ -4656,7 +4691,7 @@ class io {
|
|
|
4656
4691
|
k(this, "showModal", (r) => {
|
|
4657
4692
|
console.debug(
|
|
4658
4693
|
"%cwidget",
|
|
4659
|
-
|
|
4694
|
+
v.WIDGET,
|
|
4660
4695
|
re.SHOW_MODAL,
|
|
4661
4696
|
r.showComponent,
|
|
4662
4697
|
// @ts-ignore
|
|
@@ -4676,10 +4711,10 @@ class io {
|
|
|
4676
4711
|
});
|
|
4677
4712
|
window.dispatchEvent(s);
|
|
4678
4713
|
});
|
|
4679
|
-
var
|
|
4714
|
+
var j;
|
|
4680
4715
|
this.element = r, this.listeners = s, l = typeof l < "u" ? l : "buzzcasting-slide";
|
|
4681
4716
|
let x;
|
|
4682
|
-
x = { ...r.dataset }, delete x.hmr, x.slide = ((
|
|
4717
|
+
x = { ...r.dataset }, delete x.hmr, x.slide = ((j = r.closest(l.toUpperCase())) == null ? void 0 : j.id) ?? `${l} not found`, x = Mr(x), this.query = x, Ti(r);
|
|
4683
4718
|
const D = window.BuzzCasting.getOptions();
|
|
4684
4719
|
this.storageReader = new Bi(D), this.broadcastChannel = new BroadcastChannel(x.slide), this.startListener();
|
|
4685
4720
|
}
|
|
@@ -4693,7 +4728,7 @@ class io {
|
|
|
4693
4728
|
const r = this.query;
|
|
4694
4729
|
this.broadcastChannel.onmessage = async (s) => {
|
|
4695
4730
|
const l = s.data.data;
|
|
4696
|
-
switch (s.data.event) {
|
|
4731
|
+
switch (console.debug(s.data.event, s.data), s.data.event) {
|
|
4697
4732
|
case re.WIDGET_UPDATE:
|
|
4698
4733
|
l.query.slide === r.slide && l.query.widget === r.widget && this.listeners.forEach((x) => {
|
|
4699
4734
|
x(s.data);
|
|
@@ -4710,13 +4745,19 @@ class io {
|
|
|
4710
4745
|
* This takes place when the container indicates it has finished loading (ready)
|
|
4711
4746
|
*/
|
|
4712
4747
|
subscribe() {
|
|
4713
|
-
console.
|
|
4748
|
+
console.info(
|
|
4714
4749
|
"%cwidget%c %csubscribe",
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4750
|
+
v.WIDGET,
|
|
4751
|
+
v.NONE,
|
|
4752
|
+
v.SUBSCRIBE,
|
|
4718
4753
|
this.query.slide,
|
|
4719
4754
|
this.query.widget
|
|
4755
|
+
), console.debug(
|
|
4756
|
+
"%cwidget%c %csubscribe",
|
|
4757
|
+
v.WIDGET,
|
|
4758
|
+
v.NONE,
|
|
4759
|
+
v.SUBSCRIBE,
|
|
4760
|
+
this.query
|
|
4720
4761
|
), this.broadcastChannel.postMessage({
|
|
4721
4762
|
event: re.SUBSCRIBE,
|
|
4722
4763
|
data: this.query
|
|
@@ -4727,13 +4768,13 @@ class io {
|
|
|
4727
4768
|
}
|
|
4728
4769
|
}
|
|
4729
4770
|
export {
|
|
4730
|
-
|
|
4771
|
+
K as API,
|
|
4731
4772
|
ro as BuzzcastingStorageManager,
|
|
4732
4773
|
Bi as BuzzcastingStorageReader,
|
|
4733
|
-
|
|
4774
|
+
v as CSS,
|
|
4734
4775
|
re as EVENTS,
|
|
4735
4776
|
Zt as MODERATION,
|
|
4736
|
-
|
|
4777
|
+
ye as STORAGE,
|
|
4737
4778
|
io as Widget,
|
|
4738
4779
|
Gi as anonymize,
|
|
4739
4780
|
$i as attachedMedia,
|
|
@@ -4742,8 +4783,8 @@ export {
|
|
|
4742
4783
|
zi as camelCase,
|
|
4743
4784
|
Wi as camelize,
|
|
4744
4785
|
Hi as capitalizeFirstLetter,
|
|
4745
|
-
|
|
4746
|
-
|
|
4786
|
+
Ti as clearContents,
|
|
4787
|
+
Mi as deepMerge,
|
|
4747
4788
|
Fi as filterAttributes,
|
|
4748
4789
|
Yi as formatContent,
|
|
4749
4790
|
Fn as hashSum,
|
|
@@ -4756,5 +4797,5 @@ export {
|
|
|
4756
4797
|
qi as shuffleMessages,
|
|
4757
4798
|
eo as stringGen,
|
|
4758
4799
|
no as upDownColor,
|
|
4759
|
-
|
|
4800
|
+
Mr as widgetParams
|
|
4760
4801
|
};
|