buzzcasting-storage 3.11.6 → 3.12.1

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, p;
20
+ let o, l, g;
21
21
  if (t.length === 0)
22
22
  return h;
23
- for (o = 0, p = t.length; o < p; 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(p, E) {
30
- return jr(p, t[E], E, 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 p = 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(p, "null");
36
+ return Oe(g, "null");
37
37
  if (t === void 0)
38
- return Oe(p, "undefined");
38
+ return Oe(g, "undefined");
39
39
  if (typeof t == "object" || typeof t == "function") {
40
40
  if (l.includes(t))
41
- return Oe(p, `[Circular]${o}`);
41
+ return Oe(g, `[Circular]${o}`);
42
42
  l.push(t);
43
- const E = Na(p, t, l);
43
+ const v = Na(g, t, l);
44
44
  if (!("valueOf" in t) || typeof t.valueOf != "function")
45
- return E;
45
+ return v;
46
46
  try {
47
- return Oe(E, String(t.valueOf()));
48
- } catch (C) {
49
- return Oe(E, `[valueOf exception]${C.stack || C.message}`);
47
+ return Oe(v, String(t.valueOf()));
48
+ } catch (T) {
49
+ return Oe(v, `[valueOf exception]${T.stack || T.message}`);
50
50
  }
51
51
  }
52
- return Oe(p, 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, p, E, C, K;
120
+ let l, g, v, T, K;
121
121
  switch (h.moderation) {
122
122
  case en.BEFORE:
123
- l = /* @__PURE__ */ new Date(), p = (o = h.beforeTime) == null ? void 0 : o.split(":"), E = Number.parseInt(p ? p[0] : "00"), C = Number.parseInt(p ? p[1] : "00"), K = Number.parseInt(p ? p[2] : "00"), t.before = l.setHours(E, 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"), T = Number.parseInt(g ? g[1] : "00"), K = Number.parseInt(g ? g[2] : "00"), t.before = l.setHours(v, T, 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.5";
136
+ const xa = "3.12.0";
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(), p = Object.assign({}, t);
175
- delete p.type, delete p.hash, delete p.order, p.topics = `${p.dashboard}-${p.widget}`, delete p.presentation;
176
- const E = Object.keys(p).length > 0 ? `?${new URLSearchParams(p).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 T = "";
178
178
  switch (t.type) {
179
179
  case _.MESSAGES:
180
- C = c.MESSAGES;
180
+ T = c.MESSAGES;
181
181
  break;
182
182
  case _.SERIES:
183
- C = c.SERIES;
183
+ T = c.SERIES;
184
184
  break;
185
185
  case _.CLOUD:
186
- C = c.CLOUD;
186
+ T = 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
+ T,
196
196
  t.widget
197
- ]), G(4, [t.type, p]), await fetch(
198
- [this.url, "api", o, t.type].join("/") + E,
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(), p = "?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("/") + p,
217
+ [this.url, "api", o, "messages", t.id].join("/") + g,
218
218
  { ...l, method: "put" }
219
- ).then((E) => {
220
- if (!E.ok)
221
- throw new Error(E.statusText);
222
- return E;
223
- }).then((E) => E.json()).catch((E) => ({ succes: !1, message: E, 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(), p = new URLSearchParams(), E = t.labels || [];
227
- for (const [C, K] of E.entries())
228
- p.append(`custom_filters[${C}]`, K);
226
+ const { version: o } = this.options, l = this.formHeaders(), g = new URLSearchParams(), v = t.labels || [];
227
+ for (const [T, K] of v.entries())
228
+ g.append(`custom_filters[${T}]`, 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
- E
236
+ v
237
237
  ), await fetch(
238
238
  [this.url, "api", o, t.type, t.widget].join("/"),
239
- { ...l, body: p, 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((T) => {
241
+ if (!T.ok)
242
+ throw new Error(T.statusText);
243
+ return T;
244
+ }).then((T) => T.json()).catch((T) => ({ succes: !1, message: T, data: [] }));
245
245
  }
246
246
  async loadSlide(t) {
247
- const { version: o } = this.options, l = this.headers(), p = Object.assign({}, t);
248
- return delete p.type, delete p.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 (E) => {
252
- if (!E.ok)
253
- throw new Error(`${E.status}`);
254
- return E;
255
- }).then((E) => E.json()).then((E) => (E.query = t, E.data && E.data.json && (E.data.json = JSON.parse(E.data.json)), E)).catch((E) => ({ success: !1, message: `${E}`, 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 p = 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: p, method: "put" }
280
- ).then((E) => {
281
- if (!E.ok)
282
- throw new Error(E.statusText);
283
- return E;
284
- }).then((E) => E.json()).catch((E) => ({ succes: !1, message: E, 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 (p) => {
300
- if (!p.ok)
301
- throw new Error(`${p.status}`);
302
- return p;
303
- }).then((p) => p.json()).then((p) => (p.query = t, p)).catch((p) => ({ success: !1, message: `${p}`, 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 p = 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: p, method: "put" }
319
- ).then((E) => {
320
- if (!E.ok)
321
- throw new Error(E.statusText);
322
- return E;
323
- }).then((E) => E.json()).catch((E) => ({ succes: !1, message: E, 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 (p) => {
337
- if (!p.ok)
338
- throw new Error(`${p.status}`);
339
- return p;
340
- }).then((p) => p.json()).then((p) => p).catch((p) => ({ success: !1, message: `${p}`, 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 p = 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: p, method: "put" }
355
- ).then((E) => {
356
- if (!E.ok)
357
- throw new Error(E.statusText);
358
- return E;
359
- }).then((E) => E.json()).catch((E) => ({ succes: !1, message: E, 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,64 +403,77 @@ class ka {
403
403
  ...l,
404
404
  method: "get"
405
405
  }
406
- ).then(async (p) => {
407
- if (!p.ok)
408
- throw new Error(`${p.status}`);
409
- return p;
410
- }).then((p) => p.json()).then((p) => ({
411
- data: { dashboards: p },
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((p) => ({ success: !1, message: `${p}`, 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].join(
420
+ "/"
421
+ )}?folder=${t}`,
422
+ {
423
+ ...l,
424
+ method: "get"
425
+ }
426
+ ).then(async (g) => {
427
+ if (!g.ok)
428
+ throw new Error(`${g.status}`);
429
+ return g;
430
+ }).then((g) => g.json()).then((g) => ({
431
+ data: { images: g.data },
427
432
  message: "Images loaded via api",
428
433
  success: !0
429
- })).catch((l) => ({ success: !1, message: `${l}`, data: null }));
434
+ })).catch((g) => ({ success: !1, message: `${g}`, data: null }));
430
435
  }
431
- async storeImage(t) {
432
- const { version: o } = this.options, l = this.fileHeaders(), p = t;
436
+ async storeImage(t, o) {
437
+ const { version: l } = this.options, g = this.fileHeaders(), v = o;
433
438
  return console.info(
434
439
  "%capi%c %cstoreImage",
435
440
  c.API,
436
441
  c.NONE,
437
442
  c.WIDGET,
438
- t.get("name")
443
+ o.get("name")
439
444
  ), await fetch(
440
- [this.url, "api", o, _.IMAGES].join("/"),
441
- { ...l, body: p, method: "post" }
442
- ).then((E) => {
443
- if (!E.ok)
444
- throw new Error(E.statusText);
445
- return E;
446
- }).then((E) => E.json()).catch((E) => ({ succes: !1, message: E, data: [] }));
445
+ `${[this.url, "api", l, _.IMAGES].join(
446
+ "/"
447
+ )}?folder=${t}`,
448
+ {
449
+ ...g,
450
+ body: v,
451
+ method: "post"
452
+ }
453
+ ).then((T) => {
454
+ if (!T.ok)
455
+ throw new Error(T.statusText);
456
+ return T;
457
+ }).then((T) => T.json()).catch((T) => ({ succes: !1, message: T, data: [] }));
447
458
  }
448
- async deleteImage(t) {
449
- const { version: o } = this.options, l = this.formHeaders();
459
+ async deleteImage(t, o) {
460
+ const { version: l } = this.options, g = this.formHeaders();
450
461
  return console.info(
451
462
  "%capi%c %cdeleteImage",
452
463
  c.API,
453
464
  c.NONE,
454
465
  c.WIDGET,
455
- t
466
+ o
456
467
  ), await fetch(
457
- [this.url, "api", o, _.IMAGES, t].join("/"),
458
- { ...l, method: "delete" }
459
- ).then((p) => {
460
- if (!p.ok)
461
- throw new Error(p.statusText);
462
- return p;
463
- }).then((p) => p.json()).catch((p) => ({ succes: !1, message: p, data: [] }));
468
+ `${[this.url, "api", l, _.IMAGES, o].join(
469
+ "/"
470
+ )}?folder=${t}`,
471
+ { ...g, method: "delete" }
472
+ ).then((v) => {
473
+ if (!v.ok)
474
+ throw new Error(v.statusText);
475
+ return v;
476
+ }).then((v) => v.json()).catch((v) => ({ succes: !1, message: v, data: [] }));
464
477
  }
465
478
  }
466
479
  var Ca = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -485,23 +498,23 @@ function Ma() {
485
498
  return e;
486
499
  }).apply(this, arguments);
487
500
  };
