buzzcasting-storage 3.0.17 → 3.0.19

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,8 +1,8 @@
1
1
  var xa = Object.defineProperty;
2
2
  var Aa = (d, r, o) => r in d ? xa(d, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : d[r] = o;
3
3
  var k = (d, r, o) => Aa(d, typeof r != "symbol" ? r + "" : r, o);
4
- var N = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(N || {}), m = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(m || {}), re = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_UPDATE = "widgetUpdate", d))(re || {}), Zt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Zt || {}), ye = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ye || {});
5
- const ka = "3.0.16";
4
+ var N = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(N || {}), g = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(g || {}), re = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_UPDATE = "widgetUpdate", d))(re || {}), Zt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Zt || {}), ye = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ye || {});
5
+ const ka = "3.0.18";
6
6
  class Da {
7
7
  constructor(r) {
8
8
  k(this, "options");
@@ -32,81 +32,92 @@ class Da {
32
32
  this.options = r, this.url = `https://${r.app}.buzzcasting.net`;
33
33
  }
34
34
  async get(r) {
35
+ var K, L;
35
36
  const { version: o } = this.options, l = this.headers(), x = Object.assign({}, r);
36
37
  delete x.slide, delete x.type, delete x.hash, delete x.order, delete x.period;
37
38
  const D = Object.keys(x).length > 0 ? `?${new URLSearchParams(x).toString()}` : "";
38
- return console.info(
39
+ return ((K = window.BuzzCasting) == null ? void 0 : K.LOG_LEVEL) > 2 && console.info(
39
40
  "%capi%c %cfetch",
40
- m.API,
41
- m.NONE,
42
- m.GET_DATA,
41
+ g.API,
42
+ g.NONE,
43
+ g.GET_DATA,
43
44
  r.widget
44
- ), console.debug("%capi%c %cfetch", m.API, m.NONE, m.GET_DATA, x), await fetch(
45
+ ), ((L = window.BuzzCasting) == null ? void 0 : L.LOG_LEVEL) > 3 && console.debug("%capi%c %cfetch", g.API, g.NONE, g.GET_DATA, x), await fetch(
45
46
  [this.url, "api", o, r.type].join("/") + D,
46
47
  { ...l, method: "get" }
47
- ).then(async (K) => {
48
- if (!K.ok)
49
- throw new Error(`${K.status}`);
50
- return K;
51
- }).then((K) => K.json()).then((K) => (K.query = r, K)).catch((K) => ({ success: !1, message: `${K}`, data: null }));
48
+ ).then(async (P) => {
49
+ if (!P.ok)
50
+ throw new Error(`${P.status}`);
51
+ return P;
52
+ }).then((P) => P.json()).then((P) => (P.query = r, P)).catch((P) => ({ success: !1, message: `${P}`, data: null }));
52
53
  }
53
54
  async hideMessage(r) {
55
+ var D, K;
54
56
  const { version: o } = this.options, l = this.headers(), x = "?action=visible";
55
- return console.info(
57
+ return ((D = window.BuzzCasting) == null ? void 0 : D.LOG_LEVEL) > 2 && console.info(
56
58
  "%capi%c %cput",
57
- m.API,
58
- m.NONE,
59
- m.GET_DATA,
59
+ g.API,
60
+ g.NONE,
61
+ g.GET_DATA,
60
62
  re.HIDE_MESSAGE,
61
63
  r.widget,
62
64
  r.id
65
+ ), ((K = window.BuzzCasting) == null ? void 0 : K.LOG_LEVEL) > 3 && console.debug(
66
+ "%capi%c %cput",
67
+ g.API,
68
+ g.NONE,
69
+ g.GET_DATA,
70
+ re.HIDE_MESSAGE,
71
+ r
63
72
  ), await fetch(
64
73
  [this.url, "api", o, "messages", r.id].join("/") + x,
65
74
  { ...l, method: "put" }
66
- ).then((D) => {
67
- if (!D.ok)
68
- throw new Error(D.statusText);
69
- return D;
70
- }).then((D) => D.json()).catch((D) => ({ succes: !1, message: D, data: [] }));
75
+ ).then((L) => {
76
+ if (!L.ok)
77
+ throw new Error(L.statusText);
78
+ return L;
79
+ }).then((L) => L.json()).catch((L) => ({ succes: !1, message: L, data: [] }));
71
80
  }
72
81
  async hideLabels(r) {
82
+ var K;
73
83
  const { version: o } = this.options, l = this.formHeaders(), x = new URLSearchParams(), D = r.labels || [];
74
- for (const [K, U] of D.entries())
75
- x.append(`custom_filters[${K}]`, U);
76
- return console.info(
84
+ for (const [L, P] of D.entries())
85
+ x.append(`custom_filters[${L}]`, P);
86
+ return ((K = window.BuzzCasting) == null ? void 0 : K.LOG_LEVEL) > 2 && console.info(
77
87
  "%capi%c %cput",
78
- m.API,
79
- m.NONE,
80
- m.GET_DATA,
88
+ g.API,
89
+ g.NONE,
90
+ g.GET_DATA,
81
91
  re.HIDE_LABELS,
82
92
  r.widget,
83
93
  D
84
94
  ), await fetch(
85
95
  [this.url, "api", o, r.type, r.widget].join("/"),
86
96
  { ...l, body: x, method: "put" }
87
- ).then((K) => {
88
- if (!K.ok)
89
- throw new Error(K.statusText);
90
- return K;
91
- }).then((K) => K.json()).catch((K) => ({ succes: !1, message: K, data: [] }));
97
+ ).then((L) => {
98
+ if (!L.ok)
99
+ throw new Error(L.statusText);
100
+ return L;
101
+ }).then((L) => L.json()).catch((L) => ({ succes: !1, message: L, data: [] }));
92
102
  }
93
103
  async loadSlide(r) {
104
+ var D;
94
105
  const { version: o } = this.options, l = this.headers(), x = Object.assign({}, r);
95
- return delete x.slide, delete x.type, delete x.hash, console.debug(
106
+ return delete x.slide, delete x.type, delete x.hash, ((D = window.BuzzCasting) == null ? void 0 : D.LOG_LEVEL) > 3 && console.debug(
96
107
  "%capi%c %cloadSlide",
97
- m.API,
98
- m.NONE,
99
- m.SLIDE,
108
+ g.API,
109
+ g.NONE,
110
+ g.SLIDE,
100
111
  re.SLIDE_LOAD,
101
112
  r.slide
102
113
  ), await fetch(
103
114
  [this.url, "api", o, "slides", r.id].join("/"),
104
115
  { ...l, method: "get" }
105
- ).then(async (D) => {
106
- if (!D.ok)
107
- throw new Error(`${D.status}`);
108
- return D;
109
- }).then((D) => D.json()).then((D) => (D.query = r, D)).catch((D) => ({ success: !1, message: `${D}`, data: null }));
116
+ ).then(async (K) => {
117
+ if (!K.ok)
118
+ throw new Error(`${K.status}`);
119
+ return K;
120
+ }).then((K) => K.json()).then((K) => (K.query = r, K)).catch((K) => ({ success: !1, message: `${K}`, data: null }));
110
121
  }
111
122
  /**
112
123
  * Store slide definition
@@ -121,11 +132,18 @@ class Da {
121
132
  const x = JSON.stringify(r);
122
133
  return console.info(
123
134
  "%capi%c %cput",
124
- m.API,
125
- m.NONE,
126
- m.SLIDE,
135
+ g.API,
136
+ g.NONE,
137
+ g.SLIDE,
127
138
  re.SLIDE_STORE,
128
139
  r.id
140
+ ), console.debug(
141
+ "%capi%c %cput",
142
+ g.API,
143
+ g.NONE,
144
+ g.SLIDE,
145
+ re.SLIDE_STORE,
146
+ r
129
147
  ), await fetch(
130
148
  [this.url, "api", o, "slides", r.id].join("/"),
131
149
  { ...l, body: x, method: "put" }
@@ -162,8 +180,8 @@ function Ra() {
162
180
  for (var a, i = 0, s = t.length; i < s; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
163
181
  return e.concat(a || Array.prototype.slice.call(t));
164
182
  }
165
- var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Pa, K = Object.keys, U = Array.isArray;
166
- function M(e, t) {
183
+ var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Pa, K = Object.keys, L = Array.isArray;
184
+ function P(e, t) {
167
185
  return typeof t != "object" || K(t).forEach(function(n) {
168
186
  e[n] = t[n];
169
187
  }), e;
@@ -180,7 +198,7 @@ function Ra() {
180
198
  }
181
199
  var He = Object.defineProperty;
182
200
  function xe(e, t, n, a) {
183
- He(e, t, M(n && ee(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
201
+ He(e, t, P(n && ee(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
184
202
  }
185
203
  function Ye(e) {
186
204
  return { from: function(t) {
@@ -188,7 +206,7 @@ function Ra() {
188
206
  } };
189
207
  }
190
208
  var Ur = Object.getOwnPropertyDescriptor, Fr = [].slice;
191
- function _t(e, t, n) {
209
+ function St(e, t, n) {
192
210
  return Fr.call(e, t, n);
193
211
  }
194
212
  function Hn(e, t) {
@@ -222,7 +240,7 @@ function Ra() {
222
240
  for (var a = 0, i = t.length; a < i; ++a) fe(e, t[a], n[a]);
223
241
  } else {
224
242
  var s, u, c = t.indexOf(".");
225
- c !== -1 ? (s = t.substr(0, c), (u = t.substr(c + 1)) === "" ? n === void 0 ? U(e) && !isNaN(parseInt(s)) ? e.splice(s, 1) : delete e[s] : e[s] = n : fe(c = !(c = e[s]) || !ee(e, s) ? e[s] = {} : c, u, n)) : n === void 0 ? U(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
243
+ c !== -1 ? (s = t.substr(0, c), (u = t.substr(c + 1)) === "" ? n === void 0 ? L(e) && !isNaN(parseInt(s)) ? e.splice(s, 1) : delete e[s] : e[s] = n : fe(c = !(c = e[s]) || !ee(e, s) ? e[s] = {} : c, u, n)) : n === void 0 ? L(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
226
244
  }
227
245
  }
228
246
  function Qn(e) {
@@ -240,7 +258,7 @@ function Ra() {
240
258
  });
241
259
  }))).filter(function(e) {
242
260
  return D[e];
243
- }), Jn = new Set(Ne.map(function(e) {
261
+ }), Vn = new Set(Ne.map(function(e) {
244
262
  return D[e];
245
263
  })), it = null;
246
264
  function Te(e) {
@@ -248,10 +266,10 @@ function Ra() {
248
266
  if (!n || typeof n != "object") return n;
249
267
  var a = it.get(n);
250
268
  if (a) return a;
251
- if (U(n)) {
269
+ if (L(n)) {
252
270
  a = [], it.set(n, a);
253
271
  for (var i = 0, s = n.length; i < s; ++i) a.push(t(n[i]));
254
- } else if (Jn.has(n.constructor)) a = n;
272
+ } else if (Vn.has(n.constructor)) a = n;
255
273
  else {
256
274
  var u, c = X(n);
257
275
  for (u in a = c === Object.prototype ? {} : Object.create(c), it.set(n, a), n) ee(n, u) && (a[u] = t(n[u]));
@@ -273,10 +291,10 @@ function Ra() {
273
291
  return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
274
292
  }
275
293
  var Qe = {};
276
- function Se(e) {
294
+ function _e(e) {
277
295
  var t, n, a, i;
278
296
  if (arguments.length === 1) {
279
- if (U(e)) return e.slice();
297
+ if (L(e)) return e.slice();
280
298
  if (this === Qe && typeof e == "string") return [e];
281
299
  if (i = Hr(e)) {
282
300
  for (n = []; !(a = i.next()).done; ) n.push(a.value);
@@ -298,7 +316,7 @@ function Ra() {
298
316
  function Xe(e, t) {
299
317
  this.name = e, this.message = t;
300
318
  }
301
- function Vn(e, t) {
319
+ function Jn(e, t) {
302
320
  return e + ". Errors: " + Object.keys(t).map(function(n) {
303
321
  return t[n].toString();
304
322
  }).filter(function(n, a, i) {
@@ -307,19 +325,19 @@ function Ra() {
307
325
  `);
308
326
  }
309
327
  function Et(e, t, n, a) {
310
- this.failures = t, this.failedKeys = a, this.successCount = n, this.message = Vn(e, t);
328
+ this.failures = t, this.failedKeys = a, this.successCount = n, this.message = Jn(e, t);
311
329
  }
312
- function Je(e, t) {
330
+ function Ve(e, t) {
313
331
  this.name = "BulkError", this.failures = Object.keys(t).map(function(n) {
314
332
  return t[n];
315
- }), this.failuresByPos = t, this.message = Vn(e, this.failures);
333
+ }), this.failuresByPos = t, this.message = Jn(e, this.failures);
316
334
  }
317
335
  Ye(Xe).from(Error).extend({ toString: function() {
318
336
  return this.name + ": " + this.message;
319
- } }), Ye(Et).from(Xe), Ye(Je).from(Xe);
337
+ } }), Ye(Et).from(Xe), Ye(Ve).from(Xe);
320
338
  var an = ge.reduce(function(e, t) {
321
339
  return e[t] = t + "Error", e;
322
- }, {}), Qr = Xe, $ = ge.reduce(function(e, t) {
340
+ }, {}), Qr = Xe, U = ge.reduce(function(e, t) {
323
341
  var n = t + "Error";
324
342
  function a(i, s) {
325
343
  this.name = n, i ? typeof i == "string" ? (this.message = "".concat(i).concat(s ? `
@@ -327,13 +345,13 @@ function Ra() {
327
345
  }
328
346
  return Ye(a).from(Qr), e[t] = a, e;
329
347
  }, {});
330
- $.Syntax = SyntaxError, $.Type = TypeError, $.Range = RangeError;
348
+ U.Syntax = SyntaxError, U.Type = TypeError, U.Range = RangeError;
331
349
  var Zn = ut.reduce(function(e, t) {
332
- return e[t + "Error"] = $[t], e;
350
+ return e[t + "Error"] = U[t], e;
333
351
  }, {}), Ot = ge.reduce(function(e, t) {
334
- return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = $[t]), e;
352
+ return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = U[t]), e;
335
353
  }, {});
336
- function J() {
354
+ function V() {
337
355
  }
338
356
  function st(e) {
339
357
  return e;
@@ -348,8 +366,8 @@ function Ra() {
348
366
  e.apply(this, arguments), t.apply(this, arguments);
349
367
  };
350
368
  }
351
- function Jr(e, t) {
352
- return e === J ? t : function() {
369
+ function Vr(e, t) {
370
+ return e === V ? t : function() {
353
371
  var n = e.apply(this, arguments);
354
372
  n !== void 0 && (arguments[0] = n);
355
373
  var a = this.onsuccess, i = this.onerror;
@@ -358,28 +376,28 @@ function Ra() {
358
376
  return a && (this.onsuccess = this.onsuccess ? je(a, this.onsuccess) : a), i && (this.onerror = this.onerror ? je(i, this.onerror) : i), s !== void 0 ? s : n;
359
377
  };
360
378
  }
361
- function Vr(e, t) {
362
- return e === J ? t : function() {
379
+ function Jr(e, t) {
380
+ return e === V ? t : function() {
363
381
  e.apply(this, arguments);
364
382
  var n = this.onsuccess, a = this.onerror;
365
383
  this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? je(n, this.onsuccess) : n), a && (this.onerror = this.onerror ? je(a, this.onerror) : a);
366
384
  };
367
385
  }
368
386
  function Zr(e, t) {
369
- return e === J ? t : function(n) {
387
+ return e === V ? t : function(n) {
370
388
  var a = e.apply(this, arguments);
371
- M(n, a);
389
+ P(n, a);
372
390
  var i = this.onsuccess, s = this.onerror;
373
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), s && (this.onerror = this.onerror ? je(s, this.onerror) : s), a === void 0 ? n === void 0 ? void 0 : n : M(a, n);
391
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), s && (this.onerror = this.onerror ? je(s, this.onerror) : s), a === void 0 ? n === void 0 ? void 0 : n : P(a, n);
374
392
  };
375
393
  }
376
394
  function qr(e, t) {
377
- return e === J ? t : function() {
395
+ return e === V ? t : function() {
378
396
  return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
379
397
  };
380
398
  }
381
399
  function sn(e, t) {
382
- return e === J ? t : function() {
400
+ return e === V ? t : function() {
383
401
  var n = e.apply(this, arguments);
384
402
  if (n && typeof n.then == "function") {
385
403
  for (var a = this, i = arguments.length, s = new Array(i); i--; ) s[i] = arguments[i];
@@ -390,7 +408,7 @@ function Ra() {
390
408
  return t.apply(this, arguments);
391
409
  };
392
410
  }
393
- Ot.ModifyError = Et, Ot.DexieError = Xe, Ot.BulkError = Je;
411
+ Ot.ModifyError = Et, Ot.DexieError = Xe, Ot.BulkError = Ve;
394
412
  var me = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
395
413
  function qn(e) {
396
414
  me = e;
@@ -402,11 +420,11 @@ function Ra() {
402
420
  return [t, X(t), e];
403
421
  }(), ut = Ne[0], ge = Ne[1], Ne = Ne[2], ge = ge && ge.then, Ke = ut && ut.constructor, on = !!Ne, ct = function(e, t) {
404
422
  lt.push([e, t]), xt && (queueMicrotask(ta), xt = !1);
405
- }, un = !0, xt = !0, Be = [], At = [], cn = st, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: J, pgp: !1, env: {}, finalize: J }, G = Ae, lt = [], Le = 0, kt = [];
423
+ }, un = !0, xt = !0, Be = [], At = [], cn = st, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: V, pgp: !1, env: {}, finalize: V }, $ = Ae, lt = [], Le = 0, kt = [];
406
424
  function B(e) {
407
425
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
408
426
  this._listeners = [], this._lib = !1;
409
- var t = this._PSD = G;
427
+ var t = this._PSD = $;
410
428
  if (typeof e != "function") {
411
429
  if (e !== ot) throw new TypeError("Not a function");
412
430
  return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && dn(this, this._value));
@@ -416,7 +434,7 @@ function Ra() {
416
434
  i(function(s) {
417
435
  if (a._state === null) {
418
436
  if (s === a) throw new TypeError("A promise cannot be resolved with itself.");
419
- var u = a._lib && Ve();
437
+ var u = a._lib && Je();
420
438
  s && typeof s.then == "function" ? n(a, function(c, h) {
421
439
  s instanceof B ? s._then(c, h) : s.then(c, h);
422
440
  }) : (a._state = !0, a._value = s, nr(a)), u && Ze();
@@ -428,10 +446,10 @@ function Ra() {
428
446
  }(this, e);
429
447
  }
430
448
  var ln = { get: function() {
431
- var e = G, t = Ct;
449
+ var e = $, t = Ct;
432
450
  function n(a, i) {
433
- var s = this, u = !e.global && (e !== G || t !== Ct), c = u && !De(), h = new B(function(g, v) {
434
- fn(s, new tr(ar(a, e, u, c), ar(i, e, u, c), g, v, e));
451
+ var s = this, u = !e.global && (e !== $ || t !== Ct), c = u && !De(), h = new B(function(y, v) {
452
+ fn(s, new tr(ar(a, e, u, c), ar(i, e, u, c), y, v, e));
435
453
  });
436
454
  return this._consoleTask && (h._consoleTask = this._consoleTask), h;
437
455
  }
@@ -446,7 +464,7 @@ function Ra() {
446
464
  }
447
465
  function dn(e, t) {
448
466
  var n, a;
449
- At.push(t), e._state === null && (n = e._lib && Ve(), t = cn(t), e._state = !1, e._value = t, a = e, Be.some(function(i) {
467
+ At.push(t), e._state === null && (n = e._lib && Je(), t = cn(t), e._state = !1, e._value = t, a = e, Be.some(function(i) {
450
468
  return i._value === a._value;
451
469
  }) || Be.push(a), nr(e), n && Ze());
452
470
  }
@@ -482,10 +500,10 @@ function Ra() {
482
500
  }
483
501
  function ta() {
484
502
  Ge(Ae, function() {
485
- Ve() && Ze();
503
+ Je() && Ze();
486
504
  });
487
505
  }
488
- function Ve() {
506
+ function Je() {
489
507
  var e = un;
490
508
  return xt = un = !1, e;
491
509
  }
@@ -510,9 +528,9 @@ function Ra() {
510
528
  return new B(ot, !1, e);
511
529
  }
512
530
  function q(e, t) {
513
- var n = G;
531
+ var n = $;
514
532
  return function() {
515
- var a = Ve(), i = G;
533
+ var a = Je(), i = $;
516
534
  try {
517
535
  return Pe(n, !0), e.apply(this, arguments);
518
536
  } catch (s) {
@@ -523,7 +541,7 @@ function Ra() {
523
541
  };
524
542
  }
525
543
  le(B.prototype, { then: ln, _then: function(e, t) {
526
- fn(this, new tr(null, null, e, t, G));
544
+ fn(this, new tr(null, null, e, t, $));
527
545
  }, catch: function(e) {
528
546
  if (arguments.length === 1) return this.then(null, e);
529
547
  var t = e, n = arguments[1];
@@ -546,12 +564,12 @@ function Ra() {
546
564
  var n = this;
547
565
  return e < 1 / 0 ? new B(function(a, i) {
548
566
  var s = setTimeout(function() {
549
- return i(new $.Timeout(t));
567
+ return i(new U.Timeout(t));
550
568
  }, e);
551
569
  n.then(a, i).finally(clearTimeout.bind(null, s));
552
570
  }) : this;
553
571
  } }), typeof Symbol < "u" && Symbol.toStringTag && xe(B.prototype, Symbol.toStringTag, "Dexie.Promise"), Ae.env = rr(), le(B, { all: function() {
554
- var e = Se.apply(null, arguments).map(Rt);
572
+ var e = _e.apply(null, arguments).map(Rt);
555
573
  return new B(function(t, n) {
556
574
  e.length === 0 && t([]);
557
575
  var a = e.length;
@@ -566,16 +584,16 @@ function Ra() {
566
584
  e.then(t, n);
567
585
  }) : new B(ot, !0, e);
568
586
  }, reject: Dt, race: function() {
569
- var e = Se.apply(null, arguments).map(Rt);
587
+ var e = _e.apply(null, arguments).map(Rt);
570
588
  return new B(function(t, n) {
571
589
  e.map(function(a) {
572
590
  return B.resolve(a).then(t, n);
573
591
  });
574
592
  });
575
593
  }, PSD: { get: function() {
576
- return G;
594
+ return $;
577
595
  }, set: function(e) {
578
- return G = e;
596
+ return $ = e;
579
597
  } }, totalEchoes: { get: function() {
580
598
  return Ct;
581
599
  } }, newPSD: ke, usePSD: Ge, scheduler: { get: function() {
@@ -589,13 +607,13 @@ function Ra() {
589
607
  } }, follow: function(e, t) {
590
608
  return new B(function(n, a) {
591
609
  return ke(function(i, s) {
592
- var u = G;
610
+ var u = $;
593
611
  u.unhandleds = [], u.onunhandled = s, u.finalize = je(function() {
594
612
  var c, h = this;
595
613
  c = function() {
596
614
  h.unhandleds.length === 0 ? i() : s(h.unhandleds[0]);
597
- }, kt.push(function g() {
598
- c(), kt.splice(kt.indexOf(g), 1);
615
+ }, kt.push(function y() {
616
+ c(), kt.splice(kt.indexOf(y), 1);
599
617
  }), ++Le, ct(function() {
600
618
  --Le == 0 && hn();
601
619
  }, []);
@@ -603,7 +621,7 @@ function Ra() {
603
621
  }, t, n, a);
604
622
  });
605
623
  } }), Ke && (Ke.allSettled && xe(B, "allSettled", function() {
606
- var e = Se.apply(null, arguments).map(Rt);
624
+ var e = _e.apply(null, arguments).map(Rt);
607
625
  return new B(function(t) {
608
626
  e.length === 0 && t([]);
609
627
  var n = e.length, a = new Array(n);
@@ -618,7 +636,7 @@ function Ra() {
618
636
  });
619
637
  });
620
638
  }), Ke.any && typeof AggregateError < "u" && xe(B, "any", function() {
621
- var e = Se.apply(null, arguments).map(Rt);
639
+ var e = _e.apply(null, arguments).map(Rt);
622
640
  return new B(function(t, n) {
623
641
  e.length === 0 && n(new AggregateError([]));
624
642
  var a = e.length, i = new Array(a);
@@ -633,8 +651,8 @@ function Ra() {
633
651
  }), Ke.withResolvers && (B.withResolvers = Ke.withResolvers));
634
652
  var ae = { awaits: 0, echoes: 0, id: 0 }, na = 0, Pt = [], It = 0, Ct = 0, ra = 0;
635
653
  function ke(e, t, n, a) {
636
- var i = G, s = Object.create(i);
637
- return s.parent = i, s.ref = 0, s.global = !1, s.id = ++ra, Ae.env, s.env = on ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && M(s, t), ++i.ref, s.finalize = function() {
654
+ var i = $, s = Object.create(i);
655
+ return s.parent = i, s.ref = 0, s.global = !1, s.id = ++ra, Ae.env, s.env = on ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && P(s, t), ++i.ref, s.finalize = function() {
638
656
  --this.parent.ref || this.parent.finalize();
639
657
  }, a = Ge(s, e, n, a), s.ref === 0 && s.finalize(), a;
640
658
  }
@@ -656,17 +674,17 @@ function Ra() {
656
674
  Pt.pop(), Pe(e, !1);
657
675
  }
658
676
  function Pe(e, t) {
659
- var n, a = G;
660
- (t ? !ae.echoes || It++ && e === G : !It || --It && e === G) || queueMicrotask(t ? (function(i) {
661
- ++Ct, ae.echoes && --ae.echoes != 0 || (ae.echoes = ae.awaits = ae.id = 0), Pt.push(G), Pe(i, !0);
662
- }).bind(null, e) : aa), e !== G && (G = e, a === Ae && (Ae.env = rr()), on && (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))));
677
+ var n, a = $;
678
+ (t ? !ae.echoes || It++ && e === $ : !It || --It && e === $) || queueMicrotask(t ? (function(i) {
679
+ ++Ct, ae.echoes && --ae.echoes != 0 || (ae.echoes = ae.awaits = ae.id = 0), Pt.push($), Pe(i, !0);
680
+ }).bind(null, e) : aa), e !== $ && ($ = e, a === Ae && (Ae.env = rr()), on && (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))));
663
681
  }
664
682
  function rr() {
665
683
  var e = D.Promise;
666
684
  return on ? { 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 } : {};
667
685
  }
668
686
  function Ge(e, t, n, a, i) {
669
- var s = G;
687
+ var s = $;
670
688
  try {
671
689
  return Pe(e, !0), t(n, a, i);
672
690
  } finally {
@@ -675,7 +693,7 @@ function Ra() {
675
693
  }
676
694
  function ar(e, t, n, a) {
677
695
  return typeof e != "function" ? e : function() {
678
- var i = G;
696
+ var i = $;
679
697
  n && qe(), Pe(t, !0);
680
698
  try {
681
699
  return e.apply(this, arguments);
@@ -687,8 +705,8 @@ function Ra() {
687
705
  function pn(e) {
688
706
  Promise === Ke && ae.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
689
707
  }
690
- ("" + ge).indexOf("[native code]") === -1 && (qe = De = J);
691
- var te = B.reject, $e = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", et = [], Tt = "__dbnames", gn = "readonly", yn = "readwrite";
708
+ ("" + ge).indexOf("[native code]") === -1 && (qe = De = V);
709
+ var te = B.reject, $e = "￿", Se = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", et = [], Tt = "__dbnames", gn = "readonly", yn = "readwrite";
692
710
  function Ue(e, t) {
693
711
  return e ? t ? function() {
694
712
  return e.apply(this, arguments) && t.apply(this, arguments);
@@ -703,7 +721,7 @@ function Ra() {
703
721
  };
704
722
  }
705
723
  function or() {
706
- throw $.Type();
724
+ throw U.Type();
707
725
  }
708
726
  function Y(e, t) {
709
727
  try {
@@ -716,13 +734,13 @@ function Ra() {
716
734
  return t < e ? 1 : e < t ? -1 : 0;
717
735
  case "binary":
718
736
  return function(i, s) {
719
- for (var u = i.length, c = s.length, h = u < c ? u : c, g = 0; g < h; ++g) if (i[g] !== s[g]) return i[g] < s[g] ? -1 : 1;
737
+ for (var u = i.length, c = s.length, h = u < c ? u : c, y = 0; y < h; ++y) if (i[y] !== s[y]) return i[y] < s[y] ? -1 : 1;
720
738
  return u === c ? 0 : u < c ? -1 : 1;
721
739
  }(cr(e), cr(t));
722
740
  case "Array":
723
741
  return function(i, s) {
724
- for (var u = i.length, c = s.length, h = u < c ? u : c, g = 0; g < h; ++g) {
725
- var v = Y(i[g], s[g]);
742
+ for (var u = i.length, c = s.length, h = u < c ? u : c, y = 0; y < h; ++y) {
743
+ var v = Y(i[y], s[y]);
726
744
  if (v !== 0) return v;
727
745
  }
728
746
  return u === c ? 0 : u < c ? -1 : 1;
@@ -740,28 +758,28 @@ function Ra() {
740
758
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
741
759
  }
742
760
  var lr = (Z.prototype._trans = function(e, t, n) {
743
- var a = this._tx || G.trans, i = this.name, s = me && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
744
- function u(g, v, f) {
745
- if (!f.schema[i]) throw new $.NotFound("Table " + i + " not part of transaction");
761
+ var a = this._tx || $.trans, i = this.name, s = me && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
762
+ function u(y, v, f) {
763
+ if (!f.schema[i]) throw new U.NotFound("Table " + i + " not part of transaction");
746
764
  return t(f.idbtrans, f);
747
765
  }
748
- var c = Ve();
766
+ var c = Je();
749
767
  try {
750
- var h = a && a.db._novip === this.db._novip ? a === G.trans ? a._promise(e, u, n) : ke(function() {
768
+ var h = a && a.db._novip === this.db._novip ? a === $.trans ? a._promise(e, u, n) : ke(function() {
751
769
  return a._promise(e, u, n);
752
- }, { trans: a, transless: G.transless || G }) : function g(v, f, S, p) {
753
- if (v.idbdb && (v._state.openComplete || G.letThrough || v._vip)) {
754
- var b = v._createTransaction(f, S, v._dbSchema);
770
+ }, { trans: a, transless: $.transless || $ }) : function y(v, f, _, p) {
771
+ if (v.idbdb && (v._state.openComplete || $.letThrough || v._vip)) {
772
+ var b = v._createTransaction(f, _, v._dbSchema);
755
773
  try {
756
774
  b.create(), v._state.PR1398_maxLoop = 3;
757
775
  } catch (w) {
758
776
  return w.name === an.InvalidState && v.isOpen() && 0 < --v._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), v.close({ disableAutoOpen: !1 }), v.open().then(function() {
759
- return g(v, f, S, p);
777
+ return y(v, f, _, p);
760
778
  })) : te(w);
761
779
  }
762
- return b._promise(f, function(w, y) {
780
+ return b._promise(f, function(w, m) {
763
781
  return ke(function() {
764
- return G.trans = b, p(w, y, b);
782
+ return $.trans = b, p(w, m, b);
765
783
  });
766
784
  }).then(function(w) {
767
785
  if (f === "readwrite") try {
@@ -773,36 +791,36 @@ function Ra() {
773
791
  });
774
792
  });
775
793
  }
776
- if (v._state.openComplete) return te(new $.DatabaseClosed(v._state.dbOpenError));
794
+ if (v._state.openComplete) return te(new U.DatabaseClosed(v._state.dbOpenError));
777
795
  if (!v._state.isBeingOpened) {
778
- if (!v._state.autoOpen) return te(new $.DatabaseClosed());
779
- v.open().catch(J);
796
+ if (!v._state.autoOpen) return te(new U.DatabaseClosed());
797
+ v.open().catch(V);
780
798
  }
781
799
  return v._state.dbReadyPromise.then(function() {
782
- return g(v, f, S, p);
800
+ return y(v, f, _, p);
783
801
  });
784
802
  }(this.db, e, [this.name], u);
785
- return s && (h._consoleTask = s, h = h.catch(function(g) {
786
- return console.trace(g), te(g);
803
+ return s && (h._consoleTask = s, h = h.catch(function(y) {
804
+ return console.trace(y), te(y);
787
805
  })), h;
788
806
  } finally {
789
807
  c && Ze();
790
808
  }
791
809
  }, Z.prototype.get = function(e, t) {
792
810
  var n = this;
793
- return e && e.constructor === Object ? this.where(e).first(t) : e == null ? te(new $.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
811
+ return e && e.constructor === Object ? this.where(e).first(t) : e == null ? te(new U.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
794
812
  return n.core.get({ trans: a, key: e }).then(function(i) {
795
813
  return n.hook.reading.fire(i);
796
814
  });
797
815
  }).then(t);
798
816
  }, Z.prototype.where = function(e) {
799
817
  if (typeof e == "string") return new this.db.WhereClause(this, e);
800
- if (U(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
818
+ if (L(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
801
819
  var t = K(e);
802
820
  if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
803
821
  var n = this.schema.indexes.concat(this.schema.primKey).filter(function(c) {
804
- if (c.compound && t.every(function(g) {
805
- return 0 <= c.keyPath.indexOf(g);
822
+ if (c.compound && t.every(function(y) {
823
+ return 0 <= c.keyPath.indexOf(y);
806
824
  })) {
807
825
  for (var h = 0; h < t.length; ++h) if (t.indexOf(c.keyPath[h]) === -1) return !1;
808
826
  return !0;
@@ -823,13 +841,13 @@ function Ra() {
823
841
  return Y(c, h) === 0;
824
842
  }
825
843
  var u = t.reduce(function(f, h) {
826
- var g = f[0], v = f[1], f = a[h], S = e[h];
827
- return [g || f, g || !f ? Ue(v, f && f.multi ? function(p) {
828
- return p = we(p, h), U(p) && p.some(function(b) {
829
- return i(S, b);
844
+ var y = f[0], v = f[1], f = a[h], _ = e[h];
845
+ return [y || f, y || !f ? Ue(v, f && f.multi ? function(p) {
846
+ return p = we(p, h), L(p) && p.some(function(b) {
847
+ return i(_, b);
830
848
  });
831
849
  } : function(p) {
832
- return i(S, we(p, h));
850
+ return i(_, we(p, h));
833
851
  }) : v];
834
852
  }, [null, null]), s = u[0], u = u[1];
835
853
  return s ? this.where(s.name).equals(e[s.keyPath]).filter(u) : n ? this.filter(u) : this.where(t).equals("");
@@ -848,7 +866,7 @@ function Ra() {
848
866
  }, Z.prototype.toCollection = function() {
849
867
  return new this.db.Collection(new this.db.WhereClause(this));
850
868
  }, Z.prototype.orderBy = function(e) {
851
- return new this.db.Collection(new this.db.WhereClause(this, U(e) ? "[".concat(e.join("+"), "]") : e));
869
+ return new this.db.Collection(new this.db.WhereClause(this, L(e) ? "[".concat(e.join("+"), "]") : e));
852
870
  }, Z.prototype.reverse = function() {
853
871
  return this.toCollection().reverse();
854
872
  }, Z.prototype.mapToClass = function(e) {
@@ -856,12 +874,12 @@ function Ra() {
856
874
  function i() {
857
875
  return t !== null && t.apply(this, arguments) || this;
858
876
  }
859
- (this.schema.mappedClass = e).prototype instanceof or && (function(h, g) {
860
- if (typeof g != "function" && g !== null) throw new TypeError("Class extends value " + String(g) + " is not a constructor or null");
877
+ (this.schema.mappedClass = e).prototype instanceof or && (function(h, y) {
878
+ if (typeof y != "function" && y !== null) throw new TypeError("Class extends value " + String(y) + " is not a constructor or null");
861
879
  function v() {
862
880
  this.constructor = h;
863
881
  }
864
- o(h, g), h.prototype = g === null ? Object.create(g) : (v.prototype = g.prototype, new v());
882
+ o(h, y), h.prototype = y === null ? Object.create(y) : (v.prototype = y.prototype, new v());
865
883
  }(i, t = e), Object.defineProperty(i.prototype, "db", { get: function() {
866
884
  return n;
867
885
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
@@ -872,9 +890,9 @@ function Ra() {
872
890
  });
873
891
  function c(h) {
874
892
  if (!h) return h;
875
- var g, v = Object.create(e.prototype);
876
- for (g in h) if (!s.has(g)) try {
877
- v[g] = h[g];
893
+ var y, v = Object.create(e.prototype);
894
+ for (y in h) if (!s.has(y)) try {
895
+ v[y] = h[y];
878
896
  } catch {
879
897
  }
880
898
  return v;
@@ -882,7 +900,7 @@ function Ra() {
882
900
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = c, this.hook("reading", c), e;
883
901
  }, Z.prototype.defineClass = function() {
884
902
  return this.mapToClass(function(e) {
885
- M(this, e);
903
+ P(this, e);
886
904
  });
887
905
  }, Z.prototype.add = function(e, t) {
888
906
  var n = this, a = this.schema.primKey, i = a.auto, s = a.keyPath, u = e;
@@ -898,7 +916,7 @@ function Ra() {
898
916
  return c;
899
917
  });
900
918
  }, Z.prototype.update = function(e, t) {
901
- return typeof e != "object" || U(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? te(new $.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
919
+ return typeof e != "object" || L(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? te(new U.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
902
920
  }, Z.prototype.put = function(e, t) {
903
921
  var n = this, a = this.schema.primKey, i = a.auto, s = a.keyPath, u = e;
904
922
  return s && i && (u = Mt(s)(e)), this._trans("readwrite", function(c) {
@@ -938,27 +956,27 @@ function Ra() {
938
956
  }, Z.prototype.bulkAdd = function(e, t, n) {
939
957
  var a = this, i = Array.isArray(t) ? t : void 0, s = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
940
958
  return this._trans("readwrite", function(u) {
941
- var g = a.schema.primKey, c = g.auto, g = g.keyPath;
942
- if (g && i) throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
943
- if (i && i.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
944
- var h = e.length, g = g && c ? e.map(Mt(g)) : e;
945
- return a.core.mutate({ trans: u, type: "add", keys: i, values: g, wantResults: s }).then(function(b) {
946
- var f = b.numFailures, S = b.results, p = b.lastResult, b = b.failures;
947
- if (f === 0) return s ? S : p;
948
- throw new Je("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(h, " operations failed"), b);
959
+ var y = a.schema.primKey, c = y.auto, y = y.keyPath;
960
+ if (y && i) throw new U.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
961
+ if (i && i.length !== e.length) throw new U.InvalidArgument("Arguments objects and keys must have the same length");
962
+ var h = e.length, y = y && c ? e.map(Mt(y)) : e;
963
+ return a.core.mutate({ trans: u, type: "add", keys: i, values: y, wantResults: s }).then(function(b) {
964
+ var f = b.numFailures, _ = b.results, p = b.lastResult, b = b.failures;
965
+ if (f === 0) return s ? _ : p;
966
+ throw new Ve("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(h, " operations failed"), b);
949
967
  });
950
968
  });
951
969
  }, Z.prototype.bulkPut = function(e, t, n) {
952
970
  var a = this, i = Array.isArray(t) ? t : void 0, s = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
953
971
  return this._trans("readwrite", function(u) {
954
- var g = a.schema.primKey, c = g.auto, g = g.keyPath;
955
- if (g && i) throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
956
- if (i && i.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
957
- var h = e.length, g = g && c ? e.map(Mt(g)) : e;
958
- return a.core.mutate({ trans: u, type: "put", keys: i, values: g, wantResults: s }).then(function(b) {
959
- var f = b.numFailures, S = b.results, p = b.lastResult, b = b.failures;
960
- if (f === 0) return s ? S : p;
961
- throw new Je("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(h, " operations failed"), b);
972
+ var y = a.schema.primKey, c = y.auto, y = y.keyPath;
973
+ if (y && i) throw new U.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
974
+ if (i && i.length !== e.length) throw new U.InvalidArgument("Arguments objects and keys must have the same length");
975
+ var h = e.length, y = y && c ? e.map(Mt(y)) : e;
976
+ return a.core.mutate({ trans: u, type: "put", keys: i, values: y, wantResults: s }).then(function(b) {
977
+ var f = b.numFailures, _ = b.results, p = b.lastResult, b = b.failures;
978
+ if (f === 0) return s ? _ : p;
979
+ throw new Ve("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(h, " operations failed"), b);
962
980
  });
963
981
  });
964
982
  }, Z.prototype.bulkUpdate = function(e) {
@@ -969,28 +987,28 @@ function Ra() {
969
987
  }), s = [];
970
988
  return this._trans("readwrite", function(u) {
971
989
  return n.getMany({ trans: u, keys: a, cache: "clone" }).then(function(c) {
972
- var h = [], g = [];
973
- e.forEach(function(f, S) {
974
- var p = f.key, b = f.changes, w = c[S];
990
+ var h = [], y = [];
991
+ e.forEach(function(f, _) {
992
+ var p = f.key, b = f.changes, w = c[_];
975
993
  if (w) {
976
- for (var y = 0, _ = Object.keys(b); y < _.length; y++) {
977
- var E = _[y], O = b[E];
994
+ for (var m = 0, S = Object.keys(b); m < S.length; m++) {
995
+ var E = S[m], O = b[E];
978
996
  if (E === t.schema.primKey.keyPath) {
979
- if (Y(O, p) !== 0) throw new $.Constraint("Cannot update primary key in bulkUpdate()");
997
+ if (Y(O, p) !== 0) throw new U.Constraint("Cannot update primary key in bulkUpdate()");
980
998
  } else fe(w, E, O);
981
999
  }
982
- s.push(S), h.push(p), g.push(w);
1000
+ s.push(_), h.push(p), y.push(w);
983
1001
  }
984
1002
  });
985
1003
  var v = h.length;
986
- return n.mutate({ trans: u, type: "put", keys: h, values: g, updates: { keys: a, changeSpecs: i } }).then(function(f) {
987
- var S = f.numFailures, p = f.failures;
988
- if (S === 0) return v;
1004
+ return n.mutate({ trans: u, type: "put", keys: h, values: y, updates: { keys: a, changeSpecs: i } }).then(function(f) {
1005
+ var _ = f.numFailures, p = f.failures;
1006
+ if (_ === 0) return v;
989
1007
  for (var b = 0, w = Object.keys(p); b < w.length; b++) {
990
- var y, _ = w[b], E = s[Number(_)];
991
- E != null && (y = p[_], delete p[_], p[E] = y);
1008
+ var m, S = w[b], E = s[Number(S)];
1009
+ E != null && (m = p[S], delete p[S], p[E] = m);
992
1010
  }
993
- throw new Je("".concat(t.name, ".bulkUpdate(): ").concat(S, " of ").concat(v, " operations failed"), p);
1011
+ throw new Ve("".concat(t.name, ".bulkUpdate(): ").concat(_, " of ").concat(v, " operations failed"), p);
994
1012
  });
995
1013
  });
996
1014
  });
@@ -1001,7 +1019,7 @@ function Ra() {
1001
1019
  }).then(function(u) {
1002
1020
  var i = u.numFailures, s = u.lastResult, u = u.failures;
1003
1021
  if (i === 0) return s;
1004
- throw new Je("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"), u);
1022
+ throw new Ve("".concat(t.name, ".bulkDelete(): ").concat(i, " of ").concat(n, " operations failed"), u);
1005
1023
  });
1006
1024
  }, Z);
1007
1025
  function Z() {
@@ -1009,8 +1027,8 @@ function Ra() {
1009
1027
  function dt(e) {
1010
1028
  function t(u, c) {
1011
1029
  if (c) {
1012
- for (var h = arguments.length, g = new Array(h - 1); --h; ) g[h - 1] = arguments[h];
1013
- return n[u].subscribe.apply(null, g), e;
1030
+ for (var h = arguments.length, y = new Array(h - 1); --h; ) y[h - 1] = arguments[h];
1031
+ return n[u].subscribe.apply(null, y), e;
1014
1032
  }
1015
1033
  if (typeof u == "string") return n[u];
1016
1034
  }
@@ -1020,27 +1038,27 @@ function Ra() {
1020
1038
  return t;
1021
1039
  function s(u, c, h) {
1022
1040
  if (typeof u != "object") {
1023
- var g;
1041
+ var y;
1024
1042
  c = c || qr;
1025
- var v = { subscribers: [], fire: h = h || J, subscribe: function(f) {
1043
+ var v = { subscribers: [], fire: h = h || V, subscribe: function(f) {
1026
1044
  v.subscribers.indexOf(f) === -1 && (v.subscribers.push(f), v.fire = c(v.fire, f));
1027
1045
  }, unsubscribe: function(f) {
1028
- v.subscribers = v.subscribers.filter(function(S) {
1029
- return S !== f;
1046
+ v.subscribers = v.subscribers.filter(function(_) {
1047
+ return _ !== f;
1030
1048
  }), v.fire = v.subscribers.reduce(c, h);
1031
1049
  } };
1032
1050
  return n[u] = t[u] = v;
1033
1051
  }
1034
- K(g = u).forEach(function(f) {
1035
- var S = g[f];
1036
- if (U(S)) s(f, g[f][0], g[f][1]);
1052
+ K(y = u).forEach(function(f) {
1053
+ var _ = y[f];
1054
+ if (L(_)) s(f, y[f][0], y[f][1]);
1037
1055
  else {
1038
- if (S !== "asap") throw new $.InvalidArgument("Invalid event config");
1056
+ if (_ !== "asap") throw new U.InvalidArgument("Invalid event config");
1039
1057
  var p = s(f, st, function() {
1040
1058
  for (var b = arguments.length, w = new Array(b); b--; ) w[b] = arguments[b];
1041
- p.subscribers.forEach(function(y) {
1059
+ p.subscribers.forEach(function(m) {
1042
1060
  Yn(function() {
1043
- y.apply(null, w);
1061
+ m.apply(null, w);
1044
1062
  });
1045
1063
  });
1046
1064
  });
@@ -1066,7 +1084,7 @@ function Ra() {
1066
1084
  function jt(e, t) {
1067
1085
  if (e.isPrimKey) return t.primaryKey;
1068
1086
  var n = t.getIndexByKeyPath(e.index);
1069
- if (!n) throw new $.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
1087
+ if (!n) throw new U.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
1070
1088
  return n;
1071
1089
  }
1072
1090
  function dr(e, t, n) {
@@ -1076,13 +1094,13 @@ function Ra() {
1076
1094
  function Nt(e, t, n, a) {
1077
1095
  var i = e.replayFilter ? Ue(e.filter, e.replayFilter()) : e.filter;
1078
1096
  if (e.or) {
1079
- var s = {}, u = function(c, h, g) {
1097
+ var s = {}, u = function(c, h, y) {
1080
1098
  var v, f;
1081
- i && !i(h, g, function(S) {
1082
- return h.stop(S);
1083
- }, function(S) {
1084
- return h.fail(S);
1085
- }) || ((f = "" + (v = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(v)), ee(s, f) || (s[f] = !0, t(c, h, g)));
1099
+ i && !i(h, y, function(_) {
1100
+ return h.stop(_);
1101
+ }, function(_) {
1102
+ return h.fail(_);
1103
+ }) || ((f = "" + (v = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(v)), ee(s, f) || (s[f] = !0, t(c, h, y)));
1086
1104
  };
1087
1105
  return Promise.all([e.or._iterate(u, n), fr(dr(e, a, n), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1088
1106
  }
@@ -1100,9 +1118,9 @@ function Ra() {
1100
1118
  t && !t(s, function(c) {
1101
1119
  return u = c;
1102
1120
  }, function(c) {
1103
- s.stop(c), u = J;
1121
+ s.stop(c), u = V;
1104
1122
  }, function(c) {
1105
- s.fail(c), u = J;
1123
+ s.fail(c), u = V;
1106
1124
  }) || i(s.value, s, function(c) {
1107
1125
  return u = c;
1108
1126
  }), u();
@@ -1113,7 +1131,7 @@ function Ra() {
1113
1131
  var t = this["@@propmod"];
1114
1132
  if (t.add !== void 0) {
1115
1133
  var n = t.add;
1116
- if (U(n)) return x(x([], U(e) ? e : [], !0), n).sort();
1134
+ if (L(n)) return x(x([], L(e) ? e : [], !0), n).sort();
1117
1135
  if (typeof n == "number") return (Number(e) || 0) + n;
1118
1136
  if (typeof n == "bigint") try {
1119
1137
  return BigInt(e) + n;
@@ -1124,7 +1142,7 @@ function Ra() {
1124
1142
  }
1125
1143
  if (t.remove !== void 0) {
1126
1144
  var a = t.remove;
1127
- if (U(a)) return U(e) ? e.filter(function(i) {
1145
+ if (L(a)) return L(e) ? e.filter(function(i) {
1128
1146
  return !a.includes(i);
1129
1147
  }).sort() : [];
1130
1148
  if (typeof a == "number") return Number(e) - a;
@@ -1153,7 +1171,7 @@ function Ra() {
1153
1171
  return Nt(this._ctx, e, t, this._ctx.table.core);
1154
1172
  }, Q.prototype.clone = function(e) {
1155
1173
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1156
- return e && M(n, e), t._ctx = n, t;
1174
+ return e && P(n, e), t._ctx = n, t;
1157
1175
  }, Q.prototype.raw = function() {
1158
1176
  return this._ctx.valueMapper = null, this;
1159
1177
  }, Q.prototype.each = function(e) {
@@ -1177,12 +1195,12 @@ function Ra() {
1177
1195
  }).then(e);
1178
1196
  }, Q.prototype.sortBy = function(e, t) {
1179
1197
  var n = e.split(".").reverse(), a = n[0], i = n.length - 1;
1180
- function s(h, g) {
1181
- return g ? s(h[n[g]], g - 1) : h[a];
1198
+ function s(h, y) {
1199
+ return y ? s(h[n[y]], y - 1) : h[a];
1182
1200
  }
1183
1201
  var u = this._ctx.dir === "next" ? 1 : -1;
1184
- function c(h, g) {
1185
- return Y(s(h, i), s(g, i)) * u;
1202
+ function c(h, y) {
1203
+ return Y(s(h, i), s(y, i)) * u;
1186
1204
  }
1187
1205
  return this.toArray(function(h) {
1188
1206
  return h.sort(c);
@@ -1305,52 +1323,52 @@ function Ra() {
1305
1323
  var t = this, n = this._ctx;
1306
1324
  return this._write(function(a) {
1307
1325
  var i, s, u;
1308
- u = typeof e == "function" ? e : (i = K(e), s = i.length, function(y) {
1309
- for (var _ = !1, E = 0; E < s; ++E) {
1310
- var O = i[E], A = e[O], P = we(y, O);
1311
- A instanceof ht ? (fe(y, O, A.execute(P)), _ = !0) : P !== A && (fe(y, O, A), _ = !0);
1326
+ u = typeof e == "function" ? e : (i = K(e), s = i.length, function(m) {
1327
+ for (var S = !1, E = 0; E < s; ++E) {
1328
+ var O = i[E], A = e[O], I = we(m, O);
1329
+ A instanceof ht ? (fe(m, O, A.execute(I)), S = !0) : I !== A && (fe(m, O, A), S = !0);
1312
1330
  }
1313
- return _;
1331
+ return S;
1314
1332
  });
1315
- var c = n.table.core, f = c.schema.primaryKey, h = f.outbound, g = f.extractKey, v = 200, f = t.db._options.modifyChunkSize;
1333
+ var c = n.table.core, f = c.schema.primaryKey, h = f.outbound, y = f.extractKey, v = 200, f = t.db._options.modifyChunkSize;
1316
1334
  f && (v = typeof f == "object" ? f[c.name] || f["*"] || 200 : f);
1317
- function S(y, O) {
1335
+ function _(m, O) {
1318
1336
  var E = O.failures, O = O.numFailures;
1319
- b += y - O;
1320
- for (var A = 0, P = K(E); A < P.length; A++) {
1321
- var T = P[A];
1322
- p.push(E[T]);
1337
+ b += m - O;
1338
+ for (var A = 0, I = K(E); A < I.length; A++) {
1339
+ var M = I[A];
1340
+ p.push(E[M]);
1323
1341
  }
1324
1342
  }
1325
1343
  var p = [], b = 0, w = [];
1326
- return t.clone().primaryKeys().then(function(y) {
1327
- function _(O) {
1328
- var A = Math.min(v, y.length - O);
1329
- return c.getMany({ trans: a, keys: y.slice(O, O + A), cache: "immutable" }).then(function(P) {
1330
- for (var T = [], I = [], C = h ? [] : null, j = [], R = 0; R < A; ++R) {
1331
- var L = P[R], W = { value: Te(L), primKey: y[O + R] };
1332
- u.call(W, W.value, W) !== !1 && (W.value == null ? j.push(y[O + R]) : h || Y(g(L), g(W.value)) === 0 ? (I.push(W.value), h && C.push(y[O + R])) : (j.push(y[O + R]), T.push(W.value)));
1344
+ return t.clone().primaryKeys().then(function(m) {
1345
+ function S(O) {
1346
+ var A = Math.min(v, m.length - O);
1347
+ return c.getMany({ trans: a, keys: m.slice(O, O + A), cache: "immutable" }).then(function(I) {
1348
+ for (var M = [], C = [], R = h ? [] : null, j = [], T = 0; T < A; ++T) {
1349
+ var G = I[T], W = { value: Te(G), primKey: m[O + T] };
1350
+ u.call(W, W.value, W) !== !1 && (W.value == null ? j.push(m[O + T]) : h || Y(y(G), y(W.value)) === 0 ? (C.push(W.value), h && R.push(m[O + T])) : (j.push(m[O + T]), M.push(W.value)));
1333
1351
  }
1334
- return Promise.resolve(0 < T.length && c.mutate({ trans: a, type: "add", values: T }).then(function(z) {
1352
+ return Promise.resolve(0 < M.length && c.mutate({ trans: a, type: "add", values: M }).then(function(z) {
1335
1353
  for (var H in z.failures) j.splice(parseInt(H), 1);
1336
- S(T.length, z);
1354
+ _(M.length, z);
1337
1355
  })).then(function() {
1338
- return (0 < I.length || E && typeof e == "object") && c.mutate({ trans: a, type: "put", keys: C, values: I, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(z) {
1339
- return S(I.length, z);
1356
+ return (0 < C.length || E && typeof e == "object") && c.mutate({ trans: a, type: "put", keys: R, values: C, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(z) {
1357
+ return _(C.length, z);
1340
1358
  });
1341
1359
  }).then(function() {
1342
1360
  return (0 < j.length || E && e === vn) && c.mutate({ trans: a, type: "delete", keys: j, criteria: E, isAdditionalChunk: 0 < O }).then(function(z) {
1343
- return S(j.length, z);
1361
+ return _(j.length, z);
1344
1362
  });
1345
1363
  }).then(function() {
1346
- return y.length > O + A && _(O + v);
1364
+ return m.length > O + A && S(O + v);
1347
1365
  });
1348
1366
  });
1349
1367
  }
1350
1368
  var E = tt(n) && n.limit === 1 / 0 && (typeof e != "function" || e === vn) && { index: n.index, range: n.range };
1351
- return _(0).then(function() {
1369
+ return S(0).then(function() {
1352
1370
  if (0 < p.length) throw new Et("Error modifying one or more objects", p, b, w);
1353
- return y.length;
1371
+ return m.length;
1354
1372
  });
1355
1373
  });
1356
1374
  });
@@ -1389,56 +1407,56 @@ function Ra() {
1389
1407
  }).limit(0);
1390
1408
  }
1391
1409
  function Kt(e, t, n, a) {
1392
- var i, s, u, c, h, g, v, f = n.length;
1410
+ var i, s, u, c, h, y, v, f = n.length;
1393
1411
  if (!n.every(function(b) {
1394
1412
  return typeof b == "string";
1395
1413
  })) return he(e, ir);
1396
- function S(b) {
1397
- i = b === "next" ? function(y) {
1398
- return y.toUpperCase();
1399
- } : function(y) {
1400
- return y.toLowerCase();
1401
- }, s = b === "next" ? function(y) {
1402
- return y.toLowerCase();
1403
- } : function(y) {
1404
- return y.toUpperCase();
1414
+ function _(b) {
1415
+ i = b === "next" ? function(m) {
1416
+ return m.toUpperCase();
1417
+ } : function(m) {
1418
+ return m.toLowerCase();
1419
+ }, s = b === "next" ? function(m) {
1420
+ return m.toLowerCase();
1421
+ } : function(m) {
1422
+ return m.toUpperCase();
1405
1423
  }, u = b === "next" ? sa : oa;
1406
- var w = n.map(function(y) {
1407
- return { lower: s(y), upper: i(y) };
1408
- }).sort(function(y, _) {
1409
- return u(y.lower, _.lower);
1424
+ var w = n.map(function(m) {
1425
+ return { lower: s(m), upper: i(m) };
1426
+ }).sort(function(m, S) {
1427
+ return u(m.lower, S.lower);
1410
1428
  });
1411
- c = w.map(function(y) {
1412
- return y.upper;
1413
- }), h = w.map(function(y) {
1414
- return y.lower;
1415
- }), v = (g = b) === "next" ? "" : a;
1429
+ c = w.map(function(m) {
1430
+ return m.upper;
1431
+ }), h = w.map(function(m) {
1432
+ return m.lower;
1433
+ }), v = (y = b) === "next" ? "" : a;
1416
1434
  }
1417
- S("next"), e = new e.Collection(e, function() {
1435
+ _("next"), e = new e.Collection(e, function() {
1418
1436
  return Ie(c[0], h[f - 1] + a);
1419
1437
  }), e._ondirectionchange = function(b) {
1420
- S(b);
1438
+ _(b);
1421
1439
  };
1422
1440
  var p = 0;
1423
- return e._addAlgorithm(function(b, w, y) {
1424
- var _ = b.key;
1425
- if (typeof _ != "string") return !1;
1426
- var E = s(_);
1441
+ return e._addAlgorithm(function(b, w, m) {
1442
+ var S = b.key;
1443
+ if (typeof S != "string") return !1;
1444
+ var E = s(S);
1427
1445
  if (t(E, h, p)) return !0;
1428
1446
  for (var O = null, A = p; A < f; ++A) {
1429
- var P = function(T, I, C, j, R, L) {
1430
- for (var W = Math.min(T.length, j.length), z = -1, H = 0; H < W; ++H) {
1431
- var pe = I[H];
1432
- if (pe !== j[H]) return R(T[H], C[H]) < 0 ? T.substr(0, H) + C[H] + C.substr(H + 1) : R(T[H], j[H]) < 0 ? T.substr(0, H) + j[H] + C.substr(H + 1) : 0 <= z ? T.substr(0, z) + I[z] + C.substr(z + 1) : null;
1433
- R(T[H], pe) < 0 && (z = H);
1447
+ var I = function(M, C, R, j, T, G) {
1448
+ for (var W = Math.min(M.length, j.length), z = -1, H = 0; H < W; ++H) {
1449
+ var pe = C[H];
1450
+ if (pe !== j[H]) return T(M[H], R[H]) < 0 ? M.substr(0, H) + R[H] + R.substr(H + 1) : T(M[H], j[H]) < 0 ? M.substr(0, H) + j[H] + R.substr(H + 1) : 0 <= z ? M.substr(0, z) + C[z] + R.substr(z + 1) : null;
1451
+ T(M[H], pe) < 0 && (z = H);
1434
1452
  }
1435
- return W < j.length && L === "next" ? T + C.substr(T.length) : W < T.length && L === "prev" ? T.substr(0, C.length) : z < 0 ? null : T.substr(0, z) + j[z] + C.substr(z + 1);
1436
- }(_, E, c[A], h[A], u, g);
1437
- P === null && O === null ? p = A + 1 : (O === null || 0 < u(O, P)) && (O = P);
1453
+ return W < j.length && G === "next" ? M + R.substr(M.length) : W < M.length && G === "prev" ? M.substr(0, R.length) : z < 0 ? null : M.substr(0, z) + j[z] + R.substr(z + 1);
1454
+ }(S, E, c[A], h[A], u, y);
1455
+ I === null && O === null ? p = A + 1 : (O === null || 0 < u(O, I)) && (O = I);
1438
1456
  }
1439
1457
  return w(O !== null ? function() {
1440
1458
  b.continue(O + v);
1441
- } : y), !1;
1459
+ } : m), !1;
1442
1460
  }), e;
1443
1461
  }
1444
1462
  function Ie(e, t, n, a) {
@@ -1456,26 +1474,26 @@ function Ra() {
1456
1474
  return Ie(e, t, !n, !a);
1457
1475
  });
1458
1476
  } catch {
1459
- return he(this, _e);
1477
+ return he(this, Se);
1460
1478
  }
1461
1479
  }, ie.prototype.equals = function(e) {
1462
- return e == null ? he(this, _e) : new this.Collection(this, function() {
1480
+ return e == null ? he(this, Se) : new this.Collection(this, function() {
1463
1481
  return pr(e);
1464
1482
  });
1465
1483
  }, ie.prototype.above = function(e) {
1466
- return e == null ? he(this, _e) : new this.Collection(this, function() {
1484
+ return e == null ? he(this, Se) : new this.Collection(this, function() {
1467
1485
  return Ie(e, void 0, !0);
1468
1486
  });
1469
1487
  }, ie.prototype.aboveOrEqual = function(e) {
1470
- return e == null ? he(this, _e) : new this.Collection(this, function() {
1488
+ return e == null ? he(this, Se) : new this.Collection(this, function() {
1471
1489
  return Ie(e, void 0, !1);
1472
1490
  });
1473
1491
  }, ie.prototype.below = function(e) {
1474
- return e == null ? he(this, _e) : new this.Collection(this, function() {
1492
+ return e == null ? he(this, Se) : new this.Collection(this, function() {
1475
1493
  return Ie(void 0, e, !1, !0);
1476
1494
  });
1477
1495
  }, ie.prototype.belowOrEqual = function(e) {
1478
- return e == null ? he(this, _e) : new this.Collection(this, function() {
1496
+ return e == null ? he(this, Se) : new this.Collection(this, function() {
1479
1497
  return Ie(void 0, e);
1480
1498
  });
1481
1499
  }, ie.prototype.startsWith = function(e) {
@@ -1489,23 +1507,23 @@ function Ra() {
1489
1507
  return t === n[0];
1490
1508
  }, [e], "");
1491
1509
  }, ie.prototype.anyOfIgnoreCase = function() {
1492
- var e = Se.apply(Qe, arguments);
1510
+ var e = _e.apply(Qe, arguments);
1493
1511
  return e.length === 0 ? nt(this) : Kt(this, function(t, n) {
1494
1512
  return n.indexOf(t) !== -1;
1495
1513
  }, e, "");
1496
1514
  }, ie.prototype.startsWithAnyOfIgnoreCase = function() {
1497
- var e = Se.apply(Qe, arguments);
1515
+ var e = _e.apply(Qe, arguments);
1498
1516
  return e.length === 0 ? nt(this) : Kt(this, function(t, n) {
1499
1517
  return n.some(function(a) {
1500
1518
  return t.indexOf(a) === 0;
1501
1519
  });
1502
1520
  }, e, $e);
1503
1521
  }, ie.prototype.anyOf = function() {
1504
- var e = this, t = Se.apply(Qe, arguments), n = this._cmp;
1522
+ var e = this, t = _e.apply(Qe, arguments), n = this._cmp;
1505
1523
  try {
1506
1524
  t.sort(n);
1507
1525
  } catch {
1508
- return he(this, _e);
1526
+ return he(this, Se);
1509
1527
  }
1510
1528
  if (t.length === 0) return nt(this);
1511
1529
  var a = new this.Collection(this, function() {
@@ -1524,42 +1542,42 @@ function Ra() {
1524
1542
  }, ie.prototype.notEqual = function(e) {
1525
1543
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1526
1544
  }, ie.prototype.noneOf = function() {
1527
- var e = Se.apply(Qe, arguments);
1545
+ var e = _e.apply(Qe, arguments);
1528
1546
  if (e.length === 0) return new this.Collection(this);
1529
1547
  try {
1530
1548
  e.sort(this._ascending);
1531
1549
  } catch {
1532
- return he(this, _e);
1550
+ return he(this, Se);
1533
1551
  }
1534
1552
  var t = e.reduce(function(n, a) {
1535
1553
  return n ? n.concat([[n[n.length - 1][1], a]]) : [[-1 / 0, a]];
1536
1554
  }, null);
1537
1555
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
1538
- }, ie.prototype.inAnyRange = function(_, t) {
1556
+ }, ie.prototype.inAnyRange = function(S, t) {
1539
1557
  var n = this, a = this._cmp, i = this._ascending, s = this._descending, u = this._min, c = this._max;
1540
- if (_.length === 0) return nt(this);
1541
- if (!_.every(function(E) {
1558
+ if (S.length === 0) return nt(this);
1559
+ if (!S.every(function(E) {
1542
1560
  return E[0] !== void 0 && E[1] !== void 0 && i(E[0], E[1]) <= 0;
1543
- })) return he(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", $.InvalidArgument);
1544
- var h = !t || t.includeLowers !== !1, g = t && t.includeUppers === !0, v, f = i;
1545
- function S(E, O) {
1561
+ })) return he(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", U.InvalidArgument);
1562
+ var h = !t || t.includeLowers !== !1, y = t && t.includeUppers === !0, v, f = i;
1563
+ function _(E, O) {
1546
1564
  return f(E[0], O[0]);
1547
1565
  }
1548
1566
  try {
1549
- (v = _.reduce(function(E, O) {
1550
- for (var A = 0, P = E.length; A < P; ++A) {
1551
- var T = E[A];
1552
- if (a(O[0], T[1]) < 0 && 0 < a(O[1], T[0])) {
1553
- T[0] = u(T[0], O[0]), T[1] = c(T[1], O[1]);
1567
+ (v = S.reduce(function(E, O) {
1568
+ for (var A = 0, I = E.length; A < I; ++A) {
1569
+ var M = E[A];
1570
+ if (a(O[0], M[1]) < 0 && 0 < a(O[1], M[0])) {
1571
+ M[0] = u(M[0], O[0]), M[1] = c(M[1], O[1]);
1554
1572
  break;
1555
1573
  }
1556
1574
  }
1557
- return A === P && E.push(O), E;
1558
- }, [])).sort(S);
1575
+ return A === I && E.push(O), E;
1576
+ }, [])).sort(_);
1559
1577
  } catch {
1560
- return he(this, _e);
1578
+ return he(this, Se);
1561
1579
  }
1562
- var p = 0, b = g ? function(E) {
1580
+ var p = 0, b = y ? function(E) {
1563
1581
  return 0 < i(E, v[p][1]);
1564
1582
  } : function(E) {
1565
1583
  return 0 <= i(E, v[p][1]);
@@ -1567,19 +1585,19 @@ function Ra() {
1567
1585
  return 0 < s(E, v[p][0]);
1568
1586
  } : function(E) {
1569
1587
  return 0 <= s(E, v[p][0]);
1570
- }, y = b, _ = new this.Collection(this, function() {
1571
- return Ie(v[0][0], v[v.length - 1][1], !h, !g);
1588
+ }, m = b, S = new this.Collection(this, function() {
1589
+ return Ie(v[0][0], v[v.length - 1][1], !h, !y);
1572
1590
  });
1573
- return _._ondirectionchange = function(E) {
1574
- f = E === "next" ? (y = b, i) : (y = w, s), v.sort(S);
1575
- }, _._addAlgorithm(function(E, O, A) {
1576
- for (var P, T = E.key; y(T); ) if (++p === v.length) return O(A), !1;
1577
- return !b(P = T) && !w(P) || (n._cmp(T, v[p][1]) === 0 || n._cmp(T, v[p][0]) === 0 || O(function() {
1591
+ return S._ondirectionchange = function(E) {
1592
+ f = E === "next" ? (m = b, i) : (m = w, s), v.sort(_);
1593
+ }, S._addAlgorithm(function(E, O, A) {
1594
+ for (var I, M = E.key; m(M); ) if (++p === v.length) return O(A), !1;
1595
+ return !b(I = M) && !w(I) || (n._cmp(M, v[p][1]) === 0 || n._cmp(M, v[p][0]) === 0 || O(function() {
1578
1596
  f === i ? E.continue(v[p][0]) : E.continue(v[p][1]);
1579
1597
  }), !1);
1580
- }), _;
1598
+ }), S;
1581
1599
  }, ie.prototype.startsWithAnyOf = function() {
1582
- var e = Se.apply(Qe, arguments);
1600
+ var e = _e.apply(Qe, arguments);
1583
1601
  return e.every(function(t) {
1584
1602
  return typeof t == "string";
1585
1603
  }) ? e.length === 0 ? nt(this) : this.inAnyRange(e.map(function(t) {
@@ -1597,9 +1615,9 @@ function Ra() {
1597
1615
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
1598
1616
  }
1599
1617
  var gt = "storagemutated", wn = "x-storagemutated-1", Ce = dt(null, gt), ua = (ve.prototype._lock = function() {
1600
- return at(!G.global), ++this._reculock, this._reculock !== 1 || G.global || (G.lockOwnerFor = this), this;
1618
+ return at(!$.global), ++this._reculock, this._reculock !== 1 || $.global || ($.lockOwnerFor = this), this;
1601
1619
  }, ve.prototype._unlock = function() {
1602
- if (at(!G.global), --this._reculock == 0) for (G.global || (G.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1620
+ if (at(!$.global), --this._reculock == 0) for ($.global || ($.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1603
1621
  var e = this._blockedFuncs.shift();
1604
1622
  try {
1605
1623
  Ge(e[1], e[0]);
@@ -1608,35 +1626,35 @@ function Ra() {
1608
1626
  }
1609
1627
  return this;
1610
1628
  }, ve.prototype._locked = function() {
1611
- return this._reculock && G.lockOwnerFor !== this;
1629
+ return this._reculock && $.lockOwnerFor !== this;
1612
1630
  }, ve.prototype.create = function(e) {
1613
1631
  var t = this;
1614
1632
  if (!this.mode) return this;
1615
1633
  var n = this.db.idbdb, a = this.db._state.dbOpenError;
1616
1634
  if (at(!this.idbtrans), !e && !n) switch (a && a.name) {
1617
1635
  case "DatabaseClosedError":
1618
- throw new $.DatabaseClosed(a);
1636
+ throw new U.DatabaseClosed(a);
1619
1637
  case "MissingAPIError":
1620
- throw new $.MissingAPI(a.message, a);
1638
+ throw new U.MissingAPI(a.message, a);
1621
1639
  default:
1622
- throw new $.OpenFailed(a);
1640
+ throw new U.OpenFailed(a);
1623
1641
  }
1624
- if (!this.active) throw new $.TransactionInactive();
1642
+ if (!this.active) throw new U.TransactionInactive();
1625
1643
  return at(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = q(function(i) {
1626
1644
  pt(i), t._reject(e.error);
1627
1645
  }), e.onabort = q(function(i) {
1628
- pt(i), t.active && t._reject(new $.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
1646
+ pt(i), t.active && t._reject(new U.Abort(e.error)), t.active = !1, t.on("abort").fire(i);
1629
1647
  }), e.oncomplete = q(function() {
1630
1648
  t.active = !1, t._resolve(), "mutatedParts" in e && Ce.storagemutated.fire(e.mutatedParts);
1631
1649
  }), this;
1632
1650
  }, ve.prototype._promise = function(e, t, n) {
1633
1651
  var a = this;
1634
- if (e === "readwrite" && this.mode !== "readwrite") return te(new $.ReadOnly("Transaction is readonly"));
1635
- if (!this.active) return te(new $.TransactionInactive());
1652
+ if (e === "readwrite" && this.mode !== "readwrite") return te(new U.ReadOnly("Transaction is readonly"));
1653
+ if (!this.active) return te(new U.TransactionInactive());
1636
1654
  if (this._locked()) return new B(function(s, u) {
1637
1655
  a._blockedFuncs.push([function() {
1638
1656
  a._promise(e, t, n).then(s, u);
1639
- }, G]);
1657
+ }, $]);
1640
1658
  });
1641
1659
  if (n) return ke(function() {
1642
1660
  var s = new B(function(u, c) {
@@ -1674,23 +1692,23 @@ function Ra() {
1674
1692
  });
1675
1693
  });
1676
1694
  }, ve.prototype.abort = function() {
1677
- this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new $.Abort()));
1695
+ this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new U.Abort()));
1678
1696
  }, ve.prototype.table = function(e) {
1679
1697
  var t = this._memoizedTables || (this._memoizedTables = {});
1680
1698
  if (ee(t, e)) return t[e];
1681
1699
  var n = this.schema[e];
1682
- if (!n) throw new $.NotFound("Table " + e + " not part of transaction");
1700
+ if (!n) throw new U.NotFound("Table " + e + " not part of transaction");
1683
1701
  return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
1684
1702
  }, ve);
1685
1703
  function ve() {
1686
1704
  }
1687
- function Sn(e, t, n, a, i, s, u) {
1705
+ function _n(e, t, n, a, i, s, u) {
1688
1706
  return { name: e, keyPath: t, unique: n, multi: a, auto: i, compound: s, src: (n && !u ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + yr(t) };
1689
1707
  }
1690
1708
  function yr(e) {
1691
1709
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
1692
1710
  }
1693
- function _n(e, t, n) {
1711
+ function Sn(e, t, n) {
1694
1712
  return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (a = function(i) {
1695
1713
  return [i.name, i];
1696
1714
  }, n.reduce(function(i, s, u) {
@@ -1728,88 +1746,88 @@ function Ra() {
1728
1746
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
1729
1747
  }
1730
1748
  function la(e, t, h) {
1731
- function a(y) {
1732
- if (y.type === 3) return null;
1733
- if (y.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
1734
- var p = y.lower, b = y.upper, w = y.lowerOpen, y = y.upperOpen;
1735
- return p === void 0 ? b === void 0 ? null : t.upperBound(b, !!y) : b === void 0 ? t.lowerBound(p, !!w) : t.bound(p, b, !!w, !!y);
1749
+ function a(m) {
1750
+ if (m.type === 3) return null;
1751
+ if (m.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
1752
+ var p = m.lower, b = m.upper, w = m.lowerOpen, m = m.upperOpen;
1753
+ return p === void 0 ? b === void 0 ? null : t.upperBound(b, !!m) : b === void 0 ? t.lowerBound(p, !!w) : t.bound(p, b, !!w, !!m);
1736
1754
  }
1737
- function i(S) {
1738
- var p, b = S.name;
1739
- return { name: b, schema: S, mutate: function(w) {
1740
- var y = w.trans, _ = w.type, E = w.keys, O = w.values, A = w.range;
1741
- return new Promise(function(P, T) {
1742
- P = q(P);
1743
- var I = y.objectStore(b), C = I.keyPath == null, j = _ === "put" || _ === "add";
1744
- if (!j && _ !== "delete" && _ !== "deleteRange") throw new Error("Invalid operation type: " + _);
1745
- var R, L = (E || O || { length: 1 }).length;
1755
+ function i(_) {
1756
+ var p, b = _.name;
1757
+ return { name: b, schema: _, mutate: function(w) {
1758
+ var m = w.trans, S = w.type, E = w.keys, O = w.values, A = w.range;
1759
+ return new Promise(function(I, M) {
1760
+ I = q(I);
1761
+ var C = m.objectStore(b), R = C.keyPath == null, j = S === "put" || S === "add";
1762
+ if (!j && S !== "delete" && S !== "deleteRange") throw new Error("Invalid operation type: " + S);
1763
+ var T, G = (E || O || { length: 1 }).length;
1746
1764
  if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
1747
- if (L === 0) return P({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1765
+ if (G === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1748
1766
  function W(de) {
1749
1767
  ++pe, pt(de);
1750
1768
  }
1751
1769
  var z = [], H = [], pe = 0;
1752
- if (_ === "deleteRange") {
1753
- if (A.type === 4) return P({ numFailures: pe, failures: H, results: [], lastResult: void 0 });
1754
- A.type === 3 ? z.push(R = I.clear()) : z.push(R = I.delete(a(A)));
1770
+ if (S === "deleteRange") {
1771
+ if (A.type === 4) return I({ numFailures: pe, failures: H, results: [], lastResult: void 0 });
1772
+ A.type === 3 ? z.push(T = C.clear()) : z.push(T = C.delete(a(A)));
1755
1773
  } else {
1756
- var C = j ? C ? [O, E] : [O, null] : [E, null], F = C[0], ue = C[1];
1757
- if (j) for (var ce = 0; ce < L; ++ce) z.push(R = ue && ue[ce] !== void 0 ? I[_](F[ce], ue[ce]) : I[_](F[ce])), R.onerror = W;
1758
- else for (ce = 0; ce < L; ++ce) z.push(R = I[_](F[ce])), R.onerror = W;
1774
+ var R = j ? R ? [O, E] : [O, null] : [E, null], F = R[0], ue = R[1];
1775
+ if (j) for (var ce = 0; ce < G; ++ce) z.push(T = ue && ue[ce] !== void 0 ? C[S](F[ce], ue[ce]) : C[S](F[ce])), T.onerror = W;
1776
+ else for (ce = 0; ce < G; ++ce) z.push(T = C[S](F[ce])), T.onerror = W;
1759
1777
  }
1760
- function Jt(de) {
1778
+ function Vt(de) {
1761
1779
  de = de.target.result, z.forEach(function(ze, $n) {
1762
1780
  return ze.error != null && (H[$n] = ze.error);
1763
- }), P({ numFailures: pe, failures: H, results: _ === "delete" ? E : z.map(function(ze) {
1781
+ }), I({ numFailures: pe, failures: H, results: S === "delete" ? E : z.map(function(ze) {
1764
1782
  return ze.result;
1765
1783
  }), lastResult: de });
1766
1784
  }
1767
- R.onerror = function(de) {
1768
- W(de), Jt(de);
1769
- }, R.onsuccess = Jt;
1785
+ T.onerror = function(de) {
1786
+ W(de), Vt(de);
1787
+ }, T.onsuccess = Vt;
1770
1788
  });
1771
1789
  }, getMany: function(w) {
1772
- var y = w.trans, _ = w.keys;
1790
+ var m = w.trans, S = w.keys;
1773
1791
  return new Promise(function(E, O) {
1774
1792
  E = q(E);
1775
- for (var A, P = y.objectStore(b), T = _.length, I = new Array(T), C = 0, j = 0, R = function(z) {
1776
- z = z.target, I[z._pos] = z.result, ++j === C && E(I);
1777
- }, L = be(O), W = 0; W < T; ++W) _[W] != null && ((A = P.get(_[W]))._pos = W, A.onsuccess = R, A.onerror = L, ++C);
1778
- C === 0 && E(I);
1793
+ for (var A, I = m.objectStore(b), M = S.length, C = new Array(M), R = 0, j = 0, T = function(z) {
1794
+ z = z.target, C[z._pos] = z.result, ++j === R && E(C);
1795
+ }, G = be(O), W = 0; W < M; ++W) S[W] != null && ((A = I.get(S[W]))._pos = W, A.onsuccess = T, A.onerror = G, ++R);
1796
+ R === 0 && E(C);
1779
1797
  });
1780
1798
  }, get: function(w) {
1781
- var y = w.trans, _ = w.key;
1799
+ var m = w.trans, S = w.key;
1782
1800
  return new Promise(function(E, O) {
1783
1801
  E = q(E);
1784
- var A = y.objectStore(b).get(_);
1785
- A.onsuccess = function(P) {
1786
- return E(P.target.result);
1802
+ var A = m.objectStore(b).get(S);
1803
+ A.onsuccess = function(I) {
1804
+ return E(I.target.result);
1787
1805
  }, A.onerror = be(O);
1788
1806
  });
1789
- }, query: (p = g, function(w) {
1790
- return new Promise(function(y, _) {
1791
- y = q(y);
1792
- var E, O, A, C = w.trans, P = w.values, T = w.limit, R = w.query, I = T === 1 / 0 ? void 0 : T, j = R.index, R = R.range, C = C.objectStore(b), j = j.isPrimaryKey ? C : C.index(j.name), R = a(R);
1793
- if (T === 0) return y({ result: [] });
1794
- p ? ((I = P ? j.getAll(R, I) : j.getAllKeys(R, I)).onsuccess = function(L) {
1795
- return y({ result: L.target.result });
1796
- }, I.onerror = be(_)) : (E = 0, O = !P && "openKeyCursor" in j ? j.openKeyCursor(R) : j.openCursor(R), A = [], O.onsuccess = function(L) {
1807
+ }, query: (p = y, function(w) {
1808
+ return new Promise(function(m, S) {
1809
+ m = q(m);
1810
+ var E, O, A, R = w.trans, I = w.values, M = w.limit, T = w.query, C = M === 1 / 0 ? void 0 : M, j = T.index, T = T.range, R = R.objectStore(b), j = j.isPrimaryKey ? R : R.index(j.name), T = a(T);
1811
+ if (M === 0) return m({ result: [] });
1812
+ p ? ((C = I ? j.getAll(T, C) : j.getAllKeys(T, C)).onsuccess = function(G) {
1813
+ return m({ result: G.target.result });
1814
+ }, C.onerror = be(S)) : (E = 0, O = !I && "openKeyCursor" in j ? j.openKeyCursor(T) : j.openCursor(T), A = [], O.onsuccess = function(G) {
1797
1815
  var W = O.result;
1798
- return W ? (A.push(P ? W.value : W.primaryKey), ++E === T ? y({ result: A }) : void W.continue()) : y({ result: A });
1799
- }, O.onerror = be(_));
1816
+ return W ? (A.push(I ? W.value : W.primaryKey), ++E === M ? m({ result: A }) : void W.continue()) : m({ result: A });
1817
+ }, O.onerror = be(S));
1800
1818
  });
1801
1819
  }), openCursor: function(w) {
1802
- var y = w.trans, _ = w.values, E = w.query, O = w.reverse, A = w.unique;
1803
- return new Promise(function(P, T) {
1804
- P = q(P);
1805
- var j = E.index, I = E.range, C = y.objectStore(b), C = j.isPrimaryKey ? C : C.index(j.name), j = O ? A ? "prevunique" : "prev" : A ? "nextunique" : "next", R = !_ && "openKeyCursor" in C ? C.openKeyCursor(a(I), j) : C.openCursor(a(I), j);
1806
- R.onerror = be(T), R.onsuccess = q(function(L) {
1807
- var W, z, H, pe, F = R.result;
1820
+ var m = w.trans, S = w.values, E = w.query, O = w.reverse, A = w.unique;
1821
+ return new Promise(function(I, M) {
1822
+ I = q(I);
1823
+ var j = E.index, C = E.range, R = m.objectStore(b), R = j.isPrimaryKey ? R : R.index(j.name), j = O ? A ? "prevunique" : "prev" : A ? "nextunique" : "next", T = !S && "openKeyCursor" in R ? R.openKeyCursor(a(C), j) : R.openCursor(a(C), j);
1824
+ T.onerror = be(M), T.onsuccess = q(function(G) {
1825
+ var W, z, H, pe, F = T.result;
1808
1826
  F ? (F.___id = ++ca, F.done = !1, W = F.continue.bind(F), z = (z = F.continuePrimaryKey) && z.bind(F), H = F.advance.bind(F), pe = function() {
1809
1827
  throw new Error("Cursor not stopped");
1810
- }, F.trans = y, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
1828
+ }, F.trans = m, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
1811
1829
  throw new Error("Cursor not started");
1812
- }, F.fail = q(T), F.next = function() {
1830
+ }, F.fail = q(M), F.next = function() {
1813
1831
  var ue = this, ce = 1;
1814
1832
  return this.start(function() {
1815
1833
  return ce-- ? ue.continue() : ue.stop();
@@ -1818,7 +1836,7 @@ function Ra() {
1818
1836
  });
1819
1837
  }, F.start = function(ue) {
1820
1838
  function ce() {
1821
- if (R.result) try {
1839
+ if (T.result) try {
1822
1840
  ue();
1823
1841
  } catch (de) {
1824
1842
  F.fail(de);
@@ -1827,45 +1845,45 @@ function Ra() {
1827
1845
  throw new Error("Cursor behind last entry");
1828
1846
  }, F.stop();
1829
1847
  }
1830
- var Jt = new Promise(function(de, ze) {
1831
- de = q(de), R.onerror = be(ze), F.fail = ze, F.stop = function($n) {
1848
+ var Vt = new Promise(function(de, ze) {
1849
+ de = q(de), T.onerror = be(ze), F.fail = ze, F.stop = function($n) {
1832
1850
  F.stop = F.continue = F.continuePrimaryKey = F.advance = pe, de($n);
1833
1851
  };
1834
1852
  });
1835
- return R.onsuccess = q(function(de) {
1836
- R.onsuccess = ce, ce();
1837
- }), F.continue = W, F.continuePrimaryKey = z, F.advance = H, ce(), Jt;
1838
- }, P(F)) : P(null);
1839
- }, T);
1853
+ return T.onsuccess = q(function(de) {
1854
+ T.onsuccess = ce, ce();
1855
+ }), F.continue = W, F.continuePrimaryKey = z, F.advance = H, ce(), Vt;
1856
+ }, I(F)) : I(null);
1857
+ }, M);
1840
1858
  });
1841
1859
  }, count: function(w) {
1842
- var y = w.query, _ = w.trans, E = y.index, O = y.range;
1843
- return new Promise(function(A, P) {
1844
- var T = _.objectStore(b), I = E.isPrimaryKey ? T : T.index(E.name), T = a(O), I = T ? I.count(T) : I.count();
1845
- I.onsuccess = q(function(C) {
1846
- return A(C.target.result);
1847
- }), I.onerror = be(P);
1860
+ var m = w.query, S = w.trans, E = m.index, O = m.range;
1861
+ return new Promise(function(A, I) {
1862
+ var M = S.objectStore(b), C = E.isPrimaryKey ? M : M.index(E.name), M = a(O), C = M ? C.count(M) : C.count();
1863
+ C.onsuccess = q(function(R) {
1864
+ return A(R.target.result);
1865
+ }), C.onerror = be(I);
1848
1866
  });
1849
1867
  } };
1850
1868
  }
1851
- var s, u, c, v = (u = h, c = mr((s = e).objectStoreNames), { schema: { name: s.name, tables: c.map(function(S) {
1852
- return u.objectStore(S);
1853
- }).map(function(S) {
1854
- var p = S.keyPath, y = S.autoIncrement, b = U(p), w = {}, y = { name: S.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: b, keyPath: p, autoIncrement: y, unique: !0, extractKey: En(p) }, indexes: mr(S.indexNames).map(function(_) {
1855
- return S.index(_);
1869
+ var s, u, c, v = (u = h, c = mr((s = e).objectStoreNames), { schema: { name: s.name, tables: c.map(function(_) {
1870
+ return u.objectStore(_);
1871
+ }).map(function(_) {
1872
+ var p = _.keyPath, m = _.autoIncrement, b = L(p), w = {}, m = { name: _.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: b, keyPath: p, autoIncrement: m, unique: !0, extractKey: En(p) }, indexes: mr(_.indexNames).map(function(S) {
1873
+ return _.index(S);
1856
1874
  }).map(function(A) {
1857
- var E = A.name, O = A.unique, P = A.multiEntry, A = A.keyPath, P = { name: E, compound: U(A), keyPath: A, unique: O, multiEntry: P, extractKey: En(A) };
1858
- return w[mt(A)] = P;
1859
- }), getIndexByKeyPath: function(_) {
1860
- return w[mt(_)];
1875
+ var E = A.name, O = A.unique, I = A.multiEntry, A = A.keyPath, I = { name: E, compound: L(A), keyPath: A, unique: O, multiEntry: I, extractKey: En(A) };
1876
+ return w[mt(A)] = I;
1877
+ }), getIndexByKeyPath: function(S) {
1878
+ return w[mt(S)];
1861
1879
  } };
1862
- return w[":id"] = y.primaryKey, p != null && (w[mt(p)] = y.primaryKey), y;
1863
- }) }, hasGetAll: 0 < c.length && "getAll" in u.objectStore(c[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = v.schema, g = v.hasGetAll, v = h.tables.map(i), f = {};
1864
- return v.forEach(function(S) {
1865
- return f[S.name] = S;
1866
- }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(S) {
1867
- if (!f[S]) throw new Error("Table '".concat(S, "' not found"));
1868
- return f[S];
1880
+ return w[":id"] = m.primaryKey, p != null && (w[mt(p)] = m.primaryKey), m;
1881
+ }) }, hasGetAll: 0 < c.length && "getAll" in u.objectStore(c[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = v.schema, y = v.hasGetAll, v = h.tables.map(i), f = {};
1882
+ return v.forEach(function(_) {
1883
+ return f[_.name] = _;
1884
+ }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(_) {
1885
+ if (!f[_]) throw new Error("Table '".concat(_, "' not found"));
1886
+ return f[_];
1869
1887
  }, MIN_KEY: -1 / 0, MAX_KEY: yt(t), schema: h };
1870
1888
  }
1871
1889
  function da(e, t, n, a) {
@@ -1887,8 +1905,8 @@ function Ra() {
1887
1905
  n.forEach(function(i) {
1888
1906
  var s = a[i];
1889
1907
  t.forEach(function(u) {
1890
- var c = function h(g, v) {
1891
- return Ur(g, v) || (g = X(g)) && h(g, v);
1908
+ var c = function h(y, v) {
1909
+ return Ur(y, v) || (y = X(y)) && h(y, v);
1892
1910
  }(u, i);
1893
1911
  (!c || "value" in c && c.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? xe(u, i, { get: function() {
1894
1912
  return this.table(i);
@@ -1908,71 +1926,71 @@ function Ra() {
1908
1926
  }
1909
1927
  function ha(e, t, n, a) {
1910
1928
  var i = e._dbSchema;
1911
- n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = _n("$meta", vr("")[0], []), e._storeNames.push("$meta"));
1929
+ n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = Sn("$meta", vr("")[0], []), e._storeNames.push("$meta"));
1912
1930
  var s = e._createTransaction("readwrite", e._storeNames, i);
1913
1931
  s.create(n), s._completion.catch(a);
1914
- var u = s._reject.bind(s), c = G.transless || G;
1932
+ var u = s._reject.bind(s), c = $.transless || $;
1915
1933
  ke(function() {
1916
- return G.trans = s, G.transless = c, t !== 0 ? (Bt(e, n), g = t, ((h = s).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(v) {
1917
- return v ?? g;
1918
- }) : B.resolve(g)).then(function(v) {
1919
- return S = v, p = s, b = n, w = [], v = (f = e)._versions, y = f._dbSchema = $t(0, f.idbdb, b), (v = v.filter(function(_) {
1920
- return _._cfg.version >= S;
1921
- })).length !== 0 ? (v.forEach(function(_) {
1934
+ return $.trans = s, $.transless = c, t !== 0 ? (Bt(e, n), y = t, ((h = s).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(v) {
1935
+ return v ?? y;
1936
+ }) : B.resolve(y)).then(function(v) {
1937
+ return _ = v, p = s, b = n, w = [], v = (f = e)._versions, m = f._dbSchema = $t(0, f.idbdb, b), (v = v.filter(function(S) {
1938
+ return S._cfg.version >= _;
1939
+ })).length !== 0 ? (v.forEach(function(S) {
1922
1940
  w.push(function() {
1923
- var E = y, O = _._cfg.dbschema;
1924
- Ut(f, E, b), Ut(f, O, b), y = f._dbSchema = O;
1941
+ var E = m, O = S._cfg.dbschema;
1942
+ Ut(f, E, b), Ut(f, O, b), m = f._dbSchema = O;
1925
1943
  var A = xn(E, O);
1926
1944
  A.add.forEach(function(j) {
1927
1945
  An(b, j[0], j[1].primKey, j[1].indexes);
1928
1946
  }), A.change.forEach(function(j) {
1929
- if (j.recreate) throw new $.Upgrade("Not yet support for changing primary key");
1930
- var R = b.objectStore(j.name);
1931
- j.add.forEach(function(L) {
1932
- return Gt(R, L);
1933
- }), j.change.forEach(function(L) {
1934
- R.deleteIndex(L.name), Gt(R, L);
1935
- }), j.del.forEach(function(L) {
1936
- return R.deleteIndex(L);
1947
+ if (j.recreate) throw new U.Upgrade("Not yet support for changing primary key");
1948
+ var T = b.objectStore(j.name);
1949
+ j.add.forEach(function(G) {
1950
+ return Gt(T, G);
1951
+ }), j.change.forEach(function(G) {
1952
+ T.deleteIndex(G.name), Gt(T, G);
1953
+ }), j.del.forEach(function(G) {
1954
+ return T.deleteIndex(G);
1937
1955
  });
1938
1956
  });
1939
- var P = _._cfg.contentUpgrade;
1940
- if (P && _._cfg.version > S) {
1957
+ var I = S._cfg.contentUpgrade;
1958
+ if (I && S._cfg.version > _) {
1941
1959
  Bt(f, b), p._memoizedTables = {};
1942
- var T = Qn(O);
1960
+ var M = Qn(O);
1943
1961
  A.del.forEach(function(j) {
1944
- T[j] = E[j];
1945
- }), On(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], K(T), T), p.schema = T;
1946
- var I, C = rn(P);
1947
- return C && qe(), A = B.follow(function() {
1962
+ M[j] = E[j];
1963
+ }), On(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], K(M), M), p.schema = M;
1964
+ var C, R = rn(I);
1965
+ return R && qe(), A = B.follow(function() {
1948
1966
  var j;
1949
- (I = P(p)) && C && (j = De.bind(null, null), I.then(j, j));
1950
- }), I && typeof I.then == "function" ? B.resolve(I) : A.then(function() {
1951
- return I;
1967
+ (C = I(p)) && R && (j = De.bind(null, null), C.then(j, j));
1968
+ }), C && typeof C.then == "function" ? B.resolve(C) : A.then(function() {
1969
+ return C;
1952
1970
  });
1953
1971
  }
1954
1972
  }), w.push(function(E) {
1955
- var O, A, P = _._cfg.dbschema;
1956
- O = P, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(T) {
1957
- return O[T] == null && A.db.deleteObjectStore(T);
1973
+ var O, A, I = S._cfg.dbschema;
1974
+ O = I, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(M) {
1975
+ return O[M] == null && A.db.deleteObjectStore(M);
1958
1976
  }), On(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), p.schema = f._dbSchema;
1959
1977
  }), w.push(function(E) {
1960
- f.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(f.idbdb.version / 10) === _._cfg.version ? (f.idbdb.deleteObjectStore("$meta"), delete f._dbSchema.$meta, f._storeNames = f._storeNames.filter(function(O) {
1978
+ f.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(f.idbdb.version / 10) === S._cfg.version ? (f.idbdb.deleteObjectStore("$meta"), delete f._dbSchema.$meta, f._storeNames = f._storeNames.filter(function(O) {
1961
1979
  return O !== "$meta";
1962
- })) : E.objectStore("$meta").put(_._cfg.version, "version"));
1980
+ })) : E.objectStore("$meta").put(S._cfg.version, "version"));
1963
1981
  });
1964
- }), function _() {
1965
- return w.length ? B.resolve(w.shift()(p.idbtrans)).then(_) : B.resolve();
1982
+ }), function S() {
1983
+ return w.length ? B.resolve(w.shift()(p.idbtrans)).then(S) : B.resolve();
1966
1984
  }().then(function() {
1967
- br(y, b);
1985
+ br(m, b);
1968
1986
  })) : B.resolve();
1969
- var f, S, p, b, w, y;
1987
+ var f, _, p, b, w, m;
1970
1988
  }).catch(u)) : (K(i).forEach(function(v) {
1971
1989
  An(n, v, i[v].primKey, i[v].indexes);
1972
1990
  }), Bt(e, n), void B.follow(function() {
1973
1991
  return e.on.populate.fire(s);
1974
1992
  }).catch(u));
1975
- var h, g;
1993
+ var h, y;
1976
1994
  });
1977
1995
  }
1978
1996
  function pa(e, t) {
@@ -1999,10 +2017,10 @@ function Ra() {
1999
2017
  var u = { name: n, def: s, recreate: !1, del: [], add: [], change: [] };
2000
2018
  if ("" + (i.primKey.keyPath || "") != "" + (s.primKey.keyPath || "") || i.primKey.auto !== s.primKey.auto) u.recreate = !0, a.change.push(u);
2001
2019
  else {
2002
- var c = i.idxByName, h = s.idxByName, g = void 0;
2003
- for (g in c) h[g] || u.del.push(g);
2004
- for (g in h) {
2005
- var v = c[g], f = h[g];
2020
+ var c = i.idxByName, h = s.idxByName, y = void 0;
2021
+ for (y in c) h[y] || u.del.push(y);
2022
+ for (y in h) {
2023
+ var v = c[y], f = h[y];
2006
2024
  v ? v.src !== f.src && u.change.push(f) : u.add.push(f);
2007
2025
  }
2008
2026
  (0 < u.del.length || 0 < u.add.length || 0 < u.change.length) && a.change.push(u);
@@ -2027,12 +2045,12 @@ function Ra() {
2027
2045
  }
2028
2046
  function $t(e, t, n) {
2029
2047
  var a = {};
2030
- return _t(t.objectStoreNames, 0).forEach(function(i) {
2031
- for (var s = n.objectStore(i), u = Sn(yr(g = s.keyPath), g || "", !0, !1, !!s.autoIncrement, g && typeof g != "string", !0), c = [], h = 0; h < s.indexNames.length; ++h) {
2032
- var v = s.index(s.indexNames[h]), g = v.keyPath, v = Sn(v.name, g, !!v.unique, !!v.multiEntry, !1, g && typeof g != "string", !1);
2048
+ return St(t.objectStoreNames, 0).forEach(function(i) {
2049
+ for (var s = n.objectStore(i), u = _n(yr(y = s.keyPath), y || "", !0, !1, !!s.autoIncrement, y && typeof y != "string", !0), c = [], h = 0; h < s.indexNames.length; ++h) {
2050
+ var v = s.index(s.indexNames[h]), y = v.keyPath, v = _n(v.name, y, !!v.unique, !!v.multiEntry, !1, y && typeof y != "string", !1);
2033
2051
  c.push(v);
2034
2052
  }
2035
- a[i] = _n(i, u, c);
2053
+ a[i] = Sn(i, u, c);
2036
2054
  }), a;
2037
2055
  }
2038
2056
  function Ut(e, t, n) {
@@ -2040,8 +2058,8 @@ function Ra() {
2040
2058
  var s = a[i], u = n.objectStore(s);
2041
2059
  e._hasGetAll = "getAll" in u;
2042
2060
  for (var c = 0; c < u.indexNames.length; ++c) {
2043
- var h = u.indexNames[c], g = u.index(h).keyPath, v = typeof g == "string" ? g : "[" + _t(g).join("+") + "]";
2044
- !t[s] || (g = t[s].idxByName[v]) && (g.name = h, delete t[s].idxByName[v], t[s].idxByName[h] = g);
2061
+ var h = u.indexNames[c], y = u.index(h).keyPath, v = typeof y == "string" ? y : "[" + St(y).join("+") + "]";
2062
+ !t[s] || (y = t[s].idxByName[v]) && (y.name = h, delete t[s].idxByName[v], t[s].idxByName[h] = y);
2045
2063
  }
2046
2064
  }
2047
2065
  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);
@@ -2049,29 +2067,29 @@ function Ra() {
2049
2067
  function vr(e) {
2050
2068
  return e.split(",").map(function(t, n) {
2051
2069
  var a = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(a) ? a.match(/^\[(.*)\]$/)[1].split("+") : a;
2052
- return Sn(a, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), U(i), n === 0);
2070
+ return _n(a, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), L(i), n === 0);
2053
2071
  });
2054
2072
  }
2055
2073
  var ga = (Ft.prototype._parseStoresSpec = function(e, t) {
2056
2074
  K(e).forEach(function(n) {
2057
2075
  if (e[n] !== null) {
2058
2076
  var a = vr(e[n]), i = a.shift();
2059
- if (i.unique = !0, i.multi) throw new $.Schema("Primary key cannot be multi-valued");
2077
+ if (i.unique = !0, i.multi) throw new U.Schema("Primary key cannot be multi-valued");
2060
2078
  a.forEach(function(s) {
2061
- if (s.auto) throw new $.Schema("Only primary key can be marked as autoIncrement (++)");
2062
- if (!s.keyPath) throw new $.Schema("Index must have a name and cannot be an empty string");
2063
- }), t[n] = _n(n, i, a);
2079
+ if (s.auto) throw new U.Schema("Only primary key can be marked as autoIncrement (++)");
2080
+ if (!s.keyPath) throw new U.Schema("Index must have a name and cannot be an empty string");
2081
+ }), t[n] = Sn(n, i, a);
2064
2082
  }
2065
2083
  });
2066
2084
  }, Ft.prototype.stores = function(n) {
2067
2085
  var t = this.db;
2068
- this._cfg.storesSource = this._cfg.storesSource ? M(this._cfg.storesSource, n) : n;
2086
+ this._cfg.storesSource = this._cfg.storesSource ? P(this._cfg.storesSource, n) : n;
2069
2087
  var n = t._versions, a = {}, i = {};
2070
2088
  return n.forEach(function(s) {
2071
- M(a, s._cfg.storesSource), i = s._cfg.dbschema = {}, s._parseStoresSpec(a, i);
2089
+ P(a, s._cfg.storesSource), i = s._cfg.dbschema = {}, s._parseStoresSpec(a, i);
2072
2090
  }), t._dbSchema = i, On(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], K(i), i), t._storeNames = K(i), this;
2073
2091
  }, Ft.prototype.upgrade = function(e) {
2074
- return this._cfg.contentUpgrade = sn(this._cfg.contentUpgrade || J, e), this;
2092
+ return this._cfg.contentUpgrade = sn(this._cfg.contentUpgrade || V, e), this;
2075
2093
  }, Ft);
2076
2094
  function Ft() {
2077
2095
  }
@@ -2084,7 +2102,7 @@ function Ra() {
2084
2102
  }
2085
2103
  function Pn(e) {
2086
2104
  return ke(function() {
2087
- return G.letThrough = !0, e();
2105
+ return $.letThrough = !0, e();
2088
2106
  });
2089
2107
  }
2090
2108
  function In(e) {
@@ -2093,18 +2111,18 @@ function Ra() {
2093
2111
  var oe = function(e, t) {
2094
2112
  if (!this) {
2095
2113
  var n = new oe();
2096
- return e && "d" in e && M(n, e), n;
2114
+ return e && "d" in e && P(n, e), n;
2097
2115
  }
2098
- M(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2116
+ P(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2099
2117
  };
2100
2118
  function bt(e, t, n) {
2101
2119
  var a = Y(t, n);
2102
2120
  if (!isNaN(a)) {
2103
2121
  if (0 < a) throw RangeError();
2104
- if (In(e)) return M(e, { from: t, to: n, d: 1 });
2122
+ if (In(e)) return P(e, { from: t, to: n, d: 1 });
2105
2123
  var i = e.l, a = e.r;
2106
- if (Y(n, e.from) < 0) return i ? bt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, Sr(e);
2107
- if (0 < Y(t, e.to)) return a ? bt(a, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, Sr(e);
2124
+ if (Y(n, e.from) < 0) return i ? bt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2125
+ if (0 < Y(t, e.to)) return a ? bt(a, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2108
2126
  Y(t, e.from) < 0 && (e.from = t, e.l = null, e.d = a ? a.d + 1 : 1), 0 < Y(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && vt(e, i), a && n && vt(e, a);
2109
2127
  }
2110
2128
  }
@@ -2143,11 +2161,11 @@ function Ra() {
2143
2161
  return { done: !0 };
2144
2162
  } };
2145
2163
  }
2146
- function Sr(e) {
2164
+ function _r(e) {
2147
2165
  var t, n, a = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), i = 1 < a ? "r" : a < -1 ? "l" : "";
2148
- i && (t = i == "r" ? "l" : "r", n = l({}, e), a = e[i], e.from = a.from, e.to = a.to, e[i] = a[i], n[i] = a[t], (e[t] = n).d = _r(n)), e.d = _r(e);
2166
+ i && (t = i == "r" ? "l" : "r", n = l({}, e), a = e[i], e.from = a.from, e.to = a.to, e[i] = a[i], n[i] = a[t], (e[t] = n).d = Sr(n)), e.d = Sr(e);
2149
2167
  }
2150
- function _r(n) {
2168
+ function Sr(n) {
2151
2169
  var t = n.r, n = n.l;
2152
2170
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
2153
2171
  }
@@ -2155,7 +2173,7 @@ function Ra() {
2155
2173
  return K(t).forEach(function(n) {
2156
2174
  e[n] ? vt(e[n], t[n]) : e[n] = function a(i) {
2157
2175
  var s, u, c = {};
2158
- for (s in i) ee(i, s) && (u = i[s], c[s] = !u || typeof u != "object" || Jn.has(u.constructor) ? u : a(u));
2176
+ for (s in i) ee(i, s) && (u = i[s], c[s] = !u || typeof u != "object" || Vn.has(u.constructor) ? u : a(u));
2159
2177
  return c;
2160
2178
  }(t[n]);
2161
2179
  }), e;
@@ -2200,17 +2218,17 @@ function Ra() {
2200
2218
  }
2201
2219
  function Er(e, t, n, a) {
2202
2220
  for (var i = [], s = 0, u = Object.entries(e.queries.query); s < u.length; s++) {
2203
- for (var c = u[s], h = c[0], g = [], v = 0, f = c[1]; v < f.length; v++) {
2204
- var S = f[v];
2205
- Cn(t, S.obsSet) ? S.subscribers.forEach(function(y) {
2206
- return n.add(y);
2207
- }) : a && g.push(S);
2221
+ for (var c = u[s], h = c[0], y = [], v = 0, f = c[1]; v < f.length; v++) {
2222
+ var _ = f[v];
2223
+ Cn(t, _.obsSet) ? _.subscribers.forEach(function(m) {
2224
+ return n.add(m);
2225
+ }) : a && y.push(_);
2208
2226
  }
2209
- a && i.push([h, g]);
2227
+ a && i.push([h, y]);
2210
2228
  }
2211
2229
  if (a) for (var p = 0, b = i; p < b.length; p++) {
2212
- var w = b[p], h = w[0], g = w[1];
2213
- e.queries.query[h] = g;
2230
+ var w = b[p], h = w[0], y = w[1];
2231
+ e.queries.query[h] = y;
2214
2232
  }
2215
2233
  }
2216
2234
  function ya(e) {
@@ -2221,51 +2239,51 @@ function Ra() {
2221
2239
  t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
2222
2240
  var a = t.openCanceller, i = Math.round(10 * e.verno), s = !1;
2223
2241
  function u() {
2224
- if (t.openCanceller !== a) throw new $.DatabaseClosed("db.open() was cancelled");
2242
+ if (t.openCanceller !== a) throw new U.DatabaseClosed("db.open() was cancelled");
2225
2243
  }
2226
2244
  function c() {
2227
- return new B(function(S, p) {
2228
- if (u(), !n) throw new $.MissingAPI();
2245
+ return new B(function(_, p) {
2246
+ if (u(), !n) throw new U.MissingAPI();
2229
2247
  var b = e.name, w = t.autoSchema || !i ? n.open(b) : n.open(b, i);
2230
- if (!w) throw new $.MissingAPI();
2231
- w.onerror = be(p), w.onblocked = q(e._fireOnBlocked), w.onupgradeneeded = q(function(y) {
2232
- var _;
2233
- v = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, v.abort(), w.result.close(), (_ = n.deleteDatabase(b)).onsuccess = _.onerror = q(function() {
2234
- p(new $.NoSuchDatabase("Database ".concat(b, " doesnt exist")));
2235
- })) : (v.onerror = be(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, f = y < 1, e.idbdb = w.result, s && pa(e, v), ha(e, y / 10, v, p));
2248
+ if (!w) throw new U.MissingAPI();
2249
+ w.onerror = be(p), w.onblocked = q(e._fireOnBlocked), w.onupgradeneeded = q(function(m) {
2250
+ var S;
2251
+ v = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = pt, v.abort(), w.result.close(), (S = n.deleteDatabase(b)).onsuccess = S.onerror = q(function() {
2252
+ p(new U.NoSuchDatabase("Database ".concat(b, " doesnt exist")));
2253
+ })) : (v.onerror = be(p), m = m.oldVersion > Math.pow(2, 62) ? 0 : m.oldVersion, f = m < 1, e.idbdb = w.result, s && pa(e, v), ha(e, m / 10, v, p));
2236
2254
  }, p), w.onsuccess = q(function() {
2237
2255
  v = null;
2238
- var y, _, E, O, A, P = e.idbdb = w.result, T = _t(P.objectStoreNames);
2239
- if (0 < T.length) try {
2240
- var I = P.transaction((O = T).length === 1 ? O[0] : O, "readonly");
2241
- if (t.autoSchema) _ = P, E = I, (y = e).verno = _.version / 10, E = y._dbSchema = $t(0, _, E), y._storeNames = _t(_.objectStoreNames, 0), Lt(y, [y._allTables], K(E), E);
2242
- else if (Ut(e, e._dbSchema, I), ((A = xn($t(0, (A = e).idbdb, I), A._dbSchema)).add.length || A.change.some(function(C) {
2243
- return C.add.length || C.change.length;
2244
- })) && !s) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), P.close(), i = P.version + 1, s = !0, S(c());
2245
- Bt(e, I);
2256
+ var m, S, E, O, A, I = e.idbdb = w.result, M = St(I.objectStoreNames);
2257
+ if (0 < M.length) try {
2258
+ var C = I.transaction((O = M).length === 1 ? O[0] : O, "readonly");
2259
+ if (t.autoSchema) S = I, E = C, (m = e).verno = S.version / 10, E = m._dbSchema = $t(0, S, E), m._storeNames = St(S.objectStoreNames, 0), Lt(m, [m._allTables], K(E), E);
2260
+ else if (Ut(e, e._dbSchema, C), ((A = xn($t(0, (A = e).idbdb, C), A._dbSchema)).add.length || A.change.some(function(R) {
2261
+ return R.add.length || R.change.length;
2262
+ })) && !s) 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, s = !0, _(c());
2263
+ Bt(e, C);
2246
2264
  } catch {
2247
2265
  }
2248
- et.push(e), P.onversionchange = q(function(C) {
2249
- t.vcFired = !0, e.on("versionchange").fire(C);
2250
- }), P.onclose = q(function(C) {
2251
- e.on("close").fire(C);
2252
- }), f && (A = e._deps, I = b, P = A.indexedDB, A = A.IDBKeyRange, Dn(P) || I === Tt || kn(P, A).put({ name: I }).catch(J)), S();
2266
+ et.push(e), I.onversionchange = q(function(R) {
2267
+ t.vcFired = !0, e.on("versionchange").fire(R);
2268
+ }), I.onclose = q(function(R) {
2269
+ e.on("close").fire(R);
2270
+ }), f && (A = e._deps, C = b, I = A.indexedDB, A = A.IDBKeyRange, Dn(I) || C === Tt || kn(I, A).put({ name: C }).catch(V)), _();
2253
2271
  }, p);
2254
- }).catch(function(S) {
2255
- switch (S == null ? void 0 : S.name) {
2272
+ }).catch(function(_) {
2273
+ switch (_ == null ? void 0 : _.name) {
2256
2274
  case "UnknownError":
2257
2275
  if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), c();
2258
2276
  break;
2259
2277
  case "VersionError":
2260
2278
  if (0 < i) return i = 0, c();
2261
2279
  }
2262
- return B.reject(S);
2280
+ return B.reject(_);
2263
2281
  });
2264
2282
  }
2265
- var h, g = t.dbReadyResolve, v = null, f = !1;
2266
- return B.race([a, (typeof navigator > "u" ? B.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(S) {
2283
+ var h, y = t.dbReadyResolve, v = null, f = !1;
2284
+ return B.race([a, (typeof navigator > "u" ? B.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(_) {
2267
2285
  function p() {
2268
- return indexedDB.databases().finally(S);
2286
+ return indexedDB.databases().finally(_);
2269
2287
  }
2270
2288
  h = setInterval(p, 100), p();
2271
2289
  }).finally(function() {
@@ -2273,32 +2291,32 @@ function Ra() {
2273
2291
  }) : Promise.resolve()).then(c)]).then(function() {
2274
2292
  return u(), t.onReadyBeingFired = [], B.resolve(Pn(function() {
2275
2293
  return e.on.ready.fire(e.vip);
2276
- })).then(function S() {
2294
+ })).then(function _() {
2277
2295
  if (0 < t.onReadyBeingFired.length) {
2278
- var p = t.onReadyBeingFired.reduce(sn, J);
2296
+ var p = t.onReadyBeingFired.reduce(sn, V);
2279
2297
  return t.onReadyBeingFired = [], B.resolve(Pn(function() {
2280
2298
  return p(e.vip);
2281
- })).then(S);
2299
+ })).then(_);
2282
2300
  }
2283
2301
  });
2284
2302
  }).finally(function() {
2285
2303
  t.openCanceller === a && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
2286
- }).catch(function(S) {
2287
- t.dbOpenError = S;
2304
+ }).catch(function(_) {
2305
+ t.dbOpenError = _;
2288
2306
  try {
2289
2307
  v && v.abort();
2290
2308
  } catch {
2291
2309
  }
2292
- return a === t.openCanceller && e._close(), te(S);
2310
+ return a === t.openCanceller && e._close(), te(_);
2293
2311
  }).finally(function() {
2294
- t.openComplete = !0, g();
2312
+ t.openComplete = !0, y();
2295
2313
  }).then(function() {
2296
- var S;
2297
- return f && (S = {}, e.tables.forEach(function(p) {
2314
+ var _;
2315
+ return f && (_ = {}, e.tables.forEach(function(p) {
2298
2316
  p.schema.indexes.forEach(function(b) {
2299
- b.name && (S["idb://".concat(e.name, "/").concat(p.name, "/").concat(b.name)] = new oe(-1 / 0, [[[]]]));
2300
- }), S["idb://".concat(e.name, "/").concat(p.name, "/")] = S["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
2301
- }), Ce(gt).fire(S), Mn(S, !0)), e;
2317
+ b.name && (_["idb://".concat(e.name, "/").concat(p.name, "/").concat(b.name)] = new oe(-1 / 0, [[[]]]));
2318
+ }), _["idb://".concat(e.name, "/").concat(p.name, "/")] = _["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
2319
+ }), Ce(gt).fire(_), Mn(_, !0)), e;
2302
2320
  });
2303
2321
  }
2304
2322
  function jn(e) {
@@ -2311,32 +2329,32 @@ function Ra() {
2311
2329
  function i(s) {
2312
2330
  return function(h) {
2313
2331
  var c = s(h), h = c.value;
2314
- return c.done ? h : h && typeof h.then == "function" ? h.then(n, a) : U(h) ? Promise.all(h).then(n, a) : n(h);
2332
+ return c.done ? h : h && typeof h.then == "function" ? h.then(n, a) : L(h) ? Promise.all(h).then(n, a) : n(h);
2315
2333
  };
2316
2334
  }
2317
2335
  return i(t)();
2318
2336
  }
2319
2337
  function Yt(e, t, n) {
2320
- for (var a = U(e) ? e.slice() : [e], i = 0; i < n; ++i) a.push(t);
2338
+ for (var a = L(e) ? e.slice() : [e], i = 0; i < n; ++i) a.push(t);
2321
2339
  return a;
2322
2340
  }
2323
2341
  var ma = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2324
2342
  return l(l({}, e), { table: function(t) {
2325
2343
  var n = e.table(t), a = n.schema, i = {}, s = [];
2326
- function u(f, S, p) {
2327
- var b = mt(f), w = i[b] = i[b] || [], y = f == null ? 0 : typeof f == "string" ? 1 : f.length, _ = 0 < S, _ = l(l({}, p), { name: _ ? "".concat(b, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: _, keyTail: S, keyLength: y, extractKey: En(f), unique: !_ && p.unique });
2328
- return w.push(_), _.isPrimaryKey || s.push(_), 1 < y && u(y === 2 ? f[0] : f.slice(0, y - 1), S + 1, p), w.sort(function(E, O) {
2344
+ function u(f, _, p) {
2345
+ var b = mt(f), w = i[b] = i[b] || [], m = f == null ? 0 : typeof f == "string" ? 1 : f.length, S = 0 < _, S = l(l({}, p), { name: S ? "".concat(b, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: S, keyTail: _, keyLength: m, extractKey: En(f), unique: !S && p.unique });
2346
+ return w.push(S), S.isPrimaryKey || s.push(S), 1 < m && u(m === 2 ? f[0] : f.slice(0, m - 1), _ + 1, p), w.sort(function(E, O) {
2329
2347
  return E.keyTail - O.keyTail;
2330
- }), _;
2348
+ }), S;
2331
2349
  }
2332
2350
  t = u(a.primaryKey.keyPath, 0, a.primaryKey), i[":id"] = [t];
2333
2351
  for (var c = 0, h = a.indexes; c < h.length; c++) {
2334
- var g = h[c];
2335
- u(g.keyPath, 0, g);
2352
+ var y = h[c];
2353
+ u(y.keyPath, 0, y);
2336
2354
  }
2337
2355
  function v(f) {
2338
- var S, p = f.query.index;
2339
- return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (S = f.query.range, p = p.keyTail, { type: S.type === 1 ? 2 : S.type, lower: Yt(S.lower, S.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Yt(S.upper, S.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
2356
+ var _, p = f.query.index;
2357
+ return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (_ = f.query.range, p = p.keyTail, { type: _.type === 1 ? 2 : _.type, lower: Yt(_.lower, _.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Yt(_.upper, _.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
2340
2358
  }
2341
2359
  return l(l({}, n), { schema: l(l({}, a), { primaryKey: t, indexes: s, getIndexByKeyPath: function(f) {
2342
2360
  return (f = i[mt(f)]) && f[0];
@@ -2345,22 +2363,22 @@ function Ra() {
2345
2363
  }, query: function(f) {
2346
2364
  return n.query(v(f));
2347
2365
  }, openCursor: function(f) {
2348
- var S = f.query.index, p = S.keyTail, b = S.isVirtual, w = S.keyLength;
2349
- return b ? n.openCursor(v(f)).then(function(_) {
2350
- return _ && y(_);
2366
+ var _ = f.query.index, p = _.keyTail, b = _.isVirtual, w = _.keyLength;
2367
+ return b ? n.openCursor(v(f)).then(function(S) {
2368
+ return S && m(S);
2351
2369
  }) : n.openCursor(f);
2352
- function y(_) {
2353
- return Object.create(_, { continue: { value: function(E) {
2354
- E != null ? _.continue(Yt(E, f.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : f.unique ? _.continue(_.key.slice(0, w).concat(f.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : _.continue();
2370
+ function m(S) {
2371
+ return Object.create(S, { continue: { value: function(E) {
2372
+ E != null ? S.continue(Yt(E, f.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : f.unique ? S.continue(S.key.slice(0, w).concat(f.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : S.continue();
2355
2373
  } }, continuePrimaryKey: { value: function(E, O) {
2356
- _.continuePrimaryKey(Yt(E, e.MAX_KEY, p), O);
2374
+ S.continuePrimaryKey(Yt(E, e.MAX_KEY, p), O);
2357
2375
  } }, primaryKey: { get: function() {
2358
- return _.primaryKey;
2376
+ return S.primaryKey;
2359
2377
  } }, key: { get: function() {
2360
- var E = _.key;
2378
+ var E = S.key;
2361
2379
  return w === 1 ? E[0] : E.slice(0, w);
2362
2380
  } }, value: { get: function() {
2363
- return _.value;
2381
+ return S.value;
2364
2382
  } } });
2365
2383
  }
2366
2384
  } });
@@ -2381,31 +2399,31 @@ function Ra() {
2381
2399
  return l(l({}, e), { table: function(t) {
2382
2400
  var n = e.table(t), a = n.schema.primaryKey;
2383
2401
  return l(l({}, n), { mutate: function(i) {
2384
- var s = G.trans, u = s.table(t).hook, c = u.deleting, h = u.creating, g = u.updating;
2402
+ var s = $.trans, u = s.table(t).hook, c = u.deleting, h = u.creating, y = u.updating;
2385
2403
  switch (i.type) {
2386
2404
  case "add":
2387
- if (h.fire === J) break;
2405
+ if (h.fire === V) break;
2388
2406
  return s._promise("readwrite", function() {
2389
2407
  return v(i);
2390
2408
  }, !0);
2391
2409
  case "put":
2392
- if (h.fire === J && g.fire === J) break;
2410
+ if (h.fire === V && y.fire === V) break;
2393
2411
  return s._promise("readwrite", function() {
2394
2412
  return v(i);
2395
2413
  }, !0);
2396
2414
  case "delete":
2397
- if (c.fire === J) break;
2415
+ if (c.fire === V) break;
2398
2416
  return s._promise("readwrite", function() {
2399
2417
  return v(i);
2400
2418
  }, !0);
2401
2419
  case "deleteRange":
2402
- if (c.fire === J) break;
2420
+ if (c.fire === V) break;
2403
2421
  return s._promise("readwrite", function() {
2404
- return function f(S, p, b) {
2405
- return n.query({ trans: S, values: !1, query: { index: a, range: p }, limit: b }).then(function(w) {
2406
- var y = w.result;
2407
- return v({ type: "delete", keys: y, trans: S }).then(function(_) {
2408
- return 0 < _.numFailures ? Promise.reject(_.failures[0]) : y.length < b ? { failures: [], numFailures: 0, lastResult: void 0 } : f(S, l(l({}, p), { lower: y[y.length - 1], lowerOpen: !0 }), b);
2422
+ return function f(_, p, b) {
2423
+ return n.query({ trans: _, values: !1, query: { index: a, range: p }, limit: b }).then(function(w) {
2424
+ var m = w.result;
2425
+ return v({ type: "delete", keys: m, trans: _ }).then(function(S) {
2426
+ return 0 < S.numFailures ? Promise.reject(S.failures[0]) : m.length < b ? { failures: [], numFailures: 0, lastResult: void 0 } : f(_, l(l({}, p), { lower: m[m.length - 1], lowerOpen: !0 }), b);
2409
2427
  });
2410
2428
  });
2411
2429
  }(i.trans, i.range, 1e4);
@@ -2413,21 +2431,21 @@ function Ra() {
2413
2431
  }
2414
2432
  return n.mutate(i);
2415
2433
  function v(f) {
2416
- var S, p, b, w = G.trans, y = f.keys || Kn(a, f);
2417
- if (!y) throw new Error("Keys missing");
2418
- return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: y }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)), S = n, b = y, ((p = f).type === "add" ? Promise.resolve([]) : S.getMany({ trans: p.trans, keys: b, cache: "immutable" })).then(function(_) {
2419
- var E = y.map(function(O, A) {
2420
- var P, T, I, C = _[A], j = { onerror: null, onsuccess: null };
2421
- return f.type === "delete" ? c.fire.call(j, O, C, w) : f.type === "add" || C === void 0 ? (P = h.fire.call(j, O, f.values[A], w), O == null && P != null && (f.keys[A] = O = P, a.outbound || fe(f.values[A], a.keyPath, O))) : (P = Nn(C, f.values[A]), (T = g.fire.call(j, P, O, C, w)) && (I = f.values[A], Object.keys(T).forEach(function(R) {
2422
- ee(I, R) ? I[R] = T[R] : fe(I, R, T[R]);
2434
+ var _, p, b, w = $.trans, m = f.keys || Kn(a, f);
2435
+ if (!m) throw new Error("Keys missing");
2436
+ return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: m }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)), _ = n, b = m, ((p = f).type === "add" ? Promise.resolve([]) : _.getMany({ trans: p.trans, keys: b, cache: "immutable" })).then(function(S) {
2437
+ var E = m.map(function(O, A) {
2438
+ var I, M, C, R = S[A], j = { onerror: null, onsuccess: null };
2439
+ return f.type === "delete" ? c.fire.call(j, O, R, w) : f.type === "add" || R === void 0 ? (I = h.fire.call(j, O, f.values[A], w), O == null && I != null && (f.keys[A] = O = I, a.outbound || fe(f.values[A], a.keyPath, O))) : (I = Nn(R, f.values[A]), (M = y.fire.call(j, I, O, R, w)) && (C = f.values[A], Object.keys(M).forEach(function(T) {
2440
+ ee(C, T) ? C[T] = M[T] : fe(C, T, M[T]);
2423
2441
  }))), j;
2424
2442
  });
2425
2443
  return n.mutate(f).then(function(O) {
2426
- for (var A = O.failures, P = O.results, T = O.numFailures, O = O.lastResult, I = 0; I < y.length; ++I) {
2427
- var C = (P || y)[I], j = E[I];
2428
- C == null ? j.onerror && j.onerror(A[I]) : j.onsuccess && j.onsuccess(f.type === "put" && _[I] ? f.values[I] : C);
2444
+ for (var A = O.failures, I = O.results, M = O.numFailures, O = O.lastResult, C = 0; C < m.length; ++C) {
2445
+ var R = (I || m)[C], j = E[C];
2446
+ R == null ? j.onerror && j.onerror(A[C]) : j.onsuccess && j.onsuccess(f.type === "put" && S[C] ? f.values[C] : R);
2429
2447
  }
2430
- return { failures: A, results: P, numFailures: T, lastResult: O };
2448
+ return { failures: A, results: I, numFailures: M, lastResult: O };
2431
2449
  }).catch(function(O) {
2432
2450
  return E.forEach(function(A) {
2433
2451
  return A.onerror && A.onerror(O);
@@ -2478,81 +2496,81 @@ function Ra() {
2478
2496
  var wa = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
2479
2497
  var t = e.schema.name, n = new oe(e.MIN_KEY, e.MAX_KEY);
2480
2498
  return l(l({}, e), { transaction: function(a, i, s) {
2481
- if (G.subscr && i !== "readonly") throw new $.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(G.querier));
2499
+ if ($.subscr && i !== "readonly") throw new U.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat($.querier));
2482
2500
  return e.transaction(a, i, s);
2483
2501
  }, table: function(a) {
2484
- var i = e.table(a), s = i.schema, u = s.primaryKey, f = s.indexes, c = u.extractKey, h = u.outbound, g = u.autoIncrement && f.filter(function(p) {
2502
+ var i = e.table(a), s = i.schema, u = s.primaryKey, f = s.indexes, c = u.extractKey, h = u.outbound, y = u.autoIncrement && f.filter(function(p) {
2485
2503
  return p.compound && p.keyPath.includes(u.keyPath);
2486
2504
  }), v = l(l({}, i), { mutate: function(p) {
2487
- function b(R) {
2488
- return R = "idb://".concat(t, "/").concat(a, "/").concat(R), O[R] || (O[R] = new oe());
2505
+ function b(T) {
2506
+ return T = "idb://".concat(t, "/").concat(a, "/").concat(T), O[T] || (O[T] = new oe());
2489
2507
  }
2490
- var w, y, _, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), A = b(""), P = b(":dels"), T = p.type, j = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Kn(u, p).filter(function(R) {
2491
- return R;
2492
- }), p.values] : [], I = j[0], C = j[1], j = p.trans._cache;
2493
- return U(I) ? (A.addKeys(I), (j = T === "delete" || I.length === C.length ? Or(I, j) : null) || P.addKeys(I), (j || C) && (w = b, y = j, _ = C, s.indexes.forEach(function(R) {
2494
- var L = w(R.name || "");
2508
+ var w, m, S, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), A = b(""), I = b(":dels"), M = p.type, j = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Kn(u, p).filter(function(T) {
2509
+ return T;
2510
+ }), p.values] : [], C = j[0], R = j[1], j = p.trans._cache;
2511
+ return L(C) ? (A.addKeys(C), (j = M === "delete" || C.length === R.length ? Or(C, j) : null) || I.addKeys(C), (j || R) && (w = b, m = j, S = R, s.indexes.forEach(function(T) {
2512
+ var G = w(T.name || "");
2495
2513
  function W(H) {
2496
- return H != null ? R.extractKey(H) : null;
2514
+ return H != null ? T.extractKey(H) : null;
2497
2515
  }
2498
2516
  function z(H) {
2499
- return R.multiEntry && U(H) ? H.forEach(function(pe) {
2500
- return L.addKey(pe);
2501
- }) : L.addKey(H);
2517
+ return T.multiEntry && L(H) ? H.forEach(function(pe) {
2518
+ return G.addKey(pe);
2519
+ }) : G.addKey(H);
2502
2520
  }
2503
- (y || _).forEach(function(H, ue) {
2504
- var F = y && W(y[ue]), ue = _ && W(_[ue]);
2521
+ (m || S).forEach(function(H, ue) {
2522
+ var F = m && W(m[ue]), ue = S && W(S[ue]);
2505
2523
  Y(F, ue) !== 0 && (F != null && z(F), ue != null && z(ue));
2506
2524
  });
2507
- }))) : I ? (C = { from: (C = I.lower) !== null && C !== void 0 ? C : e.MIN_KEY, to: (C = I.upper) !== null && C !== void 0 ? C : e.MAX_KEY }, P.add(C), A.add(C)) : (A.add(n), P.add(n), s.indexes.forEach(function(R) {
2508
- return b(R.name).add(n);
2509
- })), i.mutate(p).then(function(R) {
2510
- return !I || p.type !== "add" && p.type !== "put" || (A.addKeys(R.results), g && g.forEach(function(L) {
2525
+ }))) : C ? (R = { from: (R = C.lower) !== null && R !== void 0 ? R : e.MIN_KEY, to: (R = C.upper) !== null && R !== void 0 ? R : e.MAX_KEY }, I.add(R), A.add(R)) : (A.add(n), I.add(n), s.indexes.forEach(function(T) {
2526
+ return b(T.name).add(n);
2527
+ })), i.mutate(p).then(function(T) {
2528
+ return !C || p.type !== "add" && p.type !== "put" || (A.addKeys(T.results), y && y.forEach(function(G) {
2511
2529
  for (var W = p.values.map(function(F) {
2512
- return L.extractKey(F);
2513
- }), z = L.keyPath.findIndex(function(F) {
2530
+ return G.extractKey(F);
2531
+ }), z = G.keyPath.findIndex(function(F) {
2514
2532
  return F === u.keyPath;
2515
- }), H = 0, pe = R.results.length; H < pe; ++H) W[H][z] = R.results[H];
2516
- b(L.name).addKeys(W);
2517
- })), E.mutatedParts = zt(E.mutatedParts || {}, O), R;
2533
+ }), H = 0, pe = T.results.length; H < pe; ++H) W[H][z] = T.results[H];
2534
+ b(G.name).addKeys(W);
2535
+ })), E.mutatedParts = zt(E.mutatedParts || {}, O), T;
2518
2536
  });
2519
2537
  } }), f = function(b) {
2520
2538
  var w = b.query, b = w.index, w = w.range;
2521
2539
  return [b, new oe((b = w.lower) !== null && b !== void 0 ? b : e.MIN_KEY, (w = w.upper) !== null && w !== void 0 ? w : e.MAX_KEY)];
2522
- }, S = { get: function(p) {
2540
+ }, _ = { get: function(p) {
2523
2541
  return [u, new oe(p.key)];
2524
2542
  }, getMany: function(p) {
2525
2543
  return [u, new oe().addKeys(p.keys)];
2526
2544
  }, count: f, query: f, openCursor: f };
2527
- return K(S).forEach(function(p) {
2545
+ return K(_).forEach(function(p) {
2528
2546
  v[p] = function(b) {
2529
- var w = G.subscr, y = !!w, _ = xr(G, i) && Ar(p, b) ? b.obsSet = {} : w;
2530
- if (y) {
2531
- var E = function(C) {
2532
- return C = "idb://".concat(t, "/").concat(a, "/").concat(C), _[C] || (_[C] = new oe());
2533
- }, O = E(""), A = E(":dels"), w = S[p](b), y = w[0], w = w[1];
2534
- if ((p === "query" && y.isPrimaryKey && !b.values ? A : E(y.name || "")).add(w), !y.isPrimaryKey) {
2547
+ var w = $.subscr, m = !!w, S = xr($, i) && Ar(p, b) ? b.obsSet = {} : w;
2548
+ if (m) {
2549
+ var E = function(R) {
2550
+ return R = "idb://".concat(t, "/").concat(a, "/").concat(R), S[R] || (S[R] = new oe());
2551
+ }, O = E(""), A = E(":dels"), w = _[p](b), m = w[0], w = w[1];
2552
+ if ((p === "query" && m.isPrimaryKey && !b.values ? A : E(m.name || "")).add(w), !m.isPrimaryKey) {
2535
2553
  if (p !== "count") {
2536
- var P = p === "query" && h && b.values && i.query(l(l({}, b), { values: !1 }));
2537
- return i[p].apply(this, arguments).then(function(C) {
2554
+ var I = p === "query" && h && b.values && i.query(l(l({}, b), { values: !1 }));
2555
+ return i[p].apply(this, arguments).then(function(R) {
2538
2556
  if (p === "query") {
2539
- if (h && b.values) return P.then(function(W) {
2540
- return W = W.result, O.addKeys(W), C;
2557
+ if (h && b.values) return I.then(function(W) {
2558
+ return W = W.result, O.addKeys(W), R;
2541
2559
  });
2542
- var j = b.values ? C.result.map(c) : C.result;
2560
+ var j = b.values ? R.result.map(c) : R.result;
2543
2561
  (b.values ? O : A).addKeys(j);
2544
2562
  } else if (p === "openCursor") {
2545
- var R = C, L = b.values;
2546
- return R && Object.create(R, { key: { get: function() {
2547
- return A.addKey(R.primaryKey), R.key;
2563
+ var T = R, G = b.values;
2564
+ return T && Object.create(T, { key: { get: function() {
2565
+ return A.addKey(T.primaryKey), T.key;
2548
2566
  } }, primaryKey: { get: function() {
2549
- var W = R.primaryKey;
2567
+ var W = T.primaryKey;
2550
2568
  return A.addKey(W), W;
2551
2569
  } }, value: { get: function() {
2552
- return L && O.addKey(R.primaryKey), R.value;
2570
+ return G && O.addKey(T.primaryKey), T.value;
2553
2571
  } } });
2554
2572
  }
2555
- return C;
2573
+ return R;
2556
2574
  });
2557
2575
  }
2558
2576
  A.add(n);
@@ -2567,9 +2585,9 @@ function Ra() {
2567
2585
  if (n.numFailures === 0) return t;
2568
2586
  if (t.type === "deleteRange") return null;
2569
2587
  var a = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
2570
- return n.numFailures === a ? null : (t = l({}, t), U(t.keys) && (t.keys = t.keys.filter(function(i, s) {
2588
+ return n.numFailures === a ? null : (t = l({}, t), L(t.keys) && (t.keys = t.keys.filter(function(i, s) {
2571
2589
  return !(s in n.failures);
2572
- })), "values" in t && U(t.values) && (t.values = t.values.filter(function(i, s) {
2590
+ })), "values" in t && L(t.values) && (t.values = t.values.filter(function(i, s) {
2573
2591
  return !(s in n.failures);
2574
2592
  })), t);
2575
2593
  }
@@ -2577,60 +2595,60 @@ function Ra() {
2577
2595
  return n = e, ((a = t).lower === void 0 || (a.lowerOpen ? 0 < Y(n, a.lower) : 0 <= Y(n, a.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? Y(e, t.upper) < 0 : Y(e, t.upper) <= 0));
2578
2596
  var n, a;
2579
2597
  }
2580
- function Dr(e, t, S, a, i, s) {
2581
- if (!S || S.length === 0) return e;
2582
- var u = t.query.index, c = u.multiEntry, h = t.query.range, g = a.schema.primaryKey.extractKey, v = u.extractKey, f = (u.lowLevelIndex || u).extractKey, S = S.reduce(function(p, b) {
2583
- var w = p, y = [];
2584
- if (b.type === "add" || b.type === "put") for (var _ = new oe(), E = b.values.length - 1; 0 <= E; --E) {
2585
- var O, A = b.values[E], P = g(A);
2586
- _.hasKey(P) || (O = v(A), (c && U(O) ? O.some(function(R) {
2587
- return Bn(R, h);
2588
- }) : Bn(O, h)) && (_.addKey(P), y.push(A)));
2598
+ function Dr(e, t, _, a, i, s) {
2599
+ if (!_ || _.length === 0) return e;
2600
+ var u = t.query.index, c = u.multiEntry, h = t.query.range, y = a.schema.primaryKey.extractKey, v = u.extractKey, f = (u.lowLevelIndex || u).extractKey, _ = _.reduce(function(p, b) {
2601
+ var w = p, m = [];
2602
+ if (b.type === "add" || b.type === "put") for (var S = new oe(), E = b.values.length - 1; 0 <= E; --E) {
2603
+ var O, A = b.values[E], I = y(A);
2604
+ S.hasKey(I) || (O = v(A), (c && L(O) ? O.some(function(T) {
2605
+ return Bn(T, h);
2606
+ }) : Bn(O, h)) && (S.addKey(I), m.push(A)));
2589
2607
  }
2590
2608
  switch (b.type) {
2591
2609
  case "add":
2592
- var T = new oe().addKeys(t.values ? p.map(function(L) {
2593
- return g(L);
2594
- }) : p), w = p.concat(t.values ? y.filter(function(L) {
2595
- return L = g(L), !T.hasKey(L) && (T.addKey(L), !0);
2596
- }) : y.map(function(L) {
2597
- return g(L);
2598
- }).filter(function(L) {
2599
- return !T.hasKey(L) && (T.addKey(L), !0);
2610
+ var M = new oe().addKeys(t.values ? p.map(function(G) {
2611
+ return y(G);
2612
+ }) : p), w = p.concat(t.values ? m.filter(function(G) {
2613
+ return G = y(G), !M.hasKey(G) && (M.addKey(G), !0);
2614
+ }) : m.map(function(G) {
2615
+ return y(G);
2616
+ }).filter(function(G) {
2617
+ return !M.hasKey(G) && (M.addKey(G), !0);
2600
2618
  }));
2601
2619
  break;
2602
2620
  case "put":
2603
- var I = new oe().addKeys(b.values.map(function(L) {
2604
- return g(L);
2621
+ var C = new oe().addKeys(b.values.map(function(G) {
2622
+ return y(G);
2605
2623
  }));
2606
- w = p.filter(function(L) {
2607
- return !I.hasKey(t.values ? g(L) : L);
2608
- }).concat(t.values ? y : y.map(function(L) {
2609
- return g(L);
2624
+ w = p.filter(function(G) {
2625
+ return !C.hasKey(t.values ? y(G) : G);
2626
+ }).concat(t.values ? m : m.map(function(G) {
2627
+ return y(G);
2610
2628
  }));
2611
2629
  break;
2612
2630
  case "delete":
2613
- var C = new oe().addKeys(b.keys);
2614
- w = p.filter(function(L) {
2615
- return !C.hasKey(t.values ? g(L) : L);
2631
+ var R = new oe().addKeys(b.keys);
2632
+ w = p.filter(function(G) {
2633
+ return !R.hasKey(t.values ? y(G) : G);
2616
2634
  });
2617
2635
  break;
2618
2636
  case "deleteRange":
2619
2637
  var j = b.range;
2620
- w = p.filter(function(L) {
2621
- return !Bn(g(L), j);
2638
+ w = p.filter(function(G) {
2639
+ return !Bn(y(G), j);
2622
2640
  });
2623
2641
  }
2624
2642
  return w;
2625
2643
  }, e);
2626
- return S === e ? e : (S.sort(function(p, b) {
2627
- return Y(f(p), f(b)) || Y(g(p), g(b));
2628
- }), t.limit && t.limit < 1 / 0 && (S.length > t.limit ? S.length = t.limit : e.length === t.limit && S.length < t.limit && (i.dirty = !0)), s ? Object.freeze(S) : S);
2644
+ return _ === e ? e : (_.sort(function(p, b) {
2645
+ return Y(f(p), f(b)) || Y(y(p), y(b));
2646
+ }), t.limit && t.limit < 1 / 0 && (_.length > t.limit ? _.length = t.limit : e.length === t.limit && _.length < t.limit && (i.dirty = !0)), s ? Object.freeze(_) : _);
2629
2647
  }
2630
2648
  function Pr(e, t) {
2631
2649
  return Y(e.lower, t.lower) === 0 && Y(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
2632
2650
  }
2633
- function Sa(e, t) {
2651
+ function _a(e, t) {
2634
2652
  return function(n, a, i, s) {
2635
2653
  if (n === void 0) return a !== void 0 ? -1 : 0;
2636
2654
  if (a === void 0) return 1;
@@ -2651,7 +2669,7 @@ function Ra() {
2651
2669
  return a;
2652
2670
  }(e.upper, t.upper, e.upperOpen, t.upperOpen);
2653
2671
  }
2654
- function _a(e, t, n, a) {
2672
+ function Sa(e, t, n, a) {
2655
2673
  e.subscribers.add(n), a.addEventListener("abort", function() {
2656
2674
  var i, s;
2657
2675
  e.subscribers.delete(n), e.subscribers.size === 0 && (i = e, s = t, setTimeout(function() {
@@ -2666,29 +2684,29 @@ function Ra() {
2666
2684
  return a === "readwrite" && (u = (s = new AbortController()).signal, i = function(h) {
2667
2685
  return function() {
2668
2686
  if (s.abort(), a === "readwrite") {
2669
- for (var g = /* @__PURE__ */ new Set(), v = 0, f = n; v < f.length; v++) {
2670
- var S = f[v], p = Fe["idb://".concat(t, "/").concat(S)];
2687
+ for (var y = /* @__PURE__ */ new Set(), v = 0, f = n; v < f.length; v++) {
2688
+ var _ = f[v], p = Fe["idb://".concat(t, "/").concat(_)];
2671
2689
  if (p) {
2672
- var b = e.table(S), w = p.optimisticOps.filter(function(L) {
2673
- return L.trans === c;
2690
+ var b = e.table(_), w = p.optimisticOps.filter(function(G) {
2691
+ return G.trans === c;
2674
2692
  });
2675
- if (c._explicit && h && c.mutatedParts) for (var y = 0, _ = Object.values(p.queries.query); y < _.length; y++) for (var E = 0, O = (T = _[y]).slice(); E < O.length; E++) Cn((I = O[E]).obsSet, c.mutatedParts) && (Me(T, I), I.subscribers.forEach(function(L) {
2676
- return g.add(L);
2693
+ if (c._explicit && h && c.mutatedParts) for (var m = 0, S = Object.values(p.queries.query); m < S.length; m++) for (var E = 0, O = (M = S[m]).slice(); E < O.length; E++) Cn((C = O[E]).obsSet, c.mutatedParts) && (Me(M, C), C.subscribers.forEach(function(G) {
2694
+ return y.add(G);
2677
2695
  }));
2678
2696
  else if (0 < w.length) {
2679
- p.optimisticOps = p.optimisticOps.filter(function(L) {
2680
- return L.trans !== c;
2697
+ p.optimisticOps = p.optimisticOps.filter(function(G) {
2698
+ return G.trans !== c;
2681
2699
  });
2682
- for (var A = 0, P = Object.values(p.queries.query); A < P.length; A++) for (var T, I, C, j = 0, R = (T = P[A]).slice(); j < R.length; j++) (I = R[j]).res != null && c.mutatedParts && (h && !I.dirty ? (C = Object.isFrozen(I.res), C = Dr(I.res, I.req, w, b, I, C), I.dirty ? (Me(T, I), I.subscribers.forEach(function(L) {
2683
- return g.add(L);
2684
- })) : C !== I.res && (I.res = C, I.promise = B.resolve({ result: C }))) : (I.dirty && Me(T, I), I.subscribers.forEach(function(L) {
2685
- return g.add(L);
2700
+ for (var A = 0, I = Object.values(p.queries.query); A < I.length; A++) for (var M, C, R, j = 0, T = (M = I[A]).slice(); j < T.length; j++) (C = T[j]).res != null && c.mutatedParts && (h && !C.dirty ? (R = Object.isFrozen(C.res), R = Dr(C.res, C.req, w, b, C, R), C.dirty ? (Me(M, C), C.subscribers.forEach(function(G) {
2701
+ return y.add(G);
2702
+ })) : R !== C.res && (C.res = R, C.promise = B.resolve({ result: R }))) : (C.dirty && Me(M, C), C.subscribers.forEach(function(G) {
2703
+ return y.add(G);
2686
2704
  })));
2687
2705
  }
2688
2706
  }
2689
2707
  }
2690
- g.forEach(function(L) {
2691
- return L();
2708
+ y.forEach(function(G) {
2709
+ return G();
2692
2710
  });
2693
2711
  }
2694
2712
  };
@@ -2696,7 +2714,7 @@ function Ra() {
2696
2714
  }, table: function(n) {
2697
2715
  var a = e.table(n), i = a.schema.primaryKey;
2698
2716
  return l(l({}, a), { mutate: function(s) {
2699
- var u = G.trans;
2717
+ var u = $.trans;
2700
2718
  if (i.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(s);
2701
2719
  var c = Fe["idb://".concat(t, "/").concat(n)];
2702
2720
  return c ? (u = a.mutate(s), s.type !== "add" && s.type !== "put" || !(50 <= s.values.length || Kn(i, s).some(function(h) {
@@ -2706,47 +2724,47 @@ function Ra() {
2706
2724
  }), u.catch(function() {
2707
2725
  Me(c.optimisticOps, s), s.mutatedParts && Ht(s.mutatedParts);
2708
2726
  })) : u.then(function(h) {
2709
- var g = kr(0, l(l({}, s), { values: s.values.map(function(v, f) {
2710
- var S;
2711
- return h.failures[f] ? v : (v = (S = i.keyPath) !== null && S !== void 0 && S.includes(".") ? Te(v) : l({}, v), fe(v, i.keyPath, h.results[f]), v);
2727
+ var y = kr(0, l(l({}, s), { values: s.values.map(function(v, f) {
2728
+ var _;
2729
+ return h.failures[f] ? v : (v = (_ = i.keyPath) !== null && _ !== void 0 && _.includes(".") ? Te(v) : l({}, v), fe(v, i.keyPath, h.results[f]), v);
2712
2730
  }) }), h);
2713
- c.optimisticOps.push(g), queueMicrotask(function() {
2731
+ c.optimisticOps.push(y), queueMicrotask(function() {
2714
2732
  return s.mutatedParts && Ht(s.mutatedParts);
2715
2733
  });
2716
2734
  }), u) : a.mutate(s);
2717
2735
  }, query: function(s) {
2718
- if (!xr(G, a) || !Ar("query", s)) return a.query(s);
2719
- var u = ((g = G.trans) === null || g === void 0 ? void 0 : g.db._options.cache) === "immutable", f = G, c = f.requery, h = f.signal, g = function(b, w, y, _) {
2736
+ if (!xr($, a) || !Ar("query", s)) return a.query(s);
2737
+ var u = ((y = $.trans) === null || y === void 0 ? void 0 : y.db._options.cache) === "immutable", f = $, c = f.requery, h = f.signal, y = function(b, w, m, S) {
2720
2738
  var E = Fe["idb://".concat(b, "/").concat(w)];
2721
2739
  if (!E) return [];
2722
- if (!(w = E.queries[y])) return [null, !1, E, null];
2723
- var O = w[(_.query ? _.query.index.name : null) || ""];
2740
+ if (!(w = E.queries[m])) return [null, !1, E, null];
2741
+ var O = w[(S.query ? S.query.index.name : null) || ""];
2724
2742
  if (!O) return [null, !1, E, null];
2725
- switch (y) {
2743
+ switch (m) {
2726
2744
  case "query":
2727
- var A = O.find(function(P) {
2728
- return P.req.limit === _.limit && P.req.values === _.values && Pr(P.req.query.range, _.query.range);
2745
+ var A = O.find(function(I) {
2746
+ return I.req.limit === S.limit && I.req.values === S.values && Pr(I.req.query.range, S.query.range);
2729
2747
  });
2730
- return A ? [A, !0, E, O] : [O.find(function(P) {
2731
- return ("limit" in P.req ? P.req.limit : 1 / 0) >= _.limit && (!_.values || P.req.values) && Sa(P.req.query.range, _.query.range);
2748
+ return A ? [A, !0, E, O] : [O.find(function(I) {
2749
+ return ("limit" in I.req ? I.req.limit : 1 / 0) >= S.limit && (!S.values || I.req.values) && _a(I.req.query.range, S.query.range);
2732
2750
  }), !1, E, O];
2733
2751
  case "count":
2734
- return A = O.find(function(P) {
2735
- return Pr(P.req.query.range, _.query.range);
2752
+ return A = O.find(function(I) {
2753
+ return Pr(I.req.query.range, S.query.range);
2736
2754
  }), [A, !!A, E, O];
2737
2755
  }
2738
- }(t, n, "query", s), v = g[0], f = g[1], S = g[2], p = g[3];
2756
+ }(t, n, "query", s), v = y[0], f = y[1], _ = y[2], p = y[3];
2739
2757
  return v && f ? v.obsSet = s.obsSet : (f = a.query(s).then(function(b) {
2740
2758
  var w = b.result;
2741
2759
  if (v && (v.res = w), u) {
2742
- for (var y = 0, _ = w.length; y < _; ++y) Object.freeze(w[y]);
2760
+ for (var m = 0, S = w.length; m < S; ++m) Object.freeze(w[m]);
2743
2761
  Object.freeze(w);
2744
2762
  } else b.result = Te(w);
2745
2763
  return b;
2746
2764
  }).catch(function(b) {
2747
2765
  return p && v && Me(p, v), Promise.reject(b);
2748
- }), v = { obsSet: s.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: s, dirty: !1 }, p ? p.push(v) : (p = [v], (S = S || (Fe["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[s.query.index.name || ""] = p)), _a(v, p, c, h), v.promise.then(function(b) {
2749
- return { result: Dr(b.result, s, S == null ? void 0 : S.optimisticOps, a, v, u) };
2766
+ }), v = { obsSet: s.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: s, dirty: !1 }, p ? p.push(v) : (p = [v], (_ = _ || (Fe["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[s.query.index.name || ""] = p)), Sa(v, p, c, h), v.promise.then(function(b) {
2767
+ return { result: Dr(b.result, s, _ == null ? void 0 : _.optimisticOps, a, v, u) };
2750
2768
  });
2751
2769
  } });
2752
2770
  } });
@@ -2757,8 +2775,8 @@ function Ra() {
2757
2775
  } });
2758
2776
  }
2759
2777
  var Ee = (ne.prototype.version = function(e) {
2760
- if (isNaN(e) || e < 0.1) throw new $.Type("Given version is not a positive number");
2761
- if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new $.Schema("Cannot add version when database is open");
2778
+ if (isNaN(e) || e < 0.1) throw new U.Type("Given version is not a positive number");
2779
+ if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new U.Schema("Cannot add version when database is open");
2762
2780
  this.verno = Math.max(this.verno, e);
2763
2781
  var t = this._versions, n = t.filter(function(a) {
2764
2782
  return a._cfg.version === e;
@@ -2766,11 +2784,11 @@ function Ra() {
2766
2784
  return n || (n = new this.Version(e), t.push(n), t.sort(fa), n.stores({}), this._state.autoSchema = !1, n);
2767
2785
  }, ne.prototype._whenReady = function(e) {
2768
2786
  var t = this;
2769
- return this.idbdb && (this._state.openComplete || G.letThrough || this._vip) ? e() : new B(function(n, a) {
2770
- if (t._state.openComplete) return a(new $.DatabaseClosed(t._state.dbOpenError));
2787
+ return this.idbdb && (this._state.openComplete || $.letThrough || this._vip) ? e() : new B(function(n, a) {
2788
+ if (t._state.openComplete) return a(new U.DatabaseClosed(t._state.dbOpenError));
2771
2789
  if (!t._state.isBeingOpened) {
2772
- if (!t._state.autoOpen) return void a(new $.DatabaseClosed());
2773
- t.open().catch(J);
2790
+ if (!t._state.autoOpen) return void a(new U.DatabaseClosed());
2791
+ t.open().catch(V);
2774
2792
  }
2775
2793
  t._state.dbReadyPromise.then(n, a);
2776
2794
  }).then(e);
@@ -2805,7 +2823,7 @@ function Ra() {
2805
2823
  }));
2806
2824
  }, ne.prototype.close = function(n) {
2807
2825
  var t = (n === void 0 ? { disableAutoOpen: !0 } : n).disableAutoOpen, n = this._state;
2808
- t ? (n.isBeingOpened && n.cancelOpen(new $.DatabaseClosed()), this._close(), n.autoOpen = !1, n.dbOpenError = new $.DatabaseClosed()) : (this._close(), n.autoOpen = this._options.autoOpen || n.isBeingOpened, n.openComplete = !1, n.dbOpenError = null);
2826
+ t ? (n.isBeingOpened && n.cancelOpen(new U.DatabaseClosed()), this._close(), n.autoOpen = !1, n.dbOpenError = new U.DatabaseClosed()) : (this._close(), n.autoOpen = this._options.autoOpen || n.isBeingOpened, n.openComplete = !1, n.dbOpenError = null);
2809
2827
  }, ne.prototype.delete = function(e) {
2810
2828
  var t = this;
2811
2829
  e === void 0 && (e = { disableAutoOpen: !0 });
@@ -2815,11 +2833,11 @@ function Ra() {
2815
2833
  t.close(e);
2816
2834
  var c = t._deps.indexedDB.deleteDatabase(t.name);
2817
2835
  c.onsuccess = q(function() {
2818
- var h, g, v;
2819
- h = t._deps, g = t.name, v = h.indexedDB, h = h.IDBKeyRange, Dn(v) || g === Tt || kn(v, h).delete(g).catch(J), i();
2836
+ var h, y, v;
2837
+ h = t._deps, y = t.name, v = h.indexedDB, h = h.IDBKeyRange, Dn(v) || y === Tt || kn(v, h).delete(y).catch(V), i();
2820
2838
  }), c.onerror = be(s), c.onblocked = t._fireOnBlocked;
2821
2839
  }
2822
- if (n) throw new $.InvalidArgument("Invalid closeOptions argument to db.delete()");
2840
+ if (n) throw new U.InvalidArgument("Invalid closeOptions argument to db.delete()");
2823
2841
  a.isBeingOpened ? a.dbReadyPromise.then(u) : u();
2824
2842
  });
2825
2843
  }, ne.prototype.backendDB = function() {
@@ -2841,75 +2859,75 @@ function Ra() {
2841
2859
  }, enumerable: !1, configurable: !0 }), ne.prototype.transaction = function() {
2842
2860
  var e = (function(t, n, a) {
2843
2861
  var i = arguments.length;
2844
- if (i < 2) throw new $.InvalidArgument("Too few arguments");
2862
+ if (i < 2) throw new U.InvalidArgument("Too few arguments");
2845
2863
  for (var s = new Array(i - 1); --i; ) s[i - 1] = arguments[i];
2846
2864
  return a = s.pop(), [t, Xn(s), a];
2847
2865
  }).apply(this, arguments);
2848
2866
  return this._transaction.apply(this, e);
2849
2867
  }, ne.prototype._transaction = function(e, t, n) {
2850
- var a = this, i = G.trans;
2868
+ var a = this, i = $.trans;
2851
2869
  i && i.db === this && e.indexOf("!") === -1 || (i = null);
2852
2870
  var s, u, c = e.indexOf("?") !== -1;
2853
2871
  e = e.replace("!", "").replace("?", "");
2854
2872
  try {
2855
- if (u = t.map(function(g) {
2856
- if (g = g instanceof a.Table ? g.name : g, typeof g != "string") throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
2857
- return g;
2873
+ if (u = t.map(function(y) {
2874
+ if (y = y instanceof a.Table ? y.name : y, typeof y != "string") throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
2875
+ return y;
2858
2876
  }), e == "r" || e === gn) s = gn;
2859
2877
  else {
2860
- if (e != "rw" && e != yn) throw new $.InvalidArgument("Invalid transaction mode: " + e);
2878
+ if (e != "rw" && e != yn) throw new U.InvalidArgument("Invalid transaction mode: " + e);
2861
2879
  s = yn;
2862
2880
  }
2863
2881
  if (i) {
2864
2882
  if (i.mode === gn && s === yn) {
2865
- if (!c) throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
2883
+ if (!c) throw new U.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
2866
2884
  i = null;
2867
2885
  }
2868
- i && u.forEach(function(g) {
2869
- if (i && i.storeNames.indexOf(g) === -1) {
2870
- if (!c) throw new $.SubTransaction("Table " + g + " not included in parent transaction.");
2886
+ i && u.forEach(function(y) {
2887
+ if (i && i.storeNames.indexOf(y) === -1) {
2888
+ if (!c) throw new U.SubTransaction("Table " + y + " not included in parent transaction.");
2871
2889
  i = null;
2872
2890
  }
2873
2891
  }), c && i && !i.active && (i = null);
2874
2892
  }
2875
- } catch (g) {
2893
+ } catch (y) {
2876
2894
  return i ? i._promise(null, function(v, f) {
2877
- f(g);
2878
- }) : te(g);
2895
+ f(y);
2896
+ }) : te(y);
2879
2897
  }
2880
- var h = (function g(v, f, S, p, b) {
2898
+ var h = (function y(v, f, _, p, b) {
2881
2899
  return B.resolve().then(function() {
2882
- var w = G.transless || G, y = v._createTransaction(f, S, v._dbSchema, p);
2883
- if (y.explicit = !0, w = { trans: y, transless: w }, p) y.idbtrans = p.idbtrans;
2900
+ var w = $.transless || $, m = v._createTransaction(f, _, v._dbSchema, p);
2901
+ if (m.explicit = !0, w = { trans: m, transless: w }, p) m.idbtrans = p.idbtrans;
2884
2902
  else try {
2885
- y.create(), y.idbtrans._explicit = !0, v._state.PR1398_maxLoop = 3;
2903
+ m.create(), m.idbtrans._explicit = !0, v._state.PR1398_maxLoop = 3;
2886
2904
  } catch (O) {
2887
2905
  return O.name === an.InvalidState && v.isOpen() && 0 < --v._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), v.close({ disableAutoOpen: !1 }), v.open().then(function() {
2888
- return g(v, f, S, null, b);
2906
+ return y(v, f, _, null, b);
2889
2907
  })) : te(O);
2890
2908
  }
2891
- var _, E = rn(b);
2909
+ var S, E = rn(b);
2892
2910
  return E && qe(), w = B.follow(function() {
2893
2911
  var O;
2894
- (_ = b.call(y, y)) && (E ? (O = De.bind(null, null), _.then(O, O)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = jn(_)));
2895
- }, w), (_ && typeof _.then == "function" ? B.resolve(_).then(function(O) {
2896
- return y.active ? O : te(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2912
+ (S = b.call(m, m)) && (E ? (O = De.bind(null, null), S.then(O, O)) : typeof S.next == "function" && typeof S.throw == "function" && (S = jn(S)));
2913
+ }, w), (S && typeof S.then == "function" ? B.resolve(S).then(function(O) {
2914
+ return m.active ? O : te(new U.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2897
2915
  }) : w.then(function() {
2898
- return _;
2916
+ return S;
2899
2917
  })).then(function(O) {
2900
- return p && y._resolve(), y._completion.then(function() {
2918
+ return p && m._resolve(), m._completion.then(function() {
2901
2919
  return O;
2902
2920
  });
2903
2921
  }).catch(function(O) {
2904
- return y._reject(O), te(O);
2922
+ return m._reject(O), te(O);
2905
2923
  });
2906
2924
  });
2907
2925
  }).bind(null, this, s, u, i, n);
2908
- return i ? i._promise(s, h, "lock") : G.trans ? Ge(G.transless, function() {
2926
+ return i ? i._promise(s, h, "lock") : $.trans ? Ge($.transless, function() {
2909
2927
  return a._whenReady(h);
2910
2928
  }) : this._whenReady(h);
2911
2929
  }, ne.prototype.table = function(e) {
2912
- if (!ee(this._allTables, e)) throw new $.InvalidTable("Table ".concat(e, " does not exist"));
2930
+ if (!ee(this._allTables, e)) throw new U.InvalidTable("Table ".concat(e, " does not exist"));
2913
2931
  return this._allTables[e];
2914
2932
  }, ne);
2915
2933
  function ne(e, t) {
@@ -2917,74 +2935,74 @@ function Ra() {
2917
2935
  this._middlewares = {}, this.verno = 0;
2918
2936
  var a = ne.dependencies;
2919
2937
  this._options = t = l({ addons: ne.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;
2920
- var i, s, u, c, h, g = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: J, dbReadyPromise: null, cancelOpen: J, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2921
- g.dbReadyPromise = new B(function(f) {
2922
- g.dbReadyResolve = f;
2923
- }), g.openCanceller = new B(function(f, S) {
2924
- g.cancelOpen = S;
2925
- }), this._state = g, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [sn, J] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(f) {
2926
- return function(S, p) {
2938
+ var i, s, u, c, h, y = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: V, dbReadyPromise: null, cancelOpen: V, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2939
+ y.dbReadyPromise = new B(function(f) {
2940
+ y.dbReadyResolve = f;
2941
+ }), y.openCanceller = new B(function(f, _) {
2942
+ y.cancelOpen = _;
2943
+ }), this._state = y, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [sn, V] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(f) {
2944
+ return function(_, p) {
2927
2945
  ne.vip(function() {
2928
2946
  var b, w = n._state;
2929
- w.openComplete ? (w.dbOpenError || B.resolve().then(S), p && f(S)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(S), p && f(S)) : (f(S), b = n, p || f(function y() {
2930
- b.on.ready.unsubscribe(S), b.on.ready.unsubscribe(y);
2947
+ w.openComplete ? (w.dbOpenError || B.resolve().then(_), p && f(_)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(_), p && f(_)) : (f(_), b = n, p || f(function m() {
2948
+ b.on.ready.unsubscribe(_), b.on.ready.unsubscribe(m);
2931
2949
  }));
2932
2950
  });
2933
2951
  };
2934
- }), this.Collection = (i = this, ft(ia.prototype, function(_, y) {
2952
+ }), this.Collection = (i = this, ft(ia.prototype, function(S, m) {
2935
2953
  this.db = i;
2936
2954
  var p = sr, b = null;
2937
- if (y) try {
2938
- p = y();
2955
+ if (m) try {
2956
+ p = m();
2939
2957
  } catch (E) {
2940
2958
  b = E;
2941
2959
  }
2942
- var w = _._ctx, y = w.table, _ = y.hook.reading.fire;
2943
- this._ctx = { table: y, index: w.index, isPrimKey: !w.index || y.schema.primKey.keyPath && w.index === y.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: b, or: w.or, valueMapper: _ !== st ? _ : null };
2944
- })), this.Table = (s = this, ft(lr.prototype, function(f, S, p) {
2945
- this.db = s, this._tx = p, this.name = f, this.schema = S, this.hook = s._allTables[f] ? s._allTables[f].hook : dt(null, { creating: [Jr, J], reading: [Xr, st], updating: [Zr, J], deleting: [Vr, J] });
2946
- })), this.Transaction = (u = this, ft(ua.prototype, function(f, S, p, b, w) {
2947
- var y = this;
2948
- this.db = u, this.mode = f, this.storeNames = S, this.schema = p, this.chromeTransactionDurability = b, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new B(function(_, E) {
2949
- y._resolve = _, y._reject = E;
2960
+ var w = S._ctx, m = w.table, S = m.hook.reading.fire;
2961
+ this._ctx = { table: m, index: w.index, isPrimKey: !w.index || m.schema.primKey.keyPath && w.index === m.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: b, or: w.or, valueMapper: S !== st ? S : null };
2962
+ })), this.Table = (s = this, ft(lr.prototype, function(f, _, p) {
2963
+ this.db = s, this._tx = p, this.name = f, this.schema = _, this.hook = s._allTables[f] ? s._allTables[f].hook : dt(null, { creating: [Vr, V], reading: [Xr, st], updating: [Zr, V], deleting: [Jr, V] });
2964
+ })), this.Transaction = (u = this, ft(ua.prototype, function(f, _, p, b, w) {
2965
+ var m = this;
2966
+ this.db = u, this.mode = f, this.storeNames = _, this.schema = p, this.chromeTransactionDurability = b, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new B(function(S, E) {
2967
+ m._resolve = S, m._reject = E;
2950
2968
  }), this._completion.then(function() {
2951
- y.active = !1, y.on.complete.fire();
2952
- }, function(_) {
2953
- var E = y.active;
2954
- return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), te(_);
2969
+ m.active = !1, m.on.complete.fire();
2970
+ }, function(S) {
2971
+ var E = m.active;
2972
+ return m.active = !1, m.on.error.fire(S), m.parent ? m.parent._reject(S) : E && m.idbtrans && m.idbtrans.abort(), te(S);
2955
2973
  });
2956
2974
  })), this.Version = (c = this, ft(ga.prototype, function(f) {
2957
2975
  this.db = c, this._cfg = { version: f, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
2958
- })), this.WhereClause = (h = this, ft(gr.prototype, function(f, S, p) {
2959
- if (this.db = h, this._ctx = { table: f, index: S === ":id" ? null : S, or: p }, this._cmp = this._ascending = Y, this._descending = function(b, w) {
2976
+ })), this.WhereClause = (h = this, ft(gr.prototype, function(f, _, p) {
2977
+ if (this.db = h, this._ctx = { table: f, index: _ === ":id" ? null : _, or: p }, this._cmp = this._ascending = Y, this._descending = function(b, w) {
2960
2978
  return Y(w, b);
2961
2979
  }, this._max = function(b, w) {
2962
2980
  return 0 < Y(b, w) ? b : w;
2963
2981
  }, this._min = function(b, w) {
2964
2982
  return Y(b, w) < 0 ? b : w;
2965
- }, this._IDBKeyRange = h._deps.IDBKeyRange, !this._IDBKeyRange) throw new $.MissingAPI();
2983
+ }, this._IDBKeyRange = h._deps.IDBKeyRange, !this._IDBKeyRange) throw new U.MissingAPI();
2966
2984
  })), this.on("versionchange", function(f) {
2967
2985
  0 < f.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
2968
2986
  }), this.on("blocked", function(f) {
2969
2987
  !f.newVersion || f.newVersion < f.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(f.oldVersion / 10));
2970
- }), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f, S, p, b) {
2971
- return new n.Transaction(f, S, p, n._options.chromeTransactionDurability, b);
2988
+ }), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f, _, p, b) {
2989
+ return new n.Transaction(f, _, p, n._options.chromeTransactionDurability, b);
2972
2990
  }, this._fireOnBlocked = function(f) {
2973
- n.on("blocked").fire(f), et.filter(function(S) {
2974
- return S.name === n.name && S !== n && !S._state.vcFired;
2975
- }).map(function(S) {
2976
- return S.on("versionchange").fire(f);
2991
+ n.on("blocked").fire(f), et.filter(function(_) {
2992
+ return _.name === n.name && _ !== n && !_._state.vcFired;
2993
+ }).map(function(_) {
2994
+ return _.on("versionchange").fire(f);
2977
2995
  });
2978
2996
  }, this.use(va), this.use(Ea), this.use(wa), this.use(ma), this.use(ba);
2979
- var v = new Proxy(this, { get: function(f, S, p) {
2980
- if (S === "_vip") return !0;
2981
- if (S === "table") return function(w) {
2997
+ var v = new Proxy(this, { get: function(f, _, p) {
2998
+ if (_ === "_vip") return !0;
2999
+ if (_ === "table") return function(w) {
2982
3000
  return Qt(n.table(w), v);
2983
3001
  };
2984
- var b = Reflect.get(f, S, p);
2985
- return b instanceof lr ? Qt(b, v) : S === "tables" ? b.map(function(w) {
3002
+ var b = Reflect.get(f, _, p);
3003
+ return b instanceof lr ? Qt(b, v) : _ === "tables" ? b.map(function(w) {
2986
3004
  return Qt(w, v);
2987
- }) : S === "_createTransaction" ? function() {
3005
+ }) : _ === "_createTransaction" ? function() {
2988
3006
  return Qt(b.apply(this, arguments), v);
2989
3007
  } : b;
2990
3008
  } });
@@ -3007,20 +3025,20 @@ function Ra() {
3007
3025
  }
3008
3026
  function Ir(e) {
3009
3027
  var t, n = !1, a = new Oa(function(i) {
3010
- var s = rn(e), u, c = !1, h = {}, g = {}, v = { get closed() {
3028
+ var s = rn(e), u, c = !1, h = {}, y = {}, v = { get closed() {
3011
3029
  return c;
3012
3030
  }, unsubscribe: function() {
3013
3031
  c || (c = !0, u && u.abort(), f && Ce.storagemutated.unsubscribe(p));
3014
3032
  } };
3015
3033
  i.start && i.start(v);
3016
- var f = !1, S = function() {
3034
+ var f = !1, _ = function() {
3017
3035
  return pn(b);
3018
3036
  }, p = function(w) {
3019
- zt(h, w), Cn(g, h) && S();
3037
+ zt(h, w), Cn(y, h) && _();
3020
3038
  }, b = function() {
3021
- var w, y, _;
3022
- !c && Xt.indexedDB && (h = {}, w = {}, u && u.abort(), u = new AbortController(), _ = function(E) {
3023
- var O = Ve();
3039
+ var w, m, S;
3040
+ !c && Xt.indexedDB && (h = {}, w = {}, u && u.abort(), u = new AbortController(), S = function(E) {
3041
+ var O = Je();
3024
3042
  try {
3025
3043
  s && qe();
3026
3044
  var A = ke(e, E);
@@ -3028,11 +3046,11 @@ function Ra() {
3028
3046
  } finally {
3029
3047
  O && Ze();
3030
3048
  }
3031
- }(y = { subscr: w, signal: u.signal, requery: S, querier: e, trans: null }), Promise.resolve(_).then(function(E) {
3032
- n = !0, t = E, c || y.signal.aborted || (h = {}, function(O) {
3049
+ }(m = { subscr: w, signal: u.signal, requery: _, querier: e, trans: null }), Promise.resolve(S).then(function(E) {
3050
+ n = !0, t = E, c || m.signal.aborted || (h = {}, function(O) {
3033
3051
  for (var A in O) if (ee(O, A)) return;
3034
3052
  return 1;
3035
- }(g = w) || f || (Ce(gt, p), f = !0), pn(function() {
3053
+ }(y = w) || f || (Ce(gt, p), f = !0), pn(function() {
3036
3054
  return !c && i.next && i.next(E);
3037
3055
  }));
3038
3056
  }, function(E) {
@@ -3041,7 +3059,7 @@ function Ra() {
3041
3059
  });
3042
3060
  }));
3043
3061
  };
3044
- return setTimeout(S, 0), v;
3062
+ return setTimeout(_, 0), v;
3045
3063
  });
3046
3064
  return a.hasValue = function() {
3047
3065
  return n;
@@ -3076,15 +3094,15 @@ function Ra() {
3076
3094
  });
3077
3095
  }) : kn(n, t).toCollection().primaryKeys()).then(e);
3078
3096
  } catch {
3079
- return te(new $.MissingAPI());
3097
+ return te(new U.MissingAPI());
3080
3098
  }
3081
3099
  var t, n;
3082
3100
  }, defineClass: function() {
3083
3101
  return function(e) {
3084
- M(this, e);
3102
+ P(this, e);
3085
3103
  };
3086
3104
  }, ignoreTransaction: function(e) {
3087
- return G.trans ? Ge(G.transless, e) : e();
3105
+ return $.trans ? Ge($.transless, e) : e();
3088
3106
  }, vip: Pn, async: function(e) {
3089
3107
  return function() {
3090
3108
  try {
@@ -3102,14 +3120,14 @@ function Ra() {
3102
3120
  return te(i);
3103
3121
  }
3104
3122
  }, currentTransaction: { get: function() {
3105
- return G.trans || null;
3123
+ return $.trans || null;
3106
3124
  } }, waitFor: function(e, t) {
3107
- return t = B.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), G.trans ? G.trans.waitFor(t) : t;
3125
+ return t = B.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), $.trans ? $.trans.waitFor(t) : t;
3108
3126
  }, Promise: B, debug: { get: function() {
3109
3127
  return me;
3110
3128
  }, set: function(e) {
3111
3129
  qn(e);
3112
- } }, derive: Ye, extend: M, props: le, override: Hn, Events: dt, on: Ce, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
3130
+ } }, derive: Ye, extend: P, props: le, override: Hn, Events: dt, on: Ce, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
3113
3131
  typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3114
3132
  fe(e, n, void 0);
3115
3133
  });
@@ -3155,7 +3173,7 @@ var Ta = Ra();
3155
3173
  const Wn = /* @__PURE__ */ Ia(Ta), Tr = Symbol.for("Dexie"), en = globalThis[Tr] || (globalThis[Tr] = Wn);
3156
3174
  if (Wn.semVer !== en.semVer)
3157
3175
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Wn.semVer} and ${en.semVer}`);
3158
- function V(d) {
3176
+ function J(d) {
3159
3177
  let r = `${d.type}.${d.topics}`;
3160
3178
  return d.order && (r += `.${d.order}`), d.period && (r += `.${d.period}`), r;
3161
3179
  }
@@ -3167,12 +3185,12 @@ function Mr(d) {
3167
3185
  }
3168
3186
  return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
3169
3187
  }
3170
- function St(d, r) {
3171
- var U;
3188
+ function _t(d, r) {
3189
+ var L;
3172
3190
  let o, l, x, D, K;
3173
3191
  switch (d.moderation) {
3174
3192
  case Zt.BEFORE:
3175
- o = /* @__PURE__ */ new Date(), l = (U = d.beforeTime) == null ? void 0 : U.split(":"), x = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), K = Number.parseInt(l ? l[2] : "00"), r.before = o.setHours(x, D, K, 0) / 1e3, r.period || (r.period = o.getDay() === 1 ? 72 : 24);
3193
+ o = /* @__PURE__ */ new Date(), l = (L = d.beforeTime) == null ? void 0 : L.split(":"), x = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), K = Number.parseInt(l ? l[2] : "00"), r.before = o.setHours(x, D, K, 0) / 1e3, r.period || (r.period = o.getDay() === 1 ? 72 : 24);
3176
3194
  break;
3177
3195
  case Zt.DELAYED:
3178
3196
  d.delay && d.delay > 0 && (r.delay = `${d.delay}`);
@@ -3199,9 +3217,9 @@ class jr {
3199
3217
  const o = await this.db.table(N.CLOUD).where({ id: r.widget }).last().catch(() => {
3200
3218
  console.warn(
3201
3219
  "%capi%C %ccloud",
3202
- m.API,
3203
- m.NONE,
3204
- m.CLOUD,
3220
+ g.API,
3221
+ g.NONE,
3222
+ g.CLOUD,
3205
3223
  r.slide,
3206
3224
  r.widget
3207
3225
  );
@@ -3217,9 +3235,9 @@ class jr {
3217
3235
  const o = await this.db.table(N.SERIES).where({ id: r.widget }).last().catch(() => {
3218
3236
  console.warn(
3219
3237
  "%capi%c %cseries",
3220
- m.API,
3221
- m.NONE,
3222
- m.SERIES,
3238
+ g.API,
3239
+ g.NONE,
3240
+ g.SERIES,
3223
3241
  r.slide,
3224
3242
  r.widget
3225
3243
  );
@@ -3236,11 +3254,11 @@ class jr {
3236
3254
  o !== "utc" && (r.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? r.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : r.before = Math.floor(Date.now() / 1e3);
3237
3255
  const l = (K) => K.utc > ((r == null ? void 0 : r.since) || 0), x = (K) => K.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (K) => (K == null ? void 0 : K.visible) !== 0;
3238
3256
  try {
3239
- const U = await this.db.table(N.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(l).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(o);
3240
- if (U.length === 0)
3257
+ const L = await this.db.table(N.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(l).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(o);
3258
+ if (L.length === 0)
3241
3259
  return { data: null, message: "No Messages error", success: !1 };
3242
- let M = U.map((X) => this.db.table(N.MESSAGES).get({ id: X.message_id }));
3243
- return en.Promise.all(M).then(async (X) => {
3260
+ let P = L.map((X) => this.db.table(N.MESSAGES).get({ id: X.message_id }));
3261
+ return en.Promise.all(P).then(async (X) => {
3244
3262
  const se = X.map((le) => le.data), ee = {
3245
3263
  data: {
3246
3264
  presentation: (r == null ? void 0 : r.presentation) || "not set",
@@ -3255,18 +3273,18 @@ class jr {
3255
3273
  };
3256
3274
  return console.debug(
3257
3275
  "%cstorage%c %cmessages",
3258
- m.STORAGE,
3259
- m.NONE,
3260
- m.MESSAGES,
3276
+ g.STORAGE,
3277
+ g.NONE,
3278
+ g.MESSAGES,
3261
3279
  ee
3262
3280
  ), ee;
3263
3281
  });
3264
3282
  } catch (K) {
3265
3283
  return console.warn(
3266
3284
  "%cstorage%c %cmessages",
3267
- m.STORAGE,
3268
- m.NONE,
3269
- m.MESSAGES,
3285
+ g.STORAGE,
3286
+ g.NONE,
3287
+ g.MESSAGES,
3270
3288
  r,
3271
3289
  K
3272
3290
  ), { data: null, message: "Messages Data error", success: !1 };
@@ -3283,7 +3301,7 @@ class jr {
3283
3301
  dashboard_id: r.dashboard,
3284
3302
  //data: data.data,
3285
3303
  data: o
3286
- }).then(() => 201).catch((l) => (console.error("%cstorage", m.STORAGE, "set", r, l.message), 400)) : 400);
3304
+ }).then(() => 201).catch((l) => (console.error("%cstorage", g.STORAGE, "set", r, l.message), 400)) : 400);
3287
3305
  /**
3288
3306
  * Update Series
3289
3307
  * @param query IQuery
@@ -3295,7 +3313,7 @@ class jr {
3295
3313
  dashboard_id: r.dashboard,
3296
3314
  //data: data.data,
3297
3315
  data: o
3298
- }).then(() => 201).catch((l) => (console.error("%cstorage", m.STORAGE, "set", r, l.message), 400)) : 400);
3316
+ }).then(() => 201).catch((l) => (console.error("%cstorage", g.STORAGE, "set", r, l.message), 400)) : 400);
3299
3317
  /**
3300
3318
  * Update Messages
3301
3319
  * @param query IQuery
@@ -3308,7 +3326,7 @@ class jr {
3308
3326
  const l = o.data.title;
3309
3327
  let x = 0;
3310
3328
  return o.data.messages.forEach(async (D) => {
3311
- var K, U, M, X, se, ee, le;
3329
+ var K, L, P, X, se, ee, le;
3312
3330
  D.id !== null && (await this.db.table(N.MESSAGES).put({
3313
3331
  id: D.id,
3314
3332
  utc: D.utc,
@@ -3317,7 +3335,7 @@ class jr {
3317
3335
  }).catch((He) => {
3318
3336
  x++, console.error(
3319
3337
  "%cstorage",
3320
- m.STORAGE,
3338
+ g.STORAGE,
3321
3339
  "set message",
3322
3340
  `title: ${l}`,
3323
3341
  D,
@@ -3328,8 +3346,8 @@ class jr {
3328
3346
  widget_id: r.widget,
3329
3347
  message_id: D.id,
3330
3348
  dashboard_id: r.dashboard,
3331
- engagement: ((K = D.topics[0]) == null ? void 0 : K.engagement) || ((U = D.dynamics) == null ? void 0 : U.engagement) || 0,
3332
- impressions: ((M = D.topics[0]) == null ? void 0 : M.impressions) || ((X = D.dynamics) == null ? void 0 : X.semrush_visits) || 0,
3349
+ engagement: ((K = D.topics[0]) == null ? void 0 : K.engagement) || ((L = D.dynamics) == null ? void 0 : L.engagement) || 0,
3350
+ impressions: ((P = D.topics[0]) == null ? void 0 : P.impressions) || ((X = D.dynamics) == null ? void 0 : X.semrush_visits) || 0,
3333
3351
  reach: ((se = D.topics[0]) == null ? void 0 : se.reach) || ((ee = D.dynamics) == null ? void 0 : ee.potential_reach) || 0,
3334
3352
  sentiment: ((le = D.topics[0]) == null ? void 0 : le.sentiment) || 0,
3335
3353
  utc: D.utc,
@@ -3337,7 +3355,7 @@ class jr {
3337
3355
  }).catch((He) => {
3338
3356
  x++, console.error(
3339
3357
  "%cstorage",
3340
- m.STORAGE,
3358
+ g.STORAGE,
3341
3359
  "set topic",
3342
3360
  `title: ${l}`,
3343
3361
  D,
@@ -3345,13 +3363,13 @@ class jr {
3345
3363
  );
3346
3364
  }));
3347
3365
  }), o.data.topics.forEach(async (D) => {
3348
- const K = D.message_id, U = D.visible ? 1 : 0, M = D.title;
3349
- await this.db.table(N.TOPICS).where("message_id").equals(K).modify({ visible: U }).catch((X) => {
3366
+ const K = D.message_id, L = D.visible ? 1 : 0, P = D.title;
3367
+ await this.db.table(N.TOPICS).where("message_id").equals(K).modify({ visible: L }).catch((X) => {
3350
3368
  x++, console.error(
3351
3369
  "%cstorage",
3352
- m.STORAGE,
3370
+ g.STORAGE,
3353
3371
  "update message visibility",
3354
- `title: ${M}`,
3372
+ `title: ${P}`,
3355
3373
  `widget: ${D.widget_id}`,
3356
3374
  X.message
3357
3375
  );
@@ -3365,24 +3383,24 @@ class jr {
3365
3383
  const r = Date.now() / 1e3, o = (D) => D.expires < r, l = (D) => D.expires < r;
3366
3384
  return await this.db.table(N.TOPICS).orderBy("expires").filter(o).delete().catch((D) => (console.error(
3367
3385
  "%cstorage%c %cclean",
3368
- m.STORAGE,
3369
- m.NONE,
3370
- m.MESSAGES,
3386
+ g.STORAGE,
3387
+ g.NONE,
3388
+ g.MESSAGES,
3371
3389
  D.message
3372
3390
  ), 0)), await this.db.table(N.MESSAGES).orderBy("expires").filter(l).delete().catch((D) => (console.error(
3373
3391
  "%cstorage%c %clean",
3374
- m.STORAGE,
3375
- m.NONE,
3376
- m.MESSAGES,
3392
+ g.STORAGE,
3393
+ g.NONE,
3394
+ g.MESSAGES,
3377
3395
  D.message
3378
3396
  ), 0));
3379
3397
  });
3380
3398
  k(this, "hideMessage", async (r, o) => {
3381
3399
  await this.db.table(N.TOPICS).where("message_id").equals(r).modify({ visible: o ? 1 : 0 }).catch((l) => (console.error(
3382
3400
  "%cstorage%c %chide",
3383
- m.STORAGE,
3384
- m.NONE,
3385
- m.HIDE,
3401
+ g.STORAGE,
3402
+ g.NONE,
3403
+ g.HIDE,
3386
3404
  l.message
3387
3405
  ), 0));
3388
3406
  });
@@ -3397,7 +3415,7 @@ class jr {
3397
3415
  type: r.type
3398
3416
  }).then(() => 201).catch((o) => (console.error(
3399
3417
  "%cstorage",
3400
- m.STORAGE,
3418
+ g.STORAGE,
3401
3419
  N.WIDGET,
3402
3420
  r,
3403
3421
  o.message
@@ -3409,18 +3427,18 @@ class jr {
3409
3427
  */
3410
3428
  k(this, "subscribe", (r) => (r = Mr(r), this.subscribers.filter(
3411
3429
  (l) => l.widget === r.widget
3412
- ).length > 0 || (r.type === N.MESSAGES && (r = St(this.options, r)), console.info(
3430
+ ).length > 0 || (r.type === N.MESSAGES && (r = _t(this.options, r)), console.info(
3413
3431
  "%cstorage%c %csubscribe",
3414
- m.STORAGE,
3415
- m.NONE,
3416
- m.SUBSCRIBE,
3432
+ g.STORAGE,
3433
+ g.NONE,
3434
+ g.SUBSCRIBE,
3417
3435
  r.slide,
3418
3436
  r.widget
3419
3437
  ), console.debug(
3420
3438
  "%cstorage%c %csubscribe",
3421
- m.STORAGE,
3422
- m.NONE,
3423
- m.SUBSCRIBE,
3439
+ g.STORAGE,
3440
+ g.NONE,
3441
+ g.SUBSCRIBE,
3424
3442
  r
3425
3443
  ), this.subscribers.push(r)), null));
3426
3444
  /**
@@ -3437,9 +3455,9 @@ class jr {
3437
3455
  const o = await this.db.table(N.SLIDE).where({ id: r.id }).last().catch(() => {
3438
3456
  console.warn(
3439
3457
  "%capi%c %cseries",
3440
- m.API,
3441
- m.NONE,
3442
- m.SERIES,
3458
+ g.API,
3459
+ g.NONE,
3460
+ g.SERIES,
3443
3461
  r.id
3444
3462
  );
3445
3463
  });
@@ -3458,7 +3476,7 @@ class jr {
3458
3476
  css: r.data.css || ""
3459
3477
  }).then(() => 200).catch((o) => (console.error(
3460
3478
  "%cstorage",
3461
- m.STORAGE,
3479
+ g.STORAGE,
3462
3480
  re.SLIDE_STORE,
3463
3481
  r,
3464
3482
  o.message
@@ -3493,7 +3511,7 @@ let Un;
3493
3511
  function Nr() {
3494
3512
  return Un || (Un = Ma("keyval-store", "keyval")), Un;
3495
3513
  }
3496
- function Vt(d, r = Nr()) {
3514
+ function Jt(d, r = Nr()) {
3497
3515
  return r("readonly", (o) => zn(o.get(d)));
3498
3516
  }
3499
3517
  function wt(d, r, o = Nr()) {
@@ -3504,16 +3522,16 @@ class Kr {
3504
3522
  k(this, "subscribers", []);
3505
3523
  k(this, "options");
3506
3524
  k(this, "getCloud", async (r) => {
3507
- const o = V(r);
3508
- return await Vt(o).then((l) => l).catch(() => (console.warn("%capi", m.API, N.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
3525
+ const o = J(r);
3526
+ return await Jt(o).then((l) => l).catch(() => (console.warn("%capi", g.API, N.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
3509
3527
  });
3510
3528
  k(this, "getSeries", async (r) => {
3511
- const o = V(r);
3512
- return await Vt(o).then((l) => l).catch(() => (console.warn("%capi", m.API, N.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
3529
+ const o = J(r);
3530
+ return await Jt(o).then((l) => l).catch(() => (console.warn("%capi", g.API, N.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
3513
3531
  });
3514
3532
  k(this, "getMessages", async (r) => {
3515
- const o = V(r);
3516
- return await Vt(o).then((l) => l).catch(() => (console.warn("%capi", m.API, N.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
3533
+ const o = J(r);
3534
+ return await Jt(o).then((l) => l).catch(() => (console.warn("%capi", g.API, N.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
3517
3535
  });
3518
3536
  /**
3519
3537
  * Update Cloud
@@ -3524,8 +3542,8 @@ class Kr {
3524
3542
  k(this, "setCloud", async (r, o) => {
3525
3543
  if (!o.success)
3526
3544
  return 400;
3527
- const l = V(r);
3528
- return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", m.STORAGE, N.CLOUD, r, x.message), 400));
3545
+ const l = J(r);
3546
+ return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", g.STORAGE, N.CLOUD, r, x.message), 400));
3529
3547
  });
3530
3548
  /**
3531
3549
  * Update Series
@@ -3536,8 +3554,8 @@ class Kr {
3536
3554
  k(this, "setSeries", async (r, o) => {
3537
3555
  if (!o.success)
3538
3556
  return 400;
3539
- const l = V(r);
3540
- return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", m.STORAGE, N.SERIES, r, x.message), 400));
3557
+ const l = J(r);
3558
+ return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", g.STORAGE, N.SERIES, r, x.message), 400));
3541
3559
  });
3542
3560
  /**
3543
3561
  * Update Messages
@@ -3548,8 +3566,8 @@ class Kr {
3548
3566
  k(this, "setMessages", async (r, o) => {
3549
3567
  if (!o.success)
3550
3568
  return 400;
3551
- const l = V(r);
3552
- return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", m.STORAGE, N.MESSAGES, r, x.message), 400));
3569
+ const l = J(r);
3570
+ return delete o.success, delete o.message, await wt(l, o).then(() => 201).catch((x) => (console.error("%cstorage", g.STORAGE, N.MESSAGES, r, x.message), 400));
3553
3571
  });
3554
3572
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0))));
3555
3573
  k(this, "hideMessage", async (r, o) => {
@@ -3563,25 +3581,25 @@ class Kr {
3563
3581
  * @returns number
3564
3582
  */
3565
3583
  k(this, "setWidget", async (r) => {
3566
- const o = V(r), l = {
3584
+ const o = J(r), l = {
3567
3585
  id: r.widget,
3568
3586
  dashboard_id: r.dashboard,
3569
3587
  type: r.type
3570
3588
  };
3571
- return await wt(o, l).then(() => 201).catch((x) => (console.error("%cstorage", m.STORAGE, N.WIDGET, r, x.message), 400));
3589
+ return await wt(o, l).then(() => 201).catch((x) => (console.error("%cstorage", g.STORAGE, N.WIDGET, r, x.message), 400));
3572
3590
  });
3573
3591
  /**
3574
3592
  * Add component subscriber
3575
3593
  * @param query IQuery
3576
3594
  * @returns null
3577
3595
  */
3578
- k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
3596
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3579
3597
  (l) => l.widget === r.widget
3580
3598
  ).length > 0 || (console.debug(
3581
3599
  "%cstorage%c %csubscribe",
3582
- m.STORAGE,
3583
- m.NONE,
3584
- m.SUBSCRIBE,
3600
+ g.STORAGE,
3601
+ g.NONE,
3602
+ g.SUBSCRIBE,
3585
3603
  r.slide,
3586
3604
  r.widget
3587
3605
  ), this.subscribers.push(r)), null));
@@ -3591,8 +3609,8 @@ class Kr {
3591
3609
  */
3592
3610
  k(this, "getSubscribers", async () => await new Promise((r) => r(this.subscribers)));
3593
3611
  k(this, "loadSlide", async (r) => {
3594
- const o = V(r);
3595
- return await Vt(o).then((l) => l).catch(() => (console.warn("%capi", m.API, N.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
3612
+ const o = J(r);
3613
+ return await Jt(o).then((l) => l).catch(() => (console.warn("%capi", g.API, N.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
3596
3614
  });
3597
3615
  /**
3598
3616
  * Update Slide
@@ -3600,14 +3618,14 @@ class Kr {
3600
3618
  * @returns number
3601
3619
  */
3602
3620
  k(this, "storeSlide", async (r) => {
3603
- const o = V(r), l = {
3621
+ const o = J(r), l = {
3604
3622
  id: r.id,
3605
3623
  title: r.data.title || "Not set",
3606
3624
  json: r.data.json || {},
3607
3625
  html: r.data.html || "",
3608
3626
  css: r.data.css || ""
3609
3627
  };
3610
- return await wt(o, l).then(() => 201).catch((x) => (console.error("%cstorage", m.STORAGE, N.SLIDE, r, x.message), 400));
3628
+ return await wt(o, l).then(() => 201).catch((x) => (console.error("%cstorage", g.STORAGE, N.SLIDE, r, x.message), 400));
3611
3629
  });
3612
3630
  this.options = r;
3613
3631
  }
@@ -3617,27 +3635,27 @@ class Br {
3617
3635
  k(this, "subscribers", []);
3618
3636
  k(this, "options");
3619
3637
  k(this, "getCloud", async (r) => {
3620
- const o = V(r);
3638
+ const o = J(r);
3621
3639
  try {
3622
3640
  return localStorage.getObject(o);
3623
3641
  } catch (l) {
3624
- return console.warn("%capi", m.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3642
+ return console.warn("%capi", g.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3625
3643
  }
3626
3644
  });
3627
3645
  k(this, "getSeries", async (r) => {
3628
- const o = V(r);
3646
+ const o = J(r);
3629
3647
  try {
3630
3648
  return localStorage.getObject(o);
3631
3649
  } catch (l) {
3632
- return console.warn("%capi", m.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3650
+ return console.warn("%capi", g.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3633
3651
  }
3634
3652
  });
3635
3653
  k(this, "getMessages", async (r) => {
3636
- const o = V(r);
3654
+ const o = J(r);
3637
3655
  try {
3638
3656
  return localStorage.getObject(o);
3639
3657
  } catch (l) {
3640
- return console.warn("%capi", m.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3658
+ return console.warn("%capi", g.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3641
3659
  }
3642
3660
  });
3643
3661
  /**
@@ -3647,11 +3665,11 @@ class Br {
3647
3665
  * @returns number
3648
3666
  */
3649
3667
  k(this, "setCloud", async (r, o) => {
3650
- const l = V(r);
3668
+ const l = J(r);
3651
3669
  try {
3652
3670
  return localStorage.setObject(l, o), 201;
3653
3671
  } catch (x) {
3654
- return console.error("%cstorage", m.STORAGE, N.CLOUD, r, x), 400;
3672
+ return console.error("%cstorage", g.STORAGE, N.CLOUD, r, x), 400;
3655
3673
  }
3656
3674
  });
3657
3675
  /**
@@ -3661,11 +3679,11 @@ class Br {
3661
3679
  * @returns number
3662
3680
  */
3663
3681
  k(this, "setSeries", async (r, o) => {
3664
- const l = V(r);
3682
+ const l = J(r);
3665
3683
  try {
3666
3684
  return localStorage.setObject(l, o), 201;
3667
3685
  } catch (x) {
3668
- return console.error("%cstorage", m.STORAGE, N.SERIES, r, x), 400;
3686
+ return console.error("%cstorage", g.STORAGE, N.SERIES, r, x), 400;
3669
3687
  }
3670
3688
  });
3671
3689
  /**
@@ -3675,11 +3693,11 @@ class Br {
3675
3693
  * @returns number
3676
3694
  */
3677
3695
  k(this, "setMessages", async (r, o) => {
3678
- const l = V(r);
3696
+ const l = J(r);
3679
3697
  try {
3680
3698
  return localStorage.setObject(l, o), 200;
3681
3699
  } catch (x) {
3682
- return console.error("%cstorage", m.STORAGE, N.MESSAGES, r, x), 400;
3700
+ return console.error("%cstorage", g.STORAGE, N.MESSAGES, r, x), 400;
3683
3701
  }
3684
3702
  });
3685
3703
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0))));
@@ -3691,7 +3709,7 @@ class Br {
3691
3709
  try {
3692
3710
  return localStorage.setObject(o, r), 201;
3693
3711
  } catch (l) {
3694
- return console.error("%cstorage", m.STORAGE, N.WIDGET, r, l), 400;
3712
+ return console.error("%cstorage", g.STORAGE, N.WIDGET, r, l), 400;
3695
3713
  }
3696
3714
  });
3697
3715
  /**
@@ -3699,13 +3717,13 @@ class Br {
3699
3717
  * @param query IQuery
3700
3718
  * @returns null
3701
3719
  */
3702
- k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
3720
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3703
3721
  (l) => l.widget === r.widget
3704
3722
  ).length || (console.debug(
3705
3723
  "%cstorage%c %csubscribe",
3706
- m.STORAGE,
3707
- m.NONE,
3708
- m.SUBSCRIBE,
3724
+ g.STORAGE,
3725
+ g.NONE,
3726
+ g.SUBSCRIBE,
3709
3727
  r.slide,
3710
3728
  r.widget
3711
3729
  ), this.subscribers.push(r)), null));
@@ -3718,7 +3736,7 @@ class Br {
3718
3736
  try {
3719
3737
  return localStorage.getObject(`${r.type}.${r.id}`);
3720
3738
  } catch (o) {
3721
- return console.warn("%capi", m.API, N.SLIDE, r.id, o), { data: null, message: "Slide Load error", success: !1 };
3739
+ return console.warn("%capi", g.API, N.SLIDE, r.id, o), { data: null, message: "Slide Load error", success: !1 };
3722
3740
  }
3723
3741
  });
3724
3742
  k(this, "storeSlide", async (r) => {
@@ -3731,7 +3749,7 @@ class Br {
3731
3749
  css: r.data.css || ""
3732
3750
  }), 201;
3733
3751
  } catch (o) {
3734
- return console.error("%cstorage", m.STORAGE, N.SLIDE, r, o), 400;
3752
+ return console.error("%cstorage", g.STORAGE, N.SLIDE, r, o), 400;
3735
3753
  }
3736
3754
  });
3737
3755
  this.options = r, Storage.prototype.setObject = function(o, l) {
@@ -3747,27 +3765,27 @@ class Lr {
3747
3765
  k(this, "subscribers", []);
3748
3766
  k(this, "options");
3749
3767
  k(this, "getCloud", async (r) => {
3750
- const o = V(r);
3768
+ const o = J(r);
3751
3769
  try {
3752
3770
  return sessionStorage.getObject(o);
3753
3771
  } catch (l) {
3754
- return console.warn("%capi", m.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3772
+ return console.warn("%capi", g.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3755
3773
  }
3756
3774
  });
3757
3775
  k(this, "getSeries", async (r) => {
3758
- const o = V(r);
3776
+ const o = J(r);
3759
3777
  try {
3760
3778
  return sessionStorage.getObject(o);
3761
3779
  } catch (l) {
3762
- return console.warn("%capi", m.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3780
+ return console.warn("%capi", g.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3763
3781
  }
3764
3782
  });
3765
3783
  k(this, "getMessages", async (r) => {
3766
- const o = V(r);
3784
+ const o = J(r);
3767
3785
  try {
3768
3786
  return sessionStorage.getObject(o);
3769
3787
  } catch (l) {
3770
- return console.warn("%capi", m.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3788
+ return console.warn("%capi", g.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3771
3789
  }
3772
3790
  });
3773
3791
  /**
@@ -3777,11 +3795,11 @@ class Lr {
3777
3795
  * @returns number
3778
3796
  */
3779
3797
  k(this, "setCloud", async (r, o) => {
3780
- const l = V(r);
3798
+ const l = J(r);
3781
3799
  try {
3782
3800
  return sessionStorage.setObject(l, o), 201;
3783
3801
  } catch (x) {
3784
- return console.error("%cstorage", m.STORAGE, N.CLOUD, r, x), 400;
3802
+ return console.error("%cstorage", g.STORAGE, N.CLOUD, r, x), 400;
3785
3803
  }
3786
3804
  });
3787
3805
  /**
@@ -3791,11 +3809,11 @@ class Lr {
3791
3809
  * @returns number
3792
3810
  */
3793
3811
  k(this, "setSeries", async (r, o) => {
3794
- const l = V(r);
3812
+ const l = J(r);
3795
3813
  try {
3796
3814
  return sessionStorage.setObject(l, o), 201;
3797
3815
  } catch (x) {
3798
- return console.error("%cstorage", m.STORAGE, N.SERIES, r, x), 400;
3816
+ return console.error("%cstorage", g.STORAGE, N.SERIES, r, x), 400;
3799
3817
  }
3800
3818
  });
3801
3819
  /**
@@ -3805,11 +3823,11 @@ class Lr {
3805
3823
  * @returns number
3806
3824
  */
3807
3825
  k(this, "setMessages", async (r, o) => {
3808
- const l = V(r);
3826
+ const l = J(r);
3809
3827
  try {
3810
3828
  return sessionStorage.setObject(l, o), 200;
3811
3829
  } catch (x) {
3812
- return console.error("%cstorage", m.STORAGE, N.MESSAGES, r, x), 400;
3830
+ return console.error("%cstorage", g.STORAGE, N.MESSAGES, r, x), 400;
3813
3831
  }
3814
3832
  });
3815
3833
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0))));
@@ -3821,7 +3839,7 @@ class Lr {
3821
3839
  try {
3822
3840
  return sessionStorage.setObject(o, r), 201;
3823
3841
  } catch (l) {
3824
- return console.error("%cstorage", m.STORAGE, N.WIDGET, r, l), 400;
3842
+ return console.error("%cstorage", g.STORAGE, N.WIDGET, r, l), 400;
3825
3843
  }
3826
3844
  });
3827
3845
  /**
@@ -3829,13 +3847,13 @@ class Lr {
3829
3847
  * @param query IQuery
3830
3848
  * @returns null
3831
3849
  */
3832
- k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
3850
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3833
3851
  (l) => l.widget === r.widget
3834
3852
  ).length || (console.debug(
3835
3853
  "%cstorage%c %csubscribe",
3836
- m.STORAGE,
3837
- m.NONE,
3838
- m.SUBSCRIBE,
3854
+ g.STORAGE,
3855
+ g.NONE,
3856
+ g.SUBSCRIBE,
3839
3857
  r.slide,
3840
3858
  r.widget
3841
3859
  ), this.subscribers.push(r)), null));
@@ -3848,7 +3866,7 @@ class Lr {
3848
3866
  try {
3849
3867
  return sessionStorage.getObject(`${r.type}.${r.id}`);
3850
3868
  } catch (o) {
3851
- return console.warn("%capi", m.API, N.SLIDE, r.id, o), { data: null, message: "Store Load error", success: !1 };
3869
+ return console.warn("%capi", g.API, N.SLIDE, r.id, o), { data: null, message: "Store Load error", success: !1 };
3852
3870
  }
3853
3871
  });
3854
3872
  /**
@@ -3866,7 +3884,7 @@ class Lr {
3866
3884
  css: r.data.css || ""
3867
3885
  }), 200;
3868
3886
  } catch (o) {
3869
- return console.error("%cstorage", m.STORAGE, N.SLIDE, r, o), 400;
3887
+ return console.error("%cstorage", g.STORAGE, N.SLIDE, r, o), 400;
3870
3888
  }
3871
3889
  });
3872
3890
  this.options = r, Storage.prototype.setObject = function(o, l) {
@@ -3882,27 +3900,27 @@ class Gr {
3882
3900
  k(this, "subscribers", []);
3883
3901
  k(this, "options");
3884
3902
  k(this, "getCloud", async (r) => {
3885
- const o = V(r);
3903
+ const o = J(r);
3886
3904
  try {
3887
3905
  return window.BuzzCasting.WidgetData[o];
3888
3906
  } catch (l) {
3889
- return console.warn("%capi", m.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
3907
+ return console.warn("%capi", g.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
3890
3908
  }
3891
3909
  });
3892
3910
  k(this, "getSeries", async (r) => {
3893
- const o = V(r);
3911
+ const o = J(r);
3894
3912
  try {
3895
3913
  return window.BuzzCasting.WidgetData[o];
3896
3914
  } catch (l) {
3897
- return console.warn("%capi", m.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
3915
+ return console.warn("%capi", g.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
3898
3916
  }
3899
3917
  });
3900
3918
  k(this, "getMessages", async (r) => {
3901
- const o = V(r);
3919
+ const o = J(r);
3902
3920
  try {
3903
3921
  return window.BuzzCasting.WidgetData[o];
3904
3922
  } catch (l) {
3905
- return console.warn("%capi", m.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3923
+ return console.warn("%capi", g.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3906
3924
  }
3907
3925
  });
3908
3926
  /**
@@ -3912,11 +3930,11 @@ class Gr {
3912
3930
  * @returns number
3913
3931
  */
3914
3932
  k(this, "setCloud", async (r, o) => {
3915
- const l = V(r);
3933
+ const l = J(r);
3916
3934
  try {
3917
3935
  return window.BuzzCasting.WidgetData[l] = o, 201;
3918
3936
  } catch (x) {
3919
- return console.error("%cstorage", m.STORAGE, "set", r, x), 400;
3937
+ return console.error("%cstorage", g.STORAGE, "set", r, x), 400;
3920
3938
  }
3921
3939
  });
3922
3940
  /**
@@ -3926,11 +3944,11 @@ class Gr {
3926
3944
  * @returns number
3927
3945
  */
3928
3946
  k(this, "setSeries", async (r, o) => {
3929
- const l = V(r);
3947
+ const l = J(r);
3930
3948
  try {
3931
3949
  return window.BuzzCasting.WidgetData[l] = o, 201;
3932
3950
  } catch (x) {
3933
- return console.error("%cstorage", m.STORAGE, "set", r, x), 400;
3951
+ return console.error("%cstorage", g.STORAGE, "set", r, x), 400;
3934
3952
  }
3935
3953
  });
3936
3954
  /**
@@ -3940,11 +3958,11 @@ class Gr {
3940
3958
  * @returns number
3941
3959
  */
3942
3960
  k(this, "setMessages", async (r, o) => {
3943
- const l = V(r);
3961
+ const l = J(r);
3944
3962
  try {
3945
3963
  return window.BuzzCasting.WidgetData[l] = o, 201;
3946
3964
  } catch (x) {
3947
- return console.error("%cstorage", m.STORAGE, "set", r, x), 400;
3965
+ return console.error("%cstorage", g.STORAGE, "set", r, x), 400;
3948
3966
  }
3949
3967
  });
3950
3968
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0))));
@@ -3956,7 +3974,7 @@ class Gr {
3956
3974
  try {
3957
3975
  return window.BuzzCasting.WidgetData[o] = r, 201;
3958
3976
  } catch (l) {
3959
- return console.error("%cstorage", m.STORAGE, N.WIDGET, r, l), 400;
3977
+ return console.error("%cstorage", g.STORAGE, N.WIDGET, r, l), 400;
3960
3978
  }
3961
3979
  });
3962
3980
  /**
@@ -3964,13 +3982,13 @@ class Gr {
3964
3982
  * @param query IQuery
3965
3983
  * @returns null
3966
3984
  */
3967
- k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = St(this.options, r)), this.subscribers.filter(
3985
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3968
3986
  (l) => l.widget === r.widget
3969
3987
  ).length || (console.debug(
3970
3988
  "%cstorage%c %csubscribe",
3971
- m.STORAGE,
3972
- m.NONE,
3973
- m.SUBSCRIBE,
3989
+ g.STORAGE,
3990
+ g.NONE,
3991
+ g.SUBSCRIBE,
3974
3992
  r.slide,
3975
3993
  r.widget
3976
3994
  ), this.subscribers.push(r)), null));
@@ -3983,7 +4001,7 @@ class Gr {
3983
4001
  try {
3984
4002
  return window.BuzzCasting.SlideData[r.id];
3985
4003
  } catch (o) {
3986
- return console.warn("%capi", m.API, N.SLIDE, r.id, o), { data: null, message: "Slide Load error", success: !1 };
4004
+ return console.warn("%capi", g.API, N.SLIDE, r.id, o), { data: null, message: "Slide Load error", success: !1 };
3987
4005
  }
3988
4006
  });
3989
4007
  k(this, "storeSlide", async (r) => {
@@ -3996,7 +4014,7 @@ class Gr {
3996
4014
  css: r.data.css || ""
3997
4015
  }, 201;
3998
4016
  } catch (o) {
3999
- return console.error("%cstorage", m.STORAGE, N.SLIDE, r, o), 400;
4017
+ return console.error("%cstorage", g.STORAGE, N.SLIDE, r, o), 400;
4000
4018
  }
4001
4019
  });
4002
4020
  this.options = r, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
@@ -4103,7 +4121,7 @@ function Ka(d) {
4103
4121
  {}
4104
4122
  );
4105
4123
  }
4106
- function Ja(d, r = "font-bold") {
4124
+ function Va(d, r = "font-bold") {
4107
4125
  return `${(d == null ? void 0 : d.title.length) > 0 ? `<div class="${r}">${d.title}</div>` : ""}${d != null && d.content ? d.content.replace(/\n\n/g, `
4108
4126
  `).replace(/\n/g, "<br/>") : ""}`;
4109
4127
  }
@@ -4153,7 +4171,7 @@ function Ga(d) {
4153
4171
  function Fn(d) {
4154
4172
  return Ba($r(0, d, "", []).toString(16), 8);
4155
4173
  }
4156
- function Va(d, r) {
4174
+ function Ja(d, r) {
4157
4175
  if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
4158
4176
  return d;
4159
4177
  const o = [
@@ -4198,10 +4216,10 @@ function qa(d) {
4198
4216
  function ei(d) {
4199
4217
  const r = window.BuzzCasting.getOptions().suspended ?? !1;
4200
4218
  return d.forEach((o) => {
4201
- var l, x, D, K, U;
4202
- if (r ? o.content = "License suspended, please contact your Sales Representative to restore service" : o.content = ((l = o.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", o.sender !== null ? ((((x = o.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = o.sender) == null ? void 0 : D.title) === null) && (o.sender.title = ""), ((K = o.sender) == null ? void 0 : K.name) !== "" && o.sender.title === "" && (o.sender.title = o.sender.name), ((U = o.sender) == null ? void 0 : U.name) !== "" && o.channel === "tw" && (o.sender.name = `@${o.sender.name}`)) : o.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, o.sender.title === "" && o.link !== "") {
4203
- const M = new URL(o.link);
4204
- o.sender.title = M.hostname.replace("www.", "");
4219
+ var l, x, D, K, L;
4220
+ if (r ? o.content = "License suspended, please contact your Sales Representative to restore service" : o.content = ((l = o.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", o.sender !== null ? ((((x = o.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = o.sender) == null ? void 0 : D.title) === null) && (o.sender.title = ""), ((K = o.sender) == null ? void 0 : K.name) !== "" && o.sender.title === "" && (o.sender.title = o.sender.name), ((L = o.sender) == null ? void 0 : L.name) !== "" && o.channel === "tw" && (o.sender.name = `@${o.sender.name}`)) : o.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, o.sender.title === "" && o.link !== "") {
4221
+ const P = new URL(o.link);
4222
+ o.sender.title = P.hostname.replace("www.", "");
4205
4223
  }
4206
4224
  }), d;
4207
4225
  }
@@ -4255,168 +4273,176 @@ class si {
4255
4273
  l.push(this.api.get(x));
4256
4274
  }), await Promise.allSettled(l).then(
4257
4275
  (x) => x.forEach(async (D) => {
4258
- let K, U = 400;
4276
+ let K, L = 400;
4259
4277
  if (D.status === "fulfilled") {
4260
- let M = D.value;
4278
+ let P = D.value;
4261
4279
  if (this.sm === null)
4262
4280
  return 400;
4263
- if (M.success === !0) {
4281
+ if (P.success === !0) {
4264
4282
  const X = this.sm.subscribers.filter(
4265
- (le) => le.widget === M.query.widget
4283
+ (le) => le.widget === P.query.widget
4266
4284
  )[0];
4267
4285
  let se = "", ee;
4268
- switch (M.query.type) {
4286
+ switch (P.query.type) {
4269
4287
  case N.MESSAGES:
4270
- if (ee = M.data.messages.filter(
4288
+ if (ee = P.data.messages.filter(
4271
4289
  (le) => le.id !== null
4272
- ), M.data.messages = ee, se = Fn(M.data.messages), X.hash === se)
4290
+ ), P.data.messages = ee, se = Fn(P.data.messages), X.hash === se)
4273
4291
  return console.info(
4274
4292
  "%capi%c %cno updates",
4275
- m.API,
4276
- m.NONE,
4277
- m.NO_UPDATES,
4293
+ g.API,
4294
+ g.NONE,
4295
+ g.NO_UPDATES,
4278
4296
  N.MESSAGES,
4279
- M.query.slide,
4280
- M.query.widget
4297
+ P.query.slide,
4298
+ P.query.widget
4281
4299
  ), console.debug(
4282
4300
  "%capi%c %cno updates",
4283
- m.API,
4284
- m.NONE,
4285
- m.NO_UPDATES,
4301
+ g.API,
4302
+ g.NONE,
4303
+ g.NO_UPDATES,
4286
4304
  N.MESSAGES,
4287
- M
4305
+ P
4288
4306
  ), 204;
4289
- K = M, X.hash = se, U = await this.sm.setMessages(M.query, M);
4307
+ K = P, X.hash = se, L = await this.sm.setMessages(P.query, P);
4290
4308
  break;
4291
4309
  case N.CLOUD:
4292
- se = Fn(M.data), X.hash === se ? (console.info(
4310
+ se = Fn(P.data), X.hash === se ? (console.info(
4293
4311
  "%capi%c %cno updates",
4294
- m.API,
4295
- m.NONE,
4296
- m.NO_UPDATES,
4312
+ g.API,
4313
+ g.NONE,
4314
+ g.NO_UPDATES,
4297
4315
  N.CLOUD,
4298
- M.query.slide,
4299
- M.query.widget
4316
+ P.query.slide,
4317
+ P.query.widget
4300
4318
  ), console.debug(
4301
4319
  "%capi%c %cno updates",
4302
- m.API,
4303
- m.NONE,
4304
- m.NO_UPDATES,
4320
+ g.API,
4321
+ g.NONE,
4322
+ g.NO_UPDATES,
4305
4323
  N.CLOUD,
4306
- M
4307
- ), U = 204) : (X.hash = se, K = {
4324
+ P
4325
+ ), L = 204) : (X.hash = se, K = {
4308
4326
  data: {
4309
- dashboard: M.query.dashboard,
4310
- cloud: M.data,
4311
- query: M.query,
4312
- slide: M.query.slide
4327
+ dashboard: P.query.dashboard,
4328
+ cloud: P.data,
4329
+ query: P.query,
4330
+ slide: P.query.slide
4313
4331
  },
4314
- query: M.query,
4315
- message: M.message,
4316
- success: M.success
4317
- }, U = await this.sm.setCloud(M.query, K.data.cloud));
4332
+ query: P.query,
4333
+ message: P.message,
4334
+ success: P.success
4335
+ }, L = await this.sm.setCloud(
4336
+ P.query,
4337
+ K.data.cloud
4338
+ ));
4318
4339
  break;
4319
4340
  case N.SERIES:
4320
- se = Fn(M.data), X.hash === se ? (console.info(
4341
+ se = Fn(P.data), X.hash === se ? (console.info(
4321
4342
  "%capi%c %cno updates",
4322
- m.API,
4323
- m.NONE,
4324
- m.NO_UPDATES,
4343
+ g.API,
4344
+ g.NONE,
4345
+ g.NO_UPDATES,
4325
4346
  N.SERIES,
4326
- M.query.slide,
4327
- M.query.widget
4347
+ P.query.slide,
4348
+ P.query.widget
4328
4349
  ), console.debug(
4329
4350
  "%capi%c %cno updates",
4330
- m.API,
4331
- m.NONE,
4332
- m.NO_UPDATES,
4351
+ g.API,
4352
+ g.NONE,
4353
+ g.NO_UPDATES,
4333
4354
  N.SERIES,
4334
- M
4335
- ), U = 204) : (X.hash = se, K = {
4355
+ P
4356
+ ), L = 204) : (X.hash = se, K = {
4336
4357
  data: {
4337
- dashboard: M.query.dashboard,
4338
- series: M.data,
4339
- query: M.query,
4340
- slide: M.query.slide
4358
+ dashboard: P.query.dashboard,
4359
+ series: P.data,
4360
+ query: P.query,
4361
+ slide: P.query.slide
4341
4362
  },
4342
- query: M.query,
4343
- message: M.message,
4344
- success: M.success
4345
- }, U = await this.sm.setSeries(M.query, K.data.series));
4363
+ query: P.query,
4364
+ message: P.message,
4365
+ success: P.success
4366
+ }, L = await this.sm.setSeries(
4367
+ P.query,
4368
+ K.data.series
4369
+ ));
4346
4370
  break;
4347
4371
  default:
4348
4372
  console.warn(
4349
4373
  "%capi%c %cstorage",
4350
- m.API,
4351
- m.NONE,
4352
- m.STORAGE,
4374
+ g.API,
4375
+ g.NONE,
4376
+ g.STORAGE,
4353
4377
  "error",
4354
- `data type ${M.query.type} unknown`
4378
+ `data type ${P.query.type} unknown`
4355
4379
  );
4356
4380
  }
4357
4381
  } else
4358
- U = 401;
4359
- switch (U) {
4382
+ L = 401;
4383
+ switch (L) {
4360
4384
  case 201:
4361
4385
  console.info(
4362
4386
  "%capp%c %cbroadcast",
4363
- m.API,
4364
- m.NONE,
4365
- m.BROADCAST,
4366
- M.query.slide,
4367
- M.data.title ?? M.query.widget
4387
+ g.API,
4388
+ g.NONE,
4389
+ g.BROADCAST,
4390
+ P.query.slide,
4391
+ P.data.title ?? P.query.widget
4368
4392
  ), console.debug(
4369
4393
  "%capp%c %cbroadcast",
4370
- m.API,
4371
- m.NONE,
4372
- m.BROADCAST,
4373
- M
4394
+ g.API,
4395
+ g.NONE,
4396
+ g.BROADCAST,
4397
+ P
4374
4398
  );
4375
4399
  const X = structuredClone(K.query);
4376
- switch (M.query.type) {
4400
+ switch (P.query.type) {
4377
4401
  case "messages":
4378
- M = await this.sm.getMessages(X);
4402
+ P = await this.sm.getMessages(X);
4379
4403
  break;
4380
4404
  case "cloud":
4381
- M = await this.sm.getCloud(X), M && (M.query = X);
4405
+ P = await this.sm.getCloud(X), P && (P.query = X);
4382
4406
  break;
4383
4407
  case "series":
4384
- M = await this.sm.getSeries(X), M && (M.query = X);
4408
+ P = await this.sm.getSeries(X), P && (P.query = X);
4385
4409
  break;
4386
4410
  default:
4387
4411
  console.warn(
4388
4412
  "%capp%c %cbroadcast",
4389
- m.API,
4390
- m.NONE,
4391
- m.BROADCAST,
4413
+ g.API,
4414
+ g.NONE,
4415
+ g.BROADCAST,
4392
4416
  "Unhandled data type",
4393
- M.query
4417
+ P.query
4394
4418
  );
4395
4419
  }
4396
- M && this.bc.postMessage({
4420
+ P && this.bc.postMessage({
4397
4421
  event: re.WIDGET_UPDATE,
4398
- data: M.data
4422
+ data: P.data
4399
4423
  });
4400
4424
  break;
4425
+ case 204:
4426
+ break;
4401
4427
  default:
4402
4428
  console.warn(
4403
4429
  "%capp%c %cbroadcast",
4404
- m.API,
4405
- m.NONE,
4406
- m.BROADCAST,
4430
+ g.API,
4431
+ g.NONE,
4432
+ g.BROADCAST,
4407
4433
  "Fetch error",
4408
- M.query.slide,
4409
- M.data.title ?? M.query.widget
4434
+ P.query.slide,
4435
+ P.data.title ?? P.query.widget
4410
4436
  );
4411
4437
  break;
4412
4438
  }
4413
- return U;
4439
+ return L;
4414
4440
  } else
4415
4441
  return console.warn(
4416
4442
  "%capi%c %cstorage",
4417
- m.API,
4418
- m.NONE,
4419
- m.STORAGE,
4443
+ g.API,
4444
+ g.NONE,
4445
+ g.STORAGE,
4420
4446
  re.ERROR,
4421
4447
  D.status
4422
4448
  ), 400;
@@ -4435,9 +4461,9 @@ class si {
4435
4461
  case re.UPDATE:
4436
4462
  console.debug(
4437
4463
  "%capi%c %cstorage",
4438
- m.API,
4439
- m.NONE,
4440
- m.STORAGE,
4464
+ g.API,
4465
+ g.NONE,
4466
+ g.STORAGE,
4441
4467
  re.UPDATE,
4442
4468
  r.data
4443
4469
  ), await this.update();
@@ -4449,9 +4475,9 @@ class si {
4449
4475
  if ((l = this.options) != null && l.suspended) {
4450
4476
  console.info(
4451
4477
  "%cstorage%c %cstorage",
4452
- m.STORAGE,
4453
- m.NONE,
4454
- m.MESSAGES,
4478
+ g.STORAGE,
4479
+ g.NONE,
4480
+ g.MESSAGES,
4455
4481
  "Account suspended"
4456
4482
  );
4457
4483
  return;
@@ -4461,9 +4487,9 @@ class si {
4461
4487
  ));
4462
4488
  console.info(
4463
4489
  "%cstorage%c %cstorage",
4464
- m.STORAGE,
4465
- m.NONE,
4466
- m.MESSAGES,
4490
+ g.STORAGE,
4491
+ g.NONE,
4492
+ g.MESSAGES,
4467
4493
  `${o} messages deleted`
4468
4494
  );
4469
4495
  });
@@ -4472,9 +4498,9 @@ class si {
4472
4498
  const o = await ((l = this.sm) == null ? void 0 : l.hideMessage(r.id, 0));
4473
4499
  return console.info(
4474
4500
  "%cstorage%c %cstorage",
4475
- m.STORAGE,
4476
- m.NONE,
4477
- m.HIDE,
4501
+ g.STORAGE,
4502
+ g.NONE,
4503
+ g.HIDE,
4478
4504
  `${o} messages hidden`
4479
4505
  ), await this.api.hideMessage(r);
4480
4506
  });
@@ -4492,9 +4518,9 @@ class si {
4492
4518
  });
4493
4519
  console.info(
4494
4520
  "%cstorage%c %cslide",
4495
- m.STORAGE,
4496
- m.NONE,
4497
- m.SLIDE,
4521
+ g.STORAGE,
4522
+ g.NONE,
4523
+ g.SLIDE,
4498
4524
  r.slide,
4499
4525
  re.VERSION,
4500
4526
  ka
@@ -4502,9 +4528,9 @@ class si {
4502
4528
  const o = (r == null ? void 0 : r.slide) || r.app;
4503
4529
  switch (this.bc = new BroadcastChannel(o), console.info(
4504
4530
  "%capi%c %cbroadcast",
4505
- m.API,
4506
- m.NONE,
4507
- m.BROADCAST,
4531
+ g.API,
4532
+ g.NONE,
4533
+ g.BROADCAST,
4508
4534
  re.CHANNEL,
4509
4535
  o
4510
4536
  ), this.bc.onmessage = (l) => {
@@ -4540,9 +4566,9 @@ class $a {
4540
4566
  var o;
4541
4567
  return r.type !== N.CLOUD ? (console.warn(
4542
4568
  "%capp%c %get",
4543
- m.APP,
4544
- m.NONE,
4545
- m.GET_DATA,
4569
+ g.APP,
4570
+ g.NONE,
4571
+ g.GET_DATA,
4546
4572
  r.widget,
4547
4573
  "wrong method call for getMessages, type used is",
4548
4574
  r.type
@@ -4561,9 +4587,9 @@ class $a {
4561
4587
  var o;
4562
4588
  return r.type !== N.MESSAGES ? (console.warn(
4563
4589
  "%capp%c %get",
4564
- m.APP,
4565
- m.NONE,
4566
- m.GET_DATA,
4590
+ g.APP,
4591
+ g.NONE,
4592
+ g.GET_DATA,
4567
4593
  r.widget,
4568
4594
  "wrong method call for getMessages, type used is",
4569
4595
  r.type
@@ -4582,9 +4608,9 @@ class $a {
4582
4608
  var o;
4583
4609
  return r.type !== N.SERIES ? (console.warn(
4584
4610
  "%capp%c %get",
4585
- m.APP,
4586
- m.NONE,
4587
- m.GET_DATA,
4611
+ g.APP,
4612
+ g.NONE,
4613
+ g.GET_DATA,
4588
4614
  r.widget,
4589
4615
  "wrong method call for getMessages, type used is",
4590
4616
  r.type
@@ -4654,9 +4680,9 @@ class oi {
4654
4680
  */
4655
4681
  k(this, "getCloud", async () => this.query.type !== N.CLOUD ? (console.warn(
4656
4682
  "%cstorage%c %cwidget",
4657
- m.STORAGE,
4658
- m.NONE,
4659
- m.WIDGET,
4683
+ g.STORAGE,
4684
+ g.NONE,
4685
+ g.WIDGET,
4660
4686
  this.query.widget,
4661
4687
  "Wrong method call for getCloud, expected type is",
4662
4688
  this.query.type
@@ -4672,9 +4698,9 @@ class oi {
4672
4698
  */
4673
4699
  k(this, "getMessages", async () => this.query.type !== N.MESSAGES ? (console.warn(
4674
4700
  "%cstorage%c %cwidget",
4675
- m.STORAGE,
4676
- m.NONE,
4677
- m.WIDGET,
4701
+ g.STORAGE,
4702
+ g.NONE,
4703
+ g.WIDGET,
4678
4704
  this.query.widget,
4679
4705
  "Wrong method call for getMessages, expected type is",
4680
4706
  this.query.type
@@ -4684,9 +4710,9 @@ class oi {
4684
4710
  success: !1
4685
4711
  }) : (console.debug(
4686
4712
  "%cstorage%c %cwidget",
4687
- m.API,
4688
- m.NONE,
4689
- m.MESSAGES,
4713
+ g.API,
4714
+ g.NONE,
4715
+ g.MESSAGES,
4690
4716
  this.query
4691
4717
  ), await this.storageReader.getMessages(this.query)));
4692
4718
  /**
@@ -4696,9 +4722,9 @@ class oi {
4696
4722
  */
4697
4723
  k(this, "getSeries", async () => this.query.type !== N.SERIES ? (console.warn(
4698
4724
  "%cstorage%c %cwidget",
4699
- m.STORAGE,
4700
- m.NONE,
4701
- m.WIDGET,
4725
+ g.STORAGE,
4726
+ g.NONE,
4727
+ g.WIDGET,
4702
4728
  this.query.widget,
4703
4729
  "Wrong method call for getSeries, expected type is",
4704
4730
  this.query.type
@@ -4716,7 +4742,7 @@ class oi {
4716
4742
  k(this, "showModal", (r) => {
4717
4743
  console.debug(
4718
4744
  "%cwidget",
4719
- m.WIDGET,
4745
+ g.WIDGET,
4720
4746
  re.SHOW_MODAL,
4721
4747
  r.showComponent,
4722
4748
  // @ts-ignore
@@ -4772,16 +4798,16 @@ class oi {
4772
4798
  subscribe() {
4773
4799
  console.info(
4774
4800
  "%cwidget%c %csubscribe",
4775
- m.WIDGET,
4776
- m.NONE,
4777
- m.SUBSCRIBE,
4801
+ g.WIDGET,
4802
+ g.NONE,
4803
+ g.SUBSCRIBE,
4778
4804
  this.query.slide,
4779
4805
  this.query.widget
4780
4806
  ), console.debug(
4781
4807
  "%cwidget%c %csubscribe",
4782
- m.WIDGET,
4783
- m.NONE,
4784
- m.SUBSCRIBE,
4808
+ g.WIDGET,
4809
+ g.NONE,
4810
+ g.SUBSCRIBE,
4785
4811
  this.query
4786
4812
  ), this.broadcastChannel.postMessage({
4787
4813
  event: re.SUBSCRIBE,
@@ -4796,7 +4822,7 @@ export {
4796
4822
  N as API,
4797
4823
  si as BuzzcastingStorageManager,
4798
4824
  $a as BuzzcastingStorageReader,
4799
- m as CSS,
4825
+ g as CSS,
4800
4826
  re as EVENTS,
4801
4827
  Zt as MODERATION,
4802
4828
  ye as STORAGE,
@@ -4811,9 +4837,9 @@ export {
4811
4837
  Na as clearContents,
4812
4838
  Ka as deepMerge,
4813
4839
  za as filterAttributes,
4814
- Ja as formatContent,
4840
+ Va as formatContent,
4815
4841
  Fn as hashSum,
4816
- Va as intToString,
4842
+ Ja as intToString,
4817
4843
  Za as numberFormatter,
4818
4844
  ai as randomValue,
4819
4845
  qa as rtl,