buzzcasting-storage 2.14.1 → 2.14.3

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 xa = Object.defineProperty;
2
2
  var ka = (h, r, c) => r in h ? xa(h, r, { enumerable: !0, configurable: !0, writable: !0, value: c }) : h[r] = c;
3
3
  var A = (h, r, c) => ka(h, typeof r != "symbol" ? r + "" : r, c);
4
- const Aa = "2.14.1";
4
+ const Aa = "2.14.3";
5
5
  class Da {
6
6
  constructor(r) {
7
7
  A(this, "options");
@@ -30,9 +30,9 @@ class Da {
30
30
  this.options = r, this.url = `https://${r.app}.buzzcasting.net`;
31
31
  }
32
32
  async get(r) {
33
- const { version: c } = this.options, l = this.headers(), x = Object.assign({}, r);
34
- delete x.slide, delete x.type, delete x.hash;
35
- const P = Object.keys(x).length > 0 ? `?${new URLSearchParams(x).toString()}` : "";
33
+ const { version: c } = this.options, l = this.headers(), k = Object.assign({}, r);
34
+ delete k.slide, delete k.type, delete k.hash;
35
+ const D = Object.keys(k).length > 0 ? `?${new URLSearchParams(k).toString()}` : "";
36
36
  return console.debug(
37
37
  "%capi%c %cget",
38
38
  S.API,
@@ -41,7 +41,7 @@ class Da {
41
41
  r.slide,
42
42
  r.widget
43
43
  ), await fetch(
44
- [this.url, "api", c, r.type].join("/") + P,
44
+ [this.url, "api", c, r.type].join("/") + D,
45
45
  { ...l, method: "get" }
46
46
  ).then(async (T) => {
47
47
  if (!T.ok)
@@ -50,39 +50,39 @@ class Da {
50
50
  }).then((T) => T.json()).then((T) => (T.query = r, T)).catch((T) => ({ success: !1, message: `${T}`, data: null }));
51
51
  }
52
52
  async hideMessage(r) {
53
- const { version: c } = this.options, l = this.headers(), x = "?action=visible";
53
+ const { version: c } = this.options, l = this.headers(), k = "?action=visible";
54
54
  return console.info(
55
55
  "%capi%c %cput",
56
56
  S.API,
57
57
  S.NONE,
58
58
  S.GET_DATA,
59
- te.HIDE_MESSAGE,
59
+ ne.HIDE_MESSAGE,
60
60
  r.widget,
61
61
  r.id
62
62
  ), await fetch(
63
- [this.url, "api", c, r.type, r.id].join("/") + x,
63
+ [this.url, "api", c, r.type, r.id].join("/") + k,
64
64
  { ...l, method: "put" }
65
- ).then((P) => {
66
- if (!P.ok)
67
- throw new Error(P.statusText);
68
- return P;
69
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
65
+ ).then((D) => {
66
+ if (!D.ok)
67
+ throw new Error(D.statusText);
68
+ return D;
69
+ }).then((D) => D.json()).catch((D) => ({ succes: !1, message: D, data: [] }));
70
70
  }
71
71
  async hideLabels(r) {
72
- const { version: c } = this.options, l = this.formHeaders(), x = new URLSearchParams(), P = r.labels || [];
73
- for (const [T, B] of P.entries())
74
- x.append(`custom_filters[${T}]`, B);
72
+ const { version: c } = this.options, l = this.formHeaders(), k = new URLSearchParams(), D = r.labels || [];
73
+ for (const [T, B] of D.entries())
74
+ k.append(`custom_filters[${T}]`, B);
75
75
  return console.info(
76
76
  "%capi%c %cput",
77
77
  S.API,
78
78
  S.NONE,
79
79
  S.GET_DATA,
80
- te.HIDE_LABELS,
80
+ ne.HIDE_LABELS,
81
81
  r.widget,
82
- P
82
+ D
83
83
  ), await fetch(
84
84
  [this.url, "api", c, r.type, r.widget].join("/"),
85
- { ...l, body: x, method: "put" }
85
+ { ...l, body: k, method: "put" }
86
86
  ).then((T) => {
87
87
  if (!T.ok)
88
88
  throw new Error(T.statusText);
@@ -90,18 +90,18 @@ class Da {
90
90
  }).then((T) => T.json()).catch((T) => ({ succes: !1, message: T, data: [] }));
91
91
  }
92
92
  async loadSlide(r) {
93
- const { version: c } = this.options, l = this.headers(), x = Object.assign({}, r);
94
- delete x.slide, delete x.type, delete x.hash;
95
- const P = Object.keys(x).length > 0 ? `?${new URLSearchParams(x).toString()}` : "";
93
+ const { version: c } = this.options, l = this.headers(), k = Object.assign({}, r);
94
+ delete k.slide, delete k.type, delete k.hash;
95
+ const D = Object.keys(k).length > 0 ? `?${new URLSearchParams(k).toString()}` : "";
96
96
  return console.debug(
97
97
  "%capi%c %cget",
98
98
  S.API,
99
99
  S.NONE,
100
100
  S.SLIDE,
101
- te.SLIDE_LOAD,
101
+ ne.SLIDE_LOAD,
102
102
  r.slide
103
103
  ), await fetch(
104
- [this.url, "api", c, r.type].join("/") + P,
104
+ [this.url, "api", c, r.type].join("/") + D,
105
105
  { ...l, method: "get" }
106
106
  ).then(async (T) => {
107
107
  if (!T.ok)
@@ -117,22 +117,22 @@ class Da {
117
117
  * @returns
118
118
  */
119
119
  async storeSlide(r) {
120
- const { version: c } = this.options, l = this.formHeaders(), x = JSON.stringify(r.data);
120
+ const { version: c } = this.options, l = this.formHeaders(), k = JSON.stringify(r.data);
121
121
  return console.info(
122
122
  "%capi%c %cput",
123
123
  S.API,
124
124
  S.NONE,
125
125
  S.SLIDE,
126
- te.SLIDE_STORE,
126
+ ne.SLIDE_STORE,
127
127
  r.id
128
128
  ), await fetch(
129
129
  [this.url, "api", c, r.type, r.id].join("/"),
130
- { ...l, body: x, method: "put" }
131
- ).then((P) => {
132
- if (!P.ok)
133
- throw new Error(P.statusText);
134
- return P;
135
- }).then((P) => P.json()).catch((P) => ({ succes: !1, message: P, data: [] }));
130
+ { ...l, body: k, method: "put" }
131
+ ).then((D) => {
132
+ if (!D.ok)
133
+ throw new Error(D.statusText);
134
+ return D;
135
+ }).then((D) => D.json()).catch((D) => ({ succes: !1, message: D, data: [] }));
136
136
  }
137
137
  }
138
138
  var Rr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -156,29 +156,29 @@ var jr = { exports: {} };
156
156
  return e;
157
157
  }).apply(this, arguments);
158
158
  };
159
- function x(e, t, n) {
159
+ function k(e, t, n) {
160
160
  for (var a, i = 0, o = t.length; i < o; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
161
161
  return e.concat(a || Array.prototype.slice.call(t));
162
162
  }
163
- var P = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr, T = Object.keys, B = Array.isArray;
164
- function Z(e, t) {
163
+ var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Rr, T = Object.keys, B = Array.isArray;
164
+ function J(e, t) {
165
165
  return typeof t != "object" || T(t).forEach(function(n) {
166
166
  e[n] = t[n];
167
167
  }), e;
168
168
  }
169
- typeof Promise > "u" || P.Promise || (P.Promise = Promise);
170
- var ne = Object.getPrototypeOf, be = {}.hasOwnProperty;
169
+ typeof Promise > "u" || D.Promise || (D.Promise = Promise);
170
+ var q = Object.getPrototypeOf, be = {}.hasOwnProperty;
171
171
  function ie(e, t) {
172
172
  return be.call(e, t);
173
173
  }
174
174
  function xe(e, t) {
175
- typeof t == "function" && (t = t(ne(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
175
+ typeof t == "function" && (t = t(q(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
176
176
  ke(e, n, t[n]);
177
177
  });
178
178
  }
179
179
  var zn = Object.defineProperty;
180
180
  function ke(e, t, n, a) {
181
- zn(e, t, Z(n && ie(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
181
+ zn(e, t, J(n && ie(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
182
182
  }
183
183
  function ze(e) {
184
184
  return { from: function(t) {
@@ -196,7 +196,7 @@ var jr = { exports: {} };
196
196
  if (!e) throw new Error("Assertion Failed");
197
197
  }
198
198
  function Yn(e) {
199
- P.setImmediate ? setImmediate(e) : setTimeout(e, 0);
199
+ D.setImmediate ? setImmediate(e) : setTimeout(e, 0);
200
200
  }
201
201
  function ve(e, t) {
202
202
  if (typeof t == "string" && ie(e, t)) return e[t];
@@ -237,9 +237,9 @@ var jr = { exports: {} };
237
237
  return t + e + "Array";
238
238
  });
239
239
  }))).filter(function(e) {
240
- return P[e];
240
+ return D[e];
241
241
  }), Vn = new Set(Se.map(function(e) {
242
- return P[e];
242
+ return D[e];
243
243
  })), at = null;
244
244
  function je(e) {
245
245
  return at = /* @__PURE__ */ new WeakMap(), e = function t(n) {
@@ -251,7 +251,7 @@ var jr = { exports: {} };
251
251
  for (var i = 0, o = n.length; i < o; ++i) a.push(t(n[i]));
252
252
  } else if (Vn.has(n.constructor)) a = n;
253
253
  else {
254
- var s, u = ne(n);
254
+ var s, u = q(n);
255
255
  for (s in a = u === Object.prototype ? {} : Object.create(u), at.set(n, a), n) ie(n, s) && (a[s] = t(n[s]));
256
256
  }
257
257
  return a;
@@ -366,9 +366,9 @@ var jr = { exports: {} };
366
366
  function Zr(e, t) {
367
367
  return e === Q ? t : function(n) {
368
368
  var a = e.apply(this, arguments);
369
- Z(n, a);
369
+ J(n, a);
370
370
  var i = this.onsuccess, o = this.onerror;
371
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? Ke(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Ke(o, this.onerror) : o), a === void 0 ? n === void 0 ? void 0 : n : Z(a, n);
371
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? Ke(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? Ke(o, this.onerror) : o), a === void 0 ? n === void 0 ? void 0 : n : J(a, n);
372
372
  };
373
373
  }
374
374
  function qr(e, t) {
@@ -395,9 +395,9 @@ var jr = { exports: {} };
395
395
  }
396
396
  var ot = {}, er = 100, Se = typeof Promise > "u" ? [] : function() {
397
397
  var e = Promise.resolve();
398
- if (typeof crypto > "u" || !crypto.subtle) return [e, ne(e), e];
398
+ if (typeof crypto > "u" || !crypto.subtle) return [e, q(e), e];
399
399
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
400
- return [t, ne(t), e];
400
+ return [t, q(t), e];
401
401
  }(), st = Se[0], fe = Se[1], Se = Se[2], fe = fe && fe.then, ct = st && st.constructor, an = !!Se, ut = function(e, t) {
402
402
  lt.push([e, t]), xt && (queueMicrotask(ta), xt = !1);
403
403
  }, on = !0, xt = !0, Ne = [], kt = [], sn = it, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, L = Ae, lt = [], Be = 0, At = [];
@@ -507,7 +507,7 @@ var jr = { exports: {} };
507
507
  function Dt(e) {
508
508
  return new N(ot, !1, e);
509
509
  }
510
- function J(e, t) {
510
+ function Z(e, t) {
511
511
  var n = L;
512
512
  return function() {
513
513
  var a = Xe(), i = L;
@@ -632,7 +632,7 @@ var jr = { exports: {} };
632
632
  var re = { awaits: 0, echoes: 0, id: 0 }, na = 0, Pt = [], It = 0, Ct = 0, ra = 0;
633
633
  function De(e, t, n, a) {
634
634
  var i = L, o = Object.create(i);
635
- return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Ae.env, o.env = an ? { Promise: N, PromiseProp: { value: N, configurable: !0, writable: !0 }, all: N.all, race: N.race, allSettled: N.allSettled, any: N.any, resolve: N.resolve, reject: N.reject } : {}, t && Z(o, t), ++i.ref, o.finalize = function() {
635
+ return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Ae.env, o.env = an ? { Promise: N, PromiseProp: { value: N, configurable: !0, writable: !0 }, all: N.all, race: N.race, allSettled: N.allSettled, any: N.any, resolve: N.resolve, reject: N.reject } : {}, t && J(o, t), ++i.ref, o.finalize = function() {
636
636
  --this.parent.ref || this.parent.finalize();
637
637
  }, a = Le(o, e, n, a), o.ref === 0 && o.finalize(), a;
638
638
  }
@@ -646,7 +646,7 @@ var jr = { exports: {} };
646
646
  return re.echoes && e && e.constructor === ct ? (Je(), e.then(function(t) {
647
647
  return Pe(), t;
648
648
  }, function(t) {
649
- return Pe(), q(t);
649
+ return Pe(), ee(t);
650
650
  })) : e;
651
651
  }
652
652
  function aa() {
@@ -657,11 +657,11 @@ var jr = { exports: {} };
657
657
  var n, a = L;
658
658
  (t ? !re.echoes || It++ && e === L : !It || --It && e === L) || queueMicrotask(t ? (function(i) {
659
659
  ++Ct, re.echoes && --re.echoes != 0 || (re.echoes = re.awaits = re.id = 0), Pt.push(L), Ie(i, !0);
660
- }).bind(null, e) : aa), e !== L && (L = e, a === Ae && (Ae.env = rr()), an && (n = Ae.env.Promise, t = e.env, (a.global || e.global) && (Object.defineProperty(P, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
660
+ }).bind(null, e) : aa), e !== L && (L = e, a === Ae && (Ae.env = rr()), an && (n = Ae.env.Promise, t = e.env, (a.global || e.global) && (Object.defineProperty(D, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
661
661
  }
662
662
  function rr() {
663
- var e = P.Promise;
664
- return an ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(P, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
663
+ var e = D.Promise;
664
+ return an ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(D, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
665
665
  }
666
666
  function Le(e, t, n, a, i) {
667
667
  var o = L;
@@ -686,7 +686,7 @@ var jr = { exports: {} };
686
686
  Promise === ct && re.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
687
687
  }
688
688
  ("" + fe).indexOf("[native code]") === -1 && (Je = Pe = Q);
689
- var q = N.reject, Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
689
+ var ee = N.reject, Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
690
690
  function $e(e, t) {
691
691
  return e ? t ? function() {
692
692
  return e.apply(this, arguments) && t.apply(this, arguments);
@@ -755,7 +755,7 @@ var jr = { exports: {} };
755
755
  } catch (w) {
756
756
  return w.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
757
757
  return f(b, d, v, p);
758
- })) : q(w);
758
+ })) : ee(w);
759
759
  }
760
760
  return m._promise(d, function(w, y) {
761
761
  return De(function() {
@@ -771,9 +771,9 @@ var jr = { exports: {} };
771
771
  });
772
772
  });
773
773
  }
774
- if (b._state.openComplete) return q(new G.DatabaseClosed(b._state.dbOpenError));
774
+ if (b._state.openComplete) return ee(new G.DatabaseClosed(b._state.dbOpenError));
775
775
  if (!b._state.isBeingOpened) {
776
- if (!b._state.autoOpen) return q(new G.DatabaseClosed());
776
+ if (!b._state.autoOpen) return ee(new G.DatabaseClosed());
777
777
  b.open().catch(Q);
778
778
  }
779
779
  return b._state.dbReadyPromise.then(function() {
@@ -781,14 +781,14 @@ var jr = { exports: {} };
781
781
  });
782
782
  }(this.db, e, [this.name], s);
783
783
  return o && (g._consoleTask = o, g = g.catch(function(f) {
784
- return console.trace(f), q(f);
784
+ return console.trace(f), ee(f);
785
785
  })), g;
786
786
  } finally {
787
787
  u && Ve();
788
788
  }
789
789
  }, V.prototype.get = function(e, t) {
790
790
  var n = this;
791
- return e && e.constructor === Object ? this.where(e).first(t) : e == null ? q(new G.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
791
+ return e && e.constructor === Object ? this.where(e).first(t) : e == null ? ee(new G.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
792
792
  return n.core.get({ trans: a, key: e }).then(function(i) {
793
793
  return n.hook.reading.fire(i);
794
794
  });
@@ -865,7 +865,7 @@ var jr = { exports: {} };
865
865
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
866
866
  return a;
867
867
  }, e = i);
868
- for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = ne(s)) Object.getOwnPropertyNames(s).forEach(function(g) {
868
+ for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = q(s)) Object.getOwnPropertyNames(s).forEach(function(g) {
869
869
  return o.add(g);
870
870
  });
871
871
  function u(g) {
@@ -880,7 +880,7 @@ var jr = { exports: {} };
880
880
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = u, this.hook("reading", u), e;
881
881
  }, V.prototype.defineClass = function() {
882
882
  return this.mapToClass(function(e) {
883
- Z(this, e);
883
+ J(this, e);
884
884
  });
885
885
  }, V.prototype.add = function(e, t) {
886
886
  var n = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, s = e;
@@ -896,7 +896,7 @@ var jr = { exports: {} };
896
896
  return u;
897
897
  });
898
898
  }, V.prototype.update = function(e, t) {
899
- return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
899
+ return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? ee(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
900
900
  }, V.prototype.put = function(e, t) {
901
901
  var n = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, s = e;
902
902
  return o && i && (s = jt(o)(e)), this._trans("readwrite", function(u) {
@@ -1087,7 +1087,7 @@ var jr = { exports: {} };
1087
1087
  return fr(dr(e, a, n), $e(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
1088
1088
  }
1089
1089
  function fr(e, t, n, a) {
1090
- var i = J(a ? function(o, s, u) {
1090
+ var i = Z(a ? function(o, s, u) {
1091
1091
  return n(a(o), s, u);
1092
1092
  } : n);
1093
1093
  return e.then(function(o) {
@@ -1110,7 +1110,7 @@ var jr = { exports: {} };
1110
1110
  var Se = Symbol(), ht = (hr.prototype.execute = function(e) {
1111
1111
  if (this.add !== void 0) {
1112
1112
  var t = this.add;
1113
- if (B(t)) return x(x([], B(e) ? e : [], !0), t).sort();
1113
+ if (B(t)) return k(k([], B(e) ? e : [], !0), t).sort();
1114
1114
  if (typeof t == "number") return (Number(e) || 0) + t;
1115
1115
  if (typeof t == "bigint") try {
1116
1116
  return BigInt(e) + t;
@@ -1139,10 +1139,10 @@ var jr = { exports: {} };
1139
1139
  }
1140
1140
  var ia = (Y.prototype._read = function(e, t) {
1141
1141
  var n = this._ctx;
1142
- return n.error ? n.table._trans(null, q.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1142
+ return n.error ? n.table._trans(null, ee.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1143
1143
  }, Y.prototype._write = function(e) {
1144
1144
  var t = this._ctx;
1145
- return t.error ? t.table._trans(null, q.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1145
+ return t.error ? t.table._trans(null, ee.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1146
1146
  }, Y.prototype._addAlgorithm = function(e) {
1147
1147
  var t = this._ctx;
1148
1148
  t.algorithm = $e(t.algorithm, e);
@@ -1150,7 +1150,7 @@ var jr = { exports: {} };
1150
1150
  return Kt(this._ctx, e, t, this._ctx.table.core);
1151
1151
  }, Y.prototype.clone = function(e) {
1152
1152
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1153
- return e && Z(n, e), t._ctx = n, t;
1153
+ return e && J(n, e), t._ctx = n, t;
1154
1154
  }, Y.prototype.raw = function() {
1155
1155
  return this._ctx.valueMapper = null, this;
1156
1156
  }, Y.prototype.each = function(e) {
@@ -1304,27 +1304,27 @@ var jr = { exports: {} };
1304
1304
  var i, o, s;
1305
1305
  s = typeof e == "function" ? e : (i = T(e), o = i.length, function(y) {
1306
1306
  for (var _ = !1, E = 0; E < o; ++E) {
1307
- var O = i[E], k = e[O], I = ve(y, O);
1308
- k instanceof ht ? (le(y, O, k.execute(I)), _ = !0) : I !== k && (le(y, O, k), _ = !0);
1307
+ var O = i[E], x = e[O], I = ve(y, O);
1308
+ x instanceof ht ? (le(y, O, x.execute(I)), _ = !0) : I !== x && (le(y, O, x), _ = !0);
1309
1309
  }
1310
1310
  return _;
1311
1311
  });
1312
1312
  function u(y, O) {
1313
1313
  var E = O.failures, O = O.numFailures;
1314
1314
  m += y - O;
1315
- for (var k = 0, I = T(E); k < I.length; k++) {
1316
- var j = I[k];
1315
+ for (var x = 0, I = T(E); x < I.length; x++) {
1316
+ var j = I[x];
1317
1317
  p.push(E[j]);
1318
1318
  }
1319
1319
  }
1320
1320
  var g = n.table.core, f = g.schema.primaryKey, b = f.outbound, d = f.extractKey, v = t.db._options.modifyChunkSize || 200, p = [], m = 0, w = [];
1321
1321
  return t.clone().primaryKeys().then(function(y) {
1322
1322
  function _(O) {
1323
- var k = Math.min(v, y.length - O);
1324
- return g.getMany({ trans: a, keys: y.slice(O, O + k), cache: "immutable" }).then(function(I) {
1325
- for (var j = [], C = [], R = b ? [] : null, M = [], D = 0; D < k; ++D) {
1326
- var $ = I[D], F = { value: je($), primKey: y[O + D] };
1327
- s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + D]) : b || H(d($), d(F.value)) === 0 ? (C.push(F.value), b && R.push(y[O + D])) : (M.push(y[O + D]), j.push(F.value)));
1323
+ var x = Math.min(v, y.length - O);
1324
+ return g.getMany({ trans: a, keys: y.slice(O, O + x), cache: "immutable" }).then(function(I) {
1325
+ for (var j = [], C = [], R = b ? [] : null, M = [], P = 0; P < x; ++P) {
1326
+ var $ = I[P], F = { value: je($), primKey: y[O + P] };
1327
+ s.call(F, F.value, F) !== !1 && (F.value == null ? M.push(y[O + P]) : b || H(d($), d(F.value)) === 0 ? (C.push(F.value), b && R.push(y[O + P])) : (M.push(y[O + P]), j.push(F.value)));
1328
1328
  }
1329
1329
  return Promise.resolve(0 < j.length && g.mutate({ trans: a, type: "add", values: j }).then(function(z) {
1330
1330
  for (var U in z.failures) M.splice(parseInt(U), 1);
@@ -1338,7 +1338,7 @@ var jr = { exports: {} };
1338
1338
  return u(M.length, z);
1339
1339
  });
1340
1340
  }).then(function() {
1341
- return y.length > O + k && _(O + v);
1341
+ return y.length > O + x && _(O + v);
1342
1342
  });
1343
1343
  });
1344
1344
  }
@@ -1420,16 +1420,16 @@ var jr = { exports: {} };
1420
1420
  if (typeof _ != "string") return !1;
1421
1421
  var E = o(_);
1422
1422
  if (t(E, g, p)) return !0;
1423
- for (var O = null, k = p; k < d; ++k) {
1424
- var I = function(j, C, R, M, D, $) {
1423
+ for (var O = null, x = p; x < d; ++x) {
1424
+ var I = function(j, C, R, M, P, $) {
1425
1425
  for (var F = Math.min(j.length, M.length), z = -1, U = 0; U < F; ++U) {
1426
1426
  var he = C[U];
1427
- if (he !== M[U]) return D(j[U], R[U]) < 0 ? j.substr(0, U) + R[U] + R.substr(U + 1) : D(j[U], M[U]) < 0 ? j.substr(0, U) + M[U] + R.substr(U + 1) : 0 <= z ? j.substr(0, z) + C[z] + R.substr(z + 1) : null;
1428
- D(j[U], he) < 0 && (z = U);
1427
+ if (he !== M[U]) return P(j[U], R[U]) < 0 ? j.substr(0, U) + R[U] + R.substr(U + 1) : P(j[U], M[U]) < 0 ? j.substr(0, U) + M[U] + R.substr(U + 1) : 0 <= z ? j.substr(0, z) + C[z] + R.substr(z + 1) : null;
1428
+ P(j[U], he) < 0 && (z = U);
1429
1429
  }
1430
1430
  return F < M.length && $ === "next" ? j + R.substr(j.length) : F < j.length && $ === "prev" ? j.substr(0, R.length) : z < 0 ? null : j.substr(0, z) + M[z] + R.substr(z + 1);
1431
- }(_, E, u[k], g[k], s, f);
1432
- I === null && O === null ? p = k + 1 : (O === null || 0 < s(O, I)) && (O = I);
1431
+ }(_, E, u[x], g[x], s, f);
1432
+ I === null && O === null ? p = x + 1 : (O === null || 0 < s(O, I)) && (O = I);
1433
1433
  }
1434
1434
  return w(O !== null ? function() {
1435
1435
  m.continue(O + b);
@@ -1542,14 +1542,14 @@ var jr = { exports: {} };
1542
1542
  }
1543
1543
  try {
1544
1544
  (b = _.reduce(function(E, O) {
1545
- for (var k = 0, I = E.length; k < I; ++k) {
1546
- var j = E[k];
1545
+ for (var x = 0, I = E.length; x < I; ++x) {
1546
+ var j = E[x];
1547
1547
  if (a(O[0], j[1]) < 0 && 0 < a(O[1], j[0])) {
1548
1548
  j[0] = s(j[0], O[0]), j[1] = u(j[1], O[1]);
1549
1549
  break;
1550
1550
  }
1551
1551
  }
1552
- return k === I && E.push(O), E;
1552
+ return x === I && E.push(O), E;
1553
1553
  }, [])).sort(v);
1554
1554
  } catch {
1555
1555
  return de(this, _e);
@@ -1567,8 +1567,8 @@ var jr = { exports: {} };
1567
1567
  });
1568
1568
  return _._ondirectionchange = function(E) {
1569
1569
  d = E === "next" ? (y = m, i) : (y = w, o), b.sort(v);
1570
- }, _._addAlgorithm(function(E, O, k) {
1571
- for (var I, j = E.key; y(j); ) if (++p === b.length) return O(k), !1;
1570
+ }, _._addAlgorithm(function(E, O, x) {
1571
+ for (var I, j = E.key; y(j); ) if (++p === b.length) return O(x), !1;
1572
1572
  return !m(I = j) && !w(I) || (n._cmp(j, b[p][1]) === 0 || n._cmp(j, b[p][0]) === 0 || O(function() {
1573
1573
  d === i ? E.continue(b[p][0]) : E.continue(b[p][1]);
1574
1574
  }), !1);
@@ -1584,7 +1584,7 @@ var jr = { exports: {} };
1584
1584
  function ae() {
1585
1585
  }
1586
1586
  function ye(e) {
1587
- return J(function(t) {
1587
+ return Z(function(t) {
1588
1588
  return pt(t), e(t.target.error), !1;
1589
1589
  });
1590
1590
  }
@@ -1617,17 +1617,17 @@ var jr = { exports: {} };
1617
1617
  throw new G.OpenFailed(a);
1618
1618
  }
1619
1619
  if (!this.active) throw new G.TransactionInactive();
1620
- return rt(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = J(function(i) {
1620
+ return rt(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = Z(function(i) {
1621
1621
  pt(i), t._reject(e.error);
1622
- }), e.onabort = J(function(i) {
1622
+ }), e.onabort = Z(function(i) {
1623
1623
  pt(i), t.active && t._reject(new G.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
1624
- }), e.oncomplete = J(function() {
1624
+ }), e.oncomplete = Z(function() {
1625
1625
  t.active = !1, t._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
1626
1626
  }), this;
1627
1627
  }, me.prototype._promise = function(e, t, n) {
1628
1628
  var a = this;
1629
- if (e === "readwrite" && this.mode !== "readwrite") return q(new G.ReadOnly("Transaction is readonly"));
1630
- if (!this.active) return q(new G.TransactionInactive());
1629
+ if (e === "readwrite" && this.mode !== "readwrite") return ee(new G.ReadOnly("Transaction is readonly"));
1630
+ if (!this.active) return ee(new G.TransactionInactive());
1631
1631
  if (this._locked()) return new N(function(o, s) {
1632
1632
  a._blockedFuncs.push([function() {
1633
1633
  a._promise(e, t, n).then(o, s);
@@ -1661,9 +1661,9 @@ var jr = { exports: {} };
1661
1661
  var i = n._waitingFor;
1662
1662
  return new N(function(o, s) {
1663
1663
  a.then(function(u) {
1664
- return n._waitingQueue.push(J(o.bind(null, u)));
1664
+ return n._waitingQueue.push(Z(o.bind(null, u)));
1665
1665
  }, function(u) {
1666
- return n._waitingQueue.push(J(s.bind(null, u)));
1666
+ return n._waitingQueue.push(Z(s.bind(null, u)));
1667
1667
  }).finally(function() {
1668
1668
  n._waitingFor === i && (n._waitingFor = null);
1669
1669
  });
@@ -1732,12 +1732,12 @@ var jr = { exports: {} };
1732
1732
  function i(v) {
1733
1733
  var p, m = v.name;
1734
1734
  return { name: m, schema: v, mutate: function(w) {
1735
- var y = w.trans, _ = w.type, E = w.keys, O = w.values, k = w.range;
1735
+ var y = w.trans, _ = w.type, E = w.keys, O = w.values, x = w.range;
1736
1736
  return new Promise(function(I, j) {
1737
- I = J(I);
1737
+ I = Z(I);
1738
1738
  var C = y.objectStore(m), R = C.keyPath == null, M = _ === "put" || _ === "add";
1739
1739
  if (!M && _ !== "delete" && _ !== "deleteRange") throw new Error("Invalid operation type: " + _);
1740
- var D, $ = (E || O || { length: 1 }).length;
1740
+ var P, $ = (E || O || { length: 1 }).length;
1741
1741
  if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
1742
1742
  if ($ === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1743
1743
  function F(ue) {
@@ -1745,12 +1745,12 @@ var jr = { exports: {} };
1745
1745
  }
1746
1746
  var z = [], U = [], he = 0;
1747
1747
  if (_ === "deleteRange") {
1748
- if (k.type === 4) return I({ numFailures: he, failures: U, results: [], lastResult: void 0 });
1749
- k.type === 3 ? z.push(D = C.clear()) : z.push(D = C.delete(a(k)));
1748
+ if (x.type === 4) return I({ numFailures: he, failures: U, results: [], lastResult: void 0 });
1749
+ x.type === 3 ? z.push(P = C.clear()) : z.push(P = C.delete(a(x)));
1750
1750
  } else {
1751
1751
  var R = M ? R ? [O, E] : [O, null] : [E, null], W = R[0], oe = R[1];
1752
- if (M) for (var se = 0; se < $; ++se) z.push(D = oe && oe[se] !== void 0 ? C[_](W[se], oe[se]) : C[_](W[se])), D.onerror = F;
1753
- else for (se = 0; se < $; ++se) z.push(D = C[_](W[se])), D.onerror = F;
1752
+ if (M) for (var se = 0; se < $; ++se) z.push(P = oe && oe[se] !== void 0 ? C[_](W[se], oe[se]) : C[_](W[se])), P.onerror = F;
1753
+ else for (se = 0; se < $; ++se) z.push(P = C[_](W[se])), P.onerror = F;
1754
1754
  }
1755
1755
  function Vt(ue) {
1756
1756
  ue = ue.target.result, z.forEach(function(We, Ln) {
@@ -1759,52 +1759,52 @@ var jr = { exports: {} };
1759
1759
  return We.result;
1760
1760
  }), lastResult: ue });
1761
1761
  }
1762
- D.onerror = function(ue) {
1762
+ P.onerror = function(ue) {
1763
1763
  F(ue), Vt(ue);
1764
- }, D.onsuccess = Vt;
1764
+ }, P.onsuccess = Vt;
1765
1765
  });
1766
1766
  }, getMany: function(w) {
1767
1767
  var y = w.trans, _ = w.keys;
1768
1768
  return new Promise(function(E, O) {
1769
- E = J(E);
1770
- for (var k, I = y.objectStore(m), j = _.length, C = new Array(j), R = 0, M = 0, D = function(z) {
1769
+ E = Z(E);
1770
+ for (var x, I = y.objectStore(m), j = _.length, C = new Array(j), R = 0, M = 0, P = function(z) {
1771
1771
  z = z.target, C[z._pos] = z.result, ++M === R && E(C);
1772
- }, $ = ye(O), F = 0; F < j; ++F) _[F] != null && ((k = I.get(_[F]))._pos = F, k.onsuccess = D, k.onerror = $, ++R);
1772
+ }, $ = ye(O), F = 0; F < j; ++F) _[F] != null && ((x = I.get(_[F]))._pos = F, x.onsuccess = P, x.onerror = $, ++R);
1773
1773
  R === 0 && E(C);
1774
1774
  });
1775
1775
  }, get: function(w) {
1776
1776
  var y = w.trans, _ = w.key;
1777
1777
  return new Promise(function(E, O) {
1778
- E = J(E);
1779
- var k = y.objectStore(m).get(_);
1780
- k.onsuccess = function(I) {
1778
+ E = Z(E);
1779
+ var x = y.objectStore(m).get(_);
1780
+ x.onsuccess = function(I) {
1781
1781
  return E(I.target.result);
1782
- }, k.onerror = ye(O);
1782
+ }, x.onerror = ye(O);
1783
1783
  });
1784
1784
  }, query: (p = f, function(w) {
1785
1785
  return new Promise(function(y, _) {
1786
- y = J(y);
1787
- var E, O, k, R = w.trans, I = w.values, j = w.limit, D = w.query, C = j === 1 / 0 ? void 0 : j, M = D.index, D = D.range, R = R.objectStore(m), M = M.isPrimaryKey ? R : R.index(M.name), D = a(D);
1786
+ y = Z(y);
1787
+ var E, O, x, R = w.trans, I = w.values, j = w.limit, P = w.query, C = j === 1 / 0 ? void 0 : j, M = P.index, P = P.range, R = R.objectStore(m), M = M.isPrimaryKey ? R : R.index(M.name), P = a(P);
1788
1788
  if (j === 0) return y({ result: [] });
1789
- p ? ((C = I ? M.getAll(D, C) : M.getAllKeys(D, C)).onsuccess = function($) {
1789
+ p ? ((C = I ? M.getAll(P, C) : M.getAllKeys(P, C)).onsuccess = function($) {
1790
1790
  return y({ result: $.target.result });
1791
- }, C.onerror = ye(_)) : (E = 0, O = !I && "openKeyCursor" in M ? M.openKeyCursor(D) : M.openCursor(D), k = [], O.onsuccess = function($) {
1791
+ }, C.onerror = ye(_)) : (E = 0, O = !I && "openKeyCursor" in M ? M.openKeyCursor(P) : M.openCursor(P), x = [], O.onsuccess = function($) {
1792
1792
  var F = O.result;
1793
- return F ? (k.push(I ? F.value : F.primaryKey), ++E === j ? y({ result: k }) : void F.continue()) : y({ result: k });
1793
+ return F ? (x.push(I ? F.value : F.primaryKey), ++E === j ? y({ result: x }) : void F.continue()) : y({ result: x });
1794
1794
  }, O.onerror = ye(_));
1795
1795
  });
1796
1796
  }), openCursor: function(w) {
1797
- var y = w.trans, _ = w.values, E = w.query, O = w.reverse, k = w.unique;
1797
+ var y = w.trans, _ = w.values, E = w.query, O = w.reverse, x = w.unique;
1798
1798
  return new Promise(function(I, j) {
1799
- I = J(I);
1800
- var M = E.index, C = E.range, R = y.objectStore(m), R = M.isPrimaryKey ? R : R.index(M.name), M = O ? k ? "prevunique" : "prev" : k ? "nextunique" : "next", D = !_ && "openKeyCursor" in R ? R.openKeyCursor(a(C), M) : R.openCursor(a(C), M);
1801
- D.onerror = ye(j), D.onsuccess = J(function($) {
1802
- var F, z, U, he, W = D.result;
1799
+ I = Z(I);
1800
+ var M = E.index, C = E.range, R = y.objectStore(m), R = M.isPrimaryKey ? R : R.index(M.name), M = O ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", P = !_ && "openKeyCursor" in R ? R.openKeyCursor(a(C), M) : R.openCursor(a(C), M);
1801
+ P.onerror = ye(j), P.onsuccess = Z(function($) {
1802
+ var F, z, U, he, W = P.result;
1803
1803
  W ? (W.___id = ++ua, W.done = !1, F = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), U = W.advance.bind(W), he = function() {
1804
1804
  throw new Error("Cursor not stopped");
1805
1805
  }, W.trans = y, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
1806
1806
  throw new Error("Cursor not started");
1807
- }, W.fail = J(j), W.next = function() {
1807
+ }, W.fail = Z(j), W.next = function() {
1808
1808
  var oe = this, se = 1;
1809
1809
  return this.start(function() {
1810
1810
  return se-- ? oe.continue() : oe.stop();
@@ -1813,7 +1813,7 @@ var jr = { exports: {} };
1813
1813
  });
1814
1814
  }, W.start = function(oe) {
1815
1815
  function se() {
1816
- if (D.result) try {
1816
+ if (P.result) try {
1817
1817
  oe();
1818
1818
  } catch (ue) {
1819
1819
  W.fail(ue);
@@ -1823,22 +1823,22 @@ var jr = { exports: {} };
1823
1823
  }, W.stop();
1824
1824
  }
1825
1825
  var Vt = new Promise(function(ue, We) {
1826
- ue = J(ue), D.onerror = ye(We), W.fail = We, W.stop = function(Ln) {
1826
+ ue = Z(ue), P.onerror = ye(We), W.fail = We, W.stop = function(Ln) {
1827
1827
  W.stop = W.continue = W.continuePrimaryKey = W.advance = he, ue(Ln);
1828
1828
  };
1829
1829
  });
1830
- return D.onsuccess = J(function(ue) {
1831
- D.onsuccess = se, se();
1830
+ return P.onsuccess = Z(function(ue) {
1831
+ P.onsuccess = se, se();
1832
1832
  }), W.continue = F, W.continuePrimaryKey = z, W.advance = U, se(), Vt;
1833
1833
  }, I(W)) : I(null);
1834
1834
  }, j);
1835
1835
  });
1836
1836
  }, count: function(w) {
1837
1837
  var y = w.query, _ = w.trans, E = y.index, O = y.range;
1838
- return new Promise(function(k, I) {
1838
+ return new Promise(function(x, I) {
1839
1839
  var j = _.objectStore(m), C = E.isPrimaryKey ? j : j.index(E.name), j = a(O), C = j ? C.count(j) : C.count();
1840
- C.onsuccess = J(function(R) {
1841
- return k(R.target.result);
1840
+ C.onsuccess = Z(function(R) {
1841
+ return x(R.target.result);
1842
1842
  }), C.onerror = ye(I);
1843
1843
  });
1844
1844
  } };
@@ -1848,9 +1848,9 @@ var jr = { exports: {} };
1848
1848
  }).map(function(v) {
1849
1849
  var p = v.keyPath, y = v.autoIncrement, m = B(p), w = {}, y = { name: v.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: _n(p) }, indexes: mr(v.indexNames).map(function(_) {
1850
1850
  return v.index(_);
1851
- }).map(function(k) {
1852
- var E = k.name, O = k.unique, I = k.multiEntry, k = k.keyPath, I = { name: E, compound: B(k), keyPath: k, unique: O, multiEntry: I, extractKey: _n(k) };
1853
- return w[mt(k)] = I;
1851
+ }).map(function(x) {
1852
+ var E = x.name, O = x.unique, I = x.multiEntry, x = x.keyPath, I = { name: E, compound: B(x), keyPath: x, unique: O, multiEntry: I, extractKey: _n(x) };
1853
+ return w[mt(x)] = I;
1854
1854
  }), getIndexByKeyPath: function(_) {
1855
1855
  return w[mt(_)];
1856
1856
  } };
@@ -1883,7 +1883,7 @@ var jr = { exports: {} };
1883
1883
  var o = a[i];
1884
1884
  t.forEach(function(s) {
1885
1885
  var u = function g(f, b) {
1886
- return Fr(f, b) || (f = ne(f)) && g(f, b);
1886
+ return Fr(f, b) || (f = q(f)) && g(f, b);
1887
1887
  }(s, i);
1888
1888
  (!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, i, { get: function() {
1889
1889
  return this.table(i);
@@ -1917,39 +1917,39 @@ var jr = { exports: {} };
1917
1917
  w.push(function() {
1918
1918
  var E = y, O = _._cfg.dbschema;
1919
1919
  Ft(d, E, m), Ft(d, O, m), y = d._dbSchema = O;
1920
- var k = En(E, O);
1921
- k.add.forEach(function(M) {
1920
+ var x = En(E, O);
1921
+ x.add.forEach(function(M) {
1922
1922
  On(m, M[0], M[1].primKey, M[1].indexes);
1923
- }), k.change.forEach(function(M) {
1923
+ }), x.change.forEach(function(M) {
1924
1924
  if (M.recreate) throw new G.Upgrade("Not yet support for changing primary key");
1925
- var D = m.objectStore(M.name);
1925
+ var P = m.objectStore(M.name);
1926
1926
  M.add.forEach(function($) {
1927
- return Gt(D, $);
1927
+ return Gt(P, $);
1928
1928
  }), M.change.forEach(function($) {
1929
- D.deleteIndex($.name), Gt(D, $);
1929
+ P.deleteIndex($.name), Gt(P, $);
1930
1930
  }), M.del.forEach(function($) {
1931
- return D.deleteIndex($);
1931
+ return P.deleteIndex($);
1932
1932
  });
1933
1933
  });
1934
1934
  var I = _._cfg.contentUpgrade;
1935
1935
  if (I && _._cfg.version > v) {
1936
1936
  Bt(d, m), p._memoizedTables = {};
1937
1937
  var j = Qn(O);
1938
- k.del.forEach(function(M) {
1938
+ x.del.forEach(function(M) {
1939
1939
  j[M] = E[M];
1940
1940
  }), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype], T(j), j), p.schema = j;
1941
1941
  var C, R = tn(I);
1942
- return R && Je(), k = N.follow(function() {
1942
+ return R && Je(), x = N.follow(function() {
1943
1943
  var M;
1944
1944
  (C = I(p)) && R && (M = Pe.bind(null, null), C.then(M, M));
1945
- }), C && typeof C.then == "function" ? N.resolve(C) : k.then(function() {
1945
+ }), C && typeof C.then == "function" ? N.resolve(C) : x.then(function() {
1946
1946
  return C;
1947
1947
  });
1948
1948
  }
1949
1949
  }), w.push(function(E) {
1950
- var O, k, I = _._cfg.dbschema;
1951
- O = I, k = E, [].slice.call(k.db.objectStoreNames).forEach(function(j) {
1952
- return O[j] == null && k.db.deleteObjectStore(j);
1950
+ var O, x, I = _._cfg.dbschema;
1951
+ O = I, x = E, [].slice.call(x.db.objectStoreNames).forEach(function(j) {
1952
+ return O[j] == null && x.db.deleteObjectStore(j);
1953
1953
  }), Sn(d, [d.Transaction.prototype]), Lt(d, [d.Transaction.prototype], d._storeNames, d._dbSchema), p.schema = d._dbSchema;
1954
1954
  }), w.push(function(E) {
1955
1955
  d.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(d.idbdb.version / 10) === _._cfg.version ? (d.idbdb.deleteObjectStore("$meta"), delete d._dbSchema.$meta, d._storeNames = d._storeNames.filter(function(O) {
@@ -2039,7 +2039,7 @@ var jr = { exports: {} };
2039
2039
  !t[o] || (f = t[o].idxByName[b]) && (f.name = g, delete t[o].idxByName[b], t[o].idxByName[g] = f);
2040
2040
  }
2041
2041
  }
2042
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && P.WorkerGlobalScope && P instanceof P.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2042
+ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && D.WorkerGlobalScope && D instanceof D.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2043
2043
  }
2044
2044
  function vr(e) {
2045
2045
  return e.split(",").map(function(t, n) {
@@ -2060,10 +2060,10 @@ var jr = { exports: {} };
2060
2060
  });
2061
2061
  }, Ut.prototype.stores = function(n) {
2062
2062
  var t = this.db;
2063
- this._cfg.storesSource = this._cfg.storesSource ? Z(this._cfg.storesSource, n) : n;
2063
+ this._cfg.storesSource = this._cfg.storesSource ? J(this._cfg.storesSource, n) : n;
2064
2064
  var n = t._versions, a = {}, i = {};
2065
2065
  return n.forEach(function(o) {
2066
- Z(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
2066
+ J(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
2067
2067
  }), t._dbSchema = i, Sn(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], T(i), i), t._storeNames = T(i), this;
2068
2068
  }, Ut.prototype.upgrade = function(e) {
2069
2069
  return this._cfg.contentUpgrade = rn(this._cfg.contentUpgrade || Q, e), this;
@@ -2088,15 +2088,15 @@ var jr = { exports: {} };
2088
2088
  var ce = function(e, t) {
2089
2089
  if (!this) {
2090
2090
  var n = new ce();
2091
- return e && "d" in e && Z(n, e), n;
2091
+ return e && "d" in e && J(n, e), n;
2092
2092
  }
2093
- Z(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2093
+ J(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2094
2094
  };
2095
2095
  function bt(e, t, n) {
2096
2096
  var a = H(t, n);
2097
2097
  if (!isNaN(a)) {
2098
2098
  if (0 < a) throw RangeError();
2099
- if (Dn(e)) return Z(e, { from: t, to: n, d: 1 });
2099
+ if (Dn(e)) return J(e, { from: t, to: n, d: 1 });
2100
2100
  var i = e.l, a = e.r;
2101
2101
  if (H(n, e.from) < 0) return i ? bt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2102
2102
  if (0 < H(t, e.to)) return a ? bt(a, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
@@ -2211,7 +2211,7 @@ var jr = { exports: {} };
2211
2211
  function ya(e) {
2212
2212
  var t = e._state, n = e._deps.indexedDB;
2213
2213
  if (t.isBeingOpened || e.idbdb) return t.dbReadyPromise.then(function() {
2214
- return t.dbOpenError ? q(t.dbOpenError) : e;
2214
+ return t.dbOpenError ? ee(t.dbOpenError) : e;
2215
2215
  });
2216
2216
  t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
2217
2217
  var a = t.openCanceller, i = Math.round(10 * e.verno), o = !1;
@@ -2223,28 +2223,28 @@ var jr = { exports: {} };
2223
2223
  if (s(), !n) throw new G.MissingAPI();
2224
2224
  var m = e.name, w = t.autoSchema || !i ? n.open(m) : n.open(m, i);
2225
2225
  if (!w) throw new G.MissingAPI();
2226
- w.onerror = ye(p), w.onblocked = J(e._fireOnBlocked), w.onupgradeneeded = J(function(y) {
2226
+ w.onerror = ye(p), w.onblocked = Z(e._fireOnBlocked), w.onupgradeneeded = Z(function(y) {
2227
2227
  var _;
2228
- b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (_ = n.deleteDatabase(m)).onsuccess = _.onerror = J(function() {
2228
+ b = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, b.abort(), w.result.close(), (_ = n.deleteDatabase(m)).onsuccess = _.onerror = Z(function() {
2229
2229
  p(new G.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
2230
2230
  })) : (b.onerror = ye(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, d = y < 1, e.idbdb = w.result, o && pa(e, b), ha(e, y / 10, b, p));
2231
- }, p), w.onsuccess = J(function() {
2231
+ }, p), w.onsuccess = Z(function() {
2232
2232
  b = null;
2233
- var y, _, E, O, k, I = e.idbdb = w.result, j = St(I.objectStoreNames);
2233
+ var y, _, E, O, x, I = e.idbdb = w.result, j = St(I.objectStoreNames);
2234
2234
  if (0 < j.length) try {
2235
2235
  var C = I.transaction((O = j).length === 1 ? O[0] : O, "readonly");
2236
2236
  if (t.autoSchema) _ = I, E = C, (y = e).verno = _.version / 10, E = y._dbSchema = $t(0, _, E), y._storeNames = St(_.objectStoreNames, 0), Lt(y, [y._allTables], T(E), E);
2237
- else if (Ft(e, e._dbSchema, C), ((k = En($t(0, (k = e).idbdb, C), k._dbSchema)).add.length || k.change.some(function(R) {
2237
+ else if (Ft(e, e._dbSchema, C), ((x = En($t(0, (x = e).idbdb, C), x._dbSchema)).add.length || x.change.some(function(R) {
2238
2238
  return R.add.length || R.change.length;
2239
2239
  })) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), I.close(), i = I.version + 1, o = !0, v(u());
2240
2240
  Bt(e, C);
2241
2241
  } catch {
2242
2242
  }
2243
- Ze.push(e), I.onversionchange = J(function(R) {
2243
+ Ze.push(e), I.onversionchange = Z(function(R) {
2244
2244
  t.vcFired = !0, e.on("versionchange").fire(R);
2245
- }), I.onclose = J(function(R) {
2245
+ }), I.onclose = Z(function(R) {
2246
2246
  e.on("close").fire(R);
2247
- }), d && (k = e._deps, C = m, I = k.indexedDB, k = k.IDBKeyRange, kn(I) || C === Tt || xn(I, k).put({ name: C }).catch(Q)), v();
2247
+ }), d && (x = e._deps, C = m, I = x.indexedDB, x = x.IDBKeyRange, kn(I) || C === Tt || xn(I, x).put({ name: C }).catch(Q)), v();
2248
2248
  }, p);
2249
2249
  }).catch(function(v) {
2250
2250
  switch (v == null ? void 0 : v.name) {
@@ -2284,7 +2284,7 @@ var jr = { exports: {} };
2284
2284
  b && b.abort();
2285
2285
  } catch {
2286
2286
  }
2287
- return a === t.openCanceller && e._close(), q(v);
2287
+ return a === t.openCanceller && e._close(), ee(v);
2288
2288
  }).finally(function() {
2289
2289
  t.openComplete = !0, f();
2290
2290
  }).then(function() {
@@ -2410,22 +2410,22 @@ var jr = { exports: {} };
2410
2410
  function b(d) {
2411
2411
  var v, p, m, w = L.trans, y = d.keys || Mn(a, d);
2412
2412
  if (!y) throw new Error("Keys missing");
2413
- return (d = d.type === "add" || d.type === "put" ? l(l({}, d), { keys: y }) : l({}, d)).type !== "delete" && (d.values = x([], d.values)), d.keys && (d.keys = x([], d.keys)), v = n, m = y, ((p = d).type === "add" ? Promise.resolve([]) : v.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(_) {
2414
- var E = y.map(function(O, k) {
2415
- var I, j, C, R = _[k], M = { onerror: null, onsuccess: null };
2416
- return d.type === "delete" ? u.fire.call(M, O, R, w) : d.type === "add" || R === void 0 ? (I = g.fire.call(M, O, d.values[k], w), O == null && I != null && (d.keys[k] = O = I, a.outbound || le(d.values[k], a.keyPath, O))) : (I = jn(R, d.values[k]), (j = f.fire.call(M, I, O, R, w)) && (C = d.values[k], Object.keys(j).forEach(function(D) {
2417
- ie(C, D) ? C[D] = j[D] : le(C, D, j[D]);
2413
+ return (d = d.type === "add" || d.type === "put" ? l(l({}, d), { keys: y }) : l({}, d)).type !== "delete" && (d.values = k([], d.values)), d.keys && (d.keys = k([], d.keys)), v = n, m = y, ((p = d).type === "add" ? Promise.resolve([]) : v.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(_) {
2414
+ var E = y.map(function(O, x) {
2415
+ var I, j, C, R = _[x], M = { onerror: null, onsuccess: null };
2416
+ return d.type === "delete" ? u.fire.call(M, O, R, w) : d.type === "add" || R === void 0 ? (I = g.fire.call(M, O, d.values[x], w), O == null && I != null && (d.keys[x] = O = I, a.outbound || le(d.values[x], a.keyPath, O))) : (I = jn(R, d.values[x]), (j = f.fire.call(M, I, O, R, w)) && (C = d.values[x], Object.keys(j).forEach(function(P) {
2417
+ ie(C, P) ? C[P] = j[P] : le(C, P, j[P]);
2418
2418
  }))), M;
2419
2419
  });
2420
2420
  return n.mutate(d).then(function(O) {
2421
- for (var k = O.failures, I = O.results, j = O.numFailures, O = O.lastResult, C = 0; C < y.length; ++C) {
2421
+ for (var x = O.failures, I = O.results, j = O.numFailures, O = O.lastResult, C = 0; C < y.length; ++C) {
2422
2422
  var R = (I || y)[C], M = E[C];
2423
- R == null ? M.onerror && M.onerror(k[C]) : M.onsuccess && M.onsuccess(d.type === "put" && _[C] ? d.values[C] : R);
2423
+ R == null ? M.onerror && M.onerror(x[C]) : M.onsuccess && M.onsuccess(d.type === "put" && _[C] ? d.values[C] : R);
2424
2424
  }
2425
- return { failures: k, results: I, numFailures: j, lastResult: O };
2425
+ return { failures: x, results: I, numFailures: j, lastResult: O };
2426
2426
  }).catch(function(O) {
2427
- return E.forEach(function(k) {
2428
- return k.onerror && k.onerror(O);
2427
+ return E.forEach(function(x) {
2428
+ return x.onerror && x.onerror(O);
2429
2429
  }), Promise.reject(O);
2430
2430
  });
2431
2431
  });
@@ -2479,19 +2479,19 @@ var jr = { exports: {} };
2479
2479
  var i = e.table(a), o = i.schema, s = o.primaryKey, d = o.indexes, u = s.extractKey, g = s.outbound, f = s.autoIncrement && d.filter(function(p) {
2480
2480
  return p.compound && p.keyPath.includes(s.keyPath);
2481
2481
  }), b = l(l({}, i), { mutate: function(p) {
2482
- function m(D) {
2483
- return D = "idb://".concat(t, "/").concat(a, "/").concat(D), O[D] || (O[D] = new ce());
2482
+ function m(P) {
2483
+ return P = "idb://".concat(t, "/").concat(a, "/").concat(P), O[P] || (O[P] = new ce());
2484
2484
  }
2485
- var w, y, _, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), k = m(""), I = m(":dels"), j = p.type, M = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Mn(s, p).filter(function(D) {
2486
- return D;
2485
+ var w, y, _, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), x = m(""), I = m(":dels"), j = p.type, M = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Mn(s, p).filter(function(P) {
2486
+ return P;
2487
2487
  }), p.values] : [], C = M[0], R = M[1], M = p.trans._cache;
2488
- return B(C) ? (k.addKeys(C), (M = j === "delete" || C.length === R.length ? Or(C, M) : null) || I.addKeys(C), (M || R) && (w = m, y = M, _ = R, o.indexes.forEach(function(D) {
2489
- var $ = w(D.name || "");
2488
+ return B(C) ? (x.addKeys(C), (M = j === "delete" || C.length === R.length ? Or(C, M) : null) || I.addKeys(C), (M || R) && (w = m, y = M, _ = R, o.indexes.forEach(function(P) {
2489
+ var $ = w(P.name || "");
2490
2490
  function F(U) {
2491
- return U != null ? D.extractKey(U) : null;
2491
+ return U != null ? P.extractKey(U) : null;
2492
2492
  }
2493
2493
  function z(U) {
2494
- return D.multiEntry && B(U) ? U.forEach(function(he) {
2494
+ return P.multiEntry && B(U) ? U.forEach(function(he) {
2495
2495
  return $.addKey(he);
2496
2496
  }) : $.addKey(U);
2497
2497
  }
@@ -2499,19 +2499,19 @@ var jr = { exports: {} };
2499
2499
  var W = y && F(y[oe]), oe = _ && F(_[oe]);
2500
2500
  H(W, oe) !== 0 && (W != null && z(W), oe != null && z(oe));
2501
2501
  });
2502
- }))) : C ? (R = { from: C.lower, to: C.upper }, I.add(R), k.add(R)) : (k.add(n), I.add(n), o.indexes.forEach(function(D) {
2503
- return m(D.name).add(n);
2504
- })), i.mutate(p).then(function(D) {
2505
- return !C || p.type !== "add" && p.type !== "put" || (k.addKeys(D.results), f && f.forEach(function($) {
2502
+ }))) : C ? (R = { from: C.lower, to: C.upper }, I.add(R), x.add(R)) : (x.add(n), I.add(n), o.indexes.forEach(function(P) {
2503
+ return m(P.name).add(n);
2504
+ })), i.mutate(p).then(function(P) {
2505
+ return !C || p.type !== "add" && p.type !== "put" || (x.addKeys(P.results), f && f.forEach(function($) {
2506
2506
  var F = p.values.map(function(U) {
2507
2507
  return $.extractKey(U);
2508
2508
  }), z = $.keyPath.findIndex(function(U) {
2509
2509
  return U === s.keyPath;
2510
2510
  });
2511
- D.results.forEach(function(U) {
2511
+ P.results.forEach(function(U) {
2512
2512
  return F[z] = U;
2513
2513
  }), m($.name).addKeys(F);
2514
- })), E.mutatedParts = zt(E.mutatedParts || {}, O), D;
2514
+ })), E.mutatedParts = zt(E.mutatedParts || {}, O), P;
2515
2515
  });
2516
2516
  } }), d = function(m) {
2517
2517
  var w = m.query, m = w.index, w = w.range;
@@ -2527,8 +2527,8 @@ var jr = { exports: {} };
2527
2527
  if (y) {
2528
2528
  var E = function(R) {
2529
2529
  return R = "idb://".concat(t, "/").concat(a, "/").concat(R), _[R] || (_[R] = new ce());
2530
- }, O = E(""), k = E(":dels"), w = v[p](m), y = w[0], w = w[1];
2531
- if ((p === "query" && y.isPrimaryKey && !m.values ? k : E(y.name || "")).add(w), !y.isPrimaryKey) {
2530
+ }, O = E(""), x = E(":dels"), w = v[p](m), y = w[0], w = w[1];
2531
+ if ((p === "query" && y.isPrimaryKey && !m.values ? x : E(y.name || "")).add(w), !y.isPrimaryKey) {
2532
2532
  if (p !== "count") {
2533
2533
  var I = p === "query" && g && m.values && i.query(l(l({}, m), { values: !1 }));
2534
2534
  return i[p].apply(this, arguments).then(function(R) {
@@ -2537,22 +2537,22 @@ var jr = { exports: {} };
2537
2537
  return F = F.result, O.addKeys(F), R;
2538
2538
  });
2539
2539
  var M = m.values ? R.result.map(u) : R.result;
2540
- (m.values ? O : k).addKeys(M);
2540
+ (m.values ? O : x).addKeys(M);
2541
2541
  } else if (p === "openCursor") {
2542
- var D = R, $ = m.values;
2543
- return D && Object.create(D, { key: { get: function() {
2544
- return k.addKey(D.primaryKey), D.key;
2542
+ var P = R, $ = m.values;
2543
+ return P && Object.create(P, { key: { get: function() {
2544
+ return x.addKey(P.primaryKey), P.key;
2545
2545
  } }, primaryKey: { get: function() {
2546
- var F = D.primaryKey;
2547
- return k.addKey(F), F;
2546
+ var F = P.primaryKey;
2547
+ return x.addKey(F), F;
2548
2548
  } }, value: { get: function() {
2549
- return $ && O.addKey(D.primaryKey), D.value;
2549
+ return $ && O.addKey(P.primaryKey), P.value;
2550
2550
  } } });
2551
2551
  }
2552
2552
  return R;
2553
2553
  });
2554
2554
  }
2555
- k.add(n);
2555
+ x.add(n);
2556
2556
  }
2557
2557
  }
2558
2558
  return i[p].apply(this, arguments);
@@ -2579,36 +2579,36 @@ var jr = { exports: {} };
2579
2579
  var s = t.query.index, u = s.multiEntry, g = t.query.range, f = a.schema.primaryKey.extractKey, b = s.extractKey, d = (s.lowLevelIndex || s).extractKey, v = v.reduce(function(p, m) {
2580
2580
  var w = p, y = [];
2581
2581
  if (m.type === "add" || m.type === "put") for (var _ = new ce(), E = m.values.length - 1; 0 <= E; --E) {
2582
- var O, k = m.values[E], I = f(k);
2583
- _.hasKey(I) || (O = b(k), (u && B(O) ? O.some(function(M) {
2582
+ var O, x = m.values[E], I = f(x);
2583
+ _.hasKey(I) || (O = b(x), (u && B(O) ? O.some(function(M) {
2584
2584
  return Kn(M, g);
2585
- }) : Kn(O, g)) && (_.addKey(I), y.push(k)));
2585
+ }) : Kn(O, g)) && (_.addKey(I), y.push(x)));
2586
2586
  }
2587
2587
  switch (m.type) {
2588
2588
  case "add":
2589
- w = p.concat(t.values ? y : y.map(function(D) {
2590
- return f(D);
2589
+ w = p.concat(t.values ? y : y.map(function(P) {
2590
+ return f(P);
2591
2591
  }));
2592
2592
  break;
2593
2593
  case "put":
2594
- var j = new ce().addKeys(m.values.map(function(D) {
2595
- return f(D);
2596
- })), w = p.filter(function(D) {
2597
- return !j.hasKey(t.values ? f(D) : D);
2598
- }).concat(t.values ? y : y.map(function(D) {
2599
- return f(D);
2594
+ var j = new ce().addKeys(m.values.map(function(P) {
2595
+ return f(P);
2596
+ })), w = p.filter(function(P) {
2597
+ return !j.hasKey(t.values ? f(P) : P);
2598
+ }).concat(t.values ? y : y.map(function(P) {
2599
+ return f(P);
2600
2600
  }));
2601
2601
  break;
2602
2602
  case "delete":
2603
2603
  var C = new ce().addKeys(m.keys);
2604
- w = p.filter(function(D) {
2605
- return !C.hasKey(t.values ? f(D) : D);
2604
+ w = p.filter(function(P) {
2605
+ return !C.hasKey(t.values ? f(P) : P);
2606
2606
  });
2607
2607
  break;
2608
2608
  case "deleteRange":
2609
2609
  var R = m.range;
2610
- w = p.filter(function(D) {
2611
- return !Kn(f(D), R);
2610
+ w = p.filter(function(P) {
2611
+ return !Kn(f(P), R);
2612
2612
  });
2613
2613
  }
2614
2614
  return w;
@@ -2669,7 +2669,7 @@ var jr = { exports: {} };
2669
2669
  p.optimisticOps = p.optimisticOps.filter(function($) {
2670
2670
  return $.trans !== u;
2671
2671
  });
2672
- for (var k = 0, I = Object.values(p.queries.query); k < I.length; k++) for (var j, C, R, M = 0, D = (j = I[k]).slice(); M < D.length; M++) (C = D[M]).res != null && u.mutatedParts && (g && !C.dirty ? (R = Object.isFrozen(C.res), R = Dr(C.res, C.req, w, m, C, R), C.dirty ? (Me(j, C), C.subscribers.forEach(function($) {
2672
+ for (var x = 0, I = Object.values(p.queries.query); x < I.length; x++) for (var j, C, R, M = 0, P = (j = I[x]).slice(); M < P.length; M++) (C = P[M]).res != null && u.mutatedParts && (g && !C.dirty ? (R = Object.isFrozen(C.res), R = Dr(C.res, C.req, w, m, C, R), C.dirty ? (Me(j, C), C.subscribers.forEach(function($) {
2673
2673
  return f.add($);
2674
2674
  })) : R !== C.res && (C.res = R, C.promise = N.resolve({ result: R }))) : (C.dirty && Me(j, C), C.subscribers.forEach(function($) {
2675
2675
  return f.add($);
@@ -2714,16 +2714,16 @@ var jr = { exports: {} };
2714
2714
  if (!O) return [null, !1, E, null];
2715
2715
  switch (y) {
2716
2716
  case "query":
2717
- var k = O.find(function(I) {
2717
+ var x = O.find(function(I) {
2718
2718
  return I.req.limit === _.limit && I.req.values === _.values && Pr(I.req.query.range, _.query.range);
2719
2719
  });
2720
- return k ? [k, !0, E, O] : [O.find(function(I) {
2720
+ return x ? [x, !0, E, O] : [O.find(function(I) {
2721
2721
  return ("limit" in I.req ? I.req.limit : 1 / 0) >= _.limit && (!_.values || I.req.values) && _a(I.req.query.range, _.query.range);
2722
2722
  }), !1, E, O];
2723
2723
  case "count":
2724
- return k = O.find(function(I) {
2724
+ return x = O.find(function(I) {
2725
2725
  return Pr(I.req.query.range, _.query.range);
2726
- }), [k, !!k, E, O];
2726
+ }), [x, !!x, E, O];
2727
2727
  }
2728
2728
  }(t, n, "query", o), b = f[0], d = f[1], v = f[2], p = f[3];
2729
2729
  return b && d ? b.obsSet = o.obsSet : (d = a.query(o).then(function(m) {
@@ -2746,7 +2746,7 @@ var jr = { exports: {} };
2746
2746
  return a === "db" ? t : Reflect.get(n, a, i);
2747
2747
  } });
2748
2748
  }
2749
- var Ee = (ee.prototype.version = function(e) {
2749
+ var Ee = (te.prototype.version = function(e) {
2750
2750
  if (isNaN(e) || e < 0.1) throw new G.Type("Given version is not a positive number");
2751
2751
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new G.Schema("Cannot add version when database is open");
2752
2752
  this.verno = Math.max(this.verno, e);
@@ -2754,7 +2754,7 @@ var jr = { exports: {} };
2754
2754
  return a._cfg.version === e;
2755
2755
  })[0];
2756
2756
  return n || (n = new this.Version(e), t.push(n), t.sort(fa), n.stores({}), this._state.autoSchema = !1, n);
2757
- }, ee.prototype._whenReady = function(e) {
2757
+ }, te.prototype._whenReady = function(e) {
2758
2758
  var t = this;
2759
2759
  return this.idbdb && (this._state.openComplete || L.letThrough || this._vip) ? e() : new N(function(n, a) {
2760
2760
  if (t._state.openComplete) return a(new G.DatabaseClosed(t._state.dbOpenError));
@@ -2764,22 +2764,22 @@ var jr = { exports: {} };
2764
2764
  }
2765
2765
  t._state.dbReadyPromise.then(n, a);
2766
2766
  }).then(e);
2767
- }, ee.prototype.use = function(e) {
2767
+ }, te.prototype.use = function(e) {
2768
2768
  var t = e.stack, n = e.create, a = e.level, i = e.name;
2769
2769
  return i && this.unuse({ stack: t, name: i }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: a ?? 10, name: i }), e.sort(function(o, s) {
2770
2770
  return o.level - s.level;
2771
2771
  }), this;
2772
- }, ee.prototype.unuse = function(e) {
2772
+ }, te.prototype.unuse = function(e) {
2773
2773
  var t = e.stack, n = e.name, a = e.create;
2774
2774
  return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter(function(i) {
2775
2775
  return a ? i.create !== a : !!n && i.name !== n;
2776
2776
  })), this;
2777
- }, ee.prototype.open = function() {
2777
+ }, te.prototype.open = function() {
2778
2778
  var e = this;
2779
2779
  return Le(Ae, function() {
2780
2780
  return ya(e);
2781
2781
  });
2782
- }, ee.prototype._close = function() {
2782
+ }, te.prototype._close = function() {
2783
2783
  var e = this._state, t = Ze.indexOf(this);
2784
2784
  if (0 <= t && Ze.splice(t, 1), this.idbdb) {
2785
2785
  try {
@@ -2793,10 +2793,10 @@ var jr = { exports: {} };
2793
2793
  }), e.openCanceller = new N(function(n, a) {
2794
2794
  e.cancelOpen = a;
2795
2795
  }));
2796
- }, ee.prototype.close = function(n) {
2796
+ }, te.prototype.close = function(n) {
2797
2797
  var t = (n === void 0 ? { disableAutoOpen: !0 } : n).disableAutoOpen, n = this._state;
2798
2798
  t ? (n.isBeingOpened && n.cancelOpen(new G.DatabaseClosed()), this._close(), n.autoOpen = !1, n.dbOpenError = new G.DatabaseClosed()) : (this._close(), n.autoOpen = this._options.autoOpen || n.isBeingOpened, n.openComplete = !1, n.dbOpenError = null);
2799
- }, ee.prototype.delete = function(e) {
2799
+ }, te.prototype.delete = function(e) {
2800
2800
  var t = this;
2801
2801
  e === void 0 && (e = { disableAutoOpen: !0 });
2802
2802
  var n = 0 < arguments.length && typeof arguments[0] != "object", a = this._state;
@@ -2804,7 +2804,7 @@ var jr = { exports: {} };
2804
2804
  function s() {
2805
2805
  t.close(e);
2806
2806
  var u = t._deps.indexedDB.deleteDatabase(t.name);
2807
- u.onsuccess = J(function() {
2807
+ u.onsuccess = Z(function() {
2808
2808
  var g, f, b;
2809
2809
  g = t._deps, f = t.name, b = g.indexedDB, g = g.IDBKeyRange, kn(b) || f === Tt || xn(b, g).delete(f).catch(Q), i();
2810
2810
  }), u.onerror = ye(o), u.onblocked = t._fireOnBlocked;
@@ -2812,23 +2812,23 @@ var jr = { exports: {} };
2812
2812
  if (n) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
2813
2813
  a.isBeingOpened ? a.dbReadyPromise.then(s) : s();
2814
2814
  });
2815
- }, ee.prototype.backendDB = function() {
2815
+ }, te.prototype.backendDB = function() {
2816
2816
  return this.idbdb;
2817
- }, ee.prototype.isOpen = function() {
2817
+ }, te.prototype.isOpen = function() {
2818
2818
  return this.idbdb !== null;
2819
- }, ee.prototype.hasBeenClosed = function() {
2819
+ }, te.prototype.hasBeenClosed = function() {
2820
2820
  var e = this._state.dbOpenError;
2821
2821
  return e && e.name === "DatabaseClosed";
2822
- }, ee.prototype.hasFailed = function() {
2822
+ }, te.prototype.hasFailed = function() {
2823
2823
  return this._state.dbOpenError !== null;
2824
- }, ee.prototype.dynamicallyOpened = function() {
2824
+ }, te.prototype.dynamicallyOpened = function() {
2825
2825
  return this._state.autoSchema;
2826
- }, Object.defineProperty(ee.prototype, "tables", { get: function() {
2826
+ }, Object.defineProperty(te.prototype, "tables", { get: function() {
2827
2827
  var e = this;
2828
2828
  return T(this._allTables).map(function(t) {
2829
2829
  return e._allTables[t];
2830
2830
  });
2831
- }, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
2831
+ }, enumerable: !1, configurable: !0 }), te.prototype.transaction = function() {
2832
2832
  var e = (function(t, n, a) {
2833
2833
  var i = arguments.length;
2834
2834
  if (i < 2) throw new G.InvalidArgument("Too few arguments");
@@ -2836,7 +2836,7 @@ var jr = { exports: {} };
2836
2836
  return a = o.pop(), [t, Xn(o), a];
2837
2837
  }).apply(this, arguments);
2838
2838
  return this._transaction.apply(this, e);
2839
- }, ee.prototype._transaction = function(e, t, n) {
2839
+ }, te.prototype._transaction = function(e, t, n) {
2840
2840
  var a = this, i = L.trans;
2841
2841
  i && i.db === this && e.indexOf("!") === -1 || (i = null);
2842
2842
  var o, s, u = e.indexOf("?") !== -1;
@@ -2865,7 +2865,7 @@ var jr = { exports: {} };
2865
2865
  } catch (f) {
2866
2866
  return i ? i._promise(null, function(b, d) {
2867
2867
  d(f);
2868
- }) : q(f);
2868
+ }) : ee(f);
2869
2869
  }
2870
2870
  var g = (function f(b, d, v, p, m) {
2871
2871
  return N.resolve().then(function() {
@@ -2876,14 +2876,14 @@ var jr = { exports: {} };
2876
2876
  } catch (O) {
2877
2877
  return O.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
2878
2878
  return f(b, d, v, null, m);
2879
- })) : q(O);
2879
+ })) : ee(O);
2880
2880
  }
2881
2881
  var _, E = tn(m);
2882
2882
  return E && Je(), w = N.follow(function() {
2883
2883
  var O;
2884
2884
  (_ = m.call(y, y)) && (E ? (O = Pe.bind(null, null), _.then(O, O)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Tn(_)));
2885
2885
  }, w), (_ && typeof _.then == "function" ? N.resolve(_).then(function(O) {
2886
- return y.active ? O : q(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2886
+ return y.active ? O : ee(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2887
2887
  }) : w.then(function() {
2888
2888
  return _;
2889
2889
  })).then(function(O) {
@@ -2891,22 +2891,22 @@ var jr = { exports: {} };
2891
2891
  return O;
2892
2892
  });
2893
2893
  }).catch(function(O) {
2894
- return y._reject(O), q(O);
2894
+ return y._reject(O), ee(O);
2895
2895
  });
2896
2896
  });
2897
2897
  }).bind(null, this, o, s, i, n);
2898
2898
  return i ? i._promise(o, g, "lock") : L.trans ? Le(L.transless, function() {
2899
2899
  return a._whenReady(g);
2900
2900
  }) : this._whenReady(g);
2901
- }, ee.prototype.table = function(e) {
2901
+ }, te.prototype.table = function(e) {
2902
2902
  if (!ie(this._allTables, e)) throw new G.InvalidTable("Table ".concat(e, " does not exist"));
2903
2903
  return this._allTables[e];
2904
- }, ee);
2905
- function ee(e, t) {
2904
+ }, te);
2905
+ function te(e, t) {
2906
2906
  var n = this;
2907
2907
  this._middlewares = {}, this.verno = 0;
2908
- var a = ee.dependencies;
2909
- this._options = t = l({ addons: ee.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, a = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
2908
+ var a = te.dependencies;
2909
+ this._options = t = l({ addons: te.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, a = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
2910
2910
  var i, o, s, u, g, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2911
2911
  f.dbReadyPromise = new N(function(d) {
2912
2912
  f.dbReadyResolve = d;
@@ -2914,7 +2914,7 @@ var jr = { exports: {} };
2914
2914
  f.cancelOpen = v;
2915
2915
  }), this._state = f, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [rn, Q] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(d) {
2916
2916
  return function(v, p) {
2917
- ee.vip(function() {
2917
+ te.vip(function() {
2918
2918
  var m, w = n._state;
2919
2919
  w.openComplete ? (w.dbOpenError || N.resolve().then(v), p && d(v)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(v), p && d(v)) : (d(v), m = n, p || d(function y() {
2920
2920
  m.on.ready.unsubscribe(v), m.on.ready.unsubscribe(y);
@@ -2941,7 +2941,7 @@ var jr = { exports: {} };
2941
2941
  y.active = !1, y.on.complete.fire();
2942
2942
  }, function(_) {
2943
2943
  var E = y.active;
2944
- return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), q(_);
2944
+ return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), ee(_);
2945
2945
  });
2946
2946
  })), this.Version = (u = this, ft(ga.prototype, function(d) {
2947
2947
  this.db = u, this._cfg = { version: d, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
@@ -2991,7 +2991,7 @@ var jr = { exports: {} };
2991
2991
  this._subscribe = e;
2992
2992
  }
2993
2993
  try {
2994
- Xt = { indexedDB: P.indexedDB || P.mozIndexedDB || P.webkitIndexedDB || P.msIndexedDB, IDBKeyRange: P.IDBKeyRange || P.webkitIDBKeyRange };
2994
+ Xt = { indexedDB: D.indexedDB || D.mozIndexedDB || D.webkitIndexedDB || D.msIndexedDB, IDBKeyRange: D.IDBKeyRange || D.webkitIDBKeyRange };
2995
2995
  } catch {
2996
2996
  Xt = { indexedDB: null, IDBKeyRange: null };
2997
2997
  }
@@ -3013,14 +3013,14 @@ var jr = { exports: {} };
3013
3013
  var O = Xe();
3014
3014
  try {
3015
3015
  o && Je();
3016
- var k = De(e, E);
3017
- return k = o ? k.finally(Pe) : k;
3016
+ var x = De(e, E);
3017
+ return x = o ? x.finally(Pe) : x;
3018
3018
  } finally {
3019
3019
  O && Ve();
3020
3020
  }
3021
3021
  }(y = { subscr: w, signal: s.signal, requery: v, querier: e, trans: null }), Promise.resolve(_).then(function(E) {
3022
3022
  n = !0, t = E, u || y.signal.aborted || (g = {}, function(O) {
3023
- for (var k in O) if (ie(O, k)) return;
3023
+ for (var x in O) if (ie(O, x)) return;
3024
3024
  return 1;
3025
3025
  }(f = w) || d || (Re(gt, p), d = !0), fn(function() {
3026
3026
  return !u && i.next && i.next(E);
@@ -3066,12 +3066,12 @@ var jr = { exports: {} };
3066
3066
  });
3067
3067
  }) : xn(n, t).toCollection().primaryKeys()).then(e);
3068
3068
  } catch {
3069
- return q(new G.MissingAPI());
3069
+ return ee(new G.MissingAPI());
3070
3070
  }
3071
3071
  var t, n;
3072
3072
  }, defineClass: function() {
3073
3073
  return function(e) {
3074
- Z(this, e);
3074
+ J(this, e);
3075
3075
  };
3076
3076
  }, ignoreTransaction: function(e) {
3077
3077
  return L.trans ? Le(L.transless, e) : e();
@@ -3081,7 +3081,7 @@ var jr = { exports: {} };
3081
3081
  var t = Tn(e.apply(this, arguments));
3082
3082
  return t && typeof t.then == "function" ? t : N.resolve(t);
3083
3083
  } catch (n) {
3084
- return q(n);
3084
+ return ee(n);
3085
3085
  }
3086
3086
  };
3087
3087
  }, spawn: function(e, t, n) {
@@ -3089,7 +3089,7 @@ var jr = { exports: {} };
3089
3089
  var a = Tn(e.apply(n, t || []));
3090
3090
  return a && typeof a.then == "function" ? a : N.resolve(a);
3091
3091
  } catch (i) {
3092
- return q(i);
3092
+ return ee(i);
3093
3093
  }
3094
3094
  }, currentTransaction: { get: function() {
3095
3095
  return L.trans || null;
@@ -3099,7 +3099,7 @@ var jr = { exports: {} };
3099
3099
  return ge;
3100
3100
  }, set: function(e) {
3101
3101
  qn(e);
3102
- } }, derive: ze, extend: Z, props: xe, override: Hn, Events: dt, on: Re, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: ve, setByKeyPath: le, delByKeyPath: function(e, t) {
3102
+ } }, derive: ze, extend: J, props: xe, override: Hn, Events: dt, on: Re, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: ve, setByKeyPath: le, delByKeyPath: function(e, t) {
3103
3103
  typeof t == "string" ? le(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3104
3104
  le(e, n, void 0);
3105
3105
  });
@@ -3144,7 +3144,7 @@ var Ia = jr.exports;
3144
3144
  const Fn = /* @__PURE__ */ Pa(Ia), Tr = Symbol.for("Dexie"), Un = globalThis[Tr] || (globalThis[Tr] = Fn);
3145
3145
  if (Fn.semVer !== Un.semVer)
3146
3146
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Fn.semVer} and ${Un.semVer}`);
3147
- var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), S = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(S || {}), te = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(te || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}), pe = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(pe || {});
3147
+ var K = /* @__PURE__ */ ((h) => (h.MESSAGES = "messages", h.CLOUD = "cloud", h.SERIES = "series", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h.SLIDE = "slide", h))(K || {}), S = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(S || {}), ne = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_MODAL = "closeModal", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.SHOW_MODAL = "showModal", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GOTO = "slideGoto", h.SLIDE_READY = "slideReady", h.SLIDE_LOAD = "loadSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGET_UPDATE = "widgetUpdate", h))(ne || {}), Zt = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(Zt || {}), pe = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(pe || {});
3148
3148
  function X(h) {
3149
3149
  let r = `${h.type}.${h.topics}`;
3150
3150
  return h.order && (r += `.${h.order}`), h.period && (r += `.${h.period}`), r;
@@ -3159,10 +3159,10 @@ function nt(h) {
3159
3159
  }
3160
3160
  function _t(h, r) {
3161
3161
  var B;
3162
- let c, l, x, P, T;
3162
+ let c, l, k, D, T;
3163
3163
  switch (h.moderation) {
3164
3164
  case Zt.BEFORE:
3165
- c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), x = Number.parseInt(l ? l[0] : "00"), P = Number.parseInt(l ? l[1] : "00"), T = Number.parseInt(l ? l[2] : "00"), r.before = c.setHours(x, P, T, 0) / 1e3, r.period || (r.period = c.getDay() === 1 ? 72 : 24);
3165
+ c = /* @__PURE__ */ new Date(), l = (B = h.beforeTime) == null ? void 0 : B.split(":"), k = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), T = Number.parseInt(l ? l[2] : "00"), r.before = c.setHours(k, D, T, 0) / 1e3, r.period || (r.period = c.getDay() === 1 ? 72 : 24);
3166
3166
  break;
3167
3167
  case Zt.DELAYED:
3168
3168
  h.delay && h.delay > 0 && (r.delay = `${h.delay}`);
@@ -3222,9 +3222,9 @@ class Mr {
3222
3222
  * @returns IResponse
3223
3223
  */
3224
3224
  A(this, "getMessages", async (r) => {
3225
- const c = (P) => P.widget_id === r.widget, l = (P) => P.utc > ((r == null ? void 0 : r.since) || 0), x = (P) => (P == null ? void 0 : P.visible) !== 0;
3225
+ const c = (D) => D.widget_id === r.widget, l = (D) => D.utc > ((r == null ? void 0 : r.since) || 0), k = (D) => (D == null ? void 0 : D.visible) !== 0;
3226
3226
  try {
3227
- const P = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(c).filter(l).filter(x).limit((r == null ? void 0 : r.limit) ?? 25).toArray().catch(() => {
3227
+ const D = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(c).filter(l).filter(k).limit((r == null ? void 0 : r.limit) ?? 25).toArray().catch(() => {
3228
3228
  console.warn(
3229
3229
  "%capi%c %cmessages",
3230
3230
  S.API,
@@ -3234,18 +3234,18 @@ class Mr {
3234
3234
  r.widget
3235
3235
  );
3236
3236
  });
3237
- if (P.length === 0)
3237
+ if (D.length === 0)
3238
3238
  return { data: null, message: "No Messages error", success: !1 };
3239
- const T = P[0] ? P[0].title : "No title", B = P.map(
3239
+ const T = D[0] ? D[0].title : "No title", B = D.map(
3240
3240
  (be) => be.message_id
3241
- ), ne = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3241
+ ), q = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3242
3242
  (be) => be.data
3243
3243
  );
3244
3244
  return {
3245
3245
  data: {
3246
3246
  presentation: (r == null ? void 0 : r.presentation) || "not set",
3247
3247
  slide: (r == null ? void 0 : r.slide) || "not set",
3248
- messages: ne,
3248
+ messages: q,
3249
3249
  title: T,
3250
3250
  topics: [r.dashboard, r.widget].join("-"),
3251
3251
  query: r
@@ -3253,8 +3253,8 @@ class Mr {
3253
3253
  message: "Messages retrieved successfully",
3254
3254
  success: !0
3255
3255
  };
3256
- } catch (P) {
3257
- return console.error("%cstorage", S.STORAGE, "set", r, P), { data: null, message: "Messages Data error", success: !1 };
3256
+ } catch (D) {
3257
+ return console.error("%cstorage", S.STORAGE, "set", r, D), { data: null, message: "Messages Data error", success: !1 };
3258
3258
  }
3259
3259
  });
3260
3260
  /**
@@ -3292,47 +3292,54 @@ class Mr {
3292
3292
  if (r.type !== K.MESSAGES)
3293
3293
  return 400;
3294
3294
  const l = c.data.title;
3295
- try {
3296
- return c.data.messages.forEach(async (x) => {
3297
- var P, T, B;
3298
- await this.db.table(K.MESSAGES).put({ id: x.id, utc: x.utc, data: x }), await this.db.table(K.TOPICS).put({
3299
- widget_id: r.widget,
3300
- message_id: x.id,
3301
- dashboard_id: r.dashboard,
3302
- title: l,
3303
- engagement: (P = x.dynamics) == null ? void 0 : P.engagement,
3304
- impressions: (T = x.dynamics) == null ? void 0 : T.semrush_visits,
3305
- reach: (B = x.dynamics) == null ? void 0 : B.potential_reach,
3306
- sentiment: x.topics[0].sentiment,
3307
- utc: x.utc
3308
- });
3309
- }), 201;
3310
- } catch (x) {
3311
- return console.error("%cstorage", S.STORAGE, "set", r, x), 400;
3312
- }
3295
+ let k = 0;
3296
+ return c.data.messages.forEach(async (D) => {
3297
+ var T, B, J;
3298
+ await this.db.table(K.MESSAGES).put({ id: D.id, utc: D.utc, data: D }).catch((q) => {
3299
+ k++, console.error(
3300
+ "%cstorage",
3301
+ S.STORAGE,
3302
+ "set message",
3303
+ D,
3304
+ q
3305
+ );
3306
+ }), await this.db.table(K.TOPICS).put({
3307
+ widget_id: r.widget,
3308
+ message_id: D.id,
3309
+ dashboard_id: r.dashboard,
3310
+ title: l,
3311
+ engagement: (T = D.dynamics) == null ? void 0 : T.engagement,
3312
+ impressions: (B = D.dynamics) == null ? void 0 : B.semrush_visits,
3313
+ reach: (J = D.dynamics) == null ? void 0 : J.potential_reach,
3314
+ sentiment: D.topics[0].sentiment,
3315
+ utc: D.utc
3316
+ }).catch((q) => {
3317
+ k++, console.error("%cstorage", S.STORAGE, "set topic", D, q);
3318
+ });
3319
+ }), k === 0 ? 201 : 400;
3313
3320
  });
3314
3321
  /**
3315
3322
  * Wipe Message data after number of seconds
3316
3323
  * @param retentionDuration
3317
3324
  */
3318
3325
  A(this, "cleanMessages", async (r) => {
3319
- const c = Date.now() / 1e3, l = (P) => P.utc < c - r, x = (P) => P.utc < c - r;
3320
- return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((P, T) => {
3326
+ const c = Date.now() / 1e3, l = (D) => D.utc < c - r, k = (D) => D.utc < c - r;
3327
+ return await this.db.table(K.TOPICS).orderBy("utc").filter(l).modify((D, T) => {
3321
3328
  delete T.value;
3322
- }).catch((P) => (console.error(
3329
+ }).catch((D) => (console.error(
3323
3330
  "%cstorage%c %clean",
3324
3331
  S.STORAGE,
3325
3332
  S.NONE,
3326
3333
  S.MESSAGES,
3327
- P
3328
- ), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(x).modify((P, T) => {
3334
+ D
3335
+ ), 0)), await this.db.table(K.MESSAGES).orderBy("utc").filter(k).modify((D, T) => {
3329
3336
  delete T.value;
3330
- }).catch((P) => (console.error(
3337
+ }).catch((D) => (console.error(
3331
3338
  "%cstorage%c %clean",
3332
3339
  S.STORAGE,
3333
3340
  S.NONE,
3334
3341
  S.MESSAGES,
3335
- P
3342
+ D
3336
3343
  ), 0));
3337
3344
  });
3338
3345
  A(this, "hideMessage", async (r, c) => {
@@ -3406,7 +3413,7 @@ class Mr {
3406
3413
  }).then(() => 201).catch((c) => (console.error(
3407
3414
  "%cstorage",
3408
3415
  S.STORAGE,
3409
- te.SLIDE_STORE,
3416
+ ne.SLIDE_STORE,
3410
3417
  r,
3411
3418
  c
3412
3419
  ), 400)) : 400);
@@ -3434,7 +3441,7 @@ function Ca(h, r) {
3434
3441
  const c = indexedDB.open(h);
3435
3442
  c.onupgradeneeded = () => c.result.createObjectStore(r);
3436
3443
  const l = Wn(c);
3437
- return (x, P) => l.then((T) => P(T.transaction(r, x).objectStore(r)));
3444
+ return (k, D) => l.then((T) => D(T.transaction(r, k).objectStore(r)));
3438
3445
  }
3439
3446
  let Gn;
3440
3447
  function Kr() {
@@ -3472,7 +3479,7 @@ class Nr {
3472
3479
  if (!c.success)
3473
3480
  return 400;
3474
3481
  const l = X(r);
3475
- return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((x) => (console.error("%cstorage", S.STORAGE, K.CLOUD, r, x), 400));
3482
+ return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.CLOUD, r, k), 400));
3476
3483
  });
3477
3484
  /**
3478
3485
  * Update Series
@@ -3484,7 +3491,7 @@ class Nr {
3484
3491
  if (!c.success)
3485
3492
  return 400;
3486
3493
  const l = X(r);
3487
- return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((x) => (console.error("%cstorage", S.STORAGE, K.SERIES, r, x), 400));
3494
+ return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SERIES, r, k), 400));
3488
3495
  });
3489
3496
  /**
3490
3497
  * Update Messages
@@ -3496,7 +3503,7 @@ class Nr {
3496
3503
  if (!c.success)
3497
3504
  return 400;
3498
3505
  const l = X(r);
3499
- return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((x) => (console.error("%cstorage", S.STORAGE, K.MESSAGES, r, x), 400));
3506
+ return delete c.success, delete c.message, await wt(l, c).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.MESSAGES, r, k), 400));
3500
3507
  });
3501
3508
  A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
3502
3509
  A(this, "hideMessage", async (r, c) => {
@@ -3515,7 +3522,7 @@ class Nr {
3515
3522
  dashboard_id: r.dashboard,
3516
3523
  type: r.type
3517
3524
  };
3518
- return await wt(c, l).then(() => 201).catch((x) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, x), 400));
3525
+ return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.WIDGET, r, k), 400));
3519
3526
  });
3520
3527
  /**
3521
3528
  * Add component subscriber
@@ -3554,7 +3561,7 @@ class Nr {
3554
3561
  html: r.data.html || "",
3555
3562
  css: r.data.css || ""
3556
3563
  };
3557
- return await wt(c, l).then(() => 201).catch((x) => (console.error("%cstorage", S.STORAGE, K.SLIDE, r, x), 400));
3564
+ return await wt(c, l).then(() => 201).catch((k) => (console.error("%cstorage", S.STORAGE, K.SLIDE, r, k), 400));
3558
3565
  });
3559
3566
  this.options = r;
3560
3567
  }
@@ -3597,8 +3604,8 @@ class Br {
3597
3604
  const l = X(r);
3598
3605
  try {
3599
3606
  return localStorage.setObject(l, c), 201;
3600
- } catch (x) {
3601
- return console.error("%cstorage", S.STORAGE, K.CLOUD, r, x), 400;
3607
+ } catch (k) {
3608
+ return console.error("%cstorage", S.STORAGE, K.CLOUD, r, k), 400;
3602
3609
  }
3603
3610
  });
3604
3611
  /**
@@ -3611,8 +3618,8 @@ class Br {
3611
3618
  const l = X(r);
3612
3619
  try {
3613
3620
  return localStorage.setObject(l, c), 201;
3614
- } catch (x) {
3615
- return console.error("%cstorage", S.STORAGE, K.SERIES, r, x), 400;
3621
+ } catch (k) {
3622
+ return console.error("%cstorage", S.STORAGE, K.SERIES, r, k), 400;
3616
3623
  }
3617
3624
  });
3618
3625
  /**
@@ -3625,8 +3632,8 @@ class Br {
3625
3632
  const l = X(r);
3626
3633
  try {
3627
3634
  return localStorage.setObject(l, c), 200;
3628
- } catch (x) {
3629
- return console.error("%cstorage", S.STORAGE, K.MESSAGES, r, x), 400;
3635
+ } catch (k) {
3636
+ return console.error("%cstorage", S.STORAGE, K.MESSAGES, r, k), 400;
3630
3637
  }
3631
3638
  });
3632
3639
  A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
@@ -3727,8 +3734,8 @@ class Lr {
3727
3734
  const l = X(r);
3728
3735
  try {
3729
3736
  return sessionStorage.setObject(l, c), 201;
3730
- } catch (x) {
3731
- return console.error("%cstorage", S.STORAGE, K.CLOUD, r, x), 400;
3737
+ } catch (k) {
3738
+ return console.error("%cstorage", S.STORAGE, K.CLOUD, r, k), 400;
3732
3739
  }
3733
3740
  });
3734
3741
  /**
@@ -3741,8 +3748,8 @@ class Lr {
3741
3748
  const l = X(r);
3742
3749
  try {
3743
3750
  return sessionStorage.setObject(l, c), 201;
3744
- } catch (x) {
3745
- return console.error("%cstorage", S.STORAGE, K.SERIES, r, x), 400;
3751
+ } catch (k) {
3752
+ return console.error("%cstorage", S.STORAGE, K.SERIES, r, k), 400;
3746
3753
  }
3747
3754
  });
3748
3755
  /**
@@ -3755,8 +3762,8 @@ class Lr {
3755
3762
  const l = X(r);
3756
3763
  try {
3757
3764
  return sessionStorage.setObject(l, c), 200;
3758
- } catch (x) {
3759
- return console.error("%cstorage", S.STORAGE, K.MESSAGES, r, x), 400;
3765
+ } catch (k) {
3766
+ return console.error("%cstorage", S.STORAGE, K.MESSAGES, r, k), 400;
3760
3767
  }
3761
3768
  });
3762
3769
  A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
@@ -3862,8 +3869,8 @@ class Gr {
3862
3869
  const l = X(r);
3863
3870
  try {
3864
3871
  return window.BuzzCasting.WidgetData[l] = c, 201;
3865
- } catch (x) {
3866
- return console.error("%cstorage", S.STORAGE, "set", r, x), 400;
3872
+ } catch (k) {
3873
+ return console.error("%cstorage", S.STORAGE, "set", r, k), 400;
3867
3874
  }
3868
3875
  });
3869
3876
  /**
@@ -3876,8 +3883,8 @@ class Gr {
3876
3883
  const l = X(r);
3877
3884
  try {
3878
3885
  return window.BuzzCasting.WidgetData[l] = c, 201;
3879
- } catch (x) {
3880
- return console.error("%cstorage", S.STORAGE, "set", r, x), 400;
3886
+ } catch (k) {
3887
+ return console.error("%cstorage", S.STORAGE, "set", r, k), 400;
3881
3888
  }
3882
3889
  });
3883
3890
  /**
@@ -3890,8 +3897,8 @@ class Gr {
3890
3897
  const l = X(r);
3891
3898
  try {
3892
3899
  return window.BuzzCasting.WidgetData[l] = c, 201;
3893
- } catch (x) {
3894
- return console.error("%cstorage", S.STORAGE, "set", r, x), 400;
3900
+ } catch (k) {
3901
+ return console.error("%cstorage", S.STORAGE, "set", r, k), 400;
3895
3902
  }
3896
3903
  });
3897
3904
  A(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((c) => c(0))));
@@ -3959,10 +3966,10 @@ function Ga(h) {
3959
3966
  let r = "", c = "", l = {
3960
3967
  backgroundImage: ""
3961
3968
  };
3962
- return typeof h.media < "u" && h.media.forEach((x) => {
3963
- (x.type === "photo" || x.type === "image") && (l = {
3964
- backgroundImage: `url(${x.url})`
3965
- }, c = x.url), x.type === "video" && (r = x.url);
3969
+ return typeof h.media < "u" && h.media.forEach((k) => {
3970
+ (k.type === "photo" || k.type === "image") && (l = {
3971
+ backgroundImage: `url(${k.url})`
3972
+ }, c = k.url), k.type === "video" && (r = k.url);
3966
3973
  }), {
3967
3974
  image: c,
3968
3975
  background: l || null,
@@ -4047,39 +4054,39 @@ function ja(h, r) {
4047
4054
  return h;
4048
4055
  }
4049
4056
  function Oe(h, r) {
4050
- let c, l, x;
4057
+ let c, l, k;
4051
4058
  if (r.length === 0)
4052
4059
  return h;
4053
- for (c = 0, x = r.length; c < x; c++)
4060
+ for (c = 0, k = r.length; c < k; c++)
4054
4061
  l = r.charCodeAt(c), h = (h << 5) - h + l, h |= 0;
4055
4062
  return h < 0 ? h * -2 : h;
4056
4063
  }
4057
4064
  function Ma(h, r, c) {
4058
4065
  return Object.keys(r).sort().reduce(l, h);
4059
- function l(x, P) {
4060
- return $r(x, r[P], P, c);
4066
+ function l(k, D) {
4067
+ return $r(k, r[D], D, c);
4061
4068
  }
4062
4069
  }
4063
4070
  function $r(h, r, c, l) {
4064
- const x = Oe(Oe(Oe(h, c), Ka(r)), typeof r);
4071
+ const k = Oe(Oe(Oe(h, c), Ka(r)), typeof r);
4065
4072
  if (r === null)
4066
- return Oe(x, "null");
4073
+ return Oe(k, "null");
4067
4074
  if (r === void 0)
4068
- return Oe(x, "undefined");
4075
+ return Oe(k, "undefined");
4069
4076
  if (typeof r == "object" || typeof r == "function") {
4070
4077
  if (l.includes(r))
4071
- return Oe(x, `[Circular]${c}`);
4078
+ return Oe(k, `[Circular]${c}`);
4072
4079
  l.push(r);
4073
- const P = Ma(x, r, l);
4080
+ const D = Ma(k, r, l);
4074
4081
  if (!("valueOf" in r) || typeof r.valueOf != "function")
4075
- return P;
4082
+ return D;
4076
4083
  try {
4077
- return Oe(P, String(r.valueOf()));
4084
+ return Oe(D, String(r.valueOf()));
4078
4085
  } catch (T) {
4079
- return Oe(P, `[valueOf exception]${T.stack || T.message}`);
4086
+ return Oe(D, `[valueOf exception]${T.stack || T.message}`);
4080
4087
  }
4081
4088
  }
4082
- return Oe(x, r.toString());
4089
+ return Oe(k, r.toString());
4083
4090
  }
4084
4091
  function Ka(h) {
4085
4092
  return Object.prototype.toString.call(h);
@@ -4113,10 +4120,10 @@ function Ya(h, r) {
4113
4120
  { value: 1e15, symbol: "P" },
4114
4121
  { value: 1e18, symbol: "E" }
4115
4122
  ], l = /\.0+$|(\.\d*[1-9])0+$/;
4116
- let x;
4117
- for (x = c.length - 1; x > 0 && !(h >= c[x].value); x--)
4123
+ let k;
4124
+ for (k = c.length - 1; k > 0 && !(h >= c[k].value); k--)
4118
4125
  ;
4119
- return (h / c[x].value).toFixed(r).replace(l, "$1") + c[x].symbol;
4126
+ return (h / c[k].value).toFixed(r).replace(l, "$1") + c[k].symbol;
4120
4127
  }
4121
4128
  function Qa(h) {
4122
4129
  switch (h.language) {
@@ -4131,10 +4138,10 @@ function Qa(h) {
4131
4138
  }
4132
4139
  function Xa(h) {
4133
4140
  return h.forEach((r) => {
4134
- var c, l, x;
4135
- if (r.content = r.content.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, ""), r.sender !== null ? (((c = r.sender) == null ? void 0 : c.title) === "Unknown author" && (r.sender.title = ""), ((l = r.sender) == null ? void 0 : l.name) !== "" && r.sender.title === "" && (r.sender.title = r.sender.name), ((x = r.sender) == null ? void 0 : x.name) !== "" && r.channel === "tw" && (r.sender.name = `@${r.sender.name}`)) : r.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, r.sender.title === "" && r.link !== "") {
4136
- const P = new URL(r.link);
4137
- r.sender.title = P.hostname.replace("www.", "");
4141
+ var c, l, k;
4142
+ if (r.content = r.content.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, ""), r.sender !== null ? (((c = r.sender) == null ? void 0 : c.title) === "Unknown author" && (r.sender.title = ""), ((l = r.sender) == null ? void 0 : l.name) !== "" && r.sender.title === "" && (r.sender.title = r.sender.name), ((k = r.sender) == null ? void 0 : k.name) !== "" && r.channel === "tw" && (r.sender.name = `@${r.sender.name}`)) : r.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, r.sender.title === "" && r.link !== "") {
4143
+ const D = new URL(r.link);
4144
+ r.sender.title = D.hostname.replace("www.", "");
4138
4145
  }
4139
4146
  }), h;
4140
4147
  }
@@ -4159,23 +4166,23 @@ class Ja {
4159
4166
  if (c.length === 0)
4160
4167
  return;
4161
4168
  const l = [];
4162
- r ? l.push(this.api.get(r)) : c == null || c.forEach((x) => {
4163
- l.push(this.api.get(x));
4169
+ r ? l.push(this.api.get(r)) : c == null || c.forEach((k) => {
4170
+ l.push(this.api.get(k));
4164
4171
  }), await Promise.allSettled(l).then(
4165
- (x) => x.forEach(async (P) => {
4172
+ (k) => k.forEach(async (D) => {
4166
4173
  let T = 400;
4167
- if (P.status === "fulfilled") {
4168
- const B = P.value;
4174
+ if (D.status === "fulfilled") {
4175
+ const B = D.value;
4169
4176
  if (this.sm === null)
4170
4177
  return 400;
4171
4178
  if (B.success === !0) {
4172
- const Z = this.sm.subscribers.filter(
4179
+ const J = this.sm.subscribers.filter(
4173
4180
  (be) => be.widget === B.query.widget
4174
4181
  )[0];
4175
- let ne = "";
4182
+ let q = "";
4176
4183
  switch (B.query.type) {
4177
4184
  case K.MESSAGES:
4178
- if (ne = $n(B.data.messages), Z.hash === ne)
4185
+ if (q = $n(B.data.messages), J.hash === q)
4179
4186
  return console.debug(
4180
4187
  "%capi%c %cno updates",
4181
4188
  S.API,
@@ -4185,10 +4192,10 @@ class Ja {
4185
4192
  B.query.slide,
4186
4193
  B.query.widget
4187
4194
  ), 204;
4188
- Z.hash = ne, T = await this.sm.setMessages(B.query, B);
4195
+ J.hash = q, T = await this.sm.setMessages(B.query, B);
4189
4196
  break;
4190
4197
  case K.CLOUD:
4191
- ne = $n(B.data), Z.hash === ne ? (console.debug(
4198
+ q = $n(B.data), J.hash === q ? (console.debug(
4192
4199
  "%capi%c %cno updates",
4193
4200
  S.API,
4194
4201
  S.NONE,
@@ -4196,10 +4203,10 @@ class Ja {
4196
4203
  K.CLOUD,
4197
4204
  B.query.slide,
4198
4205
  B.query.widget
4199
- ), T = 204) : (Z.hash = ne, T = await this.sm.setCloud(B.query, B));
4206
+ ), T = 204) : (J.hash = q, T = await this.sm.setCloud(B.query, B));
4200
4207
  break;
4201
4208
  case K.SERIES:
4202
- ne = $n(B.data), Z.hash === ne ? (console.debug(
4209
+ q = $n(B.data), J.hash === q ? (console.debug(
4203
4210
  "%capi%c %cno updates",
4204
4211
  S.API,
4205
4212
  S.NONE,
@@ -4207,7 +4214,7 @@ class Ja {
4207
4214
  K.SERIES,
4208
4215
  B.query.slide,
4209
4216
  B.query.widget
4210
- ), T = 204) : (Z.hash = ne, T = await this.sm.setSeries(B.query, B));
4217
+ ), T = 204) : (J.hash = q, T = await this.sm.setSeries(B.query, B));
4211
4218
  break;
4212
4219
  default:
4213
4220
  console.warn(
@@ -4230,7 +4237,7 @@ class Ja {
4230
4237
  S.BROADCAST,
4231
4238
  B.query.slide,
4232
4239
  B.data.title ?? B.query.widget
4233
- ), this.bc.postMessage({ event: te.WIDGET_UPDATE, data: B });
4240
+ ), this.bc.postMessage({ event: ne.WIDGET_UPDATE, data: B });
4234
4241
  break;
4235
4242
  case 400:
4236
4243
  console.warn(
@@ -4250,7 +4257,7 @@ class Ja {
4250
4257
  S.API,
4251
4258
  S.NONE,
4252
4259
  S.STORAGE,
4253
- te.ERROR
4260
+ ne.ERROR
4254
4261
  ), 400;
4255
4262
  })
4256
4263
  );
@@ -4261,24 +4268,24 @@ class Ja {
4261
4268
  A(this, "actions", async (r) => {
4262
4269
  var c;
4263
4270
  switch (r.data.event) {
4264
- case te.SUBSCRIBE:
4271
+ case ne.SUBSCRIBE:
4265
4272
  (c = this.sm) == null || c.subscribe(r.data.data);
4266
4273
  break;
4267
- case te.UPDATE:
4274
+ case ne.UPDATE:
4268
4275
  console.debug(
4269
4276
  "%capi%c %cstorage",
4270
4277
  S.API,
4271
4278
  S.NONE,
4272
4279
  S.STORAGE,
4273
- te.UPDATE,
4280
+ ne.UPDATE,
4274
4281
  r.data
4275
4282
  ), await this.update();
4276
4283
  break;
4277
4284
  }
4278
4285
  });
4279
4286
  A(this, "cleanMessages", async () => {
4280
- var l, x;
4281
- const r = ((l = this.options) == null ? void 0 : l.retention) || 345600, c = await ((x = this.sm) == null ? void 0 : x.cleanMessages(
4287
+ var l, k;
4288
+ const r = ((l = this.options) == null ? void 0 : l.retention) || 345600, c = await ((k = this.sm) == null ? void 0 : k.cleanMessages(
4282
4289
  r
4283
4290
  ));
4284
4291
  console.info(
@@ -4308,7 +4315,7 @@ class Ja {
4308
4315
  A(this, "loadSlide", async (r) => await this.api.loadSlide(r));
4309
4316
  A(this, "storeSlide", async (r) => {
4310
4317
  var c;
4311
- return console.log(r), await ((c = this.sm) == null ? void 0 : c.storeSlide(r).then(async () => r != null && r.update && r.update ? await this.api.storeSlide(r) : new Promise((l, x) => {
4318
+ return console.log(r), await ((c = this.sm) == null ? void 0 : c.storeSlide(r).then(async () => r != null && r.update && r.update ? await this.api.storeSlide(r) : new Promise((l, k) => {
4312
4319
  l(201);
4313
4320
  })));
4314
4321
  });
@@ -4318,7 +4325,7 @@ class Ja {
4318
4325
  S.NONE,
4319
4326
  S.SLIDE,
4320
4327
  r.slide,
4321
- te.VERSION,
4328
+ ne.VERSION,
4322
4329
  Aa
4323
4330
  ), this.options = r, this.sm = null;
4324
4331
  const c = (r == null ? void 0 : r.slide) || r.app;
@@ -4327,11 +4334,11 @@ class Ja {
4327
4334
  S.API,
4328
4335
  S.NONE,
4329
4336
  S.BROADCAST,
4330
- te.CHANNEL,
4337
+ ne.CHANNEL,
4331
4338
  c
4332
4339
  ), this.bc.onmessage = (l) => {
4333
4340
  this.actions(l);
4334
- }, this.bc.postMessage({ event: te.STORAGE_INIT, data: {} }), this.api = new Da(r), r.storage) {
4341
+ }, this.bc.postMessage({ event: ne.STORAGE_INIT, data: {} }), this.api = new Da(r), r.storage) {
4335
4342
  case pe.DEXIE:
4336
4343
  this.sm = new Mr(r);
4337
4344
  break;
@@ -4532,19 +4539,19 @@ class Za {
4532
4539
  A(this, "showModal", (r) => {
4533
4540
  const c = Ra(this.element.attributes);
4534
4541
  if (Object.prototype.hasOwnProperty.call(c, "data-topics")) {
4535
- const P = c["data-topics"].split("-");
4536
- P.length > 1 ? (c["data-widget"] = P[1], c["data-dashboard"] = P[0]) : (c["data-widget"] = P[0], c["data-dashboard"] = this.query.slide);
4542
+ const D = c["data-topics"].split("-");
4543
+ D.length > 1 ? (c["data-widget"] = D[1], c["data-dashboard"] = D[0]) : (c["data-widget"] = D[0], c["data-dashboard"] = this.query.slide);
4537
4544
  }
4538
4545
  const l = { ...r.props, ...c };
4539
4546
  console.debug(
4540
4547
  "%cwidget",
4541
4548
  S.WIDGET,
4542
- te.SHOW_MODAL,
4549
+ ne.SHOW_MODAL,
4543
4550
  r.showComponent,
4544
4551
  // @ts-expect-error cannot get string type out of IFilteredAttributes props
4545
4552
  c["data-widget"]
4546
4553
  );
4547
- const x = new CustomEvent(te.SHOW_MODAL, {
4554
+ const k = new CustomEvent(ne.SHOW_MODAL, {
4548
4555
  detail: {
4549
4556
  component: r.showComponent,
4550
4557
  props: l,
@@ -4554,14 +4561,14 @@ class Za {
4554
4561
  cancelable: !0,
4555
4562
  composed: !0
4556
4563
  });
4557
- window.dispatchEvent(x);
4564
+ window.dispatchEvent(k);
4558
4565
  });
4559
4566
  var T;
4560
4567
  this.element = r, this.listeners = c, l = typeof l < "u" ? l : "buzzcasting-slide";
4561
- let x;
4562
- x = { ...r.dataset }, delete x.hmr, x.slide = ((T = r.closest(l.toUpperCase())) == null ? void 0 : T.id) ?? `${l} not found`, x = nt(x), this.query = x, Ta(r);
4563
- const P = window.BuzzCasting.getOptions();
4564
- this.storageReader = new Na(P), this.broadcastChannel = new BroadcastChannel(x.slide), this.startListener();
4568
+ let k;
4569
+ k = { ...r.dataset }, delete k.hmr, k.slide = ((T = r.closest(l.toUpperCase())) == null ? void 0 : T.id) ?? `${l} not found`, k = nt(k), this.query = k, Ta(r);
4570
+ const D = window.BuzzCasting.getOptions();
4571
+ this.storageReader = new Na(D), this.broadcastChannel = new BroadcastChannel(k.slide), this.startListener();
4565
4572
  }
4566
4573
  addListener(r) {
4567
4574
  this.listeners.push(r);
@@ -4574,12 +4581,12 @@ class Za {
4574
4581
  this.broadcastChannel.onmessage = async (c) => {
4575
4582
  const l = c.data.data;
4576
4583
  switch (c.data.event) {
4577
- case te.WIDGET_UPDATE:
4578
- l.query.slide === r.slide && l.query.widget === r.widget && this.listeners.forEach((x) => {
4579
- x(c.data.data);
4584
+ case ne.WIDGET_UPDATE:
4585
+ l.query.slide === r.slide && l.query.widget === r.widget && this.listeners.forEach((k) => {
4586
+ k(c.data.data);
4580
4587
  });
4581
4588
  break;
4582
- case te.SLIDE_READY:
4589
+ case ne.SLIDE_READY:
4583
4590
  this.subscribe();
4584
4591
  break;
4585
4592
  }
@@ -4598,7 +4605,7 @@ class Za {
4598
4605
  this.query.slide,
4599
4606
  this.query.widget
4600
4607
  ), this.broadcastChannel.postMessage({
4601
- event: te.SUBSCRIBE,
4608
+ event: ne.SUBSCRIBE,
4602
4609
  data: this.query
4603
4610
  });
4604
4611
  }
@@ -4611,7 +4618,7 @@ export {
4611
4618
  Ja as BuzzcastingStorageManager,
4612
4619
  Na as BuzzcastingStorageReader,
4613
4620
  S as CSS,
4614
- te as EVENTS,
4621
+ ne as EVENTS,
4615
4622
  Zt as MODERATION,
4616
4623
  pe as STORAGE,
4617
4624
  Za as Widget,