488
- function p(e, n, r) {
501
+ function g(e, n, r) {
489
502
  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
503
  return e.concat(a || Array.prototype.slice.call(n));
491
504
  }
492
- var E = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, C = Object.keys, K = Array.isArray;
505
+ var v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, T = Object.keys, K = Array.isArray;
493
506
  function te(e, n) {
494
- return typeof n != "object" || C(n).forEach(function(r) {
507
+ return typeof n != "object" || T(n).forEach(function(r) {
495
508
  e[r] = n[r];
496
509
  }), e;
497
510
  }
498
- typeof Promise > "u" || E.Promise || (E.Promise = Promise);
511
+ typeof Promise > "u" || v.Promise || (v.Promise = Promise);
499
512
  var ge = Object.getPrototypeOf, Ce = {}.hasOwnProperty;
500
513
  function ie(e, n) {
501
514
  return Ce.call(e, n);
502
515
  }
503
516
  function be(e, n) {
504
- typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ? C : Reflect.ownKeys)(n).forEach(function(r) {
517
+ typeof n == "function" && (n = n(ge(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(n).forEach(function(r) {
505
518
  Ae(e, r, n[r]);
506
519
  });
507
520
  }
@@ -525,7 +538,7 @@ function Ma() {
525
538
  if (!e) throw new Error("Assertion Failed");
526
539
  }
527
540
  function Yn(e) {
528
- E.setImmediate ? setImmediate(e) : setTimeout(e, 0);
541
+ v.setImmediate ? setImmediate(e) : setTimeout(e, 0);
529
542
  }
530
543
  function ve(e, n) {
531
544
  if (typeof n == "string" && ie(e, n)) return e[n];
@@ -566,9 +579,9 @@ function Ma() {
566
579
  return n + e + "Array";
567
580
  });
568
581
  }))).filter(function(e) {
569
- return E[e];
582
+ return v[e];
570
583
  }), Jn = new Set(Ge.map(function(e) {
571
- return E[e];
584
+ return v[e];
572
585
  })), it = null;
573
586
  function $e(e) {
574
587
  return it = /* @__PURE__ */ new WeakMap(), e = function n(r) {
@@ -744,8 +757,8 @@ function Ma() {
744
757
  if (a._state === null) {
745
758
  if (i === a) throw new TypeError("A promise cannot be resolved with itself.");
746
759
  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);
760
+ i && typeof i.then == "function" ? r(a, function(d, p) {
761
+ i instanceof j ? i._then(d, p) : i.then(d, p);
749
762
  }) : (a._state = !0, a._value = i, rr(a)), u && qe();
750
763
  }
751
764
  }, fn.bind(null, a));
@@ -757,10 +770,10 @@ function Ma() {
757
770
  var dn = { get: function() {
758
771
  var e = B, n = Ct;
759
772
  function r(a, s) {
760
- var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), g = new j(function(y, w) {
773
+ var i = this, u = !e.global && (e !== B || n !== Ct), d = u && !Ie(), p = new j(function(y, w) {
761
774
  hn(i, new nr(sr(a, e, u, d), sr(s, e, u, d), y, w, e));
762
775
  });
763
- return this._consoleTask && (g._consoleTask = this._consoleTask), g;
776
+ return this._consoleTask && (p._consoleTask = this._consoleTask), p;
764
777
  }
765
778
  return r.prototype = ut, r;
766
779
  }, set: function(e) {
@@ -918,9 +931,9 @@ function Ma() {
918
931
  return De(function(s, i) {
919
932
  var u = B;
920
933
  u.unhandleds = [], u.onunhandled = i, u.finalize = Me(function() {
921
- var d, g = this;
934
+ var d, p = this;
922
935
  d = function() {
923
- g.unhandleds.length === 0 ? s() : i(g.unhandleds[0]);
936
+ p.unhandleds.length === 0 ? s() : i(p.unhandleds[0]);
924
937
  }, Rt.push(function y() {
925
938
  d(), Rt.splice(Rt.indexOf(y), 1);
926
939
  }), ++Le, dt(function() {
@@ -986,11 +999,11 @@ function Ma() {
986
999
  var r, a = B;
987
1000
  (n ? !ne.echoes || kt++ && e === B : !kt || --kt && e === B) || queueMicrotask(n ? function(s) {
988
1001
  ++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(E, "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))));
1002
+ }.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
1003
  }
991
1004
  function ar() {
992
- var e = E.Promise;
993
- return cn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(E, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
1005
+ var e = v.Promise;
1006
+ 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
1007
  }
995
1008
  function We(e, n, r, a, s) {
996
1009
  var i = B;
@@ -1043,12 +1056,12 @@ function Ma() {
1043
1056
  return n < e ? 1 : e < n ? -1 : 0;
1044
1057
  case "binary":
1045
1058
  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;
1059
+ 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
1060
  return u === d ? 0 : u < d ? -1 : 1;
1048
1061
  }(lr(e), lr(n));
1049
1062
  case "Array":
1050
1063
  return function(s, i) {
1051
- for (var u = s.length, d = i.length, g = u < d ? u : d, y = 0; y < g; ++y) {
1064
+ for (var u = s.length, d = i.length, p = u < d ? u : d, y = 0; y < p; ++y) {
1052
1065
  var w = H(s[y], i[y]);
1053
1066
  if (w !== 0) return w;
1054
1067
  }
@@ -1074,28 +1087,28 @@ function Ma() {
1074
1087
  }
1075
1088
  var d = Ze();
1076
1089
  try {
1077
- var g = a && a.db._novip === this.db._novip ? a === B.trans ? a._promise(e, u, r) : De(function() {
1090
+ var p = a && a.db._novip === this.db._novip ? a === B.trans ? a._promise(e, u, r) : De(function() {
1078
1091
  return a._promise(e, u, r);
1079
1092
  }, { trans: a, transless: B.transless || B }) : function y(w, f, O, m) {
1080
1093
  if (w.idbdb && (w._state.openComplete || B.letThrough || w._vip)) {
1081
- var v = w._createTransaction(f, O, w._dbSchema);
1094
+ var E = w._createTransaction(f, O, w._dbSchema);
1082
1095
  try {
1083
- v.create(), w._state.PR1398_maxLoop = 3;
1096
+ E.create(), w._state.PR1398_maxLoop = 3;
1084
1097
  } catch (S) {
1085
1098
  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() {
1086
1099
  return y(w, f, O, m);
1087
1100
  })) : q(S);
1088
1101
  }
1089
- return v._promise(f, function(S, b) {
1102
+ return E._promise(f, function(S, b) {
1090
1103
  return De(function() {
1091
- return B.trans = v, m(S, b, v);
1104
+ return B.trans = E, m(S, b, E);
1092
1105
  });
1093
1106
  }).then(function(S) {
1094
1107
  if (f === "readwrite") try {
1095
- v.idbtrans.commit();
1108
+ E.idbtrans.commit();
1096
1109
  } catch {
1097
1110
  }
1098
- return f === "readonly" ? S : v._completion.then(function() {
1111
+ return f === "readonly" ? S : E._completion.then(function() {
1099
1112
  return S;
1100
1113
  });
1101
1114
  });
@@ -1109,9 +1122,9 @@ function Ma() {
1109
1122
  return y(w, f, O, m);
1110
1123
  });
1111
1124
  }(this.db, e, [this.name], u);
1112
- return i && (g._consoleTask = i, g = g.catch(function(y) {
1125
+ return i && (p._consoleTask = i, p = p.catch(function(y) {
1113
1126
  return console.trace(y), q(y);
1114
- })), g;
1127
+ })), p;
1115
1128
  } finally {
1116
1129
  d && qe();
1117
1130
  }
@@ -1125,38 +1138,38 @@ function Ma() {
1125
1138
  }, J.prototype.where = function(e) {
1126
1139
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1127
1140
  if (K(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1128
- var n = C(e);
1141
+ var n = T(e);
1129
1142
  if (n.length === 1) return this.where(n[0]).equals(e[n[0]]);
1130
1143
  var r = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
1131
1144
  if (d.compound && n.every(function(y) {
1132
1145
  return 0 <= d.keyPath.indexOf(y);
1133
1146
  })) {
1134
- for (var g = 0; g < n.length; ++g) if (n.indexOf(d.keyPath[g]) === -1) return !1;
1147
+ for (var p = 0; p < n.length; ++p) if (n.indexOf(d.keyPath[p]) === -1) return !1;
1135
1148
  return !0;
1136
1149
  }
1137
1150
  return !1;
1138
- }).sort(function(d, g) {
1139
- return d.keyPath.length - g.keyPath.length;
1151
+ }).sort(function(d, p) {
1152
+ return d.keyPath.length - p.keyPath.length;
1140
1153
  })[0];
1141
1154
  if (r && this.db._maxKey !== Fe) {
1142
1155
  var i = r.keyPath.slice(0, n.length);
1143
- return this.where(i).equals(i.map(function(g) {
1144
- return e[g];
1156
+ return this.where(i).equals(i.map(function(p) {
1157
+ return e[p];
1145
1158
  }));
1146
1159
  }
1147
1160
  !r && pe && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(n.join("+"), "]"));
1148
1161
  var a = this.schema.idxByName;
1149
- function s(d, g) {
1150
- return H(d, g) === 0;
1162
+ function s(d, p) {
1163
+ return H(d, p) === 0;
1151
1164
  }
1152
- var u = n.reduce(function(f, g) {
1153
- var y = f[0], w = f[1], f = a[g], O = e[g];
1165
+ var u = n.reduce(function(f, p) {
1166
+ var y = f[0], w = f[1], f = a[p], O = e[p];
1154
1167
  return [y || f, y || !f ? Ue(w, f && f.multi ? function(m) {
1155
- return m = ve(m, g), K(m) && m.some(function(v) {
1156
- return s(O, v);
1168
+ return m = ve(m, p), K(m) && m.some(function(E) {
1169
+ return s(O, E);
1157
1170
  });
1158
1171
  } : function(m) {
1159
- return s(O, ve(m, g));
1172
+ return s(O, ve(m, p));
1160
1173
  }) : w];
1161
1174
  }, [null, null]), i = u[0], u = u[1];
1162
1175
  return i ? this.where(i.name).equals(e[i.keyPath]).filter(u) : r ? this.filter(u) : this.where(n).equals("");
@@ -1183,25 +1196,25 @@ function Ma() {
1183
1196
  function s() {
1184
1197
  return n !== null && n.apply(this, arguments) || this;
1185
1198
  }
1186
- (this.schema.mappedClass = e).prototype instanceof cr && (function(g, y) {
1199
+ (this.schema.mappedClass = e).prototype instanceof cr && (function(p, y) {
1187
1200
  if (typeof y != "function" && y !== null) throw new TypeError("Class extends value " + String(y) + " is not a constructor or null");
1188
1201
  function w() {
1189
- this.constructor = g;
1202
+ this.constructor = p;
1190
1203
  }
1191
- o(g, y), g.prototype = y === null ? Object.create(y) : (w.prototype = y.prototype, new w());
1204
+ o(p, y), p.prototype = y === null ? Object.create(y) : (w.prototype = y.prototype, new w());
1192
1205
  }(s, n = e), Object.defineProperty(s.prototype, "db", { get: function() {
1193
1206
  return r;
1194
1207
  }, enumerable: !1, configurable: !0 }), s.prototype.table = function() {
1195
1208
  return a;
1196
1209
  }, 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);
1210
+ for (var i = /* @__PURE__ */ new Set(), u = e.prototype; u; u = ge(u)) Object.getOwnPropertyNames(u).forEach(function(p) {
1211
+ return i.add(p);
1199
1212
  });
1200
- function d(g) {
1201
- if (!g) return g;
1213
+ function d(p) {
1214
+ if (!p) return p;
1202
1215
  var y, w = Object.create(e.prototype);
1203
- for (y in g) if (!i.has(y)) try {
1204
- w[y] = g[y];
1216
+ for (y in p) if (!i.has(y)) try {
1217
+ w[y] = p[y];
1205
1218
  } catch {
1206
1219
  }
1207
1220
  return w;
@@ -1268,11 +1281,11 @@ function Ma() {
1268
1281
  var y = a.schema.primKey, d = y.auto, y = y.keyPath;
1269
1282
  if (y && s) throw new L.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
1270
1283
  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, m = v.lastResult, v = v.failures;
1284
+ var p = e.length, y = y && d ? e.map(Mt(y)) : e;
1285
+ return a.core.mutate({ trans: u, type: "add", keys: s, values: y, wantResults: i }).then(function(E) {
1286
+ var f = E.numFailures, O = E.results, m = E.lastResult, E = E.failures;
1274
1287
  if (f === 0) return i ? O : m;
1275
- throw new Je("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(g, " operations failed"), v);
1288
+ throw new Je("".concat(a.name, ".bulkAdd(): ").concat(f, " of ").concat(p, " operations failed"), E);
1276
1289
  });
1277
1290
  });
1278
1291
  }, J.prototype.bulkPut = function(e, n, r) {
@@ -1281,11 +1294,11 @@ function Ma() {
1281
1294
  var y = a.schema.primKey, d = y.auto, y = y.keyPath;
1282
1295
  if (y && s) throw new L.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
1283
1296
  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, m = v.lastResult, v = v.failures;
1297
+ var p = e.length, y = y && d ? e.map(Mt(y)) : e;
1298
+ return a.core.mutate({ trans: u, type: "put", keys: s, values: y, wantResults: i }).then(function(E) {
1299
+ var f = E.numFailures, O = E.results, m = E.lastResult, E = E.failures;
1287
1300
  if (f === 0) return i ? O : m;
1288
- throw new Je("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(g, " operations failed"), v);
1301
+ throw new Je("".concat(a.name, ".bulkPut(): ").concat(f, " of ").concat(p, " operations failed"), E);
1289
1302
  });
1290
1303
  });
1291
1304
  }, J.prototype.bulkUpdate = function(e) {
@@ -1296,25 +1309,25 @@ function Ma() {
1296
1309
  }), i = [];
1297
1310
  return this._trans("readwrite", function(u) {
1298
1311
  return r.getMany({ trans: u, keys: a, cache: "clone" }).then(function(d) {
1299
- var g = [], y = [];
1312
+ var p = [], y = [];
1300
1313
  e.forEach(function(f, O) {
1301
- var m = f.key, v = f.changes, S = d[O];
1314
+ var m = f.key, E = f.changes, S = d[O];
1302
1315
  if (S) {
1303
- for (var b = 0, A = Object.keys(v); b < A.length; b++) {
1304
- var P = A[b], D = v[P];
1316
+ for (var b = 0, A = Object.keys(E); b < A.length; b++) {
1317
+ var P = A[b], D = E[P];
1305
1318
  if (P === n.schema.primKey.keyPath) {
1306
1319
  if (H(D, m) !== 0) throw new L.Constraint("Cannot update primary key in bulkUpdate()");
1307
1320
  } else ue(S, P, D);
1308
1321
  }
1309
- i.push(O), g.push(m), y.push(S);
1322
+ i.push(O), p.push(m), y.push(S);
1310
1323
  }
1311
1324
  });
1312
- var w = g.length;
1313
- return r.mutate({ trans: u, type: "put", keys: g, values: y, updates: { keys: a, changeSpecs: s } }).then(function(f) {
1325
+ var w = p.length;
1326
+ return r.mutate({ trans: u, type: "put", keys: p, values: y, updates: { keys: a, changeSpecs: s } }).then(function(f) {
1314
1327
  var O = f.numFailures, m = f.failures;
1315
1328
  if (O === 0) return w;
1316
- for (var v = 0, S = Object.keys(m); v < S.length; v++) {
1317
- var b, A = S[v], P = i[Number(A)];
1329
+ for (var E = 0, S = Object.keys(m); E < S.length; E++) {
1330
+ var b, A = S[E], P = i[Number(A)];
1318
1331
  P != null && (b = m[A], delete m[A], m[P] = b);
1319
1332
  }
1320
1333
  throw new Je("".concat(n.name, ".bulkUpdate(): ").concat(O, " of ").concat(w, " operations failed"), m);
@@ -1336,7 +1349,7 @@ function Ma() {
1336
1349
  function ht(e) {
1337
1350
  function n(u, d) {
1338
1351
  if (d) {
1339
- for (var g = arguments.length, y = new Array(g - 1); --g; ) y[g - 1] = arguments[g];
1352
+ for (var p = arguments.length, y = new Array(p - 1); --p; ) y[p - 1] = arguments[p];
1340
1353
  return r[u].subscribe.apply(null, y), e;
1341
1354
  }
1342
1355
  if (typeof u == "string") return r[u];
@@ -1345,26 +1358,26 @@ function Ma() {
1345
1358
  n.addEventType = i;
1346
1359
  for (var a = 1, s = arguments.length; a < s; ++a) i(arguments[a]);
1347
1360
  return n;
1348
- function i(u, d, g) {
1361
+ function i(u, d, p) {
1349
1362
  if (typeof u != "object") {
1350
1363
  var y;
1351
1364
  d = d || ea;
1352
- var w = { subscribers: [], fire: g = g || Q, subscribe: function(f) {
1365
+ var w = { subscribers: [], fire: p = p || Q, subscribe: function(f) {
1353
1366
  w.subscribers.indexOf(f) === -1 && (w.subscribers.push(f), w.fire = d(w.fire, f));
1354
1367
  }, unsubscribe: function(f) {
1355
1368
  w.subscribers = w.subscribers.filter(function(O) {
1356
1369
  return O !== f;
1357
- }), w.fire = w.subscribers.reduce(d, g);
1370
+ }), w.fire = w.subscribers.reduce(d, p);
1358
1371
  } };
1359
1372
  return r[u] = n[u] = w;
1360
1373
  }
1361
- C(y = u).forEach(function(f) {
1374
+ T(y = u).forEach(function(f) {
1362
1375
  var O = y[f];
1363
1376
  if (K(O)) i(f, y[f][0], y[f][1]);
1364
1377
  else {
1365
1378
  if (O !== "asap") throw new L.InvalidArgument("Invalid event config");
1366
1379
  var m = i(f, ct, function() {
1367
- for (var v = arguments.length, S = new Array(v); v--; ) S[v] = arguments[v];
1380
+ for (var E = arguments.length, S = new Array(E); E--; ) S[E] = arguments[E];
1368
1381
  m.subscribers.forEach(function(b) {
1369
1382
  Yn(function() {
1370
1383
  b.apply(null, S);
@@ -1403,13 +1416,13 @@ function Ma() {
1403
1416
  function Kt(e, n, r, a) {
1404
1417
  var s = e.replayFilter ? Ue(e.filter, e.replayFilter()) : e.filter;
1405
1418
  if (e.or) {
1406
- var i = {}, u = function(d, g, y) {
1419
+ var i = {}, u = function(d, p, y) {
1407
1420
  var w, f;
1408
- s && !s(g, y, function(O) {
1409
- return g.stop(O);
1421
+ s && !s(p, y, function(O) {
1422
+ return p.stop(O);
1410
1423
  }, function(O) {
1411
- return g.fail(O);
1412
- }) || ((f = "" + (w = g.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(w)), ie(i, f) || (i[f] = !0, n(d, g, y)));
1424
+ return p.fail(O);
1425
+ }) || ((f = "" + (w = p.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(w)), ie(i, f) || (i[f] = !0, n(d, p, y)));
1413
1426
  };
1414
1427
  return Promise.all([e.or._iterate(u, r), hr(fr(e, a, r), e.algorithm, u, !e.keysOnly && e.valueMapper)]);
1415
1428
  }
@@ -1440,7 +1453,7 @@ function Ma() {
1440
1453
  var n = this["@@propmod"];
1441
1454
  if (n.add !== void 0) {
1442
1455
  var r = n.add;
1443
- if (K(r)) return p(p([], K(e) ? e : [], !0), r).sort();
1456
+ if (K(r)) return g(g([], K(e) ? e : [], !0), r).sort();
1444
1457
  if (typeof r == "number") return (Number(e) || 0) + r;
1445
1458
  if (typeof r == "bigint") try {
1446
1459
  return BigInt(e) + r;
@@ -1504,15 +1517,15 @@ function Ma() {
1504
1517
  }).then(e);
1505
1518
  }, V.prototype.sortBy = function(e, n) {
1506
1519
  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];
1520
+ function i(p, y) {
1521
+ return y ? i(p[r[y]], y - 1) : p[a];
1509
1522
  }
1510
1523
  var u = this._ctx.dir === "next" ? 1 : -1;
1511
- function d(g, y) {
1512
- return H(i(g, s), i(y, s)) * u;
1524
+ function d(p, y) {
1525
+ return H(i(p, s), i(y, s)) * u;
1513
1526
  }
1514
- return this.toArray(function(g) {
1515
- return g.sort(d);
1527
+ return this.toArray(function(p) {
1528
+ return p.sort(d);
1516
1529
  }).then(n);
1517
1530
  }, V.prototype.toArray = function(e) {
1518
1531
  var n = this;
@@ -1632,37 +1645,37 @@ function Ma() {
1632
1645
  var n = this, r = this._ctx;
1633
1646
  return this._write(function(a) {
1634
1647
  var s, i, u;
1635
- u = typeof e == "function" ? e : (s = C(e), i = s.length, function(b) {
1648
+ u = typeof e == "function" ? e : (s = T(e), i = s.length, function(b) {
1636
1649
  for (var A = !1, P = 0; P < i; ++P) {
1637
1650
  var D = s[P], I = e[D], N = ve(b, D);
1638
1651
  I instanceof pt ? (ue(b, D, I.execute(N)), A = !0) : N !== I && (ue(b, D, I), A = !0);
1639
1652
  }
1640
1653
  return A;
1641
1654
  });
1642
- var d = r.table.core, f = d.schema.primaryKey, g = f.outbound, y = f.extractKey, w = 200, f = n.db._options.modifyChunkSize;
1655
+ var d = r.table.core, f = d.schema.primaryKey, p = f.outbound, y = f.extractKey, w = 200, f = n.db._options.modifyChunkSize;
1643
1656
  f && (w = typeof f == "object" ? f[d.name] || f["*"] || 200 : f);
1644
1657
  function O(b, D) {
1645
1658
  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
- m.push(P[k]);
1659
+ E += b - D;
1660
+ for (var I = 0, N = T(P); I < N.length; I++) {
1661
+ var C = N[I];
1662
+ m.push(P[C]);
1650
1663
  }
1651
1664
  }
1652
- var m = [], v = 0, S = [];
1665
+ var m = [], E = 0, S = [];
1653
1666
  return n.clone().primaryKeys().then(function(b) {
1654
1667
  function A(D) {
1655
1668
  var I = Math.min(w, b.length - D);
1656
1669
  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) {
1658
- 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)));
1670
+ for (var C = [], R = [], x = p ? [] : null, $ = [], k = 0; k < I; ++k) {
1671
+ var M = N[k], F = { value: $e(M), primKey: b[D + k] };
1672
+ u.call(F, F.value, F) !== !1 && (F.value == null ? $.push(b[D + k]) : p || H(y(M), y(F.value)) === 0 ? (R.push(F.value), p && x.push(b[D + k])) : ($.push(b[D + k]), C.push(F.value)));
1660
1673
  }
1661
- return Promise.resolve(0 < k.length && d.mutate({ trans: a, type: "add", values: k }).then(function(U) {
1674
+ return Promise.resolve(0 < C.length && d.mutate({ trans: a, type: "add", values: C }).then(function(U) {
1662
1675
  for (var z in U.failures) $.splice(parseInt(z), 1);
1663
- O(k.length, U);
1676
+ O(C.length, U);
1664
1677
  })).then(function() {
1665
- 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) {
1678
+ return (0 < R.length || P && typeof e == "object") && d.mutate({ trans: a, type: "put", keys: x, values: R, criteria: P, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < D }).then(function(U) {
1666
1679
  return O(R.length, U);
1667
1680
  });
1668
1681
  }).then(function() {
@@ -1676,7 +1689,7 @@ function Ma() {
1676
1689
  }
1677
1690
  var P = nt(r) && r.limit === 1 / 0 && (typeof e != "function" || e === En) && { index: r.index, range: r.range };
1678
1691
  return A(0).then(function() {
1679
- if (0 < m.length) throw new Pt("Error modifying one or more objects", m, v, S);
1692
+ if (0 < m.length) throw new Pt("Error modifying one or more objects", m, E, S);
1680
1693
  return b.length;
1681
1694
  });
1682
1695
  });
@@ -1688,8 +1701,8 @@ function Ma() {
1688
1701
  return e.table.core.count({ trans: r, query: { index: a, range: s } }).then(function(i) {
1689
1702
  return e.table.core.mutate({ trans: r, type: "deleteRange", range: s }).then(function(u) {
1690
1703
  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];
1704
+ if (u.lastResult, u.results, u = u.numFailures, u) throw new Pt("Could not delete some values", Object.keys(d).map(function(p) {
1705
+ return d[p];
1693
1706
  }), i - u);
1694
1707
  return i - u;
1695
1708
  });
@@ -1716,20 +1729,20 @@ function Ma() {
1716
1729
  }).limit(0);
1717
1730
  }
1718
1731
  function Bt(e, n, r, a) {
1719
- var s, i, u, d, g, y, w, f = r.length;
1720
- if (!r.every(function(v) {
1721
- return typeof v == "string";
1732
+ var s, i, u, d, p, y, w, f = r.length;
1733
+ if (!r.every(function(E) {
1734
+ return typeof E == "string";
1722
1735
  })) return le(e, or);
1723
- function O(v) {
1724
- s = v === "next" ? function(b) {
1736
+ function O(E) {
1737
+ s = E === "next" ? function(b) {
1725
1738
  return b.toUpperCase();
1726
1739
  } : function(b) {
1727
1740
  return b.toLowerCase();
1728
- }, i = v === "next" ? function(b) {
1741
+ }, i = E === "next" ? function(b) {
1729
1742
  return b.toLowerCase();
1730
1743
  } : function(b) {
1731
1744
  return b.toUpperCase();
1732
- }, u = v === "next" ? ia : ca;
1745
+ }, u = E === "next" ? ia : ca;
1733
1746
  var S = r.map(function(b) {
1734
1747
  return { lower: i(b), upper: s(b) };
1735
1748
  }).sort(function(b, A) {
@@ -1737,34 +1750,34 @@ function Ma() {
1737
1750
  });
1738
1751
  d = S.map(function(b) {
1739
1752
  return b.upper;
1740
- }), g = S.map(function(b) {
1753
+ }), p = S.map(function(b) {
1741
1754
  return b.lower;
1742
- }), w = (y = v) === "next" ? "" : a;
1755
+ }), w = (y = E) === "next" ? "" : a;
1743
1756
  }
1744
1757
  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);
1758
+ return Re(d[0], p[f - 1] + a);
1759
+ }), e._ondirectionchange = function(E) {
1760
+ O(E);
1748
1761
  };
1749
1762
  var m = 0;
1750
- return e._addAlgorithm(function(v, S, b) {
1751
- var A = v.key;
1763
+ return e._addAlgorithm(function(E, S, b) {
1764
+ var A = E.key;
1752
1765
  if (typeof A != "string") return !1;
1753
1766
  var P = i(A);
1754
- if (n(P, g, m)) return !0;
1767
+ if (n(P, p, m)) return !0;
1755
1768
  for (var D = null, I = m; 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) {
1769
+ var N = function(C, R, x, $, k, M) {
1770
+ for (var F = Math.min(C.length, $.length), U = -1, z = 0; z < F; ++z) {
1758
1771
  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);
1772
+ if (de !== $[z]) return k(C[z], x[z]) < 0 ? C.substr(0, z) + x[z] + x.substr(z + 1) : k(C[z], $[z]) < 0 ? C.substr(0, z) + $[z] + x.substr(z + 1) : 0 <= U ? C.substr(0, U) + R[U] + x.substr(U + 1) : null;
1773
+ k(C[z], de) < 0 && (U = z);
1761
1774
  }
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);
1775
+ return F < $.length && M === "next" ? C + x.substr(C.length) : F < C.length && M === "prev" ? C.substr(0, x.length) : U < 0 ? null : C.substr(0, U) + $[U] + x.substr(U + 1);
1776
+ }(A, P, d[I], p[I], u, y);
1764
1777
  N === null && D === null ? m = I + 1 : (D === null || 0 < u(D, N)) && (D = N);
1765
1778
  }
1766
1779
  return S(D !== null ? function() {
1767
- v.continue(D + w);
1780
+ E.continue(D + w);
1768
1781
  } : b), !1;
1769
1782
  }), e;
1770
1783
  }
@@ -1843,8 +1856,8 @@ function Ma() {
1843
1856
  };
1844
1857
  var s = 0;
1845
1858
  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() {
1859
+ for (var p = i.key; 0 < r(p, n[s]); ) if (++s === n.length) return u(d), !1;
1860
+ return r(p, n[s]) === 0 || (u(function() {
1848
1861
  i.continue(n[s]);
1849
1862
  }), !1);
1850
1863
  }), a;
@@ -1868,16 +1881,16 @@ function Ma() {
1868
1881
  if (!A.every(function(P) {
1869
1882
  return P[0] !== void 0 && P[1] !== void 0 && s(P[0], P[1]) <= 0;
1870
1883
  })) 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, w, f = s;
1884
+ var p = !n || n.includeLowers !== !1, y = n && n.includeUppers === !0, w, f = s;
1872
1885
  function O(P, D) {
1873
1886
  return f(P[0], D[0]);
1874
1887
  }
1875
1888
  try {
1876
1889
  (w = A.reduce(function(P, D) {
1877
1890
  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]);
1891
+ var C = P[I];
1892
+ if (a(D[0], C[1]) < 0 && 0 < a(D[1], C[0])) {
1893
+ C[0] = u(C[0], D[0]), C[1] = d(C[1], D[1]);
1881
1894
  break;
1882
1895
  }
1883
1896
  }
@@ -1886,22 +1899,22 @@ function Ma() {
1886
1899
  } catch {
1887
1900
  return le(this, we);
1888
1901
  }
1889
- var m = 0, v = y ? function(P) {
1902
+ var m = 0, E = y ? function(P) {
1890
1903
  return 0 < s(P, w[m][1]);
1891
1904
  } : function(P) {
1892
1905
  return 0 <= s(P, w[m][1]);
1893
- }, S = g ? function(P) {
1906
+ }, S = p ? function(P) {
1894
1907
  return 0 < i(P, w[m][0]);
1895
1908
  } : function(P) {
1896
1909
  return 0 <= i(P, w[m][0]);
1897
- }, b = v, A = new this.Collection(this, function() {
1898
- return Re(w[0][0], w[w.length - 1][1], !g, !y);
1910
+ }, b = E, A = new this.Collection(this, function() {
1911
+ return Re(w[0][0], w[w.length - 1][1], !p, !y);
1899
1912
  });
1900
1913
  return A._ondirectionchange = function(P) {
1901
- f = P === "next" ? (b = v, s) : (b = S, i), w.sort(O);
1914
+ f = P === "next" ? (b = E, s) : (b = S, i), w.sort(O);
1902
1915
  }, A._addAlgorithm(function(P, D, I) {
1903
- for (var N, k = P.key; b(k); ) if (++m === w.length) return D(I), !1;
1904
- return !v(N = k) && !S(N) || (r._cmp(k, w[m][1]) === 0 || r._cmp(k, w[m][0]) === 0 || D(function() {
1916
+ for (var N, C = P.key; b(C); ) if (++m === w.length) return D(I), !1;
1917
+ return !E(N = C) && !S(N) || (r._cmp(C, w[m][1]) === 0 || r._cmp(C, w[m][0]) === 0 || D(function() {
1905
1918
  f === s ? P.continue(w[m][0]) : P.continue(w[m][1]);
1906
1919
  }), !1);
1907
1920
  }), A;
@@ -1968,8 +1981,8 @@ function Ma() {
1968
1981
  if (r) return De(function() {
1969
1982
  var i = new j(function(u, d) {
1970
1983
  a._lock();
1971
- var g = n(u, d, a);
1972
- g && g.then && g.then(u, d);
1984
+ var p = n(u, d, a);
1985
+ p && p.then && p.then(u, d);
1973
1986
  });
1974
1987
  return i.finally(function() {
1975
1988
  return a._unlock();
@@ -2054,22 +2067,22 @@ function Ma() {
2054
2067
  function vt(e) {
2055
2068
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
2056
2069
  }
2057
- function da(e, n, g) {
2070
+ function da(e, n, p) {
2058
2071
  function a(b) {
2059
2072
  if (b.type === 3) return null;
2060
2073
  if (b.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
2061
- var m = b.lower, v = b.upper, S = b.lowerOpen, b = b.upperOpen;
2062
- return m === void 0 ? v === void 0 ? null : n.upperBound(v, !!b) : v === void 0 ? n.lowerBound(m, !!S) : n.bound(m, v, !!S, !!b);
2074
+ var m = b.lower, E = b.upper, S = b.lowerOpen, b = b.upperOpen;
2075
+ 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
2076
  }
2064
2077
  function s(O) {
2065
- var m, v = O.name;
2066
- return { name: v, schema: O, mutate: function(S) {
2078
+ var m, E = O.name;
2079
+ return { name: E, schema: O, mutate: function(S) {
2067
2080
  var b = S.trans, A = S.type, P = S.keys, D = S.values, I = S.range;
2068
- return new Promise(function(N, k) {
2081
+ return new Promise(function(N, C) {
2069
2082
  N = Z(N);
2070
- var R = b.objectStore(v), T = R.keyPath == null, $ = A === "put" || A === "add";
2083
+ var R = b.objectStore(E), x = R.keyPath == null, $ = A === "put" || A === "add";
2071
2084
  if (!$ && A !== "delete" && A !== "deleteRange") throw new Error("Invalid operation type: " + A);
2072
- var x, M = (P || D || { length: 1 }).length;
2085
+ var k, M = (P || D || { length: 1 }).length;
2073
2086
  if (P && D && P.length !== D.length) throw new Error("Given keys array must have same length as given values array.");
2074
2087
  if (M === 0) return N({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2075
2088
  function F(ce) {
@@ -2078,11 +2091,11 @@ function Ma() {
2078
2091
  var U = [], z = [], de = 0;
2079
2092
  if (A === "deleteRange") {
2080
2093
  if (I.type === 4) return N({ numFailures: de, failures: z, results: [], lastResult: void 0 });
2081
- I.type === 3 ? U.push(x = R.clear()) : U.push(x = R.delete(a(I)));
2094
+ I.type === 3 ? U.push(k = R.clear()) : U.push(k = R.delete(a(I)));
2082
2095
  } else {
2083
- var T = $ ? T ? [D, P] : [D, null] : [P, null], W = T[0], se = T[1];
2084
- if ($) for (var oe = 0; oe < M; ++oe) U.push(x = se && se[oe] !== void 0 ? R[A](W[oe], se[oe]) : R[A](W[oe])), x.onerror = F;
2085
- else for (oe = 0; oe < M; ++oe) U.push(x = R[A](W[oe])), x.onerror = F;
2096
+ var x = $ ? x ? [D, P] : [D, null] : [P, null], W = x[0], se = x[1];
2097
+ if ($) for (var oe = 0; oe < M; ++oe) U.push(k = se && se[oe] !== void 0 ? R[A](W[oe], se[oe]) : R[A](W[oe])), k.onerror = F;
2098
+ else for (oe = 0; oe < M; ++oe) U.push(k = R[A](W[oe])), k.onerror = F;
2086
2099
  }
2087
2100
  function qt(ce) {
2088
2101
  ce = ce.target.result, U.forEach(function(Ve, Wn) {
@@ -2091,24 +2104,24 @@ function Ma() {
2091
2104
  return Ve.result;
2092
2105
  }), lastResult: ce });
2093
2106
  }
2094
- x.onerror = function(ce) {
2107
+ k.onerror = function(ce) {
2095
2108
  F(ce), qt(ce);
2096
- }, x.onsuccess = qt;
2109
+ }, k.onsuccess = qt;
2097
2110
  });
2098
2111
  }, getMany: function(S) {
2099
2112
  var b = S.trans, A = S.keys;
2100
2113
  return new Promise(function(P, D) {
2101
2114
  P = Z(P);
2102
- for (var I, N = b.objectStore(v), k = A.length, R = new Array(k), T = 0, $ = 0, x = function(U) {
2103
- 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);
2105
- T === 0 && P(R);
2115
+ for (var I, N = b.objectStore(E), C = A.length, R = new Array(C), x = 0, $ = 0, k = function(U) {
2116
+ U = U.target, R[U._pos] = U.result, ++$ === x && P(R);
2117
+ }, M = me(D), F = 0; F < C; ++F) A[F] != null && ((I = N.get(A[F]))._pos = F, I.onsuccess = k, I.onerror = M, ++x);
2118
+ x === 0 && P(R);
2106
2119
  });
2107
2120
  }, get: function(S) {
2108
2121
  var b = S.trans, A = S.key;
2109
2122
  return new Promise(function(P, D) {
2110
2123
  P = Z(P);
2111
- var I = b.objectStore(v).get(A);
2124
+ var I = b.objectStore(E).get(A);
2112
2125
  I.onsuccess = function(N) {
2113
2126
  return P(N.target.result);
2114
2127
  }, I.onerror = me(D);
@@ -2116,27 +2129,27 @@ function Ma() {
2116
2129
  }, query: (m = y, function(S) {
2117
2130
  return new Promise(function(b, A) {
2118
2131
  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
- m ? ((R = N ? $.getAll(x, R) : $.getAllKeys(x, R)).onsuccess = function(M) {
2132
+ var P, D, I, x = S.trans, N = S.values, C = S.limit, k = S.query, R = C === 1 / 0 ? void 0 : C, $ = k.index, k = k.range, x = x.objectStore(E), $ = $.isPrimaryKey ? x : x.index($.name), k = a(k);
2133
+ if (C === 0) return b({ result: [] });
2134
+ m ? ((R = N ? $.getAll(k, R) : $.getAllKeys(k, R)).onsuccess = function(M) {
2122
2135
  return b({ result: M.target.result });
2123
- }, R.onerror = me(A)) : (P = 0, D = !N && "openKeyCursor" in $ ? $.openKeyCursor(x) : $.openCursor(x), I = [], D.onsuccess = function(M) {
2136
+ }, R.onerror = me(A)) : (P = 0, D = !N && "openKeyCursor" in $ ? $.openKeyCursor(k) : $.openCursor(k), I = [], D.onsuccess = function(M) {
2124
2137
  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 });
2138
+ return F ? (I.push(N ? F.value : F.primaryKey), ++P === C ? b({ result: I }) : void F.continue()) : b({ result: I });
2126
2139
  }, D.onerror = me(A));
2127
2140
  });
2128
2141
  }), openCursor: function(S) {
2129
2142
  var b = S.trans, A = S.values, P = S.query, D = S.reverse, I = S.unique;
2130
- return new Promise(function(N, k) {
2143
+ return new Promise(function(N, C) {
2131
2144
  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) {
2134
- var F, U, z, de, W = x.result;
2145
+ var $ = P.index, R = P.range, x = b.objectStore(E), x = $.isPrimaryKey ? x : x.index($.name), $ = D ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", k = !A && "openKeyCursor" in x ? x.openKeyCursor(a(R), $) : x.openCursor(a(R), $);
2146
+ k.onerror = me(C), k.onsuccess = Z(function(M) {
2147
+ var F, U, z, de, W = k.result;
2135
2148
  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
2149
  throw new Error("Cursor not stopped");
2137
2150
  }, W.trans = b, W.stop = W.continue = W.continuePrimaryKey = W.advance = function() {
2138
2151
  throw new Error("Cursor not started");
2139
- }, W.fail = Z(k), W.next = function() {
2152
+ }, W.fail = Z(C), W.next = function() {
2140
2153
  var se = this, oe = 1;
2141
2154
  return this.start(function() {
2142
2155
  return oe-- ? se.continue() : se.stop();
@@ -2145,7 +2158,7 @@ function Ma() {
2145
2158
  });
2146
2159
  }, W.start = function(se) {
2147
2160
  function oe() {
2148
- if (x.result) try {
2161
+ if (k.result) try {
2149
2162
  se();
2150
2163
  } catch (ce) {
2151
2164
  W.fail(ce);
@@ -2155,30 +2168,30 @@ function Ma() {
2155
2168
  }, W.stop();
2156
2169
  }
2157
2170
  var qt = new Promise(function(ce, Ve) {
2158
- ce = Z(ce), x.onerror = me(Ve), W.fail = Ve, W.stop = function(Wn) {
2171
+ ce = Z(ce), k.onerror = me(Ve), W.fail = Ve, W.stop = function(Wn) {
2159
2172
  W.stop = W.continue = W.continuePrimaryKey = W.advance = de, ce(Wn);
2160
2173
  };
2161
2174
  });
2162
- return x.onsuccess = Z(function(ce) {
2163
- x.onsuccess = oe, oe();
2175
+ return k.onsuccess = Z(function(ce) {
2176
+ k.onsuccess = oe, oe();
2164
2177
  }), W.continue = F, W.continuePrimaryKey = U, W.advance = z, oe(), qt;
2165
2178
  }, N(W)) : N(null);
2166
- }, k);
2179
+ }, C);
2167
2180
  });
2168
2181
  }, count: function(S) {
2169
2182
  var b = S.query, A = S.trans, P = b.index, D = b.range;
2170
2183
  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();
2172
- R.onsuccess = Z(function(T) {
2173
- return I(T.target.result);
2184
+ var C = A.objectStore(E), R = P.isPrimaryKey ? C : C.index(P.name), C = a(D), R = C ? R.count(C) : R.count();
2185
+ R.onsuccess = Z(function(x) {
2186
+ return I(x.target.result);
2174
2187
  }), R.onerror = me(N);
2175
2188
  });
2176
2189
  } };
2177
2190
  }
2178
- var i, u, d, w = (u = g, d = br((i = e).objectStoreNames), { schema: { name: i.name, tables: d.map(function(O) {
2191
+ var i, u, d, w = (u = p, d = br((i = e).objectStoreNames), { schema: { name: i.name, tables: d.map(function(O) {
2179
2192
  return u.objectStore(O);
2180
2193
  }).map(function(O) {
2181
- var m = O.keyPath, b = O.autoIncrement, v = K(m), S = {}, b = { name: O.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m == null, compound: v, keyPath: m, autoIncrement: b, unique: !0, extractKey: _n(m) }, indexes: br(O.indexNames).map(function(A) {
2194
+ 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
2195
  return O.index(A);
2183
2196
  }).map(function(I) {
2184
2197
  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) };
@@ -2187,13 +2200,13 @@ function Ma() {
2187
2200
  return S[vt(A)];
2188
2201
  } };
2189
2202
  return S[":id"] = b.primaryKey, m != null && (S[vt(m)] = 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 = w.schema, y = w.hasGetAll, w = g.tables.map(s), f = {};
2203
+ }) }, 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 = {};
2191
2204
  return w.forEach(function(O) {
2192
2205
  return f[O.name] = O;
2193
2206
  }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(O) {
2194
2207
  if (!f[O]) throw new Error("Table '".concat(O, "' not found"));
2195
2208
  return f[O];
2196
- }, MIN_KEY: -1 / 0, MAX_KEY: bt(n), schema: g };
2209
+ }, MIN_KEY: -1 / 0, MAX_KEY: bt(n), schema: p };
2197
2210
  }
2198
2211
  function fa(e, n, r, a) {
2199
2212
  var s = r.IDBKeyRange;
@@ -2214,13 +2227,13 @@ function Ma() {
2214
2227
  r.forEach(function(s) {
2215
2228
  var i = a[s];
2216
2229
  n.forEach(function(u) {
2217
- var d = function g(y, w) {
2218
- return Fr(y, w) || (y = ge(y)) && g(y, w);
2230
+ var d = function p(y, w) {
2231
+ return Fr(y, w) || (y = ge(y)) && p(y, w);
2219
2232
  }(u, s);
2220
2233
  (!d || "value" in d && d.value === void 0) && (u === e.Transaction.prototype || u instanceof e.Transaction ? Ae(u, s, { get: function() {
2221
2234
  return this.table(s);
2222
- }, set: function(g) {
2223
- _t(this, s, { value: g, writable: !0, configurable: !0, enumerable: !0 });
2235
+ }, set: function(p) {
2236
+ _t(this, s, { value: p, writable: !0, configurable: !0, enumerable: !0 });
2224
2237
  } }) : u[s] = new e.Table(s, i));
2225
2238
  });
2226
2239
  });
@@ -2240,48 +2253,48 @@ function Ma() {
2240
2253
  i.create(r), i._completion.catch(a);
2241
2254
  var u = i._reject.bind(i), d = B.transless || B;
2242
2255
  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(w) {
2256
+ 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) {
2244
2257
  return w ?? y;
2245
2258
  }) : j.resolve(y)).then(function(w) {
2246
- return O = w, m = i, v = r, S = [], w = (f = e)._versions, b = f._dbSchema = Ut(0, f.idbdb, v), (w = w.filter(function(A) {
2259
+ 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
2260
  return A._cfg.version >= O;
2248
2261
  })).length !== 0 ? (w.forEach(function(A) {
2249
2262
  S.push(function() {
2250
2263
  var P = b, D = A._cfg.dbschema;
2251
- zt(f, P, v), zt(f, D, v), b = f._dbSchema = D;
2264
+ zt(f, P, E), zt(f, D, E), b = f._dbSchema = D;
2252
2265
  var I = Pn(P, D);
2253
2266
  I.add.forEach(function($) {
2254
- Dn(v, $[0], $[1].primKey, $[1].indexes);
2267
+ Dn(E, $[0], $[1].primKey, $[1].indexes);
2255
2268
  }), I.change.forEach(function($) {
2256
2269
  if ($.recreate) throw new L.Upgrade("Not yet support for changing primary key");
2257
- var x = v.objectStore($.name);
2270
+ var k = E.objectStore($.name);
2258
2271
  $.add.forEach(function(M) {
2259
- return Ft(x, M);
2272
+ return Ft(k, M);
2260
2273
  }), $.change.forEach(function(M) {
2261
- x.deleteIndex(M.name), Ft(x, M);
2274
+ k.deleteIndex(M.name), Ft(k, M);
2262
2275
  }), $.del.forEach(function(M) {
2263
- return x.deleteIndex(M);
2276
+ return k.deleteIndex(M);
2264
2277
  });
2265
2278
  });
2266
2279
  var N = A._cfg.contentUpgrade;
2267
2280
  if (N && A._cfg.version > O) {
2268
- Lt(f, v), m._memoizedTables = {};
2269
- var k = Qn(D);
2281
+ Lt(f, E), m._memoizedTables = {};
2282
+ var C = Qn(D);
2270
2283
  I.del.forEach(function($) {
2271
- k[$] = P[$];
2272
- }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], C(k), k), m.schema = k;
2273
- var R, T = an(N);
2274
- return T && et(), I = j.follow(function() {
2284
+ C[$] = P[$];
2285
+ }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], T(C), C), m.schema = C;
2286
+ var R, x = an(N);
2287
+ return x && et(), I = j.follow(function() {
2275
2288
  var $;
2276
- (R = N(m)) && T && ($ = Ie.bind(null, null), R.then($, $));
2289
+ (R = N(m)) && x && ($ = Ie.bind(null, null), R.then($, $));
2277
2290
  }), R && typeof R.then == "function" ? j.resolve(R) : I.then(function() {
2278
2291
  return R;
2279
2292
  });
2280
2293
  }
2281
2294
  }), S.push(function(P) {
2282
2295
  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);
2296
+ D = N, I = P, [].slice.call(I.db.objectStoreNames).forEach(function(C) {
2297
+ return D[C] == null && I.db.deleteObjectStore(C);
2285
2298
  }), An(f, [f.Transaction.prototype]), Wt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), m.schema = f._dbSchema;
2286
2299
  }), S.push(function(P) {
2287
2300
  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) {
@@ -2291,15 +2304,15 @@ function Ma() {
2291
2304
  }), function A() {
2292
2305
  return S.length ? j.resolve(S.shift()(m.idbtrans)).then(A) : j.resolve();
2293
2306
  }().then(function() {
2294
- vr(b, v);
2307
+ vr(b, E);
2295
2308
  })) : j.resolve();
2296
- var f, O, m, v, S, b;
2297
- }).catch(u)) : (C(s).forEach(function(w) {
2309
+ var f, O, m, E, S, b;
2310
+ }).catch(u)) : (T(s).forEach(function(w) {
2298
2311
  Dn(r, w, s[w].primKey, s[w].indexes);
2299
2312
  }), Lt(e, r), void j.follow(function() {
2300
2313
  return e.on.populate.fire(i);
2301
2314
  }).catch(u));
2302
- var g, y;
2315
+ var p, y;
2303
2316
  });
2304
2317
  }
2305
2318
  function pa(e, n) {
@@ -2310,8 +2323,8 @@ function Ma() {
2310
2323
  var i = function(u) {
2311
2324
  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
2325
  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);
2326
+ u.add.forEach(function(p) {
2327
+ pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(u.name, ".").concat(p.src)), Ft(d, p);
2315
2328
  });
2316
2329
  }(s[a]);
2317
2330
  if (typeof i == "object") return i.value;
@@ -2326,10 +2339,10 @@ function Ma() {
2326
2339
  var u = { name: r, def: i, recreate: !1, del: [], add: [], change: [] };
2327
2340
  if ("" + (s.primKey.keyPath || "") != "" + (i.primKey.keyPath || "") || s.primKey.auto !== i.primKey.auto) u.recreate = !0, a.change.push(u);
2328
2341
  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 w = d[y], f = g[y];
2342
+ var d = s.idxByName, p = i.idxByName, y = void 0;
2343
+ for (y in d) p[y] || u.del.push(y);
2344
+ for (y in p) {
2345
+ var w = d[y], f = p[y];
2333
2346
  w ? w.src !== f.src && u.change.push(f) : u.add.push(f);
2334
2347
  }
2335
2348
  (0 < u.del.length || 0 < u.add.length || 0 < u.change.length) && a.change.push(u);
@@ -2345,7 +2358,7 @@ function Ma() {
2345
2358
  }), s;
2346
2359
  }
2347
2360
  function vr(e, n) {
2348
- C(e).forEach(function(r) {
2361
+ T(e).forEach(function(r) {
2349
2362
  n.db.objectStoreNames.contains(r) || (pe && console.debug("Dexie: Creating missing table", r), Dn(n, r, e[r].primKey, e[r].indexes));
2350
2363
  });
2351
2364
  }
@@ -2355,8 +2368,8 @@ function Ma() {
2355
2368
  function Ut(e, n, r) {
2356
2369
  var a = {};
2357
2370
  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 w = i.index(i.indexNames[g]), y = w.keyPath, w = Sn(w.name, y, !!w.unique, !!w.multiEntry, !1, y && typeof y != "string", !1);
2371
+ 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) {
2372
+ 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);
2360
2373
  d.push(w);
2361
2374
  }
2362
2375
  a[s] = On(s, u, d);
@@ -2367,11 +2380,11 @@ function Ma() {
2367
2380
  var i = a[s], u = r.objectStore(i);
2368
2381
  e._hasGetAll = "getAll" in u;
2369
2382
  for (var d = 0; d < u.indexNames.length; ++d) {
2370
- var g = u.indexNames[d], y = u.index(g).keyPath, w = typeof y == "string" ? y : "[" + At(y).join("+") + "]";
2371
- !n[i] || (y = n[i].idxByName[w]) && (y.name = g, delete n[i].idxByName[w], n[i].idxByName[g] = y);
2383
+ var p = u.indexNames[d], y = u.index(p).keyPath, w = typeof y == "string" ? y : "[" + At(y).join("+") + "]";
2384
+ !n[i] || (y = n[i].idxByName[w]) && (y.name = p, delete n[i].idxByName[w], n[i].idxByName[p] = y);
2372
2385
  }
2373
2386
  }
2374
- typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && E.WorkerGlobalScope && E instanceof E.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2387
+ 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
2388
  }
2376
2389
  function Er(e) {
2377
2390
  return e.split(",").map(function(n, r) {
@@ -2380,7 +2393,7 @@ function Ma() {
2380
2393
  });
2381
2394
  }
2382
2395
  var ma = (Ht.prototype._parseStoresSpec = function(e, n) {
2383
- C(e).forEach(function(r) {
2396
+ T(e).forEach(function(r) {
2384
2397
  if (e[r] !== null) {
2385
2398
  var a = Er(e[r]), s = a.shift();
2386
2399
  if (s.unique = !0, s.multi) throw new L.Schema("Primary key cannot be multi-valued");
@@ -2396,7 +2409,7 @@ function Ma() {
2396
2409
  var r = n._versions, a = {}, s = {};
2397
2410
  return r.forEach(function(i) {
2398
2411
  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;
2412
+ }), n._dbSchema = s, An(n, [n._allTables, n, n.Transaction.prototype]), Wt(n, [n._allTables, n, n.Transaction.prototype, this._cfg.tables], T(s), s), n._storeNames = T(s), this;
2400
2413
  }, Ht.prototype.upgrade = function(e) {
2401
2414
  return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || Q, e), this;
2402
2415
  }, Ht);
@@ -2436,9 +2449,9 @@ function Ma() {
2436
2449
  }
2437
2450
  }
2438
2451
  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);
2452
+ Tn(n) || function r(a, p) {
2453
+ var i = p.from, u = p.to, d = p.l, p = p.r;
2454
+ Et(a, i, u), d && r(a, d), p && r(a, p);
2442
2455
  }(e, n);
2443
2456
  }
2444
2457
  function wr(e, n) {
@@ -2479,7 +2492,7 @@ function Ma() {
2479
2492
  return (n ? r ? Math.max(n.d, r.d) : n.d : r ? r.d : 0) + 1;
2480
2493
  }
2481
2494
  function Yt(e, n) {
2482
- return C(n).forEach(function(r) {
2495
+ return T(n).forEach(function(r) {
2483
2496
  e[r] ? wt(e[r], n[r]) : e[r] = function a(s) {
2484
2497
  var i, u, d = {};
2485
2498
  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 +2534,23 @@ function Ma() {
2521
2534
  var u, d = /^idb\:\/\/(.*)\/(.*)\//.exec(i);
2522
2535
  d && (i = d[1], d = d[2], (u = ze["idb://".concat(i, "/").concat(d)]) && _r(u, e, r, n));
2523
2536
  }
2524
- r.forEach(function(g) {
2525
- return g();
2537
+ r.forEach(function(p) {
2538
+ return p();
2526
2539
  });
2527
2540
  }
2528
2541
  function _r(e, n, r, a) {
2529
2542
  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 = [], w = 0, f = d[1]; w < f.length; w++) {
2543
+ for (var d = u[i], p = d[0], y = [], w = 0, f = d[1]; w < f.length; w++) {
2531
2544
  var O = f[w];
2532
2545
  xn(n, O.obsSet) ? O.subscribers.forEach(function(b) {
2533
2546
  return r.add(b);
2534
2547
  }) : a && y.push(O);
2535
2548
  }
2536
- a && s.push([g, y]);
2549
+ a && s.push([p, y]);
2537
2550
  }
2538
- if (a) for (var m = 0, v = s; m < v.length; m++) {
2539
- var S = v[m], g = S[0], y = S[1];
2540
- e.queries.query[g] = y;
2551
+ if (a) for (var m = 0, E = s; m < E.length; m++) {
2552
+ var S = E[m], p = S[0], y = S[1];
2553
+ e.queries.query[p] = y;
2541
2554
  }
2542
2555
  }
2543
2556
  function ya(e) {
@@ -2553,30 +2566,30 @@ function Ma() {
2553
2566
  function d() {
2554
2567
  return new j(function(O, m) {
2555
2568
  if (u(), !r) throw new L.MissingAPI();
2556
- var v = e.name, S = n.autoSchema || !s ? r.open(v) : r.open(v, s);
2569
+ var E = e.name, S = n.autoSchema || !s ? r.open(E) : r.open(E, s);
2557
2570
  if (!S) throw new L.MissingAPI();
2558
2571
  S.onerror = me(m), S.onblocked = Z(e._fireOnBlocked), S.onupgradeneeded = Z(function(b) {
2559
2572
  var A;
2560
- w = S.transaction, n.autoSchema && !e._options.allowEmptyDB ? (S.onerror = mt, w.abort(), S.result.close(), (A = r.deleteDatabase(v)).onsuccess = A.onerror = Z(function() {
2561
- m(new L.NoSuchDatabase("Database ".concat(v, " doesnt exist")));
2573
+ 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() {
2574
+ m(new L.NoSuchDatabase("Database ".concat(E, " doesnt exist")));
2562
2575
  })) : (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));
2563
2576
  }, m), S.onsuccess = Z(function() {
2564
2577
  w = 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);
2569
- 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
- return T.add.length || T.change.length;
2578
+ var b, A, P, D, I, N = e.idbdb = S.result, C = At(N.objectStoreNames);
2579
+ if (0 < C.length) try {
2580
+ var R = N.transaction((D = C).length === 1 ? D[0] : D, "readonly");
2581
+ 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], T(P), P);
2582
+ else if (zt(e, e._dbSchema, R), ((I = Pn(Ut(0, (I = e).idbdb, R), I._dbSchema)).add.length || I.change.some(function(x) {
2583
+ return x.add.length || x.change.length;
2571
2584
  })) && !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());
2572
2585
  Lt(e, R);
2573
2586
  } catch {
2574
2587
  }
2575
- tt.push(e), N.onversionchange = Z(function(T) {
2576
- n.vcFired = !0, e.on("versionchange").fire(T);
2577
- }), N.onclose = Z(function(T) {
2578
- 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();
2588
+ tt.push(e), N.onversionchange = Z(function(x) {
2589
+ n.vcFired = !0, e.on("versionchange").fire(x);
2590
+ }), N.onclose = Z(function(x) {
2591
+ e.on("close").fire(x);
2592
+ }), 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();
2580
2593
  }, m);
2581
2594
  }).catch(function(O) {
2582
2595
  switch (O?.name) {
@@ -2589,14 +2602,14 @@ function Ma() {
2589
2602
  return j.reject(O);
2590
2603
  });
2591
2604
  }
2592
- var g, y = n.dbReadyResolve, w = null, f = !1;
2605
+ var p, y = n.dbReadyResolve, w = null, f = !1;
2593
2606
  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
2607
  function m() {
2595
2608
  return indexedDB.databases().finally(O);
2596
2609
  }
2597
- g = setInterval(m, 100), m();
2610
+ p = setInterval(m, 100), m();
2598
2611
  }).finally(function() {
2599
- return clearInterval(g);
2612
+ return clearInterval(p);
2600
2613
  }) : Promise.resolve()).then(d)]).then(function() {
2601
2614
  return u(), n.onReadyBeingFired = [], j.resolve(Rn(function() {
2602
2615
  return e.on.ready.fire(e.vip);
@@ -2622,8 +2635,8 @@ function Ma() {
2622
2635
  }).then(function() {
2623
2636
  var O;
2624
2637
  return f && (O = {}, e.tables.forEach(function(m) {
2625
- m.schema.indexes.forEach(function(v) {
2626
- v.name && (O["idb://".concat(e.name, "/").concat(m.name, "/").concat(v.name)] = new ae(-1 / 0, [[[]]]));
2638
+ m.schema.indexes.forEach(function(E) {
2639
+ E.name && (O["idb://".concat(e.name, "/").concat(m.name, "/").concat(E.name)] = new ae(-1 / 0, [[[]]]));
2627
2640
  }), O["idb://".concat(e.name, "/").concat(m.name, "/")] = O["idb://".concat(e.name, "/").concat(m.name, "/:dels")] = new ae(-1 / 0, [[[]]]);
2628
2641
  }), Te(yt).fire(O), $n(O, !0)), e;
2629
2642
  });
@@ -2636,9 +2649,9 @@ function Ma() {
2636
2649
  return e.throw(i);
2637
2650
  });
2638
2651
  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);
2652
+ return function(p) {
2653
+ var d = i(p), p = d.value;
2654
+ return d.done ? p : p && typeof p.then == "function" ? p.then(r, a) : K(p) ? Promise.all(p).then(r, a) : r(p);
2642
2655
  };
2643
2656
  }
2644
2657
  return s(n)();
@@ -2651,14 +2664,14 @@ function Ma() {
2651
2664
  return l(l({}, e), { table: function(n) {
2652
2665
  var r = e.table(n), a = r.schema, s = {}, i = [];
2653
2666
  function u(f, O, m) {
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({}, m), { name: A ? "".concat(v, "(virtual-from:").concat(m.name, ")") : m.name, lowLevelIndex: m, isVirtual: A, keyTail: O, keyLength: b, extractKey: _n(f), unique: !A && m.unique });
2667
+ 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 });
2655
2668
  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
2669
  return P.keyTail - D.keyTail;
2657
2670
  }), A;
2658
2671
  }
2659
2672
  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];
2673
+ for (var d = 0, p = a.indexes; d < p.length; d++) {
2674
+ var y = p[d];
2662
2675
  u(y.keyPath, 0, y);
2663
2676
  }
2664
2677
  function w(f) {
@@ -2672,8 +2685,8 @@ function Ma() {
2672
2685
  }, query: function(f) {
2673
2686
  return r.query(w(f));
2674
2687
  }, openCursor: function(f) {
2675
- var O = f.query.index, m = O.keyTail, v = O.isVirtual, S = O.keyLength;
2676
- return v ? r.openCursor(w(f)).then(function(A) {
2688
+ var O = f.query.index, m = O.keyTail, E = O.isVirtual, S = O.keyLength;
2689
+ return E ? r.openCursor(w(f)).then(function(A) {
2677
2690
  return A && b(A);
2678
2691
  }) : r.openCursor(f);
2679
2692
  function b(A) {
@@ -2694,10 +2707,10 @@ function Ma() {
2694
2707
  } });
2695
2708
  } };
2696
2709
  function Mn(e, n, r, a) {
2697
- return r = r || {}, a = a || "", C(e).forEach(function(s) {
2710
+ return r = r || {}, a = a || "", T(e).forEach(function(s) {
2698
2711
  var i, u, d;
2699
2712
  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) {
2713
+ }), T(n).forEach(function(s) {
2701
2714
  ie(e, s) || (r[a + s] = n[s]);
2702
2715
  }), r;
2703
2716
  }
@@ -2708,15 +2721,15 @@ function Ma() {
2708
2721
  return l(l({}, e), { table: function(n) {
2709
2722
  var r = e.table(n), a = r.schema.primaryKey;
2710
2723
  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;
2724
+ var i = B.trans, u = i.table(n).hook, d = u.deleting, p = u.creating, y = u.updating;
2712
2725
  switch (s.type) {
2713
2726
  case "add":
2714
- if (g.fire === Q) break;
2727
+ if (p.fire === Q) break;
2715
2728
  return i._promise("readwrite", function() {
2716
2729
  return w(s);
2717
2730
  }, !0);
2718
2731
  case "put":
2719
- if (g.fire === Q && y.fire === Q) break;
2732
+ if (p.fire === Q && y.fire === Q) break;
2720
2733
  return i._promise("readwrite", function() {
2721
2734
  return w(s);
2722
2735
  }, !0);
@@ -2728,11 +2741,11 @@ function Ma() {
2728
2741
  case "deleteRange":
2729
2742
  if (d.fire === Q) break;
2730
2743
  return i._promise("readwrite", function() {
2731
- return function f(O, m, v) {
2732
- return r.query({ trans: O, values: !1, query: { index: a, range: m }, limit: v }).then(function(S) {
2744
+ return function f(O, m, E) {
2745
+ return r.query({ trans: O, values: !1, query: { index: a, range: m }, limit: E }).then(function(S) {
2733
2746
  var b = S.result;
2734
2747
  return w({ 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({}, m), { lower: b[b.length - 1], lowerOpen: !0 }), v);
2748
+ 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
2749
  });
2737
2750
  });
2738
2751
  }(s.trans, s.range, 1e4);
@@ -2740,21 +2753,21 @@ function Ma() {
2740
2753
  }
2741
2754
  return r.mutate(s);
2742
2755
  function w(f) {
2743
- var O, m, v, S = B.trans, b = f.keys || Gn(a, f);
2756
+ var O, m, E, S = B.trans, b = f.keys || Gn(a, f);
2744
2757
  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 = p([], f.values)), f.keys && (f.keys = p([], f.keys)), O = r, v = b, ((m = f).type === "add" ? Promise.resolve([]) : O.getMany({ trans: m.trans, keys: v, cache: "immutable" })).then(function(A) {
2758
+ 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
2759
  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]);
2760
+ var N, C, R, x = A[I], $ = { onerror: null, onsuccess: null };
2761
+ return f.type === "delete" ? d.fire.call($, D, x, S) : f.type === "add" || x === 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(x, f.values[I]), (C = y.fire.call($, N, D, x, S)) && (R = f.values[I], Object.keys(C).forEach(function(k) {
2762
+ ie(R, k) ? R[k] = C[k] : ue(R, k, C[k]);
2750
2763
  }))), $;
2751
2764
  });
2752
2765
  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) {
2754
- var T = (N || b)[R], $ = P[R];
2755
- T == null ? $.onerror && $.onerror(I[R]) : $.onsuccess && $.onsuccess(f.type === "put" && A[R] ? f.values[R] : T);
2766
+ for (var I = D.failures, N = D.results, C = D.numFailures, D = D.lastResult, R = 0; R < b.length; ++R) {
2767
+ var x = (N || b)[R], $ = P[R];
2768
+ x == null ? $.onerror && $.onerror(I[R]) : $.onsuccess && $.onsuccess(f.type === "put" && A[R] ? f.values[R] : x);
2756
2769
  }
2757
- return { failures: I, results: N, numFailures: k, lastResult: D };
2770
+ return { failures: I, results: N, numFailures: C, lastResult: D };
2758
2771
  }).catch(function(D) {
2759
2772
  return P.forEach(function(I) {
2760
2773
  return I.onerror && I.onerror(D);
@@ -2808,22 +2821,22 @@ function Ma() {
2808
2821
  if (B.subscr && s !== "readonly") throw new L.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(B.querier));
2809
2822
  return e.transaction(a, s, i);
2810
2823
  }, 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(m) {
2824
+ 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) {
2812
2825
  return m.compound && m.keyPath.includes(u.keyPath);
2813
2826
  }), w = l(l({}, s), { mutate: function(m) {
2814
- function v(x) {
2815
- return x = "idb://".concat(n, "/").concat(a, "/").concat(x), D[x] || (D[x] = new ae());
2827
+ function E(k) {
2828
+ return k = "idb://".concat(n, "/").concat(a, "/").concat(k), D[k] || (D[k] = new ae());
2816
2829
  }
2817
- var S, b, A, P = m.trans, D = m.mutatedParts || (m.mutatedParts = {}), I = v(""), N = v(":dels"), k = m.type, $ = m.type === "deleteRange" ? [m.range] : m.type === "delete" ? [m.keys] : m.values.length < 50 ? [Gn(u, m).filter(function(x) {
2818
- return x;
2819
- }), m.values] : [], R = $[0], T = $[1], $ = m.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) {
2821
- var M = S(x.name || "");
2830
+ 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(k) {
2831
+ return k;
2832
+ }), m.values] : [], R = $[0], x = $[1], $ = m.trans._cache;
2833
+ return K(R) ? (I.addKeys(R), ($ = C === "delete" || R.length === x.length ? Ar(R, $) : null) || N.addKeys(R), ($ || x) && (S = E, b = $, A = x, i.indexes.forEach(function(k) {
2834
+ var M = S(k.name || "");
2822
2835
  function F(z) {
2823
- return z != null ? x.extractKey(z) : null;
2836
+ return z != null ? k.extractKey(z) : null;
2824
2837
  }
2825
2838
  function U(z) {
2826
- return x.multiEntry && K(z) ? z.forEach(function(de) {
2839
+ return k.multiEntry && K(z) ? z.forEach(function(de) {
2827
2840
  return M.addKey(de);
2828
2841
  }) : M.addKey(z);
2829
2842
  }
@@ -2831,55 +2844,55 @@ function Ma() {
2831
2844
  var W = b && F(b[se]), se = A && F(A[se]);
2832
2845
  H(W, se) !== 0 && (W != null && U(W), se != null && U(se));
2833
2846
  });
2834
- }))) : 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(m).then(function(x) {
2837
- return !R || m.type !== "add" && m.type !== "put" || (I.addKeys(x.results), y && y.forEach(function(M) {
2847
+ }))) : R ? (x = { from: (x = R.lower) !== null && x !== void 0 ? x : e.MIN_KEY, to: (x = R.upper) !== null && x !== void 0 ? x : e.MAX_KEY }, N.add(x), I.add(x)) : (I.add(r), N.add(r), i.indexes.forEach(function(k) {
2848
+ return E(k.name).add(r);
2849
+ })), s.mutate(m).then(function(k) {
2850
+ return !R || m.type !== "add" && m.type !== "put" || (I.addKeys(k.results), y && y.forEach(function(M) {
2838
2851
  for (var F = m.values.map(function(W) {
2839
2852
  return M.extractKey(W);
2840
2853
  }), U = M.keyPath.findIndex(function(W) {
2841
2854
  return W === u.keyPath;
2842
- }), z = 0, de = x.results.length; z < de; ++z) F[z][U] = x.results[z];
2843
- v(M.name).addKeys(F);
2844
- })), P.mutatedParts = Yt(P.mutatedParts || {}, D), x;
2855
+ }), z = 0, de = k.results.length; z < de; ++z) F[z][U] = k.results[z];
2856
+ E(M.name).addKeys(F);
2857
+ })), P.mutatedParts = Yt(P.mutatedParts || {}, D), k;
2845
2858
  });
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)];
2859
+ } }), f = function(E) {
2860
+ var S = E.query, E = S.index, S = S.range;
2861
+ 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)];
2849
2862
  }, O = { get: function(m) {
2850
2863
  return [u, new ae(m.key)];
2851
2864
  }, getMany: function(m) {
2852
2865
  return [u, new ae().addKeys(m.keys)];
2853
2866
  }, count: f, query: f, openCursor: f };
2854
- return C(O).forEach(function(m) {
2855
- w[m] = function(v) {
2856
- var S = B.subscr, b = !!S, A = Pr(B, s) && Dr(m, v) ? v.obsSet = {} : S;
2867
+ return T(O).forEach(function(m) {
2868
+ w[m] = function(E) {
2869
+ var S = B.subscr, b = !!S, A = Pr(B, s) && Dr(m, E) ? E.obsSet = {} : S;
2857
2870
  if (b) {
2858
- var P = function(T) {
2859
- return T = "idb://".concat(n, "/").concat(a, "/").concat(T), A[T] || (A[T] = new ae());
2860
- }, D = P(""), I = P(":dels"), S = O[m](v), b = S[0], S = S[1];
2861
- if ((m === "query" && b.isPrimaryKey && !v.values ? I : P(b.name || "")).add(S), !b.isPrimaryKey) {
2871
+ var P = function(x) {
2872
+ return x = "idb://".concat(n, "/").concat(a, "/").concat(x), A[x] || (A[x] = new ae());
2873
+ }, D = P(""), I = P(":dels"), S = O[m](E), b = S[0], S = S[1];
2874
+ if ((m === "query" && b.isPrimaryKey && !E.values ? I : P(b.name || "")).add(S), !b.isPrimaryKey) {
2862
2875
  if (m !== "count") {
2863
- var N = m === "query" && g && v.values && s.query(l(l({}, v), { values: !1 }));
2864
- return s[m].apply(this, arguments).then(function(T) {
2876
+ var N = m === "query" && p && E.values && s.query(l(l({}, E), { values: !1 }));
2877
+ return s[m].apply(this, arguments).then(function(x) {
2865
2878
  if (m === "query") {
2866
- if (g && v.values) return N.then(function(F) {
2867
- return F = F.result, D.addKeys(F), T;
2879
+ if (p && E.values) return N.then(function(F) {
2880
+ return F = F.result, D.addKeys(F), x;
2868
2881
  });
2869
- var $ = v.values ? T.result.map(d) : T.result;
2870
- (v.values ? D : I).addKeys($);
2882
+ var $ = E.values ? x.result.map(d) : x.result;
2883
+ (E.values ? D : I).addKeys($);
2871
2884
  } else if (m === "openCursor") {
2872
- var x = T, M = v.values;
2873
- return x && Object.create(x, { key: { get: function() {
2874
- return I.addKey(x.primaryKey), x.key;
2885
+ var k = x, M = E.values;
2886
+ return k && Object.create(k, { key: { get: function() {
2887
+ return I.addKey(k.primaryKey), k.key;
2875
2888
  } }, primaryKey: { get: function() {
2876
- var F = x.primaryKey;
2889
+ var F = k.primaryKey;
2877
2890
  return I.addKey(F), F;
2878
2891
  } }, value: { get: function() {
2879
- return M && D.addKey(x.primaryKey), x.value;
2892
+ return M && D.addKey(k.primaryKey), k.value;
2880
2893
  } } });
2881
2894
  }
2882
- return T;
2895
+ return x;
2883
2896
  });
2884
2897
  }
2885
2898
  I.add(r);
@@ -2906,28 +2919,28 @@ function Ma() {
2906
2919
  }
2907
2920
  function Nr(e, n, O, a, s, i) {
2908
2921
  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, w = u.extractKey, f = (u.lowLevelIndex || u).extractKey, O = O.reduce(function(m, v) {
2922
+ 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) {
2910
2923
  var S = m, 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 = w(I), (d && K(D) ? D.some(function(x) {
2914
- return Kn(x, g);
2915
- }) : Kn(D, g)) && (A.addKey(N), b.push(I)));
2924
+ if (E.type === "add" || E.type === "put") for (var A = new ae(), P = E.values.length - 1; 0 <= P; --P) {
2925
+ var D, I = E.values[P], N = y(I);
2926
+ A.hasKey(N) || (D = w(I), (d && K(D) ? D.some(function(k) {
2927
+ return Kn(k, p);
2928
+ }) : Kn(D, p)) && (A.addKey(N), b.push(I)));
2916
2929
  }
2917
- switch (v.type) {
2930
+ switch (E.type) {
2918
2931
  case "add":
2919
- var k = new ae().addKeys(n.values ? m.map(function(M) {
2932
+ var C = new ae().addKeys(n.values ? m.map(function(M) {
2920
2933
  return y(M);
2921
2934
  }) : m), S = m.concat(n.values ? b.filter(function(M) {
2922
- return M = y(M), !k.hasKey(M) && (k.addKey(M), !0);
2935
+ return M = y(M), !C.hasKey(M) && (C.addKey(M), !0);
2923
2936
  }) : b.map(function(M) {
2924
2937
  return y(M);
2925
2938
  }).filter(function(M) {
2926
- return !k.hasKey(M) && (k.addKey(M), !0);
2939
+ return !C.hasKey(M) && (C.addKey(M), !0);
2927
2940
  }));
2928
2941
  break;
2929
2942
  case "put":
2930
- var R = new ae().addKeys(v.values.map(function(M) {
2943
+ var R = new ae().addKeys(E.values.map(function(M) {
2931
2944
  return y(M);
2932
2945
  }));
2933
2946
  S = m.filter(function(M) {
@@ -2937,21 +2950,21 @@ function Ma() {
2937
2950
  }));
2938
2951
  break;
2939
2952
  case "delete":
2940
- var T = new ae().addKeys(v.keys);
2953
+ var x = new ae().addKeys(E.keys);
2941
2954
  S = m.filter(function(M) {
2942
- return !T.hasKey(n.values ? y(M) : M);
2955
+ return !x.hasKey(n.values ? y(M) : M);
2943
2956
  });
2944
2957
  break;
2945
2958
  case "deleteRange":
2946
- var $ = v.range;
2959
+ var $ = E.range;
2947
2960
  S = m.filter(function(M) {
2948
2961
  return !Kn(y(M), $);
2949
2962
  });
2950
2963
  }
2951
2964
  return S;
2952
2965
  }, e);
2953
- return O === e ? e : (O.sort(function(m, v) {
2954
- return H(f(m), f(v)) || H(y(m), y(v));
2966
+ return O === e ? e : (O.sort(function(m, E) {
2967
+ return H(f(m), f(E)) || H(y(m), y(E));
2955
2968
  }), 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
2969
  }
2957
2970
  function Rr(e, n) {
@@ -2990,25 +3003,25 @@ function Ma() {
2990
3003
  var n = e.schema.name;
2991
3004
  return l(l({}, e), { transaction: function(r, a, s) {
2992
3005
  var i, u, d = e.transaction(r, a, s);
2993
- return a === "readwrite" && (u = (i = new AbortController()).signal, s = function(g) {
3006
+ return a === "readwrite" && (u = (i = new AbortController()).signal, s = function(p) {
2994
3007
  return function() {
2995
3008
  if (i.abort(), a === "readwrite") {
2996
3009
  for (var y = /* @__PURE__ */ new Set(), w = 0, f = r; w < f.length; w++) {
2997
3010
  var O = f[w], m = ze["idb://".concat(n, "/").concat(O)];
2998
3011
  if (m) {
2999
- var v = e.table(O), S = m.optimisticOps.filter(function(M) {
3012
+ var E = e.table(O), S = m.optimisticOps.filter(function(M) {
3000
3013
  return M.trans === d;
3001
3014
  });
3002
- if (d._explicit && g && d.mutatedParts) for (var b = 0, A = Object.values(m.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) {
3015
+ 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
3016
  return y.add(M);
3004
3017
  }));
3005
3018
  else if (0 < S.length) {
3006
3019
  m.optimisticOps = m.optimisticOps.filter(function(M) {
3007
3020
  return M.trans !== d;
3008
3021
  });
3009
- for (var I = 0, N = Object.values(m.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) {
3022
+ for (var I = 0, N = Object.values(m.queries.query); I < N.length; I++) for (var C, R, x, $ = 0, k = (C = N[I]).slice(); $ < k.length; $++) (R = k[$]).res != null && d.mutatedParts && (p && !R.dirty ? (x = Object.isFrozen(R.res), x = Nr(R.res, R.req, S, E, R, x), R.dirty ? (je(C, R), R.subscribers.forEach(function(M) {
3010
3023
  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) {
3024
+ })) : x !== R.res && (R.res = x, R.promise = j.resolve({ result: x }))) : (R.dirty && je(C, R), R.subscribers.forEach(function(M) {
3012
3025
  return y.add(M);
3013
3026
  })));
3014
3027
  }
@@ -3026,25 +3039,25 @@ function Ma() {
3026
3039
  var u = B.trans;
3027
3040
  if (s.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(i);
3028
3041
  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));
3042
+ return d ? (u = a.mutate(i), i.type !== "add" && i.type !== "put" || !(50 <= i.values.length || Gn(s, i).some(function(p) {
3043
+ return p == null;
3044
+ })) ? (d.optimisticOps.push(i), i.mutatedParts && Qt(i.mutatedParts), u.then(function(p) {
3045
+ 0 < p.numFailures && (je(d.optimisticOps, i), (p = Ir(0, i, p)) && d.optimisticOps.push(p), i.mutatedParts && Qt(i.mutatedParts));
3033
3046
  }), u.catch(function() {
3034
3047
  je(d.optimisticOps, i), i.mutatedParts && Qt(i.mutatedParts);
3035
- })) : u.then(function(g) {
3048
+ })) : u.then(function(p) {
3036
3049
  var y = Ir(0, l(l({}, i), { values: i.values.map(function(w, f) {
3037
3050
  var O;
3038
- return g.failures[f] ? w : (w = (O = s.keyPath) !== null && O !== void 0 && O.includes(".") ? $e(w) : l({}, w), ue(w, s.keyPath, g.results[f]), w);
3039
- }) }), g);
3051
+ 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);
3052
+ }) }), p);
3040
3053
  d.optimisticOps.push(y), queueMicrotask(function() {
3041
3054
  return i.mutatedParts && Qt(i.mutatedParts);
3042
3055
  });
3043
3056
  }), u) : a.mutate(i);
3044
3057
  }, query: function(i) {
3045
3058
  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)];
3059
+ 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) {
3060
+ var P = ze["idb://".concat(E, "/").concat(S)];
3048
3061
  if (!P) return [];
3049
3062
  if (!(S = P.queries[b])) return [null, !1, P, null];
3050
3063
  var D = S[(A.query ? A.query.index.name : null) || ""];
@@ -3063,17 +3076,17 @@ function Ma() {
3063
3076
  }), [I, !!I, P, D];
3064
3077
  }
3065
3078
  }(n, r, "query", i), w = y[0], f = y[1], O = y[2], m = y[3];
3066
- return w && f ? w.obsSet = i.obsSet : (f = a.query(i).then(function(v) {
3067
- var S = v.result;
3079
+ return w && f ? w.obsSet = i.obsSet : (f = a.query(i).then(function(E) {
3080
+ var S = E.result;
3068
3081
  if (w && (w.res = S), u) {
3069
3082
  for (var b = 0, A = S.length; b < A; ++b) Object.freeze(S[b]);
3070
3083
  Object.freeze(S);
3071
- } else v.result = $e(S);
3072
- return v;
3073
- }).catch(function(v) {
3074
- return m && w && je(m, w), Promise.reject(v);
3075
- }), 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, g), w.promise.then(function(v) {
3076
- return { result: Nr(v.result, i, O?.optimisticOps, a, w, u) };
3084
+ } else E.result = $e(S);
3085
+ return E;
3086
+ }).catch(function(E) {
3087
+ return m && w && je(m, w), Promise.reject(E);
3088
+ }), 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) {
3089
+ return { result: Nr(E.result, i, O?.optimisticOps, a, w, u) };
3077
3090
  });
3078
3091
  } });
3079
3092
  } });
@@ -3142,8 +3155,8 @@ function Ma() {
3142
3155
  n.close(e);
3143
3156
  var d = n._deps.indexedDB.deleteDatabase(n.name);
3144
3157
  d.onsuccess = Z(function() {
3145
- var g, y, w;
3146
- g = n._deps, y = n.name, w = g.indexedDB, g = g.IDBKeyRange, Nn(w) || y === jt || In(w, g).delete(y).catch(Q), s();
3158
+ var p, y, w;
3159
+ 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
3160
  }), d.onerror = me(i), d.onblocked = n._fireOnBlocked;
3148
3161
  }
3149
3162
  if (r) throw new L.InvalidArgument("Invalid closeOptions argument to db.delete()");
@@ -3162,7 +3175,7 @@ function Ma() {
3162
3175
  return this._state.autoSchema;
3163
3176
  }, Object.defineProperty(ee.prototype, "tables", { get: function() {
3164
3177
  var e = this;
3165
- return C(this._allTables).map(function(n) {
3178
+ return T(this._allTables).map(function(n) {
3166
3179
  return e._allTables[n];
3167
3180
  });
3168
3181
  }, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
@@ -3204,7 +3217,7 @@ function Ma() {
3204
3217
  f(y);
3205
3218
  }) : q(y);
3206
3219
  }
3207
- var g = function y(w, f, O, m, v) {
3220
+ var p = function y(w, f, O, m, E) {
3208
3221
  return j.resolve().then(function() {
3209
3222
  var S = B.transless || B, b = w._createTransaction(f, O, w._dbSchema, m);
3210
3223
  if (b.explicit = !0, S = { trans: b, transless: S }, m) b.idbtrans = m.idbtrans;
@@ -3212,13 +3225,13 @@ function Ma() {
3212
3225
  b.create(), b.idbtrans._explicit = !0, w._state.PR1398_maxLoop = 3;
3213
3226
  } catch (D) {
3214
3227
  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() {
3215
- return y(w, f, O, null, v);
3228
+ return y(w, f, O, null, E);
3216
3229
  })) : q(D);
3217
3230
  }
3218
- var A, P = an(v);
3231
+ var A, P = an(E);
3219
3232
  return P && et(), S = j.follow(function() {
3220
3233
  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)));
3234
+ (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
3235
  }, S), (A && typeof A.then == "function" ? j.resolve(A).then(function(D) {
3223
3236
  return b.active ? D : q(new L.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
3224
3237
  }) : S.then(function() {
@@ -3232,9 +3245,9 @@ function Ma() {
3232
3245
  });
3233
3246
  });
3234
3247
  }.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);
3248
+ return s ? s._promise(i, p, "lock") : B.trans ? We(B.transless, function() {
3249
+ return a._whenReady(p);
3250
+ }) : this._whenReady(p);
3238
3251
  }, ee.prototype.table = function(e) {
3239
3252
  if (!ie(this._allTables, e)) throw new L.InvalidTable("Table ".concat(e, " does not exist"));
3240
3253
  return this._allTables[e];
@@ -3244,7 +3257,7 @@ function Ma() {
3244
3257
  this._middlewares = {}, this.verno = 0;
3245
3258
  var a = ee.dependencies;
3246
3259
  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 };
3260
+ 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
3261
  y.dbReadyPromise = new j(function(f) {
3249
3262
  y.dbReadyResolve = f;
3250
3263
  }), y.openCanceller = new j(function(f, O) {
@@ -3252,27 +3265,27 @@ function Ma() {
3252
3265
  }), 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
3266
  return function(O, m) {
3254
3267
  ee.vip(function() {
3255
- var v, S = r._state;
3256
- S.openComplete ? (S.dbOpenError || j.resolve().then(O), m && f(O)) : S.onReadyBeingFired ? (S.onReadyBeingFired.push(O), m && f(O)) : (f(O), v = r, m || f(function b() {
3257
- v.on.ready.unsubscribe(O), v.on.ready.unsubscribe(b);
3268
+ var E, S = r._state;
3269
+ 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() {
3270
+ E.on.ready.unsubscribe(O), E.on.ready.unsubscribe(b);
3258
3271
  }));
3259
3272
  });
3260
3273
  };
3261
3274
  }), this.Collection = (s = this, gt(oa.prototype, function(A, b) {
3262
3275
  this.db = s;
3263
- var m = ir, v = null;
3276
+ var m = ir, E = null;
3264
3277
  if (b) try {
3265
3278
  m = b();
3266
3279
  } catch (P) {
3267
- v = P;
3280
+ E = P;
3268
3281
  }
3269
3282
  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: m, 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 };
3283
+ 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 };
3271
3284
  })), this.Table = (i = this, gt(dr.prototype, function(f, O, m) {
3272
3285
  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] });
3273
- })), this.Transaction = (u = this, gt(ua.prototype, function(f, O, m, v, S) {
3286
+ })), this.Transaction = (u = this, gt(ua.prototype, function(f, O, m, E, S) {
3274
3287
  var b = this;
3275
- this.db = u, this.mode = f, this.storeNames = O, this.schema = m, 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) {
3288
+ this.db = u, this.mode = f, this.storeNames = O, this.schema = m, this.chromeTransactionDurability = E, this.idbtrans = null, this.on = ht(this, "complete", "error", "abort"), this.parent = S || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new j(function(A, P) {
3276
3289
  b._resolve = A, b._reject = P;
3277
3290
  }), this._completion.then(function() {
3278
3291
  b.active = !1, b.on.complete.fire();
@@ -3282,20 +3295,20 @@ function Ma() {
3282
3295
  });
3283
3296
  })), this.Version = (d = this, gt(ma.prototype, function(f) {
3284
3297
  this.db = d, this._cfg = { version: f, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3285
- })), this.WhereClause = (g = this, gt(mr.prototype, function(f, O, m) {
3286
- if (this.db = g, this._ctx = { table: f, index: O === ":id" ? null : O, or: m }, 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();
3298
+ })), this.WhereClause = (p = this, gt(mr.prototype, function(f, O, m) {
3299
+ 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) {
3300
+ return H(S, E);
3301
+ }, this._max = function(E, S) {
3302
+ return 0 < H(E, S) ? E : S;
3303
+ }, this._min = function(E, S) {
3304
+ return H(E, S) < 0 ? E : S;
3305
+ }, this._IDBKeyRange = p._deps.IDBKeyRange, !this._IDBKeyRange) throw new L.MissingAPI();
3293
3306
  })), this.on("versionchange", function(f) {
3294
3307
  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
3308
  }), this.on("blocked", function(f) {
3296
3309
  !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, m, v) {
3298
- return new r.Transaction(f, O, m, r._options.chromeTransactionDurability, v);
3310
+ }), this._maxKey = bt(n.IDBKeyRange), this._createTransaction = function(f, O, m, E) {
3311
+ return new r.Transaction(f, O, m, r._options.chromeTransactionDurability, E);
3299
3312
  }, this._fireOnBlocked = function(f) {
3300
3313
  r.on("blocked").fire(f), tt.filter(function(O) {
3301
3314
  return O.name === r.name && O !== r && !O._state.vcFired;
@@ -3308,12 +3321,12 @@ function Ma() {
3308
3321
  if (O === "table") return function(S) {
3309
3322
  return Jt(r.table(S), w);
3310
3323
  };
3311
- var v = Reflect.get(f, O, m);
3312
- return v instanceof dr ? Jt(v, w) : O === "tables" ? v.map(function(S) {
3324
+ var E = Reflect.get(f, O, m);
3325
+ return E instanceof dr ? Jt(E, w) : O === "tables" ? E.map(function(S) {
3313
3326
  return Jt(S, w);
3314
3327
  }) : O === "_createTransaction" ? function() {
3315
- return Jt(v.apply(this, arguments), w);
3316
- } : v;
3328
+ return Jt(E.apply(this, arguments), w);
3329
+ } : E;
3317
3330
  } });
3318
3331
  this.vip = w, a.forEach(function(f) {
3319
3332
  return f(r);
@@ -3328,25 +3341,25 @@ function Ma() {
3328
3341
  this._subscribe = e;
3329
3342
  }
3330
3343
  try {
3331
- Zt = { indexedDB: E.indexedDB || E.mozIndexedDB || E.webkitIndexedDB || E.msIndexedDB, IDBKeyRange: E.IDBKeyRange || E.webkitIDBKeyRange };
3344
+ Zt = { indexedDB: v.indexedDB || v.mozIndexedDB || v.webkitIndexedDB || v.msIndexedDB, IDBKeyRange: v.IDBKeyRange || v.webkitIDBKeyRange };
3332
3345
  } catch {
3333
3346
  Zt = { indexedDB: null, IDBKeyRange: null };
3334
3347
  }
3335
3348
  function Tr(e) {
3336
3349
  var n, r = !1, a = new Aa(function(s) {
3337
- var i = an(e), u, d = !1, g = {}, y = {}, w = { get closed() {
3350
+ var i = an(e), u, d = !1, p = {}, y = {}, w = { get closed() {
3338
3351
  return d;
3339
3352
  }, unsubscribe: function() {
3340
3353
  d || (d = !0, u && u.abort(), f && Te.storagemutated.unsubscribe(m));
3341
3354
  } };
3342
3355
  s.start && s.start(w);
3343
3356
  var f = !1, O = function() {
3344
- return pn(v);
3357
+ return pn(E);
3345
3358
  }, m = function(S) {
3346
- Yt(g, S), xn(y, g) && O();
3347
- }, v = function() {
3359
+ Yt(p, S), xn(y, p) && O();
3360
+ }, E = function() {
3348
3361
  var S, b, A;
3349
- !d && Zt.indexedDB && (g = {}, S = {}, u && u.abort(), u = new AbortController(), A = function(P) {
3362
+ !d && Zt.indexedDB && (p = {}, S = {}, u && u.abort(), u = new AbortController(), A = function(P) {
3350
3363
  var D = Ze();
3351
3364
  try {
3352
3365
  i && et();
@@ -3356,7 +3369,7 @@ function Ma() {
3356
3369
  D && qe();
3357
3370
  }
3358
3371
  }(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) {
3372
+ r = !0, n = P, d || b.signal.aborted || (p = {}, function(D) {
3360
3373
  for (var I in D) if (ie(D, I)) return;
3361
3374
  return 1;
3362
3375
  }(y = S) || f || (Te(yt, m), f = !0), pn(function() {
@@ -3590,10 +3603,10 @@ class Mr {
3590
3603
  } : (o.message = `Dashboard ${t.id} retrieved from storage`, o.success = !0, o);
3591
3604
  };
3592
3605
  getDashboards = async (t) => {
3593
- const o = (E) => t?.id === E.id, l = (E) => t?.name ? E.name.includes(t?.name) : !1, p = await this.db.table(_.DASHBOARD).toArray().then((E) => t?.id ? E.filter(o) : E).then((E) => t?.name ? E.filter(l) : E).catch(() => {
3606
+ 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
3607
  G(2, ["%cstorage", c.STORAGE, X.DASHBOARD_LOAD, t]);
3595
3608
  });
3596
- return p !== void 0 && G(3, [
3609
+ return g !== void 0 && G(3, [
3597
3610
  "%cstorage%c %cdashboards",
3598
3611
  c.STORAGE,
3599
3612
  c.NONE,
@@ -3601,9 +3614,9 @@ class Mr {
3601
3614
  t
3602
3615
  ]), {
3603
3616
  // @ts-ignore
3604
- data: p !== void 0 ? { dashboards: p, query: t } : null,
3605
- message: p !== void 0 ? "Dashboards loaded from storage" : "Dashboards load error",
3606
- success: p !== void 0
3617
+ data: g !== void 0 ? { dashboards: g, query: t } : null,
3618
+ message: g !== void 0 ? "Dashboards loaded from storage" : "Dashboards load error",
3619
+ success: g !== void 0
3607
3620
  };
3608
3621
  };
3609
3622
  /**
@@ -3632,21 +3645,21 @@ class Mr {
3632
3645
  * Wipe Message data after expires timestamp
3633
3646
  */
3634
3647
  cleanMessages = async () => {
3635
- const t = Date.now() / 1e3, o = (E) => E.expires < t, l = (E) => E.expires < t;
3636
- return await this.db.table(_.TOPICS).orderBy("expires").filter(o).delete().catch((E) => (console.error(
3648
+ const t = Date.now() / 1e3, o = (v) => v.expires < t, l = (v) => v.expires < t;
3649
+ return await this.db.table(_.TOPICS).orderBy("expires").filter(o).delete().catch((v) => (console.error(
3637
3650
  "%cstorage%c %cclean",
3638
3651
  c.STORAGE,
3639
3652
  c.NONE,
3640
3653
  c.MESSAGES,
3641
- E.message
3642
- ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(l).delete().catch((E) => (console.error(
3654
+ v.message
3655
+ ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(l).delete().catch((v) => (console.error(
3643
3656
  "%clean%c %cstorage%c %cmessages",
3644
3657
  c.OK,
3645
3658
  c.NONE,
3646
3659
  c.STORAGE,
3647
3660
  c.NONE,
3648
3661
  c.MESSAGES,
3649
- E.message
3662
+ v.message
3650
3663
  ), 0));
3651
3664
  };
3652
3665
  /**
@@ -3672,9 +3685,9 @@ class Mr {
3672
3685
  };
3673
3686
  const o = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
3674
3687
  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 p = (K) => K.utc > (t?.since || 0), E = (K) => K.utc < (t?.before || l), C = (K) => K?.visible !== 0;
3688
+ const g = (K) => K.utc > (t?.since || 0), v = (K) => K.utc < (t?.before || l), T = (K) => K?.visible !== 0;
3676
3689
  try {
3677
- const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(C).filter(p).filter(E).reverse().limit(t?.limit ?? 25).sortBy(o);
3690
+ const te = await this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(T).filter(g).filter(v).reverse().limit(t?.limit ?? 25).sortBy(o);
3678
3691
  if (te.length === 0)
3679
3692
  return {
3680
3693
  data: null,
@@ -3736,68 +3749,68 @@ class Mr {
3736
3749
  if (t.type !== _.MESSAGES)
3737
3750
  return 400;
3738
3751
  const l = o.data.title;
3739
- let p = 0;
3740
- return await o.data.messages.forEach(async (E) => {
3741
- E.id !== null && (E.topics[0] = {
3742
- message_id: E.id,
3743
- engagement: E.topics[0]?.engagement || E.dynamics?.engagement || 0,
3744
- impressions: E.topics[0]?.impressions || E.dynamics?.semrush_visits || 0,
3745
- reach: E.topics[0]?.reach || E.dynamics?.potential_reach || 0,
3746
- sentiment: E.topics[0]?.sentiment || 0
3752
+ let g = 0;
3753
+ return await o.data.messages.forEach(async (v) => {
3754
+ v.id !== null && (v.topics[0] = {
3755
+ message_id: v.id,
3756
+ engagement: v.topics[0]?.engagement || v.dynamics?.engagement || 0,
3757
+ impressions: v.topics[0]?.impressions || v.dynamics?.semrush_visits || 0,
3758
+ reach: v.topics[0]?.reach || v.dynamics?.potential_reach || 0,
3759
+ sentiment: v.topics[0]?.sentiment || 0
3747
3760
  }, await this.db.table(_.MESSAGES).put({
3748
- id: E.id,
3749
- utc: E.utc,
3750
- data: E,
3751
- expires: E.expires
3752
- }).catch((C) => {
3753
- p++, G(4, [
3761
+ id: v.id,
3762
+ utc: v.utc,
3763
+ data: v,
3764
+ expires: v.expires
3765
+ }).catch((T) => {
3766
+ g++, G(4, [
3754
3767
  "%cset%c %cstorage",
3755
3768
  c.KO,
3756
3769
  c.NONE,
3757
3770
  c.STORAGE,
3758
3771
  "set message",
3759
3772
  `title: ${l}`,
3760
- E,
3761
- C.message
3773
+ v,
3774
+ T.message
3762
3775
  ]);
3763
3776
  }), await this.db.table(_.TOPICS).put({
3764
3777
  title: l,
3765
3778
  widget_id: t.widget,
3766
- message_id: E.id,
3779
+ message_id: v.id,
3767
3780
  dashboard_id: t.dashboard,
3768
- engagement: E.topics[0]?.engagement || E.dynamics?.engagement || 0,
3769
- impressions: E.topics[0]?.impressions || E.dynamics?.semrush_visits || 0,
3770
- reach: E.topics[0]?.reach || E.dynamics?.potential_reach || 0,
3771
- sentiment: E.topics[0]?.sentiment || 0,
3772
- utc: E.utc,
3773
- expires: E.expires
3774
- }).catch((C) => {
3775
- p++, G(4, [
3781
+ engagement: v.topics[0]?.engagement || v.dynamics?.engagement || 0,
3782
+ impressions: v.topics[0]?.impressions || v.dynamics?.semrush_visits || 0,
3783
+ reach: v.topics[0]?.reach || v.dynamics?.potential_reach || 0,
3784
+ sentiment: v.topics[0]?.sentiment || 0,
3785
+ utc: v.utc,
3786
+ expires: v.expires
3787
+ }).catch((T) => {
3788
+ g++, G(4, [
3776
3789
  "%cset%c %cstorage",
3777
3790
  c.KO,
3778
3791
  c.NONE,
3779
3792
  c.STORAGE,
3780
3793
  "set topic",
3781
3794
  `title: ${l}`,
3782
- E,
3783
- C.message
3795
+ v,
3796
+ T.message
3784
3797
  ]);
3785
- }), await o.data.topics.forEach(async (C) => {
3786
- const K = C.message_id, te = C.visible ? 1 : 0, ge = C.title;
3798
+ }), await o.data.topics.forEach(async (T) => {
3799
+ const K = T.message_id, te = T.visible ? 1 : 0, ge = T.title;
3787
3800
  await this.db.table(_.TOPICS).where("message_id").equals(K).modify({ visible: te }).catch((Ce) => {
3788
- p++, G(4, [
3801
+ g++, G(4, [
3789
3802
  "%cset%c %cstorage",
3790
3803
  c.KO,
3791
3804
  c.NONE,
3792
3805
  c.STORAGE,
3793
3806
  "update message visibility",
3794
3807
  `title: ${ge}`,
3795
- `widget: ${C.widget_id}`,
3808
+ `widget: ${T.widget_id}`,
3796
3809
  Ce.message
3797
3810
  ]);
3798
3811
  });
3799
3812
  }));
3800
- }), p === 0 ? 201 : 400;
3813
+ }), g === 0 ? 201 : 400;
3801
3814
  };
3802
3815
  /**
3803
3816
  * Retrieve Series Data
@@ -3903,10 +3916,10 @@ class Mr {
3903
3916
  * @returns IResponse
3904
3917
  */
3905
3918
  getWidgets = async (t) => {
3906
- const o = (C) => t?.dashboard === C.dashboard_id, l = (C) => t?.type === C.type, p = (C) => t?.name ? C.name.includes(t?.name) : !1, E = 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(p) : C).catch(() => {
3919
+ const o = (T) => t?.dashboard === T.dashboard_id, l = (T) => t?.type === T.type, g = (T) => t?.name ? T.name.includes(t?.name) : !1, v = await this.db.table(_.WIDGET).toArray().then((T) => t?.dashboard ? T.filter(o) : T).then((T) => t?.type ? T.filter(l) : T).then((T) => t?.name ? T.filter(g) : T).catch(() => {
3907
3920
  G(2, ["%cstorage", c.STORAGE, X.WIDGET_LOAD, t]);
3908
3921
  });
3909
- return E !== void 0 && G(3, [
3922
+ return v !== void 0 && G(3, [
3910
3923
  "%cstorage%c %cwidgets",
3911
3924
  c.STORAGE,
3912
3925
  c.NONE,
@@ -3914,9 +3927,9 @@ class Mr {
3914
3927
  t
3915
3928
  ]), {
3916
3929
  // @ts-ignore
3917
- data: E !== void 0 ? { data: E, query: t } : null,
3918
- message: E !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3919
- success: E !== void 0
3930
+ data: v !== void 0 ? { data: v, query: t } : null,
3931
+ message: v !== void 0 ? "Widgets loaded from storage" : "Widgets load error",
3932
+ success: v !== void 0
3920
3933
  };
3921
3934
  };
3922
3935
  /**
@@ -3993,12 +4006,12 @@ class Mr {
3993
4006
  * @returns IResponse
3994
4007
  */
3995
4008
  getSlides = async (t) => {
3996
- const o = (C) => t?.id ? t.id = C.id : !1, l = (C) => t?.name ? C.name.includes(t?.name) : !1, E = await this.db.table(_.SLIDE).toArray().then((C) => t?.id ? C.filter(o) : C).then((C) => t?.name ? C.filter(l) : C);
3997
- return E !== void 0 && G(3, ["%cstorage%c %cslides", c.STORAGE, c.NONE, c.SLIDE, t]), {
4009
+ const o = (T) => t?.id ? t.id = T.id : !1, l = (T) => t?.name ? T.name.includes(t?.name) : !1, v = await this.db.table(_.SLIDE).toArray().then((T) => t?.id ? T.filter(o) : T).then((T) => t?.name ? T.filter(l) : T);
4010
+ return v !== void 0 && G(3, ["%cstorage%c %cslides", c.STORAGE, c.NONE, c.SLIDE, t]), {
3998
4011
  // @ts-ignore
3999
- data: E !== void 0 ? { slides: E, query: t } : null,
4000
- message: E !== void 0 ? "Slides loaded from storage" : "Slides load error",
4001
- success: E !== void 0
4012
+ data: v !== void 0 ? { slides: v, query: t } : null,
4013
+ message: v !== void 0 ? "Slides loaded from storage" : "Slides load error",
4014
+ success: v !== void 0
4002
4015
  };
4003
4016
  };
4004
4017
  /**
@@ -4055,8 +4068,8 @@ class Mr {
4055
4068
  * @returns IResponse
4056
4069
  */
4057
4070
  getPresentations = async (t) => {
4058
- const o = (E) => t?.name ? E.name.includes(t?.name) : !1, p = await this.db.table(_.PRESENTATION).toArray().then((E) => t?.name ? E.filter(o) : E);
4059
- return p !== void 0 && G(3, [
4071
+ 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);
4072
+ return g !== void 0 && G(3, [
4060
4073
  "%cstorage%c %cpresentations",
4061
4074
  c.STORAGE,
4062
4075
  c.NONE,
@@ -4064,9 +4077,9 @@ class Mr {
4064
4077
  t
4065
4078
  ]), {
4066
4079
  // @ts-ignore
4067
- data: p !== void 0 ? { presentations: p, query: t } : null,
4068
- message: p !== void 0 ? "Presentations loaded from storage" : "Presentations load error",
4069
- success: p !== void 0
4080
+ data: g !== void 0 ? { presentations: g, query: t } : null,
4081
+ message: g !== void 0 ? "Presentations loaded from storage" : "Presentations load error",
4082
+ success: g !== void 0
4070
4083
  };
4071
4084
  };
4072
4085
  /**
@@ -4123,8 +4136,8 @@ class Mr {
4123
4136
  * @returns IResponse
4124
4137
  */
4125
4138
  getPreferences = async (t) => {
4126
- const o = (E) => t?.id ? t.id = E.id : !1, p = await this.db.table(_.SLIDE).toArray().then((E) => t?.id ? E.filter(o) : E);
4127
- return p !== void 0 && G(3, [
4139
+ 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);
4140
+ return g !== void 0 && G(3, [
4128
4141
  "%cstorage%c %cpreferences",
4129
4142
  c.STORAGE,
4130
4143
  c.NONE,
@@ -4132,9 +4145,9 @@ class Mr {
4132
4145
  t
4133
4146
  ]), {
4134
4147
  // @ts-ignore
4135
- data: p !== void 0 ? { prefrences: p, query: t } : null,
4136
- message: p !== void 0 ? "Preferences loaded from storage" : "Preferences load error",
4137
- success: p !== void 0
4148
+ data: g !== void 0 ? { prefrences: g, query: t } : null,
4149
+ message: g !== void 0 ? "Preferences loaded from storage" : "Preferences load error",
4150
+ success: g !== void 0
4138
4151
  };
4139
4152
  };
4140
4153
  /**
@@ -4166,8 +4179,8 @@ class Mr {
4166
4179
  * @returns IResponse
4167
4180
  */
4168
4181
  getImages = async (t) => {
4169
- const o = (E) => t?.id ? E.includes(t.id) : !1, p = await this.db.table(_.IMAGES).toArray().then((E) => t?.id ? E.filter(o) : E);
4170
- return p !== void 0 && G(3, [
4182
+ 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);
4183
+ return g !== void 0 && G(3, [
4171
4184
  "%cstorage%c %cimages",
4172
4185
  c.STORAGE,
4173
4186
  c.NONE,
@@ -4175,9 +4188,9 @@ class Mr {
4175
4188
  t
4176
4189
  ]), {
4177
4190
  // @ts-ignore
4178
- data: p !== void 0 ? { images: p, query: t } : null,
4179
- message: p !== void 0 ? "Images loaded from storage" : "Images load error",
4180
- success: p !== void 0
4191
+ data: g !== void 0 ? { images: g, query: t } : null,
4192
+ message: g !== void 0 ? "Images loaded from storage" : "Images load error",
4193
+ success: g !== void 0
4181
4194
  };
4182
4195
  };
4183
4196
  /**
@@ -4218,13 +4231,13 @@ function Ka(h, t) {
4218
4231
  const l = () => {
4219
4232
  if (o)
4220
4233
  return o;
4221
- const p = indexedDB.open(h);
4222
- return p.onupgradeneeded = () => p.result.createObjectStore(t), o = Hn(p), o.then((E) => {
4223
- E.onclose = () => o = void 0;
4234
+ const g = indexedDB.open(h);
4235
+ return g.onupgradeneeded = () => g.result.createObjectStore(t), o = Hn(g), o.then((v) => {
4236
+ v.onclose = () => o = void 0;
4224
4237
  }, () => {
4225
4238
  }), o;
4226
4239
  };
4227
- return (p, E) => l().then((C) => E(C.transaction(t, p).objectStore(t)));
4240
+ return (g, v) => l().then((T) => v(T.transaction(t, g).objectStore(t)));
4228
4241
  }
4229
4242
  let Un;
4230
4243
  function Gr() {
@@ -4264,12 +4277,12 @@ class Kr {
4264
4277
  if (!o.success)
4265
4278
  return 400;
4266
4279
  const l = Y(t);
4267
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((p) => (console.error(
4280
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4268
4281
  "%cstorage",
4269
4282
  c.STORAGE,
4270
4283
  _.CLOUD,
4271
4284
  t,
4272
- p.message
4285
+ g.message
4273
4286
  ), 400));
4274
4287
  };
4275
4288
  /**
@@ -4282,12 +4295,12 @@ class Kr {
4282
4295
  if (!o.success)
4283
4296
  return 400;
4284
4297
  const l = Y(t);
4285
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((p) => (console.error(
4298
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4286
4299
  "%cstorage",
4287
4300
  c.STORAGE,
4288
4301
  _.SERIES,
4289
4302
  t,
4290
- p.message
4303
+ g.message
4291
4304
  ), 400));
4292
4305
  };
4293
4306
  /**
@@ -4300,12 +4313,12 @@ class Kr {
4300
4313
  if (!o.success)
4301
4314
  return 400;
4302
4315
  const l = Y(t);
4303
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((p) => (console.error(
4316
+ return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4304
4317
  "%cstorage",
4305
4318
  c.STORAGE,
4306
4319
  _.MESSAGES,
4307
4320
  t,
4308
- p.message
4321
+ g.message
4309
4322
  ), 400));
4310
4323
  };
4311
4324
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -4341,15 +4354,15 @@ class Kr {
4341
4354
  data: null,
4342
4355
  message: `Dashboard ${t.data.id} saved to storage`,
4343
4356
  success: !0
4344
- })).catch((p) => (console.error(
4357
+ })).catch((g) => (console.error(
4345
4358
  "%cstorage",
4346
4359
  c.STORAGE,
4347
4360
  _.WIDGET,
4348
4361
  t,
4349
- p.message
4362
+ g.message
4350
4363
  ), {
4351
4364
  data: null,
4352
- message: `Slide ${t.data.id} save error: ${p.message}`,
4365
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4353
4366
  success: !1
4354
4367
  }));
4355
4368
  };
@@ -4382,15 +4395,15 @@ class Kr {
4382
4395
  data: null,
4383
4396
  message: `Widget ${t.data.id} saved to storage`,
4384
4397
  success: !0
4385
- })).catch((p) => (console.error(
4398
+ })).catch((g) => (console.error(
4386
4399
  "%cstorage",
4387
4400
  c.STORAGE,
4388
4401
  _.WIDGET,
4389
4402
  t,
4390
- p.message
4403
+ g.message
4391
4404
  ), {
4392
4405
  data: null,
4393
- message: `Slide ${t.data.id} save error: ${p.message}`,
4406
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4394
4407
  success: !1
4395
4408
  }));
4396
4409
  };
@@ -4443,15 +4456,15 @@ class Kr {
4443
4456
  data: null,
4444
4457
  message: `Slide ${t.data.id} saved to storage`,
4445
4458
  success: !0
4446
- })).catch((p) => (console.error(
4459
+ })).catch((g) => (console.error(
4447
4460
  "%cstorage",
4448
4461
  c.STORAGE,
4449
4462
  _.SLIDE,
4450
4463
  t,
4451
- p.message
4464
+ g.message
4452
4465
  ), {
4453
4466
  data: null,
4454
- message: `Slide ${t.data.id} save error: ${p.message}`,
4467
+ message: `Slide ${t.data.id} save error: ${g.message}`,
4455
4468
  success: !1
4456
4469
  }));
4457
4470
  };
@@ -4479,15 +4492,15 @@ class Kr {
4479
4492
  data: null,
4480
4493
  message: `Presentation ${t.data.id} saved to storage`,
4481
4494
  success: !0
4482
- })).catch((p) => (console.error(
4495
+ })).catch((g) => (console.error(
4483
4496
  "%cstorage",
4484
4497
  c.STORAGE,
4485
4498
  _.PRESENTATION,
4486
4499
  t,
4487
- p.message
4500
+ g.message
4488
4501
  ), {
4489
4502
  data: null,
4490
- message: `Presentation ${t.data.id} save error: ${p.message}`,
4503
+ message: `Presentation ${t.data.id} save error: ${g.message}`,
4491
4504
  success: !1
4492
4505
  }));
4493
4506
  };
@@ -4598,8 +4611,8 @@ class Br {
4598
4611
  const l = Y(t);
4599
4612
  try {
4600
4613
  return localStorage.setObject(l, o), 201;
4601
- } catch (p) {
4602
- return console.error("%cstorage", c.STORAGE, _.CLOUD, t, p), 400;
4614
+ } catch (g) {
4615
+ return console.error("%cstorage", c.STORAGE, _.CLOUD, t, g), 400;
4603
4616
  }
4604
4617
  };
4605
4618
  /**
@@ -4612,8 +4625,8 @@ class Br {
4612
4625
  const l = Y(t);
4613
4626
  try {
4614
4627
  return localStorage.setObject(l, o), 201;
4615
- } catch (p) {
4616
- return console.error("%cstorage", c.STORAGE, _.SERIES, t, p), 400;
4628
+ } catch (g) {
4629
+ return console.error("%cstorage", c.STORAGE, _.SERIES, t, g), 400;
4617
4630
  }
4618
4631
  };
4619
4632
  /**
@@ -4626,8 +4639,8 @@ class Br {
4626
4639
  const l = Y(t);
4627
4640
  try {
4628
4641
  return localStorage.setObject(l, o), 200;
4629
- } catch (p) {
4630
- return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, p), 400;
4642
+ } catch (g) {
4643
+ return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, g), 400;
4631
4644
  }
4632
4645
  };
4633
4646
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -4933,8 +4946,8 @@ class Lr {
4933
4946
  const l = Y(t);
4934
4947
  try {
4935
4948
  return sessionStorage.setObject(l, o), 201;
4936
- } catch (p) {
4937
- return console.error("%cstorage", c.STORAGE, _.CLOUD, t, p), 400;
4949
+ } catch (g) {
4950
+ return console.error("%cstorage", c.STORAGE, _.CLOUD, t, g), 400;
4938
4951
  }
4939
4952
  };
4940
4953
  /**
@@ -4947,8 +4960,8 @@ class Lr {
4947
4960
  const l = Y(t);
4948
4961
  try {
4949
4962
  return sessionStorage.setObject(l, o), 201;
4950
- } catch (p) {
4951
- return console.error("%cstorage", c.STORAGE, _.SERIES, t, p), 400;
4963
+ } catch (g) {
4964
+ return console.error("%cstorage", c.STORAGE, _.SERIES, t, g), 400;
4952
4965
  }
4953
4966
  };
4954
4967
  /**
@@ -4961,8 +4974,8 @@ class Lr {
4961
4974
  const l = Y(t);
4962
4975
  try {
4963
4976
  return sessionStorage.setObject(l, o), 200;
4964
- } catch (p) {
4965
- return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, p), 400;
4977
+ } catch (g) {
4978
+ return console.error("%cstorage", c.STORAGE, _.MESSAGES, t, g), 400;
4966
4979
  }
4967
4980
  };
4968
4981
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -5268,8 +5281,8 @@ class Wr {
5268
5281
  const l = Y(t);
5269
5282
  try {
5270
5283
  return window.BuzzCasting.WidgetData[l] = o, 201;
5271
- } catch (p) {
5272
- return console.error("%cstorage", c.STORAGE, "set", t, p), 400;
5284
+ } catch (g) {
5285
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5273
5286
  }
5274
5287
  };
5275
5288
  /**
@@ -5282,8 +5295,8 @@ class Wr {
5282
5295
  const l = Y(t);
5283
5296
  try {
5284
5297
  return window.BuzzCasting.WidgetData[l] = o, 201;
5285
- } catch (p) {
5286
- return console.error("%cstorage", c.STORAGE, "set", t, p), 400;
5298
+ } catch (g) {
5299
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5287
5300
  }
5288
5301
  };
5289
5302
  /**
@@ -5296,8 +5309,8 @@ class Wr {
5296
5309
  const l = Y(t);
5297
5310
  try {
5298
5311
  return window.BuzzCasting.WidgetData[l] = o, 201;
5299
- } catch (p) {
5300
- return console.error("%cstorage", c.STORAGE, "set", t, p), 400;
5312
+ } catch (g) {
5313
+ return console.error("%cstorage", c.STORAGE, "set", t, g), 400;
5301
5314
  }
5302
5315
  };
5303
5316
  cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
@@ -5585,21 +5598,21 @@ class Ja {
5585
5598
  o.push(this.api.get(l));
5586
5599
  }), o.forEach(async (l) => {
5587
5600
  await l.then(
5588
- async (p) => await this.processResponse(p)
5601
+ async (g) => await this.processResponse(g)
5589
5602
  );
5590
5603
  });
5591
5604
  };
5592
5605
  processResponse = async (t) => {
5593
5606
  let o, l = 400;
5594
5607
  if (t.success === !0) {
5595
- const p = this.subscribers[t.query.widget];
5596
- let E = "";
5608
+ const g = this.subscribers[t.query.widget];
5609
+ let v = "";
5597
5610
  switch (t.query.type) {
5598
5611
  case _.MESSAGES:
5599
- let C;
5600
- C = t.data.messages.filter(
5612
+ let T;
5613
+ T = t.data.messages.filter(
5601
5614
  (K) => K.id !== null
5602
- ), t.data.messages = C, E = t.data.messages.length > 0 ? Fn(t.data.messages[0].utc) : "none", p?.hash && p.hash === E ? (G(3, [
5615
+ ), t.data.messages = T, v = t.data.messages.length > 0 ? Fn(t.data.messages[0].utc) : "none", g?.hash && g.hash === v ? (G(3, [
5603
5616
  "%cload%c %cmessages%c %cno updates",
5604
5617
  c.OK,
5605
5618
  c.NONE,
@@ -5607,10 +5620,10 @@ class Ja {
5607
5620
  c.NONE,
5608
5621
  c.NO_UPDATES,
5609
5622
  t.query.widget
5610
- ]), G(4, ["%cmessages", c.MESSAGES, t]), l = 204) : (o = t, p.hash = E, l = await this.sm?.setMessages(t.query, t).then(async (K) => (K = 201, this.broadcastUpdate(K, t))));
5623
+ ]), 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))));
5611
5624
  break;
5612
5625
  case _.CLOUD:
5613
- E = Fn(t.data.cloud), p?.hash && p.hash === E ? (G(3, [
5626
+ v = Fn(t.data.cloud), g?.hash && g.hash === v ? (G(3, [
5614
5627
  "%cload%c %ccloud%c %cno updates",
5615
5628
  c.OK,
5616
5629
  c.NONE,
@@ -5618,7 +5631,7 @@ class Ja {
5618
5631
  c.NONE,
5619
5632
  c.NO_UPDATES,
5620
5633
  t.query.widget
5621
- ]), G(4, ["%ccloud", c.CLOUD, t.query]), l = 204) : (p.hash = E, o = {
5634
+ ]), G(4, ["%ccloud", c.CLOUD, t.query]), l = 204) : (g.hash = v, o = {
5622
5635
  data: {
5623
5636
  cloud: t.data
5624
5637
  },
@@ -5628,7 +5641,7 @@ class Ja {
5628
5641
  }, l = await this.sm?.setCloud(t.query, o.data).then((K) => this.broadcastUpdate(K, t)));
5629
5642
  break;
5630
5643
  case _.SERIES:
5631
- E = Fn(t.data.series), p?.hash && p.hash === E ? (G(3, [
5644
+ v = Fn(t.data.series), g?.hash && g.hash === v ? (G(3, [
5632
5645
  "%cload%c %cseries%c %cno updates",
5633
5646
  c.OK,
5634
5647
  c.NONE,
@@ -5636,7 +5649,7 @@ class Ja {
5636
5649
  c.NONE,
5637
5650
  c.NO_UPDATES,
5638
5651
  t.query.widget
5639
- ]), G(4, ["%cseries", c.SERIES, t]), l = 204) : (p.hash = E, o = {
5652
+ ]), G(4, ["%cseries", c.SERIES, t]), l = 204) : (g.hash = v, o = {
5640
5653
  data: t.data,
5641
5654
  message: t.message,
5642
5655
  success: t.success,
@@ -5665,16 +5678,16 @@ class Ja {
5665
5678
  t.query
5666
5679
  ]), t.query.type) {
5667
5680
  case _.MESSAGES:
5668
- return await this.sm?.getMessages(t.query).then((p) => {
5669
- this.broadcastUpdate(201, p);
5681
+ return await this.sm?.getMessages(t.query).then((g) => {
5682
+ this.broadcastUpdate(201, g);
5670
5683
  });
5671
5684
  case _.CLOUD:
5672
- return await this.sm?.getCloud(t.query).then((p) => {
5673
- this.broadcastUpdate(201, p);
5685
+ return await this.sm?.getCloud(t.query).then((g) => {
5686
+ this.broadcastUpdate(201, g);
5674
5687
  });
5675
5688
  case _.SERIES:
5676
- return await this.sm?.getSeries(t.query).then((p) => {
5677
- this.broadcastUpdate(201, p);
5689
+ return await this.sm?.getSeries(t.query).then((g) => {
5690
+ this.broadcastUpdate(201, g);
5678
5691
  });
5679
5692
  }
5680
5693
  return l;
@@ -5804,9 +5817,9 @@ class Ja {
5804
5817
  getDashboard = async (t) => await this.sm?.getDashboard(t);
5805
5818
  getDashboards = async (t) => await this.sm?.getDashboards();
5806
5819
  setDashboard = async (t) => await this.sm?.setDashboard(t);
5807
- loadImages = async () => await this.api.loadImages();
5808
- storeImage = async (t) => await this.api.storeImage(t);
5809
- deleteImage = async (t) => await this.api.deleteImage(t);
5820
+ loadImages = async (t) => await this.api.loadImages(t);
5821
+ storeImage = async (t, o) => await this.api.storeImage(t, o);
5822
+ deleteImage = async (t, o) => await this.api.deleteImage(t, o);
5810
5823
  getImages = async (t) => await this.sm?.getImages(t);
5811
5824
  setImage = async (t) => await this.sm?.setImage(t);
5812
5825
  }
@@ -5907,10 +5920,10 @@ class Za {
5907
5920
  */
5908
5921
  constructor(t, o, l) {
5909
5922
  this.element = t, this.callbacks = o, l = typeof l < "u" ? l : "buzzcasting-app";
5910
- let p;
5911
- p = { ...t.dataset }, delete p.hmr, p.presentation = window.BuzzCasting.getOptions()?.presentation ?? `${l} not found`, this.query = p, Da(t);
5912
- const E = window.BuzzCasting.getOptions();
5913
- this.storageReader = new Ba(E), this.broadcastChannel = new BroadcastChannel(p.presentation), this.broadcastListener();
5923
+ let g;
5924
+ g = { ...t.dataset }, delete g.hmr, g.presentation = window.BuzzCasting.getOptions()?.presentation ?? `${l} not found`, this.query = g, Da(t);
5925
+ const v = window.BuzzCasting.getOptions();
5926
+ this.storageReader = new Ba(v), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
5914
5927
  }
5915
5928
  addCallbackListener(t) {
5916
5929
  this.callbacks.push(t);
@@ -5927,8 +5940,8 @@ class Za {
5927
5940
  case X.WIDGET_UPDATE:
5928
5941
  try {
5929
5942
  if (l.dashboard === t.dashboard && l.widget === t.widget) {
5930
- const p = await this.getData();
5931
- p?.success && (G(4, [
5943
+ const g = await this.getData();
5944
+ g?.success && (G(4, [
5932
5945
  "%cset%c %cbroadcast%c %cwidget",
5933
5946
  c.OK,
5934
5947
  c.NONE,
@@ -5936,8 +5949,8 @@ class Za {
5936
5949
  c.NONE,
5937
5950
  c.WIDGET,
5938
5951
  this.query
5939
- ]), this.callbacks.forEach(async (E) => {
5940
- E(p);
5952
+ ]), this.callbacks.forEach(async (v) => {
5953
+ v(g);
5941
5954
  }));
5942
5955
  }
5943
5956
  } catch {