buzzcasting-storage 3.6.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  var Aa = Object.defineProperty;
2
2
  var Pa = (d, n, s) => n in d ? Aa(d, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[n] = s;
3
3
  var _ = (d, n, s) => Pa(d, typeof n != "symbol" ? n + "" : n, s);
4
- var D = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(D || {}), l = /* @__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:navy;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))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", 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.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", 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.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), Vt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Vt || {}), me = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(me || {});
5
- const Da = "3.5.8";
4
+ var D = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(D || {}), l = /* @__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:navy;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))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", 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.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", 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.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), Vt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Vt || {}), ge = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ge || {});
5
+ const Da = "3.6.1";
6
6
  class xa {
7
7
  constructor(n) {
8
8
  _(this, "options");
@@ -34,7 +34,7 @@ class xa {
34
34
  async get(n) {
35
35
  const { version: s } = this.options, u = this.headers(), S = Object.assign({}, n);
36
36
  delete S.slide, delete S.type, delete S.hash, delete S.order, delete S.period;
37
- const k = Object.keys(S).length > 0 ? `?${new URLSearchParams(S).toString()}` : "";
37
+ const x = Object.keys(S).length > 0 ? `?${new URLSearchParams(S).toString()}` : "";
38
38
  return console.info(
39
39
  "%capi%c %cfetch",
40
40
  l.API,
@@ -42,7 +42,7 @@ class xa {
42
42
  l.GET_DATA,
43
43
  n.widget
44
44
  ), console.debug("%capi%c %cfetch", l.API, l.NONE, l.GET_DATA, S), await fetch(
45
- [this.url, "api", s, n.type].join("/") + k,
45
+ [this.url, "api", s, n.type].join("/") + x,
46
46
  { ...u, method: "get" }
47
47
  ).then(async (M) => {
48
48
  if (!M.ok)
@@ -63,16 +63,16 @@ class xa {
63
63
  ), await fetch(
64
64
  [this.url, "api", s, "messages", n.id].join("/") + S,
65
65
  { ...u, method: "put" }
66
- ).then((k) => {
67
- if (!k.ok)
68
- throw new Error(k.statusText);
69
- return k;
70
- }).then((k) => k.json()).catch((k) => ({ succes: !1, message: k, data: [] }));
66
+ ).then((x) => {
67
+ if (!x.ok)
68
+ throw new Error(x.statusText);
69
+ return x;
70
+ }).then((x) => x.json()).catch((x) => ({ succes: !1, message: x, data: [] }));
71
71
  }
72
72
  async hideLabels(n) {
73
- const { version: s } = this.options, u = this.formHeaders(), S = new URLSearchParams(), k = n.labels || [];
74
- for (const [M, F] of k.entries())
75
- S.append(`custom_filters[${M}]`, F);
73
+ const { version: s } = this.options, u = this.formHeaders(), S = new URLSearchParams(), x = n.labels || [];
74
+ for (const [M, R] of x.entries())
75
+ S.append(`custom_filters[${M}]`, R);
76
76
  return console.info(
77
77
  "%capi%c %cput",
78
78
  l.API,
@@ -80,7 +80,7 @@ class xa {
80
80
  l.GET_DATA,
81
81
  q.HIDE_LABELS,
82
82
  n.widget,
83
- k
83
+ x
84
84
  ), await fetch(
85
85
  [this.url, "api", s, n.type, n.widget].join("/"),
86
86
  { ...u, body: S, method: "put" }
@@ -101,11 +101,11 @@ class xa {
101
101
  ), await fetch(
102
102
  [this.url, "api", s, "slides", n.id].join("/"),
103
103
  { ...u, method: "get" }
104
- ).then(async (k) => {
105
- if (!k.ok)
106
- throw new Error(`${k.status}`);
107
- return k;
108
- }).then((k) => k.json()).then((k) => (k.query = n, k)).catch((k) => ({ success: !1, message: `${k}`, data: null }));
104
+ ).then(async (x) => {
105
+ if (!x.ok)
106
+ throw new Error(`${x.status}`);
107
+ return x;
108
+ }).then((x) => x.json()).then((x) => (x.query = n, x)).catch((x) => ({ success: !1, message: `${x}`, data: null }));
109
109
  }
110
110
  /**
111
111
  * Store slide definition
@@ -128,11 +128,11 @@ class xa {
128
128
  ), await fetch(
129
129
  [this.url, "api", s, "slides", n.id].join("/"),
130
130
  { ...u, body: S, method: "put" }
131
- ).then((k) => {
132
- if (!k.ok)
133
- throw new Error(k.statusText);
134
- return k;
135
- }).then((k) => k.json()).catch((k) => ({ succes: !1, message: k, data: [] }));
131
+ ).then((x) => {
132
+ if (!x.ok)
133
+ throw new Error(x.statusText);
134
+ return x;
135
+ }).then((x) => x.json()).catch((x) => ({ succes: !1, message: x, data: [] }));
136
136
  }
137
137
  async loadPresentation(n) {
138
138
  const { version: s } = this.options, u = this.headers();
@@ -165,11 +165,11 @@ class xa {
165
165
  return console.info("%capi%c %cput", l.API, l.NONE, l.SLIDE, n.name), await fetch(
166
166
  [this.url, "api", s, D.PRESENTATIONS, n.id].join("/"),
167
167
  { ...u, body: S, method: "put" }
168
- ).then((k) => {
169
- if (!k.ok)
170
- throw new Error(k.statusText);
171
- return k;
172
- }).then((k) => k.json()).catch((k) => ({ succes: !1, message: k, data: [] }));
168
+ ).then((x) => {
169
+ if (!x.ok)
170
+ throw new Error(x.statusText);
171
+ return x;
172
+ }).then((x) => x.json()).catch((x) => ({ succes: !1, message: x, data: [] }));
173
173
  }
174
174
  async loadPreference(n) {
175
175
  const { version: s } = this.options, u = this.headers();
@@ -201,11 +201,11 @@ class xa {
201
201
  ), await fetch(
202
202
  [this.url, "api", s, D.PREFERENCES, n.id].join("/"),
203
203
  { ...u, body: S, method: "put" }
204
- ).then((k) => {
205
- if (!k.ok)
206
- throw new Error(k.statusText);
207
- return k;
208
- }).then((k) => k.json()).catch((k) => ({ succes: !1, message: k, data: [] }));
204
+ ).then((x) => {
205
+ if (!x.ok)
206
+ throw new Error(x.statusText);
207
+ return x;
208
+ }).then((x) => x.json()).catch((x) => ({ succes: !1, message: x, data: [] }));
209
209
  }
210
210
  async loadWidget(n) {
211
211
  const { version: s } = this.options, u = this.headers();
@@ -251,29 +251,29 @@ function Ta() {
251
251
  for (var a, i = 0, o = t.length; i < o; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
252
252
  return e.concat(a || Array.prototype.slice.call(t));
253
253
  }
254
- var k = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ka, M = Object.keys, F = Array.isArray;
255
- function j(e, t) {
254
+ var x = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ka, M = Object.keys, R = Array.isArray;
255
+ function W(e, t) {
256
256
  return typeof t != "object" || M(t).forEach(function(r) {
257
257
  e[r] = t[r];
258
258
  }), e;
259
259
  }
260
- typeof Promise > "u" || k.Promise || (k.Promise = Promise);
261
- var J = Object.getPrototypeOf, ie = {}.hasOwnProperty;
260
+ typeof Promise > "u" || x.Promise || (x.Promise = Promise);
261
+ var Z = Object.getPrototypeOf, ve = {}.hasOwnProperty;
262
262
  function te(e, t) {
263
- return ie.call(e, t);
263
+ return ve.call(e, t);
264
264
  }
265
- function le(e, t) {
266
- typeof t == "function" && (t = t(J(e))), (typeof Reflect > "u" ? M : Reflect.ownKeys)(t).forEach(function(r) {
265
+ function pe(e, t) {
266
+ typeof t == "function" && (t = t(Z(e))), (typeof Reflect > "u" ? M : Reflect.ownKeys)(t).forEach(function(r) {
267
267
  Ae(e, r, t[r]);
268
268
  });
269
269
  }
270
- var Qe = Object.defineProperty;
270
+ var Xe = Object.defineProperty;
271
271
  function Ae(e, t, r, a) {
272
- Qe(e, t, j(r && te(r, "get") && typeof r.get == "function" ? { get: r.get, set: r.set, configurable: !0 } : { value: r, configurable: !0, writable: !0 }, a));
272
+ Xe(e, t, W(r && te(r, "get") && typeof r.get == "function" ? { get: r.get, set: r.set, configurable: !0 } : { value: r, configurable: !0, writable: !0 }, a));
273
273
  }
274
- function Xe(e) {
274
+ function Je(e) {
275
275
  return { from: function(t) {
276
- return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend: le.bind(null, e.prototype) };
276
+ return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend: pe.bind(null, e.prototype) };
277
277
  } };
278
278
  }
279
279
  var Fr = Object.getOwnPropertyDescriptor, Wr = [].slice;
@@ -287,7 +287,7 @@ function Ta() {
287
287
  if (!e) throw new Error("Assertion Failed");
288
288
  }
289
289
  function Yn(e) {
290
- k.setImmediate ? setImmediate(e) : setTimeout(e, 0);
290
+ x.setImmediate ? setImmediate(e) : setTimeout(e, 0);
291
291
  }
292
292
  function we(e, t) {
293
293
  if (typeof t == "string" && te(e, t)) return e[t];
@@ -305,44 +305,44 @@ function Ta() {
305
305
  return f == null ? void 0 : we(f, t.substr(c + 1));
306
306
  }
307
307
  }
308
- function fe(e, t, r) {
308
+ function le(e, t, r) {
309
309
  if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
310
310
  it(typeof r != "string" && "length" in r);
311
- for (var a = 0, i = t.length; a < i; ++a) fe(e, t[a], r[a]);
311
+ for (var a = 0, i = t.length; a < i; ++a) le(e, t[a], r[a]);
312
312
  } else {
313
313
  var o, c, f = t.indexOf(".");
314
- f !== -1 ? (o = t.substr(0, f), (c = t.substr(f + 1)) === "" ? r === void 0 ? F(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : fe(f = !(f = e[o]) || !te(e, o) ? e[o] = {} : f, c, r)) : r === void 0 ? F(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = r;
314
+ f !== -1 ? (o = t.substr(0, f), (c = t.substr(f + 1)) === "" ? r === void 0 ? R(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = r : le(f = !(f = e[o]) || !te(e, o) ? e[o] = {} : f, c, r)) : r === void 0 ? R(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = r;
315
315
  }
316
316
  }
317
- function Qn(e) {
317
+ function Xn(e) {
318
318
  var t, r = {};
319
319
  for (t in e) te(e, t) && (r[t] = e[t]);
320
320
  return r;
321
321
  }
322
322
  var Ur = [].concat;
323
- function Xn(e) {
323
+ function Jn(e) {
324
324
  return Ur.apply([], e);
325
325
  }
326
- var Be = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Xn([8, 16, 32, 64].map(function(e) {
326
+ var Be = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Jn([8, 16, 32, 64].map(function(e) {
327
327
  return ["Int", "Uint", "Float"].map(function(t) {
328
328
  return t + e + "Array";
329
329
  });
330
330
  }))).filter(function(e) {
331
- return k[e];
332
- }), Jn = new Set(Be.map(function(e) {
333
- return k[e];
331
+ return x[e];
332
+ }), Qn = new Set(Be.map(function(e) {
333
+ return x[e];
334
334
  })), ot = null;
335
335
  function Ne(e) {
336
336
  return ot = /* @__PURE__ */ new WeakMap(), e = function t(r) {
337
337
  if (!r || typeof r != "object") return r;
338
338
  var a = ot.get(r);
339
339
  if (a) return a;
340
- if (F(r)) {
340
+ if (R(r)) {
341
341
  a = [], ot.set(r, a);
342
342
  for (var i = 0, o = r.length; i < o; ++i) a.push(t(r[i]));
343
- } else if (Jn.has(r.constructor)) a = r;
343
+ } else if (Qn.has(r.constructor)) a = r;
344
344
  else {
345
- var c, f = J(r);
345
+ var c, f = Z(r);
346
346
  for (c in a = f === Object.prototype ? {} : Object.create(f), ot.set(r, a), r) te(r, c) && (a[c] = t(r[c]));
347
347
  }
348
348
  return a;
@@ -361,12 +361,12 @@ function Ta() {
361
361
  function Me(e, t) {
362
362
  return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
363
363
  }
364
- var Je = {};
364
+ var Qe = {};
365
365
  function Ee(e) {
366
366
  var t, r, a, i;
367
367
  if (arguments.length === 1) {
368
- if (F(e)) return e.slice();
369
- if (this === Je && typeof e == "string") return [e];
368
+ if (R(e)) return e.slice();
369
+ if (this === Qe && typeof e == "string") return [e];
370
370
  if (i = Hr(e)) {
371
371
  for (r = []; !(a = i.next()).done; ) r.push(a.value);
372
372
  return r;
@@ -383,7 +383,7 @@ function Ta() {
383
383
  return e[Symbol.toStringTag] === "AsyncFunction";
384
384
  } : function() {
385
385
  return !1;
386
- }, lt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], ge = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(lt), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
386
+ }, lt = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], he = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(lt), Yr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
387
387
  function Ze(e, t) {
388
388
  this.name = e, this.message = t;
389
389
  }
@@ -403,31 +403,31 @@ function Ta() {
403
403
  return t[r];
404
404
  }), this.failuresByPos = t, this.message = Zn(e, this.failures);
405
405
  }
406
- Xe(Ze).from(Error).extend({ toString: function() {
406
+ Je(Ze).from(Error).extend({ toString: function() {
407
407
  return this.name + ": " + this.message;
408
- } }), Xe(Ot).from(Ze), Xe(Ve).from(Ze);
409
- var an = ge.reduce(function(e, t) {
408
+ } }), Je(Ot).from(Ze), Je(Ve).from(Ze);
409
+ var an = he.reduce(function(e, t) {
410
410
  return e[t] = t + "Error", e;
411
- }, {}), Qr = Ze, G = ge.reduce(function(e, t) {
411
+ }, {}), Xr = Ze, G = he.reduce(function(e, t) {
412
412
  var r = t + "Error";
413
413
  function a(i, o) {
414
414
  this.name = r, i ? typeof i == "string" ? (this.message = "".concat(i).concat(o ? `
415
415
  ` + o : ""), this.inner = o || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message = Yr[t] || r, this.inner = null);
416
416
  }
417
- return Xe(a).from(Qr), e[t] = a, e;
417
+ return Je(a).from(Xr), e[t] = a, e;
418
418
  }, {});
419
419
  G.Syntax = SyntaxError, G.Type = TypeError, G.Range = RangeError;
420
420
  var Vn = lt.reduce(function(e, t) {
421
421
  return e[t + "Error"] = G[t], e;
422
- }, {}), At = ge.reduce(function(e, t) {
422
+ }, {}), At = he.reduce(function(e, t) {
423
423
  return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = G[t]), e;
424
424
  }, {});
425
- function Z() {
425
+ function Q() {
426
426
  }
427
427
  function ct(e) {
428
428
  return e;
429
429
  }
430
- function Xr(e, t) {
430
+ function Jr(e, t) {
431
431
  return e == null || e === ct ? t : function(r) {
432
432
  return t(e(r));
433
433
  };
@@ -437,8 +437,8 @@ function Ta() {
437
437
  e.apply(this, arguments), t.apply(this, arguments);
438
438
  };
439
439
  }
440
- function Jr(e, t) {
441
- return e === Z ? t : function() {
440
+ function Qr(e, t) {
441
+ return e === Q ? t : function() {
442
442
  var r = e.apply(this, arguments);
443
443
  r !== void 0 && (arguments[0] = r);
444
444
  var a = this.onsuccess, i = this.onerror;
@@ -448,27 +448,27 @@ function Ta() {
448
448
  };
449
449
  }
450
450
  function Zr(e, t) {
451
- return e === Z ? t : function() {
451
+ return e === Q ? t : function() {
452
452
  e.apply(this, arguments);
453
453
  var r = this.onsuccess, a = this.onerror;
454
454
  this.onsuccess = this.onerror = null, t.apply(this, arguments), r && (this.onsuccess = this.onsuccess ? je(r, this.onsuccess) : r), a && (this.onerror = this.onerror ? je(a, this.onerror) : a);
455
455
  };
456
456
  }
457
457
  function Vr(e, t) {
458
- return e === Z ? t : function(r) {
458
+ return e === Q ? t : function(r) {
459
459
  var a = e.apply(this, arguments);
460
- j(r, a);
460
+ W(r, a);
461
461
  var i = this.onsuccess, o = this.onerror;
462
- return this.onsuccess = null, this.onerror = null, r = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? je(o, this.onerror) : o), a === void 0 ? r === void 0 ? void 0 : r : j(a, r);
462
+ return this.onsuccess = null, this.onerror = null, r = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), o && (this.onerror = this.onerror ? je(o, this.onerror) : o), a === void 0 ? r === void 0 ? void 0 : r : W(a, r);
463
463
  };
464
464
  }
465
465
  function qr(e, t) {
466
- return e === Z ? t : function() {
466
+ return e === Q ? t : function() {
467
467
  return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
468
468
  };
469
469
  }
470
470
  function sn(e, t) {
471
- return e === Z ? t : function() {
471
+ return e === Q ? t : function() {
472
472
  var r = e.apply(this, arguments);
473
473
  if (r && typeof r.then == "function") {
474
474
  for (var a = this, i = arguments.length, o = new Array(i); i--; ) o[i] = arguments[i];
@@ -480,18 +480,18 @@ function Ta() {
480
480
  };
481
481
  }
482
482
  At.ModifyError = Ot, At.DexieError = Ze, At.BulkError = Ve;
483
- var be = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
483
+ var me = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
484
484
  function qn(e) {
485
- be = e;
485
+ me = e;
486
486
  }
487
487
  var ut = {}, er = 100, Be = typeof Promise > "u" ? [] : function() {
488
488
  var e = Promise.resolve();
489
- if (typeof crypto > "u" || !crypto.subtle) return [e, J(e), e];
489
+ if (typeof crypto > "u" || !crypto.subtle) return [e, Z(e), e];
490
490
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
491
- return [t, J(t), e];
492
- }(), lt = Be[0], ge = Be[1], Be = Be[2], ge = ge && ge.then, Ke = lt && lt.constructor, on = !!Be, dt = function(e, t) {
491
+ return [t, Z(t), e];
492
+ }(), lt = Be[0], he = Be[1], Be = Be[2], he = he && he.then, Ke = lt && lt.constructor, on = !!Be, dt = function(e, t) {
493
493
  ft.push([e, t]), Pt && (queueMicrotask(ta), Pt = !1);
494
- }, cn = !0, Pt = !0, Le = [], Dt = [], un = ct, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Z, pgp: !1, env: {}, finalize: Z }, L = Pe, ft = [], Ge = 0, xt = [];
494
+ }, cn = !0, Pt = !0, Le = [], Dt = [], un = ct, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, L = Pe, ft = [], Ge = 0, xt = [];
495
495
  function B(e) {
496
496
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
497
497
  this._listeners = [], this._lib = !1;
@@ -558,7 +558,7 @@ function Ta() {
558
558
  function ea(e, t, r) {
559
559
  try {
560
560
  var a, i = t._value;
561
- !t._state && Dt.length && (Dt = []), a = be && t._consoleTask ? t._consoleTask.run(function() {
561
+ !t._state && Dt.length && (Dt = []), a = me && t._consoleTask ? t._consoleTask.run(function() {
562
562
  return e(i);
563
563
  }) : e(i), t._state || Dt.indexOf(i) !== -1 || function(o) {
564
564
  for (var c = Le.length; c; ) if (Le[--c]._value === o._value) return Le.splice(c, 1);
@@ -611,7 +611,7 @@ function Ta() {
611
611
  }
612
612
  };
613
613
  }
614
- le(B.prototype, { then: ln, _then: function(e, t) {
614
+ pe(B.prototype, { then: ln, _then: function(e, t) {
615
615
  fn(this, new tr(null, null, e, t, L));
616
616
  }, catch: function(e) {
617
617
  if (arguments.length === 1) return this.then(null, e);
@@ -639,7 +639,7 @@ function Ta() {
639
639
  }, e);
640
640
  r.then(a, i).finally(clearTimeout.bind(null, o));
641
641
  }) : this;
642
- } }), typeof Symbol < "u" && Symbol.toStringTag && Ae(B.prototype, Symbol.toStringTag, "Dexie.Promise"), Pe.env = rr(), le(B, { all: function() {
642
+ } }), typeof Symbol < "u" && Symbol.toStringTag && Ae(B.prototype, Symbol.toStringTag, "Dexie.Promise"), Pe.env = rr(), pe(B, { all: function() {
643
643
  var e = Ee.apply(null, arguments).map(Ct);
644
644
  return new B(function(t, r) {
645
645
  e.length === 0 && t([]);
@@ -723,7 +723,7 @@ function Ta() {
723
723
  var ae = { awaits: 0, echoes: 0, id: 0 }, na = 0, Rt = [], It = 0, Tt = 0, ra = 0;
724
724
  function De(e, t, r, a) {
725
725
  var i = L, o = Object.create(i);
726
- return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Pe.env, o.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 && j(o, t), ++i.ref, o.finalize = function() {
726
+ return o.parent = i, o.ref = 0, o.global = !1, o.id = ++ra, Pe.env, o.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 && W(o, t), ++i.ref, o.finalize = function() {
727
727
  --this.parent.ref || this.parent.finalize();
728
728
  }, a = Fe(o, e, r, a), o.ref === 0 && o.finalize(), a;
729
729
  }
@@ -748,11 +748,11 @@ function Ta() {
748
748
  var r, a = L;
749
749
  (t ? !ae.echoes || It++ && e === L : !It || --It && e === L) || queueMicrotask(t ? (function(i) {
750
750
  ++Tt, ae.echoes && --ae.echoes != 0 || (ae.echoes = ae.awaits = ae.id = 0), Rt.push(L), ke(i, !0);
751
- }).bind(null, e) : aa), e !== L && (L = e, a === Pe && (Pe.env = rr()), on && (r = Pe.env.Promise, t = e.env, (a.global || e.global) && (Object.defineProperty(k, "Promise", t.PromiseProp), r.all = t.all, r.race = t.race, r.resolve = t.resolve, r.reject = t.reject, t.allSettled && (r.allSettled = t.allSettled), t.any && (r.any = t.any))));
751
+ }).bind(null, e) : aa), e !== L && (L = e, a === Pe && (Pe.env = rr()), on && (r = Pe.env.Promise, t = e.env, (a.global || e.global) && (Object.defineProperty(x, "Promise", t.PromiseProp), r.all = t.all, r.race = t.race, r.resolve = t.resolve, r.reject = t.reject, t.allSettled && (r.allSettled = t.allSettled), t.any && (r.any = t.any))));
752
752
  }
753
753
  function rr() {
754
- var e = k.Promise;
755
- return on ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(k, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
754
+ var e = x.Promise;
755
+ return on ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(x, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
756
756
  }
757
757
  function Fe(e, t, r, a, i) {
758
758
  var o = L;
@@ -776,7 +776,7 @@ function Ta() {
776
776
  function pn(e) {
777
777
  Promise === Ke && ae.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
778
778
  }
779
- ("" + ge).indexOf("[native code]") === -1 && (tt = xe = Z);
779
+ ("" + he).indexOf("[native code]") === -1 && (tt = xe = Q);
780
780
  var ne = B.reject, We = "￿", Se = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", sr = "String expected.", nt = [], $t = "__dbnames", gn = "readonly", mn = "readwrite";
781
781
  function Ue(e, t) {
782
782
  return e ? t ? function() {
@@ -829,7 +829,7 @@ function Ta() {
829
829
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
830
830
  }
831
831
  var lr = (V.prototype._trans = function(e, t, r) {
832
- var a = this._tx || L.trans, i = this.name, o = be && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
832
+ var a = this._tx || L.trans, i = this.name, o = me && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
833
833
  function c(m, v, h) {
834
834
  if (!h.schema[i]) throw new G.NotFound("Table " + i + " not part of transaction");
835
835
  return t(h.idbtrans, h);
@@ -865,7 +865,7 @@ function Ta() {
865
865
  if (v._state.openComplete) return ne(new G.DatabaseClosed(v._state.dbOpenError));
866
866
  if (!v._state.isBeingOpened) {
867
867
  if (!v._state.autoOpen) return ne(new G.DatabaseClosed());
868
- v.open().catch(Z);
868
+ v.open().catch(Q);
869
869
  }
870
870
  return v._state.dbReadyPromise.then(function() {
871
871
  return m(v, h, E, g);
@@ -886,7 +886,7 @@ function Ta() {
886
886
  }).then(t);
887
887
  }, V.prototype.where = function(e) {
888
888
  if (typeof e == "string") return new this.db.WhereClause(this, e);
889
- if (F(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
889
+ if (R(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
890
890
  var t = M(e);
891
891
  if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
892
892
  var r = this.schema.indexes.concat(this.schema.primKey).filter(function(f) {
@@ -906,7 +906,7 @@ function Ta() {
906
906
  return e[p];
907
907
  }));
908
908
  }
909
- !r && be && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
909
+ !r && me && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
910
910
  var a = this.schema.idxByName;
911
911
  function i(f, p) {
912
912
  return Y(f, p) === 0;
@@ -914,7 +914,7 @@ function Ta() {
914
914
  var c = t.reduce(function(h, p) {
915
915
  var m = h[0], v = h[1], h = a[p], E = e[p];
916
916
  return [m || h, m || !h ? Ue(v, h && h.multi ? function(g) {
917
- return g = we(g, p), F(g) && g.some(function(y) {
917
+ return g = we(g, p), R(g) && g.some(function(y) {
918
918
  return i(E, y);
919
919
  });
920
920
  } : function(g) {
@@ -937,7 +937,7 @@ function Ta() {
937
937
  }, V.prototype.toCollection = function() {
938
938
  return new this.db.Collection(new this.db.WhereClause(this));
939
939
  }, V.prototype.orderBy = function(e) {
940
- return new this.db.Collection(new this.db.WhereClause(this, F(e) ? "[".concat(e.join("+"), "]") : e));
940
+ return new this.db.Collection(new this.db.WhereClause(this, R(e) ? "[".concat(e.join("+"), "]") : e));
941
941
  }, V.prototype.reverse = function() {
942
942
  return this.toCollection().reverse();
943
943
  }, V.prototype.mapToClass = function(e) {
@@ -956,7 +956,7 @@ function Ta() {
956
956
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
957
957
  return a;
958
958
  }, e = i);
959
- for (var o = /* @__PURE__ */ new Set(), c = e.prototype; c; c = J(c)) Object.getOwnPropertyNames(c).forEach(function(p) {
959
+ for (var o = /* @__PURE__ */ new Set(), c = e.prototype; c; c = Z(c)) Object.getOwnPropertyNames(c).forEach(function(p) {
960
960
  return o.add(p);
961
961
  });
962
962
  function f(p) {
@@ -971,7 +971,7 @@ function Ta() {
971
971
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = f, this.hook("reading", f), e;
972
972
  }, V.prototype.defineClass = function() {
973
973
  return this.mapToClass(function(e) {
974
- j(this, e);
974
+ W(this, e);
975
975
  });
976
976
  }, V.prototype.add = function(e, t) {
977
977
  var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, c = e;
@@ -981,13 +981,13 @@ function Ta() {
981
981
  return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
982
982
  }).then(function(f) {
983
983
  if (o) try {
984
- fe(e, o, f);
984
+ le(e, o, f);
985
985
  } catch {
986
986
  }
987
987
  return f;
988
988
  });
989
989
  }, V.prototype.update = function(e, t) {
990
- return typeof e != "object" || F(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? ne(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
990
+ return typeof e != "object" || R(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? ne(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
991
991
  }, V.prototype.put = function(e, t) {
992
992
  var r = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, c = e;
993
993
  return o && i && (c = Nt(o)(e)), this._trans("readwrite", function(f) {
@@ -996,7 +996,7 @@ function Ta() {
996
996
  return f.numFailures ? B.reject(f.failures[0]) : f.lastResult;
997
997
  }).then(function(f) {
998
998
  if (o) try {
999
- fe(e, o, f);
999
+ le(e, o, f);
1000
1000
  } catch {
1001
1001
  }
1002
1002
  return f;
@@ -1066,7 +1066,7 @@ function Ta() {
1066
1066
  var A = O[b], P = y[A];
1067
1067
  if (A === t.schema.primKey.keyPath) {
1068
1068
  if (Y(P, g) !== 0) throw new G.Constraint("Cannot update primary key in bulkUpdate()");
1069
- } else fe(w, A, P);
1069
+ } else le(w, A, P);
1070
1070
  }
1071
1071
  o.push(E), p.push(g), m.push(w);
1072
1072
  }
@@ -1111,7 +1111,7 @@ function Ta() {
1111
1111
  if (typeof c != "object") {
1112
1112
  var m;
1113
1113
  f = f || qr;
1114
- var v = { subscribers: [], fire: p = p || Z, subscribe: function(h) {
1114
+ var v = { subscribers: [], fire: p = p || Q, subscribe: function(h) {
1115
1115
  v.subscribers.indexOf(h) === -1 && (v.subscribers.push(h), v.fire = f(v.fire, h));
1116
1116
  }, unsubscribe: function(h) {
1117
1117
  v.subscribers = v.subscribers.filter(function(E) {
@@ -1122,7 +1122,7 @@ function Ta() {
1122
1122
  }
1123
1123
  M(m = c).forEach(function(h) {
1124
1124
  var E = m[h];
1125
- if (F(E)) o(h, m[h][0], m[h][1]);
1125
+ if (R(E)) o(h, m[h][0], m[h][1]);
1126
1126
  else {
1127
1127
  if (E !== "asap") throw new G.InvalidArgument("Invalid event config");
1128
1128
  var g = o(h, ct, function() {
@@ -1138,7 +1138,7 @@ function Ta() {
1138
1138
  }
1139
1139
  }
1140
1140
  function pt(e, t) {
1141
- return Xe(t).from({ prototype: e }), t;
1141
+ return Je(t).from({ prototype: e }), t;
1142
1142
  }
1143
1143
  function rt(e, t) {
1144
1144
  return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter);
@@ -1189,9 +1189,9 @@ function Ta() {
1189
1189
  t && !t(o, function(f) {
1190
1190
  return c = f;
1191
1191
  }, function(f) {
1192
- o.stop(f), c = Z;
1192
+ o.stop(f), c = Q;
1193
1193
  }, function(f) {
1194
- o.fail(f), c = Z;
1194
+ o.fail(f), c = Q;
1195
1195
  }) || i(o.value, o, function(f) {
1196
1196
  return c = f;
1197
1197
  }), c();
@@ -1202,7 +1202,7 @@ function Ta() {
1202
1202
  var t = this["@@propmod"];
1203
1203
  if (t.add !== void 0) {
1204
1204
  var r = t.add;
1205
- if (F(r)) return S(S([], F(e) ? e : [], !0), r).sort();
1205
+ if (R(r)) return S(S([], R(e) ? e : [], !0), r).sort();
1206
1206
  if (typeof r == "number") return (Number(e) || 0) + r;
1207
1207
  if (typeof r == "bigint") try {
1208
1208
  return BigInt(e) + r;
@@ -1213,7 +1213,7 @@ function Ta() {
1213
1213
  }
1214
1214
  if (t.remove !== void 0) {
1215
1215
  var a = t.remove;
1216
- if (F(a)) return F(e) ? e.filter(function(i) {
1216
+ if (R(a)) return R(e) ? e.filter(function(i) {
1217
1217
  return !a.includes(i);
1218
1218
  }).sort() : [];
1219
1219
  if (typeof a == "number") return Number(e) - a;
@@ -1229,28 +1229,28 @@ function Ta() {
1229
1229
  function hr(e) {
1230
1230
  this["@@propmod"] = e;
1231
1231
  }
1232
- var sa = (Q.prototype._read = function(e, t) {
1232
+ var sa = (X.prototype._read = function(e, t) {
1233
1233
  var r = this._ctx;
1234
1234
  return r.error ? r.table._trans(null, ne.bind(null, r.error)) : r.table._trans("readonly", e).then(t);
1235
- }, Q.prototype._write = function(e) {
1235
+ }, X.prototype._write = function(e) {
1236
1236
  var t = this._ctx;
1237
1237
  return t.error ? t.table._trans(null, ne.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1238
- }, Q.prototype._addAlgorithm = function(e) {
1238
+ }, X.prototype._addAlgorithm = function(e) {
1239
1239
  var t = this._ctx;
1240
1240
  t.algorithm = Ue(t.algorithm, e);
1241
- }, Q.prototype._iterate = function(e, t) {
1241
+ }, X.prototype._iterate = function(e, t) {
1242
1242
  return jt(this._ctx, e, t, this._ctx.table.core);
1243
- }, Q.prototype.clone = function(e) {
1243
+ }, X.prototype.clone = function(e) {
1244
1244
  var t = Object.create(this.constructor.prototype), r = Object.create(this._ctx);
1245
- return e && j(r, e), t._ctx = r, t;
1246
- }, Q.prototype.raw = function() {
1245
+ return e && W(r, e), t._ctx = r, t;
1246
+ }, X.prototype.raw = function() {
1247
1247
  return this._ctx.valueMapper = null, this;
1248
- }, Q.prototype.each = function(e) {
1248
+ }, X.prototype.each = function(e) {
1249
1249
  var t = this._ctx;
1250
1250
  return this._read(function(r) {
1251
1251
  return jt(t, e, r, t.table.core);
1252
1252
  });
1253
- }, Q.prototype.count = function(e) {
1253
+ }, X.prototype.count = function(e) {
1254
1254
  var t = this;
1255
1255
  return this._read(function(r) {
1256
1256
  var a = t._ctx, i = a.table.core;
@@ -1264,7 +1264,7 @@ function Ta() {
1264
1264
  return o;
1265
1265
  });
1266
1266
  }).then(e);
1267
- }, Q.prototype.sortBy = function(e, t) {
1267
+ }, X.prototype.sortBy = function(e, t) {
1268
1268
  var r = e.split(".").reverse(), a = r[0], i = r.length - 1;
1269
1269
  function o(p, m) {
1270
1270
  return m ? o(p[r[m]], m - 1) : p[a];
@@ -1276,7 +1276,7 @@ function Ta() {
1276
1276
  return this.toArray(function(p) {
1277
1277
  return p.sort(f);
1278
1278
  }).then(t);
1279
- }, Q.prototype.toArray = function(e) {
1279
+ }, X.prototype.toArray = function(e) {
1280
1280
  var t = this;
1281
1281
  return this._read(function(r) {
1282
1282
  var a = t._ctx;
@@ -1293,7 +1293,7 @@ function Ta() {
1293
1293
  return c;
1294
1294
  });
1295
1295
  }, e);
1296
- }, Q.prototype.offset = function(e) {
1296
+ }, X.prototype.offset = function(e) {
1297
1297
  var t = this._ctx;
1298
1298
  return e <= 0 || (t.offset += e, rt(t) ? yn(t, function() {
1299
1299
  var r = e;
@@ -1308,49 +1308,49 @@ function Ta() {
1308
1308
  return --r < 0;
1309
1309
  };
1310
1310
  })), this;
1311
- }, Q.prototype.limit = function(e) {
1311
+ }, X.prototype.limit = function(e) {
1312
1312
  return this._ctx.limit = Math.min(this._ctx.limit, e), yn(this._ctx, function() {
1313
1313
  var t = e;
1314
1314
  return function(r, a, i) {
1315
1315
  return --t <= 0 && a(i), 0 <= t;
1316
1316
  };
1317
1317
  }, !0), this;
1318
- }, Q.prototype.until = function(e, t) {
1318
+ }, X.prototype.until = function(e, t) {
1319
1319
  return bn(this._ctx, function(r, a, i) {
1320
1320
  return !e(r.value) || (a(i), t);
1321
1321
  }), this;
1322
- }, Q.prototype.first = function(e) {
1322
+ }, X.prototype.first = function(e) {
1323
1323
  return this.limit(1).toArray(function(t) {
1324
1324
  return t[0];
1325
1325
  }).then(e);
1326
- }, Q.prototype.last = function(e) {
1326
+ }, X.prototype.last = function(e) {
1327
1327
  return this.reverse().first(e);
1328
- }, Q.prototype.filter = function(e) {
1328
+ }, X.prototype.filter = function(e) {
1329
1329
  var t;
1330
1330
  return bn(this._ctx, function(r) {
1331
1331
  return e(r.value);
1332
1332
  }), (t = this._ctx).isMatch = Ue(t.isMatch, e), this;
1333
- }, Q.prototype.and = function(e) {
1333
+ }, X.prototype.and = function(e) {
1334
1334
  return this.filter(e);
1335
- }, Q.prototype.or = function(e) {
1335
+ }, X.prototype.or = function(e) {
1336
1336
  return new this.db.WhereClause(this._ctx.table, e, this);
1337
- }, Q.prototype.reverse = function() {
1337
+ }, X.prototype.reverse = function() {
1338
1338
  return this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
1339
- }, Q.prototype.desc = function() {
1339
+ }, X.prototype.desc = function() {
1340
1340
  return this.reverse();
1341
- }, Q.prototype.eachKey = function(e) {
1341
+ }, X.prototype.eachKey = function(e) {
1342
1342
  var t = this._ctx;
1343
1343
  return t.keysOnly = !t.isMatch, this.each(function(r, a) {
1344
1344
  e(a.key, a);
1345
1345
  });
1346
- }, Q.prototype.eachUniqueKey = function(e) {
1346
+ }, X.prototype.eachUniqueKey = function(e) {
1347
1347
  return this._ctx.unique = "unique", this.eachKey(e);
1348
- }, Q.prototype.eachPrimaryKey = function(e) {
1348
+ }, X.prototype.eachPrimaryKey = function(e) {
1349
1349
  var t = this._ctx;
1350
1350
  return t.keysOnly = !t.isMatch, this.each(function(r, a) {
1351
1351
  e(a.primaryKey, a);
1352
1352
  });
1353
- }, Q.prototype.keys = function(e) {
1353
+ }, X.prototype.keys = function(e) {
1354
1354
  var t = this._ctx;
1355
1355
  t.keysOnly = !t.isMatch;
1356
1356
  var r = [];
@@ -1359,7 +1359,7 @@ function Ta() {
1359
1359
  }).then(function() {
1360
1360
  return r;
1361
1361
  }).then(e);
1362
- }, Q.prototype.primaryKeys = function(e) {
1362
+ }, X.prototype.primaryKeys = function(e) {
1363
1363
  var t = this._ctx;
1364
1364
  if (t.dir === "next" && rt(t, !0) && 0 < t.limit) return this._read(function(a) {
1365
1365
  var i = Mt(t, t.table.core.schema);
@@ -1374,15 +1374,15 @@ function Ta() {
1374
1374
  }).then(function() {
1375
1375
  return r;
1376
1376
  }).then(e);
1377
- }, Q.prototype.uniqueKeys = function(e) {
1377
+ }, X.prototype.uniqueKeys = function(e) {
1378
1378
  return this._ctx.unique = "unique", this.keys(e);
1379
- }, Q.prototype.firstKey = function(e) {
1379
+ }, X.prototype.firstKey = function(e) {
1380
1380
  return this.limit(1).keys(function(t) {
1381
1381
  return t[0];
1382
1382
  }).then(e);
1383
- }, Q.prototype.lastKey = function(e) {
1383
+ }, X.prototype.lastKey = function(e) {
1384
1384
  return this.reverse().firstKey(e);
1385
- }, Q.prototype.distinct = function() {
1385
+ }, X.prototype.distinct = function() {
1386
1386
  var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
1387
1387
  if (!e || !e.multi) return this;
1388
1388
  var t = {};
@@ -1390,14 +1390,14 @@ function Ta() {
1390
1390
  var a = i.primaryKey.toString(), i = te(t, a);
1391
1391
  return t[a] = !0, !i;
1392
1392
  }), this;
1393
- }, Q.prototype.modify = function(e) {
1393
+ }, X.prototype.modify = function(e) {
1394
1394
  var t = this, r = this._ctx;
1395
1395
  return this._write(function(a) {
1396
1396
  var i, o, c;
1397
1397
  c = typeof e == "function" ? e : (i = M(e), o = i.length, function(b) {
1398
1398
  for (var O = !1, A = 0; A < o; ++A) {
1399
- var P = i[A], x = e[P], R = we(b, P);
1400
- x instanceof gt ? (fe(b, P, x.execute(R)), O = !0) : R !== x && (fe(b, P, x), O = !0);
1399
+ var P = i[A], k = e[P], I = we(b, P);
1400
+ k instanceof gt ? (le(b, P, k.execute(I)), O = !0) : I !== k && (le(b, P, k), O = !0);
1401
1401
  }
1402
1402
  return O;
1403
1403
  });
@@ -1406,33 +1406,33 @@ function Ta() {
1406
1406
  function E(b, P) {
1407
1407
  var A = P.failures, P = P.numFailures;
1408
1408
  y += b - P;
1409
- for (var x = 0, R = M(A); x < R.length; x++) {
1410
- var $ = R[x];
1411
- g.push(A[$]);
1409
+ for (var k = 0, I = M(A); k < I.length; k++) {
1410
+ var N = I[k];
1411
+ g.push(A[N]);
1412
1412
  }
1413
1413
  }
1414
1414
  var g = [], y = 0, w = [];
1415
1415
  return t.clone().primaryKeys().then(function(b) {
1416
1416
  function O(P) {
1417
- var x = Math.min(v, b.length - P);
1418
- return f.getMany({ trans: a, keys: b.slice(P, P + x), cache: "immutable" }).then(function(R) {
1419
- for (var $ = [], I = [], T = p ? [] : null, N = [], C = 0; C < x; ++C) {
1420
- var K = R[C], U = { value: Ne(K), primKey: b[P + C] };
1421
- c.call(U, U.value, U) !== !1 && (U.value == null ? N.push(b[P + C]) : p || Y(m(K), m(U.value)) === 0 ? (I.push(U.value), p && T.push(b[P + C])) : (N.push(b[P + C]), $.push(U.value)));
1417
+ var k = Math.min(v, b.length - P);
1418
+ return f.getMany({ trans: a, keys: b.slice(P, P + k), cache: "immutable" }).then(function(I) {
1419
+ for (var N = [], T = [], C = p ? [] : null, j = [], $ = 0; $ < k; ++$) {
1420
+ var K = I[$], U = { value: Ne(K), primKey: b[P + $] };
1421
+ c.call(U, U.value, U) !== !1 && (U.value == null ? j.push(b[P + $]) : p || Y(m(K), m(U.value)) === 0 ? (T.push(U.value), p && C.push(b[P + $])) : (j.push(b[P + $]), N.push(U.value)));
1422
1422
  }
1423
- return Promise.resolve(0 < $.length && f.mutate({ trans: a, type: "add", values: $ }).then(function(z) {
1424
- for (var H in z.failures) N.splice(parseInt(H), 1);
1425
- E($.length, z);
1423
+ return Promise.resolve(0 < N.length && f.mutate({ trans: a, type: "add", values: N }).then(function(z) {
1424
+ for (var H in z.failures) j.splice(parseInt(H), 1);
1425
+ E(N.length, z);
1426
1426
  })).then(function() {
1427
- return (0 < I.length || A && typeof e == "object") && f.mutate({ trans: a, type: "put", keys: T, values: I, criteria: A, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < P }).then(function(z) {
1428
- return E(I.length, z);
1427
+ return (0 < T.length || A && typeof e == "object") && f.mutate({ trans: a, type: "put", keys: C, values: T, criteria: A, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < P }).then(function(z) {
1428
+ return E(T.length, z);
1429
1429
  });
1430
1430
  }).then(function() {
1431
- return (0 < N.length || A && e === vn) && f.mutate({ trans: a, type: "delete", keys: N, criteria: A, isAdditionalChunk: 0 < P }).then(function(z) {
1432
- return E(N.length, z);
1431
+ return (0 < j.length || A && e === vn) && f.mutate({ trans: a, type: "delete", keys: j, criteria: A, isAdditionalChunk: 0 < P }).then(function(z) {
1432
+ return E(j.length, z);
1433
1433
  });
1434
1434
  }).then(function() {
1435
- return b.length > P + x && O(P + v);
1435
+ return b.length > P + k && O(P + v);
1436
1436
  });
1437
1437
  });
1438
1438
  }
@@ -1443,7 +1443,7 @@ function Ta() {
1443
1443
  });
1444
1444
  });
1445
1445
  });
1446
- }, Q.prototype.delete = function() {
1446
+ }, X.prototype.delete = function() {
1447
1447
  var e = this._ctx, t = e.range;
1448
1448
  return rt(e) && (e.isPrimKey || t.type === 3) ? this._write(function(r) {
1449
1449
  var a = e.table.core.schema.primaryKey, i = t;
@@ -1457,8 +1457,8 @@ function Ta() {
1457
1457
  });
1458
1458
  });
1459
1459
  }) : this.modify(vn);
1460
- }, Q);
1461
- function Q() {
1460
+ }, X);
1461
+ function X() {
1462
1462
  }
1463
1463
  var vn = function(e, t) {
1464
1464
  return t.value = null;
@@ -1469,7 +1469,7 @@ function Ta() {
1469
1469
  function oa(e, t) {
1470
1470
  return t < e ? -1 : e === t ? 0 : 1;
1471
1471
  }
1472
- function he(e, t, r) {
1472
+ function de(e, t, r) {
1473
1473
  return e = e instanceof gr ? new e.Collection(e) : e, e._ctx.error = new (r || TypeError)(t), e;
1474
1474
  }
1475
1475
  function at(e) {
@@ -1481,7 +1481,7 @@ function Ta() {
1481
1481
  var i, o, c, f, p, m, v, h = r.length;
1482
1482
  if (!r.every(function(y) {
1483
1483
  return typeof y == "string";
1484
- })) return he(e, sr);
1484
+ })) return de(e, sr);
1485
1485
  function E(y) {
1486
1486
  i = y === "next" ? function(b) {
1487
1487
  return b.toUpperCase();
@@ -1514,16 +1514,16 @@ function Ta() {
1514
1514
  if (typeof O != "string") return !1;
1515
1515
  var A = o(O);
1516
1516
  if (t(A, p, g)) return !0;
1517
- for (var P = null, x = g; x < h; ++x) {
1518
- var R = function($, I, T, N, C, K) {
1519
- for (var U = Math.min($.length, N.length), z = -1, H = 0; H < U; ++H) {
1520
- var pe = I[H];
1521
- if (pe !== N[H]) return C($[H], T[H]) < 0 ? $.substr(0, H) + T[H] + T.substr(H + 1) : C($[H], N[H]) < 0 ? $.substr(0, H) + N[H] + T.substr(H + 1) : 0 <= z ? $.substr(0, z) + I[z] + T.substr(z + 1) : null;
1522
- C($[H], pe) < 0 && (z = H);
1517
+ for (var P = null, k = g; k < h; ++k) {
1518
+ var I = function(N, T, C, j, $, K) {
1519
+ for (var U = Math.min(N.length, j.length), z = -1, H = 0; H < U; ++H) {
1520
+ var fe = T[H];
1521
+ if (fe !== j[H]) return $(N[H], C[H]) < 0 ? N.substr(0, H) + C[H] + C.substr(H + 1) : $(N[H], j[H]) < 0 ? N.substr(0, H) + j[H] + C.substr(H + 1) : 0 <= z ? N.substr(0, z) + T[z] + C.substr(z + 1) : null;
1522
+ $(N[H], fe) < 0 && (z = H);
1523
1523
  }
1524
- return U < N.length && K === "next" ? $ + T.substr($.length) : U < $.length && K === "prev" ? $.substr(0, T.length) : z < 0 ? null : $.substr(0, z) + N[z] + T.substr(z + 1);
1525
- }(O, A, f[x], p[x], c, m);
1526
- R === null && P === null ? g = x + 1 : (P === null || 0 < c(P, R)) && (P = R);
1524
+ return U < j.length && K === "next" ? N + C.substr(N.length) : U < N.length && K === "prev" ? N.substr(0, C.length) : z < 0 ? null : N.substr(0, z) + j[z] + C.substr(z + 1);
1525
+ }(O, A, f[k], p[k], c, m);
1526
+ I === null && P === null ? g = k + 1 : (P === null || 0 < c(P, I)) && (P = I);
1527
1527
  }
1528
1528
  return w(P !== null ? function() {
1529
1529
  y.continue(P + v);
@@ -1545,30 +1545,30 @@ function Ta() {
1545
1545
  return Re(e, t, !r, !a);
1546
1546
  });
1547
1547
  } catch {
1548
- return he(this, Se);
1548
+ return de(this, Se);
1549
1549
  }
1550
1550
  }, se.prototype.equals = function(e) {
1551
- return e == null ? he(this, Se) : new this.Collection(this, function() {
1551
+ return e == null ? de(this, Se) : new this.Collection(this, function() {
1552
1552
  return pr(e);
1553
1553
  });
1554
1554
  }, se.prototype.above = function(e) {
1555
- return e == null ? he(this, Se) : new this.Collection(this, function() {
1555
+ return e == null ? de(this, Se) : new this.Collection(this, function() {
1556
1556
  return Re(e, void 0, !0);
1557
1557
  });
1558
1558
  }, se.prototype.aboveOrEqual = function(e) {
1559
- return e == null ? he(this, Se) : new this.Collection(this, function() {
1559
+ return e == null ? de(this, Se) : new this.Collection(this, function() {
1560
1560
  return Re(e, void 0, !1);
1561
1561
  });
1562
1562
  }, se.prototype.below = function(e) {
1563
- return e == null ? he(this, Se) : new this.Collection(this, function() {
1563
+ return e == null ? de(this, Se) : new this.Collection(this, function() {
1564
1564
  return Re(void 0, e, !1, !0);
1565
1565
  });
1566
1566
  }, se.prototype.belowOrEqual = function(e) {
1567
- return e == null ? he(this, Se) : new this.Collection(this, function() {
1567
+ return e == null ? de(this, Se) : new this.Collection(this, function() {
1568
1568
  return Re(void 0, e);
1569
1569
  });
1570
1570
  }, se.prototype.startsWith = function(e) {
1571
- return typeof e != "string" ? he(this, sr) : this.between(e, e + We, !0, !0);
1571
+ return typeof e != "string" ? de(this, sr) : this.between(e, e + We, !0, !0);
1572
1572
  }, se.prototype.startsWithIgnoreCase = function(e) {
1573
1573
  return e === "" ? this.startsWith(e) : Bt(this, function(t, r) {
1574
1574
  return t.indexOf(r[0]) === 0;
@@ -1578,23 +1578,23 @@ function Ta() {
1578
1578
  return t === r[0];
1579
1579
  }, [e], "");
1580
1580
  }, se.prototype.anyOfIgnoreCase = function() {
1581
- var e = Ee.apply(Je, arguments);
1581
+ var e = Ee.apply(Qe, arguments);
1582
1582
  return e.length === 0 ? at(this) : Bt(this, function(t, r) {
1583
1583
  return r.indexOf(t) !== -1;
1584
1584
  }, e, "");
1585
1585
  }, se.prototype.startsWithAnyOfIgnoreCase = function() {
1586
- var e = Ee.apply(Je, arguments);
1586
+ var e = Ee.apply(Qe, arguments);
1587
1587
  return e.length === 0 ? at(this) : Bt(this, function(t, r) {
1588
1588
  return r.some(function(a) {
1589
1589
  return t.indexOf(a) === 0;
1590
1590
  });
1591
1591
  }, e, We);
1592
1592
  }, se.prototype.anyOf = function() {
1593
- var e = this, t = Ee.apply(Je, arguments), r = this._cmp;
1593
+ var e = this, t = Ee.apply(Qe, arguments), r = this._cmp;
1594
1594
  try {
1595
1595
  t.sort(r);
1596
1596
  } catch {
1597
- return he(this, Se);
1597
+ return de(this, Se);
1598
1598
  }
1599
1599
  if (t.length === 0) return at(this);
1600
1600
  var a = new this.Collection(this, function() {
@@ -1613,12 +1613,12 @@ function Ta() {
1613
1613
  }, se.prototype.notEqual = function(e) {
1614
1614
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1615
1615
  }, se.prototype.noneOf = function() {
1616
- var e = Ee.apply(Je, arguments);
1616
+ var e = Ee.apply(Qe, arguments);
1617
1617
  if (e.length === 0) return new this.Collection(this);
1618
1618
  try {
1619
1619
  e.sort(this._ascending);
1620
1620
  } catch {
1621
- return he(this, Se);
1621
+ return de(this, Se);
1622
1622
  }
1623
1623
  var t = e.reduce(function(r, a) {
1624
1624
  return r ? r.concat([[r[r.length - 1][1], a]]) : [[-1 / 0, a]];
@@ -1629,24 +1629,24 @@ function Ta() {
1629
1629
  if (O.length === 0) return at(this);
1630
1630
  if (!O.every(function(A) {
1631
1631
  return A[0] !== void 0 && A[1] !== void 0 && i(A[0], A[1]) <= 0;
1632
- })) 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", G.InvalidArgument);
1632
+ })) return de(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", G.InvalidArgument);
1633
1633
  var p = !t || t.includeLowers !== !1, m = t && t.includeUppers === !0, v, h = i;
1634
1634
  function E(A, P) {
1635
1635
  return h(A[0], P[0]);
1636
1636
  }
1637
1637
  try {
1638
1638
  (v = O.reduce(function(A, P) {
1639
- for (var x = 0, R = A.length; x < R; ++x) {
1640
- var $ = A[x];
1641
- if (a(P[0], $[1]) < 0 && 0 < a(P[1], $[0])) {
1642
- $[0] = c($[0], P[0]), $[1] = f($[1], P[1]);
1639
+ for (var k = 0, I = A.length; k < I; ++k) {
1640
+ var N = A[k];
1641
+ if (a(P[0], N[1]) < 0 && 0 < a(P[1], N[0])) {
1642
+ N[0] = c(N[0], P[0]), N[1] = f(N[1], P[1]);
1643
1643
  break;
1644
1644
  }
1645
1645
  }
1646
- return x === R && A.push(P), A;
1646
+ return k === I && A.push(P), A;
1647
1647
  }, [])).sort(E);
1648
1648
  } catch {
1649
- return he(this, Se);
1649
+ return de(this, Se);
1650
1650
  }
1651
1651
  var g = 0, y = m ? function(A) {
1652
1652
  return 0 < i(A, v[g][1]);
@@ -1661,23 +1661,23 @@ function Ta() {
1661
1661
  });
1662
1662
  return O._ondirectionchange = function(A) {
1663
1663
  h = A === "next" ? (b = y, i) : (b = w, o), v.sort(E);
1664
- }, O._addAlgorithm(function(A, P, x) {
1665
- for (var R, $ = A.key; b($); ) if (++g === v.length) return P(x), !1;
1666
- return !y(R = $) && !w(R) || (r._cmp($, v[g][1]) === 0 || r._cmp($, v[g][0]) === 0 || P(function() {
1664
+ }, O._addAlgorithm(function(A, P, k) {
1665
+ for (var I, N = A.key; b(N); ) if (++g === v.length) return P(k), !1;
1666
+ return !y(I = N) && !w(I) || (r._cmp(N, v[g][1]) === 0 || r._cmp(N, v[g][0]) === 0 || P(function() {
1667
1667
  h === i ? A.continue(v[g][0]) : A.continue(v[g][1]);
1668
1668
  }), !1);
1669
1669
  }), O;
1670
1670
  }, se.prototype.startsWithAnyOf = function() {
1671
- var e = Ee.apply(Je, arguments);
1671
+ var e = Ee.apply(Qe, arguments);
1672
1672
  return e.every(function(t) {
1673
1673
  return typeof t == "string";
1674
1674
  }) ? e.length === 0 ? at(this) : this.inAnyRange(e.map(function(t) {
1675
1675
  return [t, t + We];
1676
- })) : he(this, "startsWithAnyOf() only works with strings");
1676
+ })) : de(this, "startsWithAnyOf() only works with strings");
1677
1677
  }, se);
1678
1678
  function se() {
1679
1679
  }
1680
- function ye(e) {
1680
+ function be(e) {
1681
1681
  return ee(function(t) {
1682
1682
  return mt(t), e(t.target.error), !1;
1683
1683
  });
@@ -1685,9 +1685,9 @@ function Ta() {
1685
1685
  function mt(e) {
1686
1686
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
1687
1687
  }
1688
- var bt = "storagemutated", wn = "x-storagemutated-1", Ie = ht(null, bt), ca = (ve.prototype._lock = function() {
1688
+ var bt = "storagemutated", wn = "x-storagemutated-1", Ie = ht(null, bt), ca = (ye.prototype._lock = function() {
1689
1689
  return it(!L.global), ++this._reculock, this._reculock !== 1 || L.global || (L.lockOwnerFor = this), this;
1690
- }, ve.prototype._unlock = function() {
1690
+ }, ye.prototype._unlock = function() {
1691
1691
  if (it(!L.global), --this._reculock == 0) for (L.global || (L.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
1692
1692
  var e = this._blockedFuncs.shift();
1693
1693
  try {
@@ -1696,9 +1696,9 @@ function Ta() {
1696
1696
  }
1697
1697
  }
1698
1698
  return this;
1699
- }, ve.prototype._locked = function() {
1699
+ }, ye.prototype._locked = function() {
1700
1700
  return this._reculock && L.lockOwnerFor !== this;
1701
- }, ve.prototype.create = function(e) {
1701
+ }, ye.prototype.create = function(e) {
1702
1702
  var t = this;
1703
1703
  if (!this.mode) return this;
1704
1704
  var r = this.db.idbdb, a = this.db._state.dbOpenError;
@@ -1718,7 +1718,7 @@ function Ta() {
1718
1718
  }), e.oncomplete = ee(function() {
1719
1719
  t.active = !1, t._resolve(), "mutatedParts" in e && Ie.storagemutated.fire(e.mutatedParts);
1720
1720
  }), this;
1721
- }, ve.prototype._promise = function(e, t, r) {
1721
+ }, ye.prototype._promise = function(e, t, r) {
1722
1722
  var a = this;
1723
1723
  if (e === "readwrite" && this.mode !== "readwrite") return ne(new G.ReadOnly("Transaction is readonly"));
1724
1724
  if (!this.active) return ne(new G.TransactionInactive());
@@ -1742,9 +1742,9 @@ function Ta() {
1742
1742
  f && f.then && f.then(o, c);
1743
1743
  });
1744
1744
  return i._lib = !0, i;
1745
- }, ve.prototype._root = function() {
1745
+ }, ye.prototype._root = function() {
1746
1746
  return this.parent ? this.parent._root() : this;
1747
- }, ve.prototype.waitFor = function(e) {
1747
+ }, ye.prototype.waitFor = function(e) {
1748
1748
  var t, r = this._root(), a = B.resolve(e);
1749
1749
  r._waitingFor ? r._waitingFor = r._waitingFor.then(function() {
1750
1750
  return a;
@@ -1762,16 +1762,16 @@ function Ta() {
1762
1762
  r._waitingFor === i && (r._waitingFor = null);
1763
1763
  });
1764
1764
  });
1765
- }, ve.prototype.abort = function() {
1765
+ }, ye.prototype.abort = function() {
1766
1766
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new G.Abort()));
1767
- }, ve.prototype.table = function(e) {
1767
+ }, ye.prototype.table = function(e) {
1768
1768
  var t = this._memoizedTables || (this._memoizedTables = {});
1769
1769
  if (te(t, e)) return t[e];
1770
1770
  var r = this.schema[e];
1771
1771
  if (!r) throw new G.NotFound("Table " + e + " not part of transaction");
1772
1772
  return r = new this.db.Table(e, r, this), r.core = this.db.core.table(e), t[e] = r;
1773
- }, ve);
1774
- function ve() {
1773
+ }, ye);
1774
+ function ye() {
1775
1775
  }
1776
1776
  function En(e, t, r, a, i, o, c) {
1777
1777
  return { name: e, keyPath: t, unique: r, multi: a, auto: i, compound: o, src: (r && !c ? "&" : "") + (a ? "*" : "") + (i ? "++" : "") + mr(t) };
@@ -1826,125 +1826,125 @@ function Ta() {
1826
1826
  function i(E) {
1827
1827
  var g, y = E.name;
1828
1828
  return { name: y, schema: E, mutate: function(w) {
1829
- var b = w.trans, O = w.type, A = w.keys, P = w.values, x = w.range;
1830
- return new Promise(function(R, $) {
1831
- R = ee(R);
1832
- var I = b.objectStore(y), T = I.keyPath == null, N = O === "put" || O === "add";
1833
- if (!N && O !== "delete" && O !== "deleteRange") throw new Error("Invalid operation type: " + O);
1834
- var C, K = (A || P || { length: 1 }).length;
1829
+ var b = w.trans, O = w.type, A = w.keys, P = w.values, k = w.range;
1830
+ return new Promise(function(I, N) {
1831
+ I = ee(I);
1832
+ var T = b.objectStore(y), C = T.keyPath == null, j = O === "put" || O === "add";
1833
+ if (!j && O !== "delete" && O !== "deleteRange") throw new Error("Invalid operation type: " + O);
1834
+ var $, K = (A || P || { length: 1 }).length;
1835
1835
  if (A && P && A.length !== P.length) throw new Error("Given keys array must have same length as given values array.");
1836
- if (K === 0) return R({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1837
- function U(de) {
1838
- ++pe, mt(de);
1836
+ if (K === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1837
+ function U(ue) {
1838
+ ++fe, mt(ue);
1839
1839
  }
1840
- var z = [], H = [], pe = 0;
1840
+ var z = [], H = [], fe = 0;
1841
1841
  if (O === "deleteRange") {
1842
- if (x.type === 4) return R({ numFailures: pe, failures: H, results: [], lastResult: void 0 });
1843
- x.type === 3 ? z.push(C = I.clear()) : z.push(C = I.delete(a(x)));
1842
+ if (k.type === 4) return I({ numFailures: fe, failures: H, results: [], lastResult: void 0 });
1843
+ k.type === 3 ? z.push($ = T.clear()) : z.push($ = T.delete(a(k)));
1844
1844
  } else {
1845
- var T = N ? T ? [P, A] : [P, null] : [A, null], W = T[0], ce = T[1];
1846
- if (N) for (var ue = 0; ue < K; ++ue) z.push(C = ce && ce[ue] !== void 0 ? I[O](W[ue], ce[ue]) : I[O](W[ue])), C.onerror = U;
1847
- else for (ue = 0; ue < K; ++ue) z.push(C = I[O](W[ue])), C.onerror = U;
1845
+ var C = j ? C ? [P, A] : [P, null] : [A, null], F = C[0], oe = C[1];
1846
+ if (j) for (var ce = 0; ce < K; ++ce) z.push($ = oe && oe[ce] !== void 0 ? T[O](F[ce], oe[ce]) : T[O](F[ce])), $.onerror = U;
1847
+ else for (ce = 0; ce < K; ++ce) z.push($ = T[O](F[ce])), $.onerror = U;
1848
1848
  }
1849
- function Zt(de) {
1850
- de = de.target.result, z.forEach(function(Ye, Gn) {
1849
+ function Zt(ue) {
1850
+ ue = ue.target.result, z.forEach(function(Ye, Gn) {
1851
1851
  return Ye.error != null && (H[Gn] = Ye.error);
1852
- }), R({ numFailures: pe, failures: H, results: O === "delete" ? A : z.map(function(Ye) {
1852
+ }), I({ numFailures: fe, failures: H, results: O === "delete" ? A : z.map(function(Ye) {
1853
1853
  return Ye.result;
1854
- }), lastResult: de });
1854
+ }), lastResult: ue });
1855
1855
  }
1856
- C.onerror = function(de) {
1857
- U(de), Zt(de);
1858
- }, C.onsuccess = Zt;
1856
+ $.onerror = function(ue) {
1857
+ U(ue), Zt(ue);
1858
+ }, $.onsuccess = Zt;
1859
1859
  });
1860
1860
  }, getMany: function(w) {
1861
1861
  var b = w.trans, O = w.keys;
1862
1862
  return new Promise(function(A, P) {
1863
1863
  A = ee(A);
1864
- for (var x, R = b.objectStore(y), $ = O.length, I = new Array($), T = 0, N = 0, C = function(z) {
1865
- z = z.target, I[z._pos] = z.result, ++N === T && A(I);
1866
- }, K = ye(P), U = 0; U < $; ++U) O[U] != null && ((x = R.get(O[U]))._pos = U, x.onsuccess = C, x.onerror = K, ++T);
1867
- T === 0 && A(I);
1864
+ for (var k, I = b.objectStore(y), N = O.length, T = new Array(N), C = 0, j = 0, $ = function(z) {
1865
+ z = z.target, T[z._pos] = z.result, ++j === C && A(T);
1866
+ }, K = be(P), U = 0; U < N; ++U) O[U] != null && ((k = I.get(O[U]))._pos = U, k.onsuccess = $, k.onerror = K, ++C);
1867
+ C === 0 && A(T);
1868
1868
  });
1869
1869
  }, get: function(w) {
1870
1870
  var b = w.trans, O = w.key;
1871
1871
  return new Promise(function(A, P) {
1872
1872
  A = ee(A);
1873
- var x = b.objectStore(y).get(O);
1874
- x.onsuccess = function(R) {
1875
- return A(R.target.result);
1876
- }, x.onerror = ye(P);
1873
+ var k = b.objectStore(y).get(O);
1874
+ k.onsuccess = function(I) {
1875
+ return A(I.target.result);
1876
+ }, k.onerror = be(P);
1877
1877
  });
1878
1878
  }, query: (g = m, function(w) {
1879
1879
  return new Promise(function(b, O) {
1880
1880
  b = ee(b);
1881
- var A, P, x, T = w.trans, R = w.values, $ = w.limit, C = w.query, I = $ === 1 / 0 ? void 0 : $, N = C.index, C = C.range, T = T.objectStore(y), N = N.isPrimaryKey ? T : T.index(N.name), C = a(C);
1882
- if ($ === 0) return b({ result: [] });
1883
- g ? ((I = R ? N.getAll(C, I) : N.getAllKeys(C, I)).onsuccess = function(K) {
1881
+ var A, P, k, C = w.trans, I = w.values, N = w.limit, $ = w.query, T = N === 1 / 0 ? void 0 : N, j = $.index, $ = $.range, C = C.objectStore(y), j = j.isPrimaryKey ? C : C.index(j.name), $ = a($);
1882
+ if (N === 0) return b({ result: [] });
1883
+ g ? ((T = I ? j.getAll($, T) : j.getAllKeys($, T)).onsuccess = function(K) {
1884
1884
  return b({ result: K.target.result });
1885
- }, I.onerror = ye(O)) : (A = 0, P = !R && "openKeyCursor" in N ? N.openKeyCursor(C) : N.openCursor(C), x = [], P.onsuccess = function(K) {
1885
+ }, T.onerror = be(O)) : (A = 0, P = !I && "openKeyCursor" in j ? j.openKeyCursor($) : j.openCursor($), k = [], P.onsuccess = function(K) {
1886
1886
  var U = P.result;
1887
- return U ? (x.push(R ? U.value : U.primaryKey), ++A === $ ? b({ result: x }) : void U.continue()) : b({ result: x });
1888
- }, P.onerror = ye(O));
1887
+ return U ? (k.push(I ? U.value : U.primaryKey), ++A === N ? b({ result: k }) : void U.continue()) : b({ result: k });
1888
+ }, P.onerror = be(O));
1889
1889
  });
1890
1890
  }), openCursor: function(w) {
1891
- var b = w.trans, O = w.values, A = w.query, P = w.reverse, x = w.unique;
1892
- return new Promise(function(R, $) {
1893
- R = ee(R);
1894
- var N = A.index, I = A.range, T = b.objectStore(y), T = N.isPrimaryKey ? T : T.index(N.name), N = P ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", C = !O && "openKeyCursor" in T ? T.openKeyCursor(a(I), N) : T.openCursor(a(I), N);
1895
- C.onerror = ye($), C.onsuccess = ee(function(K) {
1896
- var U, z, H, pe, W = C.result;
1897
- W ? (W.___id = ++ua, W.done = !1, U = W.continue.bind(W), z = (z = W.continuePrimaryKey) && z.bind(W), H = W.advance.bind(W), pe = function() {
1891
+ var b = w.trans, O = w.values, A = w.query, P = w.reverse, k = w.unique;
1892
+ return new Promise(function(I, N) {
1893
+ I = ee(I);
1894
+ var j = A.index, T = A.range, C = b.objectStore(y), C = j.isPrimaryKey ? C : C.index(j.name), j = P ? k ? "prevunique" : "prev" : k ? "nextunique" : "next", $ = !O && "openKeyCursor" in C ? C.openKeyCursor(a(T), j) : C.openCursor(a(T), j);
1895
+ $.onerror = be(N), $.onsuccess = ee(function(K) {
1896
+ var U, z, H, fe, F = $.result;
1897
+ F ? (F.___id = ++ua, F.done = !1, U = F.continue.bind(F), z = (z = F.continuePrimaryKey) && z.bind(F), H = F.advance.bind(F), fe = function() {
1898
1898
  throw new Error("Cursor not stopped");
1899
- }, W.trans = b, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
1899
+ }, F.trans = b, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
1900
1900
  throw new Error("Cursor not started");
1901
- }, W.fail = ee($), W.next = function() {
1902
- var ce = this, ue = 1;
1901
+ }, F.fail = ee(N), F.next = function() {
1902
+ var oe = this, ce = 1;
1903
1903
  return this.start(function() {
1904
- return ue-- ? ce.continue() : ce.stop();
1904
+ return ce-- ? oe.continue() : oe.stop();
1905
1905
  }).then(function() {
1906
- return ce;
1906
+ return oe;
1907
1907
  });
1908
- }, W.start = function(ce) {
1909
- function ue() {
1910
- if (C.result) try {
1911
- ce();
1912
- } catch (de) {
1913
- W.fail(de);
1908
+ }, F.start = function(oe) {
1909
+ function ce() {
1910
+ if ($.result) try {
1911
+ oe();
1912
+ } catch (ue) {
1913
+ F.fail(ue);
1914
1914
  }
1915
- else W.done = !0, W.start = function() {
1915
+ else F.done = !0, F.start = function() {
1916
1916
  throw new Error("Cursor behind last entry");
1917
- }, W.stop();
1917
+ }, F.stop();
1918
1918
  }
1919
- var Zt = new Promise(function(de, Ye) {
1920
- de = ee(de), C.onerror = ye(Ye), W.fail = Ye, W.stop = function(Gn) {
1921
- W.stop = W.continue = W.continuePrimaryKey = W.advance = pe, de(Gn);
1919
+ var Zt = new Promise(function(ue, Ye) {
1920
+ ue = ee(ue), $.onerror = be(Ye), F.fail = Ye, F.stop = function(Gn) {
1921
+ F.stop = F.continue = F.continuePrimaryKey = F.advance = fe, ue(Gn);
1922
1922
  };
1923
1923
  });
1924
- return C.onsuccess = ee(function(de) {
1925
- C.onsuccess = ue, ue();
1926
- }), W.continue = U, W.continuePrimaryKey = z, W.advance = H, ue(), Zt;
1927
- }, R(W)) : R(null);
1928
- }, $);
1924
+ return $.onsuccess = ee(function(ue) {
1925
+ $.onsuccess = ce, ce();
1926
+ }), F.continue = U, F.continuePrimaryKey = z, F.advance = H, ce(), Zt;
1927
+ }, I(F)) : I(null);
1928
+ }, N);
1929
1929
  });
1930
1930
  }, count: function(w) {
1931
1931
  var b = w.query, O = w.trans, A = b.index, P = b.range;
1932
- return new Promise(function(x, R) {
1933
- var $ = O.objectStore(y), I = A.isPrimaryKey ? $ : $.index(A.name), $ = a(P), I = $ ? I.count($) : I.count();
1934
- I.onsuccess = ee(function(T) {
1935
- return x(T.target.result);
1936
- }), I.onerror = ye(R);
1932
+ return new Promise(function(k, I) {
1933
+ var N = O.objectStore(y), T = A.isPrimaryKey ? N : N.index(A.name), N = a(P), T = N ? T.count(N) : T.count();
1934
+ T.onsuccess = ee(function(C) {
1935
+ return k(C.target.result);
1936
+ }), T.onerror = be(I);
1937
1937
  });
1938
1938
  } };
1939
1939
  }
1940
1940
  var o, c, f, v = (c = p, f = br((o = e).objectStoreNames), { schema: { name: o.name, tables: f.map(function(E) {
1941
1941
  return c.objectStore(E);
1942
1942
  }).map(function(E) {
1943
- var g = E.keyPath, b = E.autoIncrement, y = F(g), w = {}, b = { name: E.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: g == null, compound: y, keyPath: g, autoIncrement: b, unique: !0, extractKey: _n(g) }, indexes: br(E.indexNames).map(function(O) {
1943
+ var g = E.keyPath, b = E.autoIncrement, y = R(g), w = {}, b = { name: E.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: g == null, compound: y, keyPath: g, autoIncrement: b, unique: !0, extractKey: _n(g) }, indexes: br(E.indexNames).map(function(O) {
1944
1944
  return E.index(O);
1945
- }).map(function(x) {
1946
- var A = x.name, P = x.unique, R = x.multiEntry, x = x.keyPath, R = { name: A, compound: F(x), keyPath: x, unique: P, multiEntry: R, extractKey: _n(x) };
1947
- return w[vt(x)] = R;
1945
+ }).map(function(k) {
1946
+ var A = k.name, P = k.unique, I = k.multiEntry, k = k.keyPath, I = { name: A, compound: R(k), keyPath: k, unique: P, multiEntry: I, extractKey: _n(k) };
1947
+ return w[vt(k)] = I;
1948
1948
  }), getIndexByKeyPath: function(O) {
1949
1949
  return w[vt(O)];
1950
1950
  } };
@@ -1977,12 +1977,12 @@ function Ta() {
1977
1977
  var o = a[i];
1978
1978
  t.forEach(function(c) {
1979
1979
  var f = function p(m, v) {
1980
- return Fr(m, v) || (m = J(m)) && p(m, v);
1980
+ return Fr(m, v) || (m = Z(m)) && p(m, v);
1981
1981
  }(c, i);
1982
1982
  (!f || "value" in f && f.value === void 0) && (c === e.Transaction.prototype || c instanceof e.Transaction ? Ae(c, i, { get: function() {
1983
1983
  return this.table(i);
1984
1984
  }, set: function(p) {
1985
- Qe(this, i, { value: p, writable: !0, configurable: !0, enumerable: !0 });
1985
+ Xe(this, i, { value: p, writable: !0, configurable: !0, enumerable: !0 });
1986
1986
  } }) : c[i] = new e.Table(i, o));
1987
1987
  });
1988
1988
  });
@@ -2011,39 +2011,39 @@ function Ta() {
2011
2011
  w.push(function() {
2012
2012
  var A = b, P = O._cfg.dbschema;
2013
2013
  Wt(h, A, y), Wt(h, P, y), b = h._dbSchema = P;
2014
- var x = An(A, P);
2015
- x.add.forEach(function(N) {
2016
- Pn(y, N[0], N[1].primKey, N[1].indexes);
2017
- }), x.change.forEach(function(N) {
2018
- if (N.recreate) throw new G.Upgrade("Not yet support for changing primary key");
2019
- var C = y.objectStore(N.name);
2020
- N.add.forEach(function(K) {
2021
- return Gt(C, K);
2022
- }), N.change.forEach(function(K) {
2023
- C.deleteIndex(K.name), Gt(C, K);
2024
- }), N.del.forEach(function(K) {
2025
- return C.deleteIndex(K);
2014
+ var k = An(A, P);
2015
+ k.add.forEach(function(j) {
2016
+ Pn(y, j[0], j[1].primKey, j[1].indexes);
2017
+ }), k.change.forEach(function(j) {
2018
+ if (j.recreate) throw new G.Upgrade("Not yet support for changing primary key");
2019
+ var $ = y.objectStore(j.name);
2020
+ j.add.forEach(function(K) {
2021
+ return Gt($, K);
2022
+ }), j.change.forEach(function(K) {
2023
+ $.deleteIndex(K.name), Gt($, K);
2024
+ }), j.del.forEach(function(K) {
2025
+ return $.deleteIndex(K);
2026
2026
  });
2027
2027
  });
2028
- var R = O._cfg.contentUpgrade;
2029
- if (R && O._cfg.version > E) {
2028
+ var I = O._cfg.contentUpgrade;
2029
+ if (I && O._cfg.version > E) {
2030
2030
  Kt(h, y), g._memoizedTables = {};
2031
- var $ = Qn(P);
2032
- x.del.forEach(function(N) {
2033
- $[N] = A[N];
2034
- }), On(h, [h.Transaction.prototype]), Lt(h, [h.Transaction.prototype], M($), $), g.schema = $;
2035
- var I, T = rn(R);
2036
- return T && tt(), x = B.follow(function() {
2037
- var N;
2038
- (I = R(g)) && T && (N = xe.bind(null, null), I.then(N, N));
2039
- }), I && typeof I.then == "function" ? B.resolve(I) : x.then(function() {
2040
- return I;
2031
+ var N = Xn(P);
2032
+ k.del.forEach(function(j) {
2033
+ N[j] = A[j];
2034
+ }), On(h, [h.Transaction.prototype]), Lt(h, [h.Transaction.prototype], M(N), N), g.schema = N;
2035
+ var T, C = rn(I);
2036
+ return C && tt(), k = B.follow(function() {
2037
+ var j;
2038
+ (T = I(g)) && C && (j = xe.bind(null, null), T.then(j, j));
2039
+ }), T && typeof T.then == "function" ? B.resolve(T) : k.then(function() {
2040
+ return T;
2041
2041
  });
2042
2042
  }
2043
2043
  }), w.push(function(A) {
2044
- var P, x, R = O._cfg.dbschema;
2045
- P = R, x = A, [].slice.call(x.db.objectStoreNames).forEach(function($) {
2046
- return P[$] == null && x.db.deleteObjectStore($);
2044
+ var P, k, I = O._cfg.dbschema;
2045
+ P = I, k = A, [].slice.call(k.db.objectStoreNames).forEach(function(N) {
2046
+ return P[N] == null && k.db.deleteObjectStore(N);
2047
2047
  }), On(h, [h.Transaction.prototype]), Lt(h, [h.Transaction.prototype], h._storeNames, h._dbSchema), g.schema = h._dbSchema;
2048
2048
  }), w.push(function(A) {
2049
2049
  h.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(h.idbdb.version / 10) === O._cfg.version ? (h.idbdb.deleteObjectStore("$meta"), delete h._dbSchema.$meta, h._storeNames = h._storeNames.filter(function(P) {
@@ -2073,7 +2073,7 @@ function Ta() {
2073
2073
  if (c.change.length || c.recreate) return console.warn("Unable to patch indexes of table ".concat(c.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
2074
2074
  var f = t.objectStore(c.name);
2075
2075
  c.add.forEach(function(p) {
2076
- be && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(p.src)), Gt(f, p);
2076
+ me && console.debug("Dexie upgrade patch: Creating missing index ".concat(c.name, ".").concat(p.src)), Gt(f, p);
2077
2077
  });
2078
2078
  }(i[a]);
2079
2079
  if (typeof o == "object") return o.value;
@@ -2108,7 +2108,7 @@ function Ta() {
2108
2108
  }
2109
2109
  function yr(e, t) {
2110
2110
  M(e).forEach(function(r) {
2111
- t.db.objectStoreNames.contains(r) || (be && console.debug("Dexie: Creating missing table", r), Pn(t, r, e[r].primKey, e[r].indexes));
2111
+ t.db.objectStoreNames.contains(r) || (me && console.debug("Dexie: Creating missing table", r), Pn(t, r, e[r].primKey, e[r].indexes));
2112
2112
  });
2113
2113
  }
2114
2114
  function Gt(e, t) {
@@ -2133,12 +2133,12 @@ function Ta() {
2133
2133
  !t[o] || (m = t[o].idxByName[v]) && (m.name = p, delete t[o].idxByName[v], t[o].idxByName[p] = m);
2134
2134
  }
2135
2135
  }
2136
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && k.WorkerGlobalScope && k instanceof k.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2136
+ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && x.WorkerGlobalScope && x instanceof x.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2137
2137
  }
2138
2138
  function vr(e) {
2139
2139
  return e.split(",").map(function(t, r) {
2140
2140
  var a = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(a) ? a.match(/^\[(.*)\]$/)[1].split("+") : a;
2141
- return En(a, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), F(i), r === 0);
2141
+ return En(a, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), R(i), r === 0);
2142
2142
  });
2143
2143
  }
2144
2144
  var ga = (Ut.prototype._parseStoresSpec = function(e, t) {
@@ -2154,13 +2154,13 @@ function Ta() {
2154
2154
  });
2155
2155
  }, Ut.prototype.stores = function(r) {
2156
2156
  var t = this.db;
2157
- this._cfg.storesSource = this._cfg.storesSource ? j(this._cfg.storesSource, r) : r;
2157
+ this._cfg.storesSource = this._cfg.storesSource ? W(this._cfg.storesSource, r) : r;
2158
2158
  var r = t._versions, a = {}, i = {};
2159
2159
  return r.forEach(function(o) {
2160
- j(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
2160
+ W(a, o._cfg.storesSource), i = o._cfg.dbschema = {}, o._parseStoresSpec(a, i);
2161
2161
  }), t._dbSchema = i, On(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], M(i), i), t._storeNames = M(i), this;
2162
2162
  }, Ut.prototype.upgrade = function(e) {
2163
- return this._cfg.contentUpgrade = sn(this._cfg.contentUpgrade || Z, e), this;
2163
+ return this._cfg.contentUpgrade = sn(this._cfg.contentUpgrade || Q, e), this;
2164
2164
  }, Ut);
2165
2165
  function Ut() {
2166
2166
  }
@@ -2179,18 +2179,18 @@ function Ta() {
2179
2179
  function Rn(e) {
2180
2180
  return !("from" in e);
2181
2181
  }
2182
- var oe = function(e, t) {
2182
+ var ie = function(e, t) {
2183
2183
  if (!this) {
2184
- var r = new oe();
2185
- return e && "d" in e && j(r, e), r;
2184
+ var r = new ie();
2185
+ return e && "d" in e && W(r, e), r;
2186
2186
  }
2187
- j(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2187
+ W(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2188
2188
  };
2189
2189
  function wt(e, t, r) {
2190
2190
  var a = Y(t, r);
2191
2191
  if (!isNaN(a)) {
2192
2192
  if (0 < a) throw RangeError();
2193
- if (Rn(e)) return j(e, { from: t, to: r, d: 1 });
2193
+ if (Rn(e)) return W(e, { from: t, to: r, d: 1 });
2194
2194
  var i = e.l, a = e.r;
2195
2195
  if (Y(r, e.from) < 0) return i ? wt(i, t, r) : e.l = { from: t, to: r, d: 1, l: null, r: null }, Er(e);
2196
2196
  if (0 < Y(t, e.to)) return a ? wt(a, t, r) : e.r = { from: t, to: r, d: 1, l: null, r: null }, Er(e);
@@ -2244,7 +2244,7 @@ function Ta() {
2244
2244
  return M(t).forEach(function(r) {
2245
2245
  e[r] ? Et(e[r], t[r]) : e[r] = function a(i) {
2246
2246
  var o, c, f = {};
2247
- for (o in i) te(i, o) && (c = i[o], f[o] = !c || typeof c != "object" || Jn.has(c.constructor) ? c : a(c));
2247
+ for (o in i) te(i, o) && (c = i[o], f[o] = !c || typeof c != "object" || Qn.has(c.constructor) ? c : a(c));
2248
2248
  return f;
2249
2249
  }(t[r]);
2250
2250
  }), e;
@@ -2254,7 +2254,7 @@ function Ta() {
2254
2254
  return t[r] && wr(t[r], e[r]);
2255
2255
  });
2256
2256
  }
2257
- le(oe.prototype, ((ge = { add: function(e) {
2257
+ pe(ie.prototype, ((he = { add: function(e) {
2258
2258
  return Et(this, e), this;
2259
2259
  }, addKey: function(e) {
2260
2260
  return wt(this, e, e), this;
@@ -2268,7 +2268,7 @@ function Ta() {
2268
2268
  return t && Y(t.from, e) <= 0 && 0 <= Y(t.to, e);
2269
2269
  } })[nn] = function() {
2270
2270
  return zt(this);
2271
- }, ge));
2271
+ }, he));
2272
2272
  var ze = {}, Tn = {}, Cn = !1;
2273
2273
  function Yt(e) {
2274
2274
  Ht(Tn, e), Cn || (Cn = !0, setTimeout(function() {
@@ -2317,28 +2317,28 @@ function Ta() {
2317
2317
  if (c(), !r) throw new G.MissingAPI();
2318
2318
  var y = e.name, w = t.autoSchema || !i ? r.open(y) : r.open(y, i);
2319
2319
  if (!w) throw new G.MissingAPI();
2320
- w.onerror = ye(g), w.onblocked = ee(e._fireOnBlocked), w.onupgradeneeded = ee(function(b) {
2320
+ w.onerror = be(g), w.onblocked = ee(e._fireOnBlocked), w.onupgradeneeded = ee(function(b) {
2321
2321
  var O;
2322
2322
  v = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = mt, v.abort(), w.result.close(), (O = r.deleteDatabase(y)).onsuccess = O.onerror = ee(function() {
2323
2323
  g(new G.NoSuchDatabase("Database ".concat(y, " doesnt exist")));
2324
- })) : (v.onerror = ye(g), b = b.oldVersion > Math.pow(2, 62) ? 0 : b.oldVersion, h = b < 1, e.idbdb = w.result, o && pa(e, v), ha(e, b / 10, v, g));
2324
+ })) : (v.onerror = be(g), b = b.oldVersion > Math.pow(2, 62) ? 0 : b.oldVersion, h = b < 1, e.idbdb = w.result, o && pa(e, v), ha(e, b / 10, v, g));
2325
2325
  }, g), w.onsuccess = ee(function() {
2326
2326
  v = null;
2327
- var b, O, A, P, x, R = e.idbdb = w.result, $ = _t(R.objectStoreNames);
2328
- if (0 < $.length) try {
2329
- var I = R.transaction((P = $).length === 1 ? P[0] : P, "readonly");
2330
- if (t.autoSchema) O = R, A = I, (b = e).verno = O.version / 10, A = b._dbSchema = Ft(0, O, A), b._storeNames = _t(O.objectStoreNames, 0), Lt(b, [b._allTables], M(A), A);
2331
- else if (Wt(e, e._dbSchema, I), ((x = An(Ft(0, (x = e).idbdb, I), x._dbSchema)).add.length || x.change.some(function(T) {
2332
- return T.add.length || T.change.length;
2333
- })) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), R.close(), i = R.version + 1, o = !0, E(f());
2334
- Kt(e, I);
2327
+ var b, O, A, P, k, I = e.idbdb = w.result, N = _t(I.objectStoreNames);
2328
+ if (0 < N.length) try {
2329
+ var T = I.transaction((P = N).length === 1 ? P[0] : P, "readonly");
2330
+ if (t.autoSchema) O = I, A = T, (b = e).verno = O.version / 10, A = b._dbSchema = Ft(0, O, A), b._storeNames = _t(O.objectStoreNames, 0), Lt(b, [b._allTables], M(A), A);
2331
+ else if (Wt(e, e._dbSchema, T), ((k = An(Ft(0, (k = e).idbdb, T), k._dbSchema)).add.length || k.change.some(function(C) {
2332
+ return C.add.length || C.change.length;
2333
+ })) && !o) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), I.close(), i = I.version + 1, o = !0, E(f());
2334
+ Kt(e, T);
2335
2335
  } catch {
2336
2336
  }
2337
- nt.push(e), R.onversionchange = ee(function(T) {
2338
- t.vcFired = !0, e.on("versionchange").fire(T);
2339
- }), R.onclose = ee(function(T) {
2340
- e.on("close").fire(T);
2341
- }), h && (x = e._deps, I = y, R = x.indexedDB, x = x.IDBKeyRange, xn(R) || I === $t || Dn(R, x).put({ name: I }).catch(Z)), E();
2337
+ nt.push(e), I.onversionchange = ee(function(C) {
2338
+ t.vcFired = !0, e.on("versionchange").fire(C);
2339
+ }), I.onclose = ee(function(C) {
2340
+ e.on("close").fire(C);
2341
+ }), h && (k = e._deps, T = y, I = k.indexedDB, k = k.IDBKeyRange, xn(I) || T === $t || Dn(I, k).put({ name: T }).catch(Q)), E();
2342
2342
  }, g);
2343
2343
  }).catch(function(E) {
2344
2344
  switch (E == null ? void 0 : E.name) {
@@ -2364,7 +2364,7 @@ function Ta() {
2364
2364
  return e.on.ready.fire(e.vip);
2365
2365
  })).then(function E() {
2366
2366
  if (0 < t.onReadyBeingFired.length) {
2367
- var g = t.onReadyBeingFired.reduce(sn, Z);
2367
+ var g = t.onReadyBeingFired.reduce(sn, Q);
2368
2368
  return t.onReadyBeingFired = [], B.resolve(kn(function() {
2369
2369
  return g(e.vip);
2370
2370
  })).then(E);
@@ -2385,8 +2385,8 @@ function Ta() {
2385
2385
  var E;
2386
2386
  return h && (E = {}, e.tables.forEach(function(g) {
2387
2387
  g.schema.indexes.forEach(function(y) {
2388
- y.name && (E["idb://".concat(e.name, "/").concat(g.name, "/").concat(y.name)] = new oe(-1 / 0, [[[]]]));
2389
- }), E["idb://".concat(e.name, "/").concat(g.name, "/")] = E["idb://".concat(e.name, "/").concat(g.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
2388
+ y.name && (E["idb://".concat(e.name, "/").concat(g.name, "/").concat(y.name)] = new ie(-1 / 0, [[[]]]));
2389
+ }), E["idb://".concat(e.name, "/").concat(g.name, "/")] = E["idb://".concat(e.name, "/").concat(g.name, "/:dels")] = new ie(-1 / 0, [[[]]]);
2390
2390
  }), Ie(bt).fire(E), $n(E, !0)), e;
2391
2391
  });
2392
2392
  }
@@ -2400,13 +2400,13 @@ function Ta() {
2400
2400
  function i(o) {
2401
2401
  return function(p) {
2402
2402
  var f = o(p), p = f.value;
2403
- return f.done ? p : p && typeof p.then == "function" ? p.then(r, a) : F(p) ? Promise.all(p).then(r, a) : r(p);
2403
+ return f.done ? p : p && typeof p.then == "function" ? p.then(r, a) : R(p) ? Promise.all(p).then(r, a) : r(p);
2404
2404
  };
2405
2405
  }
2406
2406
  return i(t)();
2407
2407
  }
2408
- function Qt(e, t, r) {
2409
- for (var a = F(e) ? e.slice() : [e], i = 0; i < r; ++i) a.push(t);
2408
+ function Xt(e, t, r) {
2409
+ for (var a = R(e) ? e.slice() : [e], i = 0; i < r; ++i) a.push(t);
2410
2410
  return a;
2411
2411
  }
2412
2412
  var ba = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
@@ -2425,7 +2425,7 @@ function Ta() {
2425
2425
  }
2426
2426
  function v(h) {
2427
2427
  var E, g = h.query.index;
2428
- return g.isVirtual ? u(u({}, h), { query: { index: g.lowLevelIndex, range: (E = h.query.range, g = g.keyTail, { type: E.type === 1 ? 2 : E.type, lower: Qt(E.lower, E.lowerOpen ? e.MAX_KEY : e.MIN_KEY, g), lowerOpen: !0, upper: Qt(E.upper, E.upperOpen ? e.MIN_KEY : e.MAX_KEY, g), upperOpen: !0 }) } }) : h;
2428
+ return g.isVirtual ? u(u({}, h), { query: { index: g.lowLevelIndex, range: (E = h.query.range, g = g.keyTail, { type: E.type === 1 ? 2 : E.type, lower: Xt(E.lower, E.lowerOpen ? e.MAX_KEY : e.MIN_KEY, g), lowerOpen: !0, upper: Xt(E.upper, E.upperOpen ? e.MIN_KEY : e.MAX_KEY, g), upperOpen: !0 }) } }) : h;
2429
2429
  }
2430
2430
  return u(u({}, r), { schema: u(u({}, a), { primaryKey: t, indexes: o, getIndexByKeyPath: function(h) {
2431
2431
  return (h = i[vt(h)]) && h[0];
@@ -2440,9 +2440,9 @@ function Ta() {
2440
2440
  }) : r.openCursor(h);
2441
2441
  function b(O) {
2442
2442
  return Object.create(O, { continue: { value: function(A) {
2443
- A != null ? O.continue(Qt(A, h.reverse ? e.MAX_KEY : e.MIN_KEY, g)) : h.unique ? O.continue(O.key.slice(0, w).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, g)) : O.continue();
2443
+ A != null ? O.continue(Xt(A, h.reverse ? e.MAX_KEY : e.MIN_KEY, g)) : h.unique ? O.continue(O.key.slice(0, w).concat(h.reverse ? e.MIN_KEY : e.MAX_KEY, g)) : O.continue();
2444
2444
  } }, continuePrimaryKey: { value: function(A, P) {
2445
- O.continuePrimaryKey(Qt(A, e.MAX_KEY, g), P);
2445
+ O.continuePrimaryKey(Xt(A, e.MAX_KEY, g), P);
2446
2446
  } }, primaryKey: { get: function() {
2447
2447
  return O.primaryKey;
2448
2448
  } }, key: { get: function() {
@@ -2473,22 +2473,22 @@ function Ta() {
2473
2473
  var o = L.trans, c = o.table(t).hook, f = c.deleting, p = c.creating, m = c.updating;
2474
2474
  switch (i.type) {
2475
2475
  case "add":
2476
- if (p.fire === Z) break;
2476
+ if (p.fire === Q) break;
2477
2477
  return o._promise("readwrite", function() {
2478
2478
  return v(i);
2479
2479
  }, !0);
2480
2480
  case "put":
2481
- if (p.fire === Z && m.fire === Z) break;
2481
+ if (p.fire === Q && m.fire === Q) break;
2482
2482
  return o._promise("readwrite", function() {
2483
2483
  return v(i);
2484
2484
  }, !0);
2485
2485
  case "delete":
2486
- if (f.fire === Z) break;
2486
+ if (f.fire === Q) break;
2487
2487
  return o._promise("readwrite", function() {
2488
2488
  return v(i);
2489
2489
  }, !0);
2490
2490
  case "deleteRange":
2491
- if (f.fire === Z) break;
2491
+ if (f.fire === Q) break;
2492
2492
  return o._promise("readwrite", function() {
2493
2493
  return function h(E, g, y) {
2494
2494
  return r.query({ trans: E, values: !1, query: { index: a, range: g }, limit: y }).then(function(w) {
@@ -2505,21 +2505,21 @@ function Ta() {
2505
2505
  var E, g, y, w = L.trans, b = h.keys || jn(a, h);
2506
2506
  if (!b) throw new Error("Keys missing");
2507
2507
  return (h = h.type === "add" || h.type === "put" ? u(u({}, h), { keys: b }) : u({}, h)).type !== "delete" && (h.values = S([], h.values)), h.keys && (h.keys = S([], h.keys)), E = r, y = b, ((g = h).type === "add" ? Promise.resolve([]) : E.getMany({ trans: g.trans, keys: y, cache: "immutable" })).then(function(O) {
2508
- var A = b.map(function(P, x) {
2509
- var R, $, I, T = O[x], N = { onerror: null, onsuccess: null };
2510
- return h.type === "delete" ? f.fire.call(N, P, T, w) : h.type === "add" || T === void 0 ? (R = p.fire.call(N, P, h.values[x], w), P == null && R != null && (h.keys[x] = P = R, a.outbound || fe(h.values[x], a.keyPath, P))) : (R = Mn(T, h.values[x]), ($ = m.fire.call(N, R, P, T, w)) && (I = h.values[x], Object.keys($).forEach(function(C) {
2511
- te(I, C) ? I[C] = $[C] : fe(I, C, $[C]);
2512
- }))), N;
2508
+ var A = b.map(function(P, k) {
2509
+ var I, N, T, C = O[k], j = { onerror: null, onsuccess: null };
2510
+ return h.type === "delete" ? f.fire.call(j, P, C, w) : h.type === "add" || C === void 0 ? (I = p.fire.call(j, P, h.values[k], w), P == null && I != null && (h.keys[k] = P = I, a.outbound || le(h.values[k], a.keyPath, P))) : (I = Mn(C, h.values[k]), (N = m.fire.call(j, I, P, C, w)) && (T = h.values[k], Object.keys(N).forEach(function($) {
2511
+ te(T, $) ? T[$] = N[$] : le(T, $, N[$]);
2512
+ }))), j;
2513
2513
  });
2514
2514
  return r.mutate(h).then(function(P) {
2515
- for (var x = P.failures, R = P.results, $ = P.numFailures, P = P.lastResult, I = 0; I < b.length; ++I) {
2516
- var T = (R || b)[I], N = A[I];
2517
- T == null ? N.onerror && N.onerror(x[I]) : N.onsuccess && N.onsuccess(h.type === "put" && O[I] ? h.values[I] : T);
2515
+ for (var k = P.failures, I = P.results, N = P.numFailures, P = P.lastResult, T = 0; T < b.length; ++T) {
2516
+ var C = (I || b)[T], j = A[T];
2517
+ C == null ? j.onerror && j.onerror(k[T]) : j.onsuccess && j.onsuccess(h.type === "put" && O[T] ? h.values[T] : C);
2518
2518
  }
2519
- return { failures: x, results: R, numFailures: $, lastResult: P };
2519
+ return { failures: k, results: I, numFailures: N, lastResult: P };
2520
2520
  }).catch(function(P) {
2521
- return A.forEach(function(x) {
2522
- return x.onerror && x.onerror(P);
2521
+ return A.forEach(function(k) {
2522
+ return k.onerror && k.onerror(P);
2523
2523
  }), Promise.reject(P);
2524
2524
  });
2525
2525
  });
@@ -2565,7 +2565,7 @@ function Ta() {
2565
2565
  }
2566
2566
  }
2567
2567
  var wa = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
2568
- var t = e.schema.name, r = new oe(e.MIN_KEY, e.MAX_KEY);
2568
+ var t = e.schema.name, r = new ie(e.MIN_KEY, e.MAX_KEY);
2569
2569
  return u(u({}, e), { transaction: function(a, i, o) {
2570
2570
  if (L.subscr && i !== "readonly") throw new G.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(L.querier));
2571
2571
  return e.transaction(a, i, o);
@@ -2573,78 +2573,78 @@ function Ta() {
2573
2573
  var i = e.table(a), o = i.schema, c = o.primaryKey, h = o.indexes, f = c.extractKey, p = c.outbound, m = c.autoIncrement && h.filter(function(g) {
2574
2574
  return g.compound && g.keyPath.includes(c.keyPath);
2575
2575
  }), v = u(u({}, i), { mutate: function(g) {
2576
- function y(C) {
2577
- return C = "idb://".concat(t, "/").concat(a, "/").concat(C), P[C] || (P[C] = new oe());
2576
+ function y($) {
2577
+ return $ = "idb://".concat(t, "/").concat(a, "/").concat($), P[$] || (P[$] = new ie());
2578
2578
  }
2579
- var w, b, O, A = g.trans, P = g.mutatedParts || (g.mutatedParts = {}), x = y(""), R = y(":dels"), $ = g.type, N = g.type === "deleteRange" ? [g.range] : g.type === "delete" ? [g.keys] : g.values.length < 50 ? [jn(c, g).filter(function(C) {
2580
- return C;
2581
- }), g.values] : [], I = N[0], T = N[1], N = g.trans._cache;
2582
- return F(I) ? (x.addKeys(I), (N = $ === "delete" || I.length === T.length ? Or(I, N) : null) || R.addKeys(I), (N || T) && (w = y, b = N, O = T, o.indexes.forEach(function(C) {
2583
- var K = w(C.name || "");
2579
+ var w, b, O, A = g.trans, P = g.mutatedParts || (g.mutatedParts = {}), k = y(""), I = y(":dels"), N = g.type, j = g.type === "deleteRange" ? [g.range] : g.type === "delete" ? [g.keys] : g.values.length < 50 ? [jn(c, g).filter(function($) {
2580
+ return $;
2581
+ }), g.values] : [], T = j[0], C = j[1], j = g.trans._cache;
2582
+ return R(T) ? (k.addKeys(T), (j = N === "delete" || T.length === C.length ? Or(T, j) : null) || I.addKeys(T), (j || C) && (w = y, b = j, O = C, o.indexes.forEach(function($) {
2583
+ var K = w($.name || "");
2584
2584
  function U(H) {
2585
- return H != null ? C.extractKey(H) : null;
2585
+ return H != null ? $.extractKey(H) : null;
2586
2586
  }
2587
2587
  function z(H) {
2588
- return C.multiEntry && F(H) ? H.forEach(function(pe) {
2589
- return K.addKey(pe);
2588
+ return $.multiEntry && R(H) ? H.forEach(function(fe) {
2589
+ return K.addKey(fe);
2590
2590
  }) : K.addKey(H);
2591
2591
  }
2592
- (b || O).forEach(function(H, ce) {
2593
- var W = b && U(b[ce]), ce = O && U(O[ce]);
2594
- Y(W, ce) !== 0 && (W != null && z(W), ce != null && z(ce));
2592
+ (b || O).forEach(function(H, oe) {
2593
+ var F = b && U(b[oe]), oe = O && U(O[oe]);
2594
+ Y(F, oe) !== 0 && (F != null && z(F), oe != null && z(oe));
2595
2595
  });
2596
- }))) : I ? (T = { from: (T = I.lower) !== null && T !== void 0 ? T : e.MIN_KEY, to: (T = I.upper) !== null && T !== void 0 ? T : e.MAX_KEY }, R.add(T), x.add(T)) : (x.add(r), R.add(r), o.indexes.forEach(function(C) {
2597
- return y(C.name).add(r);
2598
- })), i.mutate(g).then(function(C) {
2599
- return !I || g.type !== "add" && g.type !== "put" || (x.addKeys(C.results), m && m.forEach(function(K) {
2600
- for (var U = g.values.map(function(W) {
2601
- return K.extractKey(W);
2602
- }), z = K.keyPath.findIndex(function(W) {
2603
- return W === c.keyPath;
2604
- }), H = 0, pe = C.results.length; H < pe; ++H) U[H][z] = C.results[H];
2596
+ }))) : T ? (C = { from: (C = T.lower) !== null && C !== void 0 ? C : e.MIN_KEY, to: (C = T.upper) !== null && C !== void 0 ? C : e.MAX_KEY }, I.add(C), k.add(C)) : (k.add(r), I.add(r), o.indexes.forEach(function($) {
2597
+ return y($.name).add(r);
2598
+ })), i.mutate(g).then(function($) {
2599
+ return !T || g.type !== "add" && g.type !== "put" || (k.addKeys($.results), m && m.forEach(function(K) {
2600
+ for (var U = g.values.map(function(F) {
2601
+ return K.extractKey(F);
2602
+ }), z = K.keyPath.findIndex(function(F) {
2603
+ return F === c.keyPath;
2604
+ }), H = 0, fe = $.results.length; H < fe; ++H) U[H][z] = $.results[H];
2605
2605
  y(K.name).addKeys(U);
2606
- })), A.mutatedParts = Ht(A.mutatedParts || {}, P), C;
2606
+ })), A.mutatedParts = Ht(A.mutatedParts || {}, P), $;
2607
2607
  });
2608
2608
  } }), h = function(y) {
2609
2609
  var w = y.query, y = w.index, w = w.range;
2610
- return [y, new oe((y = w.lower) !== null && y !== void 0 ? y : e.MIN_KEY, (w = w.upper) !== null && w !== void 0 ? w : e.MAX_KEY)];
2610
+ return [y, new ie((y = w.lower) !== null && y !== void 0 ? y : e.MIN_KEY, (w = w.upper) !== null && w !== void 0 ? w : e.MAX_KEY)];
2611
2611
  }, E = { get: function(g) {
2612
- return [c, new oe(g.key)];
2612
+ return [c, new ie(g.key)];
2613
2613
  }, getMany: function(g) {
2614
- return [c, new oe().addKeys(g.keys)];
2614
+ return [c, new ie().addKeys(g.keys)];
2615
2615
  }, count: h, query: h, openCursor: h };
2616
2616
  return M(E).forEach(function(g) {
2617
2617
  v[g] = function(y) {
2618
2618
  var w = L.subscr, b = !!w, O = Ar(L, i) && Pr(g, y) ? y.obsSet = {} : w;
2619
2619
  if (b) {
2620
- var A = function(T) {
2621
- return T = "idb://".concat(t, "/").concat(a, "/").concat(T), O[T] || (O[T] = new oe());
2622
- }, P = A(""), x = A(":dels"), w = E[g](y), b = w[0], w = w[1];
2623
- if ((g === "query" && b.isPrimaryKey && !y.values ? x : A(b.name || "")).add(w), !b.isPrimaryKey) {
2620
+ var A = function(C) {
2621
+ return C = "idb://".concat(t, "/").concat(a, "/").concat(C), O[C] || (O[C] = new ie());
2622
+ }, P = A(""), k = A(":dels"), w = E[g](y), b = w[0], w = w[1];
2623
+ if ((g === "query" && b.isPrimaryKey && !y.values ? k : A(b.name || "")).add(w), !b.isPrimaryKey) {
2624
2624
  if (g !== "count") {
2625
- var R = g === "query" && p && y.values && i.query(u(u({}, y), { values: !1 }));
2626
- return i[g].apply(this, arguments).then(function(T) {
2625
+ var I = g === "query" && p && y.values && i.query(u(u({}, y), { values: !1 }));
2626
+ return i[g].apply(this, arguments).then(function(C) {
2627
2627
  if (g === "query") {
2628
- if (p && y.values) return R.then(function(U) {
2629
- return U = U.result, P.addKeys(U), T;
2628
+ if (p && y.values) return I.then(function(U) {
2629
+ return U = U.result, P.addKeys(U), C;
2630
2630
  });
2631
- var N = y.values ? T.result.map(f) : T.result;
2632
- (y.values ? P : x).addKeys(N);
2631
+ var j = y.values ? C.result.map(f) : C.result;
2632
+ (y.values ? P : k).addKeys(j);
2633
2633
  } else if (g === "openCursor") {
2634
- var C = T, K = y.values;
2635
- return C && Object.create(C, { key: { get: function() {
2636
- return x.addKey(C.primaryKey), C.key;
2634
+ var $ = C, K = y.values;
2635
+ return $ && Object.create($, { key: { get: function() {
2636
+ return k.addKey($.primaryKey), $.key;
2637
2637
  } }, primaryKey: { get: function() {
2638
- var U = C.primaryKey;
2639
- return x.addKey(U), U;
2638
+ var U = $.primaryKey;
2639
+ return k.addKey(U), U;
2640
2640
  } }, value: { get: function() {
2641
- return K && P.addKey(C.primaryKey), C.value;
2641
+ return K && P.addKey($.primaryKey), $.value;
2642
2642
  } } });
2643
2643
  }
2644
- return T;
2644
+ return C;
2645
2645
  });
2646
2646
  }
2647
- x.add(r);
2647
+ k.add(r);
2648
2648
  }
2649
2649
  }
2650
2650
  return i[g].apply(this, arguments);
@@ -2656,9 +2656,9 @@ function Ta() {
2656
2656
  if (r.numFailures === 0) return t;
2657
2657
  if (t.type === "deleteRange") return null;
2658
2658
  var a = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
2659
- return r.numFailures === a ? null : (t = u({}, t), F(t.keys) && (t.keys = t.keys.filter(function(i, o) {
2659
+ return r.numFailures === a ? null : (t = u({}, t), R(t.keys) && (t.keys = t.keys.filter(function(i, o) {
2660
2660
  return !(o in r.failures);
2661
- })), "values" in t && F(t.values) && (t.values = t.values.filter(function(i, o) {
2661
+ })), "values" in t && R(t.values) && (t.values = t.values.filter(function(i, o) {
2662
2662
  return !(o in r.failures);
2663
2663
  })), t);
2664
2664
  }
@@ -2670,44 +2670,44 @@ function Ta() {
2670
2670
  if (!E || E.length === 0) return e;
2671
2671
  var c = t.query.index, f = c.multiEntry, p = t.query.range, m = a.schema.primaryKey.extractKey, v = c.extractKey, h = (c.lowLevelIndex || c).extractKey, E = E.reduce(function(g, y) {
2672
2672
  var w = g, b = [];
2673
- if (y.type === "add" || y.type === "put") for (var O = new oe(), A = y.values.length - 1; 0 <= A; --A) {
2674
- var P, x = y.values[A], R = m(x);
2675
- O.hasKey(R) || (P = v(x), (f && F(P) ? P.some(function(C) {
2676
- return Bn(C, p);
2677
- }) : Bn(P, p)) && (O.addKey(R), b.push(x)));
2673
+ if (y.type === "add" || y.type === "put") for (var O = new ie(), A = y.values.length - 1; 0 <= A; --A) {
2674
+ var P, k = y.values[A], I = m(k);
2675
+ O.hasKey(I) || (P = v(k), (f && R(P) ? P.some(function($) {
2676
+ return Bn($, p);
2677
+ }) : Bn(P, p)) && (O.addKey(I), b.push(k)));
2678
2678
  }
2679
2679
  switch (y.type) {
2680
2680
  case "add":
2681
- var $ = new oe().addKeys(t.values ? g.map(function(K) {
2681
+ var N = new ie().addKeys(t.values ? g.map(function(K) {
2682
2682
  return m(K);
2683
2683
  }) : g), w = g.concat(t.values ? b.filter(function(K) {
2684
- return K = m(K), !$.hasKey(K) && ($.addKey(K), !0);
2684
+ return K = m(K), !N.hasKey(K) && (N.addKey(K), !0);
2685
2685
  }) : b.map(function(K) {
2686
2686
  return m(K);
2687
2687
  }).filter(function(K) {
2688
- return !$.hasKey(K) && ($.addKey(K), !0);
2688
+ return !N.hasKey(K) && (N.addKey(K), !0);
2689
2689
  }));
2690
2690
  break;
2691
2691
  case "put":
2692
- var I = new oe().addKeys(y.values.map(function(K) {
2692
+ var T = new ie().addKeys(y.values.map(function(K) {
2693
2693
  return m(K);
2694
2694
  }));
2695
2695
  w = g.filter(function(K) {
2696
- return !I.hasKey(t.values ? m(K) : K);
2696
+ return !T.hasKey(t.values ? m(K) : K);
2697
2697
  }).concat(t.values ? b : b.map(function(K) {
2698
2698
  return m(K);
2699
2699
  }));
2700
2700
  break;
2701
2701
  case "delete":
2702
- var T = new oe().addKeys(y.keys);
2702
+ var C = new ie().addKeys(y.keys);
2703
2703
  w = g.filter(function(K) {
2704
- return !T.hasKey(t.values ? m(K) : K);
2704
+ return !C.hasKey(t.values ? m(K) : K);
2705
2705
  });
2706
2706
  break;
2707
2707
  case "deleteRange":
2708
- var N = y.range;
2708
+ var j = y.range;
2709
2709
  w = g.filter(function(K) {
2710
- return !Bn(m(K), N);
2710
+ return !Bn(m(K), j);
2711
2711
  });
2712
2712
  }
2713
2713
  return w;
@@ -2761,16 +2761,16 @@ function Ta() {
2761
2761
  var y = e.table(E), w = g.optimisticOps.filter(function(K) {
2762
2762
  return K.trans === f;
2763
2763
  });
2764
- if (f._explicit && p && f.mutatedParts) for (var b = 0, O = Object.values(g.queries.query); b < O.length; b++) for (var A = 0, P = ($ = O[b]).slice(); A < P.length; A++) In((I = P[A]).obsSet, f.mutatedParts) && (Me($, I), I.subscribers.forEach(function(K) {
2764
+ if (f._explicit && p && f.mutatedParts) for (var b = 0, O = Object.values(g.queries.query); b < O.length; b++) for (var A = 0, P = (N = O[b]).slice(); A < P.length; A++) In((T = P[A]).obsSet, f.mutatedParts) && (Me(N, T), T.subscribers.forEach(function(K) {
2765
2765
  return m.add(K);
2766
2766
  }));
2767
2767
  else if (0 < w.length) {
2768
2768
  g.optimisticOps = g.optimisticOps.filter(function(K) {
2769
2769
  return K.trans !== f;
2770
2770
  });
2771
- for (var x = 0, R = Object.values(g.queries.query); x < R.length; x++) for (var $, I, T, N = 0, C = ($ = R[x]).slice(); N < C.length; N++) (I = C[N]).res != null && f.mutatedParts && (p && !I.dirty ? (T = Object.isFrozen(I.res), T = xr(I.res, I.req, w, y, I, T), I.dirty ? (Me($, I), I.subscribers.forEach(function(K) {
2771
+ for (var k = 0, I = Object.values(g.queries.query); k < I.length; k++) for (var N, T, C, j = 0, $ = (N = I[k]).slice(); j < $.length; j++) (T = $[j]).res != null && f.mutatedParts && (p && !T.dirty ? (C = Object.isFrozen(T.res), C = xr(T.res, T.req, w, y, T, C), T.dirty ? (Me(N, T), T.subscribers.forEach(function(K) {
2772
2772
  return m.add(K);
2773
- })) : T !== I.res && (I.res = T, I.promise = B.resolve({ result: T }))) : (I.dirty && Me($, I), I.subscribers.forEach(function(K) {
2773
+ })) : C !== T.res && (T.res = C, T.promise = B.resolve({ result: C }))) : (T.dirty && Me(N, T), T.subscribers.forEach(function(K) {
2774
2774
  return m.add(K);
2775
2775
  })));
2776
2776
  }
@@ -2797,7 +2797,7 @@ function Ta() {
2797
2797
  })) : c.then(function(p) {
2798
2798
  var m = Dr(0, u(u({}, o), { values: o.values.map(function(v, h) {
2799
2799
  var E;
2800
- return p.failures[h] ? v : (v = (E = i.keyPath) !== null && E !== void 0 && E.includes(".") ? Ne(v) : u({}, v), fe(v, i.keyPath, p.results[h]), v);
2800
+ return p.failures[h] ? v : (v = (E = i.keyPath) !== null && E !== void 0 && E.includes(".") ? Ne(v) : u({}, v), le(v, i.keyPath, p.results[h]), v);
2801
2801
  }) }), p);
2802
2802
  f.optimisticOps.push(m), queueMicrotask(function() {
2803
2803
  return o.mutatedParts && Yt(o.mutatedParts);
@@ -2813,16 +2813,16 @@ function Ta() {
2813
2813
  if (!P) return [null, !1, A, null];
2814
2814
  switch (b) {
2815
2815
  case "query":
2816
- var x = P.find(function(R) {
2817
- return R.req.limit === O.limit && R.req.values === O.values && kr(R.req.query.range, O.query.range);
2816
+ var k = P.find(function(I) {
2817
+ return I.req.limit === O.limit && I.req.values === O.values && kr(I.req.query.range, O.query.range);
2818
2818
  });
2819
- return x ? [x, !0, A, P] : [P.find(function(R) {
2820
- return ("limit" in R.req ? R.req.limit : 1 / 0) >= O.limit && (!O.values || R.req.values) && Ea(R.req.query.range, O.query.range);
2819
+ return k ? [k, !0, A, P] : [P.find(function(I) {
2820
+ return ("limit" in I.req ? I.req.limit : 1 / 0) >= O.limit && (!O.values || I.req.values) && Ea(I.req.query.range, O.query.range);
2821
2821
  }), !1, A, P];
2822
2822
  case "count":
2823
- return x = P.find(function(R) {
2824
- return kr(R.req.query.range, O.query.range);
2825
- }), [x, !!x, A, P];
2823
+ return k = P.find(function(I) {
2824
+ return kr(I.req.query.range, O.query.range);
2825
+ }), [k, !!k, A, P];
2826
2826
  }
2827
2827
  }(t, r, "query", o), v = m[0], h = m[1], E = m[2], g = m[3];
2828
2828
  return v && h ? v.obsSet = o.obsSet : (h = a.query(o).then(function(y) {
@@ -2840,7 +2840,7 @@ function Ta() {
2840
2840
  } });
2841
2841
  } });
2842
2842
  } };
2843
- function Xt(e, t) {
2843
+ function Jt(e, t) {
2844
2844
  return new Proxy(e, { get: function(r, a, i) {
2845
2845
  return a === "db" ? t : Reflect.get(r, a, i);
2846
2846
  } });
@@ -2859,7 +2859,7 @@ function Ta() {
2859
2859
  if (t._state.openComplete) return a(new G.DatabaseClosed(t._state.dbOpenError));
2860
2860
  if (!t._state.isBeingOpened) {
2861
2861
  if (!t._state.autoOpen) return void a(new G.DatabaseClosed());
2862
- t.open().catch(Z);
2862
+ t.open().catch(Q);
2863
2863
  }
2864
2864
  t._state.dbReadyPromise.then(r, a);
2865
2865
  }).then(e);
@@ -2905,8 +2905,8 @@ function Ta() {
2905
2905
  var f = t._deps.indexedDB.deleteDatabase(t.name);
2906
2906
  f.onsuccess = ee(function() {
2907
2907
  var p, m, v;
2908
- p = t._deps, m = t.name, v = p.indexedDB, p = p.IDBKeyRange, xn(v) || m === $t || Dn(v, p).delete(m).catch(Z), i();
2909
- }), f.onerror = ye(o), f.onblocked = t._fireOnBlocked;
2908
+ p = t._deps, m = t.name, v = p.indexedDB, p = p.IDBKeyRange, xn(v) || m === $t || Dn(v, p).delete(m).catch(Q), i();
2909
+ }), f.onerror = be(o), f.onblocked = t._fireOnBlocked;
2910
2910
  }
2911
2911
  if (r) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
2912
2912
  a.isBeingOpened ? a.dbReadyPromise.then(c) : c();
@@ -2932,7 +2932,7 @@ function Ta() {
2932
2932
  var i = arguments.length;
2933
2933
  if (i < 2) throw new G.InvalidArgument("Too few arguments");
2934
2934
  for (var o = new Array(i - 1); --i; ) o[i - 1] = arguments[i];
2935
- return a = o.pop(), [t, Xn(o), a];
2935
+ return a = o.pop(), [t, Jn(o), a];
2936
2936
  }).apply(this, arguments);
2937
2937
  return this._transaction.apply(this, e);
2938
2938
  }, re.prototype._transaction = function(e, t, r) {
@@ -3006,12 +3006,12 @@ function Ta() {
3006
3006
  this._middlewares = {}, this.verno = 0;
3007
3007
  var a = re.dependencies;
3008
3008
  this._options = t = u({ addons: re.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;
3009
- var i, o, c, f, p, m = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Z, dbReadyPromise: null, cancelOpen: Z, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
3009
+ var i, o, c, f, p, m = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
3010
3010
  m.dbReadyPromise = new B(function(h) {
3011
3011
  m.dbReadyResolve = h;
3012
3012
  }), m.openCanceller = new B(function(h, E) {
3013
3013
  m.cancelOpen = E;
3014
- }), this._state = m, this.name = e, this.on = ht(this, "populate", "blocked", "versionchange", "close", { ready: [sn, Z] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(h) {
3014
+ }), this._state = m, this.name = e, this.on = ht(this, "populate", "blocked", "versionchange", "close", { ready: [sn, Q] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(h) {
3015
3015
  return function(E, g) {
3016
3016
  re.vip(function() {
3017
3017
  var y, w = r._state;
@@ -3031,7 +3031,7 @@ function Ta() {
3031
3031
  var w = O._ctx, b = w.table, O = b.hook.reading.fire;
3032
3032
  this._ctx = { table: b, index: w.index, isPrimKey: !w.index || b.schema.primKey.keyPath && w.index === b.schema.primKey.name, range: g, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: y, or: w.or, valueMapper: O !== ct ? O : null };
3033
3033
  })), this.Table = (o = this, pt(lr.prototype, function(h, E, g) {
3034
- this.db = o, this._tx = g, this.name = h, this.schema = E, this.hook = o._allTables[h] ? o._allTables[h].hook : ht(null, { creating: [Jr, Z], reading: [Xr, ct], updating: [Vr, Z], deleting: [Zr, Z] });
3034
+ this.db = o, this._tx = g, this.name = h, this.schema = E, this.hook = o._allTables[h] ? o._allTables[h].hook : ht(null, { creating: [Qr, Q], reading: [Jr, ct], updating: [Vr, Q], deleting: [Zr, Q] });
3035
3035
  })), this.Transaction = (c = this, pt(ca.prototype, function(h, E, g, y, w) {
3036
3036
  var b = this;
3037
3037
  this.db = c, this.mode = h, this.storeNames = E, this.schema = g, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ht(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(O, A) {
@@ -3068,31 +3068,31 @@ function Ta() {
3068
3068
  var v = new Proxy(this, { get: function(h, E, g) {
3069
3069
  if (E === "_vip") return !0;
3070
3070
  if (E === "table") return function(w) {
3071
- return Xt(r.table(w), v);
3071
+ return Jt(r.table(w), v);
3072
3072
  };
3073
3073
  var y = Reflect.get(h, E, g);
3074
- return y instanceof lr ? Xt(y, v) : E === "tables" ? y.map(function(w) {
3075
- return Xt(w, v);
3074
+ return y instanceof lr ? Jt(y, v) : E === "tables" ? y.map(function(w) {
3075
+ return Jt(w, v);
3076
3076
  }) : E === "_createTransaction" ? function() {
3077
- return Xt(y.apply(this, arguments), v);
3077
+ return Jt(y.apply(this, arguments), v);
3078
3078
  } : y;
3079
3079
  } });
3080
3080
  this.vip = v, a.forEach(function(h) {
3081
3081
  return h(r);
3082
3082
  });
3083
3083
  }
3084
- var Jt, ge = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Oa = (Kn.prototype.subscribe = function(e, t, r) {
3084
+ var Qt, he = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Oa = (Kn.prototype.subscribe = function(e, t, r) {
3085
3085
  return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: r });
3086
- }, Kn.prototype[ge] = function() {
3086
+ }, Kn.prototype[he] = function() {
3087
3087
  return this;
3088
3088
  }, Kn);
3089
3089
  function Kn(e) {
3090
3090
  this._subscribe = e;
3091
3091
  }
3092
3092
  try {
3093
- Jt = { indexedDB: k.indexedDB || k.mozIndexedDB || k.webkitIndexedDB || k.msIndexedDB, IDBKeyRange: k.IDBKeyRange || k.webkitIDBKeyRange };
3093
+ Qt = { indexedDB: x.indexedDB || x.mozIndexedDB || x.webkitIndexedDB || x.msIndexedDB, IDBKeyRange: x.IDBKeyRange || x.webkitIDBKeyRange };
3094
3094
  } catch {
3095
- Jt = { indexedDB: null, IDBKeyRange: null };
3095
+ Qt = { indexedDB: null, IDBKeyRange: null };
3096
3096
  }
3097
3097
  function Rr(e) {
3098
3098
  var t, r = !1, a = new Oa(function(i) {
@@ -3108,18 +3108,18 @@ function Ta() {
3108
3108
  Ht(p, w), In(m, p) && E();
3109
3109
  }, y = function() {
3110
3110
  var w, b, O;
3111
- !f && Jt.indexedDB && (p = {}, w = {}, c && c.abort(), c = new AbortController(), O = function(A) {
3111
+ !f && Qt.indexedDB && (p = {}, w = {}, c && c.abort(), c = new AbortController(), O = function(A) {
3112
3112
  var P = qe();
3113
3113
  try {
3114
3114
  o && tt();
3115
- var x = De(e, A);
3116
- return x = o ? x.finally(xe) : x;
3115
+ var k = De(e, A);
3116
+ return k = o ? k.finally(xe) : k;
3117
3117
  } finally {
3118
3118
  P && et();
3119
3119
  }
3120
3120
  }(b = { subscr: w, signal: c.signal, requery: E, querier: e, trans: null }), Promise.resolve(O).then(function(A) {
3121
3121
  r = !0, t = A, f || b.signal.aborted || (p = {}, function(P) {
3122
- for (var x in P) if (te(P, x)) return;
3122
+ for (var k in P) if (te(P, k)) return;
3123
3123
  return 1;
3124
3124
  }(m = w) || h || (Ie(bt, g), h = !0), pn(function() {
3125
3125
  return !f && i.next && i.next(A);
@@ -3147,7 +3147,7 @@ function Ta() {
3147
3147
  Te = t;
3148
3148
  }
3149
3149
  }
3150
- le(He, u(u({}, At), { delete: function(e) {
3150
+ pe(He, u(u({}, At), { delete: function(e) {
3151
3151
  return new He(e, { addons: [] }).delete();
3152
3152
  }, exists: function(e) {
3153
3153
  return new He(e, { addons: [] }).open().then(function(t) {
@@ -3170,7 +3170,7 @@ function Ta() {
3170
3170
  var t, r;
3171
3171
  }, defineClass: function() {
3172
3172
  return function(e) {
3173
- j(this, e);
3173
+ W(this, e);
3174
3174
  };
3175
3175
  }, ignoreTransaction: function(e) {
3176
3176
  return L.trans ? Fe(L.transless, e) : e();
@@ -3195,14 +3195,14 @@ function Ta() {
3195
3195
  } }, waitFor: function(e, t) {
3196
3196
  return t = B.resolve(typeof e == "function" ? He.ignoreTransaction(e) : e).timeout(t || 6e4), L.trans ? L.trans.waitFor(t) : t;
3197
3197
  }, Promise: B, debug: { get: function() {
3198
- return be;
3198
+ return me;
3199
3199
  }, set: function(e) {
3200
3200
  qn(e);
3201
- } }, derive: Xe, extend: j, props: le, override: Hn, Events: ht, on: Ie, liveQuery: Rr, extendObservabilitySet: Ht, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
3202
- typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(r) {
3203
- fe(e, r, void 0);
3201
+ } }, derive: Je, extend: W, props: pe, override: Hn, Events: ht, on: Ie, liveQuery: Rr, extendObservabilitySet: Ht, getByKeyPath: we, setByKeyPath: le, delByKeyPath: function(e, t) {
3202
+ typeof t == "string" ? le(e, t, void 0) : "length" in t && [].map.call(t, function(r) {
3203
+ le(e, r, void 0);
3204
3204
  });
3205
- }, shallowClone: Qn, deepClone: Ne, getObjectDiff: Mn, cmp: Y, asap: Yn, minKey: -1 / 0, addons: [], connections: nt, errnames: an, dependencies: Jt, cache: ze, semVer: "4.0.11", version: "4.0.11".split(".").map(function(e) {
3205
+ }, shallowClone: Xn, deepClone: Ne, getObjectDiff: Mn, cmp: Y, asap: Yn, minKey: -1 / 0, addons: [], connections: nt, errnames: an, dependencies: Qt, cache: ze, semVer: "4.0.11", version: "4.0.11".split(".").map(function(e) {
3206
3206
  return parseInt(e);
3207
3207
  }).reduce(function(e, t, r) {
3208
3208
  return e + t / Math.pow(10, 2 * r);
@@ -3221,22 +3221,22 @@ function Ta() {
3221
3221
  Te || st.postMessage(e);
3222
3222
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3223
3223
  if (!_e.disableBfCache && e.persisted) {
3224
- be && console.debug("Dexie: handling persisted pagehide"), st != null && st.close();
3224
+ me && console.debug("Dexie: handling persisted pagehide"), st != null && st.close();
3225
3225
  for (var t = 0, r = nt; t < r.length; t++) r[t].close({ disableAutoOpen: !1 });
3226
3226
  }
3227
3227
  }), addEventListener("pageshow", function(e) {
3228
- !_e.disableBfCache && e.persisted && (be && console.debug("Dexie: handling persisted pageshow"), Ir(), Ln({ all: new oe(-1 / 0, [[]]) }));
3228
+ !_e.disableBfCache && e.persisted && (me && console.debug("Dexie: handling persisted pageshow"), Ir(), Ln({ all: new ie(-1 / 0, [[]]) }));
3229
3229
  })), B.rejectionMapper = function(e, t) {
3230
3230
  return !e || e instanceof Ze || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Vn[e.name] ? e : (t = new Vn[e.name](t || e.message, e), "stack" in e && Ae(t, "stack", { get: function() {
3231
3231
  return this.inner.stack;
3232
3232
  } }), t);
3233
- }, qn(be), u(_e, Object.freeze({ __proto__: null, Dexie: _e, liveQuery: Rr, Entity: or, cmp: Y, PropModification: gt, replacePrefix: function(e, t) {
3233
+ }, qn(me), u(_e, Object.freeze({ __proto__: null, Dexie: _e, liveQuery: Rr, Entity: or, cmp: Y, PropModification: gt, replacePrefix: function(e, t) {
3234
3234
  return new gt({ replacePrefix: [e, t] });
3235
3235
  }, add: function(e) {
3236
3236
  return new gt({ add: e });
3237
3237
  }, remove: function(e) {
3238
3238
  return new gt({ remove: e });
3239
- }, default: _e, RangeSet: oe, mergeRanges: Et, rangesOverlap: wr }), { default: _e }), _e;
3239
+ }, default: _e, RangeSet: ie, mergeRanges: Et, rangesOverlap: wr }), { default: _e }), _e;
3240
3240
  });
3241
3241
  }(qt)), qt.exports;
3242
3242
  }
@@ -3244,7 +3244,7 @@ var Ca = Ta();
3244
3244
  const Un = /* @__PURE__ */ Ra(Ca), Cr = Symbol.for("Dexie"), en = globalThis[Cr] || (globalThis[Cr] = Un);
3245
3245
  if (Un.semVer !== en.semVer)
3246
3246
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${en.semVer}`);
3247
- function X(d) {
3247
+ function J(d) {
3248
3248
  let n = `${d.type}.${d.topics}`;
3249
3249
  return d.order && (n += `.${d.order}`), d.period && (n += `.${d.period}`), n;
3250
3250
  }
@@ -3257,11 +3257,11 @@ function $r(d) {
3257
3257
  return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
3258
3258
  }
3259
3259
  function St(d, n) {
3260
- var F;
3261
- let s, u, S, k, M;
3260
+ var R;
3261
+ let s, u, S, x, M;
3262
3262
  switch (d.moderation) {
3263
3263
  case Vt.BEFORE:
3264
- s = /* @__PURE__ */ new Date(), u = (F = d.beforeTime) == null ? void 0 : F.split(":"), S = Number.parseInt(u ? u[0] : "00"), k = Number.parseInt(u ? u[1] : "00"), M = Number.parseInt(u ? u[2] : "00"), n.before = s.setHours(S, k, M, 0) / 1e3, n.period || (n.period = s.getDay() === 1 ? 72 : 24);
3264
+ s = /* @__PURE__ */ new Date(), u = (R = d.beforeTime) == null ? void 0 : R.split(":"), S = Number.parseInt(u ? u[0] : "00"), x = Number.parseInt(u ? u[1] : "00"), M = Number.parseInt(u ? u[2] : "00"), n.before = s.setHours(S, x, M, 0) / 1e3, n.period || (n.period = s.getDay() === 1 ? 72 : 24);
3265
3265
  break;
3266
3266
  case Vt.DELAYED:
3267
3267
  d.delay && d.delay > 0 && (n.delay = `${d.delay}`);
@@ -3335,18 +3335,18 @@ class Nr {
3335
3335
  _(this, "getMessages", async (n) => {
3336
3336
  const s = (n == null ? void 0 : n.order) ?? "utc";
3337
3337
  s !== "utc" && (n.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? n.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : n.before = Math.floor(Date.now() / 1e3);
3338
- const u = (M) => M.utc > ((n == null ? void 0 : n.since) || 0), S = (M) => M.utc < ((n == null ? void 0 : n.before) || Date.now() / 1e3), k = (M) => (M == null ? void 0 : M.visible) !== 0;
3338
+ const u = (M) => M.utc > ((n == null ? void 0 : n.since) || 0), S = (M) => M.utc < ((n == null ? void 0 : n.before) || Date.now() / 1e3), x = (M) => (M == null ? void 0 : M.visible) !== 0;
3339
3339
  try {
3340
- const F = await this.db.table(D.TOPICS).where("widget_id").equals(n.widget).filter(k).filter(u).filter(S).reverse().limit((n == null ? void 0 : n.limit) ?? 25).sortBy(s);
3341
- if (F.length === 0)
3340
+ const R = await this.db.table(D.TOPICS).where("widget_id").equals(n.widget).filter(x).filter(u).filter(S).reverse().limit((n == null ? void 0 : n.limit) ?? 25).sortBy(s);
3341
+ if (R.length === 0)
3342
3342
  return { data: null, message: "No Messages error", success: !1 };
3343
- let j = F.map((J) => this.db.table(D.MESSAGES).get({ id: J.message_id }));
3344
- return en.Promise.all(j).then(async (J) => {
3345
- const ie = J.map((le) => le.data), te = {
3343
+ let W = R.map((Z) => this.db.table(D.MESSAGES).get({ id: Z.message_id }));
3344
+ return en.Promise.all(W).then(async (Z) => {
3345
+ const ve = Z.map((pe) => pe.data), te = {
3346
3346
  data: {
3347
3347
  presentation: (n == null ? void 0 : n.presentation) || "not set",
3348
3348
  slide: (n == null ? void 0 : n.slide) || "not set",
3349
- messages: ie,
3349
+ messages: ve,
3350
3350
  dashboard: n.dashboard,
3351
3351
  widget: n.widget,
3352
3352
  query: n
@@ -3408,53 +3408,53 @@ class Nr {
3408
3408
  return 400;
3409
3409
  const u = s.data.title;
3410
3410
  let S = 0;
3411
- return s.data.messages.forEach(async (k) => {
3412
- var M, F, j, J, ie, te, le;
3413
- k.id !== null && (await this.db.table(D.MESSAGES).put({
3414
- id: k.id,
3415
- utc: k.utc,
3416
- data: k,
3417
- expires: k.expires
3418
- }).catch((Qe) => {
3411
+ return s.data.messages.forEach(async (x) => {
3412
+ var M, R, W, Z, ve, te, pe;
3413
+ x.id !== null && (await this.db.table(D.MESSAGES).put({
3414
+ id: x.id,
3415
+ utc: x.utc,
3416
+ data: x,
3417
+ expires: x.expires
3418
+ }).catch((Xe) => {
3419
3419
  S++, console.error(
3420
3420
  "%cstorage",
3421
3421
  l.STORAGE,
3422
3422
  "set message",
3423
3423
  `title: ${u}`,
3424
- k,
3425
- Qe.message
3424
+ x,
3425
+ Xe.message
3426
3426
  );
3427
3427
  }), await this.db.table(D.TOPICS).put({
3428
3428
  title: u,
3429
3429
  widget_id: n.widget,
3430
- message_id: k.id,
3430
+ message_id: x.id,
3431
3431
  dashboard_id: n.dashboard,
3432
- engagement: ((M = k.topics[0]) == null ? void 0 : M.engagement) || ((F = k.dynamics) == null ? void 0 : F.engagement) || 0,
3433
- impressions: ((j = k.topics[0]) == null ? void 0 : j.impressions) || ((J = k.dynamics) == null ? void 0 : J.semrush_visits) || 0,
3434
- reach: ((ie = k.topics[0]) == null ? void 0 : ie.reach) || ((te = k.dynamics) == null ? void 0 : te.potential_reach) || 0,
3435
- sentiment: ((le = k.topics[0]) == null ? void 0 : le.sentiment) || 0,
3436
- utc: k.utc,
3437
- expires: k.expires
3438
- }).catch((Qe) => {
3432
+ engagement: ((M = x.topics[0]) == null ? void 0 : M.engagement) || ((R = x.dynamics) == null ? void 0 : R.engagement) || 0,
3433
+ impressions: ((W = x.topics[0]) == null ? void 0 : W.impressions) || ((Z = x.dynamics) == null ? void 0 : Z.semrush_visits) || 0,
3434
+ reach: ((ve = x.topics[0]) == null ? void 0 : ve.reach) || ((te = x.dynamics) == null ? void 0 : te.potential_reach) || 0,
3435
+ sentiment: ((pe = x.topics[0]) == null ? void 0 : pe.sentiment) || 0,
3436
+ utc: x.utc,
3437
+ expires: x.expires
3438
+ }).catch((Xe) => {
3439
3439
  S++, console.error(
3440
3440
  "%cstorage",
3441
3441
  l.STORAGE,
3442
3442
  "set topic",
3443
3443
  `title: ${u}`,
3444
- k,
3445
- Qe.message
3444
+ x,
3445
+ Xe.message
3446
3446
  );
3447
3447
  }));
3448
- }), s.data.topics.forEach(async (k) => {
3449
- const M = k.message_id, F = k.visible ? 1 : 0, j = k.title;
3450
- await this.db.table(D.TOPICS).where("message_id").equals(M).modify({ visible: F }).catch((J) => {
3448
+ }), s.data.topics.forEach(async (x) => {
3449
+ const M = x.message_id, R = x.visible ? 1 : 0, W = x.title;
3450
+ await this.db.table(D.TOPICS).where("message_id").equals(M).modify({ visible: R }).catch((Z) => {
3451
3451
  S++, console.error(
3452
3452
  "%cstorage",
3453
3453
  l.STORAGE,
3454
3454
  "update message visibility",
3455
- `title: ${j}`,
3456
- `widget: ${k.widget_id}`,
3457
- J.message
3455
+ `title: ${W}`,
3456
+ `widget: ${x.widget_id}`,
3457
+ Z.message
3458
3458
  );
3459
3459
  });
3460
3460
  }), S === 0 ? 201 : 400;
@@ -3463,19 +3463,19 @@ class Nr {
3463
3463
  * Wipe Message data after expires timestamp
3464
3464
  */
3465
3465
  _(this, "cleanMessages", async () => {
3466
- const n = Date.now() / 1e3, s = (k) => k.expires < n, u = (k) => k.expires < n;
3467
- return await this.db.table(D.TOPICS).orderBy("expires").filter(s).delete().catch((k) => (console.error(
3466
+ const n = Date.now() / 1e3, s = (x) => x.expires < n, u = (x) => x.expires < n;
3467
+ return await this.db.table(D.TOPICS).orderBy("expires").filter(s).delete().catch((x) => (console.error(
3468
3468
  "%cstorage%c %cclean",
3469
3469
  l.STORAGE,
3470
3470
  l.NONE,
3471
3471
  l.MESSAGES,
3472
- k.message
3473
- ), 0)), await this.db.table(D.MESSAGES).orderBy("expires").filter(u).delete().catch((k) => (console.error(
3472
+ x.message
3473
+ ), 0)), await this.db.table(D.MESSAGES).orderBy("expires").filter(u).delete().catch((x) => (console.error(
3474
3474
  "%cstorage%c %clean",
3475
3475
  l.STORAGE,
3476
3476
  l.NONE,
3477
3477
  l.MESSAGES,
3478
- k.message
3478
+ x.message
3479
3479
  ), 0));
3480
3480
  });
3481
3481
  _(this, "hideMessage", async (n, s) => {
@@ -3758,7 +3758,7 @@ function $a(d, n) {
3758
3758
  const s = indexedDB.open(d);
3759
3759
  s.onupgradeneeded = () => s.result.createObjectStore(n);
3760
3760
  const u = zn(s);
3761
- return (S, k) => u.then((M) => k(M.transaction(n, S).objectStore(n)));
3761
+ return (S, x) => u.then((M) => x(M.transaction(n, S).objectStore(n)));
3762
3762
  }
3763
3763
  let Fn;
3764
3764
  function Mr() {
@@ -3775,15 +3775,15 @@ class jr {
3775
3775
  _(this, "subscribers", []);
3776
3776
  _(this, "options");
3777
3777
  _(this, "getCloud", async (n) => {
3778
- const s = X(n);
3778
+ const s = J(n);
3779
3779
  return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.CLOUD, n.slide, n.widget), { data: null, message: "Cloud Data error", success: !1 }));
3780
3780
  });
3781
3781
  _(this, "getSeries", async (n) => {
3782
- const s = X(n);
3782
+ const s = J(n);
3783
3783
  return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.SERIES, n.slide, n.widget), { data: null, message: "Series Data error", success: !1 }));
3784
3784
  });
3785
3785
  _(this, "getMessages", async (n) => {
3786
- const s = X(n);
3786
+ const s = J(n);
3787
3787
  return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.MESSAGES, n.slide, n.widget), { data: null, message: "Messages Data error", success: !1 }));
3788
3788
  });
3789
3789
  /**
@@ -3795,7 +3795,7 @@ class jr {
3795
3795
  _(this, "setCloud", async (n, s) => {
3796
3796
  if (!s.success)
3797
3797
  return 400;
3798
- const u = X(n);
3798
+ const u = J(n);
3799
3799
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3800
3800
  "%cstorage",
3801
3801
  l.STORAGE,
@@ -3813,7 +3813,7 @@ class jr {
3813
3813
  _(this, "setSeries", async (n, s) => {
3814
3814
  if (!s.success)
3815
3815
  return 400;
3816
- const u = X(n);
3816
+ const u = J(n);
3817
3817
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3818
3818
  "%cstorage",
3819
3819
  l.STORAGE,
@@ -3831,7 +3831,7 @@ class jr {
3831
3831
  _(this, "setMessages", async (n, s) => {
3832
3832
  if (!s.success)
3833
3833
  return 400;
3834
- const u = X(n);
3834
+ const u = J(n);
3835
3835
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3836
3836
  "%cstorage",
3837
3837
  l.STORAGE,
@@ -3847,7 +3847,7 @@ class jr {
3847
3847
  );
3848
3848
  });
3849
3849
  _(this, "getDashboard", async (n) => {
3850
- const s = X(n);
3850
+ const s = J(n);
3851
3851
  return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3852
3852
  data: null,
3853
3853
  message: `Widget ${n.data.id} load error: ${u.message}`,
@@ -3860,7 +3860,7 @@ class jr {
3860
3860
  * @returns number
3861
3861
  */
3862
3862
  _(this, "setDashboard", async (n) => {
3863
- const s = X(n), u = {
3863
+ const s = J(n), u = {
3864
3864
  id: n.dashboard,
3865
3865
  name: n.name
3866
3866
  };
@@ -3881,7 +3881,7 @@ class jr {
3881
3881
  }));
3882
3882
  });
3883
3883
  _(this, "getWidget", async (n) => {
3884
- const s = X(n);
3884
+ const s = J(n);
3885
3885
  return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3886
3886
  data: null,
3887
3887
  message: `Widget ${n.data.id} load error: ${u.message}`,
@@ -3894,7 +3894,7 @@ class jr {
3894
3894
  * @returns number
3895
3895
  */
3896
3896
  _(this, "setWidget", async (n) => {
3897
- const s = X(n), u = {
3897
+ const s = J(n), u = {
3898
3898
  id: n.widget,
3899
3899
  name: n.name,
3900
3900
  dashboard_id: n.dashboard,
@@ -3937,7 +3937,7 @@ class jr {
3937
3937
  */
3938
3938
  _(this, "getSubscribers", async () => await new Promise((n) => n(this.subscribers)));
3939
3939
  _(this, "getSlide", async (n) => {
3940
- const s = X(n);
3940
+ const s = J(n);
3941
3941
  return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3942
3942
  data: null,
3943
3943
  message: `Slide ${n.data.id} load error: ${u.message}`,
@@ -3950,7 +3950,7 @@ class jr {
3950
3950
  * @returns number
3951
3951
  */
3952
3952
  _(this, "setSlide", async (n) => {
3953
- const s = X(n), u = {
3953
+ const s = J(n), u = {
3954
3954
  id: n.data.id,
3955
3955
  title: n.data.title || "Not set",
3956
3956
  json: n.data.json || {},
@@ -3973,7 +3973,7 @@ class jr {
3973
3973
  }));
3974
3974
  });
3975
3975
  _(this, "getPresentation", async (n) => {
3976
- const s = X(n);
3976
+ const s = J(n);
3977
3977
  return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.PRESENTATION, n.id), {
3978
3978
  data: null,
3979
3979
  message: `Slide ${n.data.id} load error: ${u.message}`,
@@ -3986,7 +3986,7 @@ class jr {
3986
3986
  * @returns number
3987
3987
  */
3988
3988
  _(this, "setPresentation", async (n) => {
3989
- const s = X(n), u = n.data;
3989
+ const s = J(n), u = n.data;
3990
3990
  return await $e(s, u).then(() => ({
3991
3991
  data: null,
3992
3992
  message: `Presentation ${n.data.id} saved to storage`,
@@ -4036,7 +4036,7 @@ class Br {
4036
4036
  _(this, "subscribers", []);
4037
4037
  _(this, "options");
4038
4038
  _(this, "getCloud", async (n) => {
4039
- const s = X(n);
4039
+ const s = J(n);
4040
4040
  try {
4041
4041
  return localStorage.getObject(s);
4042
4042
  } catch (u) {
@@ -4051,7 +4051,7 @@ class Br {
4051
4051
  }
4052
4052
  });
4053
4053
  _(this, "getSeries", async (n) => {
4054
- const s = X(n);
4054
+ const s = J(n);
4055
4055
  try {
4056
4056
  return localStorage.getObject(s);
4057
4057
  } catch (u) {
@@ -4066,7 +4066,7 @@ class Br {
4066
4066
  }
4067
4067
  });
4068
4068
  _(this, "getMessages", async (n) => {
4069
- const s = X(n);
4069
+ const s = J(n);
4070
4070
  try {
4071
4071
  return localStorage.getObject(s);
4072
4072
  } catch (u) {
@@ -4087,7 +4087,7 @@ class Br {
4087
4087
  * @returns number
4088
4088
  */
4089
4089
  _(this, "setCloud", async (n, s) => {
4090
- const u = X(n);
4090
+ const u = J(n);
4091
4091
  try {
4092
4092
  return localStorage.setObject(u, s), 201;
4093
4093
  } catch (S) {
@@ -4101,7 +4101,7 @@ class Br {
4101
4101
  * @returns number
4102
4102
  */
4103
4103
  _(this, "setSeries", async (n, s) => {
4104
- const u = X(n);
4104
+ const u = J(n);
4105
4105
  try {
4106
4106
  return localStorage.setObject(u, s), 201;
4107
4107
  } catch (S) {
@@ -4115,7 +4115,7 @@ class Br {
4115
4115
  * @returns number
4116
4116
  */
4117
4117
  _(this, "setMessages", async (n, s) => {
4118
- const u = X(n);
4118
+ const u = J(n);
4119
4119
  try {
4120
4120
  return localStorage.setObject(u, s), 200;
4121
4121
  } catch (S) {
@@ -4307,7 +4307,7 @@ class Kr {
4307
4307
  _(this, "subscribers", []);
4308
4308
  _(this, "options");
4309
4309
  _(this, "getCloud", async (n) => {
4310
- const s = X(n);
4310
+ const s = J(n);
4311
4311
  try {
4312
4312
  return sessionStorage.getObject(s);
4313
4313
  } catch (u) {
@@ -4322,7 +4322,7 @@ class Kr {
4322
4322
  }
4323
4323
  });
4324
4324
  _(this, "getSeries", async (n) => {
4325
- const s = X(n);
4325
+ const s = J(n);
4326
4326
  try {
4327
4327
  return sessionStorage.getObject(s);
4328
4328
  } catch (u) {
@@ -4337,7 +4337,7 @@ class Kr {
4337
4337
  }
4338
4338
  });
4339
4339
  _(this, "getMessages", async (n) => {
4340
- const s = X(n);
4340
+ const s = J(n);
4341
4341
  try {
4342
4342
  return sessionStorage.getObject(s);
4343
4343
  } catch (u) {
@@ -4358,7 +4358,7 @@ class Kr {
4358
4358
  * @returns number
4359
4359
  */
4360
4360
  _(this, "setCloud", async (n, s) => {
4361
- const u = X(n);
4361
+ const u = J(n);
4362
4362
  try {
4363
4363
  return sessionStorage.setObject(u, s), 201;
4364
4364
  } catch (S) {
@@ -4372,7 +4372,7 @@ class Kr {
4372
4372
  * @returns number
4373
4373
  */
4374
4374
  _(this, "setSeries", async (n, s) => {
4375
- const u = X(n);
4375
+ const u = J(n);
4376
4376
  try {
4377
4377
  return sessionStorage.setObject(u, s), 201;
4378
4378
  } catch (S) {
@@ -4386,7 +4386,7 @@ class Kr {
4386
4386
  * @returns number
4387
4387
  */
4388
4388
  _(this, "setMessages", async (n, s) => {
4389
- const u = X(n);
4389
+ const u = J(n);
4390
4390
  try {
4391
4391
  return sessionStorage.setObject(u, s), 200;
4392
4392
  } catch (S) {
@@ -4583,7 +4583,7 @@ class Lr {
4583
4583
  _(this, "subscribers", []);
4584
4584
  _(this, "options");
4585
4585
  _(this, "getCloud", async (n) => {
4586
- const s = X(n);
4586
+ const s = J(n);
4587
4587
  try {
4588
4588
  return window.BuzzCasting.WidgetData[s];
4589
4589
  } catch (u) {
@@ -4598,7 +4598,7 @@ class Lr {
4598
4598
  }
4599
4599
  });
4600
4600
  _(this, "getSeries", async (n) => {
4601
- const s = X(n);
4601
+ const s = J(n);
4602
4602
  try {
4603
4603
  return window.BuzzCasting.WidgetData[s];
4604
4604
  } catch (u) {
@@ -4613,7 +4613,7 @@ class Lr {
4613
4613
  }
4614
4614
  });
4615
4615
  _(this, "getMessages", async (n) => {
4616
- const s = X(n);
4616
+ const s = J(n);
4617
4617
  try {
4618
4618
  return window.BuzzCasting.WidgetData[s];
4619
4619
  } catch (u) {
@@ -4634,7 +4634,7 @@ class Lr {
4634
4634
  * @returns number
4635
4635
  */
4636
4636
  _(this, "setCloud", async (n, s) => {
4637
- const u = X(n);
4637
+ const u = J(n);
4638
4638
  try {
4639
4639
  return window.BuzzCasting.WidgetData[u] = s, 201;
4640
4640
  } catch (S) {
@@ -4648,7 +4648,7 @@ class Lr {
4648
4648
  * @returns number
4649
4649
  */
4650
4650
  _(this, "setSeries", async (n, s) => {
4651
- const u = X(n);
4651
+ const u = J(n);
4652
4652
  try {
4653
4653
  return window.BuzzCasting.WidgetData[u] = s, 201;
4654
4654
  } catch (S) {
@@ -4662,7 +4662,7 @@ class Lr {
4662
4662
  * @returns number
4663
4663
  */
4664
4664
  _(this, "setMessages", async (n, s) => {
4665
- const u = X(n);
4665
+ const u = J(n);
4666
4666
  try {
4667
4667
  return window.BuzzCasting.WidgetData[u] = s, 201;
4668
4668
  } catch (S) {
@@ -4841,385 +4841,112 @@ class Lr {
4841
4841
  this.options = n, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
4842
4842
  }
4843
4843
  }
4844
- function Wa(d) {
4845
- const n = d.toUpperCase().split(/[\s_-]+/);
4846
- return n.length > 0 ? (n.forEach((s, u) => {
4847
- n[u] = `${s.charAt(0)}.`;
4848
- }), n.join(" ")) : "";
4849
- }
4850
- function Ua(d) {
4851
- let n = "", s = "", u = {
4852
- backgroundImage: ""
4853
- };
4854
- return typeof d.media < "u" && d.media.forEach((S) => {
4855
- (S.type === "photo" || S.type === "image") && (u = {
4856
- backgroundImage: `url(${S.url})`
4857
- }, s = S.url), S.type === "video" && (n = S.url);
4858
- }), {
4859
- image: s,
4860
- background: u || null,
4861
- video: n
4862
- };
4863
- }
4864
- function Na(d) {
4865
- const n = {};
4866
- for (let s = 0; s < d.length; s++) {
4867
- const u = d.item(s);
4868
- u != null && u.name && (n[u.name] = u.value);
4869
- }
4870
- return n;
4871
- }
4872
- function za(d) {
4873
- const n = {};
4874
- for (let s = 0; s < d.length; s++) {
4875
- const u = d[s];
4876
- u.name !== "class" && !u.name.includes("data") && (n[u.name] = u.value);
4877
- }
4878
- return n;
4879
- }
4880
- function Ha(d, n) {
4881
- switch (d) {
4882
- case "ax":
4883
- return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
4884
- case "bl":
4885
- return `<li class="text-blue fa-solid fa-rss fa-${n}"/>`;
4886
- case "co":
4887
- return `<li class="fa-solid fa-comment fa-${n}"/>`;
4888
- case "da":
4889
- return `<li class="fa-brands fa-dailymotion fa-${n}"/>`;
4890
- case "fb":
4891
- return `<li class="text-blue-900 fa-brands fa-facebook fa-${n}"/>`;
4892
- case "fo":
4893
- return `<li class="fa-solid fa-messages fa-${n}"/>`;
4894
- case "ig":
4895
- return `<li class="fa-brands fa-instagram fa-${n}"/>`;
4896
- case "lb":
4897
- return `<li class="fa-solid fa-comment fa-${n}"/>`;
4898
- case "li":
4899
- return `<li class="fa-brands fa-linkedin fa-${n}"/>`;
4900
- case "me":
4901
- return `<li class="fa-solid fa-rss fa-${n}"/>`;
4902
- case "pi":
4903
- return `<li class="fa-brands fa-pinterest fa-${n}"/>`;
4904
- case "qq":
4905
- return `<li class="fa-brands fa-weibo fa-${n}"/>`;
4906
- case "rd":
4907
- return `<li class="fa-brands fa-reddit fa-${n}"/>`;
4908
- case "re":
4909
- return `<li class="fa-solid fa-star-sharp-half-stroke fa-${n}"/>`;
4910
- case "ti":
4911
- return `<li class="fa-brands fa-tiktok fa-${n}"/>`;
4912
- case "tw":
4913
- return `<li class="fa-brands fa-x-twitter fa-${n}"/>`;
4914
- case "vk":
4915
- return `<li class="fa-brands fa-vk fa-${n}"/>`;
4916
- case "ws":
4917
- return `<li class="fa-solid fa-rss fa-${n}"/>`;
4918
- case "yt":
4919
- return `<li class="text-red fa-brands fa-youtube fa-${n}"/>`;
4920
- default:
4921
- return "";
4922
- }
4923
- }
4924
- function Ya(d) {
4925
- return d.replace(/^\w|[A-Z]|\b\w/g, (n, s) => s === 0 ? n.toLowerCase() : n.toUpperCase()).replace(/\s+/g, "");
4926
- }
4927
- function Qa(d) {
4928
- return d.toLowerCase().split("-").reduce((n, s) => n + (s.charAt(0).toUpperCase() + s.slice(1)));
4929
- }
4930
- const Xa = (d) => d.charAt(0).toUpperCase() + d.slice(1);
4931
- function Ma(d) {
4932
- const n = document.createRange();
4933
- n.selectNodeContents(d), n.deleteContents();
4934
- }
4935
- function ja(d) {
4936
- d.reduce(
4937
- (n, s) => Object.keys(s).reduce(
4938
- (u, S) => ({
4939
- ...u,
4940
- [S]: S in n && typeof n[S] == "object" && n[S] !== null && typeof s[S] == "object" && s[S] !== null ? ja([n[S], s[S]]) : s[S]
4941
- }),
4942
- n
4943
- ),
4944
- {}
4945
- );
4946
- }
4947
- function Ja(d, n = "font-bold") {
4948
- return `${(d == null ? void 0 : d.title.length) > 0 ? `<div class="${n}">${d.title}</div>` : ""}${d != null && d.content ? d.content.replace(/\n\n/g, `
4949
- `).replace(/\n/g, "<br/>") : ""}`;
4950
- }
4951
- function Ba(d, n) {
4952
- for (; d.length < n; )
4953
- d = `0${d}`;
4954
- return d;
4955
- }
4956
- function Oe(d, n) {
4957
- let s, u, S;
4958
- if (n.length === 0)
4959
- return d;
4960
- for (s = 0, S = n.length; s < S; s++)
4961
- u = n.charCodeAt(s), d = (d << 5) - d + u, d |= 0;
4962
- return d < 0 ? d * -2 : d;
4963
- }
4964
- function Ka(d, n, s) {
4965
- return Object.keys(n).sort().reduce(u, d);
4966
- function u(S, k) {
4967
- return Gr(S, n[k], k, s);
4968
- }
4969
- }
4970
- function Gr(d, n, s, u) {
4971
- const S = Oe(Oe(Oe(d, s), La(n)), typeof n);
4972
- if (n === null)
4973
- return Oe(S, "null");
4974
- if (n === void 0)
4975
- return Oe(S, "undefined");
4976
- if (typeof n == "object" || typeof n == "function") {
4977
- if (u.includes(n))
4978
- return Oe(S, `[Circular]${s}`);
4979
- u.push(n);
4980
- const k = Ka(S, n, u);
4981
- if (!("valueOf" in n) || typeof n.valueOf != "function")
4982
- return k;
4983
- try {
4984
- return Oe(k, String(n.valueOf()));
4985
- } catch (M) {
4986
- return Oe(k, `[valueOf exception]${M.stack || M.message}`);
4987
- }
4988
- }
4989
- return Oe(S, n.toString());
4990
- }
4991
- function La(d) {
4992
- return Object.prototype.toString.call(d);
4993
- }
4994
- function Wn(d) {
4995
- return Ba(Gr(0, d, "", []).toString(16), 8);
4996
- }
4997
- function Za(d, n) {
4998
- if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
4999
- return d;
5000
- const s = [
5001
- { v: 1e3, s: "K" },
5002
- { v: 1e6, s: "M" },
5003
- { v: 1e9, s: "B" },
5004
- { v: 1e12, s: "T" },
5005
- { v: 1e15, s: "P" },
5006
- { v: 1e18, s: "E" }
5007
- ];
5008
- let u;
5009
- for (u = s.length - 1; u > 0 && !(d >= s[u].v); u--)
5010
- ;
5011
- return (d / s[u].v).toFixed(n).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
5012
- }
5013
- function Va(d, n) {
5014
- const s = [
5015
- { value: 1, symbol: "" },
5016
- { value: 1e3, symbol: "K" },
5017
- { value: 1e6, symbol: "M" },
5018
- { value: 1e9, symbol: "MM" },
5019
- { value: 1e12, symbol: "T" },
5020
- { value: 1e15, symbol: "P" },
5021
- { value: 1e18, symbol: "E" }
5022
- ], u = /\.0+$|(\.\d*[1-9])0+$/;
5023
- let S;
5024
- for (S = s.length - 1; S > 0 && !(d >= s[S].value); S--)
5025
- ;
5026
- return (d / s[S].value).toFixed(n).replace(u, "$1") + s[S].symbol;
5027
- }
5028
- function qa(d) {
5029
- switch (d.language) {
5030
- case "ar":
5031
- return {
5032
- direction: "rtl",
5033
- textAlign: "right"
5034
- };
5035
- default:
5036
- return {};
5037
- }
5038
- }
5039
- function es(d) {
5040
- const n = window.BuzzCasting.getOptions().suspended ?? !1;
5041
- return d.forEach((s) => {
5042
- var u;
5043
- if (n ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((u = s.content) == null ? void 0 : u.replace(
5044
- /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
5045
- ""
5046
- )) || "", s.sender !== null)
5047
- switch (!0) {
5048
- case s.sender.title === "Unknown author":
5049
- s.sender.title = "", s.sender.name = "";
5050
- break;
5051
- case s.sender.title === s.sender.name:
5052
- s.sender.name = "";
5053
- break;
5054
- case s.channel === "tw":
5055
- s.sender.name = `@${s.sender.name}`;
5056
- break;
5057
- }
5058
- else
5059
- s.sender = {
5060
- title: "",
5061
- name: "",
5062
- id: "",
5063
- avatar: "default",
5064
- bio: "",
5065
- location: "",
5066
- following: 0,
5067
- verified: 0,
5068
- listed: 0,
5069
- followers: 0,
5070
- favourites: 0,
5071
- messages: 0,
5072
- influence: 0
5073
- };
5074
- if (s.sender.title === "" && s.link !== "") {
5075
- const S = new URL(s.link);
5076
- s.sender.title = S.hostname.replace("www.", "");
5077
- }
5078
- }), d;
5079
- }
5080
- function ts(d, n, s, u) {
5081
- d.stopPropagation(), n.showModal({
5082
- showComponent: "card-modal",
5083
- props: { data: s, options: u }
5084
- });
5085
- }
5086
- function ns(d) {
5087
- const n = [...d];
5088
- for (let s = n.length - 1; s > 0; s--) {
5089
- const u = Math.floor(Math.random() * (s + 1));
5090
- [n[s], n[u]] = [n[u], n[s]];
5091
- }
5092
- return n;
5093
- }
5094
- function rs() {
5095
- let d = "";
5096
- const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
5097
- for (let s = 0; s < 7; s++) d += n.charAt(Math.floor(Math.random() * n.length));
5098
- return d;
5099
- }
5100
- function as(d) {
5101
- return d[Math.floor(Math.random() * d.length)];
5102
- }
5103
- const ss = (d) => {
5104
- switch (!0) {
5105
- case d < 0:
5106
- return "text-down text-xs";
5107
- case d > 0:
5108
- return "text-up text-xs";
5109
- default:
5110
- return "text-white text-xs";
5111
- }
5112
- };
5113
- class is {
4844
+ class Wa {
5114
4845
  constructor(n) {
5115
4846
  _(this, "sm");
5116
4847
  _(this, "api");
5117
4848
  _(this, "bc");
5118
4849
  _(this, "options");
4850
+ _(this, "subscribers", []);
5119
4851
  _(this, "update", async (n) => {
5120
4852
  if (this.sm === null)
5121
4853
  return;
5122
- const s = await this.sm.getSubscribers();
5123
- if (s.length === 0)
5124
- return;
5125
- const u = [];
5126
- n ? u.push(this.api.get(n)) : s == null || s.forEach((S) => {
5127
- u.push(this.api.get(S));
5128
- }), await Promise.allSettled(u).then(
5129
- (S) => S.forEach(async (k) => {
5130
- let M, F = 400;
5131
- if (k.status === "fulfilled") {
5132
- let j = k.value;
4854
+ const s = [];
4855
+ n != null && n.subscribers ? n.subscribers.forEach((u) => {
4856
+ this.addSubscriber(u), s.push(this.api.get(u));
4857
+ }) : (this.addSubscriber(n), s.push(this.api.get(n))), await Promise.allSettled(s).then(
4858
+ (u) => u.forEach(async (S) => {
4859
+ let x, M = 400;
4860
+ if (S.status === "fulfilled") {
4861
+ let R = S.value;
5133
4862
  if (this.sm === null)
5134
4863
  return 400;
5135
- if (j.success === !0) {
5136
- const J = this.sm.subscribers.filter(
5137
- (le) => le.widget === j.query.widget
5138
- )[0];
5139
- let ie = "", te;
5140
- switch (j.query.type) {
4864
+ if (R.success === !0) {
4865
+ const W = this.subscribers[R.query.widget];
4866
+ let Z = "", ve;
4867
+ switch (R.query.type) {
5141
4868
  case D.MESSAGES:
5142
- if (te = j.data.messages.filter(
5143
- (le) => le.id !== null
5144
- ), j.data.messages = te, ie = Wn(j.data.messages), J.hash === ie)
4869
+ if (ve = R.data.messages.filter(
4870
+ (te) => te.id !== null
4871
+ ), R.data.messages = ve, Z = Wn(R.data.messages), W != null && W.hash && W.hash === Z)
5145
4872
  return console.info(
5146
4873
  "%capi%c %cno updates",
5147
4874
  l.API,
5148
4875
  l.NONE,
5149
4876
  l.NO_UPDATES,
5150
4877
  D.MESSAGES,
5151
- j.query.slide,
5152
- j.query.widget
4878
+ R.query.slide,
4879
+ R.query.widget
5153
4880
  ), console.debug(
5154
4881
  "%capi%c %cno updates",
5155
4882
  l.API,
5156
4883
  l.NONE,
5157
4884
  l.NO_UPDATES,
5158
4885
  D.MESSAGES,
5159
- j
4886
+ R
5160
4887
  ), 204;
5161
- M = j, J.hash = ie, F = await this.sm.setMessages(j.query, j);
4888
+ x = R, W.hash = Z, M = await this.sm.setMessages(R.query, R);
5162
4889
  break;
5163
4890
  case D.CLOUD:
5164
- ie = Wn(j.data), J.hash === ie ? (console.info(
4891
+ Z = Wn(R.data), W != null && W.hash && W.hash === Z ? (console.info(
5165
4892
  "%capi%c %cno updates",
5166
4893
  l.API,
5167
4894
  l.NONE,
5168
4895
  l.NO_UPDATES,
5169
4896
  D.CLOUD,
5170
- j.query.slide,
5171
- j.query.widget
4897
+ R.query.slide,
4898
+ R.query.widget
5172
4899
  ), console.debug(
5173
4900
  "%capi%c %cno updates",
5174
4901
  l.API,
5175
4902
  l.NONE,
5176
4903
  l.NO_UPDATES,
5177
4904
  D.CLOUD,
5178
- j
5179
- ), F = 204) : (J.hash = ie, M = {
4905
+ R
4906
+ ), M = 204) : (W.hash = Z, x = {
5180
4907
  data: {
5181
- dashboard: j.query.dashboard,
5182
- cloud: j.data,
5183
- query: j.query,
5184
- slide: j.query.slide
4908
+ dashboard: R.query.dashboard,
4909
+ cloud: R.data,
4910
+ query: R.query,
4911
+ slide: R.query.slide
5185
4912
  },
5186
- query: j.query,
5187
- message: j.message,
5188
- success: j.success
5189
- }, F = await this.sm.setCloud(
5190
- j.query,
5191
- M.data.cloud
4913
+ query: R.query,
4914
+ message: R.message,
4915
+ success: R.success
4916
+ }, M = await this.sm.setCloud(
4917
+ R.query,
4918
+ x.data.cloud
5192
4919
  ));
5193
4920
  break;
5194
4921
  case D.SERIES:
5195
- ie = Wn(j.data), J.hash === ie ? (console.info(
4922
+ Z = Wn(R.data), W != null && W.hash && W.hash === Z ? (console.info(
5196
4923
  "%capi%c %cno updates",
5197
4924
  l.API,
5198
4925
  l.NONE,
5199
4926
  l.NO_UPDATES,
5200
4927
  D.SERIES,
5201
- j.query.slide,
5202
- j.query.widget
4928
+ R.query.slide,
4929
+ R.query.widget
5203
4930
  ), console.debug(
5204
4931
  "%capi%c %cno updates",
5205
4932
  l.API,
5206
4933
  l.NONE,
5207
4934
  l.NO_UPDATES,
5208
4935
  D.SERIES,
5209
- j
5210
- ), F = 204) : (J.hash = ie, M = {
4936
+ R
4937
+ ), M = 204) : (W.hash = Z, x = {
5211
4938
  data: {
5212
- dashboard: j.query.dashboard,
5213
- series: j.data,
5214
- query: j.query,
5215
- slide: j.query.slide
4939
+ dashboard: R.query.dashboard,
4940
+ series: R.data,
4941
+ query: R.query,
4942
+ slide: R.query.slide
5216
4943
  },
5217
- query: j.query,
5218
- message: j.message,
5219
- success: j.success
5220
- }, F = await this.sm.setSeries(
5221
- j.query,
5222
- M.data.series
4944
+ query: R.query,
4945
+ message: R.message,
4946
+ success: R.success
4947
+ }, M = await this.sm.setSeries(
4948
+ R.query,
4949
+ x.data.series
5223
4950
  ));
5224
4951
  break;
5225
4952
  default:
@@ -5229,37 +4956,37 @@ class is {
5229
4956
  l.NONE,
5230
4957
  l.STORAGE,
5231
4958
  "error",
5232
- `data type ${j.query.type} unknown`
4959
+ `data type ${R.query.type} unknown`
5233
4960
  );
5234
4961
  }
5235
4962
  } else
5236
- F = 401;
5237
- switch (F) {
4963
+ M = 401;
4964
+ switch (M) {
5238
4965
  case 201:
5239
4966
  console.info(
5240
4967
  "%capp%c %cbroadcast",
5241
4968
  l.API,
5242
4969
  l.NONE,
5243
4970
  l.BROADCAST,
5244
- j.query.slide,
5245
- j.data.title ?? j.query.widget
4971
+ R.query.slide,
4972
+ R.data.title ?? R.query.widget
5246
4973
  ), console.debug(
5247
4974
  "%capp%c %cbroadcast",
5248
4975
  l.API,
5249
4976
  l.NONE,
5250
4977
  l.BROADCAST,
5251
- j
4978
+ R
5252
4979
  );
5253
- const J = structuredClone(M.query);
5254
- switch (j.query.type) {
4980
+ const W = structuredClone(x.query);
4981
+ switch (R.query.type) {
5255
4982
  case "messages":
5256
- j = await this.sm.getMessages(J);
4983
+ R = await this.sm.getMessages(W);
5257
4984
  break;
5258
4985
  case "cloud":
5259
- j = await this.sm.getCloud(J), j && (j.query = J);
4986
+ R = await this.sm.getCloud(W), R && (R.query = W);
5260
4987
  break;
5261
4988
  case "series":
5262
- j = await this.sm.getSeries(J), j && (j.query = J);
4989
+ R = await this.sm.getSeries(W), R && (R.query = W);
5263
4990
  break;
5264
4991
  default:
5265
4992
  console.warn(
@@ -5268,12 +4995,12 @@ class is {
5268
4995
  l.NONE,
5269
4996
  l.BROADCAST,
5270
4997
  "Unhandled data type",
5271
- j.query
4998
+ R.query
5272
4999
  );
5273
5000
  }
5274
- j && this.bc.postMessage({
5001
+ R && this.bc.postMessage({
5275
5002
  event: q.WIDGET_UPDATE,
5276
- data: j.data
5003
+ data: R.data
5277
5004
  });
5278
5005
  break;
5279
5006
  case 204:
@@ -5285,12 +5012,12 @@ class is {
5285
5012
  l.NONE,
5286
5013
  l.BROADCAST,
5287
5014
  "Fetch error",
5288
- j.query.slide,
5289
- j.data.title ?? j.query.widget
5015
+ R.query.slide,
5016
+ R.data.title ?? R.query.widget
5290
5017
  );
5291
5018
  break;
5292
5019
  }
5293
- return F;
5020
+ return M;
5294
5021
  } else
5295
5022
  return console.warn(
5296
5023
  "%capi%c %cstorage",
@@ -5298,7 +5025,7 @@ class is {
5298
5025
  l.NONE,
5299
5026
  l.STORAGE,
5300
5027
  q.ERROR,
5301
- k.status
5028
+ S.status
5302
5029
  ), 400;
5303
5030
  })
5304
5031
  );
@@ -5320,12 +5047,12 @@ class is {
5320
5047
  l.STORAGE,
5321
5048
  q.UPDATE,
5322
5049
  n.data
5323
- ), await this.update();
5050
+ ), await this.update(n.data.data);
5324
5051
  break;
5325
5052
  }
5326
5053
  });
5327
5054
  _(this, "cleanMessages", async () => {
5328
- var u, S, k;
5055
+ var u, S, x;
5329
5056
  if ((u = this.options) != null && u.suspended) {
5330
5057
  console.info(
5331
5058
  "%cstorage%c %cstorage",
@@ -5336,7 +5063,7 @@ class is {
5336
5063
  );
5337
5064
  return;
5338
5065
  }
5339
- const n = ((S = this.options) == null ? void 0 : S.retention) || 86400 * 4, s = await ((k = this.sm) == null ? void 0 : k.cleanMessages(
5066
+ const n = ((S = this.options) == null ? void 0 : S.retention) || 86400 * 4, s = await ((x = this.sm) == null ? void 0 : x.cleanMessages(
5340
5067
  n
5341
5068
  ));
5342
5069
  console.info(
@@ -5359,10 +5086,7 @@ class is {
5359
5086
  ), await this.api.hideMessage(n);
5360
5087
  });
5361
5088
  _(this, "hideLabels", async (n) => await this.api.hideLabels(n));
5362
- _(this, "getSubscribers", async () => {
5363
- var n;
5364
- return await ((n = this.sm) == null ? void 0 : n.getSubscribers());
5365
- });
5089
+ _(this, "getSubscribers", async () => await new Promise((n) => n(this.subscribers)));
5366
5090
  _(this, "getSlide", async (n) => {
5367
5091
  var s;
5368
5092
  return await ((s = this.sm) == null ? void 0 : s.getSlide(n));
@@ -5430,25 +5154,28 @@ class is {
5430
5154
  ), this.bc.onmessage = (u) => {
5431
5155
  this.actions(u);
5432
5156
  }, this.bc.postMessage({ event: q.STORAGE_INIT, data: {} }), this.api = new xa(n), n.storage) {
5433
- case me.DEXIE:
5157
+ case ge.DEXIE:
5434
5158
  this.sm = new Nr(n);
5435
5159
  break;
5436
- case me.LOCAL:
5160
+ case ge.LOCAL:
5437
5161
  this.sm = new Kr(n);
5438
5162
  break;
5439
- case me.SESSION:
5163
+ case ge.SESSION:
5440
5164
  this.sm = new Br(n);
5441
5165
  break;
5442
- case me.KEYVAL:
5166
+ case ge.KEYVAL:
5443
5167
  this.sm = new jr(n);
5444
5168
  break;
5445
- case me.WINDOW:
5169
+ case ge.WINDOW:
5446
5170
  this.sm = new Lr(n);
5447
5171
  break;
5448
5172
  }
5449
5173
  }
5174
+ addSubscriber(n) {
5175
+ this.subscribers[n.widget] === void 0 && (this.subscribers[n.widget] = n);
5176
+ }
5450
5177
  }
5451
- class Ga {
5178
+ class Na {
5452
5179
  constructor(n) {
5453
5180
  _(this, "sm");
5454
5181
  /**
@@ -5515,24 +5242,293 @@ class Ga {
5515
5242
  }) : await ((s = this.sm) == null ? void 0 : s.getSeries(n));
5516
5243
  });
5517
5244
  switch (this.sm = null, n.storage) {
5518
- case me.DEXIE:
5245
+ case ge.DEXIE:
5519
5246
  this.sm = new Nr(n);
5520
5247
  break;
5521
- case me.LOCAL:
5248
+ case ge.LOCAL:
5522
5249
  this.sm = new Kr(n);
5523
5250
  break;
5524
- case me.SESSION:
5251
+ case ge.SESSION:
5525
5252
  this.sm = new Br(n);
5526
5253
  break;
5527
- case me.KEYVAL:
5254
+ case ge.KEYVAL:
5528
5255
  this.sm = new jr(n);
5529
5256
  break;
5530
- case me.WINDOW:
5257
+ case ge.WINDOW:
5531
5258
  this.sm = new Lr(n);
5532
5259
  break;
5533
5260
  }
5534
5261
  }
5535
5262
  }
5263
+ function Ua(d) {
5264
+ const n = d.toUpperCase().split(/[\s_-]+/);
5265
+ return n.length > 0 ? (n.forEach((s, u) => {
5266
+ n[u] = `${s.charAt(0)}.`;
5267
+ }), n.join(" ")) : "";
5268
+ }
5269
+ function za(d) {
5270
+ let n = "", s = "", u = {
5271
+ backgroundImage: ""
5272
+ };
5273
+ return typeof d.media < "u" && d.media.forEach((S) => {
5274
+ (S.type === "photo" || S.type === "image") && (u = {
5275
+ backgroundImage: `url(${S.url})`
5276
+ }, s = S.url), S.type === "video" && (n = S.url);
5277
+ }), {
5278
+ image: s,
5279
+ background: u || null,
5280
+ video: n
5281
+ };
5282
+ }
5283
+ function Ma(d) {
5284
+ const n = {};
5285
+ for (let s = 0; s < d.length; s++) {
5286
+ const u = d.item(s);
5287
+ u != null && u.name && (n[u.name] = u.value);
5288
+ }
5289
+ return n;
5290
+ }
5291
+ function Ha(d) {
5292
+ const n = {};
5293
+ for (let s = 0; s < d.length; s++) {
5294
+ const u = d[s];
5295
+ u.name !== "class" && !u.name.includes("data") && (n[u.name] = u.value);
5296
+ }
5297
+ return n;
5298
+ }
5299
+ function Ya(d, n) {
5300
+ switch (d) {
5301
+ case "ax":
5302
+ return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
5303
+ case "bl":
5304
+ return `<li class="text-blue fa-solid fa-rss fa-${n}"/>`;
5305
+ case "co":
5306
+ return `<li class="fa-solid fa-comment fa-${n}"/>`;
5307
+ case "da":
5308
+ return `<li class="fa-brands fa-dailymotion fa-${n}"/>`;
5309
+ case "fb":
5310
+ return `<li class="text-blue-900 fa-brands fa-facebook fa-${n}"/>`;
5311
+ case "fo":
5312
+ return `<li class="fa-solid fa-messages fa-${n}"/>`;
5313
+ case "ig":
5314
+ return `<li class="fa-brands fa-instagram fa-${n}"/>`;
5315
+ case "lb":
5316
+ return `<li class="fa-solid fa-comment fa-${n}"/>`;
5317
+ case "li":
5318
+ return `<li class="fa-brands fa-linkedin fa-${n}"/>`;
5319
+ case "me":
5320
+ return `<li class="fa-solid fa-rss fa-${n}"/>`;
5321
+ case "pi":
5322
+ return `<li class="fa-brands fa-pinterest fa-${n}"/>`;
5323
+ case "qq":
5324
+ return `<li class="fa-brands fa-weibo fa-${n}"/>`;
5325
+ case "rd":
5326
+ return `<li class="fa-brands fa-reddit fa-${n}"/>`;
5327
+ case "re":
5328
+ return `<li class="fa-solid fa-star-sharp-half-stroke fa-${n}"/>`;
5329
+ case "ti":
5330
+ return `<li class="fa-brands fa-tiktok fa-${n}"/>`;
5331
+ case "tw":
5332
+ return `<li class="fa-brands fa-x-twitter fa-${n}"/>`;
5333
+ case "vk":
5334
+ return `<li class="fa-brands fa-vk fa-${n}"/>`;
5335
+ case "ws":
5336
+ return `<li class="fa-solid fa-rss fa-${n}"/>`;
5337
+ case "yt":
5338
+ return `<li class="text-red fa-brands fa-youtube fa-${n}"/>`;
5339
+ default:
5340
+ return "";
5341
+ }
5342
+ }
5343
+ function Xa(d) {
5344
+ return d.replace(/^\w|[A-Z]|\b\w/g, (n, s) => s === 0 ? n.toLowerCase() : n.toUpperCase()).replace(/\s+/g, "");
5345
+ }
5346
+ function Ja(d) {
5347
+ return d.toLowerCase().split("-").reduce((n, s) => n + (s.charAt(0).toUpperCase() + s.slice(1)));
5348
+ }
5349
+ const Qa = (d) => d.charAt(0).toUpperCase() + d.slice(1);
5350
+ function ja(d) {
5351
+ const n = document.createRange();
5352
+ n.selectNodeContents(d), n.deleteContents();
5353
+ }
5354
+ function Ba(d) {
5355
+ d.reduce(
5356
+ (n, s) => Object.keys(s).reduce(
5357
+ (u, S) => ({
5358
+ ...u,
5359
+ [S]: S in n && typeof n[S] == "object" && n[S] !== null && typeof s[S] == "object" && s[S] !== null ? Ba([n[S], s[S]]) : s[S]
5360
+ }),
5361
+ n
5362
+ ),
5363
+ {}
5364
+ );
5365
+ }
5366
+ function Za(d, n = "font-bold") {
5367
+ return `${(d == null ? void 0 : d.title.length) > 0 ? `<div class="${n}">${d.title}</div>` : ""}${d != null && d.content ? d.content.replace(/\n\n/g, `
5368
+ `).replace(/\n/g, "<br/>") : ""}`;
5369
+ }
5370
+ function Ka(d, n) {
5371
+ for (; d.length < n; )
5372
+ d = `0${d}`;
5373
+ return d;
5374
+ }
5375
+ function Oe(d, n) {
5376
+ let s, u, S;
5377
+ if (n.length === 0)
5378
+ return d;
5379
+ for (s = 0, S = n.length; s < S; s++)
5380
+ u = n.charCodeAt(s), d = (d << 5) - d + u, d |= 0;
5381
+ return d < 0 ? d * -2 : d;
5382
+ }
5383
+ function La(d, n, s) {
5384
+ return Object.keys(n).sort().reduce(u, d);
5385
+ function u(S, x) {
5386
+ return Gr(S, n[x], x, s);
5387
+ }
5388
+ }
5389
+ function Gr(d, n, s, u) {
5390
+ const S = Oe(Oe(Oe(d, s), Ga(n)), typeof n);
5391
+ if (n === null)
5392
+ return Oe(S, "null");
5393
+ if (n === void 0)
5394
+ return Oe(S, "undefined");
5395
+ if (typeof n == "object" || typeof n == "function") {
5396
+ if (u.includes(n))
5397
+ return Oe(S, `[Circular]${s}`);
5398
+ u.push(n);
5399
+ const x = La(S, n, u);
5400
+ if (!("valueOf" in n) || typeof n.valueOf != "function")
5401
+ return x;
5402
+ try {
5403
+ return Oe(x, String(n.valueOf()));
5404
+ } catch (M) {
5405
+ return Oe(x, `[valueOf exception]${M.stack || M.message}`);
5406
+ }
5407
+ }
5408
+ return Oe(S, n.toString());
5409
+ }
5410
+ function Ga(d) {
5411
+ return Object.prototype.toString.call(d);
5412
+ }
5413
+ function Wn(d) {
5414
+ return Ka(Gr(0, d, "", []).toString(16), 8);
5415
+ }
5416
+ function Va(d, n) {
5417
+ if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
5418
+ return d;
5419
+ const s = [
5420
+ { v: 1e3, s: "K" },
5421
+ { v: 1e6, s: "M" },
5422
+ { v: 1e9, s: "B" },
5423
+ { v: 1e12, s: "T" },
5424
+ { v: 1e15, s: "P" },
5425
+ { v: 1e18, s: "E" }
5426
+ ];
5427
+ let u;
5428
+ for (u = s.length - 1; u > 0 && !(d >= s[u].v); u--)
5429
+ ;
5430
+ return (d / s[u].v).toFixed(n).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
5431
+ }
5432
+ function qa(d, n) {
5433
+ const s = [
5434
+ { value: 1, symbol: "" },
5435
+ { value: 1e3, symbol: "K" },
5436
+ { value: 1e6, symbol: "M" },
5437
+ { value: 1e9, symbol: "MM" },
5438
+ { value: 1e12, symbol: "T" },
5439
+ { value: 1e15, symbol: "P" },
5440
+ { value: 1e18, symbol: "E" }
5441
+ ], u = /\.0+$|(\.\d*[1-9])0+$/;
5442
+ let S;
5443
+ for (S = s.length - 1; S > 0 && !(d >= s[S].value); S--)
5444
+ ;
5445
+ return (d / s[S].value).toFixed(n).replace(u, "$1") + s[S].symbol;
5446
+ }
5447
+ function es(d) {
5448
+ switch (d.language) {
5449
+ case "ar":
5450
+ return {
5451
+ direction: "rtl",
5452
+ textAlign: "right"
5453
+ };
5454
+ default:
5455
+ return {};
5456
+ }
5457
+ }
5458
+ function ts(d) {
5459
+ const n = window.BuzzCasting.getOptions().suspended ?? !1;
5460
+ return d.forEach((s) => {
5461
+ var u;
5462
+ if (n ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((u = s.content) == null ? void 0 : u.replace(
5463
+ /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
5464
+ ""
5465
+ )) || "", s.sender !== null)
5466
+ switch (!0) {
5467
+ case s.sender.title === "Unknown author":
5468
+ s.sender.title = "", s.sender.name = "";
5469
+ break;
5470
+ case s.sender.title === s.sender.name:
5471
+ s.sender.name = "";
5472
+ break;
5473
+ case s.channel === "tw":
5474
+ s.sender.name = `@${s.sender.name}`;
5475
+ break;
5476
+ }
5477
+ else
5478
+ s.sender = {
5479
+ title: "",
5480
+ name: "",
5481
+ id: "",
5482
+ avatar: "default",
5483
+ bio: "",
5484
+ location: "",
5485
+ following: 0,
5486
+ verified: 0,
5487
+ listed: 0,
5488
+ followers: 0,
5489
+ favourites: 0,
5490
+ messages: 0,
5491
+ influence: 0
5492
+ };
5493
+ if (s.sender.title === "" && s.link !== "") {
5494
+ const S = new URL(s.link);
5495
+ s.sender.title = S.hostname.replace("www.", "");
5496
+ }
5497
+ }), d;
5498
+ }
5499
+ function ns(d, n, s, u) {
5500
+ d.stopPropagation(), n.showModal({
5501
+ showComponent: "card-modal",
5502
+ props: { data: s, options: u }
5503
+ });
5504
+ }
5505
+ function rs(d) {
5506
+ const n = [...d];
5507
+ for (let s = n.length - 1; s > 0; s--) {
5508
+ const u = Math.floor(Math.random() * (s + 1));
5509
+ [n[s], n[u]] = [n[u], n[s]];
5510
+ }
5511
+ return n;
5512
+ }
5513
+ function as() {
5514
+ let d = "";
5515
+ const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
5516
+ for (let s = 0; s < 7; s++) d += n.charAt(Math.floor(Math.random() * n.length));
5517
+ return d;
5518
+ }
5519
+ function ss(d) {
5520
+ return d[Math.floor(Math.random() * d.length)];
5521
+ }
5522
+ const is = (d) => {
5523
+ switch (!0) {
5524
+ case d < 0:
5525
+ return "text-down text-xs";
5526
+ case d > 0:
5527
+ return "text-up text-xs";
5528
+ default:
5529
+ return "text-white text-xs";
5530
+ }
5531
+ };
5536
5532
  class os {
5537
5533
  /**
5538
5534
  * Main container for managing widgets and data updates
@@ -5652,7 +5648,7 @@ class os {
5652
5648
  q.SHOW_MODAL,
5653
5649
  n.showComponent,
5654
5650
  // @ts-ignore
5655
- Na(this.element.attributes)
5651
+ Ma(this.element.attributes)
5656
5652
  //props['data-widget'],
5657
5653
  );
5658
5654
  const s = new CustomEvent(q.SHOW_MODAL, {
@@ -5671,9 +5667,9 @@ class os {
5671
5667
  var M;
5672
5668
  this.element = n, this.listeners = s, u = typeof u < "u" ? u : "buzzcasting-slide";
5673
5669
  let S;
5674
- S = { ...n.dataset }, delete S.hmr, S.slide = ((M = n.closest(u.toUpperCase())) == null ? void 0 : M.id) ?? `${u} not found`, S = $r(S), this.query = S, Ma(n);
5675
- const k = window.BuzzCasting.getOptions();
5676
- this.storageReader = new Ga(k), this.broadcastChannel = new BroadcastChannel(S.slide), this.startListener();
5670
+ S = { ...n.dataset }, delete S.hmr, S.slide = ((M = n.closest(u.toUpperCase())) == null ? void 0 : M.id) ?? `${u} not found`, S = $r(S), this.query = S, ja(n);
5671
+ const x = window.BuzzCasting.getOptions();
5672
+ this.storageReader = new Na(x), this.broadcastChannel = new BroadcastChannel(S.slide), this.startListener();
5677
5673
  }
5678
5674
  addListener(n) {
5679
5675
  this.listeners.push(n);
@@ -5726,33 +5722,33 @@ class os {
5726
5722
  }
5727
5723
  export {
5728
5724
  D as API,
5729
- is as BuzzcastingStorageManager,
5730
- Ga as BuzzcastingStorageReader,
5725
+ Wa as BuzzcastingStorageManager,
5726
+ Na as BuzzcastingStorageReader,
5731
5727
  l as CSS,
5732
5728
  q as EVENTS,
5733
5729
  Vt as MODERATION,
5734
- me as STORAGE,
5730
+ ge as STORAGE,
5735
5731
  os as Widget,
5736
- Wa as anonymize,
5737
- Ua as attachedMedia,
5738
- Na as attrs,
5739
- Ha as brandLogo,
5740
- Qa as camelCase,
5741
- Ya as camelize,
5742
- Xa as capitalizeFirstLetter,
5743
- Ma as clearContents,
5744
- ja as deepMerge,
5745
- za as filterAttributes,
5746
- Ja as formatContent,
5732
+ Ua as anonymize,
5733
+ za as attachedMedia,
5734
+ Ma as attrs,
5735
+ Ya as brandLogo,
5736
+ Ja as camelCase,
5737
+ Xa as camelize,
5738
+ Qa as capitalizeFirstLetter,
5739
+ ja as clearContents,
5740
+ Ba as deepMerge,
5741
+ Ha as filterAttributes,
5742
+ Za as formatContent,
5747
5743
  Wn as hashSum,
5748
- Za as intToString,
5749
- Va as numberFormatter,
5750
- as as randomValue,
5751
- qa as rtl,
5752
- es as sanitize,
5753
- ts as showModal,
5754
- ns as shuffleMessages,
5755
- rs as stringGen,
5756
- ss as upDownColor,
5744
+ Va as intToString,
5745
+ qa as numberFormatter,
5746
+ ss as randomValue,
5747
+ es as rtl,
5748
+ ts as sanitize,
5749
+ ns as showModal,
5750
+ rs as shuffleMessages,
5751
+ as as stringGen,
5752
+ is as upDownColor,
5757
5753
  $r as widgetParams
5758
5754
  };