buzzcasting-storage 3.12.3 → 3.12.5
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 +336 -327
- package/package.json +3 -3
|
@@ -45,8 +45,8 @@ function jr(h, t, o, l) {
|
|
|
45
45
|
return b;
|
|
46
46
|
try {
|
|
47
47
|
return Oe(b, String(t.valueOf()));
|
|
48
|
-
} catch (
|
|
49
|
-
return Oe(b, `[valueOf exception]${
|
|
48
|
+
} catch (x) {
|
|
49
|
+
return Oe(b, `[valueOf exception]${x.stack || x.message}`);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return Oe(g, t.toString());
|
|
@@ -76,7 +76,7 @@ st(
|
|
|
76
76
|
"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
|
|
77
77
|
);
|
|
78
78
|
st("script,style");
|
|
79
|
-
const
|
|
79
|
+
const K = (h = 0, t) => {
|
|
80
80
|
switch (!0) {
|
|
81
81
|
case h > 3:
|
|
82
82
|
console.debug(...t);
|
|
@@ -117,10 +117,10 @@ function Ta(h) {
|
|
|
117
117
|
}
|
|
118
118
|
function Ot(h, t) {
|
|
119
119
|
var o;
|
|
120
|
-
let l, g, b,
|
|
120
|
+
let l, g, b, x, $;
|
|
121
121
|
switch (h.moderation) {
|
|
122
122
|
case en.BEFORE:
|
|
123
|
-
l = /* @__PURE__ */ new Date(), g = (o = h.beforeTime) == null ? void 0 : o.split(":"), b = Number.parseInt(g ? g[0] : "00"),
|
|
123
|
+
l = /* @__PURE__ */ new Date(), g = (o = h.beforeTime) == null ? void 0 : o.split(":"), b = Number.parseInt(g ? g[0] : "00"), x = Number.parseInt(g ? g[1] : "00"), $ = Number.parseInt(g ? g[2] : "00"), t.before = l.setHours(b, x, $, 0) / 1e3, t.period || (t.period = l.getDay() === 1 ? 72 : 24);
|
|
124
124
|
break;
|
|
125
125
|
case en.DELAYED:
|
|
126
126
|
h.delay && h.delay > 0 && (t.delay = `${h.delay}`);
|
|
@@ -133,7 +133,7 @@ function Ot(h, t) {
|
|
|
133
133
|
}
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
|
-
const xa = "3.12.
|
|
136
|
+
const xa = "3.12.4";
|
|
137
137
|
class ka {
|
|
138
138
|
options;
|
|
139
139
|
url;
|
|
@@ -174,34 +174,34 @@ class ka {
|
|
|
174
174
|
const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
|
|
175
175
|
delete g.type, delete g.hash, delete g.order, g.topics = `${g.dashboard}-${g.widget}`, delete g.presentation;
|
|
176
176
|
const b = Object.keys(g).length > 0 ? `?${new URLSearchParams(g).toString()}` : "";
|
|
177
|
-
let
|
|
177
|
+
let x = "";
|
|
178
178
|
switch (t.type) {
|
|
179
179
|
case _.MESSAGES:
|
|
180
|
-
|
|
180
|
+
x = c.MESSAGES;
|
|
181
181
|
break;
|
|
182
182
|
case _.SERIES:
|
|
183
|
-
|
|
183
|
+
x = c.SERIES;
|
|
184
184
|
break;
|
|
185
185
|
case _.CLOUD:
|
|
186
|
-
|
|
186
|
+
x = c.CLOUD;
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
|
-
return
|
|
189
|
+
return K(3, [
|
|
190
190
|
`%cfetch%c %capi%c %c${t.type}`,
|
|
191
191
|
c.OK,
|
|
192
192
|
c.NONE,
|
|
193
193
|
c.API,
|
|
194
194
|
c.NONE,
|
|
195
|
-
|
|
195
|
+
x,
|
|
196
196
|
t.widget
|
|
197
|
-
]),
|
|
197
|
+
]), K(4, [t.type, g]), await fetch(
|
|
198
198
|
[this.url, "api", o, t.type].join("/") + b,
|
|
199
199
|
{ ...l, method: "get" }
|
|
200
|
-
).then(async (
|
|
201
|
-
if (
|
|
202
|
-
throw new Error(`${
|
|
203
|
-
return
|
|
204
|
-
}).then((
|
|
200
|
+
).then(async ($) => {
|
|
201
|
+
if (!$.ok)
|
|
202
|
+
throw new Error(`${$.status}`);
|
|
203
|
+
return $;
|
|
204
|
+
}).then(($) => $.json()).then(($) => ($.query = t, $)).catch(($) => ({ success: !1, message: `${$}`, data: null, query: t }));
|
|
205
205
|
}
|
|
206
206
|
async hideMessage(t) {
|
|
207
207
|
const { version: o } = this.options, l = this.headers(), g = "?action=visible";
|
|
@@ -224,8 +224,8 @@ class ka {
|
|
|
224
224
|
}
|
|
225
225
|
async hideLabels(t) {
|
|
226
226
|
const { version: o } = this.options, l = this.formHeaders(), g = new URLSearchParams(), b = t.labels || [];
|
|
227
|
-
for (const [
|
|
228
|
-
g.append(`custom_filters[${
|
|
227
|
+
for (const [x, $] of b.entries())
|
|
228
|
+
g.append(`custom_filters[${x}]`, $);
|
|
229
229
|
return console.info(
|
|
230
230
|
"%capi%c %cput",
|
|
231
231
|
c.API,
|
|
@@ -237,22 +237,27 @@ class ka {
|
|
|
237
237
|
), await fetch(
|
|
238
238
|
[this.url, "api", o, t.type, t.widget].join("/"),
|
|
239
239
|
{ ...l, body: g, method: "put" }
|
|
240
|
-
).then((
|
|
241
|
-
if (!
|
|
242
|
-
throw new Error(
|
|
243
|
-
return
|
|
244
|
-
}).then((
|
|
240
|
+
).then((x) => {
|
|
241
|
+
if (!x.ok)
|
|
242
|
+
throw new Error(x.statusText);
|
|
243
|
+
return x;
|
|
244
|
+
}).then((x) => x.json()).catch((x) => ({ succes: !1, message: x, data: [] }));
|
|
245
245
|
}
|
|
246
246
|
async loadSlide(t) {
|
|
247
247
|
const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
|
|
248
|
-
return delete g.type, delete g.hash,
|
|
248
|
+
return delete g.type, delete g.hash, K(3, ["%capi%c %cloadSlide", c.API, c.NONE, c.SLIDE, t.id]), await fetch(
|
|
249
249
|
[this.url, "api", o, "slides", t.id].join("/"),
|
|
250
250
|
{ ...l, method: "get" }
|
|
251
251
|
).then(async (b) => {
|
|
252
252
|
if (!b.ok)
|
|
253
253
|
throw new Error(`${b.status}`);
|
|
254
254
|
return b;
|
|
255
|
-
}).then((b) => b.json()).then((b) =>
|
|
255
|
+
}).then((b) => b.json()).then((b) => {
|
|
256
|
+
let x;
|
|
257
|
+
return t.type = "slides", b.query = t, b?.data && (Array.isArray(b.data) ? (x = structuredClone(b.data), x.forEach(($) => {
|
|
258
|
+
typeof $.json == "string" && ($.json = JSON.parse($.json));
|
|
259
|
+
})) : (x = structuredClone(b.data), x.json = JSON.parse(x.json)), b.data = x), b;
|
|
260
|
+
}).catch((b) => ({ success: !1, message: `${b}`, data: null }));
|
|
256
261
|
}
|
|
257
262
|
/**
|
|
258
263
|
* Store slide definition
|
|
@@ -265,7 +270,7 @@ class ka {
|
|
|
265
270
|
const { version: o } = this.options, l = this.formHeaders();
|
|
266
271
|
delete t.update, delete t.type;
|
|
267
272
|
const g = JSON.stringify(t);
|
|
268
|
-
return
|
|
273
|
+
return K(3, [
|
|
269
274
|
"%cput%c %capi%c %cslide",
|
|
270
275
|
c.OK,
|
|
271
276
|
c.NONE,
|
|
@@ -285,7 +290,7 @@ class ka {
|
|
|
285
290
|
}
|
|
286
291
|
async loadPresentation(t) {
|
|
287
292
|
const { version: o } = this.options, l = this.headers();
|
|
288
|
-
return delete t.update,
|
|
293
|
+
return delete t.update, K(3, [
|
|
289
294
|
"%cload%c %capi%c %cloadPresentation",
|
|
290
295
|
c.OK,
|
|
291
296
|
c.NONE,
|
|
@@ -300,7 +305,10 @@ class ka {
|
|
|
300
305
|
if (!g.ok)
|
|
301
306
|
throw new Error(`${g.status}`);
|
|
302
307
|
return g;
|
|
303
|
-
}).then((g) => g.json()).then((g) =>
|
|
308
|
+
}).then((g) => g.json()).then((g) => {
|
|
309
|
+
let b;
|
|
310
|
+
return t.type = "presentations", g.query = t, g?.data && (b = structuredClone(g.data), g.data = b), g;
|
|
311
|
+
}).catch((g) => ({ success: !1, message: `${g}`, data: null }));
|
|
304
312
|
}
|
|
305
313
|
/**
|
|
306
314
|
* Store slide definition
|
|
@@ -313,7 +321,7 @@ class ka {
|
|
|
313
321
|
const { version: o } = this.options, l = this.formHeaders();
|
|
314
322
|
delete t.update;
|
|
315
323
|
const g = JSON.stringify(t);
|
|
316
|
-
return
|
|
324
|
+
return K(2, ["%capi%c %cput", c.API, c.NONE, c.PRESENTATION, t.name]), await fetch(
|
|
317
325
|
[this.url, "api", o, _.PRESENTATIONS, t.id].join("/"),
|
|
318
326
|
{ ...l, body: g, method: "put" }
|
|
319
327
|
).then((b) => {
|
|
@@ -324,7 +332,7 @@ class ka {
|
|
|
324
332
|
}
|
|
325
333
|
async loadPreference(t) {
|
|
326
334
|
const { version: o } = this.options, l = this.headers();
|
|
327
|
-
return
|
|
335
|
+
return K(3, [
|
|
328
336
|
"%capi%c %cloadPreference",
|
|
329
337
|
c.API,
|
|
330
338
|
c.NONE,
|
|
@@ -337,7 +345,7 @@ class ka {
|
|
|
337
345
|
if (!g.ok)
|
|
338
346
|
throw new Error(`${g.status}`);
|
|
339
347
|
return g;
|
|
340
|
-
}).then((g) => g.json()).then((g) => g).catch((g) => ({ success: !1, message: `${g}`, data: null }));
|
|
348
|
+
}).then((g) => g.json()).then((g) => (t.type = "preference", g.query = t, g)).catch((g) => ({ success: !1, message: `${g}`, data: null }));
|
|
341
349
|
}
|
|
342
350
|
async storePreference(t) {
|
|
343
351
|
const { version: o } = this.options, l = this.formHeaders();
|
|
@@ -397,7 +405,7 @@ class ka {
|
|
|
397
405
|
}*/
|
|
398
406
|
async loadDashboards(t) {
|
|
399
407
|
const { version: o } = this.options, l = this.headers();
|
|
400
|
-
return
|
|
408
|
+
return K(3, ["%capi%c %cdashboards", c.API, c.NONE, c.WIDGET]), await fetch(
|
|
401
409
|
[this.url, "api", o, _.WIDGETS, t?.id || ""].join("/"),
|
|
402
410
|
{
|
|
403
411
|
...l,
|
|
@@ -502,9 +510,9 @@ function Ma() {
|
|
|
502
510
|
for (var a, s = 0, i = n.length; s < i; s++) !a && s in n || ((a = a || Array.prototype.slice.call(n, 0, s))[s] = n[s]);
|
|
503
511
|
return e.concat(a || Array.prototype.slice.call(n));
|
|
504
512
|
}
|
|
505
|
-
var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca,
|
|
513
|
+
var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, x = Object.keys, $ = Array.isArray;
|
|
506
514
|
function te(e, n) {
|
|
507
|
-
return typeof n != "object" ||
|
|
515
|
+
return typeof n != "object" || x(n).forEach(function(r) {
|
|
508
516
|
e[r] = n[r];
|
|
509
517
|
}), e;
|
|
510
518
|
}
|
|
@@ -514,7 +522,7 @@ function Ma() {
|
|
|
514
522
|
return Ce.call(e, n);
|
|
515
523
|
}
|
|
516
524
|
function be(e, n) {
|
|
517
|
-
typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ?
|
|
525
|
+
typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ? x : Reflect.ownKeys)(n).forEach(function(r) {
|
|
518
526
|
Ae(e, r, n[r]);
|
|
519
527
|
});
|
|
520
528
|
}
|
|
@@ -562,7 +570,7 @@ function Ma() {
|
|
|
562
570
|
for (var a = 0, s = n.length; a < s; ++a) ue(e, n[a], r[a]);
|
|
563
571
|
} else {
|
|
564
572
|
var i, u, d = n.indexOf(".");
|
|
565
|
-
d !== -1 ? (i = n.substr(0, d), (u = n.substr(d + 1)) === "" ? r === void 0 ?
|
|
573
|
+
d !== -1 ? (i = n.substr(0, d), (u = n.substr(d + 1)) === "" ? r === void 0 ? $(e) && !isNaN(parseInt(i)) ? e.splice(i, 1) : delete e[i] : e[i] = r : ue(d = !(d = e[i]) || !ie(e, i) ? e[i] = {} : d, u, r)) : r === void 0 ? $(e) && !isNaN(parseInt(n)) ? e.splice(n, 1) : delete e[n] : e[n] = r;
|
|
566
574
|
}
|
|
567
575
|
}
|
|
568
576
|
function Qn(e) {
|
|
@@ -588,7 +596,7 @@ function Ma() {
|
|
|
588
596
|
if (!r || typeof r != "object") return r;
|
|
589
597
|
var a = it.get(r);
|
|
590
598
|
if (a) return a;
|
|
591
|
-
if (
|
|
599
|
+
if ($(r)) {
|
|
592
600
|
a = [], it.set(r, a);
|
|
593
601
|
for (var s = 0, i = r.length; s < i; ++s) a.push(n(r[s]));
|
|
594
602
|
} else if (Jn.has(r.constructor)) a = r;
|
|
@@ -616,7 +624,7 @@ function Ma() {
|
|
|
616
624
|
function Ee(e) {
|
|
617
625
|
var n, r, a, s;
|
|
618
626
|
if (arguments.length === 1) {
|
|
619
|
-
if (
|
|
627
|
+
if ($(e)) return e.slice();
|
|
620
628
|
if (this === Qe && typeof e == "string") return [e];
|
|
621
629
|
if (s = Vr(e)) {
|
|
622
630
|
for (r = []; !(a = s.next()).done; ) r.push(a.value);
|
|
@@ -743,7 +751,7 @@ function Ma() {
|
|
|
743
751
|
}(), lt = Ge[0], fe = Ge[1], Ge = Ge[2], fe = fe && fe.then, Ke = lt && lt.constructor, cn = !!Ge, dt = function(e, n) {
|
|
744
752
|
ft.push([e, n]), It && (queueMicrotask(na), It = !1);
|
|
745
753
|
}, un = !0, It = !0, Be = [], Nt = [], ln = ct, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, B = Pe, ft = [], Le = 0, Rt = [];
|
|
746
|
-
function
|
|
754
|
+
function M(e) {
|
|
747
755
|
if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
|
|
748
756
|
this._listeners = [], this._lib = !1;
|
|
749
757
|
var n = this._PSD = B;
|
|
@@ -758,7 +766,7 @@ function Ma() {
|
|
|
758
766
|
if (i === a) throw new TypeError("A promise cannot be resolved with itself.");
|
|
759
767
|
var u = a._lib && Ze();
|
|
760
768
|
i && typeof i.then == "function" ? r(a, function(d, p) {
|
|
761
|
-
i instanceof
|
|
769
|
+
i instanceof M ? i._then(d, p) : i.then(d, p);
|
|
762
770
|
}) : (a._state = !0, a._value = i, rr(a)), u && qe();
|
|
763
771
|
}
|
|
764
772
|
}, fn.bind(null, a));
|
|
@@ -770,7 +778,7 @@ function Ma() {
|
|
|
770
778
|
var dn = { get: function() {
|
|
771
779
|
var e = B, n = Ct;
|
|
772
780
|
function r(a, s) {
|
|
773
|
-
var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), p = new
|
|
781
|
+
var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), p = new M(function(y, w) {
|
|
774
782
|
hn(i, new nr(sr(a, e, u, d), sr(s, e, u, d), y, w, e));
|
|
775
783
|
});
|
|
776
784
|
return this._consoleTask && (p._consoleTask = this._consoleTask), p;
|
|
@@ -847,7 +855,7 @@ function Ma() {
|
|
|
847
855
|
for (var n = Rt.slice(0), r = n.length; r; ) n[--r]();
|
|
848
856
|
}
|
|
849
857
|
function Tt(e) {
|
|
850
|
-
return new
|
|
858
|
+
return new M(ut, !1, e);
|
|
851
859
|
}
|
|
852
860
|
function Z(e, n) {
|
|
853
861
|
var r = B;
|
|
@@ -862,7 +870,7 @@ function Ma() {
|
|
|
862
870
|
}
|
|
863
871
|
};
|
|
864
872
|
}
|
|
865
|
-
be(
|
|
873
|
+
be(M.prototype, { then: dn, _then: function(e, n) {
|
|
866
874
|
hn(this, new nr(null, null, e, n, B));
|
|
867
875
|
}, catch: function(e) {
|
|
868
876
|
if (arguments.length === 1) return this.then(null, e);
|
|
@@ -874,42 +882,42 @@ function Ma() {
|
|
|
874
882
|
});
|
|
875
883
|
}, finally: function(e) {
|
|
876
884
|
return this.then(function(n) {
|
|
877
|
-
return
|
|
885
|
+
return M.resolve(e()).then(function() {
|
|
878
886
|
return n;
|
|
879
887
|
});
|
|
880
888
|
}, function(n) {
|
|
881
|
-
return
|
|
889
|
+
return M.resolve(e()).then(function() {
|
|
882
890
|
return Tt(n);
|
|
883
891
|
});
|
|
884
892
|
});
|
|
885
893
|
}, timeout: function(e, n) {
|
|
886
894
|
var r = this;
|
|
887
|
-
return e < 1 / 0 ? new
|
|
895
|
+
return e < 1 / 0 ? new M(function(a, s) {
|
|
888
896
|
var i = setTimeout(function() {
|
|
889
897
|
return s(new L.Timeout(n));
|
|
890
898
|
}, e);
|
|
891
899
|
r.then(a, s).finally(clearTimeout.bind(null, i));
|
|
892
900
|
}) : this;
|
|
893
|
-
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(
|
|
901
|
+
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(M.prototype, Symbol.toStringTag, "Dexie.Promise"), Pe.env = ar(), be(M, { all: function() {
|
|
894
902
|
var e = Ee.apply(null, arguments).map($t);
|
|
895
|
-
return new
|
|
903
|
+
return new M(function(n, r) {
|
|
896
904
|
e.length === 0 && n([]);
|
|
897
905
|
var a = e.length;
|
|
898
906
|
e.forEach(function(s, i) {
|
|
899
|
-
return
|
|
907
|
+
return M.resolve(s).then(function(u) {
|
|
900
908
|
e[i] = u, --a || n(e);
|
|
901
909
|
}, r);
|
|
902
910
|
});
|
|
903
911
|
});
|
|
904
912
|
}, resolve: function(e) {
|
|
905
|
-
return e instanceof
|
|
913
|
+
return e instanceof M ? e : e && typeof e.then == "function" ? new M(function(n, r) {
|
|
906
914
|
e.then(n, r);
|
|
907
|
-
}) : new
|
|
915
|
+
}) : new M(ut, !0, e);
|
|
908
916
|
}, reject: Tt, race: function() {
|
|
909
917
|
var e = Ee.apply(null, arguments).map($t);
|
|
910
|
-
return new
|
|
918
|
+
return new M(function(n, r) {
|
|
911
919
|
e.map(function(a) {
|
|
912
|
-
return
|
|
920
|
+
return M.resolve(a).then(n, r);
|
|
913
921
|
});
|
|
914
922
|
});
|
|
915
923
|
}, PSD: { get: function() {
|
|
@@ -927,7 +935,7 @@ function Ma() {
|
|
|
927
935
|
}, set: function(e) {
|
|
928
936
|
ln = e;
|
|
929
937
|
} }, follow: function(e, n) {
|
|
930
|
-
return new
|
|
938
|
+
return new M(function(r, a) {
|
|
931
939
|
return De(function(s, i) {
|
|
932
940
|
var u = B;
|
|
933
941
|
u.unhandleds = [], u.onunhandled = i, u.finalize = Me(function() {
|
|
@@ -942,13 +950,13 @@ function Ma() {
|
|
|
942
950
|
}, u.finalize), e();
|
|
943
951
|
}, n, r, a);
|
|
944
952
|
});
|
|
945
|
-
} }), Ke && (Ke.allSettled && Ae(
|
|
953
|
+
} }), Ke && (Ke.allSettled && Ae(M, "allSettled", function() {
|
|
946
954
|
var e = Ee.apply(null, arguments).map($t);
|
|
947
|
-
return new
|
|
955
|
+
return new M(function(n) {
|
|
948
956
|
e.length === 0 && n([]);
|
|
949
957
|
var r = e.length, a = new Array(r);
|
|
950
958
|
e.forEach(function(s, i) {
|
|
951
|
-
return
|
|
959
|
+
return M.resolve(s).then(function(u) {
|
|
952
960
|
return a[i] = { status: "fulfilled", value: u };
|
|
953
961
|
}, function(u) {
|
|
954
962
|
return a[i] = { status: "rejected", reason: u };
|
|
@@ -957,24 +965,24 @@ function Ma() {
|
|
|
957
965
|
});
|
|
958
966
|
});
|
|
959
967
|
});
|
|
960
|
-
}), Ke.any && typeof AggregateError < "u" && Ae(
|
|
968
|
+
}), Ke.any && typeof AggregateError < "u" && Ae(M, "any", function() {
|
|
961
969
|
var e = Ee.apply(null, arguments).map($t);
|
|
962
|
-
return new
|
|
970
|
+
return new M(function(n, r) {
|
|
963
971
|
e.length === 0 && r(new AggregateError([]));
|
|
964
972
|
var a = e.length, s = new Array(a);
|
|
965
973
|
e.forEach(function(i, u) {
|
|
966
|
-
return
|
|
974
|
+
return M.resolve(i).then(function(d) {
|
|
967
975
|
return n(d);
|
|
968
976
|
}, function(d) {
|
|
969
977
|
s[u] = d, --a || r(new AggregateError(s));
|
|
970
978
|
});
|
|
971
979
|
});
|
|
972
980
|
});
|
|
973
|
-
}), Ke.withResolvers && (
|
|
981
|
+
}), Ke.withResolvers && (M.withResolvers = Ke.withResolvers));
|
|
974
982
|
var ne = { awaits: 0, echoes: 0, id: 0 }, ra = 0, xt = [], kt = 0, Ct = 0, aa = 0;
|
|
975
983
|
function De(e, n, r, a) {
|
|
976
984
|
var s = B, i = Object.create(s);
|
|
977
|
-
return i.parent = s, i.ref = 0, i.global = !1, i.id = ++aa, Pe.env, i.env = cn ? { Promise:
|
|
985
|
+
return i.parent = s, i.ref = 0, i.global = !1, i.id = ++aa, Pe.env, i.env = cn ? { Promise: M, PromiseProp: { value: M, configurable: !0, writable: !0 }, all: M.all, race: M.race, allSettled: M.allSettled, any: M.any, resolve: M.resolve, reject: M.reject } : {}, n && te(i, n), ++s.ref, i.finalize = function() {
|
|
978
986
|
--this.parent.ref || this.parent.finalize();
|
|
979
987
|
}, a = We(i, e, r, a), i.ref === 0 && i.finalize(), a;
|
|
980
988
|
}
|
|
@@ -1028,7 +1036,7 @@ function Ma() {
|
|
|
1028
1036
|
Promise === Ke && ne.echoes === 0 ? kt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
1029
1037
|
}
|
|
1030
1038
|
("" + fe).indexOf("[native code]") === -1 && (et = Ie = Q);
|
|
1031
|
-
var q =
|
|
1039
|
+
var q = M.reject, Fe = "", we = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", tt = [], jt = "__dbnames", mn = "readonly", yn = "readwrite";
|
|
1032
1040
|
function Ue(e, n) {
|
|
1033
1041
|
return e ? n ? function() {
|
|
1034
1042
|
return e.apply(this, arguments) && n.apply(this, arguments);
|
|
@@ -1137,8 +1145,8 @@ function Ma() {
|
|
|
1137
1145
|
}).then(n);
|
|
1138
1146
|
}, J.prototype.where = function(e) {
|
|
1139
1147
|
if (typeof e == "string") return new this.db.WhereClause(this, e);
|
|
1140
|
-
if (
|
|
1141
|
-
var n =
|
|
1148
|
+
if ($(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
1149
|
+
var n = x(e);
|
|
1142
1150
|
if (n.length === 1) return this.where(n[0]).equals(e[n[0]]);
|
|
1143
1151
|
var r = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
|
|
1144
1152
|
if (d.compound && n.every(function(y) {
|
|
@@ -1165,7 +1173,7 @@ function Ma() {
|
|
|
1165
1173
|
var u = n.reduce(function(f, p) {
|
|
1166
1174
|
var y = f[0], w = f[1], f = a[p], O = e[p];
|
|
1167
1175
|
return [y || f, y || !f ? Ue(w, f && f.multi ? function(m) {
|
|
1168
|
-
return m = ve(m, p),
|
|
1176
|
+
return m = ve(m, p), $(m) && m.some(function(E) {
|
|
1169
1177
|
return s(O, E);
|
|
1170
1178
|
});
|
|
1171
1179
|
} : function(m) {
|
|
@@ -1188,7 +1196,7 @@ function Ma() {
|
|
|
1188
1196
|
}, J.prototype.toCollection = function() {
|
|
1189
1197
|
return new this.db.Collection(new this.db.WhereClause(this));
|
|
1190
1198
|
}, J.prototype.orderBy = function(e) {
|
|
1191
|
-
return new this.db.Collection(new this.db.WhereClause(this,
|
|
1199
|
+
return new this.db.Collection(new this.db.WhereClause(this, $(e) ? "[".concat(e.join("+"), "]") : e));
|
|
1192
1200
|
}, J.prototype.reverse = function() {
|
|
1193
1201
|
return this.toCollection().reverse();
|
|
1194
1202
|
}, J.prototype.mapToClass = function(e) {
|
|
@@ -1229,7 +1237,7 @@ function Ma() {
|
|
|
1229
1237
|
return i && s && (u = Mt(i)(e)), this._trans("readwrite", function(d) {
|
|
1230
1238
|
return r.core.mutate({ trans: d, type: "add", keys: n != null ? [n] : null, values: [u] });
|
|
1231
1239
|
}).then(function(d) {
|
|
1232
|
-
return d.numFailures ?
|
|
1240
|
+
return d.numFailures ? M.reject(d.failures[0]) : d.lastResult;
|
|
1233
1241
|
}).then(function(d) {
|
|
1234
1242
|
if (i) try {
|
|
1235
1243
|
ue(e, i, d);
|
|
@@ -1238,13 +1246,13 @@ function Ma() {
|
|
|
1238
1246
|
return d;
|
|
1239
1247
|
});
|
|
1240
1248
|
}, J.prototype.update = function(e, n) {
|
|
1241
|
-
return typeof e != "object" ||
|
|
1249
|
+
return typeof e != "object" || $(e) ? this.where(":id").equals(e).modify(n) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new L.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(n));
|
|
1242
1250
|
}, J.prototype.put = function(e, n) {
|
|
1243
1251
|
var r = this, a = this.schema.primKey, s = a.auto, i = a.keyPath, u = e;
|
|
1244
1252
|
return i && s && (u = Mt(i)(e)), this._trans("readwrite", function(d) {
|
|
1245
1253
|
return r.core.mutate({ trans: d, type: "put", values: [u], keys: n != null ? [n] : null });
|
|
1246
1254
|
}).then(function(d) {
|
|
1247
|
-
return d.numFailures ?
|
|
1255
|
+
return d.numFailures ? M.reject(d.failures[0]) : d.lastResult;
|
|
1248
1256
|
}).then(function(d) {
|
|
1249
1257
|
if (i) try {
|
|
1250
1258
|
ue(e, i, d);
|
|
@@ -1257,14 +1265,14 @@ function Ma() {
|
|
|
1257
1265
|
return this._trans("readwrite", function(r) {
|
|
1258
1266
|
return n.core.mutate({ trans: r, type: "delete", keys: [e] });
|
|
1259
1267
|
}).then(function(r) {
|
|
1260
|
-
return r.numFailures ?
|
|
1268
|
+
return r.numFailures ? M.reject(r.failures[0]) : void 0;
|
|
1261
1269
|
});
|
|
1262
1270
|
}, J.prototype.clear = function() {
|
|
1263
1271
|
var e = this;
|
|
1264
1272
|
return this._trans("readwrite", function(n) {
|
|
1265
1273
|
return e.core.mutate({ trans: n, type: "deleteRange", range: ir });
|
|
1266
1274
|
}).then(function(n) {
|
|
1267
|
-
return n.numFailures ?
|
|
1275
|
+
return n.numFailures ? M.reject(n.failures[0]) : void 0;
|
|
1268
1276
|
});
|
|
1269
1277
|
}, J.prototype.bulkGet = function(e) {
|
|
1270
1278
|
var n = this;
|
|
@@ -1371,9 +1379,9 @@ function Ma() {
|
|
|
1371
1379
|
} };
|
|
1372
1380
|
return r[u] = n[u] = w;
|
|
1373
1381
|
}
|
|
1374
|
-
|
|
1382
|
+
x(y = u).forEach(function(f) {
|
|
1375
1383
|
var O = y[f];
|
|
1376
|
-
if (
|
|
1384
|
+
if ($(O)) i(f, y[f][0], y[f][1]);
|
|
1377
1385
|
else {
|
|
1378
1386
|
if (O !== "asap") throw new L.InvalidArgument("Invalid event config");
|
|
1379
1387
|
var m = i(f, ct, function() {
|
|
@@ -1453,7 +1461,7 @@ function Ma() {
|
|
|
1453
1461
|
var n = this["@@propmod"];
|
|
1454
1462
|
if (n.add !== void 0) {
|
|
1455
1463
|
var r = n.add;
|
|
1456
|
-
if (
|
|
1464
|
+
if ($(r)) return g(g([], $(e) ? e : [], !0), r).sort();
|
|
1457
1465
|
if (typeof r == "number") return (Number(e) || 0) + r;
|
|
1458
1466
|
if (typeof r == "bigint") try {
|
|
1459
1467
|
return BigInt(e) + r;
|
|
@@ -1464,7 +1472,7 @@ function Ma() {
|
|
|
1464
1472
|
}
|
|
1465
1473
|
if (n.remove !== void 0) {
|
|
1466
1474
|
var a = n.remove;
|
|
1467
|
-
if (
|
|
1475
|
+
if ($(a)) return $(e) ? e.filter(function(s) {
|
|
1468
1476
|
return !a.includes(s);
|
|
1469
1477
|
}).sort() : [];
|
|
1470
1478
|
if (typeof a == "number") return Number(e) - a;
|
|
@@ -1645,7 +1653,7 @@ function Ma() {
|
|
|
1645
1653
|
var n = this, r = this._ctx;
|
|
1646
1654
|
return this._write(function(a) {
|
|
1647
1655
|
var s, i, u;
|
|
1648
|
-
u = typeof e == "function" ? e : (s =
|
|
1656
|
+
u = typeof e == "function" ? e : (s = x(e), i = s.length, function(v) {
|
|
1649
1657
|
for (var A = !1, P = 0; P < i; ++P) {
|
|
1650
1658
|
var D = s[P], I = e[D], N = ve(v, D);
|
|
1651
1659
|
I instanceof pt ? (ue(v, D, I.execute(N)), A = !0) : N !== I && (ue(v, D, I), A = !0);
|
|
@@ -1657,7 +1665,7 @@ function Ma() {
|
|
|
1657
1665
|
function O(v, D) {
|
|
1658
1666
|
var P = D.failures, D = D.numFailures;
|
|
1659
1667
|
E += v - D;
|
|
1660
|
-
for (var I = 0, N =
|
|
1668
|
+
for (var I = 0, N = x(P); I < N.length; I++) {
|
|
1661
1669
|
var C = N[I];
|
|
1662
1670
|
m.push(P[C]);
|
|
1663
1671
|
}
|
|
@@ -1667,20 +1675,20 @@ function Ma() {
|
|
|
1667
1675
|
function A(D) {
|
|
1668
1676
|
var I = Math.min(w, v.length - D);
|
|
1669
1677
|
return d.getMany({ trans: a, keys: v.slice(D, D + I), cache: "immutable" }).then(function(N) {
|
|
1670
|
-
for (var C = [], R = [], T = p ? [] : null,
|
|
1671
|
-
var
|
|
1672
|
-
u.call(F, F.value, F) !== !1 && (F.value == null ?
|
|
1678
|
+
for (var C = [], R = [], T = p ? [] : null, j = [], k = 0; k < I; ++k) {
|
|
1679
|
+
var G = N[k], F = { value: $e(G), primKey: v[D + k] };
|
|
1680
|
+
u.call(F, F.value, F) !== !1 && (F.value == null ? j.push(v[D + k]) : p || H(y(G), y(F.value)) === 0 ? (R.push(F.value), p && T.push(v[D + k])) : (j.push(v[D + k]), C.push(F.value)));
|
|
1673
1681
|
}
|
|
1674
1682
|
return Promise.resolve(0 < C.length && d.mutate({ trans: a, type: "add", values: C }).then(function(U) {
|
|
1675
|
-
for (var z in U.failures)
|
|
1683
|
+
for (var z in U.failures) j.splice(parseInt(z), 1);
|
|
1676
1684
|
O(C.length, U);
|
|
1677
1685
|
})).then(function() {
|
|
1678
1686
|
return (0 < R.length || P && typeof e == "object") && d.mutate({ trans: a, type: "put", keys: T, values: R, criteria: P, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < D }).then(function(U) {
|
|
1679
1687
|
return O(R.length, U);
|
|
1680
1688
|
});
|
|
1681
1689
|
}).then(function() {
|
|
1682
|
-
return (0 <
|
|
1683
|
-
return O(
|
|
1690
|
+
return (0 < j.length || P && e === En) && d.mutate({ trans: a, type: "delete", keys: j, criteria: P, isAdditionalChunk: 0 < D }).then(function(U) {
|
|
1691
|
+
return O(j.length, U);
|
|
1684
1692
|
});
|
|
1685
1693
|
}).then(function() {
|
|
1686
1694
|
return v.length > D + I && A(D + w);
|
|
@@ -1766,13 +1774,13 @@ function Ma() {
|
|
|
1766
1774
|
var P = i(A);
|
|
1767
1775
|
if (n(P, p, m)) return !0;
|
|
1768
1776
|
for (var D = null, I = m; I < f; ++I) {
|
|
1769
|
-
var N = function(C, R, T,
|
|
1770
|
-
for (var F = Math.min(C.length,
|
|
1777
|
+
var N = function(C, R, T, j, k, G) {
|
|
1778
|
+
for (var F = Math.min(C.length, j.length), U = -1, z = 0; z < F; ++z) {
|
|
1771
1779
|
var de = R[z];
|
|
1772
|
-
if (de !==
|
|
1773
|
-
|
|
1780
|
+
if (de !== j[z]) return k(C[z], T[z]) < 0 ? C.substr(0, z) + T[z] + T.substr(z + 1) : k(C[z], j[z]) < 0 ? C.substr(0, z) + j[z] + T.substr(z + 1) : 0 <= U ? C.substr(0, U) + R[U] + T.substr(U + 1) : null;
|
|
1781
|
+
k(C[z], de) < 0 && (U = z);
|
|
1774
1782
|
}
|
|
1775
|
-
return F <
|
|
1783
|
+
return F < j.length && G === "next" ? C + T.substr(C.length) : F < C.length && G === "prev" ? C.substr(0, T.length) : U < 0 ? null : C.substr(0, U) + j[U] + T.substr(U + 1);
|
|
1776
1784
|
}(A, P, d[I], p[I], u, y);
|
|
1777
1785
|
N === null && D === null ? m = I + 1 : (D === null || 0 < u(D, N)) && (D = N);
|
|
1778
1786
|
}
|
|
@@ -1973,13 +1981,13 @@ function Ma() {
|
|
|
1973
1981
|
var a = this;
|
|
1974
1982
|
if (e === "readwrite" && this.mode !== "readwrite") return q(new L.ReadOnly("Transaction is readonly"));
|
|
1975
1983
|
if (!this.active) return q(new L.TransactionInactive());
|
|
1976
|
-
if (this._locked()) return new
|
|
1984
|
+
if (this._locked()) return new M(function(i, u) {
|
|
1977
1985
|
a._blockedFuncs.push([function() {
|
|
1978
1986
|
a._promise(e, n, r).then(i, u);
|
|
1979
1987
|
}, B]);
|
|
1980
1988
|
});
|
|
1981
1989
|
if (r) return De(function() {
|
|
1982
|
-
var i = new
|
|
1990
|
+
var i = new M(function(u, d) {
|
|
1983
1991
|
a._lock();
|
|
1984
1992
|
var p = n(u, d, a);
|
|
1985
1993
|
p && p.then && p.then(u, d);
|
|
@@ -1988,7 +1996,7 @@ function Ma() {
|
|
|
1988
1996
|
return a._unlock();
|
|
1989
1997
|
}), i._lib = !0, i;
|
|
1990
1998
|
});
|
|
1991
|
-
var s = new
|
|
1999
|
+
var s = new M(function(i, u) {
|
|
1992
2000
|
var d = n(i, u, a);
|
|
1993
2001
|
d && d.then && d.then(i, u);
|
|
1994
2002
|
});
|
|
@@ -1996,7 +2004,7 @@ function Ma() {
|
|
|
1996
2004
|
}, ye.prototype._root = function() {
|
|
1997
2005
|
return this.parent ? this.parent._root() : this;
|
|
1998
2006
|
}, ye.prototype.waitFor = function(e) {
|
|
1999
|
-
var n, r = this._root(), a =
|
|
2007
|
+
var n, r = this._root(), a = M.resolve(e);
|
|
2000
2008
|
r._waitingFor ? r._waitingFor = r._waitingFor.then(function() {
|
|
2001
2009
|
return a;
|
|
2002
2010
|
}) : (r._waitingFor = a, r._waitingQueue = [], n = r.idbtrans.objectStore(r.storeNames[0]), function i() {
|
|
@@ -2004,7 +2012,7 @@ function Ma() {
|
|
|
2004
2012
|
r._waitingFor && (n.get(-1 / 0).onsuccess = i);
|
|
2005
2013
|
}());
|
|
2006
2014
|
var s = r._waitingFor;
|
|
2007
|
-
return new
|
|
2015
|
+
return new M(function(i, u) {
|
|
2008
2016
|
a.then(function(d) {
|
|
2009
2017
|
return r._waitingQueue.push(Z(i.bind(null, d)));
|
|
2010
2018
|
}, function(d) {
|
|
@@ -2080,22 +2088,22 @@ function Ma() {
|
|
|
2080
2088
|
var v = S.trans, A = S.type, P = S.keys, D = S.values, I = S.range;
|
|
2081
2089
|
return new Promise(function(N, C) {
|
|
2082
2090
|
N = Z(N);
|
|
2083
|
-
var R = v.objectStore(E), T = R.keyPath == null,
|
|
2084
|
-
if (
|
|
2085
|
-
var
|
|
2091
|
+
var R = v.objectStore(E), T = R.keyPath == null, j = A === "put" || A === "add";
|
|
2092
|
+
if (!j && A !== "delete" && A !== "deleteRange") throw new Error("Invalid operation type: " + A);
|
|
2093
|
+
var k, G = (P || D || { length: 1 }).length;
|
|
2086
2094
|
if (P && D && P.length !== D.length) throw new Error("Given keys array must have same length as given values array.");
|
|
2087
|
-
if (
|
|
2095
|
+
if (G === 0) return N({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
2088
2096
|
function F(ce) {
|
|
2089
2097
|
++de, mt(ce);
|
|
2090
2098
|
}
|
|
2091
2099
|
var U = [], z = [], de = 0;
|
|
2092
2100
|
if (A === "deleteRange") {
|
|
2093
2101
|
if (I.type === 4) return N({ numFailures: de, failures: z, results: [], lastResult: void 0 });
|
|
2094
|
-
I.type === 3 ? U.push(
|
|
2102
|
+
I.type === 3 ? U.push(k = R.clear()) : U.push(k = R.delete(a(I)));
|
|
2095
2103
|
} else {
|
|
2096
|
-
var T =
|
|
2097
|
-
if (
|
|
2098
|
-
else for (oe = 0; oe <
|
|
2104
|
+
var T = j ? T ? [D, P] : [D, null] : [P, null], W = T[0], se = T[1];
|
|
2105
|
+
if (j) for (var oe = 0; oe < G; ++oe) U.push(k = se && se[oe] !== void 0 ? R[A](W[oe], se[oe]) : R[A](W[oe])), k.onerror = F;
|
|
2106
|
+
else for (oe = 0; oe < G; ++oe) U.push(k = R[A](W[oe])), k.onerror = F;
|
|
2099
2107
|
}
|
|
2100
2108
|
function qt(ce) {
|
|
2101
2109
|
ce = ce.target.result, U.forEach(function(Ve, Wn) {
|
|
@@ -2104,17 +2112,17 @@ function Ma() {
|
|
|
2104
2112
|
return Ve.result;
|
|
2105
2113
|
}), lastResult: ce });
|
|
2106
2114
|
}
|
|
2107
|
-
|
|
2115
|
+
k.onerror = function(ce) {
|
|
2108
2116
|
F(ce), qt(ce);
|
|
2109
|
-
},
|
|
2117
|
+
}, k.onsuccess = qt;
|
|
2110
2118
|
});
|
|
2111
2119
|
}, getMany: function(S) {
|
|
2112
2120
|
var v = S.trans, A = S.keys;
|
|
2113
2121
|
return new Promise(function(P, D) {
|
|
2114
2122
|
P = Z(P);
|
|
2115
|
-
for (var I, N = v.objectStore(E), C = A.length, R = new Array(C), T = 0,
|
|
2116
|
-
U = U.target, R[U._pos] = U.result,
|
|
2117
|
-
},
|
|
2123
|
+
for (var I, N = v.objectStore(E), C = A.length, R = new Array(C), T = 0, j = 0, k = function(U) {
|
|
2124
|
+
U = U.target, R[U._pos] = U.result, ++j === T && P(R);
|
|
2125
|
+
}, G = me(D), F = 0; F < C; ++F) A[F] != null && ((I = N.get(A[F]))._pos = F, I.onsuccess = k, I.onerror = G, ++T);
|
|
2118
2126
|
T === 0 && P(R);
|
|
2119
2127
|
});
|
|
2120
2128
|
}, get: function(S) {
|
|
@@ -2129,11 +2137,11 @@ function Ma() {
|
|
|
2129
2137
|
}, query: (m = y, function(S) {
|
|
2130
2138
|
return new Promise(function(v, A) {
|
|
2131
2139
|
v = Z(v);
|
|
2132
|
-
var P, D, I, T = S.trans, N = S.values, C = S.limit,
|
|
2140
|
+
var P, D, I, T = S.trans, N = S.values, C = S.limit, k = S.query, R = C === 1 / 0 ? void 0 : C, j = k.index, k = k.range, T = T.objectStore(E), j = j.isPrimaryKey ? T : T.index(j.name), k = a(k);
|
|
2133
2141
|
if (C === 0) return v({ result: [] });
|
|
2134
|
-
m ? ((R = N ?
|
|
2135
|
-
return v({ result:
|
|
2136
|
-
}, R.onerror = me(A)) : (P = 0, D = !N && "openKeyCursor" in
|
|
2142
|
+
m ? ((R = N ? j.getAll(k, R) : j.getAllKeys(k, R)).onsuccess = function(G) {
|
|
2143
|
+
return v({ result: G.target.result });
|
|
2144
|
+
}, R.onerror = me(A)) : (P = 0, D = !N && "openKeyCursor" in j ? j.openKeyCursor(k) : j.openCursor(k), I = [], D.onsuccess = function(G) {
|
|
2137
2145
|
var F = D.result;
|
|
2138
2146
|
return F ? (I.push(N ? F.value : F.primaryKey), ++P === C ? v({ result: I }) : void F.continue()) : v({ result: I });
|
|
2139
2147
|
}, D.onerror = me(A));
|
|
@@ -2142,9 +2150,9 @@ function Ma() {
|
|
|
2142
2150
|
var v = S.trans, A = S.values, P = S.query, D = S.reverse, I = S.unique;
|
|
2143
2151
|
return new Promise(function(N, C) {
|
|
2144
2152
|
N = Z(N);
|
|
2145
|
-
var
|
|
2146
|
-
|
|
2147
|
-
var F, U, z, de, W =
|
|
2153
|
+
var j = P.index, R = P.range, T = v.objectStore(E), T = j.isPrimaryKey ? T : T.index(j.name), j = D ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", k = !A && "openKeyCursor" in T ? T.openKeyCursor(a(R), j) : T.openCursor(a(R), j);
|
|
2154
|
+
k.onerror = me(C), k.onsuccess = Z(function(G) {
|
|
2155
|
+
var F, U, z, de, W = k.result;
|
|
2148
2156
|
W ? (W.___id = ++la, W.done = !1, F = W.continue.bind(W), U = (U = W.continuePrimaryKey) && U.bind(W), z = W.advance.bind(W), de = function() {
|
|
2149
2157
|
throw new Error("Cursor not stopped");
|
|
2150
2158
|
}, W.trans = v, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
|
|
@@ -2158,7 +2166,7 @@ function Ma() {
|
|
|
2158
2166
|
});
|
|
2159
2167
|
}, W.start = function(se) {
|
|
2160
2168
|
function oe() {
|
|
2161
|
-
if (
|
|
2169
|
+
if (k.result) try {
|
|
2162
2170
|
se();
|
|
2163
2171
|
} catch (ce) {
|
|
2164
2172
|
W.fail(ce);
|
|
@@ -2168,12 +2176,12 @@ function Ma() {
|
|
|
2168
2176
|
}, W.stop();
|
|
2169
2177
|
}
|
|
2170
2178
|
var qt = new Promise(function(ce, Ve) {
|
|
2171
|
-
ce = Z(ce),
|
|
2179
|
+
ce = Z(ce), k.onerror = me(Ve), W.fail = Ve, W.stop = function(Wn) {
|
|
2172
2180
|
W.stop = W.continue = W.continuePrimaryKey = W.advance = de, ce(Wn);
|
|
2173
2181
|
};
|
|
2174
2182
|
});
|
|
2175
|
-
return
|
|
2176
|
-
|
|
2183
|
+
return k.onsuccess = Z(function(ce) {
|
|
2184
|
+
k.onsuccess = oe, oe();
|
|
2177
2185
|
}), W.continue = F, W.continuePrimaryKey = U, W.advance = z, oe(), qt;
|
|
2178
2186
|
}, N(W)) : N(null);
|
|
2179
2187
|
}, C);
|
|
@@ -2191,10 +2199,10 @@ function Ma() {
|
|
|
2191
2199
|
var i, u, d, w = (u = p, d = br((i = e).objectStoreNames), { schema: { name: i.name, tables: d.map(function(O) {
|
|
2192
2200
|
return u.objectStore(O);
|
|
2193
2201
|
}).map(function(O) {
|
|
2194
|
-
var m = O.keyPath, v = O.autoIncrement, E =
|
|
2202
|
+
var m = O.keyPath, v = O.autoIncrement, E = $(m), S = {}, v = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m == null, compound: E, keyPath: m, autoIncrement: v, unique: !0, extractKey: _n(m) }, indexes: br(O.indexNames).map(function(A) {
|
|
2195
2203
|
return O.index(A);
|
|
2196
2204
|
}).map(function(I) {
|
|
2197
|
-
var P = I.name, D = I.unique, N = I.multiEntry, I = I.keyPath, N = { name: P, compound:
|
|
2205
|
+
var P = I.name, D = I.unique, N = I.multiEntry, I = I.keyPath, N = { name: P, compound: $(I), keyPath: I, unique: D, multiEntry: N, extractKey: _n(I) };
|
|
2198
2206
|
return S[vt(I)] = N;
|
|
2199
2207
|
}), getIndexByKeyPath: function(A) {
|
|
2200
2208
|
return S[vt(A)];
|
|
@@ -2255,7 +2263,7 @@ function Ma() {
|
|
|
2255
2263
|
De(function() {
|
|
2256
2264
|
return B.trans = i, B.transless = d, n !== 0 ? (Lt(e, r), y = n, ((p = i).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(w) {
|
|
2257
2265
|
return w ?? y;
|
|
2258
|
-
}) :
|
|
2266
|
+
}) : M.resolve(y)).then(function(w) {
|
|
2259
2267
|
return O = w, m = i, E = r, S = [], w = (f = e)._versions, v = f._dbSchema = Ut(0, f.idbdb, E), (w = w.filter(function(A) {
|
|
2260
2268
|
return A._cfg.version >= O;
|
|
2261
2269
|
})).length !== 0 ? (w.forEach(function(A) {
|
|
@@ -2263,31 +2271,31 @@ function Ma() {
|
|
|
2263
2271
|
var P = v, D = A._cfg.dbschema;
|
|
2264
2272
|
zt(f, P, E), zt(f, D, E), v = f._dbSchema = D;
|
|
2265
2273
|
var I = Pn(P, D);
|
|
2266
|
-
I.add.forEach(function(
|
|
2267
|
-
Dn(E,
|
|
2268
|
-
}), I.change.forEach(function(
|
|
2269
|
-
if (
|
|
2270
|
-
var
|
|
2271
|
-
|
|
2272
|
-
return Ft(
|
|
2273
|
-
}),
|
|
2274
|
-
|
|
2275
|
-
}),
|
|
2276
|
-
return
|
|
2274
|
+
I.add.forEach(function(j) {
|
|
2275
|
+
Dn(E, j[0], j[1].primKey, j[1].indexes);
|
|
2276
|
+
}), I.change.forEach(function(j) {
|
|
2277
|
+
if (j.recreate) throw new L.Upgrade("Not yet support for changing primary key");
|
|
2278
|
+
var k = E.objectStore(j.name);
|
|
2279
|
+
j.add.forEach(function(G) {
|
|
2280
|
+
return Ft(k, G);
|
|
2281
|
+
}), j.change.forEach(function(G) {
|
|
2282
|
+
k.deleteIndex(G.name), Ft(k, G);
|
|
2283
|
+
}), j.del.forEach(function(G) {
|
|
2284
|
+
return k.deleteIndex(G);
|
|
2277
2285
|
});
|
|
2278
2286
|
});
|
|
2279
2287
|
var N = A._cfg.contentUpgrade;
|
|
2280
2288
|
if (N && A._cfg.version > O) {
|
|
2281
2289
|
Lt(f, E), m._memoizedTables = {};
|
|
2282
2290
|
var C = Qn(D);
|
|
2283
|
-
I.del.forEach(function(
|
|
2284
|
-
C[
|
|
2285
|
-
}), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype],
|
|
2291
|
+
I.del.forEach(function(j) {
|
|
2292
|
+
C[j] = P[j];
|
|
2293
|
+
}), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], x(C), C), m.schema = C;
|
|
2286
2294
|
var R, T = an(N);
|
|
2287
|
-
return T && et(), I =
|
|
2288
|
-
var
|
|
2289
|
-
(R = N(m)) && T && (
|
|
2290
|
-
}), R && typeof R.then == "function" ?
|
|
2295
|
+
return T && et(), I = M.follow(function() {
|
|
2296
|
+
var j;
|
|
2297
|
+
(R = N(m)) && T && (j = Ie.bind(null, null), R.then(j, j));
|
|
2298
|
+
}), R && typeof R.then == "function" ? M.resolve(R) : I.then(function() {
|
|
2291
2299
|
return R;
|
|
2292
2300
|
});
|
|
2293
2301
|
}
|
|
@@ -2302,14 +2310,14 @@ function Ma() {
|
|
|
2302
2310
|
})) : P.objectStore("$meta").put(A._cfg.version, "version"));
|
|
2303
2311
|
});
|
|
2304
2312
|
}), function A() {
|
|
2305
|
-
return S.length ?
|
|
2313
|
+
return S.length ? M.resolve(S.shift()(m.idbtrans)).then(A) : M.resolve();
|
|
2306
2314
|
}().then(function() {
|
|
2307
2315
|
vr(v, E);
|
|
2308
|
-
})) :
|
|
2316
|
+
})) : M.resolve();
|
|
2309
2317
|
var f, O, m, E, S, v;
|
|
2310
|
-
}).catch(u)) : (
|
|
2318
|
+
}).catch(u)) : (x(s).forEach(function(w) {
|
|
2311
2319
|
Dn(r, w, s[w].primKey, s[w].indexes);
|
|
2312
|
-
}), Lt(e, r), void
|
|
2320
|
+
}), Lt(e, r), void M.follow(function() {
|
|
2313
2321
|
return e.on.populate.fire(i);
|
|
2314
2322
|
}).catch(u));
|
|
2315
2323
|
var p, y;
|
|
@@ -2358,7 +2366,7 @@ function Ma() {
|
|
|
2358
2366
|
}), s;
|
|
2359
2367
|
}
|
|
2360
2368
|
function vr(e, n) {
|
|
2361
|
-
|
|
2369
|
+
x(e).forEach(function(r) {
|
|
2362
2370
|
n.db.objectStoreNames.contains(r) || (pe && console.debug("Dexie: Creating missing table", r), Dn(n, r, e[r].primKey, e[r].indexes));
|
|
2363
2371
|
});
|
|
2364
2372
|
}
|
|
@@ -2389,11 +2397,11 @@ function Ma() {
|
|
|
2389
2397
|
function Er(e) {
|
|
2390
2398
|
return e.split(",").map(function(n, r) {
|
|
2391
2399
|
var a = (n = n.trim()).replace(/([&*]|\+\+)/g, ""), s = /^\[/.test(a) ? a.match(/^\[(.*)\]$/)[1].split("+") : a;
|
|
2392
|
-
return Sn(a, s || null, /\&/.test(n), /\*/.test(n), /\+\+/.test(n),
|
|
2400
|
+
return Sn(a, s || null, /\&/.test(n), /\*/.test(n), /\+\+/.test(n), $(s), r === 0);
|
|
2393
2401
|
});
|
|
2394
2402
|
}
|
|
2395
2403
|
var ma = (Ht.prototype._parseStoresSpec = function(e, n) {
|
|
2396
|
-
|
|
2404
|
+
x(e).forEach(function(r) {
|
|
2397
2405
|
if (e[r] !== null) {
|
|
2398
2406
|
var a = Er(e[r]), s = a.shift();
|
|
2399
2407
|
if (s.unique = !0, s.multi) throw new L.Schema("Primary key cannot be multi-valued");
|
|
@@ -2409,7 +2417,7 @@ function Ma() {
|
|
|
2409
2417
|
var r = n._versions, a = {}, s = {};
|
|
2410
2418
|
return r.forEach(function(i) {
|
|
2411
2419
|
te(a, i._cfg.storesSource), s = i._cfg.dbschema = {}, i._parseStoresSpec(a, s);
|
|
2412
|
-
}), n._dbSchema = s, An(n, [n._allTables, n, n.Transaction.prototype]), Wt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables],
|
|
2420
|
+
}), n._dbSchema = s, An(n, [n._allTables, n, n.Transaction.prototype]), Wt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], x(s), s), n._storeNames = x(s), this;
|
|
2413
2421
|
}, Ht.prototype.upgrade = function(e) {
|
|
2414
2422
|
return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || Q, e), this;
|
|
2415
2423
|
}, Ht);
|
|
@@ -2492,7 +2500,7 @@ function Ma() {
|
|
|
2492
2500
|
return (n ? r ? Math.max(n.d, r.d) : n.d : r ? r.d : 0) + 1;
|
|
2493
2501
|
}
|
|
2494
2502
|
function Yt(e, n) {
|
|
2495
|
-
return
|
|
2503
|
+
return x(n).forEach(function(r) {
|
|
2496
2504
|
e[r] ? wt(e[r], n[r]) : e[r] = function a(s) {
|
|
2497
2505
|
var i, u, d = {};
|
|
2498
2506
|
for (i in s) ie(s, i) && (u = s[i], d[i] = !u || typeof u != "object" || Jn.has(u.constructor) ? u : a(u));
|
|
@@ -2564,7 +2572,7 @@ function Ma() {
|
|
|
2564
2572
|
if (n.openCanceller !== a) throw new L.DatabaseClosed("db.open() was cancelled");
|
|
2565
2573
|
}
|
|
2566
2574
|
function d() {
|
|
2567
|
-
return new
|
|
2575
|
+
return new M(function(O, m) {
|
|
2568
2576
|
if (u(), !r) throw new L.MissingAPI();
|
|
2569
2577
|
var E = e.name, S = n.autoSchema || !s ? r.open(E) : r.open(E, s);
|
|
2570
2578
|
if (!S) throw new L.MissingAPI();
|
|
@@ -2578,7 +2586,7 @@ function Ma() {
|
|
|
2578
2586
|
var v, A, P, D, I, N = e.idbdb = S.result, C = At(N.objectStoreNames);
|
|
2579
2587
|
if (0 < C.length) try {
|
|
2580
2588
|
var R = N.transaction((D = C).length === 1 ? D[0] : D, "readonly");
|
|
2581
|
-
if (n.autoSchema) A = N, P = R, (v = e).verno = A.version / 10, P = v._dbSchema = Ut(0, A, P), v._storeNames = At(A.objectStoreNames, 0), Wt(v, [v._allTables],
|
|
2589
|
+
if (n.autoSchema) A = N, P = R, (v = e).verno = A.version / 10, P = v._dbSchema = Ut(0, A, P), v._storeNames = At(A.objectStoreNames, 0), Wt(v, [v._allTables], x(P), P);
|
|
2582
2590
|
else if (zt(e, e._dbSchema, R), ((I = Pn(Ut(0, (I = e).idbdb, R), I._dbSchema)).add.length || I.change.some(function(T) {
|
|
2583
2591
|
return T.add.length || T.change.length;
|
|
2584
2592
|
})) && !i) 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."), N.close(), s = N.version + 1, i = !0, O(d());
|
|
@@ -2599,11 +2607,11 @@ function Ma() {
|
|
|
2599
2607
|
case "VersionError":
|
|
2600
2608
|
if (0 < s) return s = 0, d();
|
|
2601
2609
|
}
|
|
2602
|
-
return
|
|
2610
|
+
return M.reject(O);
|
|
2603
2611
|
});
|
|
2604
2612
|
}
|
|
2605
2613
|
var p, y = n.dbReadyResolve, w = null, f = !1;
|
|
2606
|
-
return
|
|
2614
|
+
return M.race([a, (typeof navigator > "u" ? M.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(O) {
|
|
2607
2615
|
function m() {
|
|
2608
2616
|
return indexedDB.databases().finally(O);
|
|
2609
2617
|
}
|
|
@@ -2611,12 +2619,12 @@ function Ma() {
|
|
|
2611
2619
|
}).finally(function() {
|
|
2612
2620
|
return clearInterval(p);
|
|
2613
2621
|
}) : Promise.resolve()).then(d)]).then(function() {
|
|
2614
|
-
return u(), n.onReadyBeingFired = [],
|
|
2622
|
+
return u(), n.onReadyBeingFired = [], M.resolve(Rn(function() {
|
|
2615
2623
|
return e.on.ready.fire(e.vip);
|
|
2616
2624
|
})).then(function O() {
|
|
2617
2625
|
if (0 < n.onReadyBeingFired.length) {
|
|
2618
2626
|
var m = n.onReadyBeingFired.reduce(on, Q);
|
|
2619
|
-
return n.onReadyBeingFired = [],
|
|
2627
|
+
return n.onReadyBeingFired = [], M.resolve(Rn(function() {
|
|
2620
2628
|
return m(e.vip);
|
|
2621
2629
|
})).then(O);
|
|
2622
2630
|
}
|
|
@@ -2651,13 +2659,13 @@ function Ma() {
|
|
|
2651
2659
|
function s(i) {
|
|
2652
2660
|
return function(p) {
|
|
2653
2661
|
var d = i(p), p = d.value;
|
|
2654
|
-
return d.done ? p : p && typeof p.then == "function" ? p.then(r, a) :
|
|
2662
|
+
return d.done ? p : p && typeof p.then == "function" ? p.then(r, a) : $(p) ? Promise.all(p).then(r, a) : r(p);
|
|
2655
2663
|
};
|
|
2656
2664
|
}
|
|
2657
2665
|
return s(n)();
|
|
2658
2666
|
}
|
|
2659
2667
|
function Xt(e, n, r) {
|
|
2660
|
-
for (var a =
|
|
2668
|
+
for (var a = $(e) ? e.slice() : [e], s = 0; s < r; ++s) a.push(n);
|
|
2661
2669
|
return a;
|
|
2662
2670
|
}
|
|
2663
2671
|
var ba = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
|
|
@@ -2707,10 +2715,10 @@ function Ma() {
|
|
|
2707
2715
|
} });
|
|
2708
2716
|
} };
|
|
2709
2717
|
function Mn(e, n, r, a) {
|
|
2710
|
-
return r = r || {}, a = a || "",
|
|
2718
|
+
return r = r || {}, a = a || "", x(e).forEach(function(s) {
|
|
2711
2719
|
var i, u, d;
|
|
2712
2720
|
ie(n, s) ? (i = e[s], u = n[s], typeof i == "object" && typeof u == "object" && i && u ? (d = nn(i)) !== nn(u) ? r[a + s] = n[s] : d === "Object" ? Mn(i, u, r, a + s + ".") : i !== u && (r[a + s] = n[s]) : i !== u && (r[a + s] = n[s])) : r[a + s] = void 0;
|
|
2713
|
-
}),
|
|
2721
|
+
}), x(n).forEach(function(s) {
|
|
2714
2722
|
ie(e, s) || (r[a + s] = n[s]);
|
|
2715
2723
|
}), r;
|
|
2716
2724
|
}
|
|
@@ -2757,15 +2765,15 @@ function Ma() {
|
|
|
2757
2765
|
if (!v) throw new Error("Keys missing");
|
|
2758
2766
|
return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: v }) : l({}, f)).type !== "delete" && (f.values = g([], f.values)), f.keys && (f.keys = g([], f.keys)), O = r, E = v, ((m = f).type === "add" ? Promise.resolve([]) : O.getMany({ trans: m.trans, keys: E, cache: "immutable" })).then(function(A) {
|
|
2759
2767
|
var P = v.map(function(D, I) {
|
|
2760
|
-
var N, C, R, T = A[I],
|
|
2761
|
-
return f.type === "delete" ? d.fire.call(
|
|
2762
|
-
ie(R,
|
|
2763
|
-
}))),
|
|
2768
|
+
var N, C, R, T = A[I], j = { onerror: null, onsuccess: null };
|
|
2769
|
+
return f.type === "delete" ? d.fire.call(j, D, T, S) : f.type === "add" || T === void 0 ? (N = p.fire.call(j, D, f.values[I], S), D == null && N != null && (f.keys[I] = D = N, a.outbound || ue(f.values[I], a.keyPath, D))) : (N = Mn(T, f.values[I]), (C = y.fire.call(j, N, D, T, S)) && (R = f.values[I], Object.keys(C).forEach(function(k) {
|
|
2770
|
+
ie(R, k) ? R[k] = C[k] : ue(R, k, C[k]);
|
|
2771
|
+
}))), j;
|
|
2764
2772
|
});
|
|
2765
2773
|
return r.mutate(f).then(function(D) {
|
|
2766
2774
|
for (var I = D.failures, N = D.results, C = D.numFailures, D = D.lastResult, R = 0; R < v.length; ++R) {
|
|
2767
|
-
var T = (N || v)[R],
|
|
2768
|
-
T == null ?
|
|
2775
|
+
var T = (N || v)[R], j = P[R];
|
|
2776
|
+
T == null ? j.onerror && j.onerror(I[R]) : j.onsuccess && j.onsuccess(f.type === "put" && A[R] ? f.values[R] : T);
|
|
2769
2777
|
}
|
|
2770
2778
|
return { failures: I, results: N, numFailures: C, lastResult: D };
|
|
2771
2779
|
}).catch(function(D) {
|
|
@@ -2793,7 +2801,7 @@ function Ma() {
|
|
|
2793
2801
|
return l(l({}, r), { getMany: function(a) {
|
|
2794
2802
|
if (!a.cache) return r.getMany(a);
|
|
2795
2803
|
var s = Ar(a.keys, a.trans._cache, a.cache === "clone");
|
|
2796
|
-
return s ?
|
|
2804
|
+
return s ? M.resolve(s) : r.getMany(a).then(function(i) {
|
|
2797
2805
|
return a.trans._cache = { keys: a.keys, values: a.cache === "clone" ? $e(i) : i }, i;
|
|
2798
2806
|
});
|
|
2799
2807
|
}, mutate: function(a) {
|
|
@@ -2824,37 +2832,37 @@ function Ma() {
|
|
|
2824
2832
|
var s = e.table(a), i = s.schema, u = i.primaryKey, f = i.indexes, d = u.extractKey, p = u.outbound, y = u.autoIncrement && f.filter(function(m) {
|
|
2825
2833
|
return m.compound && m.keyPath.includes(u.keyPath);
|
|
2826
2834
|
}), w = l(l({}, s), { mutate: function(m) {
|
|
2827
|
-
function E(
|
|
2828
|
-
return
|
|
2835
|
+
function E(k) {
|
|
2836
|
+
return k = "idb://".concat(n, "/").concat(a, "/").concat(k), D[k] || (D[k] = new ae());
|
|
2829
2837
|
}
|
|
2830
|
-
var S, v, A, P = m.trans, D = m.mutatedParts || (m.mutatedParts = {}), I = E(""), N = E(":dels"), C = m.type,
|
|
2831
|
-
return
|
|
2832
|
-
}), m.values] : [], R =
|
|
2833
|
-
return
|
|
2834
|
-
var
|
|
2838
|
+
var S, v, A, P = m.trans, D = m.mutatedParts || (m.mutatedParts = {}), I = E(""), N = E(":dels"), C = m.type, j = m.type === "deleteRange" ? [m.range] : m.type === "delete" ? [m.keys] : m.values.length < 50 ? [Gn(u, m).filter(function(k) {
|
|
2839
|
+
return k;
|
|
2840
|
+
}), m.values] : [], R = j[0], T = j[1], j = m.trans._cache;
|
|
2841
|
+
return $(R) ? (I.addKeys(R), (j = C === "delete" || R.length === T.length ? Ar(R, j) : null) || N.addKeys(R), (j || T) && (S = E, v = j, A = T, i.indexes.forEach(function(k) {
|
|
2842
|
+
var G = S(k.name || "");
|
|
2835
2843
|
function F(z) {
|
|
2836
|
-
return z != null ?
|
|
2844
|
+
return z != null ? k.extractKey(z) : null;
|
|
2837
2845
|
}
|
|
2838
2846
|
function U(z) {
|
|
2839
|
-
return
|
|
2840
|
-
return
|
|
2841
|
-
}) :
|
|
2847
|
+
return k.multiEntry && $(z) ? z.forEach(function(de) {
|
|
2848
|
+
return G.addKey(de);
|
|
2849
|
+
}) : G.addKey(z);
|
|
2842
2850
|
}
|
|
2843
2851
|
(v || A).forEach(function(z, se) {
|
|
2844
2852
|
var W = v && F(v[se]), se = A && F(A[se]);
|
|
2845
2853
|
H(W, se) !== 0 && (W != null && U(W), se != null && U(se));
|
|
2846
2854
|
});
|
|
2847
|
-
}))) : R ? (T = { from: (T = R.lower) !== null && T !== void 0 ? T : e.MIN_KEY, to: (T = R.upper) !== null && T !== void 0 ? T : e.MAX_KEY }, N.add(T), I.add(T)) : (I.add(r), N.add(r), i.indexes.forEach(function(
|
|
2848
|
-
return E(
|
|
2849
|
-
})), s.mutate(m).then(function(
|
|
2850
|
-
return !R || m.type !== "add" && m.type !== "put" || (I.addKeys(
|
|
2855
|
+
}))) : R ? (T = { from: (T = R.lower) !== null && T !== void 0 ? T : e.MIN_KEY, to: (T = R.upper) !== null && T !== void 0 ? T : e.MAX_KEY }, N.add(T), I.add(T)) : (I.add(r), N.add(r), i.indexes.forEach(function(k) {
|
|
2856
|
+
return E(k.name).add(r);
|
|
2857
|
+
})), s.mutate(m).then(function(k) {
|
|
2858
|
+
return !R || m.type !== "add" && m.type !== "put" || (I.addKeys(k.results), y && y.forEach(function(G) {
|
|
2851
2859
|
for (var F = m.values.map(function(W) {
|
|
2852
|
-
return
|
|
2853
|
-
}), U =
|
|
2860
|
+
return G.extractKey(W);
|
|
2861
|
+
}), U = G.keyPath.findIndex(function(W) {
|
|
2854
2862
|
return W === u.keyPath;
|
|
2855
|
-
}), z = 0, de =
|
|
2856
|
-
E(
|
|
2857
|
-
})), P.mutatedParts = Yt(P.mutatedParts || {}, D),
|
|
2863
|
+
}), z = 0, de = k.results.length; z < de; ++z) F[z][U] = k.results[z];
|
|
2864
|
+
E(G.name).addKeys(F);
|
|
2865
|
+
})), P.mutatedParts = Yt(P.mutatedParts || {}, D), k;
|
|
2858
2866
|
});
|
|
2859
2867
|
} }), f = function(E) {
|
|
2860
2868
|
var S = E.query, E = S.index, S = S.range;
|
|
@@ -2864,7 +2872,7 @@ function Ma() {
|
|
|
2864
2872
|
}, getMany: function(m) {
|
|
2865
2873
|
return [u, new ae().addKeys(m.keys)];
|
|
2866
2874
|
}, count: f, query: f, openCursor: f };
|
|
2867
|
-
return
|
|
2875
|
+
return x(O).forEach(function(m) {
|
|
2868
2876
|
w[m] = function(E) {
|
|
2869
2877
|
var S = B.subscr, v = !!S, A = Pr(B, s) && Dr(m, E) ? E.obsSet = {} : S;
|
|
2870
2878
|
if (v) {
|
|
@@ -2879,17 +2887,17 @@ function Ma() {
|
|
|
2879
2887
|
if (p && E.values) return N.then(function(F) {
|
|
2880
2888
|
return F = F.result, D.addKeys(F), T;
|
|
2881
2889
|
});
|
|
2882
|
-
var
|
|
2883
|
-
(E.values ? D : I).addKeys(
|
|
2890
|
+
var j = E.values ? T.result.map(d) : T.result;
|
|
2891
|
+
(E.values ? D : I).addKeys(j);
|
|
2884
2892
|
} else if (m === "openCursor") {
|
|
2885
|
-
var
|
|
2886
|
-
return
|
|
2887
|
-
return I.addKey(
|
|
2893
|
+
var k = T, G = E.values;
|
|
2894
|
+
return k && Object.create(k, { key: { get: function() {
|
|
2895
|
+
return I.addKey(k.primaryKey), k.key;
|
|
2888
2896
|
} }, primaryKey: { get: function() {
|
|
2889
|
-
var F =
|
|
2897
|
+
var F = k.primaryKey;
|
|
2890
2898
|
return I.addKey(F), F;
|
|
2891
2899
|
} }, value: { get: function() {
|
|
2892
|
-
return
|
|
2900
|
+
return G && D.addKey(k.primaryKey), k.value;
|
|
2893
2901
|
} } });
|
|
2894
2902
|
}
|
|
2895
2903
|
return T;
|
|
@@ -2907,9 +2915,9 @@ function Ma() {
|
|
|
2907
2915
|
if (r.numFailures === 0) return n;
|
|
2908
2916
|
if (n.type === "deleteRange") return null;
|
|
2909
2917
|
var a = n.keys ? n.keys.length : "values" in n && n.values ? n.values.length : 1;
|
|
2910
|
-
return r.numFailures === a ? null : (n = l({}, n),
|
|
2918
|
+
return r.numFailures === a ? null : (n = l({}, n), $(n.keys) && (n.keys = n.keys.filter(function(s, i) {
|
|
2911
2919
|
return !(i in r.failures);
|
|
2912
|
-
})), "values" in n &&
|
|
2920
|
+
})), "values" in n && $(n.values) && (n.values = n.values.filter(function(s, i) {
|
|
2913
2921
|
return !(i in r.failures);
|
|
2914
2922
|
})), n);
|
|
2915
2923
|
}
|
|
@@ -2923,42 +2931,42 @@ function Ma() {
|
|
|
2923
2931
|
var S = m, v = [];
|
|
2924
2932
|
if (E.type === "add" || E.type === "put") for (var A = new ae(), P = E.values.length - 1; 0 <= P; --P) {
|
|
2925
2933
|
var D, I = E.values[P], N = y(I);
|
|
2926
|
-
A.hasKey(N) || (D = w(I), (d &&
|
|
2927
|
-
return Kn(
|
|
2934
|
+
A.hasKey(N) || (D = w(I), (d && $(D) ? D.some(function(k) {
|
|
2935
|
+
return Kn(k, p);
|
|
2928
2936
|
}) : Kn(D, p)) && (A.addKey(N), v.push(I)));
|
|
2929
2937
|
}
|
|
2930
2938
|
switch (E.type) {
|
|
2931
2939
|
case "add":
|
|
2932
|
-
var C = new ae().addKeys(n.values ? m.map(function(
|
|
2933
|
-
return y(
|
|
2934
|
-
}) : m), S = m.concat(n.values ? v.filter(function(
|
|
2935
|
-
return
|
|
2936
|
-
}) : v.map(function(
|
|
2937
|
-
return y(
|
|
2938
|
-
}).filter(function(
|
|
2939
|
-
return !C.hasKey(
|
|
2940
|
+
var C = new ae().addKeys(n.values ? m.map(function(G) {
|
|
2941
|
+
return y(G);
|
|
2942
|
+
}) : m), S = m.concat(n.values ? v.filter(function(G) {
|
|
2943
|
+
return G = y(G), !C.hasKey(G) && (C.addKey(G), !0);
|
|
2944
|
+
}) : v.map(function(G) {
|
|
2945
|
+
return y(G);
|
|
2946
|
+
}).filter(function(G) {
|
|
2947
|
+
return !C.hasKey(G) && (C.addKey(G), !0);
|
|
2940
2948
|
}));
|
|
2941
2949
|
break;
|
|
2942
2950
|
case "put":
|
|
2943
|
-
var R = new ae().addKeys(E.values.map(function(
|
|
2944
|
-
return y(
|
|
2951
|
+
var R = new ae().addKeys(E.values.map(function(G) {
|
|
2952
|
+
return y(G);
|
|
2945
2953
|
}));
|
|
2946
|
-
S = m.filter(function(
|
|
2947
|
-
return !R.hasKey(n.values ? y(
|
|
2948
|
-
}).concat(n.values ? v : v.map(function(
|
|
2949
|
-
return y(
|
|
2954
|
+
S = m.filter(function(G) {
|
|
2955
|
+
return !R.hasKey(n.values ? y(G) : G);
|
|
2956
|
+
}).concat(n.values ? v : v.map(function(G) {
|
|
2957
|
+
return y(G);
|
|
2950
2958
|
}));
|
|
2951
2959
|
break;
|
|
2952
2960
|
case "delete":
|
|
2953
2961
|
var T = new ae().addKeys(E.keys);
|
|
2954
|
-
S = m.filter(function(
|
|
2955
|
-
return !T.hasKey(n.values ? y(
|
|
2962
|
+
S = m.filter(function(G) {
|
|
2963
|
+
return !T.hasKey(n.values ? y(G) : G);
|
|
2956
2964
|
});
|
|
2957
2965
|
break;
|
|
2958
2966
|
case "deleteRange":
|
|
2959
|
-
var
|
|
2960
|
-
S = m.filter(function(
|
|
2961
|
-
return !Kn(y(
|
|
2967
|
+
var j = E.range;
|
|
2968
|
+
S = m.filter(function(G) {
|
|
2969
|
+
return !Kn(y(G), j);
|
|
2962
2970
|
});
|
|
2963
2971
|
}
|
|
2964
2972
|
return S;
|
|
@@ -3009,26 +3017,26 @@ function Ma() {
|
|
|
3009
3017
|
for (var y = /* @__PURE__ */ new Set(), w = 0, f = r; w < f.length; w++) {
|
|
3010
3018
|
var O = f[w], m = ze["idb://".concat(n, "/").concat(O)];
|
|
3011
3019
|
if (m) {
|
|
3012
|
-
var E = e.table(O), S = m.optimisticOps.filter(function(
|
|
3013
|
-
return
|
|
3020
|
+
var E = e.table(O), S = m.optimisticOps.filter(function(G) {
|
|
3021
|
+
return G.trans === d;
|
|
3014
3022
|
});
|
|
3015
|
-
if (d._explicit && p && d.mutatedParts) for (var v = 0, A = Object.values(m.queries.query); v < A.length; v++) for (var P = 0, D = (C = A[v]).slice(); P < D.length; P++) xn((R = D[P]).obsSet, d.mutatedParts) && (je(C, R), R.subscribers.forEach(function(
|
|
3016
|
-
return y.add(
|
|
3023
|
+
if (d._explicit && p && d.mutatedParts) for (var v = 0, A = Object.values(m.queries.query); v < A.length; v++) for (var P = 0, D = (C = A[v]).slice(); P < D.length; P++) xn((R = D[P]).obsSet, d.mutatedParts) && (je(C, R), R.subscribers.forEach(function(G) {
|
|
3024
|
+
return y.add(G);
|
|
3017
3025
|
}));
|
|
3018
3026
|
else if (0 < S.length) {
|
|
3019
|
-
m.optimisticOps = m.optimisticOps.filter(function(
|
|
3020
|
-
return
|
|
3027
|
+
m.optimisticOps = m.optimisticOps.filter(function(G) {
|
|
3028
|
+
return G.trans !== d;
|
|
3021
3029
|
});
|
|
3022
|
-
for (var I = 0, N = Object.values(m.queries.query); I < N.length; I++) for (var C, R, T,
|
|
3023
|
-
return y.add(
|
|
3024
|
-
})) : T !== R.res && (R.res = T, R.promise =
|
|
3025
|
-
return y.add(
|
|
3030
|
+
for (var I = 0, N = Object.values(m.queries.query); I < N.length; I++) for (var C, R, T, j = 0, k = (C = N[I]).slice(); j < k.length; j++) (R = k[j]).res != null && d.mutatedParts && (p && !R.dirty ? (T = Object.isFrozen(R.res), T = Nr(R.res, R.req, S, E, R, T), R.dirty ? (je(C, R), R.subscribers.forEach(function(G) {
|
|
3031
|
+
return y.add(G);
|
|
3032
|
+
})) : T !== R.res && (R.res = T, R.promise = M.resolve({ result: T }))) : (R.dirty && je(C, R), R.subscribers.forEach(function(G) {
|
|
3033
|
+
return y.add(G);
|
|
3026
3034
|
})));
|
|
3027
3035
|
}
|
|
3028
3036
|
}
|
|
3029
3037
|
}
|
|
3030
|
-
y.forEach(function(
|
|
3031
|
-
return
|
|
3038
|
+
y.forEach(function(G) {
|
|
3039
|
+
return G();
|
|
3032
3040
|
});
|
|
3033
3041
|
}
|
|
3034
3042
|
};
|
|
@@ -3106,7 +3114,7 @@ function Ma() {
|
|
|
3106
3114
|
return r || (r = new this.Version(e), n.push(r), n.sort(ha), r.stores({}), this._state.autoSchema = !1, r);
|
|
3107
3115
|
}, ee.prototype._whenReady = function(e) {
|
|
3108
3116
|
var n = this;
|
|
3109
|
-
return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new
|
|
3117
|
+
return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new M(function(r, a) {
|
|
3110
3118
|
if (n._state.openComplete) return a(new L.DatabaseClosed(n._state.dbOpenError));
|
|
3111
3119
|
if (!n._state.isBeingOpened) {
|
|
3112
3120
|
if (!n._state.autoOpen) return void a(new L.DatabaseClosed());
|
|
@@ -3138,9 +3146,9 @@ function Ma() {
|
|
|
3138
3146
|
}
|
|
3139
3147
|
this.idbdb = null;
|
|
3140
3148
|
}
|
|
3141
|
-
e.isBeingOpened || (e.dbReadyPromise = new
|
|
3149
|
+
e.isBeingOpened || (e.dbReadyPromise = new M(function(r) {
|
|
3142
3150
|
e.dbReadyResolve = r;
|
|
3143
|
-
}), e.openCanceller = new
|
|
3151
|
+
}), e.openCanceller = new M(function(r, a) {
|
|
3144
3152
|
e.cancelOpen = a;
|
|
3145
3153
|
}));
|
|
3146
3154
|
}, ee.prototype.close = function(r) {
|
|
@@ -3150,7 +3158,7 @@ function Ma() {
|
|
|
3150
3158
|
var n = this;
|
|
3151
3159
|
e === void 0 && (e = { disableAutoOpen: !0 });
|
|
3152
3160
|
var r = 0 < arguments.length && typeof arguments[0] != "object", a = this._state;
|
|
3153
|
-
return new
|
|
3161
|
+
return new M(function(s, i) {
|
|
3154
3162
|
function u() {
|
|
3155
3163
|
n.close(e);
|
|
3156
3164
|
var d = n._deps.indexedDB.deleteDatabase(n.name);
|
|
@@ -3175,7 +3183,7 @@ function Ma() {
|
|
|
3175
3183
|
return this._state.autoSchema;
|
|
3176
3184
|
}, Object.defineProperty(ee.prototype, "tables", { get: function() {
|
|
3177
3185
|
var e = this;
|
|
3178
|
-
return
|
|
3186
|
+
return x(this._allTables).map(function(n) {
|
|
3179
3187
|
return e._allTables[n];
|
|
3180
3188
|
});
|
|
3181
3189
|
}, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
|
|
@@ -3218,7 +3226,7 @@ function Ma() {
|
|
|
3218
3226
|
}) : q(y);
|
|
3219
3227
|
}
|
|
3220
3228
|
var p = function y(w, f, O, m, E) {
|
|
3221
|
-
return
|
|
3229
|
+
return M.resolve().then(function() {
|
|
3222
3230
|
var S = B.transless || B, v = w._createTransaction(f, O, w._dbSchema, m);
|
|
3223
3231
|
if (v.explicit = !0, S = { trans: v, transless: S }, m) v.idbtrans = m.idbtrans;
|
|
3224
3232
|
else try {
|
|
@@ -3229,10 +3237,10 @@ function Ma() {
|
|
|
3229
3237
|
})) : q(D);
|
|
3230
3238
|
}
|
|
3231
3239
|
var A, P = an(E);
|
|
3232
|
-
return P && et(), S =
|
|
3240
|
+
return P && et(), S = M.follow(function() {
|
|
3233
3241
|
var D;
|
|
3234
3242
|
(A = E.call(v, v)) && (P ? (D = Ie.bind(null, null), A.then(D, D)) : typeof A.next == "function" && typeof A.throw == "function" && (A = jn(A)));
|
|
3235
|
-
}, S), (A && typeof A.then == "function" ?
|
|
3243
|
+
}, S), (A && typeof A.then == "function" ? M.resolve(A).then(function(D) {
|
|
3236
3244
|
return v.active ? D : q(new L.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
3237
3245
|
}) : S.then(function() {
|
|
3238
3246
|
return A;
|
|
@@ -3258,15 +3266,15 @@ function Ma() {
|
|
|
3258
3266
|
var a = ee.dependencies;
|
|
3259
3267
|
this._options = n = l({ addons: ee.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, n), this._deps = { indexedDB: n.indexedDB, IDBKeyRange: n.IDBKeyRange }, a = n.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
3260
3268
|
var s, i, u, d, p, y = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: n.autoOpen };
|
|
3261
|
-
y.dbReadyPromise = new
|
|
3269
|
+
y.dbReadyPromise = new M(function(f) {
|
|
3262
3270
|
y.dbReadyResolve = f;
|
|
3263
|
-
}), y.openCanceller = new
|
|
3271
|
+
}), y.openCanceller = new M(function(f, O) {
|
|
3264
3272
|
y.cancelOpen = O;
|
|
3265
3273
|
}), this._state = y, this.name = e, this.on = ht(this, "populate", "blocked", "versionchange", "close", { ready: [on, Q] }), this.on.ready.subscribe = Vn(this.on.ready.subscribe, function(f) {
|
|
3266
3274
|
return function(O, m) {
|
|
3267
3275
|
ee.vip(function() {
|
|
3268
3276
|
var E, S = r._state;
|
|
3269
|
-
S.openComplete ? (S.dbOpenError ||
|
|
3277
|
+
S.openComplete ? (S.dbOpenError || M.resolve().then(O), m && f(O)) : S.onReadyBeingFired ? (S.onReadyBeingFired.push(O), m && f(O)) : (f(O), E = r, m || f(function v() {
|
|
3270
3278
|
E.on.ready.unsubscribe(O), E.on.ready.unsubscribe(v);
|
|
3271
3279
|
}));
|
|
3272
3280
|
});
|
|
@@ -3285,7 +3293,7 @@ function Ma() {
|
|
|
3285
3293
|
this.db = i, this._tx = m, this.name = f, this.schema = O, this.hook = i._allTables[f] ? i._allTables[f].hook : ht(null, { creating: [Jr, Q], reading: [Xr, ct], updating: [qr, Q], deleting: [Zr, Q] });
|
|
3286
3294
|
})), this.Transaction = (u = this, gt(ua.prototype, function(f, O, m, E, S) {
|
|
3287
3295
|
var v = this;
|
|
3288
|
-
this.db = u, this.mode = f, this.storeNames = O, this.schema = m, this.chromeTransactionDurability = E, this.idbtrans = null, this.on = ht(this, "complete", "error", "abort"), this.parent = S || 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
|
|
3296
|
+
this.db = u, this.mode = f, this.storeNames = O, this.schema = m, this.chromeTransactionDurability = E, this.idbtrans = null, this.on = ht(this, "complete", "error", "abort"), this.parent = S || 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 M(function(A, P) {
|
|
3289
3297
|
v._resolve = A, v._reject = P;
|
|
3290
3298
|
}), this._completion.then(function() {
|
|
3291
3299
|
v.active = !1, v.on.complete.fire();
|
|
@@ -3429,7 +3437,7 @@ function Ma() {
|
|
|
3429
3437
|
return function() {
|
|
3430
3438
|
try {
|
|
3431
3439
|
var n = jn(e.apply(this, arguments));
|
|
3432
|
-
return n && typeof n.then == "function" ? n :
|
|
3440
|
+
return n && typeof n.then == "function" ? n : M.resolve(n);
|
|
3433
3441
|
} catch (r) {
|
|
3434
3442
|
return q(r);
|
|
3435
3443
|
}
|
|
@@ -3437,15 +3445,15 @@ function Ma() {
|
|
|
3437
3445
|
}, spawn: function(e, n, r) {
|
|
3438
3446
|
try {
|
|
3439
3447
|
var a = jn(e.apply(r, n || []));
|
|
3440
|
-
return a && typeof a.then == "function" ? a :
|
|
3448
|
+
return a && typeof a.then == "function" ? a : M.resolve(a);
|
|
3441
3449
|
} catch (s) {
|
|
3442
3450
|
return q(s);
|
|
3443
3451
|
}
|
|
3444
3452
|
}, currentTransaction: { get: function() {
|
|
3445
3453
|
return B.trans || null;
|
|
3446
3454
|
} }, waitFor: function(e, n) {
|
|
3447
|
-
return n =
|
|
3448
|
-
}, Promise:
|
|
3455
|
+
return n = M.resolve(typeof e == "function" ? He.ignoreTransaction(e) : e).timeout(n || 6e4), B.trans ? B.trans.waitFor(n) : n;
|
|
3456
|
+
}, Promise: M, debug: { get: function() {
|
|
3449
3457
|
return pe;
|
|
3450
3458
|
}, set: function(e) {
|
|
3451
3459
|
er(e);
|
|
@@ -3477,7 +3485,7 @@ function Ma() {
|
|
|
3477
3485
|
}
|
|
3478
3486
|
}), addEventListener("pageshow", function(e) {
|
|
3479
3487
|
!Se.disableBfCache && e.persisted && (pe && console.debug("Dexie: handling persisted pageshow"), xr(), Ln({ all: new ae(-1 / 0, [[]]) }));
|
|
3480
|
-
})),
|
|
3488
|
+
})), M.rejectionMapper = function(e, n) {
|
|
3481
3489
|
return !e || e instanceof Xe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !qn[e.name] ? e : (n = new qn[e.name](n || e.message, e), "stack" in e && Ae(n, "stack", { get: function() {
|
|
3482
3490
|
return this.inner.stack;
|
|
3483
3491
|
} }), n);
|
|
@@ -3521,7 +3529,7 @@ class Mr {
|
|
|
3521
3529
|
messages: "id,utc,expires",
|
|
3522
3530
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
3523
3531
|
player: "id,title,name,location",
|
|
3524
|
-
preference: "id,value",
|
|
3532
|
+
preference: "id,value,update",
|
|
3525
3533
|
presentation: "id,name,update",
|
|
3526
3534
|
series: "id,dashboard_id",
|
|
3527
3535
|
slide: "id,name,presentation_id,order_index,json,html,update",
|
|
@@ -3536,7 +3544,7 @@ class Mr {
|
|
|
3536
3544
|
*/
|
|
3537
3545
|
getCloud = async (t) => {
|
|
3538
3546
|
if (t.widget === "")
|
|
3539
|
-
return
|
|
3547
|
+
return K(3, [
|
|
3540
3548
|
"%cget%c %cstorage%c %ccloud",
|
|
3541
3549
|
c.KO,
|
|
3542
3550
|
c.NONE,
|
|
@@ -3551,7 +3559,7 @@ class Mr {
|
|
|
3551
3559
|
query: t
|
|
3552
3560
|
};
|
|
3553
3561
|
const o = await this.db.table(_.CLOUD).where({ id: t.widget }).last().catch(() => {
|
|
3554
|
-
|
|
3562
|
+
K(2, ["%capi%C %ccloud", c.API, c.NONE, c.CLOUD, t.widget]);
|
|
3555
3563
|
});
|
|
3556
3564
|
if (typeof o > "u")
|
|
3557
3565
|
return { data: null, message: "Cloud Data error", success: !1, query: t };
|
|
@@ -3561,7 +3569,7 @@ class Mr {
|
|
|
3561
3569
|
success: o !== void 0,
|
|
3562
3570
|
query: t
|
|
3563
3571
|
};
|
|
3564
|
-
return
|
|
3572
|
+
return K(3, [
|
|
3565
3573
|
"%cget%c %cstorage%c %ccloud",
|
|
3566
3574
|
c.OK,
|
|
3567
3575
|
c.NONE,
|
|
@@ -3582,7 +3590,7 @@ class Mr {
|
|
|
3582
3590
|
dashboard_id: t.dashboard,
|
|
3583
3591
|
// data: data.data,
|
|
3584
3592
|
data: o
|
|
3585
|
-
}).then(() => 201).catch((l) => (
|
|
3593
|
+
}).then(() => 201).catch((l) => (K(2, [
|
|
3586
3594
|
"%cset%c %cstorage%c %ccloud",
|
|
3587
3595
|
c.KO,
|
|
3588
3596
|
c.NONE,
|
|
@@ -3594,7 +3602,7 @@ class Mr {
|
|
|
3594
3602
|
]), 400)) : 400;
|
|
3595
3603
|
getDashboard = async (t) => {
|
|
3596
3604
|
const o = await this.db.table(_.DASHBOARD).where({ id: t.id }).last().catch(() => {
|
|
3597
|
-
|
|
3605
|
+
K(2, ["%cstorage", c.STORAGE, X.DASHBOARD_LOAD, t.id]);
|
|
3598
3606
|
});
|
|
3599
3607
|
return o === void 0 ? {
|
|
3600
3608
|
data: null,
|
|
@@ -3604,9 +3612,9 @@ class Mr {
|
|
|
3604
3612
|
};
|
|
3605
3613
|
getDashboards = async (t) => {
|
|
3606
3614
|
const o = (b) => t?.id === b.id, l = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.DASHBOARD).toArray().then((b) => t?.id ? b.filter(o) : b).then((b) => t?.name ? b.filter(l) : b).catch(() => {
|
|
3607
|
-
|
|
3615
|
+
K(2, ["%cstorage", c.STORAGE, X.DASHBOARD_LOAD, t]);
|
|
3608
3616
|
});
|
|
3609
|
-
return g !== void 0 &&
|
|
3617
|
+
return g !== void 0 && K(3, [
|
|
3610
3618
|
"%cstorage%c %cdashboards",
|
|
3611
3619
|
c.STORAGE,
|
|
3612
3620
|
c.NONE,
|
|
@@ -3635,7 +3643,7 @@ class Mr {
|
|
|
3635
3643
|
data: null,
|
|
3636
3644
|
message: `Dashboard ${o.data.id} saved to storage`,
|
|
3637
3645
|
success: !0
|
|
3638
|
-
})).catch((l) => (
|
|
3646
|
+
})).catch((l) => (K(4, ["%cstorage", c.STORAGE, _.WIDGET, t, l.message]), {
|
|
3639
3647
|
data: null,
|
|
3640
3648
|
message: `Dashboard ${o.data.id} save error: ${l.message}`,
|
|
3641
3649
|
success: !1
|
|
@@ -3669,7 +3677,7 @@ class Mr {
|
|
|
3669
3677
|
*/
|
|
3670
3678
|
getMessages = async (t) => {
|
|
3671
3679
|
if (t.widget === "")
|
|
3672
|
-
return
|
|
3680
|
+
return K(3, [
|
|
3673
3681
|
"%cget%c %cstorage%c %cmessages",
|
|
3674
3682
|
c.KO,
|
|
3675
3683
|
c.NONE,
|
|
@@ -3685,9 +3693,9 @@ class Mr {
|
|
|
3685
3693
|
};
|
|
3686
3694
|
const o = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
|
|
3687
3695
|
o !== "utc" && (t.since = l - 60 * 60 * 24 * 30), this.options.delay != 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
|
|
3688
|
-
const g = (
|
|
3696
|
+
const g = ($) => $.utc > (t?.since || 0), b = ($) => $.utc < (t?.before || l), x = ($) => $?.visible !== 0;
|
|
3689
3697
|
try {
|
|
3690
|
-
const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(
|
|
3698
|
+
const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(x).filter(g).filter(b).reverse().limit(t?.limit ?? 25).sortBy(o);
|
|
3691
3699
|
if (te.length === 0)
|
|
3692
3700
|
return {
|
|
3693
3701
|
data: null,
|
|
@@ -3705,7 +3713,7 @@ class Mr {
|
|
|
3705
3713
|
message: "Messages retrieved successfully",
|
|
3706
3714
|
success: !0
|
|
3707
3715
|
};
|
|
3708
|
-
return
|
|
3716
|
+
return K(3, [
|
|
3709
3717
|
"%cget%c %cstorage%c %cmessages",
|
|
3710
3718
|
c.OK,
|
|
3711
3719
|
c.NONE,
|
|
@@ -3715,8 +3723,8 @@ class Mr {
|
|
|
3715
3723
|
be
|
|
3716
3724
|
]), be;
|
|
3717
3725
|
});
|
|
3718
|
-
} catch (
|
|
3719
|
-
return
|
|
3726
|
+
} catch ($) {
|
|
3727
|
+
return K(2, [
|
|
3720
3728
|
"%cget%c %cstorage%c %cmessages",
|
|
3721
3729
|
c.OK,
|
|
3722
3730
|
c.NONE,
|
|
@@ -3724,7 +3732,7 @@ class Mr {
|
|
|
3724
3732
|
c.NONE,
|
|
3725
3733
|
c.NO_UPDATES,
|
|
3726
3734
|
t,
|
|
3727
|
-
|
|
3735
|
+
$.message
|
|
3728
3736
|
]), { data: null, message: "Messages Data error", success: !1 };
|
|
3729
3737
|
}
|
|
3730
3738
|
};
|
|
@@ -3762,8 +3770,8 @@ class Mr {
|
|
|
3762
3770
|
utc: b.utc,
|
|
3763
3771
|
data: b,
|
|
3764
3772
|
expires: b.expires
|
|
3765
|
-
}).catch((
|
|
3766
|
-
g++,
|
|
3773
|
+
}).catch((x) => {
|
|
3774
|
+
g++, K(4, [
|
|
3767
3775
|
"%cset%c %cstorage",
|
|
3768
3776
|
c.KO,
|
|
3769
3777
|
c.NONE,
|
|
@@ -3771,7 +3779,7 @@ class Mr {
|
|
|
3771
3779
|
"set message",
|
|
3772
3780
|
`title: ${l}`,
|
|
3773
3781
|
b,
|
|
3774
|
-
|
|
3782
|
+
x.message
|
|
3775
3783
|
]);
|
|
3776
3784
|
}), await this.db.table(_.TOPICS).put({
|
|
3777
3785
|
title: l,
|
|
@@ -3784,8 +3792,8 @@ class Mr {
|
|
|
3784
3792
|
sentiment: b.topics[0]?.sentiment || 0,
|
|
3785
3793
|
utc: b.utc,
|
|
3786
3794
|
expires: b.expires
|
|
3787
|
-
}).catch((
|
|
3788
|
-
g++,
|
|
3795
|
+
}).catch((x) => {
|
|
3796
|
+
g++, K(4, [
|
|
3789
3797
|
"%cset%c %cstorage",
|
|
3790
3798
|
c.KO,
|
|
3791
3799
|
c.NONE,
|
|
@@ -3793,19 +3801,19 @@ class Mr {
|
|
|
3793
3801
|
"set topic",
|
|
3794
3802
|
`title: ${l}`,
|
|
3795
3803
|
b,
|
|
3796
|
-
|
|
3804
|
+
x.message
|
|
3797
3805
|
]);
|
|
3798
|
-
}), await o.data.topics.forEach(async (
|
|
3799
|
-
const
|
|
3800
|
-
await this.db.table(_.TOPICS).where("message_id").equals(
|
|
3801
|
-
g++,
|
|
3806
|
+
}), await o.data.topics.forEach(async (x) => {
|
|
3807
|
+
const $ = x.message_id, te = x.visible ? 1 : 0, ge = x.title;
|
|
3808
|
+
await this.db.table(_.TOPICS).where("message_id").equals($).modify({ visible: te }).catch((Ce) => {
|
|
3809
|
+
g++, K(4, [
|
|
3802
3810
|
"%cset%c %cstorage",
|
|
3803
3811
|
c.KO,
|
|
3804
3812
|
c.NONE,
|
|
3805
3813
|
c.STORAGE,
|
|
3806
3814
|
"update message visibility",
|
|
3807
3815
|
`title: ${ge}`,
|
|
3808
|
-
`widget: ${
|
|
3816
|
+
`widget: ${x.widget_id}`,
|
|
3809
3817
|
Ce.message
|
|
3810
3818
|
]);
|
|
3811
3819
|
});
|
|
@@ -3819,7 +3827,7 @@ class Mr {
|
|
|
3819
3827
|
*/
|
|
3820
3828
|
getSeries = async (t) => {
|
|
3821
3829
|
if (t.widget === "")
|
|
3822
|
-
return
|
|
3830
|
+
return K(3, [
|
|
3823
3831
|
"%cget%c %cstorage%c %cseries",
|
|
3824
3832
|
c.KO,
|
|
3825
3833
|
c.NONE,
|
|
@@ -3834,7 +3842,7 @@ class Mr {
|
|
|
3834
3842
|
query: t
|
|
3835
3843
|
};
|
|
3836
3844
|
const o = await this.db.table(_.SERIES).where({ id: t.widget }).last().catch(() => {
|
|
3837
|
-
|
|
3845
|
+
K(2, [
|
|
3838
3846
|
"%cget%c %cstorage%c %cseries",
|
|
3839
3847
|
c.KO,
|
|
3840
3848
|
c.NONE,
|
|
@@ -3849,7 +3857,7 @@ class Mr {
|
|
|
3849
3857
|
success: o !== void 0,
|
|
3850
3858
|
query: t
|
|
3851
3859
|
};
|
|
3852
|
-
return
|
|
3860
|
+
return K(3, [
|
|
3853
3861
|
"%cget%c %cstorage%c %cseries",
|
|
3854
3862
|
c.OK,
|
|
3855
3863
|
c.NONE,
|
|
@@ -3870,7 +3878,7 @@ class Mr {
|
|
|
3870
3878
|
dashboard_id: t.dashboard,
|
|
3871
3879
|
// data: data.data,
|
|
3872
3880
|
data: o
|
|
3873
|
-
}).then(() => 201).catch((l) => (
|
|
3881
|
+
}).then(() => 201).catch((l) => (K(2, [
|
|
3874
3882
|
"%cset%c %cstorage%c %cseries",
|
|
3875
3883
|
c.KO,
|
|
3876
3884
|
c.NONE,
|
|
@@ -3887,7 +3895,7 @@ class Mr {
|
|
|
3887
3895
|
*/
|
|
3888
3896
|
getWidget = async (t) => {
|
|
3889
3897
|
if (t.id === "")
|
|
3890
|
-
return
|
|
3898
|
+
return K(3, [
|
|
3891
3899
|
"%cget%c %cstorage%c %cwidget",
|
|
3892
3900
|
c.KO,
|
|
3893
3901
|
c.NONE,
|
|
@@ -3916,10 +3924,10 @@ class Mr {
|
|
|
3916
3924
|
* @returns IResponse
|
|
3917
3925
|
*/
|
|
3918
3926
|
getWidgets = async (t) => {
|
|
3919
|
-
const o = (
|
|
3920
|
-
|
|
3927
|
+
const o = (x) => t?.dashboard === x.dashboard_id, l = (x) => t?.type === x.type, g = (x) => t?.name ? x.name.includes(t?.name) : !1, b = await this.db.table(_.WIDGET).toArray().then((x) => t?.dashboard ? x.filter(o) : x).then((x) => t?.type ? x.filter(l) : x).then((x) => t?.name ? x.filter(g) : x).catch(() => {
|
|
3928
|
+
K(2, ["%cstorage", c.STORAGE, X.WIDGET_LOAD, t]);
|
|
3921
3929
|
});
|
|
3922
|
-
return b !== void 0 &&
|
|
3930
|
+
return b !== void 0 && K(3, [
|
|
3923
3931
|
"%cstorage%c %cwidgets",
|
|
3924
3932
|
c.STORAGE,
|
|
3925
3933
|
c.NONE,
|
|
@@ -3991,7 +3999,7 @@ class Mr {
|
|
|
3991
3999
|
*/
|
|
3992
4000
|
getSlide = async (t) => {
|
|
3993
4001
|
const o = await this.db.table(_.SLIDE).where({ id: t.id }).last().catch(() => {
|
|
3994
|
-
|
|
4002
|
+
K(2, ["%cstorage", c.STORAGE, X.SLIDE_LOAD, t.id]);
|
|
3995
4003
|
});
|
|
3996
4004
|
return {
|
|
3997
4005
|
// @ts-ignore
|
|
@@ -4006,12 +4014,12 @@ class Mr {
|
|
|
4006
4014
|
* @returns IResponse
|
|
4007
4015
|
*/
|
|
4008
4016
|
getSlides = async (t) => {
|
|
4009
|
-
const o = (
|
|
4010
|
-
return
|
|
4017
|
+
const o = ($) => t?.id ? $.id = t.id : !1, l = ($) => t?.name ? $.name.includes(t?.name) : !1, g = ($) => t?.presentation_id ? $.presentation_id = t.presentation_id : !1, x = await this.db.table(_.SLIDE).toArray().then(($) => t?.presentation_id ? $.filter(g) : $).then(($) => t?.id ? $.filter(o) : $).then(($) => t?.name ? $.filter(l) : $);
|
|
4018
|
+
return x !== void 0 && K(3, ["%cstorage%c %cslides", c.STORAGE, c.NONE, c.SLIDE, t]), {
|
|
4011
4019
|
// @ts-ignore
|
|
4012
|
-
data:
|
|
4013
|
-
message:
|
|
4014
|
-
success:
|
|
4020
|
+
data: x !== void 0 ? { slides: x, query: t } : null,
|
|
4021
|
+
message: x !== void 0 ? "Slides loaded from storage" : "Slides load error",
|
|
4022
|
+
success: x !== void 0
|
|
4015
4023
|
};
|
|
4016
4024
|
};
|
|
4017
4025
|
/**
|
|
@@ -4069,7 +4077,7 @@ class Mr {
|
|
|
4069
4077
|
*/
|
|
4070
4078
|
getPresentations = async (t) => {
|
|
4071
4079
|
const o = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.PRESENTATION).toArray().then((b) => t?.name ? b.filter(o) : b);
|
|
4072
|
-
return g !== void 0 &&
|
|
4080
|
+
return g !== void 0 && K(3, [
|
|
4073
4081
|
"%cstorage%c %cpresentations",
|
|
4074
4082
|
c.STORAGE,
|
|
4075
4083
|
c.NONE,
|
|
@@ -4114,7 +4122,7 @@ class Mr {
|
|
|
4114
4122
|
*/
|
|
4115
4123
|
getPreference = async (t) => {
|
|
4116
4124
|
const o = await this.db.table(_.PREFERENCE).where({ id: t.id }).last().catch(() => {
|
|
4117
|
-
|
|
4125
|
+
K(2, [
|
|
4118
4126
|
"%cstorage",
|
|
4119
4127
|
c.STORAGE,
|
|
4120
4128
|
X.PREFERENCE_LOAD,
|
|
@@ -4137,7 +4145,7 @@ class Mr {
|
|
|
4137
4145
|
*/
|
|
4138
4146
|
getPreferences = async (t) => {
|
|
4139
4147
|
const o = (b) => t?.id ? t.id = b.id : !1, g = await this.db.table(_.SLIDE).toArray().then((b) => t?.id ? b.filter(o) : b);
|
|
4140
|
-
return g !== void 0 &&
|
|
4148
|
+
return g !== void 0 && K(3, [
|
|
4141
4149
|
"%cstorage%c %cpreferences",
|
|
4142
4150
|
c.STORAGE,
|
|
4143
4151
|
c.NONE,
|
|
@@ -4157,7 +4165,8 @@ class Mr {
|
|
|
4157
4165
|
*/
|
|
4158
4166
|
setPreference = async (t) => await this.db.table(_.PREFERENCE).put({
|
|
4159
4167
|
id: t.id,
|
|
4160
|
-
value: t.value
|
|
4168
|
+
value: t.value,
|
|
4169
|
+
update: t.update
|
|
4161
4170
|
}).then(() => ({
|
|
4162
4171
|
data: null,
|
|
4163
4172
|
message: `Preference ${t.id} saved to storage`,
|
|
@@ -4180,7 +4189,7 @@ class Mr {
|
|
|
4180
4189
|
*/
|
|
4181
4190
|
getImages = async (t) => {
|
|
4182
4191
|
const o = (b) => t?.id ? b.includes(t.id) : !1, g = await this.db.table(_.IMAGES).toArray().then((b) => t?.id ? b.filter(o) : b);
|
|
4183
|
-
return g !== void 0 &&
|
|
4192
|
+
return g !== void 0 && K(3, [
|
|
4184
4193
|
"%cstorage%c %cimages",
|
|
4185
4194
|
c.STORAGE,
|
|
4186
4195
|
c.NONE,
|
|
@@ -4237,7 +4246,7 @@ function Ka(h, t) {
|
|
|
4237
4246
|
}, () => {
|
|
4238
4247
|
}), o;
|
|
4239
4248
|
};
|
|
4240
|
-
return (g, b) => l().then((
|
|
4249
|
+
return (g, b) => l().then((x) => b(x.transaction(t, g).objectStore(t)));
|
|
4241
4250
|
}
|
|
4242
4251
|
let Un;
|
|
4243
4252
|
function Gr() {
|
|
@@ -5559,7 +5568,7 @@ class Ja {
|
|
|
5559
5568
|
subscribers = [];
|
|
5560
5569
|
// private temp: {[x:string]:any} = []
|
|
5561
5570
|
constructor(t) {
|
|
5562
|
-
|
|
5571
|
+
K(3, [
|
|
5563
5572
|
"%cpresentation",
|
|
5564
5573
|
c.PRESENTATION,
|
|
5565
5574
|
t.presentation,
|
|
@@ -5567,7 +5576,7 @@ class Ja {
|
|
|
5567
5576
|
xa
|
|
5568
5577
|
]), this.options = t, this.sm = null;
|
|
5569
5578
|
const o = t.presentation;
|
|
5570
|
-
switch (this.bc = new BroadcastChannel(o),
|
|
5579
|
+
switch (this.bc = new BroadcastChannel(o), K(3, ["%cchannel%c %capi", c.BROADCAST, c.NONE, c.API, o]), this.bc.onmessage = (l) => {
|
|
5571
5580
|
this.actions(l);
|
|
5572
5581
|
}, this.bc.postMessage({ event: X.STORAGE_INIT, data: {} }), this.api = new ka(t), t.storage) {
|
|
5573
5582
|
case he.DEXIE:
|
|
@@ -5609,10 +5618,10 @@ class Ja {
|
|
|
5609
5618
|
let b = "";
|
|
5610
5619
|
switch (t.query.type) {
|
|
5611
5620
|
case _.MESSAGES:
|
|
5612
|
-
let
|
|
5613
|
-
|
|
5614
|
-
(
|
|
5615
|
-
), t.data.messages =
|
|
5621
|
+
let x;
|
|
5622
|
+
x = t.data.messages.filter(
|
|
5623
|
+
($) => $.id !== null
|
|
5624
|
+
), t.data.messages = x, b = t.data.messages.length > 0 ? Fn(t.data.messages[0].utc) : "none", g?.hash && g.hash === b ? (K(3, [
|
|
5616
5625
|
"%cload%c %cmessages%c %cno updates",
|
|
5617
5626
|
c.OK,
|
|
5618
5627
|
c.NONE,
|
|
@@ -5620,10 +5629,10 @@ class Ja {
|
|
|
5620
5629
|
c.NONE,
|
|
5621
5630
|
c.NO_UPDATES,
|
|
5622
5631
|
t.query.widget
|
|
5623
|
-
]),
|
|
5632
|
+
]), K(4, ["%cmessages", c.MESSAGES, t]), l = 204) : (o = t, g.hash = b, l = await this.sm?.setMessages(t.query, t).then(async ($) => ($ = 201, this.broadcastUpdate($, t))));
|
|
5624
5633
|
break;
|
|
5625
5634
|
case _.CLOUD:
|
|
5626
|
-
b = Fn(t.data.cloud), g?.hash && g.hash === b ? (
|
|
5635
|
+
b = Fn(t.data.cloud), g?.hash && g.hash === b ? (K(3, [
|
|
5627
5636
|
"%cload%c %ccloud%c %cno updates",
|
|
5628
5637
|
c.OK,
|
|
5629
5638
|
c.NONE,
|
|
@@ -5631,17 +5640,17 @@ class Ja {
|
|
|
5631
5640
|
c.NONE,
|
|
5632
5641
|
c.NO_UPDATES,
|
|
5633
5642
|
t.query.widget
|
|
5634
|
-
]),
|
|
5643
|
+
]), K(4, ["%ccloud", c.CLOUD, t.query]), l = 204) : (g.hash = b, o = {
|
|
5635
5644
|
data: {
|
|
5636
5645
|
cloud: t.data
|
|
5637
5646
|
},
|
|
5638
5647
|
message: t.message,
|
|
5639
5648
|
success: t.success,
|
|
5640
5649
|
query: t.query
|
|
5641
|
-
}, l = await this.sm?.setCloud(t.query, o.data).then((
|
|
5650
|
+
}, l = await this.sm?.setCloud(t.query, o.data).then(($) => this.broadcastUpdate($, t)));
|
|
5642
5651
|
break;
|
|
5643
5652
|
case _.SERIES:
|
|
5644
|
-
b = Fn(t.data.series), g?.hash && g.hash === b ? (
|
|
5653
|
+
b = Fn(t.data.series), g?.hash && g.hash === b ? (K(3, [
|
|
5645
5654
|
"%cload%c %cseries%c %cno updates",
|
|
5646
5655
|
c.OK,
|
|
5647
5656
|
c.NONE,
|
|
@@ -5649,15 +5658,15 @@ class Ja {
|
|
|
5649
5658
|
c.NONE,
|
|
5650
5659
|
c.NO_UPDATES,
|
|
5651
5660
|
t.query.widget
|
|
5652
|
-
]),
|
|
5661
|
+
]), K(4, ["%cseries", c.SERIES, t]), l = 204) : (g.hash = b, o = {
|
|
5653
5662
|
data: t.data,
|
|
5654
5663
|
message: t.message,
|
|
5655
5664
|
success: t.success,
|
|
5656
5665
|
query: t.query
|
|
5657
|
-
}, l = await this.sm?.setSeries(t.query, t.data).then((
|
|
5666
|
+
}, l = await this.sm?.setSeries(t.query, t.data).then(($) => this.broadcastUpdate($, t)));
|
|
5658
5667
|
break;
|
|
5659
5668
|
default:
|
|
5660
|
-
return
|
|
5669
|
+
return K(4, [
|
|
5661
5670
|
"%cfetch%c %capi%c %cno updates",
|
|
5662
5671
|
c.KO,
|
|
5663
5672
|
c.NONE,
|
|
@@ -5668,7 +5677,7 @@ class Ja {
|
|
|
5668
5677
|
]), t;
|
|
5669
5678
|
}
|
|
5670
5679
|
} else
|
|
5671
|
-
switch (
|
|
5680
|
+
switch (K(4, [
|
|
5672
5681
|
`%cload%c %c${t.query}%c %bad request`,
|
|
5673
5682
|
c.KO,
|
|
5674
5683
|
c.NONE,
|
|
@@ -5695,7 +5704,7 @@ class Ja {
|
|
|
5695
5704
|
broadcastUpdate = (t, o) => {
|
|
5696
5705
|
switch (t) {
|
|
5697
5706
|
case 201:
|
|
5698
|
-
|
|
5707
|
+
K(3, [
|
|
5699
5708
|
`%cupdate%c %cwidget%c %c${o.query?.type}`,
|
|
5700
5709
|
c.BROADCAST,
|
|
5701
5710
|
c.NONE,
|
|
@@ -5704,7 +5713,7 @@ class Ja {
|
|
|
5704
5713
|
kr(o.query),
|
|
5705
5714
|
// @ts-ignore
|
|
5706
5715
|
`${o.data?.title ?? ""} ${o.query.widget}`
|
|
5707
|
-
]),
|
|
5716
|
+
]), K(4, [
|
|
5708
5717
|
"%cevent",
|
|
5709
5718
|
c.BROADCAST,
|
|
5710
5719
|
// @ts-ignore
|
|
@@ -5717,7 +5726,7 @@ class Ja {
|
|
|
5717
5726
|
case 204:
|
|
5718
5727
|
break;
|
|
5719
5728
|
default:
|
|
5720
|
-
|
|
5729
|
+
K(2, [
|
|
5721
5730
|
`%cupdate%c %cwidget%c %c${o.query?.type}`,
|
|
5722
5731
|
c.KO,
|
|
5723
5732
|
c.NONE,
|
|
@@ -5740,7 +5749,7 @@ class Ja {
|
|
|
5740
5749
|
this.addSubscriber(t.data.data);
|
|
5741
5750
|
break;
|
|
5742
5751
|
case X.UPDATE:
|
|
5743
|
-
|
|
5752
|
+
K(3, [
|
|
5744
5753
|
"%cupdate%c %capi%c %cstorage",
|
|
5745
5754
|
c.BROADCAST,
|
|
5746
5755
|
c.NONE,
|
|
@@ -5754,7 +5763,7 @@ class Ja {
|
|
|
5754
5763
|
};
|
|
5755
5764
|
cleanMessages = async () => {
|
|
5756
5765
|
if (this.options?.suspended) {
|
|
5757
|
-
|
|
5766
|
+
K(2, [
|
|
5758
5767
|
"%cclean%c %cstorage%c %cmessages",
|
|
5759
5768
|
c.KO,
|
|
5760
5769
|
c.NONE,
|
|
@@ -5768,7 +5777,7 @@ class Ja {
|
|
|
5768
5777
|
const t = this.options?.retention || 86400 * 4, o = await this.sm?.cleanMessages(
|
|
5769
5778
|
t
|
|
5770
5779
|
);
|
|
5771
|
-
|
|
5780
|
+
K(3, [
|
|
5772
5781
|
"%cclean%c %cstorage%c %cmessages",
|
|
5773
5782
|
c.OK,
|
|
5774
5783
|
c.NONE,
|
|
@@ -5780,7 +5789,7 @@ class Ja {
|
|
|
5780
5789
|
};
|
|
5781
5790
|
hideMessage = async (t) => {
|
|
5782
5791
|
const o = await this.sm?.hideMessage(t.id, 0);
|
|
5783
|
-
return
|
|
5792
|
+
return K(3, [
|
|
5784
5793
|
"%chide%c %cstorage%c %cmessages",
|
|
5785
5794
|
c.OK,
|
|
5786
5795
|
c.NONE,
|
|
@@ -5941,7 +5950,7 @@ class Za {
|
|
|
5941
5950
|
try {
|
|
5942
5951
|
if (l.dashboard === t.dashboard && l.widget === t.widget) {
|
|
5943
5952
|
const g = await this.getData();
|
|
5944
|
-
g?.success && (
|
|
5953
|
+
g?.success && (K(4, [
|
|
5945
5954
|
"%cset%c %cbroadcast%c %cwidget",
|
|
5946
5955
|
c.OK,
|
|
5947
5956
|
c.NONE,
|
|
@@ -5954,7 +5963,7 @@ class Za {
|
|
|
5954
5963
|
}));
|
|
5955
5964
|
}
|
|
5956
5965
|
} catch {
|
|
5957
|
-
|
|
5966
|
+
K(4, [X.WIDGET_UPDATE, l]);
|
|
5958
5967
|
}
|
|
5959
5968
|
break;
|
|
5960
5969
|
case X.APP_READY:
|
|
@@ -5968,14 +5977,14 @@ class Za {
|
|
|
5968
5977
|
* This takes place when the container indicates it has finished loading (ready)
|
|
5969
5978
|
*/
|
|
5970
5979
|
subscribe() {
|
|
5971
|
-
|
|
5980
|
+
K(3, [
|
|
5972
5981
|
"%csubscribe%c %cwidget",
|
|
5973
5982
|
c.SUBSCRIBE,
|
|
5974
5983
|
c.NONE,
|
|
5975
5984
|
c.WIDGET,
|
|
5976
5985
|
this.query.presentation,
|
|
5977
5986
|
this.query.widget
|
|
5978
|
-
]),
|
|
5987
|
+
]), K(4, ["%cwidget", c.WIDGET, this.query]), this.broadcastChannel.postMessage({
|
|
5979
5988
|
event: X.SUBSCRIBE,
|
|
5980
5989
|
data: this.query
|
|
5981
5990
|
});
|
|
@@ -6006,7 +6015,7 @@ class Za {
|
|
|
6006
6015
|
*
|
|
6007
6016
|
* @returns IResponse
|
|
6008
6017
|
*/
|
|
6009
|
-
getCloud = async () => this.query.type !== _.CLOUD ? (
|
|
6018
|
+
getCloud = async () => this.query.type !== _.CLOUD ? (K(3, [
|
|
6010
6019
|
"%cget%c %cstorage%c %cwidget",
|
|
6011
6020
|
c.KO,
|
|
6012
6021
|
c.NONE,
|
|
@@ -6016,7 +6025,7 @@ class Za {
|
|
|
6016
6025
|
this.query.widget,
|
|
6017
6026
|
"Wrong method call for getCloud, expected type is",
|
|
6018
6027
|
this.query.type
|
|
6019
|
-
]),
|
|
6028
|
+
]), K(4, ["%ccloud", c.CLOUD, this.query]), {
|
|
6020
6029
|
data: null,
|
|
6021
6030
|
message: `wrong method call for getCloud, expected type is '${this.query.type}'`,
|
|
6022
6031
|
success: !1,
|
|
@@ -6027,7 +6036,7 @@ class Za {
|
|
|
6027
6036
|
*
|
|
6028
6037
|
* @returns IResponse
|
|
6029
6038
|
*/
|
|
6030
|
-
getMessages = async () => this.query.type !== _.MESSAGES ? (
|
|
6039
|
+
getMessages = async () => this.query.type !== _.MESSAGES ? (K(3, [
|
|
6031
6040
|
"%cget%c %cstorage%c %cwidget",
|
|
6032
6041
|
c.KO,
|
|
6033
6042
|
c.NONE,
|
|
@@ -6037,7 +6046,7 @@ class Za {
|
|
|
6037
6046
|
this.query.widget,
|
|
6038
6047
|
"Wrong method call for getMessages, expected type is",
|
|
6039
6048
|
this.query.type
|
|
6040
|
-
]),
|
|
6049
|
+
]), K(4, ["%cmessages", c.MESSAGES, this.query]), {
|
|
6041
6050
|
data: null,
|
|
6042
6051
|
message: `wrong method call for getMessages, expected type is '${this.query.type}'`,
|
|
6043
6052
|
success: !1
|
|
@@ -6047,7 +6056,7 @@ class Za {
|
|
|
6047
6056
|
*
|
|
6048
6057
|
* @returns IResponse
|
|
6049
6058
|
*/
|
|
6050
|
-
getSeries = async () => this.query.type !== _.SERIES ? (
|
|
6059
|
+
getSeries = async () => this.query.type !== _.SERIES ? (K(3, [
|
|
6051
6060
|
"%cget%c %cstorage%c %cwidget",
|
|
6052
6061
|
c.KO,
|
|
6053
6062
|
c.NONE,
|
|
@@ -6057,7 +6066,7 @@ class Za {
|
|
|
6057
6066
|
this.query.widget,
|
|
6058
6067
|
"Wrong method call for getSeries, expected type is",
|
|
6059
6068
|
this.query.type
|
|
6060
|
-
]),
|
|
6069
|
+
]), K(4, ["%cseries", this.query]), {
|
|
6061
6070
|
data: null,
|
|
6062
6071
|
message: `wrong method call for getSeries, expected type is '${this.query.type}'`,
|
|
6063
6072
|
success: !1,
|
|
@@ -6070,7 +6079,7 @@ class Za {
|
|
|
6070
6079
|
* @param modal IModal
|
|
6071
6080
|
*/
|
|
6072
6081
|
showModal = (t) => {
|
|
6073
|
-
|
|
6082
|
+
K(3, [
|
|
6074
6083
|
"%cwidget",
|
|
6075
6084
|
c.WIDGET,
|
|
6076
6085
|
X.SHOW_MODAL,
|