buzzcasting-storage 3.11.5 → 3.12.0

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,4 +1,4 @@
1
- var _ = /* @__PURE__ */ ((h) => (h.CLOUD = "cloud", h.DASHBOARD = "dashboard", h.DASHBOARDS = "dashboards", h.IMAGES = "images", h.MESSAGES = "messages", h.PREFERENCE = "preference", h.PREFERENCES = "preferences", h.PRESENTATION = "presentation", h.PRESENTATIONS = "presentations", h.SERIES = "series", h.SLIDE = "slide", h.SLIDES = "slides", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h))(_ || {}), c = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(c || {}), X = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.WS_API_REQUEST = "wsApiRequest", h.WS_API_RESPONSE = "wsApiResponse", h.WS_API_UPDATE = "wsApiRUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", h.CLOSE_BUILDER_MODAL = "closeBuilderModal", h.CLOSE_MODAL = "closeModal", h.CSS_SET = "setCss", h.CSS_STORE = "storeCss", h.DASHBOARD_LOAD = "loadDashboard", h.DASHBOARD_STORE = "storeDashboard", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.IMAGE_GET = "getImage", h.IMAGE_SET = "setImage", h.LAUPPUT_UPDATE = "layoutUpdate", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.PREFERENCE_LOAD = "loadPreference", h.PREFERENCE_STORE = "storePreference", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PRESENTATION_LOAD = "loadPresentation", h.PRESENTATION_STORE = "storePresentation", h.SHOW_BUILDER_DIALOG = "showBuilderDialog", h.SHOW_BUILDER_MODAL = "showBuilderModal", h.SHOW_MODAL = "showModal", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GET = "getSlide", h.SLIDE_GOTO = "slideGoto", h.SLIDE_LOAD = "loadSlide", h.SLIDE_READY = "slideReady", h.SLIDE_SET = "setSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.SUSPEND_ACCOUNT = "suspendAccount", h.SWITCH_PRESENTATION = "switchPresentation", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.VERSION = "version", h.WIDGETS_CLEAR = "widgetsClear", h.WIDGET_LOAD = "widgetLoad", h.WIDGET_STORE = "widgetStore", h.WIDGET_UPDATE = "widgetUpdate", h))(X || {}), en = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(en || {}), he = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(he || {});
1
+ var _ = /* @__PURE__ */ ((h) => (h.CLOUD = "cloud", h.DASHBOARD = "dashboard", h.DASHBOARDS = "dashboards", h.IMAGES = "images", h.MESSAGES = "messages", h.PREFERENCE = "preference", h.PREFERENCES = "preferences", h.PRESENTATION = "presentation", h.PRESENTATIONS = "presentations", h.SERIES = "series", h.SLIDE = "slide", h.SLIDES = "slides", h.TOPICS = "topics", h.WIDGET = "widget", h.WIDGETS = "widgets", h))(_ || {}), c = /* @__PURE__ */ ((h) => (h.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", h.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", h.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", h.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", h.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", h.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", h.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", h.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", h.NONE = "color:transparent;background-color:transparent;", h.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", h.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", h.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", h.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", h.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", h.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", h.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", h.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", h))(c || {}), X = /* @__PURE__ */ ((h) => (h.ADD_SLIDE = "addSlide", h.APP_READY = "appReady", h.API_UPDATE = "apiUpdate", h.WS_API_REQUEST = "wsApiRequest", h.WS_API_RESPONSE = "wsApiResponse", h.WS_API_UPDATE = "wsApiRUpdate", h.APPROVE_MESSAGE = "approveMessage", h.CHANNEL = "channel", h.CLEAN_MESSAGES = "cleanMessages", h.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", h.CLOSE_BUILDER_MODAL = "closeBuilderModal", h.CLOSE_MODAL = "closeModal", h.CSS_SET = "setCss", h.CSS_STORE = "storeCss", h.DASHBOARD_LOAD = "loadDashboard", h.DASHBOARD_STORE = "storeDashboard", h.ERROR = "error", h.HIDE_MESSAGE = "hideMessage", h.HIDE_LABELS = "hideLabels", h.IMAGE_GET = "getImage", h.IMAGE_SET = "setImage", h.IMAGE_STORED = "imageStored", h.LAUPPUT_UPDATE = "layoutUpdate", h.PREV_SLIDE = "prevSlide", h.RELOAD_PRESENTATION = "reloadPresentation", h.STAR_MESSAGE = "starMessage", h.GOTO_SLIDE = "gotoSlide", h.NEXT_SLIDE = "nextSlide", h.PREFERENCE_LOAD = "loadPreference", h.PREFERENCE_STORE = "storePreference", h.PAUSE_PRESENTATION = "pausePresentation", h.PRESENTATION_READY = "presentationReady", h.PRESENTATION_LOAD = "loadPresentation", h.PRESENTATION_STORE = "storePresentation", h.SCREENSHOT_TAKE = "takeScreenshot", h.SCREENSHOT_STORE = "storeScreenshot", h.SECTION_UPDATE = "sectionUpdate", h.SHOW_BUILDER_DIALOG = "showBuilderDialog", h.SHOW_BUILDER_MODAL = "showBuilderModal", h.SHOW_MODAL = "showModal", h.SLIDE_DID_LOAD = "slideDidLoad", h.SLIDE_GET = "getSlide", h.SLIDE_GOTO = "slideGoto", h.SLIDE_LOAD = "loadSlide", h.SLIDE_READY = "slideReady", h.SLIDE_SAVED = "slideSaved", h.SLIDE_SET = "setSlide", h.SLIDE_STORE = "storeSlide", h.SLIDE_STORED = "slideStored", h.SLIDE_TRANSITIONER = "slideTransitioner", h.START_TRANSITIONER = "startTransitioner", h.STORAGE_INIT = "storageInit", h.SUBSCRIBE = "subscribe", h.SUSPEND_ACCOUNT = "suspendAccount", h.SWITCH_PRESENTATION = "switchPresentation", h.REMOVE_CLOUD = "removeCloud", h.UPDATE = "update", h.UPLOAD_COMPLETED = "uploadCompleted", h.VERSION = "version", h.WIDGETS_CLEAR = "widgetsClear", h.WIDGET_LOAD = "widgetLoad", h.WIDGET_STORE = "widgetStore", h.WIDGET_UPDATE = "widgetUpdate", h))(X || {}), en = /* @__PURE__ */ ((h) => (h.APPROVED = "approved", h.BEFORE = "before", h.DELAYED = "delayed", h.NONE = "none", h.REALTIME = "realtime", h))(en || {}), he = /* @__PURE__ */ ((h) => (h.KEYVAL = "keyval", h.LOCAL = "local", h.SESSION = "session", h.DEXIE = "dexie", h.WINDOW = "window", h))(he || {});
2
2
  function Pa(h) {
3
3
  const t = {};
4
4
  for (let o = 0; o < h.length; o++) {
@@ -17,39 +17,39 @@ function Ia(h, t) {
17
17
  return h;
18
18
  }
19
19
  function Oe(h, t) {
20
- let o, l, m;
20
+ let o, l, g;
21
21
  if (t.length === 0)
22
22
  return h;
23
- for (o = 0, m = t.length; o < m; o++)
23
+ for (o = 0, g = t.length; o < g; o++)
24
24
  l = t.charCodeAt(o), h = (h << 5) - h + l, h |= 0;
25
25
  return h < 0 ? h * -2 : h;
26
26
  }
27
27
  function Na(h, t, o) {
28
28
  return Object.keys(t).sort().reduce(l, h);
29
- function l(m, w) {
30
- return jr(m, t[w], w, o);
29
+ function l(g, v) {
30
+ return jr(g, t[v], v, o);
31
31
  }
32
32
  }
33
33
  function jr(h, t, o, l) {
34
- const m = Oe(Oe(Oe(h, o), Ra(t)), typeof t);
34
+ const g = Oe(Oe(Oe(h, o), Ra(t)), typeof t);
35
35
  if (t === null)
36
- return Oe(m, "null");
36
+ return Oe(g, "null");
37
37
  if (t === void 0)
38
- return Oe(m, "undefined");
38
+ return Oe(g, "undefined");
39
39
  if (typeof t == "object" || typeof t == "function") {
40
40
  if (l.includes(t))
41
- return Oe(m, `[Circular]${o}`);
41
+ return Oe(g, `[Circular]${o}`);
42
42
  l.push(t);
43
- const w = Na(m, t, l);
43
+ const v = Na(g, t, l);
44
44
  if (!("valueOf" in t) || typeof t.valueOf != "function")
45
- return w;
45
+ return v;
46
46
  try {
47
- return Oe(w, String(t.valueOf()));
48
- } catch (C) {
49
- return Oe(w, `[valueOf exception]${C.stack || C.message}`);
47
+ return Oe(v, String(t.valueOf()));
48
+ } catch (k) {
49
+ return Oe(v, `[valueOf exception]${k.stack || k.message}`);
50
50
  }
51
51
  }
52
- return Oe(m, t.toString());
52
+ return Oe(g, t.toString());
53
53
  }
54
54
  function Ra(h) {
55
55
  return Object.prototype.toString.call(h);
@@ -117,10 +117,10 @@ function Ta(h) {
117
117
  }
118
118
  function Ot(h, t) {
119
119
  var o;
120
- let l, m, w, C, K;
120
+ let l, g, v, k, K;
121
121
  switch (h.moderation) {
122
122
  case en.BEFORE:
123
- l = /* @__PURE__ */ new Date(), m = (o = h.beforeTime) == null ? void 0 : o.split(":"), w = Number.parseInt(m ? m[0] : "00"), C = Number.parseInt(m ? m[1] : "00"), K = Number.parseInt(m ? m[2] : "00"), t.before = l.setHours(w, C, K, 0) / 1e3, t.period || (t.period = l.getDay() === 1 ? 72 : 24);
123
+ l = /* @__PURE__ */ new Date(), g = (o = h.beforeTime) == null ? void 0 : o.split(":"), v = Number.parseInt(g ? g[0] : "00"), k = Number.parseInt(g ? g[1] : "00"), K = Number.parseInt(g ? g[2] : "00"), t.before = l.setHours(v, k, K, 0) / 1e3, t.period || (t.period = l.getDay() === 1 ? 72 : 24);
124
124
  break;
125
125
  case en.DELAYED:
126
126
  h.delay && h.delay > 0 && (t.delay = `${h.delay}`);
@@ -133,7 +133,7 @@ function Ot(h, t) {
133
133
  }
134
134
  return t;
135
135
  }
136
- const xa = "3.11.4";
136
+ const xa = "3.11.6";
137
137
  class ka {
138
138
  options;
139
139
  url;
@@ -171,19 +171,19 @@ class ka {
171
171
  };
172
172
  };
173
173
  async get(t) {
174
- const { version: o } = this.options, l = this.headers(), m = Object.assign({}, t);
175
- delete m.type, delete m.hash, delete m.order, m.topics = `${m.dashboard}-${m.widget}`, delete m.presentation;
176
- const w = Object.keys(m).length > 0 ? `?${new URLSearchParams(m).toString()}` : "";
177
- let C = "";
174
+ const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
175
+ delete g.type, delete g.hash, delete g.order, g.topics = `${g.dashboard}-${g.widget}`, delete g.presentation;
176
+ const v = Object.keys(g).length > 0 ? `?${new URLSearchParams(g).toString()}` : "";
177
+ let k = "";
178
178
  switch (t.type) {
179
179
  case _.MESSAGES:
180
- C = c.MESSAGES;
180
+ k = c.MESSAGES;
181
181
  break;
182
182
  case _.SERIES:
183
- C = c.SERIES;
183
+ k = c.SERIES;
184
184
  break;
185
185
  case _.CLOUD:
186
- C = c.CLOUD;
186
+ k = c.CLOUD;
187
187
  break;
188
188
  }
189
189
  return G(3, [
@@ -192,10 +192,10 @@ class ka {
192
192
  c.NONE,
193
193
  c.API,
194
194
  c.NONE,
195
- C,
195
+ k,
196
196
  t.widget
197
- ]), G(4, [t.type, m]), await fetch(
198
- [this.url, "api", o, t.type].join("/") + w,
197
+ ]), G(4, [t.type, g]), await fetch(
198
+ [this.url, "api", o, t.type].join("/") + v,
199
199
  { ...l, method: "get" }
200
200
  ).then(async (K) => {
201
201
  if (!K.ok)
@@ -204,7 +204,7 @@ class ka {
204
204
  }).then((K) => K.json()).then((K) => (K.query = t, K)).catch((K) => ({ success: !1, message: `${K}`, data: null, query: t }));
205
205
  }
206
206
  async hideMessage(t) {
207
- const { version: o } = this.options, l = this.headers(), m = "?action=visible";
207
+ const { version: o } = this.options, l = this.headers(), g = "?action=visible";
208
208
  return console.info(
209
209
  "%capi%c %cput",
210
210
  c.API,
@@ -214,18 +214,18 @@ class ka {
214
214
  t.widget,
215
215
  t.id
216
216
  ), await fetch(
217
- [this.url, "api", o, "messages", t.id].join("/") + m,
217
+ [this.url, "api", o, "messages", t.id].join("/") + g,
218
218
  { ...l, method: "put" }
219
- ).then((w) => {
220
- if (!w.ok)
221
- throw new Error(w.statusText);
222
- return w;
223
- }).then((w) => w.json()).catch((w) => ({ succes: !1, message: w, data: [] }));
219
+ ).then((v) => {
220
+ if (!v.ok)
221
+ throw new Error(v.statusText);
222
+ return v;
223
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
224
224
  }
225
225
  async hideLabels(t) {
226
- const { version: o } = this.options, l = this.formHeaders(), m = new URLSearchParams(), w = t.labels || [];
227
- for (const [C, K] of w.entries())
228
- m.append(`custom_filters[${C}]`, K);
226
+ const { version: o } = this.options, l = this.formHeaders(), g = new URLSearchParams(), v = t.labels || [];
227
+ for (const [k, K] of v.entries())
228
+ g.append(`custom_filters[${k}]`, K);
229
229
  return console.info(
230
230
  "%capi%c %cput",
231
231
  c.API,
@@ -233,26 +233,26 @@ class ka {
233
233
  c.GET_DATA,
234
234
  X.HIDE_LABELS,
235
235
  t.widget,
236
- w
236
+ v
237
237
  ), await fetch(
238
238
  [this.url, "api", o, t.type, t.widget].join("/"),
239
- { ...l, body: m, method: "put" }
240
- ).then((C) => {
241
- if (!C.ok)
242
- throw new Error(C.statusText);
243
- return C;
244
- }).then((C) => C.json()).catch((C) => ({ succes: !1, message: C, data: [] }));
239
+ { ...l, body: g, method: "put" }
240
+ ).then((k) => {
241
+ if (!k.ok)
242
+ throw new Error(k.statusText);
243
+ return k;
244
+ }).then((k) => k.json()).catch((k) => ({ succes: !1, message: k, data: [] }));
245
245
  }
246
246
  async loadSlide(t) {
247
- const { version: o } = this.options, l = this.headers(), m = Object.assign({}, t);
248
- return delete m.type, delete m.hash, G(3, ["%capi%c %cloadSlide", c.API, c.NONE, c.SLIDE, t.id]), await fetch(
247
+ const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
248
+ return delete g.type, delete g.hash, G(3, ["%capi%c %cloadSlide", c.API, c.NONE, c.SLIDE, t.id]), await fetch(
249
249
  [this.url, "api", o, "slides", t.id].join("/"),
250
250
  { ...l, method: "get" }
251
- ).then(async (w) => {
252
- if (!w.ok)
253
- throw new Error(`${w.status}`);
254
- return w;
255
- }).then((w) => w.json()).then((w) => (w.query = t, w.data && w.data.json && (w.data.json = JSON.parse(w.data.json)), w)).catch((w) => ({ success: !1, message: `${w}`, data: null }));
251
+ ).then(async (v) => {
252
+ if (!v.ok)
253
+ throw new Error(`${v.status}`);
254
+ return v;
255
+ }).then((v) => v.json()).then((v) => (v.query = t, v.data && v.data.json && (v.data.json = JSON.parse(v.data.json)), v)).catch((v) => ({ success: !1, message: `${v}`, data: null }));
256
256
  }
257
257
  /**
258
258
  * Store slide definition
@@ -264,7 +264,7 @@ class ka {
264
264
  async storeSlide(t) {
265
265
  const { version: o } = this.options, l = this.formHeaders();
266
266
  delete t.update, delete t.type;
267
- const m = JSON.stringify(t);
267
+ const g = JSON.stringify(t);
268
268
  return G(3, [
269
269
  "%cput%c %capi%c %cslide",
270
270
  c.OK,
@@ -276,12 +276,12 @@ class ka {
276
276
  t.id
277
277
  ]), await fetch(
278
278
  [this.url, "api", o, "slides", t.id].join("/"),
279
- { ...l, body: m, method: "put" }
280
- ).then((w) => {
281
- if (!w.ok)
282
- throw new Error(w.statusText);
283
- return w;
284
- }).then((w) => w.json()).catch((w) => ({ succes: !1, message: w, data: [] }));
279
+ { ...l, body: g, method: "put" }
280
+ ).then((v) => {
281
+ if (!v.ok)
282
+ throw new Error(v.statusText);
283
+ return v;
284
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
285
285
  }
286
286
  async loadPresentation(t) {
287
287
  const { version: o } = this.options, l = this.headers();
@@ -296,11 +296,11 @@ class ka {
296
296
  ]), await fetch(
297
297
  [this.url, "api", o, _.PRESENTATIONS, t.id].join("/"),
298
298
  { ...l, method: "get" }
299
- ).then(async (m) => {
300
- if (!m.ok)
301
- throw new Error(`${m.status}`);
302
- return m;
303
- }).then((m) => m.json()).then((m) => (m.query = t, m)).catch((m) => ({ success: !1, message: `${m}`, data: null }));
299
+ ).then(async (g) => {
300
+ if (!g.ok)
301
+ throw new Error(`${g.status}`);
302
+ return g;
303
+ }).then((g) => g.json()).then((g) => (g.query = t, g)).catch((g) => ({ success: !1, message: `${g}`, data: null }));
304
304
  }
305
305
  /**
306
306
  * Store slide definition
@@ -312,15 +312,15 @@ class ka {
312
312
  async storePresentation(t) {
313
313
  const { version: o } = this.options, l = this.formHeaders();
314
314
  delete t.update;
315
- const m = JSON.stringify(t);
315
+ const g = JSON.stringify(t);
316
316
  return G(2, ["%capi%c %cput", c.API, c.NONE, c.PRESENTATION, t.name]), await fetch(
317
317
  [this.url, "api", o, _.PRESENTATIONS, t.id].join("/"),
318
- { ...l, body: m, method: "put" }
319
- ).then((w) => {
320
- if (!w.ok)
321
- throw new Error(w.statusText);
322
- return w;
323
- }).then((w) => w.json()).catch((w) => ({ succes: !1, message: w, data: [] }));
318
+ { ...l, body: g, method: "put" }
319
+ ).then((v) => {
320
+ if (!v.ok)
321
+ throw new Error(v.statusText);
322
+ return v;
323
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
324
324
  }
325
325
  async loadPreference(t) {
326
326
  const { version: o } = this.options, l = this.headers();
@@ -333,16 +333,16 @@ class ka {
333
333
  ]), await fetch(
334
334
  [this.url, "api", o, _.PREFERENCES, t.id].join("/"),
335
335
  { ...l, method: "get" }
336
- ).then(async (m) => {
337
- if (!m.ok)
338
- throw new Error(`${m.status}`);
339
- return m;
340
- }).then((m) => m.json()).then((m) => m).catch((m) => ({ success: !1, message: `${m}`, data: null }));
336
+ ).then(async (g) => {
337
+ if (!g.ok)
338
+ throw new Error(`${g.status}`);
339
+ return g;
340
+ }).then((g) => g.json()).then((g) => g).catch((g) => ({ success: !1, message: `${g}`, data: null }));
341
341
  }
342
342
  async storePreference(t) {
343
343
  const { version: o } = this.options, l = this.formHeaders();
344
344
  delete t.update;
345
- const m = JSON.stringify({ data: t });
345
+ const g = JSON.stringify({ data: t });
346
346
  return console.info(
347
347
  "%capi%c %cstorePreference",
348
348
  c.API,
@@ -351,12 +351,12 @@ class ka {
351
351
  t.id
352
352
  ), await fetch(
353
353
  [this.url, "api", o, _.PREFERENCES, t.id].join("/"),
354
- { ...l, body: m, method: "put" }
355
- ).then((w) => {
356
- if (!w.ok)
357
- throw new Error(w.statusText);
358
- return w;
359
- }).then((w) => w.json()).catch((w) => ({ succes: !1, message: w, data: [] }));
354
+ { ...l, body: g, method: "put" }
355
+ ).then((v) => {
356
+ if (!v.ok)
357
+ throw new Error(v.statusText);
358
+ return v;
359
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
360
360
  }
361
361
  /*public async loadDashboardWidgets(query: IQuery): Promise<any> {
362
362
  if (query?.dashboard === undefined)
@@ -403,47 +403,51 @@ class ka {
403
403
  ...l,
404
404
  method: "get"
405
405
  }
406
- ).then(async (m) => {
407
- if (!m.ok)
408
- throw new Error(`${m.status}`);
409
- return m;
410
- }).then((m) => m.json()).then((m) => ({
411
- data: { dashboards: m },
406
+ ).then(async (g) => {
407
+ if (!g.ok)
408
+ throw new Error(`${g.status}`);
409
+ return g;
410
+ }).then((g) => g.json()).then((g) => ({
411
+ data: { dashboards: g },
412
412
  message: "Dashboard Widgets loaded from api",
413
413
  success: !0
414
- })).catch((m) => ({ success: !1, message: `${m}`, data: null }));
414
+ })).catch((g) => ({ success: !1, message: `${g}`, data: null }));
415
415
  }
416
- async loadImages() {
417
- const { version: t } = this.options, o = this.headers();
418
- return console.info("%capi%c %cloadImage", c.API, c.NONE, c.WIDGET), await fetch([this.url, "api", t, _.IMAGES].join("/"), {
419
- ...o,
420
- method: "get"
421
- }).then(async (l) => {
422
- if (!l.ok)
423
- throw new Error(`${l.status}`);
424
- return l;
425
- }).then((l) => l.json()).then((l) => ({
426
- data: { images: l.data },
416
+ async loadImages(t) {
417
+ const { version: o } = this.options, l = this.headers();
418
+ return console.info("%capi%c %cloadImage", c.API, c.NONE, c.WIDGET), await fetch(
419
+ [this.url, "api", o, _.IMAGES, `?folder=${t}`].join("/"),
420
+ {
421
+ ...l,
422
+ method: "get"
423
+ }
424
+ ).then(async (g) => {
425
+ if (!g.ok)
426
+ throw new Error(`${g.status}`);
427
+ return g;
428
+ }).then((g) => g.json()).then((g) => ({
429
+ data: { images: g.data },
427
430
  message: "Images loaded via api",
428
431
  success: !0
429
- })).catch((l) => ({ success: !1, message: `${l}`, data: null }));
432
+ })).catch((g) => ({ success: !1, message: `${g}`, data: null }));
430
433
  }
431
434
  async storeImage(t) {
432
- const { version: o } = this.options, l = this.fileHeaders(), m = t;
435
+ const { version: o } = this.options, l = this.fileHeaders(), g = t;
433
436
  return console.info(
434
437
  "%capi%c %cstoreImage",
435
438
  c.API,
436
439
  c.NONE,
437
440
  c.WIDGET,
438
441
  t.get("name")
439
- ), await fetch(
440
- [this.url, "api", o, _.IMAGES].join("/"),
441
- { ...l, body: m, method: "post" }
442
- ).then((w) => {
443
- if (!w.ok)
444
- throw new Error(w.statusText);
445
- return w;
446
- }).then((w) => w.json()).catch((w) => ({ succes: !1, message: w, data: [] }));
442
+ ), await fetch([this.url, "api", o, _.IMAGES].join("/"), {
443
+ ...l,
444
+ body: g,
445
+ method: "post"
446
+ }).then((v) => {
447
+ if (!v.ok)
448
+ throw new Error(v.statusText);
449
+ return v;
450
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
447
451
  }
448
452
  async deleteImage(t) {
449
453
  const { version: o } = this.options, l = this.formHeaders();
@@ -456,11 +460,11 @@ class ka {
456
460
  ), await fetch(
457
461
  [this.url, "api", o, _.IMAGES, t].join("/"),
458
462
  { ...l, method: "delete" }
459
- ).then((m) => {
460
- if (!m.ok)
461
- throw new Error(m.statusText);
462
- return m;
463
- }).then((m) => m.json()).catch((m) => ({ succes: !1, message: m, data: [] }));
463
+ ).then((g) => {
464
+ if (!g.ok)
465
+ throw new Error(g.statusText);
466
+ return g;
467
+ }).then((g) => g.json()).catch((g) => ({ succes: !1, message: g, data: [] }));
464
468
  }
465
469
  }
466
470
  var Ca = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -485,23 +489,23 @@ function Ma() {
485
489
  return e;
486
490
  }).apply(this, arguments);
487
491
  };
488
- function m(e, n, r) {
492
+ function g(e, n, r) {
489
493
  for (var a, s = 0, i = n.length; s < i; s++) !a && s in n || ((a = a || Array.prototype.slice.call(n, 0, s))[s] = n[s]);
490
494
  return e.concat(a || Array.prototype.slice.call(n));
491
495
  }
492
- var w = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, C = Object.keys, K = Array.isArray;
496
+ var v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, k = Object.keys, K = Array.isArray;
493
497
  function te(e, n) {
494
- return typeof n != "object" || C(n).forEach(function(r) {
498
+ return typeof n != "object" || k(n).forEach(function(r) {
495
499
  e[r] = n[r];
496
500
  }), e;
497
501
  }
498
- typeof Promise > "u" || w.Promise || (w.Promise = Promise);
502
+ typeof Promise > "u" || v.Promise || (v.Promise = Promise);
499
503
  var ge = Object.getPrototypeOf, Ce = {}.hasOwnProperty;
500
504
  function ie(e, n) {
501
505
  return Ce.call(e, n);
502
506
  }
503
507
  function be(e, n) {
504
- typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ? C : Reflect.ownKeys)(n).forEach(function(r) {
508
+ typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ? k : Reflect.ownKeys)(n).forEach(function(r) {
505
509
  Ae(e, r, n[r]);
506
510
  });
507
511
  }
@@ -525,7 +529,7 @@ function Ma() {
525
529
  if (!e) throw new Error("Assertion Failed");
526
530
  }
527
531
  function Yn(e) {
528
- w.setImmediate ? setImmediate(e) : setTimeout(e, 0);
532
+ v.setImmediate ? setImmediate(e) : setTimeout(e, 0);
529
533
  }
530
534
  function ve(e, n) {
531
535
  if (typeof n == "string" && ie(e, n)) return e[n];
@@ -566,9 +570,9 @@ function Ma() {
566
570
  return n + e + "Array";
567
571
  });
568
572
  }))).filter(function(e) {
569
- return w[e];
573
+ return v[e];
570
574
  }), Jn = new Set(Ge.map(function(e) {
571
- return w[e];
575
+ return v[e];
572
576
  })), it = null;
573
577
  function $e(e) {
574
578
  return it = /* @__PURE__ */ new WeakMap(), e = function n(r) {
@@ -744,8 +748,8 @@ function Ma() {
744
748
  if (a._state === null) {
745
749
  if (i === a) throw new TypeError("A promise cannot be resolved with itself.");
746
750
  var u = a._lib && Ze();
747
- i && typeof i.then == "function" ? r(a, function(d, g) {
748
- i instanceof j ? i._then(d, g) : i.then(d, g);
751
+ i && typeof i.then == "function" ? r(a, function(d, p) {
752
+ i instanceof j ? i._then(d, p) : i.then(d, p);
749
753
  }) : (a._state = !0, a._value = i, rr(a)), u && qe();
750
754
  }
751
755
  }, fn.bind(null, a));
@@ -757,10 +761,10 @@ function Ma() {
757
761
  var dn = { get: function() {
758
762
  var e = B, n = Ct;
759
763
  function r(a, s) {
760
- var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), g = new j(function(y, E) {
761
- hn(i, new nr(sr(a, e, u, d), sr(s, e, u, d), y, E, e));
764
+ var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), p = new j(function(y, w) {
765
+ hn(i, new nr(sr(a, e, u, d), sr(s, e, u, d), y, w, e));
762
766
  });
763
- return this._consoleTask && (g._consoleTask = this._consoleTask), g;
767
+ return this._consoleTask && (p._consoleTask = this._consoleTask), p;
764
768
  }
765
769
  return r.prototype = ut, r;
766
770
  }, set: function(e) {
@@ -918,9 +922,9 @@ function Ma() {
918
922
  return De(function(s, i) {
919
923
  var u = B;
920
924
  u.unhandleds = [], u.onunhandled = i, u.finalize = Me(function() {
921
- var d, g = this;
925
+ var d, p = this;
922
926
  d = function() {
923
- g.unhandleds.length === 0 ? s() : i(g.unhandleds[0]);
927
+ p.unhandleds.length === 0 ? s() : i(p.unhandleds[0]);
924
928
  }, Rt.push(function y() {
925
929
  d(), Rt.splice(Rt.indexOf(y), 1);
926
930
  }), ++Le, dt(function() {
@@ -986,11 +990,11 @@ function Ma() {
986
990
  var r, a = B;
987
991
  (n ? !ne.echoes || kt++ && e === B : !kt || --kt && e === B) || queueMicrotask(n ? function(s) {
988
992
  ++Ct, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), xt.push(B), Ne(s, !0);
989
- }.bind(null, e) : sa), e !== B && (B = e, a === Pe && (Pe.env = ar()), cn && (r = Pe.env.Promise, n = e.env, (a.global || e.global) && (Object.defineProperty(w, "Promise", n.PromiseProp), r.all = n.all, r.race = n.race, r.resolve = n.resolve, r.reject = n.reject, n.allSettled && (r.allSettled = n.allSettled), n.any && (r.any = n.any))));
993
+ }.bind(null, e) : sa), e !== B && (B = e, a === Pe && (Pe.env = ar()), cn && (r = Pe.env.Promise, n = e.env, (a.global || e.global) && (Object.defineProperty(v, "Promise", n.PromiseProp), r.all = n.all, r.race = n.race, r.resolve = n.resolve, r.reject = n.reject, n.allSettled && (r.allSettled = n.allSettled), n.any && (r.any = n.any))));
990
994
  }
991
995
  function ar() {
992
- var e = w.Promise;
993
- return cn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(w, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
996
+ var e = v.Promise;
997
+ return cn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(v, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
994
998
  }
995
999
  function We(e, n, r, a, s) {
996
1000
  var i = B;
@@ -1043,14 +1047,14 @@ function Ma() {
1043
1047
  return n < e ? 1 : e < n ? -1 : 0;
1044
1048
  case "binary":
1045
1049
  return function(s, i) {
1046
- for (var u = s.length, d = i.length, g = u < d ? u : d, y = 0; y < g; ++y) if (s[y] !== i[y]) return s[y] < i[y] ? -1 : 1;
1050
+ for (var u = s.length, d = i.length, p = u < d ? u : d, y = 0; y < p; ++y) if (s[y] !== i[y]) return s[y] < i[y] ? -1 : 1;
1047
1051
  return u === d ? 0 : u < d ? -1 : 1;
1048
1052
  }(lr(e), lr(n));
1049
1053
  case "Array":
1050
1054
  return function(s, i) {
1051
- for (var u = s.length, d = i.length, g = u < d ? u : d, y = 0; y < g; ++y) {
1052
- var E = H(s[y], i[y]);
1053
- if (E !== 0) return E;
1055
+ for (var u = s.length, d = i.length, p = u < d ? u : d, y = 0; y < p; ++y) {
1056
+ var w = H(s[y], i[y]);
1057
+ if (w !== 0) return w;
1054
1058
  }
1055
1059
  return u === d ? 0 : u < d ? -1 : 1;
1056
1060
  }(e, n);
@@ -1068,50 +1072,50 @@ function Ma() {
1068
1072
  }
1069
1073
  var dr = (J.prototype._trans = function(e, n, r) {
1070
1074
  var a = this._tx || B.trans, s = this.name, i = pe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
1071
- function u(y, E, f) {
1075
+ function u(y, w, f) {
1072
1076
  if (!f.schema[s]) throw new L.NotFound("Table " + s + " not part of transaction");
1073
1077
  return n(f.idbtrans, f);
1074
1078
  }
1075
1079
  var d = Ze();
1076
1080
  try {
1077
- var g = a && a.db._novip === this.db._novip ? a === B.trans ? a._promise(e, u, r) : De(function() {
1081
+ var p = a && a.db._novip === this.db._novip ? a === B.trans ? a._promise(e, u, r) : De(function() {
1078
1082
  return a._promise(e, u, r);
1079
- }, { trans: a, transless: B.transless || B }) : function y(E, f, O, p) {
1080
- if (E.idbdb && (E._state.openComplete || B.letThrough || E._vip)) {
1081
- var v = E._createTransaction(f, O, E._dbSchema);
1083
+ }, { trans: a, transless: B.transless || B }) : function y(w, f, O, m) {
1084
+ if (w.idbdb && (w._state.openComplete || B.letThrough || w._vip)) {
1085
+ var E = w._createTransaction(f, O, w._dbSchema);
1082
1086
  try {
1083
- v.create(), E._state.PR1398_maxLoop = 3;
1087
+ E.create(), w._state.PR1398_maxLoop = 3;
1084
1088
  } catch (S) {
1085
- return S.name === sn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
1086
- return y(E, f, O, p);
1089
+ return S.name === sn.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
1090
+ return y(w, f, O, m);
1087
1091
  })) : q(S);
1088
1092
  }
1089
- return v._promise(f, function(S, b) {
1093
+ return E._promise(f, function(S, b) {
1090
1094
  return De(function() {
1091
- return B.trans = v, p(S, b, v);
1095
+ return B.trans = E, m(S, b, E);
1092
1096
  });
1093
1097
  }).then(function(S) {
1094
1098
  if (f === "readwrite") try {
1095
- v.idbtrans.commit();
1099
+ E.idbtrans.commit();
1096
1100
  } catch {
1097
1101
  }
1098
- return f === "readonly" ? S : v._completion.then(function() {
1102
+ return f === "readonly" ? S : E._completion.then(function() {
1099
1103
  return S;
1100
1104
  });
1101
1105
  });
1102
1106
  }
1103
- if (E._state.openComplete) return q(new L.DatabaseClosed(E._state.dbOpenError));
1104
- if (!E._state.isBeingOpened) {
1105
- if (!E._state.autoOpen) return q(new L.DatabaseClosed());
1106
- E.open().catch(Q);
1107
+ if (w._state.openComplete) return q(new L.DatabaseClosed(w._state.dbOpenError));
1108
+ if (!w._state.isBeingOpened) {
1109
+ if (!w._state.autoOpen) return q(new L.DatabaseClosed());
1110
+ w.open().catch(Q);
1107
1111
  }
1108
- return E._state.dbReadyPromise.then(function() {
1109
- return y(E, f, O, p);
1112
+ return w._state.dbReadyPromise.then(function() {
1113
+ return y(w, f, O, m);
1110
1114
  });
1111
1115
  }(this.db, e, [this.name], u);
1112
- return i && (g._consoleTask = i, g = g.catch(function(y) {
1116
+ return i && (p._consoleTask = i, p = p.catch(function(y) {
1113
1117
  return console.trace(y), q(y);
1114
- })), g;
1118
+ })), p;
1115
1119
  } finally {
1116
1120
  d && qe();
1117
1121
  }
@@ -1125,39 +1129,39 @@ function Ma() {
1125
1129
  }, J.prototype.where = function(e) {
1126
1130
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1127
1131
  if (K(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1128
- var n = C(e);
1132
+ var n = k(e);
1129
1133
  if (n.length === 1) return this.where(n[0]).equals(e[n[0]]);
1130
1134
  var r = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
1131
1135
  if (d.compound && n.every(function(y) {
1132
1136
  return 0 <= d.keyPath.indexOf(y);
1133
1137
  })) {
1134
- for (var g = 0; g < n.length; ++g) if (n.indexOf(d.keyPath[g]) === -1) return !1;
1138
+ for (var p = 0; p < n.length; ++p) if (n.indexOf(d.keyPath[p]) === -1) return !1;
1135
1139
  return !0;
1136
1140
  }
1137
1141
  return !1;
1138
- }).sort(function(d, g) {
1139
- return d.keyPath.length - g.keyPath.length;
1142
+ }).sort(function(d, p) {
1143
+ return d.keyPath.length - p.keyPath.length;
1140
1144
  })[0];
1141
1145
  if (r && this.db._maxKey !== Fe) {
1142
1146
  var i = r.keyPath.slice(0, n.length);
1143
- return this.where(i).equals(i.map(function(g) {
1144
- return e[g];
1147
+ return this.where(i).equals(i.map(function(p) {
1148
+ return e[p];
1145
1149
  }));
1146
1150
  }
1147
1151
  !r && pe && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
1148
1152
  var a = this.schema.idxByName;
1149
- function s(d, g) {
1150
- return H(d, g) === 0;
1153
+ function s(d, p) {
1154
+ return H(d, p) === 0;
1151
1155
  }
1152
- var u = n.reduce(function(f, g) {
1153
- var y = f[0], E = f[1], f = a[g], O = e[g];
1154
- return [y || f, y || !f ? Ue(E, f && f.multi ? function(p) {
1155
- return p = ve(p, g), K(p) && p.some(function(v) {
1156
- return s(O, v);
1156
+ var u = n.reduce(function(f, p) {
1157
+ var y = f[0], w = f[1], f = a[p], O = e[p];
1158
+ return [y || f, y || !f ? Ue(w, f && f.multi ? function(m) {
1159
+ return m = ve(m, p), K(m) && m.some(function(E) {
1160
+ return s(O, E);
1157
1161
  });
1158
- } : function(p) {
1159
- return s(O, ve(p, g));
1160
- }) : E];
1162
+ } : function(m) {
1163
+ return s(O, ve(m, p));
1164
+ }) : w];
1161
1165
  }, [null, null]), i = u[0], u = u[1];
1162
1166
  return i ? this.where(i.name).equals(e[i.keyPath]).filter(u) : r ? this.filter(u) : this.where(n).equals("");
1163
1167
  }, J.prototype.filter = function(e) {
@@ -1183,28 +1187,28 @@ function Ma() {
1183
1187
  function s() {
1184
1188
  return n !== null && n.apply(this, arguments) || this;
1185
1189
  }
1186
- (this.schema.mappedClass = e).prototype instanceof cr && (function(g, y) {
1190
+ (this.schema.mappedClass = e).prototype instanceof cr && (function(p, y) {
1187
1191
  if (typeof y != "function" && y !== null) throw new TypeError("Class extends value " + String(y) + " is not a constructor or null");
1188
- function E() {
1189
- this.constructor = g;
1192
+ function w() {
1193
+ this.constructor = p;
1190
1194
  }
1191
- o(g, y), g.prototype = y === null ? Object.create(y) : (E.prototype = y.prototype, new E());
1195
+ o(p, y), p.prototype = y === null ? Object.create(y) : (w.prototype = y.prototype, new w());
1192
1196
  }(s, n = e), Object.defineProperty(s.prototype, "db", { get: function() {
1193
1197
  return r;
1194
1198
  }, enumerable: !1, configurable: !0 }), s.prototype.table = function() {
1195
1199
  return a;
1196
1200
  }, e = s);
1197
- for (var i = /* @__PURE__ */ new Set(), u = e.prototype; u; u = ge(u)) Object.getOwnPropertyNames(u).forEach(function(g) {
1198
- return i.add(g);
1201
+ for (var i = /* @__PURE__ */ new Set(), u = e.prototype; u; u = ge(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1202
+ return i.add(p);
1199
1203
  });
1200
- function d(g) {
1201
- if (!g) return g;
1202
- var y, E = Object.create(e.prototype);
1203
- for (y in g) if (!i.has(y)) try {
1204
- E[y] = g[y];
1204
+ function d(p) {
1205
+ if (!p) return p;
1206
+ var y, w = Object.create(e.prototype);
1207
+ for (y in p) if (!i.has(y)) try {
1208
+ w[y] = p[y];
1205
1209
  } catch {
1206
1210
  }
1207
- return E;
1211
+ return w;
1208
1212
  }
1209
1213
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = d, this.hook("reading", d), e;
1210
1214
  }, J.prototype.defineClass = function() {
@@ -1268,11 +1272,11 @@ function Ma() {
1268
1272
  var y = a.schema.primKey, d = y.auto, y = y.keyPath;
1269
1273
  if (y && s) throw new L.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
1270
1274
  if (s && s.length !== e.length) throw new L.InvalidArgument("Arguments objects and keys must have the same length");
1271
- var g = e.length, y = y && d ? e.map(Mt(y)) : e;
1272
- return a.core.mutate({ trans: u, type: "add", keys: s, values: y, wantResults: i }).then(function(v) {
1273
- var f = v.numFailures, O = v.results, p = v.lastResult, v = v.failures;
1274
- if (f === 0) return i ? O : p;
1275
- throw new Je("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(g, " operations failed"), v);
1275
+ var p = e.length, y = y && d ? e.map(Mt(y)) : e;
1276
+ return a.core.mutate({ trans: u, type: "add", keys: s, values: y, wantResults: i }).then(function(E) {
1277
+ var f = E.numFailures, O = E.results, m = E.lastResult, E = E.failures;
1278
+ if (f === 0) return i ? O : m;
1279
+ throw new Je("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(p, " operations failed"), E);
1276
1280
  });
1277
1281
  });
1278
1282
  }, J.prototype.bulkPut = function(e, n, r) {
@@ -1281,11 +1285,11 @@ function Ma() {
1281
1285
  var y = a.schema.primKey, d = y.auto, y = y.keyPath;
1282
1286
  if (y && s) throw new L.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
1283
1287
  if (s && s.length !== e.length) throw new L.InvalidArgument("Arguments objects and keys must have the same length");
1284
- var g = e.length, y = y && d ? e.map(Mt(y)) : e;
1285
- return a.core.mutate({ trans: u, type: "put", keys: s, values: y, wantResults: i }).then(function(v) {
1286
- var f = v.numFailures, O = v.results, p = v.lastResult, v = v.failures;
1287
- if (f === 0) return i ? O : p;
1288
- throw new Je("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(g, " operations failed"), v);
1288
+ var p = e.length, y = y && d ? e.map(Mt(y)) : e;
1289
+ return a.core.mutate({ trans: u, type: "put", keys: s, values: y, wantResults: i }).then(function(E) {
1290
+ var f = E.numFailures, O = E.results, m = E.lastResult, E = E.failures;
1291
+ if (f === 0) return i ? O : m;
1292
+ throw new Je("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(p, " operations failed"), E);
1289
1293
  });
1290
1294
  });
1291
1295
  }, J.prototype.bulkUpdate = function(e) {
@@ -1296,28 +1300,28 @@ function Ma() {
1296
1300
  }), i = [];
1297
1301
  return this._trans("readwrite", function(u) {
1298
1302
  return r.getMany({ trans: u, keys: a, cache: "clone" }).then(function(d) {
1299
- var g = [], y = [];
1303
+ var p = [], y = [];
1300
1304
  e.forEach(function(f, O) {
1301
- var p = f.key, v = f.changes, S = d[O];
1305
+ var m = f.key, E = f.changes, S = d[O];
1302
1306
  if (S) {
1303
- for (var b = 0, A = Object.keys(v); b < A.length; b++) {
1304
- var P = A[b], D = v[P];
1307
+ for (var b = 0, A = Object.keys(E); b < A.length; b++) {
1308
+ var P = A[b], D = E[P];
1305
1309
  if (P === n.schema.primKey.keyPath) {
1306
- if (H(D, p) !== 0) throw new L.Constraint("Cannot update primary key in bulkUpdate()");
1310
+ if (H(D, m) !== 0) throw new L.Constraint("Cannot update primary key in bulkUpdate()");
1307
1311
  } else ue(S, P, D);
1308
1312
  }
1309
- i.push(O), g.push(p), y.push(S);
1313
+ i.push(O), p.push(m), y.push(S);
1310
1314
  }
1311
1315
  });
1312
- var E = g.length;
1313
- return r.mutate({ trans: u, type: "put", keys: g, values: y, updates: { keys: a, changeSpecs: s } }).then(function(f) {
1314
- var O = f.numFailures, p = f.failures;
1315
- if (O === 0) return E;
1316
- for (var v = 0, S = Object.keys(p); v < S.length; v++) {
1317
- var b, A = S[v], P = i[Number(A)];
1318
- P != null && (b = p[A], delete p[A], p[P] = b);
1316
+ var w = p.length;
1317
+ return r.mutate({ trans: u, type: "put", keys: p, values: y, updates: { keys: a, changeSpecs: s } }).then(function(f) {
1318
+ var O = f.numFailures, m = f.failures;
1319
+ if (O === 0) return w;
1320
+ for (var E = 0, S = Object.keys(m); E < S.length; E++) {
1321
+ var b, A = S[E], P = i[Number(A)];
1322
+ P != null && (b = m[A], delete m[A], m[P] = b);
1319
1323
  }
1320
- throw new Je("".concat(n.name, ".bulkUpdate(): ").concat(O, " of ").concat(E, " operations failed"), p);
1324
+ throw new Je("".concat(n.name, ".bulkUpdate(): ").concat(O, " of ").concat(w, " operations failed"), m);
1321
1325
  });
1322
1326
  });
1323
1327
  });
@@ -1336,7 +1340,7 @@ function Ma() {
1336
1340
  function ht(e) {
1337
1341
  function n(u, d) {
1338
1342
  if (d) {
1339
- for (var g = arguments.length, y = new Array(g - 1); --g; ) y[g - 1] = arguments[g];
1343
+ for (var p = arguments.length, y = new Array(p - 1); --p; ) y[p - 1] = arguments[p];
1340
1344
  return r[u].subscribe.apply(null, y), e;
1341
1345
  }
1342
1346
  if (typeof u == "string") return r[u];
@@ -1345,27 +1349,27 @@ function Ma() {
1345
1349
  n.addEventType = i;
1346
1350
  for (var a = 1, s = arguments.length; a < s; ++a) i(arguments[a]);
1347
1351
  return n;
1348
- function i(u, d, g) {
1352
+ function i(u, d, p) {
1349
1353
  if (typeof u != "object") {
1350
1354
  var y;
1351
1355
  d = d || ea;
1352
- var E = { subscribers: [], fire: g = g || Q, subscribe: function(f) {
1353
- E.subscribers.indexOf(f) === -1 && (E.subscribers.push(f), E.fire = d(E.fire, f));
1356
+ var w = { subscribers: [], fire: p = p || Q, subscribe: function(f) {
1357
+ w.subscribers.indexOf(f) === -1 && (w.subscribers.push(f), w.fire = d(w.fire, f));
1354
1358
  }, unsubscribe: function(f) {
1355
- E.subscribers = E.subscribers.filter(function(O) {
1359
+ w.subscribers = w.subscribers.filter(function(O) {
1356
1360
  return O !== f;
1357
- }), E.fire = E.subscribers.reduce(d, g);
1361
+ }), w.fire = w.subscribers.reduce(d, p);
1358
1362
  } };
1359
- return r[u] = n[u] = E;
1363
+ return r[u] = n[u] = w;
1360
1364
  }
1361
- C(y = u).forEach(function(f) {
1365
+ k(y = u).forEach(function(f) {
1362
1366
  var O = y[f];
1363
1367
  if (K(O)) i(f, y[f][0], y[f][1]);
1364
1368
  else {
1365
1369
  if (O !== "asap") throw new L.InvalidArgument("Invalid event config");
1366
- var p = i(f, ct, function() {
1367
- for (var v = arguments.length, S = new Array(v); v--; ) S[v] = arguments[v];
1368
- p.subscribers.forEach(function(b) {
1370
+ var m = i(f, ct, function() {
1371
+ for (var E = arguments.length, S = new Array(E); E--; ) S[E] = arguments[E];
1372
+ m.subscribers.forEach(function(b) {
1369
1373
  Yn(function() {
1370
1374
  b.apply(null, S);
1371
1375
  });
@@ -1403,13 +1407,13 @@ function Ma() {
1403
1407
  function Kt(e, n, r, a) {
1404
1408
  var s = e.replayFilter ? Ue(e.filter, e.replayFilter()) : e.filter;
1405
1409
  if (e.or) {
1406
- var i = {}, u = function(d, g, y) {
1407
- var E, f;
1408
- s && !s(g, y, function(O) {
1409
- return g.stop(O);
1410
+ var i = {}, u = function(d, p, y) {
1411
+ var w, f;
1412
+ s && !s(p, y, function(O) {
1413
+ return p.stop(O);
1410
1414
  }, function(O) {
1411
- return g.fail(O);
1412
- }) || ((f = "" + (E = g.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(E)), ie(i, f) || (i[f] = !0, n(d, g, y)));
1415
+ return p.fail(O);
1416
+ }) || ((f = "" + (w = p.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(w)), ie(i, f) || (i[f] = !0, n(d, p, y)));
1413
1417
  };
1414
1418
  return Promise.all([e.or._iterate(u, r), hr(fr(e, a, r), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1415
1419
  }
@@ -1440,7 +1444,7 @@ function Ma() {
1440
1444
  var n = this["@@propmod"];
1441
1445
  if (n.add !== void 0) {
1442
1446
  var r = n.add;
1443
- if (K(r)) return m(m([], K(e) ? e : [], !0), r).sort();
1447
+ if (K(r)) return g(g([], K(e) ? e : [], !0), r).sort();
1444
1448
  if (typeof r == "number") return (Number(e) || 0) + r;
1445
1449
  if (typeof r == "bigint") try {
1446
1450
  return BigInt(e) + r;
@@ -1504,15 +1508,15 @@ function Ma() {
1504
1508
  }).then(e);
1505
1509
  }, V.prototype.sortBy = function(e, n) {
1506
1510
  var r = e.split(".").reverse(), a = r[0], s = r.length - 1;
1507
- function i(g, y) {
1508
- return y ? i(g[r[y]], y - 1) : g[a];
1511
+ function i(p, y) {
1512
+ return y ? i(p[r[y]], y - 1) : p[a];
1509
1513
  }
1510
1514
  var u = this._ctx.dir === "next" ? 1 : -1;
1511
- function d(g, y) {
1512
- return H(i(g, s), i(y, s)) * u;
1515
+ function d(p, y) {
1516
+ return H(i(p, s), i(y, s)) * u;
1513
1517
  }
1514
- return this.toArray(function(g) {
1515
- return g.sort(d);
1518
+ return this.toArray(function(p) {
1519
+ return p.sort(d);
1516
1520
  }).then(n);
1517
1521
  }, V.prototype.toArray = function(e) {
1518
1522
  var n = this;
@@ -1632,35 +1636,35 @@ function Ma() {
1632
1636
  var n = this, r = this._ctx;
1633
1637
  return this._write(function(a) {
1634
1638
  var s, i, u;
1635
- u = typeof e == "function" ? e : (s = C(e), i = s.length, function(b) {
1639
+ u = typeof e == "function" ? e : (s = k(e), i = s.length, function(b) {
1636
1640
  for (var A = !1, P = 0; P < i; ++P) {
1637
1641
  var D = s[P], I = e[D], N = ve(b, D);
1638
1642
  I instanceof pt ? (ue(b, D, I.execute(N)), A = !0) : N !== I && (ue(b, D, I), A = !0);
1639
1643
  }
1640
1644
  return A;
1641
1645
  });
1642
- var d = r.table.core, f = d.schema.primaryKey, g = f.outbound, y = f.extractKey, E = 200, f = n.db._options.modifyChunkSize;
1643
- f && (E = typeof f == "object" ? f[d.name] || f["*"] || 200 : f);
1646
+ var d = r.table.core, f = d.schema.primaryKey, p = f.outbound, y = f.extractKey, w = 200, f = n.db._options.modifyChunkSize;
1647
+ f && (w = typeof f == "object" ? f[d.name] || f["*"] || 200 : f);
1644
1648
  function O(b, D) {
1645
1649
  var P = D.failures, D = D.numFailures;
1646
- v += b - D;
1647
- for (var I = 0, N = C(P); I < N.length; I++) {
1648
- var k = N[I];
1649
- p.push(P[k]);
1650
+ E += b - D;
1651
+ for (var I = 0, N = k(P); I < N.length; I++) {
1652
+ var C = N[I];
1653
+ m.push(P[C]);
1650
1654
  }
1651
1655
  }
1652
- var p = [], v = 0, S = [];
1656
+ var m = [], E = 0, S = [];
1653
1657
  return n.clone().primaryKeys().then(function(b) {
1654
1658
  function A(D) {
1655
- var I = Math.min(E, b.length - D);
1659
+ var I = Math.min(w, b.length - D);
1656
1660
  return d.getMany({ trans: a, keys: b.slice(D, D + I), cache: "immutable" }).then(function(N) {
1657
- for (var k = [], R = [], T = g ? [] : null, $ = [], x = 0; x < I; ++x) {
1661
+ for (var C = [], R = [], T = p ? [] : null, $ = [], x = 0; x < I; ++x) {
1658
1662
  var M = N[x], F = { value: $e(M), primKey: b[D + x] };
1659
- u.call(F, F.value, F) !== !1 && (F.value == null ? $.push(b[D + x]) : g || H(y(M), y(F.value)) === 0 ? (R.push(F.value), g && T.push(b[D + x])) : ($.push(b[D + x]), k.push(F.value)));
1663
+ u.call(F, F.value, F) !== !1 && (F.value == null ? $.push(b[D + x]) : p || H(y(M), y(F.value)) === 0 ? (R.push(F.value), p && T.push(b[D + x])) : ($.push(b[D + x]), C.push(F.value)));
1660
1664
  }
1661
- return Promise.resolve(0 < k.length && d.mutate({ trans: a, type: "add", values: k }).then(function(U) {
1665
+ return Promise.resolve(0 < C.length && d.mutate({ trans: a, type: "add", values: C }).then(function(U) {
1662
1666
  for (var z in U.failures) $.splice(parseInt(z), 1);
1663
- O(k.length, U);
1667
+ O(C.length, U);
1664
1668
  })).then(function() {
1665
1669
  return (0 < R.length || P && typeof e == "object") && d.mutate({ trans: a, type: "put", keys: T, values: R, criteria: P, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < D }).then(function(U) {
1666
1670
  return O(R.length, U);
@@ -1670,13 +1674,13 @@ function Ma() {
1670
1674
  return O($.length, U);
1671
1675
  });
1672
1676
  }).then(function() {
1673
- return b.length > D + I && A(D + E);
1677
+ return b.length > D + I && A(D + w);
1674
1678
  });
1675
1679
  });
1676
1680
  }
1677
1681
  var P = nt(r) && r.limit === 1 / 0 && (typeof e != "function" || e === En) && { index: r.index, range: r.range };
1678
1682
  return A(0).then(function() {
1679
- if (0 < p.length) throw new Pt("Error modifying one or more objects", p, v, S);
1683
+ if (0 < m.length) throw new Pt("Error modifying one or more objects", m, E, S);
1680
1684
  return b.length;
1681
1685
  });
1682
1686
  });
@@ -1688,8 +1692,8 @@ function Ma() {
1688
1692
  return e.table.core.count({ trans: r, query: { index: a, range: s } }).then(function(i) {
1689
1693
  return e.table.core.mutate({ trans: r, type: "deleteRange", range: s }).then(function(u) {
1690
1694
  var d = u.failures;
1691
- if (u.lastResult, u.results, u = u.numFailures, u) throw new Pt("Could not delete some values", Object.keys(d).map(function(g) {
1692
- return d[g];
1695
+ if (u.lastResult, u.results, u = u.numFailures, u) throw new Pt("Could not delete some values", Object.keys(d).map(function(p) {
1696
+ return d[p];
1693
1697
  }), i - u);
1694
1698
  return i - u;
1695
1699
  });
@@ -1716,20 +1720,20 @@ function Ma() {
1716
1720
  }).limit(0);
1717
1721
  }
1718
1722
  function Bt(e, n, r, a) {
1719
- var s, i, u, d, g, y, E, f = r.length;
1720
- if (!r.every(function(v) {
1721
- return typeof v == "string";
1723
+ var s, i, u, d, p, y, w, f = r.length;
1724
+ if (!r.every(function(E) {
1725
+ return typeof E == "string";
1722
1726
  })) return le(e, or);
1723
- function O(v) {
1724
- s = v === "next" ? function(b) {
1727
+ function O(E) {
1728
+ s = E === "next" ? function(b) {
1725
1729
  return b.toUpperCase();
1726
1730
  } : function(b) {
1727
1731
  return b.toLowerCase();
1728
- }, i = v === "next" ? function(b) {
1732
+ }, i = E === "next" ? function(b) {
1729
1733
  return b.toLowerCase();
1730
1734
  } : function(b) {
1731
1735
  return b.toUpperCase();
1732
- }, u = v === "next" ? ia : ca;
1736
+ }, u = E === "next" ? ia : ca;
1733
1737
  var S = r.map(function(b) {
1734
1738
  return { lower: i(b), upper: s(b) };
1735
1739
  }).sort(function(b, A) {
@@ -1737,34 +1741,34 @@ function Ma() {
1737
1741
  });
1738
1742
  d = S.map(function(b) {
1739
1743
  return b.upper;
1740
- }), g = S.map(function(b) {
1744
+ }), p = S.map(function(b) {
1741
1745
  return b.lower;
1742
- }), E = (y = v) === "next" ? "" : a;
1746
+ }), w = (y = E) === "next" ? "" : a;
1743
1747
  }
1744
1748
  O("next"), e = new e.Collection(e, function() {
1745
- return Re(d[0], g[f - 1] + a);
1746
- }), e._ondirectionchange = function(v) {
1747
- O(v);
1749
+ return Re(d[0], p[f - 1] + a);
1750
+ }), e._ondirectionchange = function(E) {
1751
+ O(E);
1748
1752
  };
1749
- var p = 0;
1750
- return e._addAlgorithm(function(v, S, b) {
1751
- var A = v.key;
1753
+ var m = 0;
1754
+ return e._addAlgorithm(function(E, S, b) {
1755
+ var A = E.key;
1752
1756
  if (typeof A != "string") return !1;
1753
1757
  var P = i(A);
1754
- if (n(P, g, p)) return !0;
1755
- for (var D = null, I = p; I < f; ++I) {
1756
- var N = function(k, R, T, $, x, M) {
1757
- for (var F = Math.min(k.length, $.length), U = -1, z = 0; z < F; ++z) {
1758
+ if (n(P, p, m)) return !0;
1759
+ for (var D = null, I = m; I < f; ++I) {
1760
+ var N = function(C, R, T, $, x, M) {
1761
+ for (var F = Math.min(C.length, $.length), U = -1, z = 0; z < F; ++z) {
1758
1762
  var de = R[z];
1759
- if (de !== $[z]) return x(k[z], T[z]) < 0 ? k.substr(0, z) + T[z] + T.substr(z + 1) : x(k[z], $[z]) < 0 ? k.substr(0, z) + $[z] + T.substr(z + 1) : 0 <= U ? k.substr(0, U) + R[U] + T.substr(U + 1) : null;
1760
- x(k[z], de) < 0 && (U = z);
1763
+ if (de !== $[z]) return x(C[z], T[z]) < 0 ? C.substr(0, z) + T[z] + T.substr(z + 1) : x(C[z], $[z]) < 0 ? C.substr(0, z) + $[z] + T.substr(z + 1) : 0 <= U ? C.substr(0, U) + R[U] + T.substr(U + 1) : null;
1764
+ x(C[z], de) < 0 && (U = z);
1761
1765
  }
1762
- return F < $.length && M === "next" ? k + T.substr(k.length) : F < k.length && M === "prev" ? k.substr(0, T.length) : U < 0 ? null : k.substr(0, U) + $[U] + T.substr(U + 1);
1763
- }(A, P, d[I], g[I], u, y);
1764
- N === null && D === null ? p = I + 1 : (D === null || 0 < u(D, N)) && (D = N);
1766
+ return F < $.length && M === "next" ? C + T.substr(C.length) : F < C.length && M === "prev" ? C.substr(0, T.length) : U < 0 ? null : C.substr(0, U) + $[U] + T.substr(U + 1);
1767
+ }(A, P, d[I], p[I], u, y);
1768
+ N === null && D === null ? m = I + 1 : (D === null || 0 < u(D, N)) && (D = N);
1765
1769
  }
1766
1770
  return S(D !== null ? function() {
1767
- v.continue(D + E);
1771
+ E.continue(D + w);
1768
1772
  } : b), !1;
1769
1773
  }), e;
1770
1774
  }
@@ -1843,8 +1847,8 @@ function Ma() {
1843
1847
  };
1844
1848
  var s = 0;
1845
1849
  return a._addAlgorithm(function(i, u, d) {
1846
- for (var g = i.key; 0 < r(g, n[s]); ) if (++s === n.length) return u(d), !1;
1847
- return r(g, n[s]) === 0 || (u(function() {
1850
+ for (var p = i.key; 0 < r(p, n[s]); ) if (++s === n.length) return u(d), !1;
1851
+ return r(p, n[s]) === 0 || (u(function() {
1848
1852
  i.continue(n[s]);
1849
1853
  }), !1);
1850
1854
  }), a;
@@ -1868,16 +1872,16 @@ function Ma() {
1868
1872
  if (!A.every(function(P) {
1869
1873
  return P[0] !== void 0 && P[1] !== void 0 && s(P[0], P[1]) <= 0;
1870
1874
  })) return le(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", L.InvalidArgument);
1871
- var g = !n || n.includeLowers !== !1, y = n && n.includeUppers === !0, E, f = s;
1875
+ var p = !n || n.includeLowers !== !1, y = n && n.includeUppers === !0, w, f = s;
1872
1876
  function O(P, D) {
1873
1877
  return f(P[0], D[0]);
1874
1878
  }
1875
1879
  try {
1876
- (E = A.reduce(function(P, D) {
1880
+ (w = A.reduce(function(P, D) {
1877
1881
  for (var I = 0, N = P.length; I < N; ++I) {
1878
- var k = P[I];
1879
- if (a(D[0], k[1]) < 0 && 0 < a(D[1], k[0])) {
1880
- k[0] = u(k[0], D[0]), k[1] = d(k[1], D[1]);
1882
+ var C = P[I];
1883
+ if (a(D[0], C[1]) < 0 && 0 < a(D[1], C[0])) {
1884
+ C[0] = u(C[0], D[0]), C[1] = d(C[1], D[1]);
1881
1885
  break;
1882
1886
  }
1883
1887
  }
@@ -1886,23 +1890,23 @@ function Ma() {
1886
1890
  } catch {
1887
1891
  return le(this, we);
1888
1892
  }
1889
- var p = 0, v = y ? function(P) {
1890
- return 0 < s(P, E[p][1]);
1893
+ var m = 0, E = y ? function(P) {
1894
+ return 0 < s(P, w[m][1]);
1891
1895
  } : function(P) {
1892
- return 0 <= s(P, E[p][1]);
1893
- }, S = g ? function(P) {
1894
- return 0 < i(P, E[p][0]);
1896
+ return 0 <= s(P, w[m][1]);
1897
+ }, S = p ? function(P) {
1898
+ return 0 < i(P, w[m][0]);
1895
1899
  } : function(P) {
1896
- return 0 <= i(P, E[p][0]);
1897
- }, b = v, A = new this.Collection(this, function() {
1898
- return Re(E[0][0], E[E.length - 1][1], !g, !y);
1900
+ return 0 <= i(P, w[m][0]);
1901
+ }, b = E, A = new this.Collection(this, function() {
1902
+ return Re(w[0][0], w[w.length - 1][1], !p, !y);
1899
1903
  });
1900
1904
  return A._ondirectionchange = function(P) {
1901
- f = P === "next" ? (b = v, s) : (b = S, i), E.sort(O);
1905
+ f = P === "next" ? (b = E, s) : (b = S, i), w.sort(O);
1902
1906
  }, A._addAlgorithm(function(P, D, I) {
1903
- for (var N, k = P.key; b(k); ) if (++p === E.length) return D(I), !1;
1904
- return !v(N = k) && !S(N) || (r._cmp(k, E[p][1]) === 0 || r._cmp(k, E[p][0]) === 0 || D(function() {
1905
- f === s ? P.continue(E[p][0]) : P.continue(E[p][1]);
1907
+ for (var N, C = P.key; b(C); ) if (++m === w.length) return D(I), !1;
1908
+ return !E(N = C) && !S(N) || (r._cmp(C, w[m][1]) === 0 || r._cmp(C, w[m][0]) === 0 || D(function() {
1909
+ f === s ? P.continue(w[m][0]) : P.continue(w[m][1]);
1906
1910
  }), !1);
1907
1911
  }), A;
1908
1912
  }, re.prototype.startsWithAnyOf = function() {
@@ -1968,8 +1972,8 @@ function Ma() {
1968
1972
  if (r) return De(function() {
1969
1973
  var i = new j(function(u, d) {
1970
1974
  a._lock();
1971
- var g = n(u, d, a);
1972
- g && g.then && g.then(u, d);
1975
+ var p = n(u, d, a);
1976
+ p && p.then && p.then(u, d);
1973
1977
  });
1974
1978
  return i.finally(function() {
1975
1979
  return a._unlock();
@@ -2054,20 +2058,20 @@ function Ma() {
2054
2058
  function vt(e) {
2055
2059
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
2056
2060
  }
2057
- function da(e, n, g) {
2061
+ function da(e, n, p) {
2058
2062
  function a(b) {
2059
2063
  if (b.type === 3) return null;
2060
2064
  if (b.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
2061
- var p = b.lower, v = b.upper, S = b.lowerOpen, b = b.upperOpen;
2062
- return p === void 0 ? v === void 0 ? null : n.upperBound(v, !!b) : v === void 0 ? n.lowerBound(p, !!S) : n.bound(p, v, !!S, !!b);
2065
+ var m = b.lower, E = b.upper, S = b.lowerOpen, b = b.upperOpen;
2066
+ return m === void 0 ? E === void 0 ? null : n.upperBound(E, !!b) : E === void 0 ? n.lowerBound(m, !!S) : n.bound(m, E, !!S, !!b);
2063
2067
  }
2064
2068
  function s(O) {
2065
- var p, v = O.name;
2066
- return { name: v, schema: O, mutate: function(S) {
2069
+ var m, E = O.name;
2070
+ return { name: E, schema: O, mutate: function(S) {
2067
2071
  var b = S.trans, A = S.type, P = S.keys, D = S.values, I = S.range;
2068
- return new Promise(function(N, k) {
2072
+ return new Promise(function(N, C) {
2069
2073
  N = Z(N);
2070
- var R = b.objectStore(v), T = R.keyPath == null, $ = A === "put" || A === "add";
2074
+ var R = b.objectStore(E), T = R.keyPath == null, $ = A === "put" || A === "add";
2071
2075
  if (!$ && A !== "delete" && A !== "deleteRange") throw new Error("Invalid operation type: " + A);
2072
2076
  var x, M = (P || D || { length: 1 }).length;
2073
2077
  if (P && D && P.length !== D.length) throw new Error("Given keys array must have same length as given values array.");
@@ -2099,44 +2103,44 @@ function Ma() {
2099
2103
  var b = S.trans, A = S.keys;
2100
2104
  return new Promise(function(P, D) {
2101
2105
  P = Z(P);
2102
- for (var I, N = b.objectStore(v), k = A.length, R = new Array(k), T = 0, $ = 0, x = function(U) {
2106
+ for (var I, N = b.objectStore(E), C = A.length, R = new Array(C), T = 0, $ = 0, x = function(U) {
2103
2107
  U = U.target, R[U._pos] = U.result, ++$ === T && P(R);
2104
- }, M = me(D), F = 0; F < k; ++F) A[F] != null && ((I = N.get(A[F]))._pos = F, I.onsuccess = x, I.onerror = M, ++T);
2108
+ }, M = me(D), F = 0; F < C; ++F) A[F] != null && ((I = N.get(A[F]))._pos = F, I.onsuccess = x, I.onerror = M, ++T);
2105
2109
  T === 0 && P(R);
2106
2110
  });
2107
2111
  }, get: function(S) {
2108
2112
  var b = S.trans, A = S.key;
2109
2113
  return new Promise(function(P, D) {
2110
2114
  P = Z(P);
2111
- var I = b.objectStore(v).get(A);
2115
+ var I = b.objectStore(E).get(A);
2112
2116
  I.onsuccess = function(N) {
2113
2117
  return P(N.target.result);
2114
2118
  }, I.onerror = me(D);
2115
2119
  });
2116
- }, query: (p = y, function(S) {
2120
+ }, query: (m = y, function(S) {
2117
2121
  return new Promise(function(b, A) {
2118
2122
  b = Z(b);
2119
- var P, D, I, T = S.trans, N = S.values, k = S.limit, x = S.query, R = k === 1 / 0 ? void 0 : k, $ = x.index, x = x.range, T = T.objectStore(v), $ = $.isPrimaryKey ? T : T.index($.name), x = a(x);
2120
- if (k === 0) return b({ result: [] });
2121
- p ? ((R = N ? $.getAll(x, R) : $.getAllKeys(x, R)).onsuccess = function(M) {
2123
+ var P, D, I, T = S.trans, N = S.values, C = S.limit, x = S.query, R = C === 1 / 0 ? void 0 : C, $ = x.index, x = x.range, T = T.objectStore(E), $ = $.isPrimaryKey ? T : T.index($.name), x = a(x);
2124
+ if (C === 0) return b({ result: [] });
2125
+ m ? ((R = N ? $.getAll(x, R) : $.getAllKeys(x, R)).onsuccess = function(M) {
2122
2126
  return b({ result: M.target.result });
2123
2127
  }, R.onerror = me(A)) : (P = 0, D = !N && "openKeyCursor" in $ ? $.openKeyCursor(x) : $.openCursor(x), I = [], D.onsuccess = function(M) {
2124
2128
  var F = D.result;
2125
- return F ? (I.push(N ? F.value : F.primaryKey), ++P === k ? b({ result: I }) : void F.continue()) : b({ result: I });
2129
+ return F ? (I.push(N ? F.value : F.primaryKey), ++P === C ? b({ result: I }) : void F.continue()) : b({ result: I });
2126
2130
  }, D.onerror = me(A));
2127
2131
  });
2128
2132
  }), openCursor: function(S) {
2129
2133
  var b = S.trans, A = S.values, P = S.query, D = S.reverse, I = S.unique;
2130
- return new Promise(function(N, k) {
2134
+ return new Promise(function(N, C) {
2131
2135
  N = Z(N);
2132
- var $ = P.index, R = P.range, T = b.objectStore(v), T = $.isPrimaryKey ? T : T.index($.name), $ = D ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", x = !A && "openKeyCursor" in T ? T.openKeyCursor(a(R), $) : T.openCursor(a(R), $);
2133
- x.onerror = me(k), x.onsuccess = Z(function(M) {
2136
+ var $ = P.index, R = P.range, T = b.objectStore(E), T = $.isPrimaryKey ? T : T.index($.name), $ = D ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", x = !A && "openKeyCursor" in T ? T.openKeyCursor(a(R), $) : T.openCursor(a(R), $);
2137
+ x.onerror = me(C), x.onsuccess = Z(function(M) {
2134
2138
  var F, U, z, de, W = x.result;
2135
2139
  W ? (W.___id = ++la, W.done = !1, F = W.continue.bind(W), U = (U = W.continuePrimaryKey) && U.bind(W), z = W.advance.bind(W), de = function() {
2136
2140
  throw new Error("Cursor not stopped");
2137
2141
  }, W.trans = b, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
2138
2142
  throw new Error("Cursor not started");
2139
- }, W.fail = Z(k), W.next = function() {
2143
+ }, W.fail = Z(C), W.next = function() {
2140
2144
  var se = this, oe = 1;
2141
2145
  return this.start(function() {
2142
2146
  return oe-- ? se.continue() : se.stop();
@@ -2163,22 +2167,22 @@ function Ma() {
2163
2167
  x.onsuccess = oe, oe();
2164
2168
  }), W.continue = F, W.continuePrimaryKey = U, W.advance = z, oe(), qt;
2165
2169
  }, N(W)) : N(null);
2166
- }, k);
2170
+ }, C);
2167
2171
  });
2168
2172
  }, count: function(S) {
2169
2173
  var b = S.query, A = S.trans, P = b.index, D = b.range;
2170
2174
  return new Promise(function(I, N) {
2171
- var k = A.objectStore(v), R = P.isPrimaryKey ? k : k.index(P.name), k = a(D), R = k ? R.count(k) : R.count();
2175
+ var C = A.objectStore(E), R = P.isPrimaryKey ? C : C.index(P.name), C = a(D), R = C ? R.count(C) : R.count();
2172
2176
  R.onsuccess = Z(function(T) {
2173
2177
  return I(T.target.result);
2174
2178
  }), R.onerror = me(N);
2175
2179
  });
2176
2180
  } };
2177
2181
  }
2178
- var i, u, d, E = (u = g, d = br((i = e).objectStoreNames), { schema: { name: i.name, tables: d.map(function(O) {
2182
+ var i, u, d, w = (u = p, d = br((i = e).objectStoreNames), { schema: { name: i.name, tables: d.map(function(O) {
2179
2183
  return u.objectStore(O);
2180
2184
  }).map(function(O) {
2181
- var p = O.keyPath, b = O.autoIncrement, v = K(p), S = {}, b = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: v, keyPath: p, autoIncrement: b, unique: !0, extractKey: _n(p) }, indexes: br(O.indexNames).map(function(A) {
2185
+ var m = O.keyPath, b = O.autoIncrement, E = K(m), S = {}, b = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m == null, compound: E, keyPath: m, autoIncrement: b, unique: !0, extractKey: _n(m) }, indexes: br(O.indexNames).map(function(A) {
2182
2186
  return O.index(A);
2183
2187
  }).map(function(I) {
2184
2188
  var P = I.name, D = I.unique, N = I.multiEntry, I = I.keyPath, N = { name: P, compound: K(I), keyPath: I, unique: D, multiEntry: N, extractKey: _n(I) };
@@ -2186,14 +2190,14 @@ function Ma() {
2186
2190
  }), getIndexByKeyPath: function(A) {
2187
2191
  return S[vt(A)];
2188
2192
  } };
2189
- return S[":id"] = b.primaryKey, p != null && (S[vt(p)] = b.primaryKey), b;
2190
- }) }, hasGetAll: 0 < d.length && "getAll" in u.objectStore(d[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), g = E.schema, y = E.hasGetAll, E = g.tables.map(s), f = {};
2191
- return E.forEach(function(O) {
2193
+ return S[":id"] = b.primaryKey, m != null && (S[vt(m)] = b.primaryKey), b;
2194
+ }) }, hasGetAll: 0 < d.length && "getAll" in u.objectStore(d[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), p = w.schema, y = w.hasGetAll, w = p.tables.map(s), f = {};
2195
+ return w.forEach(function(O) {
2192
2196
  return f[O.name] = O;
2193
2197
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(O) {
2194
2198
  if (!f[O]) throw new Error("Table '".concat(O, "' not found"));
2195
2199
  return f[O];
2196
- }, MIN_KEY: -1 / 0, MAX_KEY: bt(n), schema: g };
2200
+ }, MIN_KEY: -1 / 0, MAX_KEY: bt(n), schema: p };
2197
2201
  }
2198
2202
  function fa(e, n, r, a) {
2199
2203
  var s = r.IDBKeyRange;
@@ -2214,13 +2218,13 @@ function Ma() {
2214
2218
  r.forEach(function(s) {
2215
2219
  var i = a[s];
2216
2220
  n.forEach(function(u) {
2217
- var d = function g(y, E) {
2218
- return Fr(y, E) || (y = ge(y)) && g(y, E);
2221
+ var d = function p(y, w) {
2222
+ return Fr(y, w) || (y = ge(y)) && p(y, w);
2219
2223
  }(u, s);
2220
2224
  (!d || "value" in d && d.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? Ae(u, s, { get: function() {
2221
2225
  return this.table(s);
2222
- }, set: function(g) {
2223
- _t(this, s, { value: g, writable: !0, configurable: !0, enumerable: !0 });
2226
+ }, set: function(p) {
2227
+ _t(this, s, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2224
2228
  } }) : u[s] = new e.Table(s, i));
2225
2229
  });
2226
2230
  });
@@ -2240,21 +2244,21 @@ function Ma() {
2240
2244
  i.create(r), i._completion.catch(a);
2241
2245
  var u = i._reject.bind(i), d = B.transless || B;
2242
2246
  De(function() {
2243
- return B.trans = i, B.transless = d, n !== 0 ? (Lt(e, r), y = n, ((g = i).storeNames.includes("$meta") ? g.table("$meta").get("version").then(function(E) {
2244
- return E ?? y;
2245
- }) : j.resolve(y)).then(function(E) {
2246
- return O = E, p = i, v = r, S = [], E = (f = e)._versions, b = f._dbSchema = Ut(0, f.idbdb, v), (E = E.filter(function(A) {
2247
+ return B.trans = i, B.transless = d, n !== 0 ? (Lt(e, r), y = n, ((p = i).storeNames.includes("$meta") ? p.table("$meta").get("version").then(function(w) {
2248
+ return w ?? y;
2249
+ }) : j.resolve(y)).then(function(w) {
2250
+ return O = w, m = i, E = r, S = [], w = (f = e)._versions, b = f._dbSchema = Ut(0, f.idbdb, E), (w = w.filter(function(A) {
2247
2251
  return A._cfg.version >= O;
2248
- })).length !== 0 ? (E.forEach(function(A) {
2252
+ })).length !== 0 ? (w.forEach(function(A) {
2249
2253
  S.push(function() {
2250
2254
  var P = b, D = A._cfg.dbschema;
2251
- zt(f, P, v), zt(f, D, v), b = f._dbSchema = D;
2255
+ zt(f, P, E), zt(f, D, E), b = f._dbSchema = D;
2252
2256
  var I = Pn(P, D);
2253
2257
  I.add.forEach(function($) {
2254
- Dn(v, $[0], $[1].primKey, $[1].indexes);
2258
+ Dn(E, $[0], $[1].primKey, $[1].indexes);
2255
2259
  }), I.change.forEach(function($) {
2256
2260
  if ($.recreate) throw new L.Upgrade("Not yet support for changing primary key");
2257
- var x = v.objectStore($.name);
2261
+ var x = E.objectStore($.name);
2258
2262
  $.add.forEach(function(M) {
2259
2263
  return Ft(x, M);
2260
2264
  }), $.change.forEach(function(M) {
@@ -2265,41 +2269,41 @@ function Ma() {
2265
2269
  });
2266
2270
  var N = A._cfg.contentUpgrade;
2267
2271
  if (N && A._cfg.version > O) {
2268
- Lt(f, v), p._memoizedTables = {};
2269
- var k = Qn(D);
2272
+ Lt(f, E), m._memoizedTables = {};
2273
+ var C = Qn(D);
2270
2274
  I.del.forEach(function($) {
2271
- k[$] = P[$];
2272
- }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], C(k), k), p.schema = k;
2275
+ C[$] = P[$];
2276
+ }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], k(C), C), m.schema = C;
2273
2277
  var R, T = an(N);
2274
2278
  return T && et(), I = j.follow(function() {
2275
2279
  var $;
2276
- (R = N(p)) && T && ($ = Ie.bind(null, null), R.then($, $));
2280
+ (R = N(m)) && T && ($ = Ie.bind(null, null), R.then($, $));
2277
2281
  }), R && typeof R.then == "function" ? j.resolve(R) : I.then(function() {
2278
2282
  return R;
2279
2283
  });
2280
2284
  }
2281
2285
  }), S.push(function(P) {
2282
2286
  var D, I, N = A._cfg.dbschema;
2283
- D = N, I = P, [].slice.call(I.db.objectStoreNames).forEach(function(k) {
2284
- return D[k] == null && I.db.deleteObjectStore(k);
2285
- }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), p.schema = f._dbSchema;
2287
+ D = N, I = P, [].slice.call(I.db.objectStoreNames).forEach(function(C) {
2288
+ return D[C] == null && I.db.deleteObjectStore(C);
2289
+ }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), m.schema = f._dbSchema;
2286
2290
  }), S.push(function(P) {
2287
2291
  f.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(f.idbdb.version / 10) === A._cfg.version ? (f.idbdb.deleteObjectStore("$meta"), delete f._dbSchema.$meta, f._storeNames = f._storeNames.filter(function(D) {
2288
2292
  return D !== "$meta";
2289
2293
  })) : P.objectStore("$meta").put(A._cfg.version, "version"));
2290
2294
  });
2291
2295
  }), function A() {
2292
- return S.length ? j.resolve(S.shift()(p.idbtrans)).then(A) : j.resolve();
2296
+ return S.length ? j.resolve(S.shift()(m.idbtrans)).then(A) : j.resolve();
2293
2297
  }().then(function() {
2294
- vr(b, v);
2298
+ vr(b, E);
2295
2299
  })) : j.resolve();
2296
- var f, O, p, v, S, b;
2297
- }).catch(u)) : (C(s).forEach(function(E) {
2298
- Dn(r, E, s[E].primKey, s[E].indexes);
2300
+ var f, O, m, E, S, b;
2301
+ }).catch(u)) : (k(s).forEach(function(w) {
2302
+ Dn(r, w, s[w].primKey, s[w].indexes);
2299
2303
  }), Lt(e, r), void j.follow(function() {
2300
2304
  return e.on.populate.fire(i);
2301
2305
  }).catch(u));
2302
- var g, y;
2306
+ var p, y;
2303
2307
  });
2304
2308
  }
2305
2309
  function pa(e, n) {
@@ -2310,8 +2314,8 @@ function Ma() {
2310
2314
  var i = function(u) {
2311
2315
  if (u.change.length || u.recreate) return console.warn("Unable to patch indexes of table ".concat(u.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
2312
2316
  var d = n.objectStore(u.name);
2313
- u.add.forEach(function(g) {
2314
- pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(g.src)), Ft(d, g);
2317
+ u.add.forEach(function(p) {
2318
+ pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Ft(d, p);
2315
2319
  });
2316
2320
  }(s[a]);
2317
2321
  if (typeof i == "object") return i.value;
@@ -2326,11 +2330,11 @@ function Ma() {
2326
2330
  var u = { name: r, def: i, recreate: !1, del: [], add: [], change: [] };
2327
2331
  if ("" + (s.primKey.keyPath || "") != "" + (i.primKey.keyPath || "") || s.primKey.auto !== i.primKey.auto) u.recreate = !0, a.change.push(u);
2328
2332
  else {
2329
- var d = s.idxByName, g = i.idxByName, y = void 0;
2330
- for (y in d) g[y] || u.del.push(y);
2331
- for (y in g) {
2332
- var E = d[y], f = g[y];
2333
- E ? E.src !== f.src && u.change.push(f) : u.add.push(f);
2333
+ var d = s.idxByName, p = i.idxByName, y = void 0;
2334
+ for (y in d) p[y] || u.del.push(y);
2335
+ for (y in p) {
2336
+ var w = d[y], f = p[y];
2337
+ w ? w.src !== f.src && u.change.push(f) : u.add.push(f);
2334
2338
  }
2335
2339
  (0 < u.del.length || 0 < u.add.length || 0 < u.change.length) && a.change.push(u);
2336
2340
  }
@@ -2345,7 +2349,7 @@ function Ma() {
2345
2349
  }), s;
2346
2350
  }
2347
2351
  function vr(e, n) {
2348
- C(e).forEach(function(r) {
2352
+ k(e).forEach(function(r) {
2349
2353
  n.db.objectStoreNames.contains(r) || (pe && console.debug("Dexie: Creating missing table", r), Dn(n, r, e[r].primKey, e[r].indexes));
2350
2354
  });
2351
2355
  }
@@ -2355,9 +2359,9 @@ function Ma() {
2355
2359
  function Ut(e, n, r) {
2356
2360
  var a = {};
2357
2361
  return At(n.objectStoreNames, 0).forEach(function(s) {
2358
- for (var i = r.objectStore(s), u = Sn(yr(y = i.keyPath), y || "", !0, !1, !!i.autoIncrement, y && typeof y != "string", !0), d = [], g = 0; g < i.indexNames.length; ++g) {
2359
- var E = i.index(i.indexNames[g]), y = E.keyPath, E = Sn(E.name, y, !!E.unique, !!E.multiEntry, !1, y && typeof y != "string", !1);
2360
- d.push(E);
2362
+ for (var i = r.objectStore(s), u = Sn(yr(y = i.keyPath), y || "", !0, !1, !!i.autoIncrement, y && typeof y != "string", !0), d = [], p = 0; p < i.indexNames.length; ++p) {
2363
+ var w = i.index(i.indexNames[p]), y = w.keyPath, w = Sn(w.name, y, !!w.unique, !!w.multiEntry, !1, y && typeof y != "string", !1);
2364
+ d.push(w);
2361
2365
  }
2362
2366
  a[s] = On(s, u, d);
2363
2367
  }), a;
@@ -2367,11 +2371,11 @@ function Ma() {
2367
2371
  var i = a[s], u = r.objectStore(i);
2368
2372
  e._hasGetAll = "getAll" in u;
2369
2373
  for (var d = 0; d < u.indexNames.length; ++d) {
2370
- var g = u.indexNames[d], y = u.index(g).keyPath, E = typeof y == "string" ? y : "[" + At(y).join("+") + "]";
2371
- !n[i] || (y = n[i].idxByName[E]) && (y.name = g, delete n[i].idxByName[E], n[i].idxByName[g] = y);
2374
+ var p = u.indexNames[d], y = u.index(p).keyPath, w = typeof y == "string" ? y : "[" + At(y).join("+") + "]";
2375
+ !n[i] || (y = n[i].idxByName[w]) && (y.name = p, delete n[i].idxByName[w], n[i].idxByName[p] = y);
2372
2376
  }
2373
2377
  }
2374
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && w.WorkerGlobalScope && w instanceof w.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2378
+ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && v.WorkerGlobalScope && v instanceof v.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2375
2379
  }
2376
2380
  function Er(e) {
2377
2381
  return e.split(",").map(function(n, r) {
@@ -2380,7 +2384,7 @@ function Ma() {
2380
2384
  });
2381
2385
  }
2382
2386
  var ma = (Ht.prototype._parseStoresSpec = function(e, n) {
2383
- C(e).forEach(function(r) {
2387
+ k(e).forEach(function(r) {
2384
2388
  if (e[r] !== null) {
2385
2389
  var a = Er(e[r]), s = a.shift();
2386
2390
  if (s.unique = !0, s.multi) throw new L.Schema("Primary key cannot be multi-valued");
@@ -2396,7 +2400,7 @@ function Ma() {
2396
2400
  var r = n._versions, a = {}, s = {};
2397
2401
  return r.forEach(function(i) {
2398
2402
  te(a, i._cfg.storesSource), s = i._cfg.dbschema = {}, i._parseStoresSpec(a, s);
2399
- }), n._dbSchema = s, An(n, [n._allTables, n, n.Transaction.prototype]), Wt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], C(s), s), n._storeNames = C(s), this;
2403
+ }), n._dbSchema = s, An(n, [n._allTables, n, n.Transaction.prototype]), Wt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], k(s), s), n._storeNames = k(s), this;
2400
2404
  }, Ht.prototype.upgrade = function(e) {
2401
2405
  return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || Q, e), this;
2402
2406
  }, Ht);
@@ -2436,9 +2440,9 @@ function Ma() {
2436
2440
  }
2437
2441
  }
2438
2442
  function wt(e, n) {
2439
- Tn(n) || function r(a, g) {
2440
- var i = g.from, u = g.to, d = g.l, g = g.r;
2441
- Et(a, i, u), d && r(a, d), g && r(a, g);
2443
+ Tn(n) || function r(a, p) {
2444
+ var i = p.from, u = p.to, d = p.l, p = p.r;
2445
+ Et(a, i, u), d && r(a, d), p && r(a, p);
2442
2446
  }(e, n);
2443
2447
  }
2444
2448
  function wr(e, n) {
@@ -2479,7 +2483,7 @@ function Ma() {
2479
2483
  return (n ? r ? Math.max(n.d, r.d) : n.d : r ? r.d : 0) + 1;
2480
2484
  }
2481
2485
  function Yt(e, n) {
2482
- return C(n).forEach(function(r) {
2486
+ return k(n).forEach(function(r) {
2483
2487
  e[r] ? wt(e[r], n[r]) : e[r] = function a(s) {
2484
2488
  var i, u, d = {};
2485
2489
  for (i in s) ie(s, i) && (u = s[i], d[i] = !u || typeof u != "object" || Jn.has(u.constructor) ? u : a(u));
@@ -2521,23 +2525,23 @@ function Ma() {
2521
2525
  var u, d = /^idb\:\/\/(.*)\/(.*)\//.exec(i);
2522
2526
  d && (i = d[1], d = d[2], (u = ze["idb://".concat(i, "/").concat(d)]) && _r(u, e, r, n));
2523
2527
  }
2524
- r.forEach(function(g) {
2525
- return g();
2528
+ r.forEach(function(p) {
2529
+ return p();
2526
2530
  });
2527
2531
  }
2528
2532
  function _r(e, n, r, a) {
2529
2533
  for (var s = [], i = 0, u = Object.entries(e.queries.query); i < u.length; i++) {
2530
- for (var d = u[i], g = d[0], y = [], E = 0, f = d[1]; E < f.length; E++) {
2531
- var O = f[E];
2534
+ for (var d = u[i], p = d[0], y = [], w = 0, f = d[1]; w < f.length; w++) {
2535
+ var O = f[w];
2532
2536
  xn(n, O.obsSet) ? O.subscribers.forEach(function(b) {
2533
2537
  return r.add(b);
2534
2538
  }) : a && y.push(O);
2535
2539
  }
2536
- a && s.push([g, y]);
2540
+ a && s.push([p, y]);
2537
2541
  }
2538
- if (a) for (var p = 0, v = s; p < v.length; p++) {
2539
- var S = v[p], g = S[0], y = S[1];
2540
- e.queries.query[g] = y;
2542
+ if (a) for (var m = 0, E = s; m < E.length; m++) {
2543
+ var S = E[m], p = S[0], y = S[1];
2544
+ e.queries.query[p] = y;
2541
2545
  }
2542
2546
  }
2543
2547
  function ya(e) {
@@ -2551,21 +2555,21 @@ function Ma() {
2551
2555
  if (n.openCanceller !== a) throw new L.DatabaseClosed("db.open() was cancelled");
2552
2556
  }
2553
2557
  function d() {
2554
- return new j(function(O, p) {
2558
+ return new j(function(O, m) {
2555
2559
  if (u(), !r) throw new L.MissingAPI();
2556
- var v = e.name, S = n.autoSchema || !s ? r.open(v) : r.open(v, s);
2560
+ var E = e.name, S = n.autoSchema || !s ? r.open(E) : r.open(E, s);
2557
2561
  if (!S) throw new L.MissingAPI();
2558
- S.onerror = me(p), S.onblocked = Z(e._fireOnBlocked), S.onupgradeneeded = Z(function(b) {
2562
+ S.onerror = me(m), S.onblocked = Z(e._fireOnBlocked), S.onupgradeneeded = Z(function(b) {
2559
2563
  var A;
2560
- E = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = mt, E.abort(), S.result.close(), (A = r.deleteDatabase(v)).onsuccess = A.onerror = Z(function() {
2561
- p(new L.NoSuchDatabase("Database ".concat(v, " doesnt exist")));
2562
- })) : (E.onerror = me(p), b = b.oldVersion > Math.pow(2, 62) ? 0 : b.oldVersion, f = b < 1, e.idbdb = S.result, i && pa(e, E), ga(e, b / 10, E, p));
2563
- }, p), S.onsuccess = Z(function() {
2564
- E = null;
2565
- var b, A, P, D, I, N = e.idbdb = S.result, k = At(N.objectStoreNames);
2566
- if (0 < k.length) try {
2567
- var R = N.transaction((D = k).length === 1 ? D[0] : D, "readonly");
2568
- if (n.autoSchema) A = N, P = R, (b = e).verno = A.version / 10, P = b._dbSchema = Ut(0, A, P), b._storeNames = At(A.objectStoreNames, 0), Wt(b, [b._allTables], C(P), P);
2564
+ w = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = mt, w.abort(), S.result.close(), (A = r.deleteDatabase(E)).onsuccess = A.onerror = Z(function() {
2565
+ m(new L.NoSuchDatabase("Database ".concat(E, " doesnt exist")));
2566
+ })) : (w.onerror = me(m), b = b.oldVersion > Math.pow(2, 62) ? 0 : b.oldVersion, f = b < 1, e.idbdb = S.result, i && pa(e, w), ga(e, b / 10, w, m));
2567
+ }, m), S.onsuccess = Z(function() {
2568
+ w = null;
2569
+ var b, A, P, D, I, N = e.idbdb = S.result, C = At(N.objectStoreNames);
2570
+ if (0 < C.length) try {
2571
+ var R = N.transaction((D = C).length === 1 ? D[0] : D, "readonly");
2572
+ if (n.autoSchema) A = N, P = R, (b = e).verno = A.version / 10, P = b._dbSchema = Ut(0, A, P), b._storeNames = At(A.objectStoreNames, 0), Wt(b, [b._allTables], k(P), P);
2569
2573
  else if (zt(e, e._dbSchema, R), ((I = Pn(Ut(0, (I = e).idbdb, R), I._dbSchema)).add.length || I.change.some(function(T) {
2570
2574
  return T.add.length || T.change.length;
2571
2575
  })) && !i) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), N.close(), s = N.version + 1, i = !0, O(d());
@@ -2576,8 +2580,8 @@ function Ma() {
2576
2580
  n.vcFired = !0, e.on("versionchange").fire(T);
2577
2581
  }), N.onclose = Z(function(T) {
2578
2582
  e.on("close").fire(T);
2579
- }), f && (I = e._deps, R = v, N = I.indexedDB, I = I.IDBKeyRange, Nn(N) || R === jt || In(N, I).put({ name: R }).catch(Q)), O();
2580
- }, p);
2583
+ }), f && (I = e._deps, R = E, N = I.indexedDB, I = I.IDBKeyRange, Nn(N) || R === jt || In(N, I).put({ name: R }).catch(Q)), O();
2584
+ }, m);
2581
2585
  }).catch(function(O) {
2582
2586
  switch (O?.name) {
2583
2587
  case "UnknownError":
@@ -2589,22 +2593,22 @@ function Ma() {
2589
2593
  return j.reject(O);
2590
2594
  });
2591
2595
  }
2592
- var g, y = n.dbReadyResolve, E = null, f = !1;
2596
+ var p, y = n.dbReadyResolve, w = null, f = !1;
2593
2597
  return j.race([a, (typeof navigator > "u" ? j.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(O) {
2594
- function p() {
2598
+ function m() {
2595
2599
  return indexedDB.databases().finally(O);
2596
2600
  }
2597
- g = setInterval(p, 100), p();
2601
+ p = setInterval(m, 100), m();
2598
2602
  }).finally(function() {
2599
- return clearInterval(g);
2603
+ return clearInterval(p);
2600
2604
  }) : Promise.resolve()).then(d)]).then(function() {
2601
2605
  return u(), n.onReadyBeingFired = [], j.resolve(Rn(function() {
2602
2606
  return e.on.ready.fire(e.vip);
2603
2607
  })).then(function O() {
2604
2608
  if (0 < n.onReadyBeingFired.length) {
2605
- var p = n.onReadyBeingFired.reduce(on, Q);
2609
+ var m = n.onReadyBeingFired.reduce(on, Q);
2606
2610
  return n.onReadyBeingFired = [], j.resolve(Rn(function() {
2607
- return p(e.vip);
2611
+ return m(e.vip);
2608
2612
  })).then(O);
2609
2613
  }
2610
2614
  });
@@ -2613,7 +2617,7 @@ function Ma() {
2613
2617
  }).catch(function(O) {
2614
2618
  n.dbOpenError = O;
2615
2619
  try {
2616
- E && E.abort();
2620
+ w && w.abort();
2617
2621
  } catch {
2618
2622
  }
2619
2623
  return a === n.openCanceller && e._close(), q(O);
@@ -2621,10 +2625,10 @@ function Ma() {
2621
2625
  n.openComplete = !0, y();
2622
2626
  }).then(function() {
2623
2627
  var O;
2624
- return f && (O = {}, e.tables.forEach(function(p) {
2625
- p.schema.indexes.forEach(function(v) {
2626
- v.name && (O["idb://".concat(e.name, "/").concat(p.name, "/").concat(v.name)] = new ae(-1 / 0, [[[]]]));
2627
- }), O["idb://".concat(e.name, "/").concat(p.name, "/")] = O["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new ae(-1 / 0, [[[]]]);
2628
+ return f && (O = {}, e.tables.forEach(function(m) {
2629
+ m.schema.indexes.forEach(function(E) {
2630
+ E.name && (O["idb://".concat(e.name, "/").concat(m.name, "/").concat(E.name)] = new ae(-1 / 0, [[[]]]));
2631
+ }), O["idb://".concat(e.name, "/").concat(m.name, "/")] = O["idb://".concat(e.name, "/").concat(m.name, "/:dels")] = new ae(-1 / 0, [[[]]]);
2628
2632
  }), Te(yt).fire(O), $n(O, !0)), e;
2629
2633
  });
2630
2634
  }
@@ -2636,9 +2640,9 @@ function Ma() {
2636
2640
  return e.throw(i);
2637
2641
  });
2638
2642
  function s(i) {
2639
- return function(g) {
2640
- var d = i(g), g = d.value;
2641
- return d.done ? g : g && typeof g.then == "function" ? g.then(r, a) : K(g) ? Promise.all(g).then(r, a) : r(g);
2643
+ return function(p) {
2644
+ var d = i(p), p = d.value;
2645
+ return d.done ? p : p && typeof p.then == "function" ? p.then(r, a) : K(p) ? Promise.all(p).then(r, a) : r(p);
2642
2646
  };
2643
2647
  }
2644
2648
  return s(n)();
@@ -2650,37 +2654,37 @@ function Ma() {
2650
2654
  var ba = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2651
2655
  return l(l({}, e), { table: function(n) {
2652
2656
  var r = e.table(n), a = r.schema, s = {}, i = [];
2653
- function u(f, O, p) {
2654
- var v = vt(f), S = s[v] = s[v] || [], b = f == null ? 0 : typeof f == "string" ? 1 : f.length, A = 0 < O, A = l(l({}, p), { name: A ? "".concat(v, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: A, keyTail: O, keyLength: b, extractKey: _n(f), unique: !A && p.unique });
2655
- return S.push(A), A.isPrimaryKey || i.push(A), 1 < b && u(b === 2 ? f[0] : f.slice(0, b - 1), O + 1, p), S.sort(function(P, D) {
2657
+ function u(f, O, m) {
2658
+ var E = vt(f), S = s[E] = s[E] || [], b = f == null ? 0 : typeof f == "string" ? 1 : f.length, A = 0 < O, A = l(l({}, m), { name: A ? "".concat(E, "(virtual-from:").concat(m.name, ")") : m.name, lowLevelIndex: m, isVirtual: A, keyTail: O, keyLength: b, extractKey: _n(f), unique: !A && m.unique });
2659
+ return S.push(A), A.isPrimaryKey || i.push(A), 1 < b && u(b === 2 ? f[0] : f.slice(0, b - 1), O + 1, m), S.sort(function(P, D) {
2656
2660
  return P.keyTail - D.keyTail;
2657
2661
  }), A;
2658
2662
  }
2659
2663
  n = u(a.primaryKey.keyPath, 0, a.primaryKey), s[":id"] = [n];
2660
- for (var d = 0, g = a.indexes; d < g.length; d++) {
2661
- var y = g[d];
2664
+ for (var d = 0, p = a.indexes; d < p.length; d++) {
2665
+ var y = p[d];
2662
2666
  u(y.keyPath, 0, y);
2663
2667
  }
2664
- function E(f) {
2665
- var O, p = f.query.index;
2666
- return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (O = f.query.range, p = p.keyTail, { type: O.type === 1 ? 2 : O.type, lower: Xt(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Xt(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
2668
+ function w(f) {
2669
+ var O, m = f.query.index;
2670
+ return m.isVirtual ? l(l({}, f), { query: { index: m.lowLevelIndex, range: (O = f.query.range, m = m.keyTail, { type: O.type === 1 ? 2 : O.type, lower: Xt(O.lower, O.lowerOpen ? e.MAX_KEY : e.MIN_KEY, m), lowerOpen: !0, upper: Xt(O.upper, O.upperOpen ? e.MIN_KEY : e.MAX_KEY, m), upperOpen: !0 }) } }) : f;
2667
2671
  }
2668
2672
  return l(l({}, r), { schema: l(l({}, a), { primaryKey: n, indexes: i, getIndexByKeyPath: function(f) {
2669
2673
  return (f = s[vt(f)]) && f[0];
2670
2674
  } }), count: function(f) {
2671
- return r.count(E(f));
2675
+ return r.count(w(f));
2672
2676
  }, query: function(f) {
2673
- return r.query(E(f));
2677
+ return r.query(w(f));
2674
2678
  }, openCursor: function(f) {
2675
- var O = f.query.index, p = O.keyTail, v = O.isVirtual, S = O.keyLength;
2676
- return v ? r.openCursor(E(f)).then(function(A) {
2679
+ var O = f.query.index, m = O.keyTail, E = O.isVirtual, S = O.keyLength;
2680
+ return E ? r.openCursor(w(f)).then(function(A) {
2677
2681
  return A && b(A);
2678
2682
  }) : r.openCursor(f);
2679
2683
  function b(A) {
2680
2684
  return Object.create(A, { continue: { value: function(P) {
2681
- P != null ? A.continue(Xt(P, f.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : f.unique ? A.continue(A.key.slice(0, S).concat(f.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : A.continue();
2685
+ P != null ? A.continue(Xt(P, f.reverse ? e.MAX_KEY : e.MIN_KEY, m)) : f.unique ? A.continue(A.key.slice(0, S).concat(f.reverse ? e.MIN_KEY : e.MAX_KEY, m)) : A.continue();
2682
2686
  } }, continuePrimaryKey: { value: function(P, D) {
2683
- A.continuePrimaryKey(Xt(P, e.MAX_KEY, p), D);
2687
+ A.continuePrimaryKey(Xt(P, e.MAX_KEY, m), D);
2684
2688
  } }, primaryKey: { get: function() {
2685
2689
  return A.primaryKey;
2686
2690
  } }, key: { get: function() {
@@ -2694,10 +2698,10 @@ function Ma() {
2694
2698
  } });
2695
2699
  } };
2696
2700
  function Mn(e, n, r, a) {
2697
- return r = r || {}, a = a || "", C(e).forEach(function(s) {
2701
+ return r = r || {}, a = a || "", k(e).forEach(function(s) {
2698
2702
  var i, u, d;
2699
2703
  ie(n, s) ? (i = e[s], u = n[s], typeof i == "object" && typeof u == "object" && i && u ? (d = nn(i)) !== nn(u) ? r[a + s] = n[s] : d === "Object" ? Mn(i, u, r, a + s + ".") : i !== u && (r[a + s] = n[s]) : i !== u && (r[a + s] = n[s])) : r[a + s] = void 0;
2700
- }), C(n).forEach(function(s) {
2704
+ }), k(n).forEach(function(s) {
2701
2705
  ie(e, s) || (r[a + s] = n[s]);
2702
2706
  }), r;
2703
2707
  }
@@ -2708,53 +2712,53 @@ function Ma() {
2708
2712
  return l(l({}, e), { table: function(n) {
2709
2713
  var r = e.table(n), a = r.schema.primaryKey;
2710
2714
  return l(l({}, r), { mutate: function(s) {
2711
- var i = B.trans, u = i.table(n).hook, d = u.deleting, g = u.creating, y = u.updating;
2715
+ var i = B.trans, u = i.table(n).hook, d = u.deleting, p = u.creating, y = u.updating;
2712
2716
  switch (s.type) {
2713
2717
  case "add":
2714
- if (g.fire === Q) break;
2718
+ if (p.fire === Q) break;
2715
2719
  return i._promise("readwrite", function() {
2716
- return E(s);
2720
+ return w(s);
2717
2721
  }, !0);
2718
2722
  case "put":
2719
- if (g.fire === Q && y.fire === Q) break;
2723
+ if (p.fire === Q && y.fire === Q) break;
2720
2724
  return i._promise("readwrite", function() {
2721
- return E(s);
2725
+ return w(s);
2722
2726
  }, !0);
2723
2727
  case "delete":
2724
2728
  if (d.fire === Q) break;
2725
2729
  return i._promise("readwrite", function() {
2726
- return E(s);
2730
+ return w(s);
2727
2731
  }, !0);
2728
2732
  case "deleteRange":
2729
2733
  if (d.fire === Q) break;
2730
2734
  return i._promise("readwrite", function() {
2731
- return function f(O, p, v) {
2732
- return r.query({ trans: O, values: !1, query: { index: a, range: p }, limit: v }).then(function(S) {
2735
+ return function f(O, m, E) {
2736
+ return r.query({ trans: O, values: !1, query: { index: a, range: m }, limit: E }).then(function(S) {
2733
2737
  var b = S.result;
2734
- return E({ type: "delete", keys: b, trans: O }).then(function(A) {
2735
- return 0 < A.numFailures ? Promise.reject(A.failures[0]) : b.length < v ? { failures: [], numFailures: 0, lastResult: void 0 } : f(O, l(l({}, p), { lower: b[b.length - 1], lowerOpen: !0 }), v);
2738
+ return w({ type: "delete", keys: b, trans: O }).then(function(A) {
2739
+ return 0 < A.numFailures ? Promise.reject(A.failures[0]) : b.length < E ? { failures: [], numFailures: 0, lastResult: void 0 } : f(O, l(l({}, m), { lower: b[b.length - 1], lowerOpen: !0 }), E);
2736
2740
  });
2737
2741
  });
2738
2742
  }(s.trans, s.range, 1e4);
2739
2743
  }, !0);
2740
2744
  }
2741
2745
  return r.mutate(s);
2742
- function E(f) {
2743
- var O, p, v, S = B.trans, b = f.keys || Gn(a, f);
2746
+ function w(f) {
2747
+ var O, m, E, S = B.trans, b = f.keys || Gn(a, f);
2744
2748
  if (!b) throw new Error("Keys missing");
2745
- return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: b }) : l({}, f)).type !== "delete" && (f.values = m([], f.values)), f.keys && (f.keys = m([], f.keys)), O = r, v = b, ((p = f).type === "add" ? Promise.resolve([]) : O.getMany({ trans: p.trans, keys: v, cache: "immutable" })).then(function(A) {
2749
+ return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: b }) : l({}, f)).type !== "delete" && (f.values = g([], f.values)), f.keys && (f.keys = g([], f.keys)), O = r, E = b, ((m = f).type === "add" ? Promise.resolve([]) : O.getMany({ trans: m.trans, keys: E, cache: "immutable" })).then(function(A) {
2746
2750
  var P = b.map(function(D, I) {
2747
- var N, k, R, T = A[I], $ = { onerror: null, onsuccess: null };
2748
- return f.type === "delete" ? d.fire.call($, D, T, S) : f.type === "add" || T === void 0 ? (N = g.fire.call($, D, f.values[I], S), D == null && N != null && (f.keys[I] = D = N, a.outbound || ue(f.values[I], a.keyPath, D))) : (N = Mn(T, f.values[I]), (k = y.fire.call($, N, D, T, S)) && (R = f.values[I], Object.keys(k).forEach(function(x) {
2749
- ie(R, x) ? R[x] = k[x] : ue(R, x, k[x]);
2751
+ var N, C, R, T = A[I], $ = { onerror: null, onsuccess: null };
2752
+ return f.type === "delete" ? d.fire.call($, D, T, S) : f.type === "add" || T === void 0 ? (N = p.fire.call($, D, f.values[I], S), D == null && N != null && (f.keys[I] = D = N, a.outbound || ue(f.values[I], a.keyPath, D))) : (N = Mn(T, f.values[I]), (C = y.fire.call($, N, D, T, S)) && (R = f.values[I], Object.keys(C).forEach(function(x) {
2753
+ ie(R, x) ? R[x] = C[x] : ue(R, x, C[x]);
2750
2754
  }))), $;
2751
2755
  });
2752
2756
  return r.mutate(f).then(function(D) {
2753
- for (var I = D.failures, N = D.results, k = D.numFailures, D = D.lastResult, R = 0; R < b.length; ++R) {
2757
+ for (var I = D.failures, N = D.results, C = D.numFailures, D = D.lastResult, R = 0; R < b.length; ++R) {
2754
2758
  var T = (N || b)[R], $ = P[R];
2755
2759
  T == null ? $.onerror && $.onerror(I[R]) : $.onsuccess && $.onsuccess(f.type === "put" && A[R] ? f.values[R] : T);
2756
2760
  }
2757
- return { failures: I, results: N, numFailures: k, lastResult: D };
2761
+ return { failures: I, results: N, numFailures: C, lastResult: D };
2758
2762
  }).catch(function(D) {
2759
2763
  return P.forEach(function(I) {
2760
2764
  return I.onerror && I.onerror(D);
@@ -2808,16 +2812,16 @@ function Ma() {
2808
2812
  if (B.subscr && s !== "readonly") throw new L.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(B.querier));
2809
2813
  return e.transaction(a, s, i);
2810
2814
  }, table: function(a) {
2811
- var s = e.table(a), i = s.schema, u = i.primaryKey, f = i.indexes, d = u.extractKey, g = u.outbound, y = u.autoIncrement && f.filter(function(p) {
2812
- return p.compound && p.keyPath.includes(u.keyPath);
2813
- }), E = l(l({}, s), { mutate: function(p) {
2814
- function v(x) {
2815
+ var s = e.table(a), i = s.schema, u = i.primaryKey, f = i.indexes, d = u.extractKey, p = u.outbound, y = u.autoIncrement && f.filter(function(m) {
2816
+ return m.compound && m.keyPath.includes(u.keyPath);
2817
+ }), w = l(l({}, s), { mutate: function(m) {
2818
+ function E(x) {
2815
2819
  return x = "idb://".concat(n, "/").concat(a, "/").concat(x), D[x] || (D[x] = new ae());
2816
2820
  }
2817
- var S, b, A, P = p.trans, D = p.mutatedParts || (p.mutatedParts = {}), I = v(""), N = v(":dels"), k = p.type, $ = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Gn(u, p).filter(function(x) {
2821
+ var S, b, A, P = m.trans, D = m.mutatedParts || (m.mutatedParts = {}), I = E(""), N = E(":dels"), C = m.type, $ = m.type === "deleteRange" ? [m.range] : m.type === "delete" ? [m.keys] : m.values.length < 50 ? [Gn(u, m).filter(function(x) {
2818
2822
  return x;
2819
- }), p.values] : [], R = $[0], T = $[1], $ = p.trans._cache;
2820
- return K(R) ? (I.addKeys(R), ($ = k === "delete" || R.length === T.length ? Ar(R, $) : null) || N.addKeys(R), ($ || T) && (S = v, b = $, A = T, i.indexes.forEach(function(x) {
2823
+ }), m.values] : [], R = $[0], T = $[1], $ = m.trans._cache;
2824
+ return K(R) ? (I.addKeys(R), ($ = C === "delete" || R.length === T.length ? Ar(R, $) : null) || N.addKeys(R), ($ || T) && (S = E, b = $, A = T, i.indexes.forEach(function(x) {
2821
2825
  var M = S(x.name || "");
2822
2826
  function F(z) {
2823
2827
  return z != null ? x.extractKey(z) : null;
@@ -2832,44 +2836,44 @@ function Ma() {
2832
2836
  H(W, se) !== 0 && (W != null && U(W), se != null && U(se));
2833
2837
  });
2834
2838
  }))) : R ? (T = { from: (T = R.lower) !== null && T !== void 0 ? T : e.MIN_KEY, to: (T = R.upper) !== null && T !== void 0 ? T : e.MAX_KEY }, N.add(T), I.add(T)) : (I.add(r), N.add(r), i.indexes.forEach(function(x) {
2835
- return v(x.name).add(r);
2836
- })), s.mutate(p).then(function(x) {
2837
- return !R || p.type !== "add" && p.type !== "put" || (I.addKeys(x.results), y && y.forEach(function(M) {
2838
- for (var F = p.values.map(function(W) {
2839
+ return E(x.name).add(r);
2840
+ })), s.mutate(m).then(function(x) {
2841
+ return !R || m.type !== "add" && m.type !== "put" || (I.addKeys(x.results), y && y.forEach(function(M) {
2842
+ for (var F = m.values.map(function(W) {
2839
2843
  return M.extractKey(W);
2840
2844
  }), U = M.keyPath.findIndex(function(W) {
2841
2845
  return W === u.keyPath;
2842
2846
  }), z = 0, de = x.results.length; z < de; ++z) F[z][U] = x.results[z];
2843
- v(M.name).addKeys(F);
2847
+ E(M.name).addKeys(F);
2844
2848
  })), P.mutatedParts = Yt(P.mutatedParts || {}, D), x;
2845
2849
  });
2846
- } }), f = function(v) {
2847
- var S = v.query, v = S.index, S = S.range;
2848
- return [v, new ae((v = S.lower) !== null && v !== void 0 ? v : e.MIN_KEY, (S = S.upper) !== null && S !== void 0 ? S : e.MAX_KEY)];
2849
- }, O = { get: function(p) {
2850
- return [u, new ae(p.key)];
2851
- }, getMany: function(p) {
2852
- return [u, new ae().addKeys(p.keys)];
2850
+ } }), f = function(E) {
2851
+ var S = E.query, E = S.index, S = S.range;
2852
+ return [E, new ae((E = S.lower) !== null && E !== void 0 ? E : e.MIN_KEY, (S = S.upper) !== null && S !== void 0 ? S : e.MAX_KEY)];
2853
+ }, O = { get: function(m) {
2854
+ return [u, new ae(m.key)];
2855
+ }, getMany: function(m) {
2856
+ return [u, new ae().addKeys(m.keys)];
2853
2857
  }, count: f, query: f, openCursor: f };
2854
- return C(O).forEach(function(p) {
2855
- E[p] = function(v) {
2856
- var S = B.subscr, b = !!S, A = Pr(B, s) && Dr(p, v) ? v.obsSet = {} : S;
2858
+ return k(O).forEach(function(m) {
2859
+ w[m] = function(E) {
2860
+ var S = B.subscr, b = !!S, A = Pr(B, s) && Dr(m, E) ? E.obsSet = {} : S;
2857
2861
  if (b) {
2858
2862
  var P = function(T) {
2859
2863
  return T = "idb://".concat(n, "/").concat(a, "/").concat(T), A[T] || (A[T] = new ae());
2860
- }, D = P(""), I = P(":dels"), S = O[p](v), b = S[0], S = S[1];
2861
- if ((p === "query" && b.isPrimaryKey && !v.values ? I : P(b.name || "")).add(S), !b.isPrimaryKey) {
2862
- if (p !== "count") {
2863
- var N = p === "query" && g && v.values && s.query(l(l({}, v), { values: !1 }));
2864
- return s[p].apply(this, arguments).then(function(T) {
2865
- if (p === "query") {
2866
- if (g && v.values) return N.then(function(F) {
2864
+ }, D = P(""), I = P(":dels"), S = O[m](E), b = S[0], S = S[1];
2865
+ if ((m === "query" && b.isPrimaryKey && !E.values ? I : P(b.name || "")).add(S), !b.isPrimaryKey) {
2866
+ if (m !== "count") {
2867
+ var N = m === "query" && p && E.values && s.query(l(l({}, E), { values: !1 }));
2868
+ return s[m].apply(this, arguments).then(function(T) {
2869
+ if (m === "query") {
2870
+ if (p && E.values) return N.then(function(F) {
2867
2871
  return F = F.result, D.addKeys(F), T;
2868
2872
  });
2869
- var $ = v.values ? T.result.map(d) : T.result;
2870
- (v.values ? D : I).addKeys($);
2871
- } else if (p === "openCursor") {
2872
- var x = T, M = v.values;
2873
+ var $ = E.values ? T.result.map(d) : T.result;
2874
+ (E.values ? D : I).addKeys($);
2875
+ } else if (m === "openCursor") {
2876
+ var x = T, M = E.values;
2873
2877
  return x && Object.create(x, { key: { get: function() {
2874
2878
  return I.addKey(x.primaryKey), x.key;
2875
2879
  } }, primaryKey: { get: function() {
@@ -2885,9 +2889,9 @@ function Ma() {
2885
2889
  I.add(r);
2886
2890
  }
2887
2891
  }
2888
- return s[p].apply(this, arguments);
2892
+ return s[m].apply(this, arguments);
2889
2893
  };
2890
- }), E;
2894
+ }), w;
2891
2895
  } });
2892
2896
  } };
2893
2897
  function Ir(e, n, r) {
@@ -2906,52 +2910,52 @@ function Ma() {
2906
2910
  }
2907
2911
  function Nr(e, n, O, a, s, i) {
2908
2912
  if (!O || O.length === 0) return e;
2909
- var u = n.query.index, d = u.multiEntry, g = n.query.range, y = a.schema.primaryKey.extractKey, E = u.extractKey, f = (u.lowLevelIndex || u).extractKey, O = O.reduce(function(p, v) {
2910
- var S = p, b = [];
2911
- if (v.type === "add" || v.type === "put") for (var A = new ae(), P = v.values.length - 1; 0 <= P; --P) {
2912
- var D, I = v.values[P], N = y(I);
2913
- A.hasKey(N) || (D = E(I), (d && K(D) ? D.some(function(x) {
2914
- return Kn(x, g);
2915
- }) : Kn(D, g)) && (A.addKey(N), b.push(I)));
2913
+ var u = n.query.index, d = u.multiEntry, p = n.query.range, y = a.schema.primaryKey.extractKey, w = u.extractKey, f = (u.lowLevelIndex || u).extractKey, O = O.reduce(function(m, E) {
2914
+ var S = m, b = [];
2915
+ if (E.type === "add" || E.type === "put") for (var A = new ae(), P = E.values.length - 1; 0 <= P; --P) {
2916
+ var D, I = E.values[P], N = y(I);
2917
+ A.hasKey(N) || (D = w(I), (d && K(D) ? D.some(function(x) {
2918
+ return Kn(x, p);
2919
+ }) : Kn(D, p)) && (A.addKey(N), b.push(I)));
2916
2920
  }
2917
- switch (v.type) {
2921
+ switch (E.type) {
2918
2922
  case "add":
2919
- var k = new ae().addKeys(n.values ? p.map(function(M) {
2923
+ var C = new ae().addKeys(n.values ? m.map(function(M) {
2920
2924
  return y(M);
2921
- }) : p), S = p.concat(n.values ? b.filter(function(M) {
2922
- return M = y(M), !k.hasKey(M) && (k.addKey(M), !0);
2925
+ }) : m), S = m.concat(n.values ? b.filter(function(M) {
2926
+ return M = y(M), !C.hasKey(M) && (C.addKey(M), !0);
2923
2927
  }) : b.map(function(M) {
2924
2928
  return y(M);
2925
2929
  }).filter(function(M) {
2926
- return !k.hasKey(M) && (k.addKey(M), !0);
2930
+ return !C.hasKey(M) && (C.addKey(M), !0);
2927
2931
  }));
2928
2932
  break;
2929
2933
  case "put":
2930
- var R = new ae().addKeys(v.values.map(function(M) {
2934
+ var R = new ae().addKeys(E.values.map(function(M) {
2931
2935
  return y(M);
2932
2936
  }));
2933
- S = p.filter(function(M) {
2937
+ S = m.filter(function(M) {
2934
2938
  return !R.hasKey(n.values ? y(M) : M);
2935
2939
  }).concat(n.values ? b : b.map(function(M) {
2936
2940
  return y(M);
2937
2941
  }));
2938
2942
  break;
2939
2943
  case "delete":
2940
- var T = new ae().addKeys(v.keys);
2941
- S = p.filter(function(M) {
2944
+ var T = new ae().addKeys(E.keys);
2945
+ S = m.filter(function(M) {
2942
2946
  return !T.hasKey(n.values ? y(M) : M);
2943
2947
  });
2944
2948
  break;
2945
2949
  case "deleteRange":
2946
- var $ = v.range;
2947
- S = p.filter(function(M) {
2950
+ var $ = E.range;
2951
+ S = m.filter(function(M) {
2948
2952
  return !Kn(y(M), $);
2949
2953
  });
2950
2954
  }
2951
2955
  return S;
2952
2956
  }, e);
2953
- return O === e ? e : (O.sort(function(p, v) {
2954
- return H(f(p), f(v)) || H(y(p), y(v));
2957
+ return O === e ? e : (O.sort(function(m, E) {
2958
+ return H(f(m), f(E)) || H(y(m), y(E));
2955
2959
  }), n.limit && n.limit < 1 / 0 && (O.length > n.limit ? O.length = n.limit : e.length === n.limit && O.length < n.limit && (s.dirty = !0)), i ? Object.freeze(O) : O);
2956
2960
  }
2957
2961
  function Rr(e, n) {
@@ -2990,25 +2994,25 @@ function Ma() {
2990
2994
  var n = e.schema.name;
2991
2995
  return l(l({}, e), { transaction: function(r, a, s) {
2992
2996
  var i, u, d = e.transaction(r, a, s);
2993
- return a === "readwrite" && (u = (i = new AbortController()).signal, s = function(g) {
2997
+ return a === "readwrite" && (u = (i = new AbortController()).signal, s = function(p) {
2994
2998
  return function() {
2995
2999
  if (i.abort(), a === "readwrite") {
2996
- for (var y = /* @__PURE__ */ new Set(), E = 0, f = r; E < f.length; E++) {
2997
- var O = f[E], p = ze["idb://".concat(n, "/").concat(O)];
2998
- if (p) {
2999
- var v = e.table(O), S = p.optimisticOps.filter(function(M) {
3000
+ for (var y = /* @__PURE__ */ new Set(), w = 0, f = r; w < f.length; w++) {
3001
+ var O = f[w], m = ze["idb://".concat(n, "/").concat(O)];
3002
+ if (m) {
3003
+ var E = e.table(O), S = m.optimisticOps.filter(function(M) {
3000
3004
  return M.trans === d;
3001
3005
  });
3002
- if (d._explicit && g && d.mutatedParts) for (var b = 0, A = Object.values(p.queries.query); b < A.length; b++) for (var P = 0, D = (k = A[b]).slice(); P < D.length; P++) xn((R = D[P]).obsSet, d.mutatedParts) && (je(k, R), R.subscribers.forEach(function(M) {
3006
+ if (d._explicit && p && d.mutatedParts) for (var b = 0, A = Object.values(m.queries.query); b < A.length; b++) for (var P = 0, D = (C = A[b]).slice(); P < D.length; P++) xn((R = D[P]).obsSet, d.mutatedParts) && (je(C, R), R.subscribers.forEach(function(M) {
3003
3007
  return y.add(M);
3004
3008
  }));
3005
3009
  else if (0 < S.length) {
3006
- p.optimisticOps = p.optimisticOps.filter(function(M) {
3010
+ m.optimisticOps = m.optimisticOps.filter(function(M) {
3007
3011
  return M.trans !== d;
3008
3012
  });
3009
- for (var I = 0, N = Object.values(p.queries.query); I < N.length; I++) for (var k, R, T, $ = 0, x = (k = N[I]).slice(); $ < x.length; $++) (R = x[$]).res != null && d.mutatedParts && (g && !R.dirty ? (T = Object.isFrozen(R.res), T = Nr(R.res, R.req, S, v, R, T), R.dirty ? (je(k, R), R.subscribers.forEach(function(M) {
3013
+ for (var I = 0, N = Object.values(m.queries.query); I < N.length; I++) for (var C, R, T, $ = 0, x = (C = N[I]).slice(); $ < x.length; $++) (R = x[$]).res != null && d.mutatedParts && (p && !R.dirty ? (T = Object.isFrozen(R.res), T = Nr(R.res, R.req, S, E, R, T), R.dirty ? (je(C, R), R.subscribers.forEach(function(M) {
3010
3014
  return y.add(M);
3011
- })) : T !== R.res && (R.res = T, R.promise = j.resolve({ result: T }))) : (R.dirty && je(k, R), R.subscribers.forEach(function(M) {
3015
+ })) : T !== R.res && (R.res = T, R.promise = j.resolve({ result: T }))) : (R.dirty && je(C, R), R.subscribers.forEach(function(M) {
3012
3016
  return y.add(M);
3013
3017
  })));
3014
3018
  }
@@ -3026,25 +3030,25 @@ function Ma() {
3026
3030
  var u = B.trans;
3027
3031
  if (s.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(i);
3028
3032
  var d = ze["idb://".concat(n, "/").concat(r)];
3029
- return d ? (u = a.mutate(i), i.type !== "add" && i.type !== "put" || !(50 <= i.values.length || Gn(s, i).some(function(g) {
3030
- return g == null;
3031
- })) ? (d.optimisticOps.push(i), i.mutatedParts && Qt(i.mutatedParts), u.then(function(g) {
3032
- 0 < g.numFailures && (je(d.optimisticOps, i), (g = Ir(0, i, g)) && d.optimisticOps.push(g), i.mutatedParts && Qt(i.mutatedParts));
3033
+ return d ? (u = a.mutate(i), i.type !== "add" && i.type !== "put" || !(50 <= i.values.length || Gn(s, i).some(function(p) {
3034
+ return p == null;
3035
+ })) ? (d.optimisticOps.push(i), i.mutatedParts && Qt(i.mutatedParts), u.then(function(p) {
3036
+ 0 < p.numFailures && (je(d.optimisticOps, i), (p = Ir(0, i, p)) && d.optimisticOps.push(p), i.mutatedParts && Qt(i.mutatedParts));
3033
3037
  }), u.catch(function() {
3034
3038
  je(d.optimisticOps, i), i.mutatedParts && Qt(i.mutatedParts);
3035
- })) : u.then(function(g) {
3036
- var y = Ir(0, l(l({}, i), { values: i.values.map(function(E, f) {
3039
+ })) : u.then(function(p) {
3040
+ var y = Ir(0, l(l({}, i), { values: i.values.map(function(w, f) {
3037
3041
  var O;
3038
- return g.failures[f] ? E : (E = (O = s.keyPath) !== null && O !== void 0 && O.includes(".") ? $e(E) : l({}, E), ue(E, s.keyPath, g.results[f]), E);
3039
- }) }), g);
3042
+ return p.failures[f] ? w : (w = (O = s.keyPath) !== null && O !== void 0 && O.includes(".") ? $e(w) : l({}, w), ue(w, s.keyPath, p.results[f]), w);
3043
+ }) }), p);
3040
3044
  d.optimisticOps.push(y), queueMicrotask(function() {
3041
3045
  return i.mutatedParts && Qt(i.mutatedParts);
3042
3046
  });
3043
3047
  }), u) : a.mutate(i);
3044
3048
  }, query: function(i) {
3045
3049
  if (!Pr(B, a) || !Dr("query", i)) return a.query(i);
3046
- var u = ((y = B.trans) === null || y === void 0 ? void 0 : y.db._options.cache) === "immutable", f = B, d = f.requery, g = f.signal, y = function(v, S, b, A) {
3047
- var P = ze["idb://".concat(v, "/").concat(S)];
3050
+ var u = ((y = B.trans) === null || y === void 0 ? void 0 : y.db._options.cache) === "immutable", f = B, d = f.requery, p = f.signal, y = function(E, S, b, A) {
3051
+ var P = ze["idb://".concat(E, "/").concat(S)];
3048
3052
  if (!P) return [];
3049
3053
  if (!(S = P.queries[b])) return [null, !1, P, null];
3050
3054
  var D = S[(A.query ? A.query.index.name : null) || ""];
@@ -3062,18 +3066,18 @@ function Ma() {
3062
3066
  return Rr(N.req.query.range, A.query.range);
3063
3067
  }), [I, !!I, P, D];
3064
3068
  }
3065
- }(n, r, "query", i), E = y[0], f = y[1], O = y[2], p = y[3];
3066
- return E && f ? E.obsSet = i.obsSet : (f = a.query(i).then(function(v) {
3067
- var S = v.result;
3068
- if (E && (E.res = S), u) {
3069
+ }(n, r, "query", i), w = y[0], f = y[1], O = y[2], m = y[3];
3070
+ return w && f ? w.obsSet = i.obsSet : (f = a.query(i).then(function(E) {
3071
+ var S = E.result;
3072
+ if (w && (w.res = S), u) {
3069
3073
  for (var b = 0, A = S.length; b < A; ++b) Object.freeze(S[b]);
3070
3074
  Object.freeze(S);
3071
- } else v.result = $e(S);
3072
- return v;
3073
- }).catch(function(v) {
3074
- return p && E && je(p, E), Promise.reject(v);
3075
- }), E = { obsSet: i.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: i, dirty: !1 }, p ? p.push(E) : (p = [E], (O = O || (ze["idb://".concat(n, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[i.query.index.name || ""] = p)), Oa(E, p, d, g), E.promise.then(function(v) {
3076
- return { result: Nr(v.result, i, O?.optimisticOps, a, E, u) };
3075
+ } else E.result = $e(S);
3076
+ return E;
3077
+ }).catch(function(E) {
3078
+ return m && w && je(m, w), Promise.reject(E);
3079
+ }), w = { obsSet: i.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: i, dirty: !1 }, m ? m.push(w) : (m = [w], (O = O || (ze["idb://".concat(n, "/").concat(r)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[i.query.index.name || ""] = m)), Oa(w, m, d, p), w.promise.then(function(E) {
3080
+ return { result: Nr(E.result, i, O?.optimisticOps, a, w, u) };
3077
3081
  });
3078
3082
  } });
3079
3083
  } });
@@ -3142,8 +3146,8 @@ function Ma() {
3142
3146
  n.close(e);
3143
3147
  var d = n._deps.indexedDB.deleteDatabase(n.name);
3144
3148
  d.onsuccess = Z(function() {
3145
- var g, y, E;
3146
- g = n._deps, y = n.name, E = g.indexedDB, g = g.IDBKeyRange, Nn(E) || y === jt || In(E, g).delete(y).catch(Q), s();
3149
+ var p, y, w;
3150
+ p = n._deps, y = n.name, w = p.indexedDB, p = p.IDBKeyRange, Nn(w) || y === jt || In(w, p).delete(y).catch(Q), s();
3147
3151
  }), d.onerror = me(i), d.onblocked = n._fireOnBlocked;
3148
3152
  }
3149
3153
  if (r) throw new L.InvalidArgument("Invalid closeOptions argument to db.delete()");
@@ -3162,7 +3166,7 @@ function Ma() {
3162
3166
  return this._state.autoSchema;
3163
3167
  }, Object.defineProperty(ee.prototype, "tables", { get: function() {
3164
3168
  var e = this;
3165
- return C(this._allTables).map(function(n) {
3169
+ return k(this._allTables).map(function(n) {
3166
3170
  return e._allTables[n];
3167
3171
  });
3168
3172
  }, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
@@ -3200,31 +3204,31 @@ function Ma() {
3200
3204
  }), d && s && !s.active && (s = null);
3201
3205
  }
3202
3206
  } catch (y) {
3203
- return s ? s._promise(null, function(E, f) {
3207
+ return s ? s._promise(null, function(w, f) {
3204
3208
  f(y);
3205
3209
  }) : q(y);
3206
3210
  }
3207
- var g = function y(E, f, O, p, v) {
3211
+ var p = function y(w, f, O, m, E) {
3208
3212
  return j.resolve().then(function() {
3209
- var S = B.transless || B, b = E._createTransaction(f, O, E._dbSchema, p);
3210
- if (b.explicit = !0, S = { trans: b, transless: S }, p) b.idbtrans = p.idbtrans;
3213
+ var S = B.transless || B, b = w._createTransaction(f, O, w._dbSchema, m);
3214
+ if (b.explicit = !0, S = { trans: b, transless: S }, m) b.idbtrans = m.idbtrans;
3211
3215
  else try {
3212
- b.create(), b.idbtrans._explicit = !0, E._state.PR1398_maxLoop = 3;
3216
+ b.create(), b.idbtrans._explicit = !0, w._state.PR1398_maxLoop = 3;
3213
3217
  } catch (D) {
3214
- return D.name === sn.InvalidState && E.isOpen() && 0 < --E._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), E.close({ disableAutoOpen: !1 }), E.open().then(function() {
3215
- return y(E, f, O, null, v);
3218
+ return D.name === sn.InvalidState && w.isOpen() && 0 < --w._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), w.close({ disableAutoOpen: !1 }), w.open().then(function() {
3219
+ return y(w, f, O, null, E);
3216
3220
  })) : q(D);
3217
3221
  }
3218
- var A, P = an(v);
3222
+ var A, P = an(E);
3219
3223
  return P && et(), S = j.follow(function() {
3220
3224
  var D;
3221
- (A = v.call(b, b)) && (P ? (D = Ie.bind(null, null), A.then(D, D)) : typeof A.next == "function" && typeof A.throw == "function" && (A = jn(A)));
3225
+ (A = E.call(b, b)) && (P ? (D = Ie.bind(null, null), A.then(D, D)) : typeof A.next == "function" && typeof A.throw == "function" && (A = jn(A)));
3222
3226
  }, S), (A && typeof A.then == "function" ? j.resolve(A).then(function(D) {
3223
3227
  return b.active ? D : q(new L.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
3224
3228
  }) : S.then(function() {
3225
3229
  return A;
3226
3230
  })).then(function(D) {
3227
- return p && b._resolve(), b._completion.then(function() {
3231
+ return m && b._resolve(), b._completion.then(function() {
3228
3232
  return D;
3229
3233
  });
3230
3234
  }).catch(function(D) {
@@ -3232,9 +3236,9 @@ function Ma() {
3232
3236
  });
3233
3237
  });
3234
3238
  }.bind(null, this, i, u, s, r);
3235
- return s ? s._promise(i, g, "lock") : B.trans ? We(B.transless, function() {
3236
- return a._whenReady(g);
3237
- }) : this._whenReady(g);
3239
+ return s ? s._promise(i, p, "lock") : B.trans ? We(B.transless, function() {
3240
+ return a._whenReady(p);
3241
+ }) : this._whenReady(p);
3238
3242
  }, ee.prototype.table = function(e) {
3239
3243
  if (!ie(this._allTables, e)) throw new L.InvalidTable("Table ".concat(e, " does not exist"));
3240
3244
  return this._allTables[e];
@@ -3244,35 +3248,35 @@ function Ma() {
3244
3248
  this._middlewares = {}, this.verno = 0;
3245
3249
  var a = ee.dependencies;
3246
3250
  this._options = n = l({ addons: ee.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, n), this._deps = { indexedDB: n.indexedDB, IDBKeyRange: n.IDBKeyRange }, a = n.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
3247
- var s, i, u, d, g, y = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: n.autoOpen };
3251
+ var s, i, u, d, p, y = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: n.autoOpen };
3248
3252
  y.dbReadyPromise = new j(function(f) {
3249
3253
  y.dbReadyResolve = f;
3250
3254
  }), y.openCanceller = new j(function(f, O) {
3251
3255
  y.cancelOpen = O;
3252
3256
  }), this._state = y, this.name = e, this.on = ht(this, "populate", "blocked", "versionchange", "close", { ready: [on, Q] }), this.on.ready.subscribe = Vn(this.on.ready.subscribe, function(f) {
3253
- return function(O, p) {
3257
+ return function(O, m) {
3254
3258
  ee.vip(function() {
3255
- var v, S = r._state;
3256
- S.openComplete ? (S.dbOpenError || j.resolve().then(O), p && f(O)) : S.onReadyBeingFired ? (S.onReadyBeingFired.push(O), p && f(O)) : (f(O), v = r, p || f(function b() {
3257
- v.on.ready.unsubscribe(O), v.on.ready.unsubscribe(b);
3259
+ var E, S = r._state;
3260
+ S.openComplete ? (S.dbOpenError || j.resolve().then(O), m && f(O)) : S.onReadyBeingFired ? (S.onReadyBeingFired.push(O), m && f(O)) : (f(O), E = r, m || f(function b() {
3261
+ E.on.ready.unsubscribe(O), E.on.ready.unsubscribe(b);
3258
3262
  }));
3259
3263
  });
3260
3264
  };
3261
3265
  }), this.Collection = (s = this, gt(oa.prototype, function(A, b) {
3262
3266
  this.db = s;
3263
- var p = ir, v = null;
3267
+ var m = ir, E = null;
3264
3268
  if (b) try {
3265
- p = b();
3269
+ m = b();
3266
3270
  } catch (P) {
3267
- v = P;
3271
+ E = P;
3268
3272
  }
3269
3273
  var S = A._ctx, b = S.table, A = b.hook.reading.fire;
3270
- this._ctx = { table: b, index: S.index, isPrimKey: !S.index || b.schema.primKey.keyPath && S.index === b.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: v, or: S.or, valueMapper: A !== ct ? A : null };
3271
- })), this.Table = (i = this, gt(dr.prototype, function(f, O, p) {
3272
- this.db = i, this._tx = p, this.name = f, this.schema = O, this.hook = i._allTables[f] ? i._allTables[f].hook : ht(null, { creating: [Jr, Q], reading: [Xr, ct], updating: [qr, Q], deleting: [Zr, Q] });
3273
- })), this.Transaction = (u = this, gt(ua.prototype, function(f, O, p, v, S) {
3274
+ this._ctx = { table: b, index: S.index, isPrimKey: !S.index || b.schema.primKey.keyPath && S.index === b.schema.primKey.name, range: m, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: E, or: S.or, valueMapper: A !== ct ? A : null };
3275
+ })), this.Table = (i = this, gt(dr.prototype, function(f, O, m) {
3276
+ this.db = i, this._tx = m, this.name = f, this.schema = O, this.hook = i._allTables[f] ? i._allTables[f].hook : ht(null, { creating: [Jr, Q], reading: [Xr, ct], updating: [qr, Q], deleting: [Zr, Q] });
3277
+ })), this.Transaction = (u = this, gt(ua.prototype, function(f, O, m, E, S) {
3274
3278
  var b = this;
3275
- this.db = u, this.mode = f, this.storeNames = O, this.schema = p, this.chromeTransactionDurability = v, this.idbtrans = null, this.on = ht(this, "complete", "error", "abort"), this.parent = S || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new j(function(A, P) {
3279
+ this.db = u, this.mode = f, this.storeNames = O, this.schema = m, this.chromeTransactionDurability = E, this.idbtrans = null, this.on = ht(this, "complete", "error", "abort"), this.parent = S || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new j(function(A, P) {
3276
3280
  b._resolve = A, b._reject = P;
3277
3281
  }), this._completion.then(function() {
3278
3282
  b.active = !1, b.on.complete.fire();
@@ -3282,20 +3286,20 @@ function Ma() {
3282
3286
  });
3283
3287
  })), this.Version = (d = this, gt(ma.prototype, function(f) {
3284
3288
  this.db = d, this._cfg = { version: f, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3285
- })), this.WhereClause = (g = this, gt(mr.prototype, function(f, O, p) {
3286
- if (this.db = g, this._ctx = { table: f, index: O === ":id" ? null : O, or: p }, this._cmp = this._ascending = H, this._descending = function(v, S) {
3287
- return H(S, v);
3288
- }, this._max = function(v, S) {
3289
- return 0 < H(v, S) ? v : S;
3290
- }, this._min = function(v, S) {
3291
- return H(v, S) < 0 ? v : S;
3292
- }, this._IDBKeyRange = g._deps.IDBKeyRange, !this._IDBKeyRange) throw new L.MissingAPI();
3289
+ })), this.WhereClause = (p = this, gt(mr.prototype, function(f, O, m) {
3290
+ if (this.db = p, this._ctx = { table: f, index: O === ":id" ? null : O, or: m }, this._cmp = this._ascending = H, this._descending = function(E, S) {
3291
+ return H(S, E);
3292
+ }, this._max = function(E, S) {
3293
+ return 0 < H(E, S) ? E : S;
3294
+ }, this._min = function(E, S) {
3295
+ return H(E, S) < 0 ? E : S;
3296
+ }, this._IDBKeyRange = p._deps.IDBKeyRange, !this._IDBKeyRange) throw new L.MissingAPI();
3293
3297
  })), this.on("versionchange", function(f) {
3294
3298
  0 < f.newVersion ? console.warn("Another connection wants to upgrade database '".concat(r.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(r.name, "'. Closing db now to resume the delete request.")), r.close({ disableAutoOpen: !1 });
3295
3299
  }), this.on("blocked", function(f) {
3296
3300
  !f.newVersion || f.newVersion < f.oldVersion ? console.warn("Dexie.delete('".concat(r.name, "') was blocked")) : console.warn("Upgrade '".concat(r.name, "' blocked by other connection holding version ").concat(f.oldVersion / 10));
3297
- }), this._maxKey = bt(n.IDBKeyRange), this._createTransaction = function(f, O, p, v) {
3298
- return new r.Transaction(f, O, p, r._options.chromeTransactionDurability, v);
3301
+ }), this._maxKey = bt(n.IDBKeyRange), this._createTransaction = function(f, O, m, E) {
3302
+ return new r.Transaction(f, O, m, r._options.chromeTransactionDurability, E);
3299
3303
  }, this._fireOnBlocked = function(f) {
3300
3304
  r.on("blocked").fire(f), tt.filter(function(O) {
3301
3305
  return O.name === r.name && O !== r && !O._state.vcFired;
@@ -3303,19 +3307,19 @@ function Ma() {
3303
3307
  return O.on("versionchange").fire(f);
3304
3308
  });
3305
3309
  }, this.use(Ea), this.use(_a), this.use(wa), this.use(ba), this.use(va);
3306
- var E = new Proxy(this, { get: function(f, O, p) {
3310
+ var w = new Proxy(this, { get: function(f, O, m) {
3307
3311
  if (O === "_vip") return !0;
3308
3312
  if (O === "table") return function(S) {
3309
- return Jt(r.table(S), E);
3313
+ return Jt(r.table(S), w);
3310
3314
  };
3311
- var v = Reflect.get(f, O, p);
3312
- return v instanceof dr ? Jt(v, E) : O === "tables" ? v.map(function(S) {
3313
- return Jt(S, E);
3315
+ var E = Reflect.get(f, O, m);
3316
+ return E instanceof dr ? Jt(E, w) : O === "tables" ? E.map(function(S) {
3317
+ return Jt(S, w);
3314
3318
  }) : O === "_createTransaction" ? function() {
3315
- return Jt(v.apply(this, arguments), E);
3316
- } : v;
3319
+ return Jt(E.apply(this, arguments), w);
3320
+ } : E;
3317
3321
  } });
3318
- this.vip = E, a.forEach(function(f) {
3322
+ this.vip = w, a.forEach(function(f) {
3319
3323
  return f(r);
3320
3324
  });
3321
3325
  }
@@ -3328,25 +3332,25 @@ function Ma() {
3328
3332
  this._subscribe = e;
3329
3333
  }
3330
3334
  try {
3331
- Zt = { indexedDB: w.indexedDB || w.mozIndexedDB || w.webkitIndexedDB || w.msIndexedDB, IDBKeyRange: w.IDBKeyRange || w.webkitIDBKeyRange };
3335
+ Zt = { indexedDB: v.indexedDB || v.mozIndexedDB || v.webkitIndexedDB || v.msIndexedDB, IDBKeyRange: v.IDBKeyRange || v.webkitIDBKeyRange };
3332
3336
  } catch {
3333
3337
  Zt = { indexedDB: null, IDBKeyRange: null };
3334
3338
  }
3335
3339
  function Tr(e) {
3336
3340
  var n, r = !1, a = new Aa(function(s) {
3337
- var i = an(e), u, d = !1, g = {}, y = {}, E = { get closed() {
3341
+ var i = an(e), u, d = !1, p = {}, y = {}, w = { get closed() {
3338
3342
  return d;
3339
3343
  }, unsubscribe: function() {
3340
- d || (d = !0, u && u.abort(), f && Te.storagemutated.unsubscribe(p));
3344
+ d || (d = !0, u && u.abort(), f && Te.storagemutated.unsubscribe(m));
3341
3345
  } };
3342
- s.start && s.start(E);
3346
+ s.start && s.start(w);
3343
3347
  var f = !1, O = function() {
3344
- return pn(v);
3345
- }, p = function(S) {
3346
- Yt(g, S), xn(y, g) && O();
3347
- }, v = function() {
3348
+ return pn(E);
3349
+ }, m = function(S) {
3350
+ Yt(p, S), xn(y, p) && O();
3351
+ }, E = function() {
3348
3352
  var S, b, A;
3349
- !d && Zt.indexedDB && (g = {}, S = {}, u && u.abort(), u = new AbortController(), A = function(P) {
3353
+ !d && Zt.indexedDB && (p = {}, S = {}, u && u.abort(), u = new AbortController(), A = function(P) {
3350
3354
  var D = Ze();
3351
3355
  try {
3352
3356
  i && et();
@@ -3356,10 +3360,10 @@ function Ma() {
3356
3360
  D && qe();
3357
3361
  }
3358
3362
  }(b = { subscr: S, signal: u.signal, requery: O, querier: e, trans: null }), Promise.resolve(A).then(function(P) {
3359
- r = !0, n = P, d || b.signal.aborted || (g = {}, function(D) {
3363
+ r = !0, n = P, d || b.signal.aborted || (p = {}, function(D) {
3360
3364
  for (var I in D) if (ie(D, I)) return;
3361
3365
  return 1;
3362
- }(y = S) || f || (Te(yt, p), f = !0), pn(function() {
3366
+ }(y = S) || f || (Te(yt, m), f = !0), pn(function() {
3363
3367
  return !d && s.next && s.next(P);
3364
3368
  }));
3365
3369
  }, function(P) {
@@ -3368,7 +3372,7 @@ function Ma() {
3368
3372
  });
3369
3373
  }));
3370
3374
  };
3371
- return setTimeout(O, 0), E;
3375
+ return setTimeout(O, 0), w;
3372
3376
  });
3373
3377
  return a.hasValue = function() {
3374
3378
  return r;
@@ -3590,10 +3594,10 @@ class Mr {
3590
3594
  } : (o.message = `Dashboard ${t.id} retrieved from storage`, o.success = !0, o);
3591
3595
  };
3592
3596
  getDashboards = async (t) => {
3593
- const o = (w) => t?.id === w.id, l = (w) => t?.name ? w.name.includes(t?.name) : !1, m = await this.db.table(_.DASHBOARD).toArray().then((w) => t?.id ? w.filter(o) : w).then((w) => t?.name ? w.filter(l) : w).catch(() => {
3597
+ const o = (v) => t?.id === v.id, l = (v) => t?.name ? v.name.includes(t?.name) : !1, g = await this.db.table(_.DASHBOARD).toArray().then((v) => t?.id ? v.filter(o) : v).then((v) => t?.name ? v.filter(l) : v).catch(() => {
3594
3598
  G(2, ["%cstorage", c.STORAGE, X.DASHBOARD_LOAD, t]);
3595
3599
  });
3596
- return m !== void 0 && G(3, [
3600
+ return g !== void 0 && G(3, [
3597
3601
  "%cstorage%c %cdashboards",
3598
3602
  c.STORAGE,
3599
3603
  c.NONE,
@@ -3601,9 +3605,9 @@ class Mr {
3601
3605
  t
3602
3606
  ]), {
3603
3607
  // @ts-ignore
3604
- data: m !== void 0 ? { dashboards: m, query: t } : null,
3605
- message: m !== void 0 ? "Dashboards loaded from storage" : "Dashboards load error",
3606
- success: m !== void 0
3608
+ data: g !== void 0 ? { dashboards: g, query: t } : null,
3609
+ message: g !== void 0 ? "Dashboards loaded from storage" : "Dashboards load error",
3610
+ success: g !== void 0
3607
3611
  };
3608
3612
  };
3609
3613
  /**
@@ -3632,21 +3636,21 @@ class Mr {
3632
3636
  * Wipe Message data after expires timestamp
3633
3637
  */
3634
3638
  cleanMessages = async () => {
3635
- const t = Date.now() / 1e3, o = (w) => w.expires < t, l = (w) => w.expires < t;
3636
- return await this.db.table(_.TOPICS).orderBy("expires").filter(o).delete().catch((w) => (console.error(
3639
+ const t = Date.now() / 1e3, o = (v) => v.expires < t, l = (v) => v.expires < t;
3640
+ return await this.db.table(_.TOPICS).orderBy("expires").filter(o).delete().catch((v) => (console.error(
3637
3641
  "%cstorage%c %cclean",
3638
3642
  c.STORAGE,
3639
3643
  c.NONE,
3640
3644
  c.MESSAGES,
3641
- w.message
3642
- ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(l).delete().catch((w) => (console.error(
3645
+ v.message
3646
+ ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(l).delete().catch((v) => (console.error(
3643
3647
  "%clean%c %cstorage%c %cmessages",
3644
3648
  c.OK,
3645
3649
  c.NONE,
3646
3650
  c.STORAGE,
3647
3651
  c.NONE,
3648
3652
  c.MESSAGES,
3649
- w.message
3653
+ v.message
3650
3654
  ), 0));
3651
3655
  };
3652
3656
  /**
@@ -3672,9 +3676,9 @@ class Mr {
3672
3676
  };
3673
3677
  const o = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
3674
3678
  o !== "utc" && (t.since = l - 60 * 60 * 24 * 30), this.options.delay != 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
3675
- const m = (K) => K.utc > (t?.since || 0), w = (K) => K.utc < (t?.before || l), C = (K) => K?.visible !== 0;
3679
+ const g = (K) => K.utc > (t?.since || 0), v = (K) => K.utc < (t?.before || l), k = (K) => K?.visible !== 0;
3676
3680
  try {
3677
- const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(C).filter(m).filter(w).reverse().limit(t?.limit ?? 25).sortBy(o);
3681
+ const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(k).filter(g).filter(v).reverse().limit(t?.limit ?? 25).sortBy(o);
3678
3682
  if (te.length === 0)
3679
3683
  return {
3680
3684
  data: null,
@@ -3736,68 +3740,68 @@ class Mr {
3736
3740
  if (t.type !== _.MESSAGES)
3737
3741
  return 400;
3738
3742
  const l = o.data.title;
3739
- let m = 0;
3740
- return await o.data.messages.forEach(async (w) => {
3741
- w.id !== null && (w.topics[0] = {
3742
- message_id: w.id,
3743
- engagement: w.topics[0]?.engagement || w.dynamics?.engagement || 0,
3744
- impressions: w.topics[0]?.impressions || w.dynamics?.semrush_visits || 0,
3745
- reach: w.topics[0]?.reach || w.dynamics?.potential_reach || 0,
3746
- sentiment: w.topics[0]?.sentiment || 0
3743
+ let g = 0;
3744
+ return await o.data.messages.forEach(async (v) => {
3745
+ v.id !== null && (v.topics[0] = {
3746
+ message_id: v.id,
3747
+ engagement: v.topics[0]?.engagement || v.dynamics?.engagement || 0,
3748
+ impressions: v.topics[0]?.impressions || v.dynamics?.semrush_visits || 0,
3749
+ reach: v.topics[0]?.reach || v.dynamics?.potential_reach || 0,
3750
+ sentiment: v.topics[0]?.sentiment || 0
3747
3751
  }, await this.db.table(_.MESSAGES).put({
3748
- id: w.id,
3749
- utc: w.utc,
3750
- data: w,
3751
- expires: w.expires
3752
- }).catch((C) => {
3753
- m++, G(4, [
3752
+ id: v.id,
3753
+ utc: v.utc,
3754
+ data: v,
3755
+ expires: v.expires
3756
+ }).catch((k) => {
3757
+ g++, G(4, [
3754
3758
  "%cset%c %cstorage",
3755
3759
  c.KO,
3756
3760
  c.NONE,
3757
3761
  c.STORAGE,
3758
3762
  "set message",
3759
3763
  `title: ${l}`,
3760
- w,
3761
- C.message
3764
+ v,
3765
+ k.message
3762
3766
  ]);
3763
3767
  }), await this.db.table(_.TOPICS).put({
3764
3768
  title: l,
3765
3769
  widget_id: t.widget,
3766
- message_id: w.id,
3770
+ message_id: v.id,
3767
3771
  dashboard_id: t.dashboard,
3768
- engagement: w.topics[0]?.engagement || w.dynamics?.engagement || 0,
3769
- impressions: w.topics[0]?.impressions || w.dynamics?.semrush_visits || 0,
3770
- reach: w.topics[0]?.reach || w.dynamics?.potential_reach || 0,
3771
- sentiment: w.topics[0]?.sentiment || 0,
3772
- utc: w.utc,
3773
- expires: w.expires
3774
- }).catch((C) => {
3775
- m++, G(4, [
3772
+ engagement: v.topics[0]?.engagement || v.dynamics?.engagement || 0,
3773
+ impressions: v.topics[0]?.impressions || v.dynamics?.semrush_visits || 0,
3774
+ reach: v.topics[0]?.reach || v.dynamics?.potential_reach || 0,
3775
+ sentiment: v.topics[0]?.sentiment || 0,
3776
+ utc: v.utc,
3777
+ expires: v.expires
3778
+ }).catch((k) => {
3779
+ g++, G(4, [
3776
3780
  "%cset%c %cstorage",
3777
3781
  c.KO,
3778
3782
  c.NONE,
3779
3783
  c.STORAGE,
3780
3784
  "set topic",
3781
3785
  `title: ${l}`,
3782
- w,
3783
- C.message
3786
+ v,
3787
+ k.message
3784
3788
  ]);
3785
- }), await o.data.topics.forEach(async (C) => {
3786
- const K = C.message_id, te = C.visible ? 1 : 0, ge = C.title;
3789
+ }), await o.data.topics.forEach(async (k) => {
3790
+ const K = k.message_id, te = k.visible ? 1 : 0, ge = k.title;
3787
3791
  await this.db.table(_.TOPICS).where("message_id").equals(K).modify({ visible: te }).catch((Ce) => {
3788
- m++, G(4, [
3792
+ g++, G(4, [
3789
3793
  "%cset%c %cstorage",
3790
3794
  c.KO,
3791
3795
  c.NONE,
3792
3796
  c.STORAGE,
3793
3797
  "update message visibility",
3794
3798
  `title: ${ge}`,
3795
- `widget: ${C.widget_id}`,
3799
+ `widget: ${k.widget_id}`,
3796
3800
  Ce.message
3797
3801
  ]);
3798
3802
  });
3799
3803
  }));
3800
- }), m === 0 ? 201 : 400;
3804
+ }), g === 0 ? 201 : 400;
3801
3805
  };
3802
3806
  /**
3803
3807
  * Retrieve Series Data
@@ -3903,10 +3907,10 @@ class Mr {
3903
3907
  * @returns IResponse
3904
3908
  */
3905
3909
  getWidgets = async (t) => {
3906
- const o = (C) => t?.dashboard === C.dashboard_id, l = (C) => t?.type === C.type, m = (C) => t?.name ? C.name.includes(t?.name) : !1, w = await this.db.table(_.WIDGET).toArray().then((C) => t?.dashboard ? C.filter(o) : C).then((C) => t?.type ? C.filter(l) : C).then((C) => t?.name ? C.filter(m) : C).catch(() => {
3910
+ const o = (k) => t?.dashboard === k.dashboard_id, l = (k) => t?.type === k.type, g = (k) => t?.name ? k.name.includes(t?.name) : !1, v = await this.db.table(_.WIDGET).toArray().then((k) => t?.dashboard ? k.filter(o) : k).then((k) => t?.type ? k.filter(l) : k).then((k) => t?.name ? k.filter(g) : k).catch(() => {
3907
3911
  G(2, ["%cstorage", c.STORAGE, X.WIDGET_LOAD, t]);
3908
3912
  });
3909
- return w !== void 0 && G(3, [
3913
+ return v !== void 0 && G(3, [
3910
3914
  "%cstorage%c %cwidgets",
3911
3915
  c.STORAGE,
3912
3916
  c.NONE,
@@ -3914,9 +3918,9 @@ class Mr {
3914
3918
  t
3915
3919
  ]), {
3916
3920
  // @ts-ignore
3917
- data: w !== void 0 ? { data: w, query: t } : null,
3918
- message: w !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3919
- success: w !== void 0
3921
+ data: v !== void 0 ? { data: v, query: t } : null,
3922
+ message: v !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3923
+ success: v !== void 0
3920
3924
  };
3921
3925
  };
3922
3926
  /**
@@ -3993,12 +3997,12 @@ class Mr {
3993
3997
  * @returns IResponse
3994
3998
  */
3995
3999
  getSlides = async (t) => {
3996
- const o = (C) => t?.id ? t.id = C.id : !1, l = (C) => t?.name ? C.name.includes(t?.name) : !1, w = await this.db.table(_.SLIDE).toArray().then((C) => t?.id ? C.filter(o) : C).then((C) => t?.name ? C.filter(l) : C);
3997
- return w !== void 0 && G(3, ["%cstorage%c %cslides", c.STORAGE, c.NONE, c.SLIDE, t]), {
4000
+ const o = (k) => t?.id ? t.id = k.id : !1, l = (k) => t?.name ? k.name.includes(t?.name) : !1, v = await this.db.table(_.SLIDE).toArray().then((k) => t?.id ? k.filter(o) : k).then((k) => t?.name ? k.filter(l) : k);
4001
+ return v !== void 0 && G(3, ["%cstorage%c %cslides", c.STORAGE, c.NONE, c.SLIDE, t]), {
3998
4002
  // @ts-ignore
3999
- data: w !== void 0 ? { slides: w, query: t } : null,
4000
- message: w !== void 0 ? "Slides loaded from storage" : "Slides load error",
4001
- success: w !== void 0
4003
+ data: v !== void 0 ? { slides: v, query: t } : null,
4004
+ message: v !== void 0 ? "Slides loaded from storage" : "Slides load error",
4005
+ success: v !== void 0
4002
4006
  };
4003
4007
  };
4004
4008
  /**
@@ -4055,8 +4059,8 @@ class Mr {
4055
4059
  * @returns IResponse
4056
4060
  */
4057
4061
  getPresentations = async (t) => {
4058
- const o = (w) => t?.name ? w.name.includes(t?.name) : !1, m = await this.db.table(_.PRESENTATION).toArray().then((w) => t?.name ? w.filter(o) : w);
4059
- return m !== void 0 && G(3, [
4062
+ const o = (v) => t?.name ? v.name.includes(t?.name) : !1, g = await this.db.table(_.PRESENTATION).toArray().then((v) => t?.name ? v.filter(o) : v);
4063
+ return g !== void 0 && G(3, [
4060
4064
  "%cstorage%c %cpresentations",
4061
4065
  c.STORAGE,
4062
4066
  c.NONE,
@@ -4064,9 +4068,9 @@ class Mr {
4064
4068
  t
4065
4069
  ]), {
4066
4070
  // @ts-ignore
4067
- data: m !== void 0 ? { presentations: m, query: t } : null,
4068
- message: m !== void 0 ? "Presentations loaded from storage" : "Presentations load error",
4069
- success: m !== void 0
4071
+ data: g !== void 0 ? { presentations: g, query: t } : null,
4072
+ message: g !== void 0 ? "Presentations loaded from storage" : "Presentations load error",
4073
+ success: g !== void 0
4070
4074
  };
4071
4075
  };
4072
4076
  /**
@@ -4123,8 +4127,8 @@ class Mr {
4123
4127
  * @returns IResponse
4124
4128
  */
4125
4129
  getPreferences = async (t) => {
4126
- const o = (w) => t?.id ? t.id = w.id : !1, m = await this.db.table(_.SLIDE).toArray().then((w) => t?.id ? w.filter(o) : w);
4127
- return m !== void 0 && G(3, [
4130
+ const o = (v) => t?.id ? t.id = v.id : !1, g = await this.db.table(_.SLIDE).toArray().then((v) => t?.id ? v.filter(o) : v);
4131
+ return g !== void 0 && G(3, [
4128
4132
  "%cstorage%c %cpreferences",
4129
4133
  c.STORAGE,
4130
4134
  c.NONE,
@@ -4132,9 +4136,9 @@ class Mr {
4132
4136
  t
4133
4137
  ]), {
4134
4138
  // @ts-ignore
4135
- data: m !== void 0 ? { prefrences: m, query: t } : null,
4136
- message: m !== void 0 ? "Preferences loaded from storage" : "Preferences load error",
4137
- success: m !== void 0
4139
+ data: g !== void 0 ? { prefrences: g, query: t } : null,
4140
+ message: g !== void 0 ? "Preferences loaded from storage" : "Preferences load error",
4141
+ success: g !== void 0
4138
4142
  };
4139
4143
  };
4140
4144
  /**
@@ -4166,8 +4170,8 @@ class Mr {
4166
4170
  * @returns IResponse
4167
4171
  */
4168
4172
  getImages = async (t) => {
4169
- const o = (w) => t?.id ? w.includes(t.id) : !1, m = await this.db.table(_.IMAGES).toArray().then((w) => t?.id ? w.filter(o) : w);
4170
- return m !== void 0 && G(3, [
4173
+ const o = (v) => t?.id ? v.includes(t.id) : !1, g = await this.db.table(_.IMAGES).toArray().then((v) => t?.id ? v.filter(o) : v);
4174
+ return g !== void 0 && G(3, [
4171
4175
  "%cstorage%c %cimages",
4172
4176
  c.STORAGE,
4173
4177
  c.NONE,
@@ -4175,9 +4179,9 @@ class Mr {
4175
4179
  t
4176
4180
  ]), {
4177
4181
  // @ts-ignore
4178
- data: m !== void 0 ? { images: m, query: t } : null,
4179
- message: m !== void 0 ? "Images loaded from storage" : "Images load error",
4180
- success: m !== void 0
4182
+ data: g !== void 0 ? { images: g, query: t } : null,
4183
+ message: g !== void 0 ? "Images loaded from storage" : "Images load error",
4184
+ success: g !== void 0
4181
4185
  };
4182
4186
  };
4183
4187
  /**
@@ -4214,10 +4218,17 @@ function Hn(h) {
4214
4218
  });
4215
4219
  }
4216
4220
  function Ka(h, t) {
4217
- const o = indexedDB.open(h);
4218
- o.onupgradeneeded = () => o.result.createObjectStore(t);
4219
- const l = Hn(o);
4220
- return (m, w) => l.then((C) => w(C.transaction(t, m).objectStore(t)));
4221
+ let o;
4222
+ const l = () => {
4223
+ if (o)
4224
+ return o;
4225
+ const g = indexedDB.open(h);
4226
+ return g.onupgradeneeded = () => g.result.createObjectStore(t), o = Hn(g), o.then((v) => {
4227
+ v.onclose = () => o = void 0;
4228
+ }, () => {
4229
+ }), o;
4230
+ };
4231
+ return (g, v) => l().then((k) => v(k.transaction(t, g).objectStore(t)));
4221
4232
  }
4222
4233
  let Un;
4223
4234
  function Gr() {
@@ -4257,12 +4268,12 @@ class Kr {
4257
4268
  if (!o.success)
4258
4269
  return 400;
4259
4270
  const l = Y(t);
4260
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((m) => (console.error(
4271
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4261
4272
  "%cstorage",
4262
4273
  c.STORAGE,
4263
4274
  _.CLOUD,
4264
4275
  t,
4265
- m.message
4276
+ g.message
4266
4277
  ), 400));
4267
4278
  };
4268
4279
  /**
@@ -4275,12 +4286,12 @@ class Kr {
4275
4286
  if (!o.success)
4276
4287
  return 400;
4277
4288
  const l = Y(t);
4278
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((m) => (console.error(
4289
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4279
4290
  "%cstorage",
4280
4291
  c.STORAGE,
4281
4292
  _.SERIES,
4282
4293
  t,
4283
- m.message
4294
+ g.message
4284
4295
  ), 400));
4285
4296
  };
4286
4297
  /**
@@ -4293,12 +4304,12 @@ class Kr {
4293
4304
  if (!o.success)
4294
4305
  return 400;
4295
4306
  const l = Y(t);
4296
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((m) => (console.error(
4307
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4297
4308
  "%cstorage",
4298
4309
  c.STORAGE,
4299
4310
  _.MESSAGES,
4300
4311
  t,
4301
- m.message
4312
+ g.message
4302
4313
  ), 400));
4303
4314
  };
4304
4315
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -4334,15 +4345,15 @@ class Kr {
4334
4345
  data: null,
4335
4346
  message: `Dashboard ${t.data.id} saved to storage`,
4336
4347
  success: !0
4337
- })).catch((m) => (console.error(
4348
+ })).catch((g) => (console.error(
4338
4349
  "%cstorage",
4339
4350
  c.STORAGE,
4340
4351
  _.WIDGET,
4341
4352
  t,
4342
- m.message
4353
+ g.message
4343
4354
  ), {
4344
4355
  data: null,
4345
- message: `Slide ${t.data.id} save error: ${m.message}`,
4356
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4346
4357
  success: !1
4347
4358
  }));
4348
4359
  };
@@ -4375,15 +4386,15 @@ class Kr {
4375
4386
  data: null,
4376
4387
  message: `Widget ${t.data.id} saved to storage`,
4377
4388
  success: !0
4378
- })).catch((m) => (console.error(
4389
+ })).catch((g) => (console.error(
4379
4390
  "%cstorage",
4380
4391
  c.STORAGE,
4381
4392
  _.WIDGET,
4382
4393
  t,
4383
- m.message
4394
+ g.message
4384
4395
  ), {
4385
4396
  data: null,
4386
- message: `Slide ${t.data.id} save error: ${m.message}`,
4397
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4387
4398
  success: !1
4388
4399
  }));
4389
4400
  };
@@ -4436,15 +4447,15 @@ class Kr {
4436
4447
  data: null,
4437
4448
  message: `Slide ${t.data.id} saved to storage`,
4438
4449
  success: !0
4439
- })).catch((m) => (console.error(
4450
+ })).catch((g) => (console.error(
4440
4451
  "%cstorage",
4441
4452
  c.STORAGE,
4442
4453
  _.SLIDE,
4443
4454
  t,
4444
- m.message
4455
+ g.message
4445
4456
  ), {
4446
4457
  data: null,
4447
- message: `Slide ${t.data.id} save error: ${m.message}`,
4458
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4448
4459
  success: !1
4449
4460
  }));
4450
4461
  };
@@ -4472,15 +4483,15 @@ class Kr {
4472
4483
  data: null,
4473
4484
  message: `Presentation ${t.data.id} saved to storage`,
4474
4485
  success: !0
4475
- })).catch((m) => (console.error(
4486
+ })).catch((g) => (console.error(
4476
4487
  "%cstorage",
4477
4488
  c.STORAGE,
4478
4489
  _.PRESENTATION,
4479
4490
  t,
4480
- m.message
4491
+ g.message
4481
4492
  ), {
4482
4493
  data: null,
4483
- message: `Presentation ${t.data.id} save error: ${m.message}`,
4494
+ message: `Presentation ${t.data.id} save error: ${g.message}`,
4484
4495
  success: !1
4485
4496
  }));
4486
4497
  };
@@ -4591,8 +4602,8 @@ class Br {
4591
4602
  const l = Y(t);
4592
4603
  try {
4593
4604
  return localStorage.setObject(l, o), 201;
4594
- } catch (m) {
4595
- return console.error("%cstorage", c.STORAGE, _.CLOUD, t, m), 400;
4605
+ } catch (g) {
4606
+ return console.error("%cstorage", c.STORAGE, _.CLOUD, t, g), 400;
4596
4607
  }
4597
4608
  };
4598
4609
  /**
@@ -4605,8 +4616,8 @@ class Br {
4605
4616
  const l = Y(t);
4606
4617
  try {
4607
4618
  return localStorage.setObject(l, o), 201;
4608
- } catch (m) {
4609
- return console.error("%cstorage", c.STORAGE, _.SERIES, t, m), 400;
4619
+ } catch (g) {
4620
+ return console.error("%cstorage", c.STORAGE, _.SERIES, t, g), 400;
4610
4621
  }
4611
4622
  };
4612
4623
  /**
@@ -4619,8 +4630,8 @@ class Br {
4619
4630
  const l = Y(t);
4620
4631
  try {
4621
4632
  return localStorage.setObject(l, o), 200;
4622
- } catch (m) {
4623
- return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, m), 400;
4633
+ } catch (g) {
4634
+ return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, g), 400;
4624
4635
  }
4625
4636
  };
4626
4637
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -4926,8 +4937,8 @@ class Lr {
4926
4937
  const l = Y(t);
4927
4938
  try {
4928
4939
  return sessionStorage.setObject(l, o), 201;
4929
- } catch (m) {
4930
- return console.error("%cstorage", c.STORAGE, _.CLOUD, t, m), 400;
4940
+ } catch (g) {
4941
+ return console.error("%cstorage", c.STORAGE, _.CLOUD, t, g), 400;
4931
4942
  }
4932
4943
  };
4933
4944
  /**
@@ -4940,8 +4951,8 @@ class Lr {
4940
4951
  const l = Y(t);
4941
4952
  try {
4942
4953
  return sessionStorage.setObject(l, o), 201;
4943
- } catch (m) {
4944
- return console.error("%cstorage", c.STORAGE, _.SERIES, t, m), 400;
4954
+ } catch (g) {
4955
+ return console.error("%cstorage", c.STORAGE, _.SERIES, t, g), 400;
4945
4956
  }
4946
4957
  };
4947
4958
  /**
@@ -4954,8 +4965,8 @@ class Lr {
4954
4965
  const l = Y(t);
4955
4966
  try {
4956
4967
  return sessionStorage.setObject(l, o), 200;
4957
- } catch (m) {
4958
- return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, m), 400;
4968
+ } catch (g) {
4969
+ return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, g), 400;
4959
4970
  }
4960
4971
  };
4961
4972
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -5261,8 +5272,8 @@ class Wr {
5261
5272
  const l = Y(t);
5262
5273
  try {
5263
5274
  return window.BuzzCasting.WidgetData[l] = o, 201;
5264
- } catch (m) {
5265
- return console.error("%cstorage", c.STORAGE, "set", t, m), 400;
5275
+ } catch (g) {
5276
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5266
5277
  }
5267
5278
  };
5268
5279
  /**
@@ -5275,8 +5286,8 @@ class Wr {
5275
5286
  const l = Y(t);
5276
5287
  try {
5277
5288
  return window.BuzzCasting.WidgetData[l] = o, 201;
5278
- } catch (m) {
5279
- return console.error("%cstorage", c.STORAGE, "set", t, m), 400;
5289
+ } catch (g) {
5290
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5280
5291
  }
5281
5292
  };
5282
5293
  /**
@@ -5289,8 +5300,8 @@ class Wr {
5289
5300
  const l = Y(t);
5290
5301
  try {
5291
5302
  return window.BuzzCasting.WidgetData[l] = o, 201;
5292
- } catch (m) {
5293
- return console.error("%cstorage", c.STORAGE, "set", t, m), 400;
5303
+ } catch (g) {
5304
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5294
5305
  }
5295
5306
  };
5296
5307
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -5578,21 +5589,21 @@ class Ja {
5578
5589
  o.push(this.api.get(l));
5579
5590
  }), o.forEach(async (l) => {
5580
5591
  await l.then(
5581
- async (m) => await this.processResponse(m)
5592
+ async (g) => await this.processResponse(g)
5582
5593
  );
5583
5594
  });
5584
5595
  };
5585
5596
  processResponse = async (t) => {
5586
5597
  let o, l = 400;
5587
5598
  if (t.success === !0) {
5588
- const m = this.subscribers[t.query.widget];
5589
- let w = "";
5599
+ const g = this.subscribers[t.query.widget];
5600
+ let v = "";
5590
5601
  switch (t.query.type) {
5591
5602
  case _.MESSAGES:
5592
- let C;
5593
- C = t.data.messages.filter(
5603
+ let k;
5604
+ k = t.data.messages.filter(
5594
5605
  (K) => K.id !== null
5595
- ), t.data.messages = C, w = t.data.messages.length > 0 ? Fn(t.data.messages[0].utc) : "none", m?.hash && m.hash === w ? (G(3, [
5606
+ ), t.data.messages = k, v = t.data.messages.length > 0 ? Fn(t.data.messages[0].utc) : "none", g?.hash && g.hash === v ? (G(3, [
5596
5607
  "%cload%c %cmessages%c %cno updates",
5597
5608
  c.OK,
5598
5609
  c.NONE,
@@ -5600,10 +5611,10 @@ class Ja {
5600
5611
  c.NONE,
5601
5612
  c.NO_UPDATES,
5602
5613
  t.query.widget
5603
- ]), G(4, ["%cmessages", c.MESSAGES, t]), l = 204) : (o = t, m.hash = w, l = await this.sm?.setMessages(t.query, t).then(async (K) => (K = 201, this.broadcastUpdate(K, t))));
5614
+ ]), G(4, ["%cmessages", c.MESSAGES, t]), l = 204) : (o = t, g.hash = v, l = await this.sm?.setMessages(t.query, t).then(async (K) => (K = 201, this.broadcastUpdate(K, t))));
5604
5615
  break;
5605
5616
  case _.CLOUD:
5606
- w = Fn(t.data.cloud), m?.hash && m.hash === w ? (G(3, [
5617
+ v = Fn(t.data.cloud), g?.hash && g.hash === v ? (G(3, [
5607
5618
  "%cload%c %ccloud%c %cno updates",
5608
5619
  c.OK,
5609
5620
  c.NONE,
@@ -5611,7 +5622,7 @@ class Ja {
5611
5622
  c.NONE,
5612
5623
  c.NO_UPDATES,
5613
5624
  t.query.widget
5614
- ]), G(4, ["%ccloud", c.CLOUD, t.query]), l = 204) : (m.hash = w, o = {
5625
+ ]), G(4, ["%ccloud", c.CLOUD, t.query]), l = 204) : (g.hash = v, o = {
5615
5626
  data: {
5616
5627
  cloud: t.data
5617
5628
  },
@@ -5621,7 +5632,7 @@ class Ja {
5621
5632
  }, l = await this.sm?.setCloud(t.query, o.data).then((K) => this.broadcastUpdate(K, t)));
5622
5633
  break;
5623
5634
  case _.SERIES:
5624
- w = Fn(t.data.series), m?.hash && m.hash === w ? (G(3, [
5635
+ v = Fn(t.data.series), g?.hash && g.hash === v ? (G(3, [
5625
5636
  "%cload%c %cseries%c %cno updates",
5626
5637
  c.OK,
5627
5638
  c.NONE,
@@ -5629,7 +5640,7 @@ class Ja {
5629
5640
  c.NONE,
5630
5641
  c.NO_UPDATES,
5631
5642
  t.query.widget
5632
- ]), G(4, ["%cseries", c.SERIES, t]), l = 204) : (m.hash = w, o = {
5643
+ ]), G(4, ["%cseries", c.SERIES, t]), l = 204) : (g.hash = v, o = {
5633
5644
  data: t.data,
5634
5645
  message: t.message,
5635
5646
  success: t.success,
@@ -5658,16 +5669,16 @@ class Ja {
5658
5669
  t.query
5659
5670
  ]), t.query.type) {
5660
5671
  case _.MESSAGES:
5661
- return await this.sm?.getMessages(t.query).then((m) => {
5662
- this.broadcastUpdate(201, m);
5672
+ return await this.sm?.getMessages(t.query).then((g) => {
5673
+ this.broadcastUpdate(201, g);
5663
5674
  });
5664
5675
  case _.CLOUD:
5665
- return await this.sm?.getCloud(t.query).then((m) => {
5666
- this.broadcastUpdate(201, m);
5676
+ return await this.sm?.getCloud(t.query).then((g) => {
5677
+ this.broadcastUpdate(201, g);
5667
5678
  });
5668
5679
  case _.SERIES:
5669
- return await this.sm?.getSeries(t.query).then((m) => {
5670
- this.broadcastUpdate(201, m);
5680
+ return await this.sm?.getSeries(t.query).then((g) => {
5681
+ this.broadcastUpdate(201, g);
5671
5682
  });
5672
5683
  }
5673
5684
  return l;
@@ -5797,7 +5808,7 @@ class Ja {
5797
5808
  getDashboard = async (t) => await this.sm?.getDashboard(t);
5798
5809
  getDashboards = async (t) => await this.sm?.getDashboards();
5799
5810
  setDashboard = async (t) => await this.sm?.setDashboard(t);
5800
- loadImages = async () => await this.api.loadImages();
5811
+ loadImages = async (t) => await this.api.loadImages(t);
5801
5812
  storeImage = async (t) => await this.api.storeImage(t);
5802
5813
  deleteImage = async (t) => await this.api.deleteImage(t);
5803
5814
  getImages = async (t) => await this.sm?.getImages(t);
@@ -5900,10 +5911,10 @@ class Za {
5900
5911
  */
5901
5912
  constructor(t, o, l) {
5902
5913
  this.element = t, this.callbacks = o, l = typeof l < "u" ? l : "buzzcasting-app";
5903
- let m;
5904
- m = { ...t.dataset }, delete m.hmr, m.presentation = t.closest(l)?.getAttribute("presentation") ?? `${l} not found`, this.query = m, Da(t);
5905
- const w = window.BuzzCasting.getOptions();
5906
- this.storageReader = new Ba(w), this.broadcastChannel = new BroadcastChannel(m.presentation), this.broadcastListener();
5914
+ let g;
5915
+ g = { ...t.dataset }, delete g.hmr, g.presentation = window.BuzzCasting.getOptions()?.presentation ?? `${l} not found`, this.query = g, Da(t);
5916
+ const v = window.BuzzCasting.getOptions();
5917
+ this.storageReader = new Ba(v), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
5907
5918
  }
5908
5919
  addCallbackListener(t) {
5909
5920
  this.callbacks.push(t);
@@ -5920,8 +5931,8 @@ class Za {
5920
5931
  case X.WIDGET_UPDATE:
5921
5932
  try {
5922
5933
  if (l.dashboard === t.dashboard && l.widget === t.widget) {
5923
- const m = await this.getData();
5924
- m?.success && (G(4, [
5934
+ const g = await this.getData();
5935
+ g?.success && (G(4, [
5925
5936
  "%cset%c %cbroadcast%c %cwidget",
5926
5937
  c.OK,
5927
5938
  c.NONE,
@@ -5929,8 +5940,8 @@ class Za {
5929
5940
  c.NONE,
5930
5941
  c.WIDGET,
5931
5942
  this.query
5932
- ]), this.callbacks.forEach(async (w) => {
5933
- w(m);
5943
+ ]), this.callbacks.forEach(async (v) => {
5944
+ v(g);
5934
5945
  }));
5935
5946
  }
5936
5947
  } catch {