buzzcasting-storage 2.1.0 → 2.1.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var gi = Object.defineProperty;
|
|
2
2
|
var bi = (D, s, k) => s in D ? gi(D, s, { enumerable: !0, configurable: !0, writable: !0, value: k }) : D[s] = k;
|
|
3
3
|
var T = (D, s, k) => (bi(D, typeof s != "symbol" ? s + "" : s, k), k);
|
|
4
|
-
const le = "messages", ze = "cloud", $e = "series", wi = "topics", gt = "widget", _i = "widgets", bt = "subscribe", xi = "keyval", ki = "local", Oi = "session", Si = "dexie", Ei = "window",
|
|
4
|
+
const le = "messages", ze = "cloud", $e = "series", wi = "topics", gt = "widget", _i = "widgets", bt = "subscribe", xi = "keyval", ki = "local", Oi = "session", Si = "dexie", Ei = "window", V = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", Nn = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", vt = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;";
|
|
5
5
|
class Pi {
|
|
6
6
|
constructor(s) {
|
|
7
7
|
T(this, "options");
|
|
@@ -273,7 +273,7 @@ var Ar = { exports: {} };
|
|
|
273
273
|
}, {}), kt = ce.reduce(function(e, t) {
|
|
274
274
|
return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = R[t]), e;
|
|
275
275
|
}, {});
|
|
276
|
-
function
|
|
276
|
+
function q() {
|
|
277
277
|
}
|
|
278
278
|
function rt(e) {
|
|
279
279
|
return e;
|
|
@@ -289,7 +289,7 @@ var Ar = { exports: {} };
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
function Ur(e, t) {
|
|
292
|
-
return e ===
|
|
292
|
+
return e === q ? t : function() {
|
|
293
293
|
var n = e.apply(this, arguments);
|
|
294
294
|
n !== void 0 && (arguments[0] = n);
|
|
295
295
|
var r = this.onsuccess, i = this.onerror;
|
|
@@ -299,14 +299,14 @@ var Ar = { exports: {} };
|
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
function Wr(e, t) {
|
|
302
|
-
return e ===
|
|
302
|
+
return e === q ? t : function() {
|
|
303
303
|
e.apply(this, arguments);
|
|
304
304
|
var n = this.onsuccess, r = this.onerror;
|
|
305
305
|
this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? De(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? De(r, this.onerror) : r);
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
function Vr(e, t) {
|
|
309
|
-
return e ===
|
|
309
|
+
return e === q ? t : function(n) {
|
|
310
310
|
var r = e.apply(this, arguments);
|
|
311
311
|
Q(n, r);
|
|
312
312
|
var i = this.onsuccess, o = this.onerror;
|
|
@@ -314,12 +314,12 @@ var Ar = { exports: {} };
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
function qr(e, t) {
|
|
317
|
-
return e ===
|
|
317
|
+
return e === q ? t : function() {
|
|
318
318
|
return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
function tn(e, t) {
|
|
322
|
-
return e ===
|
|
322
|
+
return e === q ? t : function() {
|
|
323
323
|
var n = e.apply(this, arguments);
|
|
324
324
|
if (n && typeof n.then == "function") {
|
|
325
325
|
for (var r = this, i = arguments.length, o = new Array(i); i--; )
|
|
@@ -344,7 +344,7 @@ var Ar = { exports: {} };
|
|
|
344
344
|
return [t, _e(t), e];
|
|
345
345
|
}(), ot = he[0], ce = he[1], he = he[2], ce = ce && ce.then, at = ot && ot.constructor, nn = !!he, st = function(e, t) {
|
|
346
346
|
ut.push([e, t]), Ot && (queueMicrotask(Yr), Ot = !1);
|
|
347
|
-
}, rn = !0, Ot = !0, Te = [], St = [], on = rt, Oe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled:
|
|
347
|
+
}, rn = !0, Ot = !0, Te = [], St = [], on = rt, Oe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: q, pgp: !1, env: {}, finalize: q }, B = Oe, ut = [], Be = 0, Et = [];
|
|
348
348
|
function A(e) {
|
|
349
349
|
if (typeof this != "object")
|
|
350
350
|
throw new TypeError("Promises must be constructed via new");
|
|
@@ -640,7 +640,7 @@ var Ar = { exports: {} };
|
|
|
640
640
|
function ln(e) {
|
|
641
641
|
Promise === at && Z.echoes === 0 ? Ct === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
642
642
|
}
|
|
643
|
-
("" + ce).indexOf("[native code]") === -1 && (Qe = Ee =
|
|
643
|
+
("" + ce).indexOf("[native code]") === -1 && (Qe = Ee = q);
|
|
644
644
|
var X = A.reject, he = "4.0.1-beta.10", Re = "", ve = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Xe = [], Dt = "__dbnames", fn = "readonly", hn = "readwrite";
|
|
645
645
|
function Me(e, t) {
|
|
646
646
|
return e ? t ? function() {
|
|
@@ -737,7 +737,7 @@ var Ar = { exports: {} };
|
|
|
737
737
|
if (!m._state.isBeingOpened) {
|
|
738
738
|
if (!m._state.autoOpen)
|
|
739
739
|
return X(new R.DatabaseClosed());
|
|
740
|
-
m.open().catch(
|
|
740
|
+
m.open().catch(q);
|
|
741
741
|
}
|
|
742
742
|
return m._state.dbReadyPromise.then(function() {
|
|
743
743
|
return l(m, c, f, d);
|
|
@@ -1008,7 +1008,7 @@ var Ar = { exports: {} };
|
|
|
1008
1008
|
if (typeof a != "object") {
|
|
1009
1009
|
var l;
|
|
1010
1010
|
u = u || qr;
|
|
1011
|
-
var m = { subscribers: [], fire: h = h ||
|
|
1011
|
+
var m = { subscribers: [], fire: h = h || q, subscribe: function(c) {
|
|
1012
1012
|
m.subscribers.indexOf(c) === -1 && (m.subscribers.push(c), m.fire = u(m.fire, c));
|
|
1013
1013
|
}, unsubscribe: function(c) {
|
|
1014
1014
|
m.subscribers = m.subscribers.filter(function(f) {
|
|
@@ -1092,9 +1092,9 @@ var Ar = { exports: {} };
|
|
|
1092
1092
|
t && !t(o, function(u) {
|
|
1093
1093
|
return a = u;
|
|
1094
1094
|
}, function(u) {
|
|
1095
|
-
o.stop(u), a =
|
|
1095
|
+
o.stop(u), a = q;
|
|
1096
1096
|
}, function(u) {
|
|
1097
|
-
o.fail(u), a =
|
|
1097
|
+
o.fail(u), a = q;
|
|
1098
1098
|
}) || i(o.value, o, function(u) {
|
|
1099
1099
|
return a = u;
|
|
1100
1100
|
}), a();
|
|
@@ -2085,7 +2085,7 @@ var Ar = { exports: {} };
|
|
|
2085
2085
|
Q(r, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(r, i);
|
|
2086
2086
|
}), t._dbSchema = i, wn(t, [t._allTables, t, t.Transaction.prototype]), Ft(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], C(i), i), t._storeNames = C(i), this;
|
|
2087
2087
|
}, $t.prototype.upgrade = function(e) {
|
|
2088
|
-
return this._cfg.contentUpgrade = tn(this._cfg.contentUpgrade ||
|
|
2088
|
+
return this._cfg.contentUpgrade = tn(this._cfg.contentUpgrade || q, e), this;
|
|
2089
2089
|
}, $t);
|
|
2090
2090
|
function $t() {
|
|
2091
2091
|
}
|
|
@@ -2284,7 +2284,7 @@ var Ar = { exports: {} };
|
|
|
2284
2284
|
t.vcFired = !0, e.on("versionchange").fire(K);
|
|
2285
2285
|
}), S.onclose = H(function(K) {
|
|
2286
2286
|
e.on("close").fire(K);
|
|
2287
|
-
}), c && (x = e._deps, E = y, S = x.indexedDB, x = x.IDBKeyRange, On(S) || E === Dt || kn(S, x).put({ name: E }).catch(
|
|
2287
|
+
}), c && (x = e._deps, E = y, S = x.indexedDB, x = x.IDBKeyRange, On(S) || E === Dt || kn(S, x).put({ name: E }).catch(q)), f();
|
|
2288
2288
|
}, d);
|
|
2289
2289
|
}).catch(function(f) {
|
|
2290
2290
|
switch (f == null ? void 0 : f.name) {
|
|
@@ -2312,7 +2312,7 @@ var Ar = { exports: {} };
|
|
|
2312
2312
|
return e.on.ready.fire(e.vip);
|
|
2313
2313
|
})).then(function f() {
|
|
2314
2314
|
if (0 < t.onReadyBeingFired.length) {
|
|
2315
|
-
var d = t.onReadyBeingFired.reduce(tn,
|
|
2315
|
+
var d = t.onReadyBeingFired.reduce(tn, q);
|
|
2316
2316
|
return t.onReadyBeingFired = [], A.resolve(Sn(function() {
|
|
2317
2317
|
return d(e.vip);
|
|
2318
2318
|
})).then(f);
|
|
@@ -2422,25 +2422,25 @@ var Ar = { exports: {} };
|
|
|
2422
2422
|
var o = B.trans, a = o.table(t).hook, u = a.deleting, h = a.creating, l = a.updating;
|
|
2423
2423
|
switch (i.type) {
|
|
2424
2424
|
case "add":
|
|
2425
|
-
if (h.fire ===
|
|
2425
|
+
if (h.fire === q)
|
|
2426
2426
|
break;
|
|
2427
2427
|
return o._promise("readwrite", function() {
|
|
2428
2428
|
return m(i);
|
|
2429
2429
|
}, !0);
|
|
2430
2430
|
case "put":
|
|
2431
|
-
if (h.fire ===
|
|
2431
|
+
if (h.fire === q && l.fire === q)
|
|
2432
2432
|
break;
|
|
2433
2433
|
return o._promise("readwrite", function() {
|
|
2434
2434
|
return m(i);
|
|
2435
2435
|
}, !0);
|
|
2436
2436
|
case "delete":
|
|
2437
|
-
if (u.fire ===
|
|
2437
|
+
if (u.fire === q)
|
|
2438
2438
|
break;
|
|
2439
2439
|
return o._promise("readwrite", function() {
|
|
2440
2440
|
return m(i);
|
|
2441
2441
|
}, !0);
|
|
2442
2442
|
case "deleteRange":
|
|
2443
|
-
if (u.fire ===
|
|
2443
|
+
if (u.fire === q)
|
|
2444
2444
|
break;
|
|
2445
2445
|
return o._promise("readwrite", function() {
|
|
2446
2446
|
return function c(f, d, y) {
|
|
@@ -2832,7 +2832,7 @@ var Ar = { exports: {} };
|
|
|
2832
2832
|
if (!t._state.isBeingOpened) {
|
|
2833
2833
|
if (!t._state.autoOpen)
|
|
2834
2834
|
return void r(new R.DatabaseClosed());
|
|
2835
|
-
t.open().catch(
|
|
2835
|
+
t.open().catch(q);
|
|
2836
2836
|
}
|
|
2837
2837
|
t._state.dbReadyPromise.then(n, r);
|
|
2838
2838
|
}).then(e);
|
|
@@ -2878,7 +2878,7 @@ var Ar = { exports: {} };
|
|
|
2878
2878
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2879
2879
|
u.onsuccess = H(function() {
|
|
2880
2880
|
var h, l, m;
|
|
2881
|
-
h = t._deps, l = t.name, m = h.indexedDB, h = h.IDBKeyRange, On(m) || l === Dt || kn(m, h).delete(l).catch(
|
|
2881
|
+
h = t._deps, l = t.name, m = h.indexedDB, h = h.IDBKeyRange, On(m) || l === Dt || kn(m, h).delete(l).catch(q), i();
|
|
2882
2882
|
}), u.onerror = de(o), u.onblocked = t._fireOnBlocked;
|
|
2883
2883
|
}
|
|
2884
2884
|
if (n)
|
|
@@ -2990,12 +2990,12 @@ var Ar = { exports: {} };
|
|
|
2990
2990
|
this._middlewares = {}, this.verno = 0;
|
|
2991
2991
|
var r = J.dependencies;
|
|
2992
2992
|
this._options = t = w({ addons: J.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
2993
|
-
var i, o, a, u, h, l = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve:
|
|
2993
|
+
var i, o, a, u, h, l = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: q, dbReadyPromise: null, cancelOpen: q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
2994
2994
|
l.dbReadyPromise = new A(function(c) {
|
|
2995
2995
|
l.dbReadyResolve = c;
|
|
2996
2996
|
}), l.openCanceller = new A(function(c, f) {
|
|
2997
2997
|
l.cancelOpen = f;
|
|
2998
|
-
}), this._state = l, this.name = e, this.on = ct(this, "populate", "blocked", "versionchange", "close", { ready: [tn,
|
|
2998
|
+
}), this._state = l, this.name = e, this.on = ct(this, "populate", "blocked", "versionchange", "close", { ready: [tn, q] }), this.on.ready.subscribe = Vn(this.on.ready.subscribe, function(c) {
|
|
2999
2999
|
return function(f, d) {
|
|
3000
3000
|
J.vip(function() {
|
|
3001
3001
|
var y, v = n._state;
|
|
@@ -3016,7 +3016,7 @@ var Ar = { exports: {} };
|
|
|
3016
3016
|
var v = g._ctx, p = v.table, g = p.hook.reading.fire;
|
|
3017
3017
|
this._ctx = { table: p, index: v.index, isPrimKey: !v.index || p.schema.primKey.keyPath && v.index === p.schema.primKey.name, range: d, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: y, or: v.or, valueMapper: g !== rt ? g : null };
|
|
3018
3018
|
})), this.Table = (o = this, lt(cr.prototype, function(c, f, d) {
|
|
3019
|
-
this.db = o, this._tx = d, this.name = c, this.schema = f, this.hook = o._allTables[c] ? o._allTables[c].hook : ct(null, { creating: [Ur,
|
|
3019
|
+
this.db = o, this._tx = d, this.name = c, this.schema = f, this.hook = o._allTables[c] ? o._allTables[c].hook : ct(null, { creating: [Ur, q], reading: [$r, rt], updating: [Vr, q], deleting: [Wr, q] });
|
|
3020
3020
|
})), this.Transaction = (a = this, lt(ti.prototype, function(c, f, d, y, v) {
|
|
3021
3021
|
var p = this;
|
|
3022
3022
|
this.db = a, this.mode = c, this.storeNames = f, this.schema = d, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ct(this, "complete", "error", "abort"), this.parent = v || 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 A(function(g, b) {
|
|
@@ -3265,7 +3265,7 @@ class Ki {
|
|
|
3265
3265
|
id: s.widget,
|
|
3266
3266
|
dashboard_id: s.dashboard,
|
|
3267
3267
|
data: k.data
|
|
3268
|
-
}).then(() => 201).catch((w) => (console.error("%cstorage",
|
|
3268
|
+
}).then(() => 201).catch((w) => (console.error("%cstorage", V, "set", s, w), 400)) : 400);
|
|
3269
3269
|
/**
|
|
3270
3270
|
* Update Series
|
|
3271
3271
|
* @param query IQuery
|
|
@@ -3276,7 +3276,7 @@ class Ki {
|
|
|
3276
3276
|
id: s.widget,
|
|
3277
3277
|
dashboard_id: s.dashboard,
|
|
3278
3278
|
data: k.data
|
|
3279
|
-
}).then(() => 201).catch((w) => (console.error("%cstorage",
|
|
3279
|
+
}).then(() => 201).catch((w) => (console.error("%cstorage", V, "set", s, w), 400)) : 400);
|
|
3280
3280
|
/**
|
|
3281
3281
|
* Update Messages
|
|
3282
3282
|
* @param query IQuery
|
|
@@ -3306,7 +3306,7 @@ class Ki {
|
|
|
3306
3306
|
});
|
|
3307
3307
|
}), 201;
|
|
3308
3308
|
} catch (O) {
|
|
3309
|
-
return console.error("%cstorage",
|
|
3309
|
+
return console.error("%cstorage", V, "set", s, O), 400;
|
|
3310
3310
|
}
|
|
3311
3311
|
});
|
|
3312
3312
|
/**
|
|
@@ -3328,7 +3328,7 @@ class Ki {
|
|
|
3328
3328
|
id: s.widget,
|
|
3329
3329
|
dashboard_id: s.dashboard,
|
|
3330
3330
|
type: s.type
|
|
3331
|
-
}).then(() => 201).catch((k) => (console.error("%cstorage",
|
|
3331
|
+
}).then(() => 201).catch((k) => (console.error("%cstorage", V, gt, s, k), 400)));
|
|
3332
3332
|
/**
|
|
3333
3333
|
* Add component subscriber
|
|
3334
3334
|
* @param query IQuery
|
|
@@ -3344,7 +3344,7 @@ class Ki {
|
|
|
3344
3344
|
(O) => O.widget === s.widget
|
|
3345
3345
|
).length > 0 || (s.type === le && (s = wt(this.options, s)), console.info(
|
|
3346
3346
|
"%cstorage",
|
|
3347
|
-
|
|
3347
|
+
V,
|
|
3348
3348
|
bt,
|
|
3349
3349
|
s.slide,
|
|
3350
3350
|
s.widget
|
|
@@ -3401,7 +3401,7 @@ class Ti {
|
|
|
3401
3401
|
if (!k.success)
|
|
3402
3402
|
return 400;
|
|
3403
3403
|
const w = se(s);
|
|
3404
|
-
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage",
|
|
3404
|
+
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, ze, s, O), 400));
|
|
3405
3405
|
});
|
|
3406
3406
|
/**
|
|
3407
3407
|
* Update Series
|
|
@@ -3413,7 +3413,7 @@ class Ti {
|
|
|
3413
3413
|
if (!k.success)
|
|
3414
3414
|
return 400;
|
|
3415
3415
|
const w = se(s);
|
|
3416
|
-
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage",
|
|
3416
|
+
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, $e, s, O), 400));
|
|
3417
3417
|
});
|
|
3418
3418
|
/**
|
|
3419
3419
|
* Update Messages
|
|
@@ -3425,7 +3425,7 @@ class Ti {
|
|
|
3425
3425
|
if (!k.success)
|
|
3426
3426
|
return 400;
|
|
3427
3427
|
const w = se(s);
|
|
3428
|
-
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage",
|
|
3428
|
+
return delete k.success, delete k.message, await Qt(w, k).then(() => 201).catch((O) => (console.error("%cstorage", V, le, s, O), 400));
|
|
3429
3429
|
});
|
|
3430
3430
|
T(this, "cleanMessages", async (s) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((k) => k())));
|
|
3431
3431
|
/**
|
|
@@ -3439,7 +3439,7 @@ class Ti {
|
|
|
3439
3439
|
dashboard_id: s.dashboard,
|
|
3440
3440
|
type: s.type
|
|
3441
3441
|
};
|
|
3442
|
-
return await Qt(k, w).then(() => 201).catch((O) => (console.error("%cstorage",
|
|
3442
|
+
return await Qt(k, w).then(() => 201).catch((O) => (console.error("%cstorage", V, gt, s, O), 400));
|
|
3443
3443
|
});
|
|
3444
3444
|
/**
|
|
3445
3445
|
* Add component subscriber
|
|
@@ -3454,7 +3454,7 @@ class Ti {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
|
|
3456
3456
|
(O) => O.widget === s.widget
|
|
3457
|
-
).length > 0 || (console.info("%cstorage",
|
|
3457
|
+
).length > 0 || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
|
|
3458
3458
|
});
|
|
3459
3459
|
/**
|
|
3460
3460
|
* Get current subscribers
|
|
@@ -3479,7 +3479,7 @@ class Bi {
|
|
|
3479
3479
|
try {
|
|
3480
3480
|
return localStorage.setObject(w, k), 201;
|
|
3481
3481
|
} catch (O) {
|
|
3482
|
-
return console.error("%cstorage",
|
|
3482
|
+
return console.error("%cstorage", V, ze, s, O), 400;
|
|
3483
3483
|
}
|
|
3484
3484
|
});
|
|
3485
3485
|
/**
|
|
@@ -3493,7 +3493,7 @@ class Bi {
|
|
|
3493
3493
|
try {
|
|
3494
3494
|
return localStorage.setObject(w, k), 201;
|
|
3495
3495
|
} catch (O) {
|
|
3496
|
-
return console.error("%cstorage",
|
|
3496
|
+
return console.error("%cstorage", V, $e, s, O), 400;
|
|
3497
3497
|
}
|
|
3498
3498
|
});
|
|
3499
3499
|
/**
|
|
@@ -3507,7 +3507,7 @@ class Bi {
|
|
|
3507
3507
|
try {
|
|
3508
3508
|
return localStorage.setObject(w, k), 200;
|
|
3509
3509
|
} catch (O) {
|
|
3510
|
-
return console.error("%cstorage",
|
|
3510
|
+
return console.error("%cstorage", V, le, s, O), 400;
|
|
3511
3511
|
}
|
|
3512
3512
|
});
|
|
3513
3513
|
T(this, "cleanMessages", async (s) => {
|
|
@@ -3518,7 +3518,7 @@ class Bi {
|
|
|
3518
3518
|
try {
|
|
3519
3519
|
return localStorage.setObject(k, s), 201;
|
|
3520
3520
|
} catch (w) {
|
|
3521
|
-
return console.error("%cstorage",
|
|
3521
|
+
return console.error("%cstorage", V, gt, s, w), 400;
|
|
3522
3522
|
}
|
|
3523
3523
|
});
|
|
3524
3524
|
/**
|
|
@@ -3534,7 +3534,7 @@ class Bi {
|
|
|
3534
3534
|
}
|
|
3535
3535
|
return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
|
|
3536
3536
|
(O) => O.widget === s.widget
|
|
3537
|
-
).length || (console.info("%cstorage",
|
|
3537
|
+
).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
|
|
3538
3538
|
});
|
|
3539
3539
|
/**
|
|
3540
3540
|
* Get current subscribers
|
|
@@ -3564,7 +3564,7 @@ class Ii {
|
|
|
3564
3564
|
try {
|
|
3565
3565
|
return sessionStorage.setObject(w, k), 201;
|
|
3566
3566
|
} catch (O) {
|
|
3567
|
-
return console.error("%cstorage",
|
|
3567
|
+
return console.error("%cstorage", V, ze, s, O), 400;
|
|
3568
3568
|
}
|
|
3569
3569
|
});
|
|
3570
3570
|
/**
|
|
@@ -3578,7 +3578,7 @@ class Ii {
|
|
|
3578
3578
|
try {
|
|
3579
3579
|
return sessionStorage.setObject(w, k), 201;
|
|
3580
3580
|
} catch (O) {
|
|
3581
|
-
return console.error("%cstorage",
|
|
3581
|
+
return console.error("%cstorage", V, $e, s, O), 400;
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
3584
|
/**
|
|
@@ -3592,7 +3592,7 @@ class Ii {
|
|
|
3592
3592
|
try {
|
|
3593
3593
|
return sessionStorage.setObject(w, k), 201;
|
|
3594
3594
|
} catch (O) {
|
|
3595
|
-
return console.error("%cstorage",
|
|
3595
|
+
return console.error("%cstorage", V, le, s, O), 400;
|
|
3596
3596
|
}
|
|
3597
3597
|
});
|
|
3598
3598
|
T(this, "cleanMessages", async (s) => {
|
|
@@ -3603,7 +3603,7 @@ class Ii {
|
|
|
3603
3603
|
try {
|
|
3604
3604
|
return sessionStorage.setObject(k, s), 201;
|
|
3605
3605
|
} catch (w) {
|
|
3606
|
-
return console.error("%cstorage",
|
|
3606
|
+
return console.error("%cstorage", V, gt, s, w), 400;
|
|
3607
3607
|
}
|
|
3608
3608
|
});
|
|
3609
3609
|
/**
|
|
@@ -3619,7 +3619,7 @@ class Ii {
|
|
|
3619
3619
|
}
|
|
3620
3620
|
return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
|
|
3621
3621
|
(O) => O.widget === s.widget
|
|
3622
|
-
).length || (console.info("%cstorage",
|
|
3622
|
+
).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
|
|
3623
3623
|
});
|
|
3624
3624
|
/**
|
|
3625
3625
|
* Get current subscribers
|
|
@@ -3649,7 +3649,7 @@ class Ri {
|
|
|
3649
3649
|
try {
|
|
3650
3650
|
return window.BuzzCasting.WidgetData[w] = k, 201;
|
|
3651
3651
|
} catch (O) {
|
|
3652
|
-
return console.error("%cstorage",
|
|
3652
|
+
return console.error("%cstorage", V, "set", s, O), 400;
|
|
3653
3653
|
}
|
|
3654
3654
|
});
|
|
3655
3655
|
/**
|
|
@@ -3663,7 +3663,7 @@ class Ri {
|
|
|
3663
3663
|
try {
|
|
3664
3664
|
return window.BuzzCasting.WidgetData[w] = k, 201;
|
|
3665
3665
|
} catch (O) {
|
|
3666
|
-
return console.error("%cstorage",
|
|
3666
|
+
return console.error("%cstorage", V, "set", s, O), 400;
|
|
3667
3667
|
}
|
|
3668
3668
|
});
|
|
3669
3669
|
/**
|
|
@@ -3677,7 +3677,7 @@ class Ri {
|
|
|
3677
3677
|
try {
|
|
3678
3678
|
return window.BuzzCasting.WidgetData[w] = k, 201;
|
|
3679
3679
|
} catch (O) {
|
|
3680
|
-
return console.error("%cstorage",
|
|
3680
|
+
return console.error("%cstorage", V, "set", s, O), 400;
|
|
3681
3681
|
}
|
|
3682
3682
|
});
|
|
3683
3683
|
T(this, "cleanMessages", async (s) => {
|
|
@@ -3688,7 +3688,7 @@ class Ri {
|
|
|
3688
3688
|
try {
|
|
3689
3689
|
return window.BuzzCasting.WidgetData[k] = s, 201;
|
|
3690
3690
|
} catch (w) {
|
|
3691
|
-
return console.error("%cstorage",
|
|
3691
|
+
return console.error("%cstorage", V, gt, s, w), 400;
|
|
3692
3692
|
}
|
|
3693
3693
|
});
|
|
3694
3694
|
/**
|
|
@@ -3704,7 +3704,7 @@ class Ri {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
return s.type === le && (s = wt(this.options, s)), this.subscribers.filter(
|
|
3706
3706
|
(O) => O.widget === s.widget
|
|
3707
|
-
).length || (console.info("%cstorage",
|
|
3707
|
+
).length || (console.info("%cstorage", V, bt, s.slide, s.widget), this.subscribers.push(s)), null;
|
|
3708
3708
|
});
|
|
3709
3709
|
/**
|
|
3710
3710
|
* Get current subscribers
|
|
@@ -3760,7 +3760,8 @@ function Ni(D) {
|
|
|
3760
3760
|
function zn(D) {
|
|
3761
3761
|
return Mi(Tr(0, D, "", []).toString(16), 8);
|
|
3762
3762
|
}
|
|
3763
|
-
|
|
3763
|
+
const Li = "2.1.1";
|
|
3764
|
+
class $i {
|
|
3764
3765
|
constructor(s) {
|
|
3765
3766
|
T(this, "sm");
|
|
3766
3767
|
T(this, "api");
|
|
@@ -3823,7 +3824,7 @@ class zi {
|
|
|
3823
3824
|
default:
|
|
3824
3825
|
console.warn(
|
|
3825
3826
|
"%cstorage",
|
|
3826
|
-
|
|
3827
|
+
V,
|
|
3827
3828
|
"error",
|
|
3828
3829
|
`data type ${C.query.type} unknown`
|
|
3829
3830
|
);
|
|
@@ -3850,7 +3851,7 @@ class zi {
|
|
|
3850
3851
|
}
|
|
3851
3852
|
return F;
|
|
3852
3853
|
} else
|
|
3853
|
-
return console.warn("%cstorage",
|
|
3854
|
+
return console.warn("%cstorage", V, "error"), 400;
|
|
3854
3855
|
})
|
|
3855
3856
|
);
|
|
3856
3857
|
});
|
|
@@ -3864,7 +3865,7 @@ class zi {
|
|
|
3864
3865
|
(k = this.sm) == null || k.subscribe(s.data.data);
|
|
3865
3866
|
break;
|
|
3866
3867
|
case "update":
|
|
3867
|
-
console.debug("%cstorage",
|
|
3868
|
+
console.debug("%cstorage", V, "update", s.data), await this.update();
|
|
3868
3869
|
break;
|
|
3869
3870
|
}
|
|
3870
3871
|
});
|
|
@@ -3880,7 +3881,7 @@ class zi {
|
|
|
3880
3881
|
var s;
|
|
3881
3882
|
return await ((s = this.sm) == null ? void 0 : s.getSubscribers());
|
|
3882
3883
|
});
|
|
3883
|
-
this.options = s, this.sm = null;
|
|
3884
|
+
console.info("%cstorage", V, "version", Li), this.options = s, this.sm = null;
|
|
3884
3885
|
const k = (s == null ? void 0 : s.slide) || s.app;
|
|
3885
3886
|
switch (this.bc = new BroadcastChannel(k), console.info("%cbroadcast", Nn, "channel", k), this.bc.onmessage = (w) => {
|
|
3886
3887
|
this.actions(w);
|
|
@@ -3909,7 +3910,7 @@ export {
|
|
|
3909
3910
|
ze as CLOUD,
|
|
3910
3911
|
le as MESSAGES,
|
|
3911
3912
|
$e as SERIES,
|
|
3912
|
-
|
|
3913
|
+
V as STORAGE_CSS,
|
|
3913
3914
|
Si as STORAGE_DEXIE,
|
|
3914
3915
|
xi as STORAGE_KEYVAL,
|
|
3915
3916
|
ki as STORAGE_LOCAL,
|
|
@@ -3919,5 +3920,5 @@ export {
|
|
|
3919
3920
|
wi as TOPICS,
|
|
3920
3921
|
gt as WIDGET,
|
|
3921
3922
|
_i as WIDGETS,
|
|
3922
|
-
|
|
3923
|
+
$i as default
|
|
3923
3924
|
};
|