buzzcasting-storage 2.14.4 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.esm.js +234 -234
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var xa = Object.defineProperty;
|
|
2
2
|
var ka = (h, r, c) => r in h ? xa(h, r, { enumerable: !0, configurable: !0, writable: !0, value: c }) : h[r] = c;
|
|
3
3
|
var A = (h, r, c) => ka(h, typeof r != "symbol" ? r + "" : r, c);
|
|
4
|
-
const Aa = "2.
|
|
4
|
+
const Aa = "2.15.0";
|
|
5
5
|
class Da {
|
|
6
6
|
constructor(r) {
|
|
7
7
|
A(this, "options");
|
|
@@ -43,11 +43,11 @@ class Da {
|
|
|
43
43
|
), await fetch(
|
|
44
44
|
[this.url, "api", c, r.type].join("/") + D,
|
|
45
45
|
{ ...l, method: "get" }
|
|
46
|
-
).then(async (
|
|
47
|
-
if (!
|
|
48
|
-
throw new Error(`${
|
|
49
|
-
return
|
|
50
|
-
}).then((
|
|
46
|
+
).then(async (R) => {
|
|
47
|
+
if (!R.ok)
|
|
48
|
+
throw new Error(`${R.status}`);
|
|
49
|
+
return R;
|
|
50
|
+
}).then((R) => R.json()).then((R) => (R.query = r, R)).catch((R) => ({ success: !1, message: `${R}`, data: null }));
|
|
51
51
|
}
|
|
52
52
|
async hideMessage(r) {
|
|
53
53
|
const { version: c } = this.options, l = this.headers(), k = "?action=visible";
|
|
@@ -70,8 +70,8 @@ class Da {
|
|
|
70
70
|
}
|
|
71
71
|
async hideLabels(r) {
|
|
72
72
|
const { version: c } = this.options, l = this.formHeaders(), k = new URLSearchParams(), D = r.labels || [];
|
|
73
|
-
for (const [
|
|
74
|
-
k.append(`custom_filters[${
|
|
73
|
+
for (const [R, B] of D.entries())
|
|
74
|
+
k.append(`custom_filters[${R}]`, B);
|
|
75
75
|
return console.info(
|
|
76
76
|
"%capi%c %cput",
|
|
77
77
|
S.API,
|
|
@@ -83,11 +83,11 @@ class Da {
|
|
|
83
83
|
), await fetch(
|
|
84
84
|
[this.url, "api", c, r.type, r.widget].join("/"),
|
|
85
85
|
{ ...l, body: k, method: "put" }
|
|
86
|
-
).then((
|
|
87
|
-
if (!
|
|
88
|
-
throw new Error(
|
|
89
|
-
return
|
|
90
|
-
}).then((
|
|
86
|
+
).then((R) => {
|
|
87
|
+
if (!R.ok)
|
|
88
|
+
throw new Error(R.statusText);
|
|
89
|
+
return R;
|
|
90
|
+
}).then((R) => R.json()).catch((R) => ({ succes: !1, message: R, data: [] }));
|
|
91
91
|
}
|
|
92
92
|
async loadSlide(r) {
|
|
93
93
|
const { version: c } = this.options, l = this.headers(), k = Object.assign({}, r);
|
|
@@ -103,11 +103,11 @@ class Da {
|
|
|
103
103
|
), await fetch(
|
|
104
104
|
[this.url, "api", c, r.type].join("/") + D,
|
|
105
105
|
{ ...l, method: "get" }
|
|
106
|
-
).then(async (
|
|
107
|
-
if (!
|
|
108
|
-
throw new Error(`${
|
|
109
|
-
return
|
|
110
|
-
}).then((
|
|
106
|
+
).then(async (R) => {
|
|
107
|
+
if (!R.ok)
|
|
108
|
+
throw new Error(`${R.status}`);
|
|
109
|
+
return R;
|
|
110
|
+
}).then((R) => R.json()).then((R) => (R.query = r, R)).catch((R) => ({ success: !1, message: `${R}`, data: null }));
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Store slide definition
|
|
@@ -160,19 +160,19 @@ var jr = { exports: {} };
|
|
|
160
160
|
for (var a, i = 0, o = t.length; i < o; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
|
|
161
161
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
162
162
|
}
|
|
163
|
-
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr,
|
|
163
|
+
var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr, R = Object.keys, B = Array.isArray;
|
|
164
164
|
function J(e, t) {
|
|
165
|
-
return typeof t != "object" ||
|
|
165
|
+
return typeof t != "object" || R(t).forEach(function(n) {
|
|
166
166
|
e[n] = t[n];
|
|
167
167
|
}), e;
|
|
168
168
|
}
|
|
169
169
|
typeof Promise > "u" || D.Promise || (D.Promise = Promise);
|
|
170
|
-
var q = Object.getPrototypeOf,
|
|
170
|
+
var q = Object.getPrototypeOf, le = {}.hasOwnProperty;
|
|
171
171
|
function ie(e, t) {
|
|
172
|
-
return
|
|
172
|
+
return le.call(e, t);
|
|
173
173
|
}
|
|
174
174
|
function xe(e, t) {
|
|
175
|
-
typeof t == "function" && (t = t(q(e))), (typeof Reflect > "u" ?
|
|
175
|
+
typeof t == "function" && (t = t(q(e))), (typeof Reflect > "u" ? R : Reflect.ownKeys)(t).forEach(function(n) {
|
|
176
176
|
ke(e, n, t[n]);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
@@ -214,13 +214,13 @@ var jr = { exports: {} };
|
|
|
214
214
|
return u == null ? void 0 : ve(u, t.substr(s + 1));
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function de(e, t, n) {
|
|
218
218
|
if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
|
|
219
219
|
rt(typeof n != "string" && "length" in n);
|
|
220
|
-
for (var a = 0, i = t.length; a < i; ++a)
|
|
220
|
+
for (var a = 0, i = t.length; a < i; ++a) de(e, t[a], n[a]);
|
|
221
221
|
} else {
|
|
222
222
|
var o, s, u = t.indexOf(".");
|
|
223
|
-
u !== -1 ? (o = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n :
|
|
223
|
+
u !== -1 ? (o = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : de(u = !(u = e[o]) || !ie(e, o) ? e[o] = {} : u, s, n)) : n === void 0 ? B(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
function Qn(e) {
|
|
@@ -292,7 +292,7 @@ var jr = { exports: {} };
|
|
|
292
292
|
return e[Symbol.toStringTag] === "AsyncFunction";
|
|
293
293
|
} : function() {
|
|
294
294
|
return !1;
|
|
295
|
-
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
|
|
295
|
+
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], he = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(st), 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" };
|
|
296
296
|
function Ye(e, t) {
|
|
297
297
|
this.name = e, this.message = t;
|
|
298
298
|
}
|
|
@@ -315,9 +315,9 @@ var jr = { exports: {} };
|
|
|
315
315
|
ze(Ye).from(Error).extend({ toString: function() {
|
|
316
316
|
return this.name + ": " + this.message;
|
|
317
317
|
} }), ze(Et).from(Ye), ze(Qe).from(Ye);
|
|
318
|
-
var nn =
|
|
318
|
+
var nn = he.reduce(function(e, t) {
|
|
319
319
|
return e[t] = t + "Error", e;
|
|
320
|
-
}, {}), Qr = Ye, G =
|
|
320
|
+
}, {}), Qr = Ye, G = he.reduce(function(e, t) {
|
|
321
321
|
var n = t + "Error";
|
|
322
322
|
function a(i, o) {
|
|
323
323
|
this.name = n, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
|
|
@@ -328,7 +328,7 @@ var jr = { exports: {} };
|
|
|
328
328
|
G.Syntax = SyntaxError, G.Type = TypeError, G.Range = RangeError;
|
|
329
329
|
var Zn = st.reduce(function(e, t) {
|
|
330
330
|
return e[t + "Error"] = G[t], e;
|
|
331
|
-
}, {}), Ot =
|
|
331
|
+
}, {}), Ot = he.reduce(function(e, t) {
|
|
332
332
|
return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = G[t]), e;
|
|
333
333
|
}, {});
|
|
334
334
|
function Q() {
|
|
@@ -389,16 +389,16 @@ var jr = { exports: {} };
|
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
Ot.ModifyError = Et, Ot.DexieError = Ye, Ot.BulkError = Qe;
|
|
392
|
-
var
|
|
392
|
+
var ye = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
|
|
393
393
|
function qn(e) {
|
|
394
|
-
|
|
394
|
+
ye = e;
|
|
395
395
|
}
|
|
396
396
|
var ot = {}, er = 100, Se = typeof Promise > "u" ? [] : function() {
|
|
397
397
|
var e = Promise.resolve();
|
|
398
398
|
if (typeof crypto > "u" || !crypto.subtle) return [e, q(e), e];
|
|
399
399
|
var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
|
|
400
400
|
return [t, q(t), e];
|
|
401
|
-
}(), st = Se[0],
|
|
401
|
+
}(), st = Se[0], he = Se[1], Se = Se[2], he = he && he.then, ct = st && st.constructor, an = !!Se, ut = function(e, t) {
|
|
402
402
|
lt.push([e, t]), xt && (queueMicrotask(ta), xt = !1);
|
|
403
403
|
}, on = !0, xt = !0, Ne = [], kt = [], sn = it, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, L = Ae, lt = [], Be = 0, At = [];
|
|
404
404
|
function N(e) {
|
|
@@ -467,7 +467,7 @@ var jr = { exports: {} };
|
|
|
467
467
|
function ea(e, t, n) {
|
|
468
468
|
try {
|
|
469
469
|
var a, i = t._value;
|
|
470
|
-
!t._state && kt.length && (kt = []), a =
|
|
470
|
+
!t._state && kt.length && (kt = []), a = ye && t._consoleTask ? t._consoleTask.run(function() {
|
|
471
471
|
return e(i);
|
|
472
472
|
}) : e(i), t._state || kt.indexOf(i) !== -1 || function(o) {
|
|
473
473
|
for (var s = Ne.length; s; ) if (Ne[--s]._value === o._value) return Ne.splice(s, 1);
|
|
@@ -685,7 +685,7 @@ var jr = { exports: {} };
|
|
|
685
685
|
function fn(e) {
|
|
686
686
|
Promise === ct && re.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
687
687
|
}
|
|
688
|
-
("" +
|
|
688
|
+
("" + he).indexOf("[native code]") === -1 && (Je = Pe = Q);
|
|
689
689
|
var ee = N.reject, Ge = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
|
|
690
690
|
function $e(e, t) {
|
|
691
691
|
return e ? t ? function() {
|
|
@@ -738,7 +738,7 @@ var jr = { exports: {} };
|
|
|
738
738
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
739
739
|
}
|
|
740
740
|
var lr = (V.prototype._trans = function(e, t, n) {
|
|
741
|
-
var a = this._tx || L.trans, i = this.name, o =
|
|
741
|
+
var a = this._tx || L.trans, i = this.name, o = ye && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
742
742
|
function s(f, b, d) {
|
|
743
743
|
if (!d.schema[i]) throw new G.NotFound("Table " + i + " not part of transaction");
|
|
744
744
|
return t(d.idbtrans, d);
|
|
@@ -796,7 +796,7 @@ var jr = { exports: {} };
|
|
|
796
796
|
}, V.prototype.where = function(e) {
|
|
797
797
|
if (typeof e == "string") return new this.db.WhereClause(this, e);
|
|
798
798
|
if (B(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
799
|
-
var t =
|
|
799
|
+
var t = R(e);
|
|
800
800
|
if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
|
|
801
801
|
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(g) {
|
|
802
802
|
if (g.compound && t.every(function(b) {
|
|
@@ -815,7 +815,7 @@ var jr = { exports: {} };
|
|
|
815
815
|
return e[f];
|
|
816
816
|
}));
|
|
817
817
|
}
|
|
818
|
-
!n &&
|
|
818
|
+
!n && ye && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
819
819
|
var a = this.schema.idxByName, i = this.db._deps.indexedDB;
|
|
820
820
|
function o(g, f) {
|
|
821
821
|
return i.cmp(g, f) === 0;
|
|
@@ -890,7 +890,7 @@ var jr = { exports: {} };
|
|
|
890
890
|
return u.numFailures ? N.reject(u.failures[0]) : u.lastResult;
|
|
891
891
|
}).then(function(u) {
|
|
892
892
|
if (o) try {
|
|
893
|
-
|
|
893
|
+
de(e, o, u);
|
|
894
894
|
} catch {
|
|
895
895
|
}
|
|
896
896
|
return u;
|
|
@@ -905,7 +905,7 @@ var jr = { exports: {} };
|
|
|
905
905
|
return u.numFailures ? N.reject(u.failures[0]) : u.lastResult;
|
|
906
906
|
}).then(function(u) {
|
|
907
907
|
if (o) try {
|
|
908
|
-
|
|
908
|
+
de(e, o, u);
|
|
909
909
|
} catch {
|
|
910
910
|
}
|
|
911
911
|
return u;
|
|
@@ -975,7 +975,7 @@ var jr = { exports: {} };
|
|
|
975
975
|
var E = _[y], O = m[E];
|
|
976
976
|
if (E === t.schema.primKey.keyPath) {
|
|
977
977
|
if (H(O, p) !== 0) throw new G.Constraint("Cannot update primary key in bulkUpdate()");
|
|
978
|
-
} else
|
|
978
|
+
} else de(w, E, O);
|
|
979
979
|
}
|
|
980
980
|
o.push(v), g.push(p), f.push(w);
|
|
981
981
|
}
|
|
@@ -1029,7 +1029,7 @@ var jr = { exports: {} };
|
|
|
1029
1029
|
} };
|
|
1030
1030
|
return n[s] = t[s] = b;
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1032
|
+
R(f = s).forEach(function(d) {
|
|
1033
1033
|
var v = f[d];
|
|
1034
1034
|
if (B(v)) o(d, f[d][0], f[d][1]);
|
|
1035
1035
|
else {
|
|
@@ -1302,17 +1302,17 @@ var jr = { exports: {} };
|
|
|
1302
1302
|
var t = this, n = this._ctx;
|
|
1303
1303
|
return this._write(function(a) {
|
|
1304
1304
|
var i, o, s;
|
|
1305
|
-
s = typeof e == "function" ? e : (i =
|
|
1305
|
+
s = typeof e == "function" ? e : (i = R(e), o = i.length, function(y) {
|
|
1306
1306
|
for (var _ = !1, E = 0; E < o; ++E) {
|
|
1307
1307
|
var O = i[E], x = e[O], I = ve(y, O);
|
|
1308
|
-
x instanceof ht ? (
|
|
1308
|
+
x instanceof ht ? (de(y, O, x.execute(I)), _ = !0) : I !== x && (de(y, O, x), _ = !0);
|
|
1309
1309
|
}
|
|
1310
1310
|
return _;
|
|
1311
1311
|
});
|
|
1312
1312
|
function u(y, O) {
|
|
1313
1313
|
var E = O.failures, O = O.numFailures;
|
|
1314
1314
|
m += y - O;
|
|
1315
|
-
for (var x = 0, I =
|
|
1315
|
+
for (var x = 0, I = R(E); x < I.length; x++) {
|
|
1316
1316
|
var j = I[x];
|
|
1317
1317
|
p.push(E[j]);
|
|
1318
1318
|
}
|
|
@@ -1322,15 +1322,15 @@ var jr = { exports: {} };
|
|
|
1322
1322
|
function _(O) {
|
|
1323
1323
|
var x = Math.min(v, y.length - O);
|
|
1324
1324
|
return g.getMany({ trans: a, keys: y.slice(O, O + x), cache: "immutable" }).then(function(I) {
|
|
1325
|
-
for (var j = [], C = [],
|
|
1325
|
+
for (var j = [], C = [], T = b ? [] : null, M = [], P = 0; P < x; ++P) {
|
|
1326
1326
|
var $ = I[P], F = { value: je($), primKey: y[O + P] };
|
|
1327
|
-
s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + P]) : b || H(d($), d(F.value)) === 0 ? (C.push(F.value), b &&
|
|
1327
|
+
s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + P]) : b || H(d($), d(F.value)) === 0 ? (C.push(F.value), b && T.push(y[O + P])) : (M.push(y[O + P]), j.push(F.value)));
|
|
1328
1328
|
}
|
|
1329
1329
|
return Promise.resolve(0 < j.length && g.mutate({ trans: a, type: "add", values: j }).then(function(z) {
|
|
1330
1330
|
for (var U in z.failures) M.splice(parseInt(U), 1);
|
|
1331
1331
|
u(j.length, z);
|
|
1332
1332
|
})).then(function() {
|
|
1333
|
-
return (0 < C.length || E && typeof e == "object") && g.mutate({ trans: a, type: "put", keys:
|
|
1333
|
+
return (0 < C.length || E && typeof e == "object") && g.mutate({ trans: a, type: "put", keys: T, values: C, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(z) {
|
|
1334
1334
|
return u(C.length, z);
|
|
1335
1335
|
});
|
|
1336
1336
|
}).then(function() {
|
|
@@ -1375,7 +1375,7 @@ var jr = { exports: {} };
|
|
|
1375
1375
|
function sa(e, t) {
|
|
1376
1376
|
return t < e ? -1 : e === t ? 0 : 1;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function fe(e, t, n) {
|
|
1379
1379
|
return e = e instanceof gr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
|
|
1380
1380
|
}
|
|
1381
1381
|
function et(e) {
|
|
@@ -1387,7 +1387,7 @@ var jr = { exports: {} };
|
|
|
1387
1387
|
var i, o, s, u, g, f, b, d = n.length;
|
|
1388
1388
|
if (!n.every(function(m) {
|
|
1389
1389
|
return typeof m == "string";
|
|
1390
|
-
})) return
|
|
1390
|
+
})) return fe(e, ir);
|
|
1391
1391
|
function v(m) {
|
|
1392
1392
|
i = m === "next" ? function(y) {
|
|
1393
1393
|
return y.toUpperCase();
|
|
@@ -1421,13 +1421,13 @@ var jr = { exports: {} };
|
|
|
1421
1421
|
var E = o(_);
|
|
1422
1422
|
if (t(E, g, p)) return !0;
|
|
1423
1423
|
for (var O = null, x = p; x < d; ++x) {
|
|
1424
|
-
var I = function(j, C,
|
|
1424
|
+
var I = function(j, C, T, M, P, $) {
|
|
1425
1425
|
for (var F = Math.min(j.length, M.length), z = -1, U = 0; U < F; ++U) {
|
|
1426
|
-
var
|
|
1427
|
-
if (
|
|
1428
|
-
P(j[U],
|
|
1426
|
+
var pe = C[U];
|
|
1427
|
+
if (pe !== M[U]) return P(j[U], T[U]) < 0 ? j.substr(0, U) + T[U] + T.substr(U + 1) : P(j[U], M[U]) < 0 ? j.substr(0, U) + M[U] + T.substr(U + 1) : 0 <= z ? j.substr(0, z) + C[z] + T.substr(z + 1) : null;
|
|
1428
|
+
P(j[U], pe) < 0 && (z = U);
|
|
1429
1429
|
}
|
|
1430
|
-
return F < M.length && $ === "next" ? j +
|
|
1430
|
+
return F < M.length && $ === "next" ? j + T.substr(j.length) : F < j.length && $ === "prev" ? j.substr(0, T.length) : z < 0 ? null : j.substr(0, z) + M[z] + T.substr(z + 1);
|
|
1431
1431
|
}(_, E, u[x], g[x], s, f);
|
|
1432
1432
|
I === null && O === null ? p = x + 1 : (O === null || 0 < s(O, I)) && (O = I);
|
|
1433
1433
|
}
|
|
@@ -1451,30 +1451,30 @@ var jr = { exports: {} };
|
|
|
1451
1451
|
return Ce(e, t, !n, !a);
|
|
1452
1452
|
});
|
|
1453
1453
|
} catch {
|
|
1454
|
-
return
|
|
1454
|
+
return fe(this, _e);
|
|
1455
1455
|
}
|
|
1456
1456
|
}, ae.prototype.equals = function(e) {
|
|
1457
|
-
return e == null ?
|
|
1457
|
+
return e == null ? fe(this, _e) : new this.Collection(this, function() {
|
|
1458
1458
|
return pr(e);
|
|
1459
1459
|
});
|
|
1460
1460
|
}, ae.prototype.above = function(e) {
|
|
1461
|
-
return e == null ?
|
|
1461
|
+
return e == null ? fe(this, _e) : new this.Collection(this, function() {
|
|
1462
1462
|
return Ce(e, void 0, !0);
|
|
1463
1463
|
});
|
|
1464
1464
|
}, ae.prototype.aboveOrEqual = function(e) {
|
|
1465
|
-
return e == null ?
|
|
1465
|
+
return e == null ? fe(this, _e) : new this.Collection(this, function() {
|
|
1466
1466
|
return Ce(e, void 0, !1);
|
|
1467
1467
|
});
|
|
1468
1468
|
}, ae.prototype.below = function(e) {
|
|
1469
|
-
return e == null ?
|
|
1469
|
+
return e == null ? fe(this, _e) : new this.Collection(this, function() {
|
|
1470
1470
|
return Ce(void 0, e, !1, !0);
|
|
1471
1471
|
});
|
|
1472
1472
|
}, ae.prototype.belowOrEqual = function(e) {
|
|
1473
|
-
return e == null ?
|
|
1473
|
+
return e == null ? fe(this, _e) : new this.Collection(this, function() {
|
|
1474
1474
|
return Ce(void 0, e);
|
|
1475
1475
|
});
|
|
1476
1476
|
}, ae.prototype.startsWith = function(e) {
|
|
1477
|
-
return typeof e != "string" ?
|
|
1477
|
+
return typeof e != "string" ? fe(this, ir) : this.between(e, e + Ge, !0, !0);
|
|
1478
1478
|
}, ae.prototype.startsWithIgnoreCase = function(e) {
|
|
1479
1479
|
return e === "" ? this.startsWith(e) : Nt(this, function(t, n) {
|
|
1480
1480
|
return t.indexOf(n[0]) === 0;
|
|
@@ -1500,7 +1500,7 @@ var jr = { exports: {} };
|
|
|
1500
1500
|
try {
|
|
1501
1501
|
t.sort(n);
|
|
1502
1502
|
} catch {
|
|
1503
|
-
return
|
|
1503
|
+
return fe(this, _e);
|
|
1504
1504
|
}
|
|
1505
1505
|
if (t.length === 0) return et(this);
|
|
1506
1506
|
var a = new this.Collection(this, function() {
|
|
@@ -1524,7 +1524,7 @@ var jr = { exports: {} };
|
|
|
1524
1524
|
try {
|
|
1525
1525
|
e.sort(this._ascending);
|
|
1526
1526
|
} catch {
|
|
1527
|
-
return
|
|
1527
|
+
return fe(this, _e);
|
|
1528
1528
|
}
|
|
1529
1529
|
var t = e.reduce(function(n, a) {
|
|
1530
1530
|
return n ? n.concat([[n[n.length - 1][1], a]]) : [[-1 / 0, a]];
|
|
@@ -1535,7 +1535,7 @@ var jr = { exports: {} };
|
|
|
1535
1535
|
if (_.length === 0) return et(this);
|
|
1536
1536
|
if (!_.every(function(E) {
|
|
1537
1537
|
return E[0] !== void 0 && E[1] !== void 0 && i(E[0], E[1]) <= 0;
|
|
1538
|
-
})) return
|
|
1538
|
+
})) return fe(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", G.InvalidArgument);
|
|
1539
1539
|
var g = !t || t.includeLowers !== !1, f = t && t.includeUppers === !0, b, d = i;
|
|
1540
1540
|
function v(E, O) {
|
|
1541
1541
|
return d(E[0], O[0]);
|
|
@@ -1552,7 +1552,7 @@ var jr = { exports: {} };
|
|
|
1552
1552
|
return x === I && E.push(O), E;
|
|
1553
1553
|
}, [])).sort(v);
|
|
1554
1554
|
} catch {
|
|
1555
|
-
return
|
|
1555
|
+
return fe(this, _e);
|
|
1556
1556
|
}
|
|
1557
1557
|
var p = 0, m = f ? function(E) {
|
|
1558
1558
|
return 0 < i(E, b[p][1]);
|
|
@@ -1579,11 +1579,11 @@ var jr = { exports: {} };
|
|
|
1579
1579
|
return typeof t == "string";
|
|
1580
1580
|
}) ? e.length === 0 ? et(this) : this.inAnyRange(e.map(function(t) {
|
|
1581
1581
|
return [t, t + Ge];
|
|
1582
|
-
})) :
|
|
1582
|
+
})) : fe(this, "startsWithAnyOf() only works with strings");
|
|
1583
1583
|
}, ae);
|
|
1584
1584
|
function ae() {
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function me(e) {
|
|
1587
1587
|
return Z(function(t) {
|
|
1588
1588
|
return pt(t), e(t.target.error), !1;
|
|
1589
1589
|
});
|
|
@@ -1591,9 +1591,9 @@ var jr = { exports: {} };
|
|
|
1591
1591
|
function pt(e) {
|
|
1592
1592
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1593
1593
|
}
|
|
1594
|
-
var gt = "storagemutated", bn = "x-storagemutated-1", Re = dt(null, gt), ca = (
|
|
1594
|
+
var gt = "storagemutated", bn = "x-storagemutated-1", Re = dt(null, gt), ca = (be.prototype._lock = function() {
|
|
1595
1595
|
return rt(!L.global), ++this._reculock, this._reculock !== 1 || L.global || (L.lockOwnerFor = this), this;
|
|
1596
|
-
},
|
|
1596
|
+
}, be.prototype._unlock = function() {
|
|
1597
1597
|
if (rt(!L.global), --this._reculock == 0) for (L.global || (L.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1598
1598
|
var e = this._blockedFuncs.shift();
|
|
1599
1599
|
try {
|
|
@@ -1602,9 +1602,9 @@ var jr = { exports: {} };
|
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
1604
|
return this;
|
|
1605
|
-
},
|
|
1605
|
+
}, be.prototype._locked = function() {
|
|
1606
1606
|
return this._reculock && L.lockOwnerFor !== this;
|
|
1607
|
-
},
|
|
1607
|
+
}, be.prototype.create = function(e) {
|
|
1608
1608
|
var t = this;
|
|
1609
1609
|
if (!this.mode) return this;
|
|
1610
1610
|
var n = this.db.idbdb, a = this.db._state.dbOpenError;
|
|
@@ -1624,7 +1624,7 @@ var jr = { exports: {} };
|
|
|
1624
1624
|
}), e.oncomplete = Z(function() {
|
|
1625
1625
|
t.active = !1, t._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
|
|
1626
1626
|
}), this;
|
|
1627
|
-
},
|
|
1627
|
+
}, be.prototype._promise = function(e, t, n) {
|
|
1628
1628
|
var a = this;
|
|
1629
1629
|
if (e === "readwrite" && this.mode !== "readwrite") return ee(new G.ReadOnly("Transaction is readonly"));
|
|
1630
1630
|
if (!this.active) return ee(new G.TransactionInactive());
|
|
@@ -1648,9 +1648,9 @@ var jr = { exports: {} };
|
|
|
1648
1648
|
u && u.then && u.then(o, s);
|
|
1649
1649
|
});
|
|
1650
1650
|
return i._lib = !0, i;
|
|
1651
|
-
},
|
|
1651
|
+
}, be.prototype._root = function() {
|
|
1652
1652
|
return this.parent ? this.parent._root() : this;
|
|
1653
|
-
},
|
|
1653
|
+
}, be.prototype.waitFor = function(e) {
|
|
1654
1654
|
var t, n = this._root(), a = N.resolve(e);
|
|
1655
1655
|
n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
|
|
1656
1656
|
return a;
|
|
@@ -1668,16 +1668,16 @@ var jr = { exports: {} };
|
|
|
1668
1668
|
n._waitingFor === i && (n._waitingFor = null);
|
|
1669
1669
|
});
|
|
1670
1670
|
});
|
|
1671
|
-
},
|
|
1671
|
+
}, be.prototype.abort = function() {
|
|
1672
1672
|
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new G.Abort()));
|
|
1673
|
-
},
|
|
1673
|
+
}, be.prototype.table = function(e) {
|
|
1674
1674
|
var t = this._memoizedTables || (this._memoizedTables = {});
|
|
1675
1675
|
if (ie(t, e)) return t[e];
|
|
1676
1676
|
var n = this.schema[e];
|
|
1677
1677
|
if (!n) throw new G.NotFound("Table " + e + " not part of transaction");
|
|
1678
1678
|
return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
|
|
1679
|
-
},
|
|
1680
|
-
function
|
|
1679
|
+
}, be);
|
|
1680
|
+
function be() {
|
|
1681
1681
|
}
|
|
1682
1682
|
function vn(e, t, n, a, i, o, s) {
|
|
1683
1683
|
return { name: e, keyPath: t, unique: n, multi: a, auto: i, compound: o, src: (n && !s ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + yr(t) };
|
|
@@ -1735,27 +1735,27 @@ var jr = { exports: {} };
|
|
|
1735
1735
|
var y = w.trans, _ = w.type, E = w.keys, O = w.values, x = w.range;
|
|
1736
1736
|
return new Promise(function(I, j) {
|
|
1737
1737
|
I = Z(I);
|
|
1738
|
-
var C = y.objectStore(m),
|
|
1738
|
+
var C = y.objectStore(m), T = C.keyPath == null, M = _ === "put" || _ === "add";
|
|
1739
1739
|
if (!M && _ !== "delete" && _ !== "deleteRange") throw new Error("Invalid operation type: " + _);
|
|
1740
1740
|
var P, $ = (E || O || { length: 1 }).length;
|
|
1741
1741
|
if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
|
|
1742
1742
|
if ($ === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1743
1743
|
function F(ue) {
|
|
1744
|
-
++
|
|
1744
|
+
++pe, pt(ue);
|
|
1745
1745
|
}
|
|
1746
|
-
var z = [], U = [],
|
|
1746
|
+
var z = [], U = [], pe = 0;
|
|
1747
1747
|
if (_ === "deleteRange") {
|
|
1748
|
-
if (x.type === 4) return I({ numFailures:
|
|
1748
|
+
if (x.type === 4) return I({ numFailures: pe, failures: U, results: [], lastResult: void 0 });
|
|
1749
1749
|
x.type === 3 ? z.push(P = C.clear()) : z.push(P = C.delete(a(x)));
|
|
1750
1750
|
} else {
|
|
1751
|
-
var
|
|
1751
|
+
var T = M ? T ? [O, E] : [O, null] : [E, null], W = T[0], oe = T[1];
|
|
1752
1752
|
if (M) for (var se = 0; se < $; ++se) z.push(P = oe && oe[se] !== void 0 ? C[_](W[se], oe[se]) : C[_](W[se])), P.onerror = F;
|
|
1753
1753
|
else for (se = 0; se < $; ++se) z.push(P = C[_](W[se])), P.onerror = F;
|
|
1754
1754
|
}
|
|
1755
1755
|
function Vt(ue) {
|
|
1756
1756
|
ue = ue.target.result, z.forEach(function(We, Ln) {
|
|
1757
1757
|
return We.error != null && (U[Ln] = We.error);
|
|
1758
|
-
}), I({ numFailures:
|
|
1758
|
+
}), I({ numFailures: pe, failures: U, results: _ === "delete" ? E : z.map(function(We) {
|
|
1759
1759
|
return We.result;
|
|
1760
1760
|
}), lastResult: ue });
|
|
1761
1761
|
}
|
|
@@ -1767,10 +1767,10 @@ var jr = { exports: {} };
|
|
|
1767
1767
|
var y = w.trans, _ = w.keys;
|
|
1768
1768
|
return new Promise(function(E, O) {
|
|
1769
1769
|
E = Z(E);
|
|
1770
|
-
for (var x, I = y.objectStore(m), j = _.length, C = new Array(j),
|
|
1771
|
-
z = z.target, C[z._pos] = z.result, ++M ===
|
|
1772
|
-
}, $ =
|
|
1773
|
-
|
|
1770
|
+
for (var x, I = y.objectStore(m), j = _.length, C = new Array(j), T = 0, M = 0, P = function(z) {
|
|
1771
|
+
z = z.target, C[z._pos] = z.result, ++M === T && E(C);
|
|
1772
|
+
}, $ = me(O), F = 0; F < j; ++F) _[F] != null && ((x = I.get(_[F]))._pos = F, x.onsuccess = P, x.onerror = $, ++T);
|
|
1773
|
+
T === 0 && E(C);
|
|
1774
1774
|
});
|
|
1775
1775
|
}, get: function(w) {
|
|
1776
1776
|
var y = w.trans, _ = w.key;
|
|
@@ -1779,28 +1779,28 @@ var jr = { exports: {} };
|
|
|
1779
1779
|
var x = y.objectStore(m).get(_);
|
|
1780
1780
|
x.onsuccess = function(I) {
|
|
1781
1781
|
return E(I.target.result);
|
|
1782
|
-
}, x.onerror =
|
|
1782
|
+
}, x.onerror = me(O);
|
|
1783
1783
|
});
|
|
1784
1784
|
}, query: (p = f, function(w) {
|
|
1785
1785
|
return new Promise(function(y, _) {
|
|
1786
1786
|
y = Z(y);
|
|
1787
|
-
var E, O, x,
|
|
1787
|
+
var E, O, x, T = w.trans, I = w.values, j = w.limit, P = w.query, C = j === 1 / 0 ? void 0 : j, M = P.index, P = P.range, T = T.objectStore(m), M = M.isPrimaryKey ? T : T.index(M.name), P = a(P);
|
|
1788
1788
|
if (j === 0) return y({ result: [] });
|
|
1789
1789
|
p ? ((C = I ? M.getAll(P, C) : M.getAllKeys(P, C)).onsuccess = function($) {
|
|
1790
1790
|
return y({ result: $.target.result });
|
|
1791
|
-
}, C.onerror =
|
|
1791
|
+
}, C.onerror = me(_)) : (E = 0, O = !I && "openKeyCursor" in M ? M.openKeyCursor(P) : M.openCursor(P), x = [], O.onsuccess = function($) {
|
|
1792
1792
|
var F = O.result;
|
|
1793
1793
|
return F ? (x.push(I ? F.value : F.primaryKey), ++E === j ? y({ result: x }) : void F.continue()) : y({ result: x });
|
|
1794
|
-
}, O.onerror =
|
|
1794
|
+
}, O.onerror = me(_));
|
|
1795
1795
|
});
|
|
1796
1796
|
}), openCursor: function(w) {
|
|
1797
1797
|
var y = w.trans, _ = w.values, E = w.query, O = w.reverse, x = w.unique;
|
|
1798
1798
|
return new Promise(function(I, j) {
|
|
1799
1799
|
I = Z(I);
|
|
1800
|
-
var M = E.index, C = E.range,
|
|
1801
|
-
P.onerror =
|
|
1802
|
-
var F, z, U,
|
|
1803
|
-
W ? (W.___id = ++ua, W.done = !1, F = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), U = W.advance.bind(W),
|
|
1800
|
+
var M = E.index, C = E.range, T = y.objectStore(m), T = M.isPrimaryKey ? T : T.index(M.name), M = O ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", P = !_ && "openKeyCursor" in T ? T.openKeyCursor(a(C), M) : T.openCursor(a(C), M);
|
|
1801
|
+
P.onerror = me(j), P.onsuccess = Z(function($) {
|
|
1802
|
+
var F, z, U, pe, W = P.result;
|
|
1803
|
+
W ? (W.___id = ++ua, W.done = !1, F = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), U = W.advance.bind(W), pe = function() {
|
|
1804
1804
|
throw new Error("Cursor not stopped");
|
|
1805
1805
|
}, W.trans = y, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
|
|
1806
1806
|
throw new Error("Cursor not started");
|
|
@@ -1823,8 +1823,8 @@ var jr = { exports: {} };
|
|
|
1823
1823
|
}, W.stop();
|
|
1824
1824
|
}
|
|
1825
1825
|
var Vt = new Promise(function(ue, We) {
|
|
1826
|
-
ue = Z(ue), P.onerror =
|
|
1827
|
-
W.stop = W.continue = W.continuePrimaryKey = W.advance =
|
|
1826
|
+
ue = Z(ue), P.onerror = me(We), W.fail = We, W.stop = function(Ln) {
|
|
1827
|
+
W.stop = W.continue = W.continuePrimaryKey = W.advance = pe, ue(Ln);
|
|
1828
1828
|
};
|
|
1829
1829
|
});
|
|
1830
1830
|
return P.onsuccess = Z(function(ue) {
|
|
@@ -1837,9 +1837,9 @@ var jr = { exports: {} };
|
|
|
1837
1837
|
var y = w.query, _ = w.trans, E = y.index, O = y.range;
|
|
1838
1838
|
return new Promise(function(x, I) {
|
|
1839
1839
|
var j = _.objectStore(m), C = E.isPrimaryKey ? j : j.index(E.name), j = a(O), C = j ? C.count(j) : C.count();
|
|
1840
|
-
C.onsuccess = Z(function(
|
|
1841
|
-
return x(
|
|
1842
|
-
}), C.onerror =
|
|
1840
|
+
C.onsuccess = Z(function(T) {
|
|
1841
|
+
return x(T.target.result);
|
|
1842
|
+
}), C.onerror = me(I);
|
|
1843
1843
|
});
|
|
1844
1844
|
} };
|
|
1845
1845
|
}
|
|
@@ -1937,11 +1937,11 @@ var jr = { exports: {} };
|
|
|
1937
1937
|
var j = Qn(O);
|
|
1938
1938
|
x.del.forEach(function(M) {
|
|
1939
1939
|
j[M] = E[M];
|
|
1940
|
-
}), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype],
|
|
1941
|
-
var C,
|
|
1942
|
-
return
|
|
1940
|
+
}), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype], R(j), j), p.schema = j;
|
|
1941
|
+
var C, T = tn(I);
|
|
1942
|
+
return T && Je(), x = N.follow(function() {
|
|
1943
1943
|
var M;
|
|
1944
|
-
(C = I(p)) &&
|
|
1944
|
+
(C = I(p)) && T && (M = Pe.bind(null, null), C.then(M, M));
|
|
1945
1945
|
}), C && typeof C.then == "function" ? N.resolve(C) : x.then(function() {
|
|
1946
1946
|
return C;
|
|
1947
1947
|
});
|
|
@@ -1962,7 +1962,7 @@ var jr = { exports: {} };
|
|
|
1962
1962
|
br(y, m);
|
|
1963
1963
|
})) : N.resolve();
|
|
1964
1964
|
var d, v, p, m, w, y;
|
|
1965
|
-
}).catch(s)) : (
|
|
1965
|
+
}).catch(s)) : (R(i).forEach(function(b) {
|
|
1966
1966
|
On(n, b, i[b].primKey, i[b].indexes);
|
|
1967
1967
|
}), Bt(e, n), void N.follow(function() {
|
|
1968
1968
|
return e.on.populate.fire(o);
|
|
@@ -1979,7 +1979,7 @@ var jr = { exports: {} };
|
|
|
1979
1979
|
if (s.change.length || s.recreate) return console.warn("Unable to patch indexes of table ".concat(s.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
1980
1980
|
var u = t.objectStore(s.name);
|
|
1981
1981
|
s.add.forEach(function(g) {
|
|
1982
|
-
|
|
1982
|
+
ye && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(g.src)), Gt(u, g);
|
|
1983
1983
|
});
|
|
1984
1984
|
}(i[a]);
|
|
1985
1985
|
if (typeof o == "object") return o.value;
|
|
@@ -2013,8 +2013,8 @@ var jr = { exports: {} };
|
|
|
2013
2013
|
}), i;
|
|
2014
2014
|
}
|
|
2015
2015
|
function br(e, t) {
|
|
2016
|
-
|
|
2017
|
-
t.db.objectStoreNames.contains(n) || (
|
|
2016
|
+
R(e).forEach(function(n) {
|
|
2017
|
+
t.db.objectStoreNames.contains(n) || (ye && console.debug("Dexie: Creating missing table", n), On(t, n, e[n].primKey, e[n].indexes));
|
|
2018
2018
|
});
|
|
2019
2019
|
}
|
|
2020
2020
|
function Gt(e, t) {
|
|
@@ -2048,7 +2048,7 @@ var jr = { exports: {} };
|
|
|
2048
2048
|
});
|
|
2049
2049
|
}
|
|
2050
2050
|
var ga = (Ut.prototype._parseStoresSpec = function(e, t) {
|
|
2051
|
-
|
|
2051
|
+
R(e).forEach(function(n) {
|
|
2052
2052
|
if (e[n] !== null) {
|
|
2053
2053
|
var a = vr(e[n]), i = a.shift();
|
|
2054
2054
|
if (i.unique = !0, i.multi) throw new G.Schema("Primary key cannot be multi-valued");
|
|
@@ -2064,7 +2064,7 @@ var jr = { exports: {} };
|
|
|
2064
2064
|
var n = t._versions, a = {}, i = {};
|
|
2065
2065
|
return n.forEach(function(o) {
|
|
2066
2066
|
J(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
|
|
2067
|
-
}), t._dbSchema = i, Sn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables],
|
|
2067
|
+
}), t._dbSchema = i, Sn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], R(i), i), t._storeNames = R(i), this;
|
|
2068
2068
|
}, Ut.prototype.upgrade = function(e) {
|
|
2069
2069
|
return this._cfg.contentUpgrade = rn(this._cfg.contentUpgrade || Q, e), this;
|
|
2070
2070
|
}, Ut);
|
|
@@ -2147,7 +2147,7 @@ var jr = { exports: {} };
|
|
|
2147
2147
|
return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
|
|
2148
2148
|
}
|
|
2149
2149
|
function zt(e, t) {
|
|
2150
|
-
return
|
|
2150
|
+
return R(t).forEach(function(n) {
|
|
2151
2151
|
e[n] ? vt(e[n], t[n]) : e[n] = function a(i) {
|
|
2152
2152
|
var o, s, u = {};
|
|
2153
2153
|
for (o in i) ie(i, o) && (s = i[o], u[o] = !s || typeof s != "object" || Vn.has(s.constructor) ? s : a(s));
|
|
@@ -2160,7 +2160,7 @@ var jr = { exports: {} };
|
|
|
2160
2160
|
return t[n] && wr(t[n], e[n]);
|
|
2161
2161
|
});
|
|
2162
2162
|
}
|
|
2163
|
-
xe(ce.prototype, ((
|
|
2163
|
+
xe(ce.prototype, ((he = { add: function(e) {
|
|
2164
2164
|
return vt(this, e), this;
|
|
2165
2165
|
}, addKey: function(e) {
|
|
2166
2166
|
return bt(this, e, e), this;
|
|
@@ -2174,7 +2174,7 @@ var jr = { exports: {} };
|
|
|
2174
2174
|
return t && H(t.from, e) <= 0 && 0 <= H(t.to, e);
|
|
2175
2175
|
} })[en] = function() {
|
|
2176
2176
|
return Wt(this);
|
|
2177
|
-
},
|
|
2177
|
+
}, he));
|
|
2178
2178
|
var Fe = {}, In = {}, Cn = !1;
|
|
2179
2179
|
function Ht(e) {
|
|
2180
2180
|
zt(In, e), Cn || (Cn = !0, setTimeout(function() {
|
|
@@ -2223,27 +2223,27 @@ var jr = { exports: {} };
|
|
|
2223
2223
|
if (s(), !n) throw new G.MissingAPI();
|
|
2224
2224
|
var m = e.name, w = t.autoSchema || !i ? n.open(m) : n.open(m, i);
|
|
2225
2225
|
if (!w) throw new G.MissingAPI();
|
|
2226
|
-
w.onerror =
|
|
2226
|
+
w.onerror = me(p), w.onblocked = Z(e._fireOnBlocked), w.onupgradeneeded = Z(function(y) {
|
|
2227
2227
|
var _;
|
|
2228
2228
|
b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (_ = n.deleteDatabase(m)).onsuccess = _.onerror = Z(function() {
|
|
2229
2229
|
p(new G.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
|
|
2230
|
-
})) : (b.onerror =
|
|
2230
|
+
})) : (b.onerror = me(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, d = y < 1, e.idbdb = w.result, o && pa(e, b), ha(e, y / 10, b, p));
|
|
2231
2231
|
}, p), w.onsuccess = Z(function() {
|
|
2232
2232
|
b = null;
|
|
2233
2233
|
var y, _, E, O, x, I = e.idbdb = w.result, j = St(I.objectStoreNames);
|
|
2234
2234
|
if (0 < j.length) try {
|
|
2235
2235
|
var C = I.transaction((O = j).length === 1 ? O[0] : O, "readonly");
|
|
2236
|
-
if (t.autoSchema) _ = I, E = C, (y = e).verno = _.version / 10, E = y._dbSchema = $t(0, _, E), y._storeNames = St(_.objectStoreNames, 0), Lt(y, [y._allTables],
|
|
2237
|
-
else if (Ft(e, e._dbSchema, C), ((x = En($t(0, (x = e).idbdb, C), x._dbSchema)).add.length || x.change.some(function(
|
|
2238
|
-
return
|
|
2236
|
+
if (t.autoSchema) _ = I, E = C, (y = e).verno = _.version / 10, E = y._dbSchema = $t(0, _, E), y._storeNames = St(_.objectStoreNames, 0), Lt(y, [y._allTables], R(E), E);
|
|
2237
|
+
else if (Ft(e, e._dbSchema, C), ((x = En($t(0, (x = e).idbdb, C), x._dbSchema)).add.length || x.change.some(function(T) {
|
|
2238
|
+
return T.add.length || T.change.length;
|
|
2239
2239
|
})) && !o) 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."), I.close(), i = I.version + 1, o = !0, v(u());
|
|
2240
2240
|
Bt(e, C);
|
|
2241
2241
|
} catch {
|
|
2242
2242
|
}
|
|
2243
|
-
Ze.push(e), I.onversionchange = Z(function(
|
|
2244
|
-
t.vcFired = !0, e.on("versionchange").fire(
|
|
2245
|
-
}), I.onclose = Z(function(
|
|
2246
|
-
e.on("close").fire(
|
|
2243
|
+
Ze.push(e), I.onversionchange = Z(function(T) {
|
|
2244
|
+
t.vcFired = !0, e.on("versionchange").fire(T);
|
|
2245
|
+
}), I.onclose = Z(function(T) {
|
|
2246
|
+
e.on("close").fire(T);
|
|
2247
2247
|
}), d && (x = e._deps, C = m, I = x.indexedDB, x = x.IDBKeyRange, kn(I) || C === Tt || xn(I, x).put({ name: C }).catch(Q)), v();
|
|
2248
2248
|
}, p);
|
|
2249
2249
|
}).catch(function(v) {
|
|
@@ -2362,10 +2362,10 @@ var jr = { exports: {} };
|
|
|
2362
2362
|
} });
|
|
2363
2363
|
} };
|
|
2364
2364
|
function jn(e, t, n, a) {
|
|
2365
|
-
return n = n || {}, a = a || "",
|
|
2365
|
+
return n = n || {}, a = a || "", R(e).forEach(function(i) {
|
|
2366
2366
|
var o, s, u;
|
|
2367
2367
|
ie(t, i) ? (o = e[i], s = t[i], typeof o == "object" && typeof s == "object" && o && s ? (u = qt(o)) !== qt(s) ? n[a + i] = t[i] : u === "Object" ? jn(o, s, n, a + i + ".") : o !== s && (n[a + i] = t[i]) : o !== s && (n[a + i] = t[i])) : n[a + i] = void 0;
|
|
2368
|
-
}),
|
|
2368
|
+
}), R(t).forEach(function(i) {
|
|
2369
2369
|
ie(e, i) || (n[a + i] = t[i]);
|
|
2370
2370
|
}), n;
|
|
2371
2371
|
}
|
|
@@ -2412,15 +2412,15 @@ var jr = { exports: {} };
|
|
|
2412
2412
|
if (!y) throw new Error("Keys missing");
|
|
2413
2413
|
return (d = d.type === "add" || d.type === "put" ? l(l({}, d), { keys: y }) : l({}, d)).type !== "delete" && (d.values = k([], d.values)), d.keys && (d.keys = k([], d.keys)), v = n, m = y, ((p = d).type === "add" ? Promise.resolve([]) : v.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(_) {
|
|
2414
2414
|
var E = y.map(function(O, x) {
|
|
2415
|
-
var I, j, C,
|
|
2416
|
-
return d.type === "delete" ? u.fire.call(M, O,
|
|
2417
|
-
ie(C, P) ? C[P] = j[P] :
|
|
2415
|
+
var I, j, C, T = _[x], M = { onerror: null, onsuccess: null };
|
|
2416
|
+
return d.type === "delete" ? u.fire.call(M, O, T, w) : d.type === "add" || T === void 0 ? (I = g.fire.call(M, O, d.values[x], w), O == null && I != null && (d.keys[x] = O = I, a.outbound || de(d.values[x], a.keyPath, O))) : (I = jn(T, d.values[x]), (j = f.fire.call(M, I, O, T, w)) && (C = d.values[x], Object.keys(j).forEach(function(P) {
|
|
2417
|
+
ie(C, P) ? C[P] = j[P] : de(C, P, j[P]);
|
|
2418
2418
|
}))), M;
|
|
2419
2419
|
});
|
|
2420
2420
|
return n.mutate(d).then(function(O) {
|
|
2421
2421
|
for (var x = O.failures, I = O.results, j = O.numFailures, O = O.lastResult, C = 0; C < y.length; ++C) {
|
|
2422
|
-
var
|
|
2423
|
-
|
|
2422
|
+
var T = (I || y)[C], M = E[C];
|
|
2423
|
+
T == null ? M.onerror && M.onerror(x[C]) : M.onsuccess && M.onsuccess(d.type === "put" && _[C] ? d.values[C] : T);
|
|
2424
2424
|
}
|
|
2425
2425
|
return { failures: x, results: I, numFailures: j, lastResult: O };
|
|
2426
2426
|
}).catch(function(O) {
|
|
@@ -2484,22 +2484,22 @@ var jr = { exports: {} };
|
|
|
2484
2484
|
}
|
|
2485
2485
|
var w, y, _, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), x = m(""), I = m(":dels"), j = p.type, M = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Mn(s, p).filter(function(P) {
|
|
2486
2486
|
return P;
|
|
2487
|
-
}), p.values] : [], C = M[0],
|
|
2488
|
-
return B(C) ? (x.addKeys(C), (M = j === "delete" || C.length ===
|
|
2487
|
+
}), p.values] : [], C = M[0], T = M[1], M = p.trans._cache;
|
|
2488
|
+
return B(C) ? (x.addKeys(C), (M = j === "delete" || C.length === T.length ? Or(C, M) : null) || I.addKeys(C), (M || T) && (w = m, y = M, _ = T, o.indexes.forEach(function(P) {
|
|
2489
2489
|
var $ = w(P.name || "");
|
|
2490
2490
|
function F(U) {
|
|
2491
2491
|
return U != null ? P.extractKey(U) : null;
|
|
2492
2492
|
}
|
|
2493
2493
|
function z(U) {
|
|
2494
|
-
return P.multiEntry && B(U) ? U.forEach(function(
|
|
2495
|
-
return $.addKey(
|
|
2494
|
+
return P.multiEntry && B(U) ? U.forEach(function(pe) {
|
|
2495
|
+
return $.addKey(pe);
|
|
2496
2496
|
}) : $.addKey(U);
|
|
2497
2497
|
}
|
|
2498
2498
|
(y || _).forEach(function(U, oe) {
|
|
2499
2499
|
var W = y && F(y[oe]), oe = _ && F(_[oe]);
|
|
2500
2500
|
H(W, oe) !== 0 && (W != null && z(W), oe != null && z(oe));
|
|
2501
2501
|
});
|
|
2502
|
-
}))) : C ? (
|
|
2502
|
+
}))) : C ? (T = { from: C.lower, to: C.upper }, I.add(T), x.add(T)) : (x.add(n), I.add(n), o.indexes.forEach(function(P) {
|
|
2503
2503
|
return m(P.name).add(n);
|
|
2504
2504
|
})), i.mutate(p).then(function(P) {
|
|
2505
2505
|
return !C || p.type !== "add" && p.type !== "put" || (x.addKeys(P.results), f && f.forEach(function($) {
|
|
@@ -2521,25 +2521,25 @@ var jr = { exports: {} };
|
|
|
2521
2521
|
}, getMany: function(p) {
|
|
2522
2522
|
return [s, new ce().addKeys(p.keys)];
|
|
2523
2523
|
}, count: d, query: d, openCursor: d };
|
|
2524
|
-
return
|
|
2524
|
+
return R(v).forEach(function(p) {
|
|
2525
2525
|
b[p] = function(m) {
|
|
2526
2526
|
var w = L.subscr, y = !!w, _ = xr(L, i) && kr(p, m) ? m.obsSet = {} : w;
|
|
2527
2527
|
if (y) {
|
|
2528
|
-
var E = function(
|
|
2529
|
-
return
|
|
2528
|
+
var E = function(T) {
|
|
2529
|
+
return T = "idb://".concat(t, "/").concat(a, "/").concat(T), _[T] || (_[T] = new ce());
|
|
2530
2530
|
}, O = E(""), x = E(":dels"), w = v[p](m), y = w[0], w = w[1];
|
|
2531
2531
|
if ((p === "query" && y.isPrimaryKey && !m.values ? x : E(y.name || "")).add(w), !y.isPrimaryKey) {
|
|
2532
2532
|
if (p !== "count") {
|
|
2533
2533
|
var I = p === "query" && g && m.values && i.query(l(l({}, m), { values: !1 }));
|
|
2534
|
-
return i[p].apply(this, arguments).then(function(
|
|
2534
|
+
return i[p].apply(this, arguments).then(function(T) {
|
|
2535
2535
|
if (p === "query") {
|
|
2536
2536
|
if (g && m.values) return I.then(function(F) {
|
|
2537
|
-
return F = F.result, O.addKeys(F),
|
|
2537
|
+
return F = F.result, O.addKeys(F), T;
|
|
2538
2538
|
});
|
|
2539
|
-
var M = m.values ?
|
|
2539
|
+
var M = m.values ? T.result.map(u) : T.result;
|
|
2540
2540
|
(m.values ? O : x).addKeys(M);
|
|
2541
2541
|
} else if (p === "openCursor") {
|
|
2542
|
-
var P =
|
|
2542
|
+
var P = T, $ = m.values;
|
|
2543
2543
|
return P && Object.create(P, { key: { get: function() {
|
|
2544
2544
|
return x.addKey(P.primaryKey), P.key;
|
|
2545
2545
|
} }, primaryKey: { get: function() {
|
|
@@ -2549,7 +2549,7 @@ var jr = { exports: {} };
|
|
|
2549
2549
|
return $ && O.addKey(P.primaryKey), P.value;
|
|
2550
2550
|
} } });
|
|
2551
2551
|
}
|
|
2552
|
-
return
|
|
2552
|
+
return T;
|
|
2553
2553
|
});
|
|
2554
2554
|
}
|
|
2555
2555
|
x.add(n);
|
|
@@ -2606,9 +2606,9 @@ var jr = { exports: {} };
|
|
|
2606
2606
|
});
|
|
2607
2607
|
break;
|
|
2608
2608
|
case "deleteRange":
|
|
2609
|
-
var
|
|
2609
|
+
var T = m.range;
|
|
2610
2610
|
w = p.filter(function(P) {
|
|
2611
|
-
return !Kn(f(P),
|
|
2611
|
+
return !Kn(f(P), T);
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
return w;
|
|
@@ -2669,9 +2669,9 @@ var jr = { exports: {} };
|
|
|
2669
2669
|
p.optimisticOps = p.optimisticOps.filter(function($) {
|
|
2670
2670
|
return $.trans !== u;
|
|
2671
2671
|
});
|
|
2672
|
-
for (var x = 0, I = Object.values(p.queries.query); x < I.length; x++) for (var j, C,
|
|
2672
|
+
for (var x = 0, I = Object.values(p.queries.query); x < I.length; x++) for (var j, C, T, M = 0, P = (j = I[x]).slice(); M < P.length; M++) (C = P[M]).res != null && u.mutatedParts && (g && !C.dirty ? (T = Object.isFrozen(C.res), T = Dr(C.res, C.req, w, m, C, T), C.dirty ? (Me(j, C), C.subscribers.forEach(function($) {
|
|
2673
2673
|
return f.add($);
|
|
2674
|
-
})) :
|
|
2674
|
+
})) : T !== C.res && (C.res = T, C.promise = N.resolve({ result: T }))) : (C.dirty && Me(j, C), C.subscribers.forEach(function($) {
|
|
2675
2675
|
return f.add($);
|
|
2676
2676
|
})));
|
|
2677
2677
|
}
|
|
@@ -2698,7 +2698,7 @@ var jr = { exports: {} };
|
|
|
2698
2698
|
})) : s.then(function(g) {
|
|
2699
2699
|
var f = Ar(0, l(l({}, o), { values: o.values.map(function(p, d) {
|
|
2700
2700
|
var v, p = (v = i.keyPath) !== null && v !== void 0 && v.includes(".") ? je(p) : l({}, p);
|
|
2701
|
-
return
|
|
2701
|
+
return de(p, i.keyPath, g.results[d]), p;
|
|
2702
2702
|
}) }), g);
|
|
2703
2703
|
u.optimisticOps.push(f), queueMicrotask(function() {
|
|
2704
2704
|
return o.mutatedParts && Ht(o.mutatedParts);
|
|
@@ -2807,7 +2807,7 @@ var jr = { exports: {} };
|
|
|
2807
2807
|
u.onsuccess = Z(function() {
|
|
2808
2808
|
var g, f, b;
|
|
2809
2809
|
g = t._deps, f = t.name, b = g.indexedDB, g = g.IDBKeyRange, kn(b) || f === Tt || xn(b, g).delete(f).catch(Q), i();
|
|
2810
|
-
}), u.onerror =
|
|
2810
|
+
}), u.onerror = me(o), u.onblocked = t._fireOnBlocked;
|
|
2811
2811
|
}
|
|
2812
2812
|
if (n) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
|
|
2813
2813
|
a.isBeingOpened ? a.dbReadyPromise.then(s) : s();
|
|
@@ -2825,7 +2825,7 @@ var jr = { exports: {} };
|
|
|
2825
2825
|
return this._state.autoSchema;
|
|
2826
2826
|
}, Object.defineProperty(te.prototype, "tables", { get: function() {
|
|
2827
2827
|
var e = this;
|
|
2828
|
-
return
|
|
2828
|
+
return R(this._allTables).map(function(t) {
|
|
2829
2829
|
return e._allTables[t];
|
|
2830
2830
|
});
|
|
2831
2831
|
}, enumerable: !1, configurable: !0 }), te.prototype.transaction = function() {
|
|
@@ -2982,9 +2982,9 @@ var jr = { exports: {} };
|
|
|
2982
2982
|
return d(n);
|
|
2983
2983
|
});
|
|
2984
2984
|
}
|
|
2985
|
-
var Xt,
|
|
2985
|
+
var Xt, he = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Oa = (Nn.prototype.subscribe = function(e, t, n) {
|
|
2986
2986
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
|
|
2987
|
-
}, Nn.prototype[
|
|
2987
|
+
}, Nn.prototype[he] = function() {
|
|
2988
2988
|
return this;
|
|
2989
2989
|
}, Nn);
|
|
2990
2990
|
function Nn(e) {
|
|
@@ -3096,12 +3096,12 @@ var jr = { exports: {} };
|
|
|
3096
3096
|
} }, waitFor: function(e, t) {
|
|
3097
3097
|
return t = N.resolve(typeof e == "function" ? Ue.ignoreTransaction(e) : e).timeout(t || 6e4), L.trans ? L.trans.waitFor(t) : t;
|
|
3098
3098
|
}, Promise: N, debug: { get: function() {
|
|
3099
|
-
return
|
|
3099
|
+
return ye;
|
|
3100
3100
|
}, set: function(e) {
|
|
3101
3101
|
qn(e);
|
|
3102
|
-
} }, derive: ze, extend: J, props: xe, override: Hn, Events: dt, on: Re, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: ve, setByKeyPath:
|
|
3103
|
-
typeof t == "string" ?
|
|
3104
|
-
|
|
3102
|
+
} }, derive: ze, extend: J, props: xe, override: Hn, Events: dt, on: Re, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: ve, setByKeyPath: de, delByKeyPath: function(e, t) {
|
|
3103
|
+
typeof t == "string" ? de(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
|
|
3104
|
+
de(e, n, void 0);
|
|
3105
3105
|
});
|
|
3106
3106
|
}, shallowClone: Qn, deepClone: je, getObjectDiff: jn, cmp: H, asap: Yn, minKey: -1 / 0, addons: [], connections: Ze, errnames: nn, dependencies: Xt, cache: Fe, semVer: "4.0.8", version: "4.0.8".split(".").map(function(e) {
|
|
3107
3107
|
return parseInt(e);
|
|
@@ -3122,16 +3122,16 @@ var jr = { exports: {} };
|
|
|
3122
3122
|
Te || tt.postMessage(e);
|
|
3123
3123
|
})), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
|
|
3124
3124
|
if (!Ee.disableBfCache && e.persisted) {
|
|
3125
|
-
|
|
3125
|
+
ye && console.debug("Dexie: handling persisted pagehide"), tt != null && tt.close();
|
|
3126
3126
|
for (var t = 0, n = Ze; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
|
|
3127
3127
|
}
|
|
3128
3128
|
}), addEventListener("pageshow", function(e) {
|
|
3129
|
-
!Ee.disableBfCache && e.persisted && (
|
|
3129
|
+
!Ee.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), Cr(), Bn({ all: new ce(-1 / 0, [[]]) }));
|
|
3130
3130
|
})), N.rejectionMapper = function(e, t) {
|
|
3131
3131
|
return !e || e instanceof Ye || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Zn[e.name] ? e : (t = new Zn[e.name](t || e.message, e), "stack" in e && ke(t, "stack", { get: function() {
|
|
3132
3132
|
return this.inner.stack;
|
|
3133
3133
|
} }), t);
|
|
3134
|
-
}, qn(
|
|
3134
|
+
}, qn(ye), l(Ee, Object.freeze({ __proto__: null, Dexie: Ee, liveQuery: Ir, Entity: sr, cmp: H, PropModSymbol: Se, PropModification: ht, replacePrefix: function(e, t) {
|
|
3135
3135
|
return new ht({ replacePrefix: [e, t] });
|
|
3136
3136
|
}, add: function(e) {
|
|
3137
3137
|
return new ht({ add: e });
|
|
@@ -3144,7 +3144,7 @@ var Ia = jr.exports;
|
|
|
3144
3144
|
const Fn = /* @__PURE__ */ Pa(Ia), Tr = Symbol.for("Dexie"), Un = globalThis[Tr] || (globalThis[Tr] = Fn);
|
|
3145
3145
|
if (Fn.semVer !== Un.semVer)
|
|
3146
3146
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Fn.semVer} and ${Un.semVer}`);
|
|
3147
|
-
var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), S = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(S || {}), ne = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(ne || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}),
|
|
3147
|
+
var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), S = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(S || {}), ne = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(ne || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}), ge = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(ge || {});
|
|
3148
3148
|
function X(h) {
|
|
3149
3149
|
let r = `${h.type}.${h.topics}`;
|
|
3150
3150
|
return h.order && (r += `.${h.order}`), h.period && (r += `.${h.period}`), r;
|
|
@@ -3159,10 +3159,10 @@ function nt(h) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
function _t(h, r) {
|
|
3161
3161
|
var B;
|
|
3162
|
-
let c, l, k, D,
|
|
3162
|
+
let c, l, k, D, R;
|
|
3163
3163
|
switch (h.moderation) {
|
|
3164
3164
|
case Zt.BEFORE:
|
|
3165
|
-
c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), k = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"),
|
|
3165
|
+
c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), k = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), R = Number.parseInt(l ? l[2] : "00"), r.before = c.setHours(k, D, R, 0) / 1e3, r.period || (r.period = c.getDay() === 1 ? 72 : 24);
|
|
3166
3166
|
break;
|
|
3167
3167
|
case Zt.DELAYED:
|
|
3168
3168
|
h.delay && h.delay > 0 && (r.delay = `${h.delay}`);
|
|
@@ -3236,17 +3236,17 @@ class Mr {
|
|
|
3236
3236
|
});
|
|
3237
3237
|
if (D.length === 0)
|
|
3238
3238
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3239
|
-
const
|
|
3240
|
-
(
|
|
3241
|
-
), q = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((
|
|
3242
|
-
(
|
|
3239
|
+
const R = D[0] ? D[0].title : "No title", B = D.map(
|
|
3240
|
+
(le) => le.message_id
|
|
3241
|
+
), q = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((le) => le.sort((ie, xe) => xe.utc - ie.utc))).map(
|
|
3242
|
+
(le) => le.data
|
|
3243
3243
|
);
|
|
3244
3244
|
return {
|
|
3245
3245
|
data: {
|
|
3246
3246
|
presentation: (r == null ? void 0 : r.presentation) || "not set",
|
|
3247
3247
|
slide: (r == null ? void 0 : r.slide) || "not set",
|
|
3248
3248
|
messages: q,
|
|
3249
|
-
title:
|
|
3249
|
+
title: R,
|
|
3250
3250
|
topics: [r.dashboard, r.widget].join("-"),
|
|
3251
3251
|
query: r
|
|
3252
3252
|
},
|
|
@@ -3267,7 +3267,7 @@ class Mr {
|
|
|
3267
3267
|
id: r.widget,
|
|
3268
3268
|
dashboard_id: r.dashboard,
|
|
3269
3269
|
data: c.data
|
|
3270
|
-
}).then(() => 201).catch((l) => (console.error("%cstorage", S.STORAGE, "set", r, l), 400)) : 400);
|
|
3270
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", S.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3271
3271
|
/**
|
|
3272
3272
|
* Update Series
|
|
3273
3273
|
* @param query IQuery
|
|
@@ -3278,7 +3278,7 @@ class Mr {
|
|
|
3278
3278
|
id: r.widget,
|
|
3279
3279
|
dashboard_id: r.dashboard,
|
|
3280
3280
|
data: c.data
|
|
3281
|
-
}).then(() => 201).catch((l) => (console.error("%cstorage", S.STORAGE, "set", r, l), 400)) : 400);
|
|
3281
|
+
}).then(() => 201).catch((l) => (console.error("%cstorage", S.STORAGE, "set", r, l.message), 400)) : 400);
|
|
3282
3282
|
/**
|
|
3283
3283
|
* Update Messages
|
|
3284
3284
|
* @param query IQuery
|
|
@@ -3291,40 +3291,41 @@ class Mr {
|
|
|
3291
3291
|
A(this, "setMessages", async (r, c) => {
|
|
3292
3292
|
if (r.type !== K.MESSAGES)
|
|
3293
3293
|
return 400;
|
|
3294
|
-
const l = c.data.title;
|
|
3295
|
-
let
|
|
3296
|
-
return c.data.messages.forEach(async (
|
|
3297
|
-
var
|
|
3298
|
-
await this.db.table(K.MESSAGES).put({ id:
|
|
3299
|
-
|
|
3294
|
+
const l = c.data.title, k = c.data.topics;
|
|
3295
|
+
let D = 0;
|
|
3296
|
+
return c.data.messages.forEach(async (R) => {
|
|
3297
|
+
var B, J, q;
|
|
3298
|
+
R.id && await this.db.table(K.MESSAGES).put({ id: R.id, utc: R.utc, data: R }).catch((le) => {
|
|
3299
|
+
D++, console.error(
|
|
3300
3300
|
"%cstorage",
|
|
3301
3301
|
S.STORAGE,
|
|
3302
3302
|
"set message",
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3303
|
+
l,
|
|
3304
|
+
k,
|
|
3305
|
+
R,
|
|
3306
|
+
le.message
|
|
3306
3307
|
);
|
|
3307
3308
|
}), await this.db.table(K.TOPICS).put({
|
|
3308
3309
|
widget_id: r.widget,
|
|
3309
|
-
message_id:
|
|
3310
|
+
message_id: R.id,
|
|
3310
3311
|
dashboard_id: r.dashboard,
|
|
3311
3312
|
title: l,
|
|
3312
|
-
engagement: (
|
|
3313
|
-
impressions: (
|
|
3314
|
-
reach: (
|
|
3315
|
-
sentiment:
|
|
3316
|
-
utc:
|
|
3317
|
-
}).catch((
|
|
3318
|
-
|
|
3313
|
+
engagement: (B = R.dynamics) == null ? void 0 : B.engagement,
|
|
3314
|
+
impressions: (J = R.dynamics) == null ? void 0 : J.semrush_visits,
|
|
3315
|
+
reach: (q = R.dynamics) == null ? void 0 : q.potential_reach,
|
|
3316
|
+
sentiment: R.topics[0].sentiment,
|
|
3317
|
+
utc: R.utc
|
|
3318
|
+
}).catch((le) => {
|
|
3319
|
+
D++, console.error(
|
|
3319
3320
|
"%cstorage",
|
|
3320
3321
|
S.STORAGE,
|
|
3321
3322
|
"set topic",
|
|
3322
3323
|
`title: ${l}`,
|
|
3323
|
-
|
|
3324
|
-
|
|
3324
|
+
R,
|
|
3325
|
+
le.message
|
|
3325
3326
|
);
|
|
3326
3327
|
});
|
|
3327
|
-
}),
|
|
3328
|
+
}), D === 0 ? 201 : 400;
|
|
3328
3329
|
});
|
|
3329
3330
|
/**
|
|
3330
3331
|
* Wipe Message data after number of seconds
|
|
@@ -3332,22 +3333,22 @@ class Mr {
|
|
|
3332
3333
|
*/
|
|
3333
3334
|
A(this, "cleanMessages", async (r) => {
|
|
3334
3335
|
const c = Date.now() / 1e3, l = (D) => D.utc < c - r, k = (D) => D.utc < c - r;
|
|
3335
|
-
return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((D,
|
|
3336
|
-
delete
|
|
3336
|
+
return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((D, R) => {
|
|
3337
|
+
delete R.value;
|
|
3337
3338
|
}).catch((D) => (console.error(
|
|
3338
3339
|
"%cstorage%c %clean",
|
|
3339
3340
|
S.STORAGE,
|
|
3340
3341
|
S.NONE,
|
|
3341
3342
|
S.MESSAGES,
|
|
3342
|
-
D
|
|
3343
|
-
), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(k).modify((D,
|
|
3344
|
-
delete
|
|
3343
|
+
D.message
|
|
3344
|
+
), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(k).modify((D, R) => {
|
|
3345
|
+
delete R.value;
|
|
3345
3346
|
}).catch((D) => (console.error(
|
|
3346
3347
|
"%cstorage%c %clean",
|
|
3347
3348
|
S.STORAGE,
|
|
3348
3349
|
S.NONE,
|
|
3349
3350
|
S.MESSAGES,
|
|
3350
|
-
D
|
|
3351
|
+
D.message
|
|
3351
3352
|
), 0));
|
|
3352
3353
|
});
|
|
3353
3354
|
A(this, "hideMessage", async (r, c) => {
|
|
@@ -3356,7 +3357,7 @@ class Mr {
|
|
|
3356
3357
|
S.STORAGE,
|
|
3357
3358
|
S.NONE,
|
|
3358
3359
|
S.HIDE,
|
|
3359
|
-
l
|
|
3360
|
+
l.message
|
|
3360
3361
|
), 0));
|
|
3361
3362
|
});
|
|
3362
3363
|
/**
|
|
@@ -3368,7 +3369,7 @@ class Mr {
|
|
|
3368
3369
|
id: r.widget,
|
|
3369
3370
|
dashboard_id: r.dashboard,
|
|
3370
3371
|
type: r.type
|
|
3371
|
-
}).then(() => 201).catch((c) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, c), 400)));
|
|
3372
|
+
}).then(() => 201).catch((c) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, c.message), 400)));
|
|
3372
3373
|
/**
|
|
3373
3374
|
* Add component subscriber
|
|
3374
3375
|
* @param query IQuery
|
|
@@ -3395,17 +3396,16 @@ class Mr {
|
|
|
3395
3396
|
* @returns IResponse
|
|
3396
3397
|
*/
|
|
3397
3398
|
A(this, "loadSlide", async (r) => {
|
|
3398
|
-
const c = await this.db.table(K.SLIDE).where({ id: r.
|
|
3399
|
+
const c = await this.db.table(K.SLIDE).where({ id: r.id }).last().catch(() => {
|
|
3399
3400
|
console.warn(
|
|
3400
3401
|
"%capi%c %cseries",
|
|
3401
3402
|
S.API,
|
|
3402
3403
|
S.NONE,
|
|
3403
3404
|
S.SERIES,
|
|
3404
|
-
r.
|
|
3405
|
-
r.widget
|
|
3405
|
+
r.id
|
|
3406
3406
|
);
|
|
3407
3407
|
});
|
|
3408
|
-
return c === void 0 ? { data: null, message: "Slide Load error", success: !1 } : (c.data.
|
|
3408
|
+
return c === void 0 ? { data: null, message: "Slide Load error", success: !1 } : (c.data.id = (r == null ? void 0 : r.id) || "not set", c.message = "Slide retrieved successfully", c.success = !0, c);
|
|
3409
3409
|
});
|
|
3410
3410
|
/**
|
|
3411
3411
|
* Update Slide
|
|
@@ -3418,13 +3418,13 @@ class Mr {
|
|
|
3418
3418
|
json: r.data.json || {},
|
|
3419
3419
|
html: r.data.html || "",
|
|
3420
3420
|
css: r.data.css || ""
|
|
3421
|
-
}).then(() =>
|
|
3421
|
+
}).then(() => 200).catch((c) => (console.error(
|
|
3422
3422
|
"%cstorage",
|
|
3423
3423
|
S.STORAGE,
|
|
3424
3424
|
ne.SLIDE_STORE,
|
|
3425
3425
|
r,
|
|
3426
|
-
c
|
|
3427
|
-
),
|
|
3426
|
+
c.message
|
|
3427
|
+
), 422)) : 422);
|
|
3428
3428
|
this.options = r, this.db = new Un(r.app), this.db.version(3).stores({
|
|
3429
3429
|
player: "id,title,name,location",
|
|
3430
3430
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
@@ -3449,7 +3449,7 @@ function Ca(h, r) {
|
|
|
3449
3449
|
const c = indexedDB.open(h);
|
|
3450
3450
|
c.onupgradeneeded = () => c.result.createObjectStore(r);
|
|
3451
3451
|
const l = Wn(c);
|
|
3452
|
-
return (k, D) => l.then((
|
|
3452
|
+
return (k, D) => l.then((R) => D(R.transaction(r, k).objectStore(r)));
|
|
3453
3453
|
}
|
|
3454
3454
|
let Gn;
|
|
3455
3455
|
function Kr() {
|
|
@@ -3487,7 +3487,7 @@ class Nr {
|
|
|
3487
3487
|
if (!c.success)
|
|
3488
3488
|
return 400;
|
|
3489
3489
|
const l = X(r);
|
|
3490
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.CLOUD, r, k), 400));
|
|
3490
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.CLOUD, r, k.message), 400));
|
|
3491
3491
|
});
|
|
3492
3492
|
/**
|
|
3493
3493
|
* Update Series
|
|
@@ -3499,7 +3499,7 @@ class Nr {
|
|
|
3499
3499
|
if (!c.success)
|
|
3500
3500
|
return 400;
|
|
3501
3501
|
const l = X(r);
|
|
3502
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SERIES, r, k), 400));
|
|
3502
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SERIES, r, k.message), 400));
|
|
3503
3503
|
});
|
|
3504
3504
|
/**
|
|
3505
3505
|
* Update Messages
|
|
@@ -3511,7 +3511,7 @@ class Nr {
|
|
|
3511
3511
|
if (!c.success)
|
|
3512
3512
|
return 400;
|
|
3513
3513
|
const l = X(r);
|
|
3514
|
-
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.MESSAGES, r, k), 400));
|
|
3514
|
+
return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.MESSAGES, r, k.message), 400));
|
|
3515
3515
|
});
|
|
3516
3516
|
A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
|
|
3517
3517
|
A(this, "hideMessage", async (r, c) => {
|
|
@@ -3530,7 +3530,7 @@ class Nr {
|
|
|
3530
3530
|
dashboard_id: r.dashboard,
|
|
3531
3531
|
type: r.type
|
|
3532
3532
|
};
|
|
3533
|
-
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, k), 400));
|
|
3533
|
+
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, k.message), 400));
|
|
3534
3534
|
});
|
|
3535
3535
|
/**
|
|
3536
3536
|
* Add component subscriber
|
|
@@ -3569,7 +3569,7 @@ class Nr {
|
|
|
3569
3569
|
html: r.data.html || "",
|
|
3570
3570
|
css: r.data.css || ""
|
|
3571
3571
|
};
|
|
3572
|
-
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SLIDE, r, k), 400));
|
|
3572
|
+
return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SLIDE, r, k.message), 400));
|
|
3573
3573
|
});
|
|
3574
3574
|
this.options = r;
|
|
3575
3575
|
}
|
|
@@ -4090,8 +4090,8 @@ function $r(h, r, c, l) {
|
|
|
4090
4090
|
return D;
|
|
4091
4091
|
try {
|
|
4092
4092
|
return Oe(D, String(r.valueOf()));
|
|
4093
|
-
} catch (
|
|
4094
|
-
return Oe(D, `[valueOf exception]${
|
|
4093
|
+
} catch (R) {
|
|
4094
|
+
return Oe(D, `[valueOf exception]${R.stack || R.message}`);
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
4097
|
return Oe(k, r.toString());
|
|
@@ -4178,14 +4178,14 @@ class Ja {
|
|
|
4178
4178
|
l.push(this.api.get(k));
|
|
4179
4179
|
}), await Promise.allSettled(l).then(
|
|
4180
4180
|
(k) => k.forEach(async (D) => {
|
|
4181
|
-
let
|
|
4181
|
+
let R = 400;
|
|
4182
4182
|
if (D.status === "fulfilled") {
|
|
4183
4183
|
const B = D.value;
|
|
4184
4184
|
if (this.sm === null)
|
|
4185
4185
|
return 400;
|
|
4186
4186
|
if (B.success === !0) {
|
|
4187
4187
|
const J = this.sm.subscribers.filter(
|
|
4188
|
-
(
|
|
4188
|
+
(le) => le.widget === B.query.widget
|
|
4189
4189
|
)[0];
|
|
4190
4190
|
let q = "";
|
|
4191
4191
|
switch (B.query.type) {
|
|
@@ -4200,7 +4200,7 @@ class Ja {
|
|
|
4200
4200
|
B.query.slide,
|
|
4201
4201
|
B.query.widget
|
|
4202
4202
|
), 204;
|
|
4203
|
-
J.hash = q,
|
|
4203
|
+
J.hash = q, R = await this.sm.setMessages(B.query, B);
|
|
4204
4204
|
break;
|
|
4205
4205
|
case K.CLOUD:
|
|
4206
4206
|
q = $n(B.data), J.hash === q ? (console.debug(
|
|
@@ -4211,7 +4211,7 @@ class Ja {
|
|
|
4211
4211
|
K.CLOUD,
|
|
4212
4212
|
B.query.slide,
|
|
4213
4213
|
B.query.widget
|
|
4214
|
-
),
|
|
4214
|
+
), R = 204) : (J.hash = q, R = await this.sm.setCloud(B.query, B));
|
|
4215
4215
|
break;
|
|
4216
4216
|
case K.SERIES:
|
|
4217
4217
|
q = $n(B.data), J.hash === q ? (console.debug(
|
|
@@ -4222,7 +4222,7 @@ class Ja {
|
|
|
4222
4222
|
K.SERIES,
|
|
4223
4223
|
B.query.slide,
|
|
4224
4224
|
B.query.widget
|
|
4225
|
-
),
|
|
4225
|
+
), R = 204) : (J.hash = q, R = await this.sm.setSeries(B.query, B));
|
|
4226
4226
|
break;
|
|
4227
4227
|
default:
|
|
4228
4228
|
console.warn(
|
|
@@ -4235,8 +4235,8 @@ class Ja {
|
|
|
4235
4235
|
);
|
|
4236
4236
|
}
|
|
4237
4237
|
} else
|
|
4238
|
-
|
|
4239
|
-
switch (
|
|
4238
|
+
R = 401;
|
|
4239
|
+
switch (R) {
|
|
4240
4240
|
case 201:
|
|
4241
4241
|
console.info(
|
|
4242
4242
|
"%capp%c %cbroadcast",
|
|
@@ -4258,7 +4258,7 @@ class Ja {
|
|
|
4258
4258
|
);
|
|
4259
4259
|
break;
|
|
4260
4260
|
}
|
|
4261
|
-
return
|
|
4261
|
+
return R;
|
|
4262
4262
|
} else
|
|
4263
4263
|
return console.warn(
|
|
4264
4264
|
"%capi%c %cstorage",
|
|
@@ -4347,19 +4347,19 @@ class Ja {
|
|
|
4347
4347
|
), this.bc.onmessage = (l) => {
|
|
4348
4348
|
this.actions(l);
|
|
4349
4349
|
}, this.bc.postMessage({ event: ne.STORAGE_INIT, data: {} }), this.api = new Da(r), r.storage) {
|
|
4350
|
-
case
|
|
4350
|
+
case ge.DEXIE:
|
|
4351
4351
|
this.sm = new Mr(r);
|
|
4352
4352
|
break;
|
|
4353
|
-
case
|
|
4353
|
+
case ge.LOCAL:
|
|
4354
4354
|
this.sm = new Lr(r);
|
|
4355
4355
|
break;
|
|
4356
|
-
case
|
|
4356
|
+
case ge.SESSION:
|
|
4357
4357
|
this.sm = new Br(r);
|
|
4358
4358
|
break;
|
|
4359
|
-
case
|
|
4359
|
+
case ge.KEYVAL:
|
|
4360
4360
|
this.sm = new Nr(r);
|
|
4361
4361
|
break;
|
|
4362
|
-
case
|
|
4362
|
+
case ge.WINDOW:
|
|
4363
4363
|
this.sm = new Gr(r);
|
|
4364
4364
|
break;
|
|
4365
4365
|
}
|
|
@@ -4432,19 +4432,19 @@ class Na {
|
|
|
4432
4432
|
}) : await ((c = this.sm) == null ? void 0 : c.getSeries(r));
|
|
4433
4433
|
});
|
|
4434
4434
|
switch (this.sm = null, r.storage) {
|
|
4435
|
-
case
|
|
4435
|
+
case ge.DEXIE:
|
|
4436
4436
|
this.sm = new Mr(r);
|
|
4437
4437
|
break;
|
|
4438
|
-
case
|
|
4438
|
+
case ge.LOCAL:
|
|
4439
4439
|
this.sm = new Lr(r);
|
|
4440
4440
|
break;
|
|
4441
|
-
case
|
|
4441
|
+
case ge.SESSION:
|
|
4442
4442
|
this.sm = new Br(r);
|
|
4443
4443
|
break;
|
|
4444
|
-
case
|
|
4444
|
+
case ge.KEYVAL:
|
|
4445
4445
|
this.sm = new Nr(r);
|
|
4446
4446
|
break;
|
|
4447
|
-
case
|
|
4447
|
+
case ge.WINDOW:
|
|
4448
4448
|
this.sm = new Gr(r);
|
|
4449
4449
|
break;
|
|
4450
4450
|
}
|
|
@@ -4571,10 +4571,10 @@ class Za {
|
|
|
4571
4571
|
});
|
|
4572
4572
|
window.dispatchEvent(k);
|
|
4573
4573
|
});
|
|
4574
|
-
var
|
|
4574
|
+
var R;
|
|
4575
4575
|
this.element = r, this.listeners = c, l = typeof l < "u" ? l : "buzzcasting-slide";
|
|
4576
4576
|
let k;
|
|
4577
|
-
k = { ...r.dataset }, delete k.hmr, k.slide = ((
|
|
4577
|
+
k = { ...r.dataset }, delete k.hmr, k.slide = ((R = r.closest(l.toUpperCase())) == null ? void 0 : R.id) ?? `${l} not found`, k = nt(k), this.query = k, Ta(r);
|
|
4578
4578
|
const D = window.BuzzCasting.getOptions();
|
|
4579
4579
|
this.storageReader = new Na(D), this.broadcastChannel = new BroadcastChannel(k.slide), this.startListener();
|
|
4580
4580
|
}
|
|
@@ -4628,7 +4628,7 @@ export {
|
|
|
4628
4628
|
S as CSS,
|
|
4629
4629
|
ne as EVENTS,
|
|
4630
4630
|
Zt as MODERATION,
|
|
4631
|
-
|
|
4631
|
+
ge as STORAGE,
|
|
4632
4632
|
Za as Widget,
|
|
4633
4633
|
La as anonymize,
|
|
4634
4634
|
Ga as attachedMedia,
|