buzzcasting-storage 3.16.0 → 3.16.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,8 +1,8 @@
1
- var _ = /* @__PURE__ */ ((f) => (f.CARDS = "cards", f.CLOUD = "cloud", f.DASHBOARD = "dashboard", f.DASHBOARDS = "dashboards", f.IMAGES = "images", f.MESSAGES = "messages", f.PREFERENCE = "preference", f.PREFERENCES = "preferences", f.PRESENTATION = "presentation", f.PRESENTATIONS = "presentations", f.SERIES = "series", f.SLIDE = "slide", f.SLIDES = "slides", f.TOPICS = "topics", f.WIDGET = "widget", f.WIDGETS = "widgets", f))(_ || {}), i = /* @__PURE__ */ ((f) => (f.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", f.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", f.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", f.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", f.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", f.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", f.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", f.NONE = "color:transparent;background-color:transparent;", f.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", f.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", f.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", f.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", f.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", f.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", f.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", f))(i || {}), J = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.BACKGROUND_UPDATE = "backgroundUpdate", f.BUILDER_PREVIEW = "builderPreview", f.COMPONENT_UPDATE = "componentUpdate", f.APPROVE_MESSAGE = "approveMessage", f.CHANNEL = "channel", f.CLEAN_MESSAGES = "cleanMessages", f.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", f.CLOSE_BUILDER_MODAL = "closeBuilderModal", f.CLOSE_MODAL = "closeModal", f.COLOR_UPDATE = "colorUpdate", f.COMPONENT_INDEX = "componentIndex", f.CSS_SET = "setCss", f.CSS_STORE = "storeCss", f.DASHBOARD_LOAD = "loadDashboard", f.DASHBOARD_STORE = "storeDashboard", f.DASHBOARD_UPDATED = "dashboardUpdated", f.ERROR = "error", f.HIDE_MESSAGE = "hideMessage", f.HIDE_LABELS = "hideLabels", f.IMAGE_GET = "getImage", f.IMAGE_SET = "setImage", f.IMAGE_STORED = "imageStored", f.LAUPPUT_UPDATE = "layoutUpdate", f.PREV_SLIDE = "prevSlide", f.RELOAD_PRESENTATION = "reloadPresentation", f.STAR_MESSAGE = "starMessage", f.GOTO_SLIDE = "gotoSlide", f.NEXT_SLIDE = "nextSlide", f.PREFERENCE_LOAD = "loadPreference", f.PREFERENCE_STORE = "storePreference", f.PREFERENCE_UPDATED = "preferenceUpdated", f.PAUSE_PRESENTATION = "pausePresentation", f.PRESENTATION_READY = "presentationReady", f.PRESENTATION_LOAD = "loadPresentation", f.PRESENTATION_STORE = "storePresentation", f.PRESENTATION_UPDATED = "presentationUpdated", f.ROW_COL_UPDATE = "rowcolupdate", f.SCREENSHOT_TAKE = "takeScreenshot", f.SCREENSHOT_STORE = "storeScreenshot", f.SECTION_UPDATE = "sectionUpdate", f.SHOW_BUILDER_DIALOG = "showBuilderDialog", f.SHOW_BUILDER_MODAL = "showBuilderModal", f.SHOW_MODAL = "showModal", f.SLIDE_DID_LOAD = "slideDidLoad", f.SLIDE_GET = "getSlide", f.SLIDE_GOTO = "slideGoto", f.SLIDE_LOAD = "loadSlide", f.SLIDE_READY = "slideReady", f.SLIDE_SAVED = "slideSaved", f.SLIDE_SET = "setSlide", f.SLIDE_STORE = "storeSlide", f.SLIDE_STORED = "slideStored", f.SLIDE_TRANSITIONER = "slideTransitioner", f.SLIDE_UPDATED = "slideUpdated", f.START_TRANSITIONER = "startTransitioner", f.STORAGE_INIT = "storageInit", f.SUBSCRIBE = "subscribe", f.SUSPEND_ACCOUNT = "suspendAccount", f.SWITCH_PRESENTATION = "switchPresentation", f.REMOVE_CLOUD = "removeCloud", f.UPDATE = "update", f.UPLOAD_COMPLETED = "uploadCompleted", f.VERSION = "version", f.WIDGETS_CLEAR = "widgetsClear", f.WIDGET_DID_LOAD = "widgetDidLoad", f.WIDGET_DID_UPDATE = "widgetDidUpdate", f.WIDGET_LOAD = "widgetLoad", f.WIDGET_STORE = "widgetStore", f.WIDGET_UPDATE = "widgetUpdate", f.WS_API_REQUEST = "wsApiRequest", f.WS_API_RESPONSE = "wsApiResponse", f.WS_API_UPDATE = "wsApiRUpdate", f))(J || {}), tr = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(tr || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
1
+ var _ = /* @__PURE__ */ ((f) => (f.CARDS = "cards", f.CLOUD = "cloud", f.DASHBOARD = "dashboard", f.DASHBOARDS = "dashboards", f.IMAGES = "images", f.MESSAGES = "messages", f.PREFERENCE = "preference", f.PREFERENCES = "preferences", f.PRESENTATION = "presentation", f.PRESENTATIONS = "presentations", f.SERIES = "series", f.SLIDE = "slide", f.SLIDES = "slides", f.TOPICS = "topics", f.WIDGET = "widget", f.WIDGETS = "widgets", f))(_ || {}), o = /* @__PURE__ */ ((f) => (f.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", f.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", f.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", f.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", f.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", f.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", f.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", f.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", f.NONE = "color:transparent;background-color:transparent;", f.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", f.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", f.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", f.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", f.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", f.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", f.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", f.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", f))(o || {}), J = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.BACKGROUND_UPDATE = "backgroundUpdate", f.BUILDER_PREVIEW = "builderPreview", f.COMPONENT_UPDATE = "componentUpdate", f.APPROVE_MESSAGE = "approveMessage", f.CHANNEL = "channel", f.CLEAN_MESSAGES = "cleanMessages", f.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", f.CLOSE_BUILDER_MODAL = "closeBuilderModal", f.CLOSE_MODAL = "closeModal", f.COLOR_UPDATE = "colorUpdate", f.COMPONENT_INDEX = "componentIndex", f.CSS_SET = "setCss", f.CSS_STORE = "storeCss", f.DASHBOARD_LOAD = "loadDashboard", f.DASHBOARD_STORE = "storeDashboard", f.DASHBOARD_UPDATED = "dashboardUpdated", f.ERROR = "error", f.HIDE_MESSAGE = "hideMessage", f.HIDE_LABELS = "hideLabels", f.IMAGE_GET = "getImage", f.IMAGE_SET = "setImage", f.IMAGE_STORED = "imageStored", f.LAUPPUT_UPDATE = "layoutUpdate", f.PREV_SLIDE = "prevSlide", f.RELOAD_PRESENTATION = "reloadPresentation", f.STAR_MESSAGE = "starMessage", f.GOTO_SLIDE = "gotoSlide", f.NEXT_SLIDE = "nextSlide", f.PREFERENCE_LOAD = "loadPreference", f.PREFERENCE_STORE = "storePreference", f.PREFERENCE_UPDATED = "preferenceUpdated", f.PAUSE_PRESENTATION = "pausePresentation", f.PRESENTATION_READY = "presentationReady", f.PRESENTATION_LOAD = "loadPresentation", f.PRESENTATION_STORE = "storePresentation", f.PRESENTATION_UPDATED = "presentationUpdated", f.ROW_COL_UPDATE = "rowcolupdate", f.SCREENSHOT_TAKE = "takeScreenshot", f.SCREENSHOT_STORE = "storeScreenshot", f.SECTION_UPDATE = "sectionUpdate", f.SHOW_BUILDER_DIALOG = "showBuilderDialog", f.SHOW_BUILDER_MODAL = "showBuilderModal", f.SHOW_MODAL = "showModal", f.SLIDE_DID_LOAD = "slideDidLoad", f.SLIDE_GET = "getSlide", f.SLIDE_GOTO = "slideGoto", f.SLIDE_LOAD = "loadSlide", f.SLIDE_READY = "slideReady", f.SLIDE_SAVED = "slideSaved", f.SLIDE_SET = "setSlide", f.SLIDE_STORE = "storeSlide", f.SLIDE_STORED = "slideStored", f.SLIDE_TRANSITIONER = "slideTransitioner", f.SLIDE_UPDATED = "slideUpdated", f.START_TRANSITIONER = "startTransitioner", f.STORAGE_INIT = "storageInit", f.SUBSCRIBE = "subscribe", f.SUSPEND_ACCOUNT = "suspendAccount", f.SWITCH_PRESENTATION = "switchPresentation", f.REMOVE_CLOUD = "removeCloud", f.UPDATE = "update", f.UPLOAD_COMPLETED = "uploadCompleted", f.VERSION = "version", f.WIDGETS_CLEAR = "widgetsClear", f.WIDGET_DID_LOAD = "widgetDidLoad", f.WIDGET_DID_UPDATE = "widgetDidUpdate", f.WIDGET_LOAD = "widgetLoad", f.WIDGET_STORE = "widgetStore", f.WIDGET_UPDATE = "widgetUpdate", f.WS_API_REQUEST = "wsApiRequest", f.WS_API_RESPONSE = "wsApiResponse", f.WS_API_UPDATE = "wsApiRUpdate", f))(J || {}), tr = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(tr || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
2
2
  function Da(f) {
3
3
  const t = {};
4
- for (let o = 0; o < f.length; o++) {
5
- const l = f.item(o);
4
+ for (let i = 0; i < f.length; i++) {
5
+ const l = f.item(i);
6
6
  l?.name && (t[l.name] = l.value);
7
7
  }
8
8
  return t;
@@ -17,28 +17,28 @@ function Ta(f, t) {
17
17
  return f;
18
18
  }
19
19
  function Oe(f, t) {
20
- let o, l, g;
20
+ let i, l, g;
21
21
  if (t.length === 0)
22
22
  return f;
23
- for (o = 0, g = t.length; o < g; o++)
24
- l = t.charCodeAt(o), f = (f << 5) - f + l, f |= 0;
23
+ for (i = 0, g = t.length; i < g; i++)
24
+ l = t.charCodeAt(i), f = (f << 5) - f + l, f |= 0;
25
25
  return f < 0 ? f * -2 : f;
26
26
  }
27
- function Ra(f, t, o) {
27
+ function Ra(f, t, i) {
28
28
  return Object.keys(t).sort().reduce(l, f);
29
29
  function l(g, b) {
30
- return Mn(g, t[b], b, o);
30
+ return Mn(g, t[b], b, i);
31
31
  }
32
32
  }
33
- function Mn(f, t, o, l) {
34
- const g = Oe(Oe(Oe(f, o), xa(t)), typeof t);
33
+ function Mn(f, t, i, l) {
34
+ const g = Oe(Oe(Oe(f, i), xa(t)), typeof t);
35
35
  if (t === null)
36
36
  return Oe(g, "null");
37
37
  if (t === void 0)
38
38
  return Oe(g, "undefined");
39
39
  if (typeof t == "object" || typeof t == "function") {
40
40
  if (l.includes(t))
41
- return Oe(g, `[Circular]${o}`);
41
+ return Oe(g, `[Circular]${i}`);
42
42
  l.push(t);
43
43
  const b = Ra(g, t, l);
44
44
  if (!("valueOf" in t) || typeof t.valueOf != "function")
@@ -58,8 +58,8 @@ function Ur(f) {
58
58
  return Ta(Mn(0, f, "", []).toString(16), 8);
59
59
  }
60
60
  const st = (f) => {
61
- let t = {}, o = f.split(",");
62
- for (let l = 0; l < o.length; l++) t[o[l]] = !0;
61
+ let t = {}, i = f.split(",");
62
+ for (let l = 0; l < i.length; l++) t[i[l]] = !0;
63
63
  return t;
64
64
  };
65
65
  st(
@@ -81,13 +81,13 @@ const ka = new BroadcastChannel("logging"), j = async (f = 0, t) => {
81
81
  }, St = (f) => {
82
82
  switch (f?.type) {
83
83
  case _.MESSAGES:
84
- return i.MESSAGES;
84
+ return o.MESSAGES;
85
85
  case _.SERIES:
86
- return i.SERIES;
86
+ return o.SERIES;
87
87
  case _.CLOUD:
88
- return i.CLOUD;
88
+ return o.CLOUD;
89
89
  default:
90
- return i.NO_UPDATES;
90
+ return o.NO_UPDATES;
91
91
  }
92
92
  };
93
93
  function Y(f) {
@@ -102,10 +102,10 @@ function Ca(f) {
102
102
  return f;
103
103
  }
104
104
  function _t(f, t) {
105
- let o, l, g, b, I;
105
+ let i, l, g, b, I;
106
106
  switch (f.moderation) {
107
107
  case tr.BEFORE:
108
- o = /* @__PURE__ */ new Date(), l = f.beforeTime?.split(":"), g = Number.parseInt(l ? l[0] : "00"), b = Number.parseInt(l ? l[1] : "00"), I = Number.parseInt(l ? l[2] : "00"), t.before = o.setHours(g, b, I, 0) / 1e3, t.period || (t.period = o.getDay() === 1 ? 72 : 24);
108
+ i = /* @__PURE__ */ new Date(), l = f.beforeTime?.split(":"), g = Number.parseInt(l ? l[0] : "00"), b = Number.parseInt(l ? l[1] : "00"), I = Number.parseInt(l ? l[2] : "00"), t.before = i.setHours(g, b, I, 0) / 1e3, t.period || (t.period = i.getDay() === 1 ? 72 : 24);
109
109
  break;
110
110
  case tr.DELAYED:
111
111
  f.delay && f.delay > 0 && (t.delay = `${f.delay}`);
@@ -118,17 +118,17 @@ function _t(f, t) {
118
118
  }
119
119
  return t;
120
120
  }
121
- const $a = "3.15.14";
121
+ const $a = "3.16.0";
122
122
  async function* ja(f) {
123
123
  const t = f.pipeThrough(new TextDecoderStream("utf-8")).getReader();
124
- let o = "";
124
+ let i = "";
125
125
  for (; ; ) {
126
126
  const { done: l, value: g } = await t.read();
127
127
  if (l) break;
128
128
  for (const b of g.split(`
129
129
  `))
130
130
  try {
131
- o += b, yield JSON.parse(o), o = "";
131
+ i += b, yield JSON.parse(i), i = "";
132
132
  } catch {
133
133
  }
134
134
  }
@@ -170,32 +170,32 @@ class Ga {
170
170
  };
171
171
  };
172
172
  async get(t) {
173
- const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
173
+ const { version: i } = this.options, l = this.headers(), g = Object.assign({}, t);
174
174
  delete g.type, delete g.hash, delete g.order, g.topics = `${g.dashboard}-${g.widget}`, delete g.presentation;
175
175
  const b = Object.keys(g).length > 0 ? `?${new URLSearchParams(g).toString()}` : "";
176
176
  let I = "";
177
177
  switch (t.type) {
178
178
  case _.MESSAGES:
179
- I = i.MESSAGES;
179
+ I = o.MESSAGES;
180
180
  break;
181
181
  case _.SERIES:
182
- I = i.SERIES;
182
+ I = o.SERIES;
183
183
  break;
184
184
  case _.CLOUD:
185
- I = i.CLOUD;
185
+ I = o.CLOUD;
186
186
  break;
187
187
  }
188
188
  return j(3, [
189
189
  `%cfetch%c %capi%c %c${t.type}`,
190
- i.OK,
191
- i.NONE,
192
- i.API,
193
- i.NONE,
190
+ o.OK,
191
+ o.NONE,
192
+ o.API,
193
+ o.NONE,
194
194
  I,
195
195
  t.widget,
196
196
  g
197
197
  ]), await fetch(
198
- [this.url, "api", o, t.type].join("/") + b,
198
+ [this.url, "api", i, t.type].join("/") + b,
199
199
  { ...l, method: "get" }
200
200
  ).then(async (M) => {
201
201
  if (!M.ok)
@@ -204,8 +204,8 @@ class Ga {
204
204
  }).then((M) => M.json()).then((M) => (M.query = t, M)).catch((M) => ({ success: !1, message: `${M}`, data: null, query: t }));
205
205
  }
206
206
  async ndjson(t) {
207
- const { version: o } = this.options, l = this.headers(), g = await fetch(
208
- `${[this.url, "api", o, "stream"].join("/")}`,
207
+ const { version: i } = this.options, l = this.headers(), g = await fetch(
208
+ `${[this.url, "api", i, "stream"].join("/")}`,
209
209
  {
210
210
  ...l,
211
211
  body: JSON.stringify({ data: t }),
@@ -216,17 +216,17 @@ class Ga {
216
216
  console.log("Received", b);
217
217
  }
218
218
  async hideMessage(t) {
219
- const { version: o } = this.options, l = this.headers(), g = "?action=visible";
219
+ const { version: i } = this.options, l = this.headers(), g = "?action=visible";
220
220
  return j(3, [
221
221
  "%capi%c %cput",
222
- i.API,
223
- i.NONE,
224
- i.GET_DATA,
222
+ o.API,
223
+ o.NONE,
224
+ o.GET_DATA,
225
225
  J.HIDE_MESSAGE,
226
226
  t.widget,
227
227
  t.id
228
228
  ]), await fetch(
229
- [this.url, "api", o, "messages", t.id].join("/") + g,
229
+ [this.url, "api", i, "messages", t.id].join("/") + g,
230
230
  { ...l, method: "put" }
231
231
  ).then((b) => {
232
232
  if (!b.ok)
@@ -235,19 +235,19 @@ class Ga {
235
235
  }).then((b) => b.json()).catch((b) => ({ succes: !1, message: b, data: [] }));
236
236
  }
237
237
  async hideLabels(t) {
238
- const { version: o } = this.options, l = this.formHeaders(), g = new URLSearchParams(), b = t.labels || [];
238
+ const { version: i } = this.options, l = this.formHeaders(), g = new URLSearchParams(), b = t.labels || [];
239
239
  for (const [I, M] of b.entries())
240
240
  g.append(`custom_filters[${I}]`, M);
241
241
  return console.info(
242
242
  "%capi%c %cput",
243
- i.API,
244
- i.NONE,
245
- i.GET_DATA,
243
+ o.API,
244
+ o.NONE,
245
+ o.GET_DATA,
246
246
  J.HIDE_LABELS,
247
247
  t.widget,
248
248
  b
249
249
  ), await fetch(
250
- [this.url, "api", o, t.type, t.widget].join("/"),
250
+ [this.url, "api", i, t.type, t.widget].join("/"),
251
251
  { ...l, body: g, method: "put" }
252
252
  ).then((I) => {
253
253
  if (!I.ok)
@@ -256,17 +256,17 @@ class Ga {
256
256
  }).then((I) => I.json()).catch((I) => ({ succes: !1, message: I, data: [] }));
257
257
  }
258
258
  async loadSlide(t) {
259
- const { version: o } = this.options, l = this.headers(), g = Object.assign({}, t);
259
+ const { version: i } = this.options, l = this.headers(), g = Object.assign({}, t);
260
260
  return delete g.type, delete g.hash, j(3, [
261
261
  "%cload%c %capi%c %cslide",
262
- i.OK,
263
- i.NONE,
264
- i.API,
265
- i.NONE,
266
- i.SLIDE,
262
+ o.OK,
263
+ o.NONE,
264
+ o.API,
265
+ o.NONE,
266
+ o.SLIDE,
267
267
  t.id
268
268
  ]), await fetch(
269
- [this.url, "api", o, "slides", t.id].join("/"),
269
+ [this.url, "api", i, "slides", t.id].join("/"),
270
270
  { ...l, method: "get" }
271
271
  ).then(async (b) => {
272
272
  if (!b.ok)
@@ -287,20 +287,20 @@ class Ga {
287
287
  * @returns
288
288
  */
289
289
  async storeSlide(t) {
290
- const { version: o } = this.options, l = this.formHeaders();
290
+ const { version: i } = this.options, l = this.formHeaders();
291
291
  delete t.update, delete t.type;
292
292
  const g = JSON.stringify(t);
293
293
  return j(3, [
294
294
  "%cput%c %capi%c %cslide",
295
- i.OK,
296
- i.NONE,
297
- i.API,
298
- i.NONE,
299
- i.SLIDE,
295
+ o.OK,
296
+ o.NONE,
297
+ o.API,
298
+ o.NONE,
299
+ o.SLIDE,
300
300
  J.SLIDE_STORE,
301
301
  t.id
302
302
  ]), await fetch(
303
- [this.url, "api", o, "slides", t.id].join("/"),
303
+ [this.url, "api", i, "slides", t.id].join("/"),
304
304
  { ...l, body: g, method: "put" }
305
305
  ).then((b) => {
306
306
  if (!b.ok)
@@ -309,17 +309,17 @@ class Ga {
309
309
  }).then((b) => b.json()).catch((b) => ({ succes: !1, message: b, data: [] }));
310
310
  }
311
311
  async loadPresentation(t) {
312
- const { version: o } = this.options, l = this.headers();
312
+ const { version: i } = this.options, l = this.headers();
313
313
  return delete t.update, j(3, [
314
314
  "%cload%c %capi%c %cpresentation",
315
- i.OK,
316
- i.NONE,
317
- i.API,
318
- i.NONE,
319
- i.PRESENTATION,
315
+ o.OK,
316
+ o.NONE,
317
+ o.API,
318
+ o.NONE,
319
+ o.PRESENTATION,
320
320
  t.id
321
321
  ]), await fetch(
322
- [this.url, "api", o, _.PRESENTATIONS, t.id].join("/"),
322
+ [this.url, "api", i, _.PRESENTATIONS, t.id].join("/"),
323
323
  { ...l, method: "get" }
324
324
  ).then(async (g) => {
325
325
  if (!g.ok)
@@ -338,11 +338,11 @@ class Ga {
338
338
  * @returns
339
339
  */
340
340
  async storePresentation(t) {
341
- const { version: o } = this.options, l = this.formHeaders();
341
+ const { version: i } = this.options, l = this.formHeaders();
342
342
  delete t.update;
343
343
  const g = JSON.stringify(t);
344
- return j(2, ["%capi%c %cput", i.API, i.NONE, i.PRESENTATION, t.name]), await fetch(
345
- [this.url, "api", o, _.PRESENTATIONS, t.id].join("/"),
344
+ return j(2, ["%capi%c %cput", o.API, o.NONE, o.PRESENTATION, t.name]), await fetch(
345
+ [this.url, "api", i, _.PRESENTATIONS, t.id].join("/"),
346
346
  { ...l, body: g, method: "put" }
347
347
  ).then((b) => {
348
348
  if (!b.ok)
@@ -351,17 +351,17 @@ class Ga {
351
351
  }).then((b) => b.json()).catch((b) => ({ succes: !1, message: b, data: [] }));
352
352
  }
353
353
  async loadPreference(t) {
354
- const { version: o } = this.options, l = this.headers();
354
+ const { version: i } = this.options, l = this.headers();
355
355
  return j(3, [
356
356
  "%cload%c %capi%c %cpreference",
357
- i.OK,
358
- i.NONE,
359
- i.API,
360
- i.NONE,
361
- i.APP,
357
+ o.OK,
358
+ o.NONE,
359
+ o.API,
360
+ o.NONE,
361
+ o.APP,
362
362
  t.id
363
363
  ]), await fetch(
364
- [this.url, "api", o, _.PREFERENCES, t.id].join("/"),
364
+ [this.url, "api", i, _.PREFERENCES, t.id].join("/"),
365
365
  { ...l, method: "get" }
366
366
  ).then(async (g) => {
367
367
  if (!g.ok)
@@ -370,17 +370,17 @@ class Ga {
370
370
  }).then((g) => g.json()).then((g) => (t.type = "preference", g.query = t, g)).catch((g) => ({ success: !1, message: `${g}`, data: null }));
371
371
  }
372
372
  async storePreference(t) {
373
- const { version: o } = this.options, l = this.formHeaders();
373
+ const { version: i } = this.options, l = this.formHeaders();
374
374
  delete t.update;
375
375
  const g = JSON.stringify({ data: t });
376
376
  return j(3, [
377
377
  "%capi%c %cstorePreference",
378
- i.API,
379
- i.NONE,
380
- i.APP,
378
+ o.API,
379
+ o.NONE,
380
+ o.APP,
381
381
  t.id
382
382
  ]), await fetch(
383
- [this.url, "api", o, _.PREFERENCES, t.id].join("/"),
383
+ [this.url, "api", i, _.PREFERENCES, t.id].join("/"),
384
384
  { ...l, body: g, method: "put" }
385
385
  ).then((b) => {
386
386
  if (!b.ok)
@@ -389,9 +389,9 @@ class Ga {
389
389
  }).then((b) => b.json()).catch((b) => ({ succes: !1, message: b, data: [] }));
390
390
  }
391
391
  async loadDashboards(t) {
392
- const { version: o } = this.options, l = this.headers();
393
- return j(3, ["%capi%c %cdashboards", i.API, i.NONE, i.WIDGET]), await fetch(
394
- [this.url, "api", o, _.WIDGETS, t?.id || ""].join("/"),
392
+ const { version: i } = this.options, l = this.headers();
393
+ return j(3, ["%capi%c %cdashboards", o.API, o.NONE, o.WIDGET]), await fetch(
394
+ [this.url, "api", i, _.WIDGETS, t?.id || ""].join("/"),
395
395
  {
396
396
  ...l,
397
397
  method: "get"
@@ -407,16 +407,16 @@ class Ga {
407
407
  })).catch((g) => ({ success: !1, message: `${g}`, data: null }));
408
408
  }
409
409
  async loadImages(t) {
410
- const { version: o } = this.options, l = this.headers();
410
+ const { version: i } = this.options, l = this.headers();
411
411
  return j(3, [
412
412
  "%cload%c %capi%c %cimage",
413
- i.OK,
414
- i.NONE,
415
- i.API,
416
- i.NONE,
417
- i.WIDGET
413
+ o.OK,
414
+ o.NONE,
415
+ o.API,
416
+ o.NONE,
417
+ o.WIDGET
418
418
  ]), await fetch(
419
- `${[this.url, "api", o, _.IMAGES].join(
419
+ `${[this.url, "api", i, _.IMAGES].join(
420
420
  "/"
421
421
  )}?folder=${t}`,
422
422
  {
@@ -434,15 +434,15 @@ class Ga {
434
434
  })).catch((g) => ({ success: !1, message: `${g}`, data: null }));
435
435
  }
436
436
  async storeImage(t) {
437
- const { version: o } = this.options, l = this.fileHeaders(), g = t;
437
+ const { version: i } = this.options, l = this.fileHeaders(), g = t;
438
438
  return console.info(
439
439
  "%capi%c %cstoreImage",
440
- i.API,
441
- i.NONE,
442
- i.WIDGET,
440
+ o.API,
441
+ o.NONE,
442
+ o.WIDGET,
443
443
  t.get("name")
444
444
  ), await fetch(
445
- `${[this.url, "api", o, _.IMAGES].join(
445
+ `${[this.url, "api", i, _.IMAGES].join(
446
446
  "/"
447
447
  )}?folder=${t.get("folder")}`,
448
448
  {
@@ -456,16 +456,16 @@ class Ga {
456
456
  return b;
457
457
  }).then((b) => b.json()).catch((b) => ({ succes: !1, message: b, data: [] }));
458
458
  }
459
- async deleteImage(t, o) {
459
+ async deleteImage(t, i) {
460
460
  const { version: l } = this.options, g = this.formHeaders();
461
461
  return console.info(
462
462
  "%capi%c %cdeleteImage",
463
- i.API,
464
- i.NONE,
465
- i.WIDGET,
466
- o
463
+ o.API,
464
+ o.NONE,
465
+ o.WIDGET,
466
+ i
467
467
  ), await fetch(
468
- `${[this.url, "api", l, _.IMAGES, o].join(
468
+ `${[this.url, "api", l, _.IMAGES, i].join(
469
469
  "/"
470
470
  )}?folder=${t}`,
471
471
  { ...g, method: "delete" }
@@ -483,11 +483,11 @@ function Ka(f) {
483
483
  var rr = { exports: {} }, La = rr.exports, jn;
484
484
  function Ba() {
485
485
  return jn || (jn = 1, function(f, t) {
486
- (function(o, l) {
486
+ (function(i, l) {
487
487
  f.exports = l();
488
488
  })(La, function() {
489
- var o = function(e, r) {
490
- return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
489
+ var i = function(e, r) {
490
+ return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
491
491
  n.__proto__ = a;
492
492
  } || function(n, a) {
493
493
  for (var s in a) Object.prototype.hasOwnProperty.call(a, s) && (n[s] = a[s]);
@@ -1249,7 +1249,7 @@ function Ba() {
1249
1249
  function w() {
1250
1250
  this.constructor = p;
1251
1251
  }
1252
- o(p, m), p.prototype = m === null ? Object.create(m) : (w.prototype = m.prototype, new w());
1252
+ i(p, m), p.prototype = m === null ? Object.create(m) : (w.prototype = m.prototype, new w());
1253
1253
  }(s, r = e), Object.defineProperty(s.prototype, "db", { get: function() {
1254
1254
  return n;
1255
1255
  }, enumerable: !1, configurable: !0 }), s.prototype.table = function() {
@@ -3574,62 +3574,62 @@ class Kn {
3574
3574
  widget: "id,name,dashboard_id,type,update"
3575
3575
  }), this.db.open();
3576
3576
  }
3577
- getHash = async (t, o) => {
3578
- const l = await this.db.table(t).where({ id: o.widget }).last().catch(() => {
3579
- j(2, [`%chash%c %capi%C %c${t}`, i.API, i.NONE, i.APP]);
3577
+ getHash = async (t, i) => {
3578
+ const l = await this.db.table(t).where({ id: i.widget }).last().catch(() => {
3579
+ j(2, [`%chash%c %capi%C %c${t}`, o.API, o.NONE, o.APP]);
3580
3580
  });
3581
3581
  return j(3, [
3582
3582
  `%cget%c %chash%c %c${t}`,
3583
- i.OK,
3584
- i.NONE,
3585
- i.API,
3586
- i.NONE,
3587
- i.APP,
3588
- o
3583
+ o.OK,
3584
+ o.NONE,
3585
+ o.API,
3586
+ o.NONE,
3587
+ o.APP,
3588
+ i
3589
3589
  ]), l?.hash ?? "none";
3590
3590
  };
3591
- setHash = async (t, o) => await this.db.table(t).where({
3592
- id: o.widget
3593
- }).modify({ hash: o.hash }).then(() => (j(3, [
3591
+ setHash = async (t, i) => await this.db.table(t).where({
3592
+ id: i.widget
3593
+ }).modify({ hash: i.hash }).then(() => (j(3, [
3594
3594
  `%cset%c %chash%c %c${t}`,
3595
- i.OK,
3596
- i.NONE,
3597
- i.API,
3598
- i.NONE,
3599
- i.APP,
3600
- o
3595
+ o.OK,
3596
+ o.NONE,
3597
+ o.API,
3598
+ o.NONE,
3599
+ o.APP,
3600
+ i
3601
3601
  ]), 201)).catch((l) => (j(2, [
3602
3602
  `%cget%c %chash%c %c${t}`,
3603
- i.OK,
3604
- i.NONE,
3605
- i.API,
3606
- i.NONE,
3607
- i.APP,
3608
- o,
3603
+ o.OK,
3604
+ o.NONE,
3605
+ o.API,
3606
+ o.NONE,
3607
+ o.APP,
3608
+ i,
3609
3609
  l.message
3610
3610
  ]), 400));
3611
3611
  clearCards = async () => await this.db.table("cards").clear().then(() => 201).catch((t) => (j(2, [
3612
3612
  "%cset%c %cstorage%c %ccards",
3613
- i.KO,
3614
- i.NONE,
3615
- i.STORAGE,
3616
- i.NONE,
3617
- i.MESSAGES,
3613
+ o.KO,
3614
+ o.NONE,
3615
+ o.STORAGE,
3616
+ o.NONE,
3617
+ o.MESSAGES,
3618
3618
  "clear card hashes"
3619
3619
  ]), 400));
3620
3620
  setCards = async (t) => await this.db.table("cards").put({
3621
3621
  id: t.widget,
3622
3622
  dashboard_id: t.dashboard,
3623
3623
  hash: t.hash
3624
- }).then(() => 201).catch((o) => (j(2, [
3624
+ }).then(() => 201).catch((i) => (j(2, [
3625
3625
  "%cset%c %cstorage%c %ccloud",
3626
- i.KO,
3627
- i.NONE,
3628
- i.STORAGE,
3629
- i.NONE,
3630
- i.CLOUD,
3626
+ o.KO,
3627
+ o.NONE,
3628
+ o.STORAGE,
3629
+ o.NONE,
3630
+ o.CLOUD,
3631
3631
  t,
3632
- o.message
3632
+ i.message
3633
3633
  ]), 400));
3634
3634
  /**
3635
3635
  * Retrieve Cloud Data
@@ -3640,11 +3640,11 @@ class Kn {
3640
3640
  if (t.widget === "")
3641
3641
  return j(3, [
3642
3642
  "%cget%c %cstorage%c %ccloud",
3643
- i.NO_UPDATES,
3644
- i.NONE,
3645
- i.STORAGE,
3646
- i.NONE,
3647
- i.CLOUD,
3643
+ o.NO_UPDATES,
3644
+ o.NONE,
3645
+ o.STORAGE,
3646
+ o.NONE,
3647
+ o.CLOUD,
3648
3648
  t
3649
3649
  ]), {
3650
3650
  data: null,
@@ -3652,24 +3652,24 @@ class Kn {
3652
3652
  success: !1,
3653
3653
  query: t
3654
3654
  };
3655
- const o = await this.db.table(_.CLOUD).where({ id: t.widget }).last().catch(() => {
3656
- j(2, ["%capi%C %ccloud", i.API, i.NONE, i.CLOUD, t.widget]);
3655
+ const i = await this.db.table(_.CLOUD).where({ id: t.widget }).last().catch(() => {
3656
+ j(2, ["%capi%C %ccloud", o.API, o.NONE, o.CLOUD, t.widget]);
3657
3657
  });
3658
- if (typeof o > "u")
3658
+ if (typeof i > "u")
3659
3659
  return { data: null, message: "Cloud Data error", success: !1, query: t };
3660
3660
  const l = {
3661
- data: o?.data ?? null,
3662
- message: o !== void 0 ? "Cloud retrieved successfully" : "Cloud Data error",
3663
- success: o !== void 0,
3661
+ data: i?.data ?? null,
3662
+ message: i !== void 0 ? "Cloud retrieved successfully" : "Cloud Data error",
3663
+ success: i !== void 0,
3664
3664
  query: t
3665
3665
  };
3666
3666
  return j(3, [
3667
3667
  "%cget%c %cstorage%c %ccloud",
3668
- i.OK,
3669
- i.NONE,
3670
- i.STORAGE,
3671
- i.NONE,
3672
- i.CLOUD,
3668
+ o.OK,
3669
+ o.NONE,
3670
+ o.STORAGE,
3671
+ o.NONE,
3672
+ o.CLOUD,
3673
3673
  l
3674
3674
  ]), l;
3675
3675
  };
@@ -3679,49 +3679,49 @@ class Kn {
3679
3679
  * @param data
3680
3680
  * @returns number
3681
3681
  */
3682
- setCloud = async (t, o) => t.type === _.CLOUD && o !== "" ? (j(3, [
3682
+ setCloud = async (t, i) => t.type === _.CLOUD && i !== "" ? (j(3, [
3683
3683
  "%cset%c %cstorage%c %ccloud",
3684
- i.OK,
3685
- i.NONE,
3686
- i.STORAGE,
3687
- i.NONE,
3688
- i.CLOUD,
3689
- o?.title ?? t.widget
3684
+ o.OK,
3685
+ o.NONE,
3686
+ o.STORAGE,
3687
+ o.NONE,
3688
+ o.CLOUD,
3689
+ i?.title ?? t.widget
3690
3690
  ]), await this.db.table(_.CLOUD).put({
3691
3691
  id: t.widget,
3692
3692
  dashboard_id: t.dashboard,
3693
3693
  hash: t.hash,
3694
3694
  // data: data.data,
3695
- data: o
3695
+ data: i
3696
3696
  }).then(() => 201).catch((l) => (j(2, [
3697
3697
  "%cset%c %cstorage%c %ccloud",
3698
- i.KO,
3699
- i.NONE,
3700
- i.STORAGE,
3701
- i.NONE,
3702
- i.CLOUD,
3698
+ o.KO,
3699
+ o.NONE,
3700
+ o.STORAGE,
3701
+ o.NONE,
3702
+ o.CLOUD,
3703
3703
  t,
3704
3704
  l.message
3705
3705
  ]), 400))) : 400;
3706
3706
  getDashboard = async (t) => {
3707
- const o = await this.db.table(_.DASHBOARD).where({ id: t.id }).last().catch(() => {
3708
- j(2, ["%cstorage", i.STORAGE, J.DASHBOARD_LOAD, t.id]);
3707
+ const i = await this.db.table(_.DASHBOARD).where({ id: t.id }).last().catch(() => {
3708
+ j(2, ["%cstorage", o.STORAGE, J.DASHBOARD_LOAD, t.id]);
3709
3709
  });
3710
- return o === void 0 ? {
3710
+ return i === void 0 ? {
3711
3711
  data: null,
3712
3712
  message: `Dashboard ${t.id} Load error`,
3713
3713
  success: !1
3714
- } : (o.message = `Dashboard ${t.id} retrieved from storage`, o.success = !0, o);
3714
+ } : (i.message = `Dashboard ${t.id} retrieved from storage`, i.success = !0, i);
3715
3715
  };
3716
3716
  getDashboards = async (t) => {
3717
- const o = (b) => t?.id === b.id, l = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.DASHBOARD).toArray().then((b) => t?.id ? b.filter(o) : b).then((b) => t?.name ? b.filter(l) : b).catch(() => {
3718
- j(2, ["%cstorage", i.STORAGE, J.DASHBOARD_LOAD, t]);
3717
+ const i = (b) => t?.id === b.id, l = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.DASHBOARD).toArray().then((b) => t?.id ? b.filter(i) : b).then((b) => t?.name ? b.filter(l) : b).catch(() => {
3718
+ j(2, ["%cstorage", o.STORAGE, J.DASHBOARD_LOAD, t]);
3719
3719
  });
3720
3720
  return g !== void 0 && j(3, [
3721
3721
  "%cstorage%c %cdashboards",
3722
- i.STORAGE,
3723
- i.NONE,
3724
- i.WIDGET,
3722
+ o.STORAGE,
3723
+ o.NONE,
3724
+ o.WIDGET,
3725
3725
  t
3726
3726
  ]), {
3727
3727
  data: g !== void 0 ? { dashboards: g, query: t } : null,
@@ -3735,19 +3735,19 @@ class Kn {
3735
3735
  * @returns number
3736
3736
  */
3737
3737
  setDashboard = async (t) => {
3738
- const o = structuredClone(t);
3739
- return delete o.data.widgets, await this.db.table(_.DASHBOARD).put({
3740
- id: o.id,
3741
- name: o.name,
3742
- data: o.data,
3743
- update: o.update
3738
+ const i = structuredClone(t);
3739
+ return delete i.data.widgets, await this.db.table(_.DASHBOARD).put({
3740
+ id: i.id,
3741
+ name: i.name,
3742
+ data: i.data,
3743
+ update: i.update
3744
3744
  }).then(() => ({
3745
3745
  data: null,
3746
- message: `Dashboard ${o.data.id} saved to storage`,
3746
+ message: `Dashboard ${i.data.id} saved to storage`,
3747
3747
  success: !0
3748
- })).catch((l) => (j(4, ["%cstorage", i.STORAGE, _.WIDGET, t, l.message]), {
3748
+ })).catch((l) => (j(4, ["%cstorage", o.STORAGE, _.WIDGET, t, l.message]), {
3749
3749
  data: null,
3750
- message: `Dashboard ${o.data.id} save error: ${l.message}`,
3750
+ message: `Dashboard ${i.data.id} save error: ${l.message}`,
3751
3751
  success: !1
3752
3752
  }));
3753
3753
  };
@@ -3755,20 +3755,20 @@ class Kn {
3755
3755
  * Wipe Message data after expires timestamp
3756
3756
  */
3757
3757
  cleanMessages = async () => {
3758
- const t = Date.now() / 1e3, o = (b) => b.expires < t, l = (b) => b.expires < t;
3759
- return await this.db.table(_.TOPICS).orderBy("expires").filter(o).delete().catch((b) => (console.error(
3758
+ const t = Date.now() / 1e3, i = (b) => b.expires < t, l = (b) => b.expires < t;
3759
+ return await this.db.table(_.TOPICS).orderBy("expires").filter(i).delete().catch((b) => (console.error(
3760
3760
  "%cstorage%c %cclean",
3761
- i.STORAGE,
3762
- i.NONE,
3763
- i.MESSAGES,
3761
+ o.STORAGE,
3762
+ o.NONE,
3763
+ o.MESSAGES,
3764
3764
  b.message
3765
3765
  ), 0)), await this.db.table(_.MESSAGES).orderBy("expires").filter(l).delete().catch((b) => (console.error(
3766
3766
  "%clean%c %cstorage%c %cmessages",
3767
- i.OK,
3768
- i.NONE,
3769
- i.STORAGE,
3770
- i.NONE,
3771
- i.MESSAGES,
3767
+ o.OK,
3768
+ o.NONE,
3769
+ o.STORAGE,
3770
+ o.NONE,
3771
+ o.MESSAGES,
3772
3772
  b.message
3773
3773
  ), 0));
3774
3774
  };
@@ -3781,11 +3781,11 @@ class Kn {
3781
3781
  if (t.widget === "")
3782
3782
  return j(3, [
3783
3783
  "%cget%c %cstorage%c %cmessages",
3784
- i.NO_UPDATES,
3785
- i.NONE,
3786
- i.STORAGE,
3787
- i.NONE,
3788
- i.MESSAGES,
3784
+ o.NO_UPDATES,
3785
+ o.NONE,
3786
+ o.STORAGE,
3787
+ o.NONE,
3788
+ o.MESSAGES,
3789
3789
  t
3790
3790
  ]), {
3791
3791
  data: null,
@@ -3793,13 +3793,13 @@ class Kn {
3793
3793
  success: !1,
3794
3794
  query: t
3795
3795
  };
3796
- const o = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
3797
- o !== "utc" && (t.since = l - 60 * 60 * 24 * 30), this.options.delay !== 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
3796
+ const i = t?.order ?? "utc", l = Math.floor(Date.now() / 1e3);
3797
+ i !== "utc" && (t.since = l - 60 * 60 * 24 * 30), this.options.delay !== 0 ? t.before = l - (this.options.delay || 0) : t.before = l;
3798
3798
  const g = (I) => I.utc > (t?.since || 0), b = (I) => I.utc < (t?.before || l);
3799
3799
  try {
3800
3800
  const I = this.db.table(_.TOPICS).where("widget_id").equals(t.widget).filter(g).filter(b);
3801
3801
  t?.approved === "true" ? I.and((se) => se.approved === 1) : I.and((se) => se.visible === 1), I.reverse();
3802
- const M = await I.limit(t?.limit ?? 25).sortBy(o);
3802
+ const M = await I.limit(t?.limit ?? 25).sortBy(i);
3803
3803
  if (M.length === 0)
3804
3804
  return {
3805
3805
  data: null,
@@ -3821,35 +3821,35 @@ class Kn {
3821
3821
  };
3822
3822
  return j(3, [
3823
3823
  "%cget%c %cstorage%c %cmessages",
3824
- i.OK,
3825
- i.NONE,
3826
- i.STORAGE,
3827
- i.NONE,
3828
- i.MESSAGES,
3824
+ o.OK,
3825
+ o.NONE,
3826
+ o.STORAGE,
3827
+ o.NONE,
3828
+ o.MESSAGES,
3829
3829
  re
3830
3830
  ]), re;
3831
3831
  });
3832
3832
  } catch (I) {
3833
3833
  return j(2, [
3834
3834
  "%cget%c %cstorage%c %cmessages",
3835
- i.OK,
3836
- i.NONE,
3837
- i.STORAGE,
3838
- i.NONE,
3839
- i.NO_UPDATES,
3835
+ o.OK,
3836
+ o.NONE,
3837
+ o.STORAGE,
3838
+ o.NONE,
3839
+ o.NO_UPDATES,
3840
3840
  t,
3841
3841
  I.message
3842
3842
  ]), { data: null, message: "Messages Data error", success: !1 };
3843
3843
  }
3844
3844
  };
3845
- hideMessage = async (t, o) => {
3846
- await this.db.table(_.TOPICS).where("message_id").equals(t).modify({ visible: o ? 1 : 0 }).catch((l) => (console.error(
3845
+ hideMessage = async (t, i) => {
3846
+ await this.db.table(_.TOPICS).where("message_id").equals(t).modify({ visible: i ? 1 : 0 }).catch((l) => (console.error(
3847
3847
  "%chide%c %cstorage%c %cmessage",
3848
- i.KO,
3849
- i.NONE,
3850
- i.STORAGE,
3851
- i.NONE,
3852
- i.HIDE,
3848
+ o.KO,
3849
+ o.NONE,
3850
+ o.STORAGE,
3851
+ o.NONE,
3852
+ o.HIDE,
3853
3853
  l.message
3854
3854
  ), 0));
3855
3855
  };
@@ -3859,20 +3859,20 @@ class Kn {
3859
3859
  * @param data any
3860
3860
  * @returns number
3861
3861
  */
3862
- setMessages = async (t, o) => {
3862
+ setMessages = async (t, i) => {
3863
3863
  if (t.type !== _.MESSAGES)
3864
3864
  return 400;
3865
- const l = o.data.title;
3865
+ const l = i.data.title;
3866
3866
  let g = 0;
3867
3867
  return j(3, [
3868
3868
  "%cset%c %cstorage%c %cmessages",
3869
- i.OK,
3870
- i.NONE,
3871
- i.STORAGE,
3872
- i.NONE,
3873
- i.MESSAGES,
3874
- o?.title ?? t.widget
3875
- ]), await o.data.messages.forEach(async (b) => {
3869
+ o.OK,
3870
+ o.NONE,
3871
+ o.STORAGE,
3872
+ o.NONE,
3873
+ o.MESSAGES,
3874
+ i?.title ?? t.widget
3875
+ ]), await i.data.messages.forEach(async (b) => {
3876
3876
  if (b.id !== null) {
3877
3877
  b.topics[0] = {
3878
3878
  message_id: b.id,
@@ -3890,9 +3890,9 @@ class Kn {
3890
3890
  }).catch((M) => {
3891
3891
  g++, j(4, [
3892
3892
  "%cset%c %cstorage",
3893
- i.KO,
3894
- i.NONE,
3895
- i.STORAGE,
3893
+ o.KO,
3894
+ o.NONE,
3895
+ o.STORAGE,
3896
3896
  "set message",
3897
3897
  `title: ${l}`,
3898
3898
  b,
@@ -3917,22 +3917,22 @@ class Kn {
3917
3917
  await this.db.table(_.TOPICS).put(I).catch((M) => {
3918
3918
  g++, j(4, [
3919
3919
  "%cset%c %cstorage",
3920
- i.KO,
3921
- i.NONE,
3922
- i.STORAGE,
3920
+ o.KO,
3921
+ o.NONE,
3922
+ o.STORAGE,
3923
3923
  "set topic",
3924
3924
  `title: ${l}`,
3925
3925
  b,
3926
3926
  M.message
3927
3927
  ]);
3928
- }), await o.data.topics.forEach(async (M) => {
3928
+ }), await i.data.topics.forEach(async (M) => {
3929
3929
  const te = M.message_id, se = M.visible ? 1 : 0, At = M.approve ? 1 : 0, re = M.title;
3930
3930
  await this.db.table(_.TOPICS).where("message_id").equals(te).modify({ visible: se, approve: At }).catch((ge) => {
3931
3931
  g++, j(4, [
3932
3932
  "%cset%c %cstorage",
3933
- i.KO,
3934
- i.NONE,
3935
- i.STORAGE,
3933
+ o.KO,
3934
+ o.NONE,
3935
+ o.STORAGE,
3936
3936
  "update message visibility",
3937
3937
  `title: ${re}`,
3938
3938
  `widget: ${M.widget_id}`,
@@ -3952,11 +3952,11 @@ class Kn {
3952
3952
  if (t.widget === "")
3953
3953
  return j(3, [
3954
3954
  "%cget%c %cstorage%c %cseries",
3955
- i.NO_UPDATES,
3956
- i.NONE,
3957
- i.STORAGE,
3958
- i.NONE,
3959
- i.CLOUD,
3955
+ o.NO_UPDATES,
3956
+ o.NONE,
3957
+ o.STORAGE,
3958
+ o.NONE,
3959
+ o.CLOUD,
3960
3960
  t
3961
3961
  ]), {
3962
3962
  data: null,
@@ -3964,29 +3964,29 @@ class Kn {
3964
3964
  success: !1,
3965
3965
  query: t
3966
3966
  };
3967
- const o = await this.db.table(_.SERIES).where({ id: t.widget }).last().catch(() => {
3967
+ const i = await this.db.table(_.SERIES).where({ id: t.widget }).last().catch(() => {
3968
3968
  j(2, [
3969
3969
  "%cget%c %cstorage%c %cseries",
3970
- i.KO,
3971
- i.NONE,
3972
- i.STORAGE,
3973
- i.NONE,
3974
- i.SERIES,
3970
+ o.KO,
3971
+ o.NONE,
3972
+ o.STORAGE,
3973
+ o.NONE,
3974
+ o.SERIES,
3975
3975
  t.widget
3976
3976
  ]);
3977
3977
  }), l = {
3978
- data: o?.data ?? null,
3979
- message: o !== void 0 ? "Get Series success" : "Get Series error",
3980
- success: o !== void 0,
3978
+ data: i?.data ?? null,
3979
+ message: i !== void 0 ? "Get Series success" : "Get Series error",
3980
+ success: i !== void 0,
3981
3981
  query: t
3982
3982
  };
3983
3983
  return j(3, [
3984
3984
  "%cget%c %cstorage%c %cseries",
3985
- i.OK,
3986
- i.NONE,
3987
- i.STORAGE,
3988
- i.NONE,
3989
- i.SERIES,
3985
+ o.OK,
3986
+ o.NONE,
3987
+ o.STORAGE,
3988
+ o.NONE,
3989
+ o.SERIES,
3990
3990
  l
3991
3991
  ]), l;
3992
3992
  };
@@ -3996,27 +3996,27 @@ class Kn {
3996
3996
  * @param data
3997
3997
  * @returns number
3998
3998
  */
3999
- setSeries = async (t, o) => (delete o?.query, t.type === _.SERIES && o !== "" ? (j(3, [
3999
+ setSeries = async (t, i) => (delete i?.query, t.type === _.SERIES && i !== "" ? (j(3, [
4000
4000
  "%cset%c %cstorage%c %cseries",
4001
- i.OK,
4002
- i.NONE,
4003
- i.STORAGE,
4004
- i.NONE,
4005
- i.SERIES,
4006
- o?.title ?? t.widget
4001
+ o.OK,
4002
+ o.NONE,
4003
+ o.STORAGE,
4004
+ o.NONE,
4005
+ o.SERIES,
4006
+ i?.title ?? t.widget
4007
4007
  ]), await this.db.table(_.SERIES).put({
4008
4008
  id: t.widget,
4009
4009
  dashboard_id: t.dashboard,
4010
4010
  hash: t.hash,
4011
4011
  // data: data.data,
4012
- data: o
4012
+ data: i
4013
4013
  }).then(() => 201).catch((l) => (j(2, [
4014
4014
  "%cset%c %cstorage%c %cseries",
4015
- i.KO,
4016
- i.NONE,
4017
- i.STORAGE,
4018
- i.NONE,
4019
- i.SERIES,
4015
+ o.KO,
4016
+ o.NONE,
4017
+ o.STORAGE,
4018
+ o.NONE,
4019
+ o.SERIES,
4020
4020
  t,
4021
4021
  l.message
4022
4022
  ]), 400))) : 400);
@@ -4029,11 +4029,11 @@ class Kn {
4029
4029
  if (t.id === "")
4030
4030
  return j(3, [
4031
4031
  "%cget%c %cstorage%c %cwidget",
4032
- i.KO,
4033
- i.NONE,
4034
- i.STORAGE,
4035
- i.NONE,
4036
- i.WIDGET,
4032
+ o.KO,
4033
+ o.NONE,
4034
+ o.STORAGE,
4035
+ o.NONE,
4036
+ o.WIDGET,
4037
4037
  t
4038
4038
  ]), {
4039
4039
  data: null,
@@ -4041,14 +4041,14 @@ class Kn {
4041
4041
  success: !1,
4042
4042
  query: t
4043
4043
  };
4044
- const o = await this.db.table(_.WIDGET).where({ id: t.id }).last().catch(() => {
4045
- console.warn("%cstorage", i.STORAGE, J.WIDGET_LOAD, t.id);
4044
+ const i = await this.db.table(_.WIDGET).where({ id: t.id }).last().catch(() => {
4045
+ console.warn("%cstorage", o.STORAGE, J.WIDGET_LOAD, t.id);
4046
4046
  });
4047
- return o === void 0 ? {
4047
+ return i === void 0 ? {
4048
4048
  data: null,
4049
4049
  message: `Widget ${t.id} Load error`,
4050
4050
  success: !1
4051
- } : (o.message = `Widget ${t.id} retrieved from storage`, o.success = !0, o);
4051
+ } : (i.message = `Widget ${t.id} retrieved from storage`, i.success = !0, i);
4052
4052
  };
4053
4053
  /**
4054
4054
  * Retrieve Widgets from Storage
@@ -4056,14 +4056,14 @@ class Kn {
4056
4056
  * @returns IResponse
4057
4057
  */
4058
4058
  getWidgets = async (t) => {
4059
- const o = (I) => t?.dashboard === I.dashboard_id, l = (I) => t?.type === I.type, g = (I) => t?.name ? I.name.includes(t?.name) : !1, b = await this.db.table(_.WIDGET).toArray().then((I) => t?.dashboard ? I.filter(o) : I).then((I) => t?.type ? I.filter(l) : I).then((I) => t?.name ? I.filter(g) : I).catch(() => {
4060
- j(2, ["%cstorage", i.STORAGE, J.WIDGET_LOAD, t]);
4059
+ const i = (I) => t?.dashboard === I.dashboard_id, l = (I) => t?.type === I.type, g = (I) => t?.name ? I.name.includes(t?.name) : !1, b = await this.db.table(_.WIDGET).toArray().then((I) => t?.dashboard ? I.filter(i) : I).then((I) => t?.type ? I.filter(l) : I).then((I) => t?.name ? I.filter(g) : I).catch(() => {
4060
+ j(2, ["%cstorage", o.STORAGE, J.WIDGET_LOAD, t]);
4061
4061
  });
4062
4062
  return b !== void 0 && j(3, [
4063
4063
  "%cstorage%c %cwidgets",
4064
- i.STORAGE,
4065
- i.NONE,
4066
- i.MESSAGES,
4064
+ o.STORAGE,
4065
+ o.NONE,
4066
+ o.MESSAGES,
4067
4067
  t
4068
4068
  ]), {
4069
4069
  // @ts-ignore
@@ -4087,15 +4087,15 @@ class Kn {
4087
4087
  data: null,
4088
4088
  message: `Widget ${t.data.id} saved to storage`,
4089
4089
  success: !0
4090
- })).catch((o) => (console.error(
4090
+ })).catch((i) => (console.error(
4091
4091
  "%cstorage",
4092
- i.STORAGE,
4092
+ o.STORAGE,
4093
4093
  _.WIDGET,
4094
4094
  t,
4095
- o.message
4095
+ i.message
4096
4096
  ), {
4097
4097
  data: null,
4098
- message: `Widget ${t.data.id} save error: ${o.message}`,
4098
+ message: `Widget ${t.data.id} save error: ${i.message}`,
4099
4099
  success: !1
4100
4100
  }));
4101
4101
  /**
@@ -4107,16 +4107,16 @@ class Kn {
4107
4107
  (l) => l.widget === t.widget
4108
4108
  ).length > 0 || (t.type === _.MESSAGES && (t = _t(this.options, t)), console.info(
4109
4109
  "%cstorage%c %csubscribe",
4110
- i.STORAGE,
4111
- i.NONE,
4112
- i.SUBSCRIBE,
4110
+ o.STORAGE,
4111
+ o.NONE,
4112
+ o.SUBSCRIBE,
4113
4113
  t.slide,
4114
4114
  t.widget
4115
4115
  ), console.debug(
4116
4116
  "%cstorage%c %csubscribe",
4117
- i.STORAGE,
4118
- i.NONE,
4119
- i.SUBSCRIBE,
4117
+ o.STORAGE,
4118
+ o.NONE,
4119
+ o.SUBSCRIBE,
4120
4120
  t
4121
4121
  ), this.subscribers.push(t)), null);
4122
4122
  /**
@@ -4130,14 +4130,14 @@ class Kn {
4130
4130
  * @returns IResponse
4131
4131
  */
4132
4132
  getSlide = async (t) => {
4133
- const o = await this.db.table(_.SLIDE).where({ id: t.id }).last().catch(() => {
4134
- j(2, ["%cstorage", i.STORAGE, J.SLIDE_LOAD, t.id]);
4133
+ const i = await this.db.table(_.SLIDE).where({ id: t.id }).last().catch(() => {
4134
+ j(2, ["%cstorage", o.STORAGE, J.SLIDE_LOAD, t.id]);
4135
4135
  });
4136
4136
  return {
4137
- data: o,
4137
+ data: i,
4138
4138
  query: t,
4139
- message: o !== void 0 ? "Slide loaded from storage" : "Slide load error",
4140
- success: o !== void 0
4139
+ message: i !== void 0 ? "Slide loaded from storage" : "Slide load error",
4140
+ success: i !== void 0
4141
4141
  };
4142
4142
  };
4143
4143
  /**
@@ -4146,8 +4146,8 @@ class Kn {
4146
4146
  * @returns IResponse
4147
4147
  */
4148
4148
  getSlides = async (t) => {
4149
- const o = (M) => t?.id ? M.id === t.id : !1, l = (M) => t?.name ? M.name.includes(t?.name) : !1, g = (M) => t?.presentation_id ? M.presentation_id === t.presentation_id : !1, I = await this.db.table(_.SLIDE).toArray().then((M) => t?.presentation_id ? M.filter(g) : M).then((M) => t?.id ? M.filter(o) : M).then((M) => t?.name ? M.filter(l) : M);
4150
- return I && I.sort((M, te) => M.order_index - te.order_index), I !== void 0 && j(3, ["%cstorage%c %cslides", i.STORAGE, i.NONE, i.SLIDE, t]), {
4149
+ const i = (M) => t?.id ? M.id === t.id : !1, l = (M) => t?.name ? M.name.includes(t?.name) : !1, g = (M) => t?.presentation_id ? M.presentation_id === t.presentation_id : !1, I = await this.db.table(_.SLIDE).toArray().then((M) => t?.presentation_id ? M.filter(g) : M).then((M) => t?.id ? M.filter(i) : M).then((M) => t?.name ? M.filter(l) : M);
4150
+ return I && I.sort((M, te) => M.order_index - te.order_index), I !== void 0 && j(3, ["%cstorage%c %cslides", o.STORAGE, o.NONE, o.SLIDE, t]), {
4151
4151
  // @ts-ignore
4152
4152
  data: I,
4153
4153
  query: t,
@@ -4173,15 +4173,15 @@ class Kn {
4173
4173
  data: null,
4174
4174
  message: `Slide ${t.data.id} saved to storage`,
4175
4175
  success: !0
4176
- })).catch((o) => (console.error(
4176
+ })).catch((i) => (console.error(
4177
4177
  "%cstorage",
4178
- i.STORAGE,
4178
+ o.STORAGE,
4179
4179
  J.SLIDE_STORE,
4180
4180
  t,
4181
- o.message
4181
+ i.message
4182
4182
  ), {
4183
4183
  data: null,
4184
- message: `Slide ${t.data.id} save error: ${o.message}`,
4184
+ message: `Slide ${t.data.id} save error: ${i.message}`,
4185
4185
  success: !1
4186
4186
  }));
4187
4187
  /**
@@ -4190,19 +4190,19 @@ class Kn {
4190
4190
  * @returns IResponse
4191
4191
  */
4192
4192
  getPresentation = async (t) => {
4193
- const o = await this.db.table(_.PRESENTATION).where({ id: t.id }).last().catch(() => {
4193
+ const i = await this.db.table(_.PRESENTATION).where({ id: t.id }).last().catch(() => {
4194
4194
  console.warn(
4195
4195
  "%cstorage ",
4196
- i.STORAGE,
4196
+ o.STORAGE,
4197
4197
  J.PRESENTATION_LOAD,
4198
4198
  t.id
4199
4199
  );
4200
4200
  });
4201
- return o === void 0 ? {
4201
+ return i === void 0 ? {
4202
4202
  data: null,
4203
4203
  message: `Presentation ${t.id} Load error`,
4204
4204
  success: !1
4205
- } : (o.query = t, o.message = `Presentation ${t.id} retrieved from storage`, o.success = !0, o);
4205
+ } : (i.query = t, i.message = `Presentation ${t.id} retrieved from storage`, i.success = !0, i);
4206
4206
  };
4207
4207
  /**
4208
4208
  * Retrieve Presentations from Storage
@@ -4210,12 +4210,12 @@ class Kn {
4210
4210
  * @returns IResponse
4211
4211
  */
4212
4212
  getPresentations = async (t) => {
4213
- const o = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.PRESENTATION).toArray().then((b) => t?.name ? b.filter(o) : b);
4213
+ const i = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(_.PRESENTATION).toArray().then((b) => t?.name ? b.filter(i) : b);
4214
4214
  return g !== void 0 && j(3, [
4215
4215
  "%cstorage%c %cpresentations",
4216
- i.STORAGE,
4217
- i.NONE,
4218
- i.PRESENTATION,
4216
+ o.STORAGE,
4217
+ o.NONE,
4218
+ o.PRESENTATION,
4219
4219
  t
4220
4220
  ]), {
4221
4221
  data: g,
@@ -4239,16 +4239,16 @@ class Kn {
4239
4239
  query: t,
4240
4240
  message: `Presentation ${t.data.id} saved to storage`,
4241
4241
  success: !0
4242
- })).catch((o) => (console.error(
4242
+ })).catch((i) => (console.error(
4243
4243
  "%cstorage",
4244
- i.STORAGE,
4244
+ o.STORAGE,
4245
4245
  J.PRESENTATION_STORE,
4246
4246
  t,
4247
- o.message
4247
+ i.message
4248
4248
  ), {
4249
4249
  data: null,
4250
4250
  query: t,
4251
- message: `Presentation ${t.data.id} save error: ${o.message}`,
4251
+ message: `Presentation ${t.data.id} save error: ${i.message}`,
4252
4252
  success: !1
4253
4253
  }));
4254
4254
  /**
@@ -4257,19 +4257,19 @@ class Kn {
4257
4257
  * @returns IResponse
4258
4258
  */
4259
4259
  getPreference = async (t) => {
4260
- const o = await this.db.table(_.PREFERENCE).where({ id: t.id }).last().catch(() => {
4260
+ const i = await this.db.table(_.PREFERENCE).where({ id: t.id }).last().catch(() => {
4261
4261
  j(2, [
4262
4262
  "%cstorage",
4263
- i.STORAGE,
4263
+ o.STORAGE,
4264
4264
  J.PREFERENCE_LOAD,
4265
4265
  t.id
4266
4266
  ]);
4267
4267
  });
4268
4268
  return {
4269
4269
  // @ts-ignore
4270
- data: o !== void 0 ? { preferences: o } : null,
4271
- message: o !== void 0 ? "Preference loaded from storage" : "Preference load error",
4272
- success: o !== void 0,
4270
+ data: i !== void 0 ? { preferences: i } : null,
4271
+ message: i !== void 0 ? "Preference loaded from storage" : "Preference load error",
4272
+ success: i !== void 0,
4273
4273
  query: { preference: t, widget: "" }
4274
4274
  // widget needs to have a value in IQuery interface
4275
4275
  };
@@ -4280,12 +4280,12 @@ class Kn {
4280
4280
  * @returns IResponse
4281
4281
  */
4282
4282
  getPreferences = async (t) => {
4283
- const o = (b) => t?.id ? t.id = b.id : !1, g = await this.db.table(_.PREFERENCE).toArray().then((b) => t?.id ? b.filter(o) : b);
4283
+ const i = (b) => t?.id ? t.id = b.id : !1, g = await this.db.table(_.PREFERENCE).toArray().then((b) => t?.id ? b.filter(i) : b);
4284
4284
  return g !== void 0 && j(3, [
4285
4285
  "%cstorage%c %cpreferences",
4286
- i.STORAGE,
4287
- i.NONE,
4288
- i.PRESENTATION,
4286
+ o.STORAGE,
4287
+ o.NONE,
4288
+ o.PRESENTATION,
4289
4289
  t
4290
4290
  ]), {
4291
4291
  // @ts-ignore
@@ -4307,15 +4307,15 @@ class Kn {
4307
4307
  data: null,
4308
4308
  message: `Preference ${t.id} saved to storage`,
4309
4309
  success: !0
4310
- })).catch((o) => (console.error(
4310
+ })).catch((i) => (console.error(
4311
4311
  "%cstorage",
4312
- i.STORAGE,
4312
+ o.STORAGE,
4313
4313
  J.PREFERENCE_STORE,
4314
4314
  t,
4315
- o.message
4315
+ i.message
4316
4316
  ), {
4317
4317
  data: null,
4318
- message: `Preference ${t.id} save error: ${o.message}`,
4318
+ message: `Preference ${t.id} save error: ${i.message}`,
4319
4319
  success: !1
4320
4320
  }));
4321
4321
  /**
@@ -4324,12 +4324,12 @@ class Kn {
4324
4324
  * @returns IResponse
4325
4325
  */
4326
4326
  getImages = async (t) => {
4327
- const o = (b) => t?.id ? b.includes(t.id) : !1, g = await this.db.table(_.IMAGES).toArray().then((b) => t?.id ? b.filter(o) : b);
4327
+ const i = (b) => t?.id ? b.includes(t.id) : !1, g = await this.db.table(_.IMAGES).toArray().then((b) => t?.id ? b.filter(i) : b);
4328
4328
  return g !== void 0 && j(3, [
4329
4329
  "%cstorage%c %cimages",
4330
- i.STORAGE,
4331
- i.NONE,
4332
- i.PRESENTATION,
4330
+ o.STORAGE,
4331
+ o.NONE,
4332
+ o.PRESENTATION,
4333
4333
  t
4334
4334
  ]), {
4335
4335
  // @ts-expect-error query.widget is obligatory but not always
@@ -4354,33 +4354,33 @@ class Kn {
4354
4354
  data: null,
4355
4355
  message: `Image ${t.data.name} saved to storage`,
4356
4356
  success: !0
4357
- })).catch((o) => (console.error(
4357
+ })).catch((i) => (console.error(
4358
4358
  "%cstorage",
4359
- i.STORAGE,
4359
+ o.STORAGE,
4360
4360
  J.IMAGE_SET,
4361
4361
  t,
4362
- o.message
4362
+ i.message
4363
4363
  ), {
4364
4364
  data: null,
4365
- message: `Image ${t.data.id} save error: ${o.message}`,
4365
+ message: `Image ${t.data.id} save error: ${i.message}`,
4366
4366
  success: !1
4367
4367
  }));
4368
4368
  }
4369
4369
  function Hr(f) {
4370
- return new Promise((t, o) => {
4371
- f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => o(f.error);
4370
+ return new Promise((t, i) => {
4371
+ f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => i(f.error);
4372
4372
  });
4373
4373
  }
4374
4374
  function Wa(f, t) {
4375
- let o;
4375
+ let i;
4376
4376
  const l = () => {
4377
- if (o)
4378
- return o;
4377
+ if (i)
4378
+ return i;
4379
4379
  const g = indexedDB.open(f);
4380
- return g.onupgradeneeded = () => g.result.createObjectStore(t), o = Hr(g), o.then((b) => {
4381
- b.onclose = () => o = void 0;
4380
+ return g.onupgradeneeded = () => g.result.createObjectStore(t), i = Hr(g), i.then((b) => {
4381
+ b.onclose = () => i = void 0;
4382
4382
  }, () => {
4383
- }), o;
4383
+ }), i;
4384
4384
  };
4385
4385
  return (g, b) => l().then((I) => b(I.transaction(t, g).objectStore(t)));
4386
4386
  }
@@ -4389,10 +4389,10 @@ function Ln() {
4389
4389
  return Wr || (Wr = Wa("keyval-store", "keyval")), Wr;
4390
4390
  }
4391
4391
  function _e(f, t = Ln()) {
4392
- return t("readonly", (o) => Hr(o.get(f)));
4392
+ return t("readonly", (i) => Hr(i.get(f)));
4393
4393
  }
4394
- function ke(f, t, o = Ln()) {
4395
- return o("readwrite", (l) => (l.put(t, f), Hr(l.transaction)));
4394
+ function ke(f, t, i = Ln()) {
4395
+ return i("readwrite", (l) => (l.put(t, f), Hr(l.transaction)));
4396
4396
  }
4397
4397
  class Bn {
4398
4398
  subscribers = [];
@@ -4400,21 +4400,21 @@ class Bn {
4400
4400
  constructor(t) {
4401
4401
  this.options = t;
4402
4402
  }
4403
- getHash = async (t, o) => "none";
4404
- setHash = async (t, o) => 404;
4403
+ getHash = async (t, i) => "none";
4404
+ setHash = async (t, i) => 404;
4405
4405
  setCards = async (t) => 404;
4406
4406
  clearCards = async () => 404;
4407
4407
  getCloud = async (t) => {
4408
- const o = Y(t);
4409
- return await _e(o).then((l) => l).catch(() => (console.warn("%capi", i.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4408
+ const i = Y(t);
4409
+ return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.CLOUD, t.slide, t.widget), { data: null, message: "Cloud Data error", success: !1 }));
4410
4410
  };
4411
4411
  getSeries = async (t) => {
4412
- const o = Y(t);
4413
- return await _e(o).then((l) => l).catch(() => (console.warn("%capi", i.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4412
+ const i = Y(t);
4413
+ return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.SERIES, t.slide, t.widget), { data: null, message: "Series Data error", success: !1 }));
4414
4414
  };
4415
4415
  getMessages = async (t) => {
4416
- const o = Y(t);
4417
- return await _e(o).then((l) => l).catch(() => (console.warn("%capi", i.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4416
+ const i = Y(t);
4417
+ return await _e(i).then((l) => l).catch(() => (console.warn("%capi", o.API, _.MESSAGES, t.slide, t.widget), { data: null, message: "Messages Data error", success: !1 }));
4418
4418
  };
4419
4419
  /**
4420
4420
  * Update Cloud
@@ -4422,13 +4422,13 @@ class Bn {
4422
4422
  * @param data
4423
4423
  * @returns number
4424
4424
  */
4425
- setCloud = async (t, o) => {
4426
- if (!o.success)
4425
+ setCloud = async (t, i) => {
4426
+ if (!i.success)
4427
4427
  return 400;
4428
4428
  const l = Y(t);
4429
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4429
+ return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4430
4430
  "%cstorage",
4431
- i.STORAGE,
4431
+ o.STORAGE,
4432
4432
  _.CLOUD,
4433
4433
  t,
4434
4434
  g.message
@@ -4440,13 +4440,13 @@ class Bn {
4440
4440
  * @param data
4441
4441
  * @returns bumber
4442
4442
  */
4443
- setSeries = async (t, o) => {
4444
- if (!o.success)
4443
+ setSeries = async (t, i) => {
4444
+ if (!i.success)
4445
4445
  return 400;
4446
4446
  const l = Y(t);
4447
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4447
+ return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4448
4448
  "%cstorage",
4449
- i.STORAGE,
4449
+ o.STORAGE,
4450
4450
  _.SERIES,
4451
4451
  t,
4452
4452
  g.message
@@ -4458,27 +4458,27 @@ class Bn {
4458
4458
  * @param data
4459
4459
  * @returns number
4460
4460
  */
4461
- setMessages = async (t, o) => {
4462
- if (!o.success)
4461
+ setMessages = async (t, i) => {
4462
+ if (!i.success)
4463
4463
  return 400;
4464
4464
  const l = Y(t);
4465
- return delete o.success, delete o.message, await ke(l, o).then(() => 201).catch((g) => (console.error(
4465
+ return delete i.success, delete i.message, await ke(l, i).then(() => 201).catch((g) => (console.error(
4466
4466
  "%cstorage",
4467
- i.STORAGE,
4467
+ o.STORAGE,
4468
4468
  _.MESSAGES,
4469
4469
  t,
4470
4470
  g.message
4471
4471
  ), 400));
4472
4472
  };
4473
- cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
4474
- hideMessage = async (t, o) => {
4473
+ cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((i) => i(0)));
4474
+ hideMessage = async (t, i) => {
4475
4475
  console.debug(
4476
- `hideMessage ${t} ${o} not implemented for ${this.options.storage}`
4476
+ `hideMessage ${t} ${i} not implemented for ${this.options.storage}`
4477
4477
  );
4478
4478
  };
4479
4479
  getDashboard = async (t) => {
4480
- const o = Y(t);
4481
- return await _e(o).then((l) => l).catch((l) => (console.warn("%capi", i.API, _.SLIDE, t.id), {
4480
+ const i = Y(t);
4481
+ return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4482
4482
  data: null,
4483
4483
  message: `Widget ${t.data.id} load error: ${l.message}`,
4484
4484
  success: !1
@@ -4495,17 +4495,17 @@ class Bn {
4495
4495
  * @returns number
4496
4496
  */
4497
4497
  setDashboard = async (t) => {
4498
- const o = Y(t), l = {
4498
+ const i = Y(t), l = {
4499
4499
  id: t.dashboard,
4500
4500
  name: t.name
4501
4501
  };
4502
- return await ke(o, l).then(() => ({
4502
+ return await ke(i, l).then(() => ({
4503
4503
  data: null,
4504
4504
  message: `Dashboard ${t.data.id} saved to storage`,
4505
4505
  success: !0
4506
4506
  })).catch((g) => (console.error(
4507
4507
  "%cstorage",
4508
- i.STORAGE,
4508
+ o.STORAGE,
4509
4509
  _.WIDGET,
4510
4510
  t,
4511
4511
  g.message
@@ -4516,14 +4516,14 @@ class Bn {
4516
4516
  }));
4517
4517
  };
4518
4518
  getWidget = async (t) => {
4519
- const o = Y(t);
4520
- return await _e(o).then((l) => l).catch((l) => (console.warn("%capi", i.API, _.SLIDE, t.id), {
4519
+ const i = Y(t);
4520
+ return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4521
4521
  data: null,
4522
4522
  message: `Widget ${t.data.id} load error: ${l.message}`,
4523
4523
  success: !1
4524
4524
  }));
4525
4525
  };
4526
- getWidgets = async (t) => (console.warn("%capi", i.API, _.SLIDE, t?.presentation), {
4526
+ getWidgets = async (t) => (console.warn("%capi", o.API, _.SLIDE, t?.presentation), {
4527
4527
  data: null,
4528
4528
  message: "Widgets load error: ",
4529
4529
  success: !1
@@ -4534,19 +4534,19 @@ class Bn {
4534
4534
  * @returns number
4535
4535
  */
4536
4536
  setWidget = async (t) => {
4537
- const o = Y(t), l = {
4537
+ const i = Y(t), l = {
4538
4538
  id: t.widget,
4539
4539
  name: t.name,
4540
4540
  dashboard_id: t.dashboard,
4541
4541
  type: t.type
4542
4542
  };
4543
- return await ke(o, l).then(() => ({
4543
+ return await ke(i, l).then(() => ({
4544
4544
  data: null,
4545
4545
  message: `Widget ${t.data.id} saved to storage`,
4546
4546
  success: !0
4547
4547
  })).catch((g) => (console.error(
4548
4548
  "%cstorage",
4549
- i.STORAGE,
4549
+ o.STORAGE,
4550
4550
  _.WIDGET,
4551
4551
  t,
4552
4552
  g.message
@@ -4565,9 +4565,9 @@ class Bn {
4565
4565
  (l) => l.widget === t.widget
4566
4566
  ).length > 0 || (console.debug(
4567
4567
  "%cstorage%c %csubscribe",
4568
- i.STORAGE,
4569
- i.NONE,
4570
- i.SUBSCRIBE,
4568
+ o.STORAGE,
4569
+ o.NONE,
4570
+ o.SUBSCRIBE,
4571
4571
  t.slide,
4572
4572
  t.widget
4573
4573
  ), this.subscribers.push(t)), null);
@@ -4577,14 +4577,14 @@ class Bn {
4577
4577
  */
4578
4578
  getSubscribers = async () => await new Promise((t) => t(this.subscribers));
4579
4579
  getSlide = async (t) => {
4580
- const o = Y(t);
4581
- return await _e(o).then((l) => l).catch((l) => (console.warn("%capi", i.API, _.SLIDE, t.id), {
4580
+ const i = Y(t);
4581
+ return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.SLIDE, t.id), {
4582
4582
  data: null,
4583
4583
  message: `Slide ${t.data.id} load error: ${l.message}`,
4584
4584
  success: !1
4585
4585
  }));
4586
4586
  };
4587
- getSlides = async (t) => (console.warn("%capi", i.API, _.SLIDE, t.presentation), {
4587
+ getSlides = async (t) => (console.warn("%capi", o.API, _.SLIDE, t.presentation), {
4588
4588
  data: null,
4589
4589
  message: `Slided ${t.presentation} load error: `,
4590
4590
  success: !1
@@ -4595,19 +4595,19 @@ class Bn {
4595
4595
  * @returns number
4596
4596
  */
4597
4597
  setSlide = async (t) => {
4598
- const o = Y(t), l = {
4598
+ const i = Y(t), l = {
4599
4599
  id: t.data.id,
4600
4600
  title: t.data.title || "Not set",
4601
4601
  json: t.data.json || {},
4602
4602
  html: t.data.html || ""
4603
4603
  };
4604
- return await ke(o, l).then(() => ({
4604
+ return await ke(i, l).then(() => ({
4605
4605
  data: null,
4606
4606
  message: `Slide ${t.data.id} saved to storage`,
4607
4607
  success: !0
4608
4608
  })).catch((g) => (console.error(
4609
4609
  "%cstorage",
4610
- i.STORAGE,
4610
+ o.STORAGE,
4611
4611
  _.SLIDE,
4612
4612
  t,
4613
4613
  g.message
@@ -4618,8 +4618,8 @@ class Bn {
4618
4618
  }));
4619
4619
  };
4620
4620
  getPresentation = async (t) => {
4621
- const o = Y(t);
4622
- return await _e(o).then((l) => l).catch((l) => (console.warn("%capi", i.API, _.PRESENTATION, t.id), {
4621
+ const i = Y(t);
4622
+ return await _e(i).then((l) => l).catch((l) => (console.warn("%capi", o.API, _.PRESENTATION, t.id), {
4623
4623
  data: null,
4624
4624
  message: `Slide ${t.data.id} load error: ${l.message}`,
4625
4625
  success: !1
@@ -4636,14 +4636,14 @@ class Bn {
4636
4636
  * @returns number
4637
4637
  */
4638
4638
  setPresentation = async (t) => {
4639
- const o = Y(t), l = t.data;
4640
- return await ke(o, l).then(() => ({
4639
+ const i = Y(t), l = t.data;
4640
+ return await ke(i, l).then(() => ({
4641
4641
  data: null,
4642
4642
  message: `Presentation ${t.data.id} saved to storage`,
4643
4643
  success: !0
4644
4644
  })).catch((g) => (console.error(
4645
4645
  "%cstorage",
4646
- i.STORAGE,
4646
+ o.STORAGE,
4647
4647
  _.PRESENTATION,
4648
4648
  t,
4649
4649
  g.message
@@ -4653,12 +4653,12 @@ class Bn {
4653
4653
  success: !1
4654
4654
  }));
4655
4655
  };
4656
- getPreference = async (t) => await _e(`${_.PREFERENCE}.${t.id}`).then((o) => o).catch((o) => (console.warn("%capi", i.API, _.PREFERENCE, t.id), {
4656
+ getPreference = async (t) => await _e(`${_.PREFERENCE}.${t.id}`).then((i) => i).catch((i) => (console.warn("%capi", o.API, _.PREFERENCE, t.id), {
4657
4657
  data: null,
4658
- message: `Preference ${t.id} get error: ${o.message}`,
4658
+ message: `Preference ${t.id} get error: ${i.message}`,
4659
4659
  success: !1
4660
4660
  }));
4661
- getPreferences = async () => await _e(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", i.API, _.PREFERENCE), {
4661
+ getPreferences = async () => await _e(`${_.PREFERENCE}`).then((t) => t).catch((t) => (console.warn("%capi", o.API, _.PREFERENCE), {
4662
4662
  data: null,
4663
4663
  message: `Preferences get error: ${t.message}`,
4664
4664
  success: !1
@@ -4672,15 +4672,15 @@ class Bn {
4672
4672
  data: null,
4673
4673
  message: `Preference ${t.id} save error`,
4674
4674
  success: !0
4675
- })).catch((o) => (console.error(
4675
+ })).catch((i) => (console.error(
4676
4676
  "%cstorage",
4677
- i.STORAGE,
4677
+ o.STORAGE,
4678
4678
  _.PREFERENCE,
4679
4679
  t,
4680
- o.message
4680
+ i.message
4681
4681
  ), {
4682
4682
  data: null,
4683
- message: `Preference ${t.id} save error: ${o.message}`,
4683
+ message: `Preference ${t.id} save error: ${i.message}`,
4684
4684
  success: !1
4685
4685
  }));
4686
4686
  getImages = async (t) => ({
@@ -4698,25 +4698,25 @@ class Un {
4698
4698
  subscribers = [];
4699
4699
  options;
4700
4700
  constructor(t) {
4701
- this.options = t, Storage.prototype.setObject = function(o, l) {
4702
- this.setObject(o, JSON.stringify(l));
4703
- }, Storage.prototype.getObject = function(o) {
4704
- const l = this.getObject(o);
4701
+ this.options = t, Storage.prototype.setObject = function(i, l) {
4702
+ this.setObject(i, JSON.stringify(l));
4703
+ }, Storage.prototype.getObject = function(i) {
4704
+ const l = this.getObject(i);
4705
4705
  return l && JSON.parse(l);
4706
4706
  };
4707
4707
  }
4708
- getHash = async (t, o) => "none";
4709
- setHash = async (t, o) => 404;
4708
+ getHash = async (t, i) => "none";
4709
+ setHash = async (t, i) => 404;
4710
4710
  setCards = async (t) => 404;
4711
4711
  clearCards = async () => 404;
4712
4712
  getCloud = async (t) => {
4713
- const o = Y(t);
4713
+ const i = Y(t);
4714
4714
  try {
4715
- return localStorage.getObject(o);
4715
+ return localStorage.getObject(i);
4716
4716
  } catch (l) {
4717
4717
  return console.warn(
4718
4718
  "%capi",
4719
- i.API,
4719
+ o.API,
4720
4720
  _.CLOUD,
4721
4721
  t.slide,
4722
4722
  t.widget,
@@ -4725,13 +4725,13 @@ class Un {
4725
4725
  }
4726
4726
  };
4727
4727
  getSeries = async (t) => {
4728
- const o = Y(t);
4728
+ const i = Y(t);
4729
4729
  try {
4730
- return localStorage.getObject(o);
4730
+ return localStorage.getObject(i);
4731
4731
  } catch (l) {
4732
4732
  return console.warn(
4733
4733
  "%capi",
4734
- i.API,
4734
+ o.API,
4735
4735
  _.SERIES,
4736
4736
  t.slide,
4737
4737
  t.widget,
@@ -4740,13 +4740,13 @@ class Un {
4740
4740
  }
4741
4741
  };
4742
4742
  getMessages = async (t) => {
4743
- const o = Y(t);
4743
+ const i = Y(t);
4744
4744
  try {
4745
- return localStorage.getObject(o);
4745
+ return localStorage.getObject(i);
4746
4746
  } catch (l) {
4747
4747
  return console.warn(
4748
4748
  "%capi",
4749
- i.API,
4749
+ o.API,
4750
4750
  _.MESSAGES,
4751
4751
  t.slide,
4752
4752
  t.widget,
@@ -4760,12 +4760,12 @@ class Un {
4760
4760
  * @param data
4761
4761
  * @returns number
4762
4762
  */
4763
- setCloud = async (t, o) => {
4763
+ setCloud = async (t, i) => {
4764
4764
  const l = Y(t);
4765
4765
  try {
4766
- return localStorage.setObject(l, o), 201;
4766
+ return localStorage.setObject(l, i), 201;
4767
4767
  } catch (g) {
4768
- return console.error("%cstorage", i.STORAGE, _.CLOUD, t, g), 400;
4768
+ return console.error("%cstorage", o.STORAGE, _.CLOUD, t, g), 400;
4769
4769
  }
4770
4770
  };
4771
4771
  /**
@@ -4774,12 +4774,12 @@ class Un {
4774
4774
  * @param data
4775
4775
  * @returns number
4776
4776
  */
4777
- setSeries = async (t, o) => {
4777
+ setSeries = async (t, i) => {
4778
4778
  const l = Y(t);
4779
4779
  try {
4780
- return localStorage.setObject(l, o), 201;
4780
+ return localStorage.setObject(l, i), 201;
4781
4781
  } catch (g) {
4782
- return console.error("%cstorage", i.STORAGE, _.SERIES, t, g), 400;
4782
+ return console.error("%cstorage", o.STORAGE, _.SERIES, t, g), 400;
4783
4783
  }
4784
4784
  };
4785
4785
  /**
@@ -4788,27 +4788,27 @@ class Un {
4788
4788
  * @param data
4789
4789
  * @returns number
4790
4790
  */
4791
- setMessages = async (t, o) => {
4791
+ setMessages = async (t, i) => {
4792
4792
  const l = Y(t);
4793
4793
  try {
4794
- return localStorage.setObject(l, o), 200;
4794
+ return localStorage.setObject(l, i), 200;
4795
4795
  } catch (g) {
4796
- return console.error("%cstorage", i.STORAGE, _.MESSAGES, t, g), 400;
4796
+ return console.error("%cstorage", o.STORAGE, _.MESSAGES, t, g), 400;
4797
4797
  }
4798
4798
  };
4799
- cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
4800
- hideMessage = async (t, o) => {
4799
+ cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((i) => i(0)));
4800
+ hideMessage = async (t, i) => {
4801
4801
  console.debug(
4802
- `hideMessage ${t} ${o} not implemented for ${this.options.storage}`
4802
+ `hideMessage ${t} ${i} not implemented for ${this.options.storage}`
4803
4803
  );
4804
4804
  };
4805
4805
  getDashboard = async (t) => {
4806
4806
  try {
4807
4807
  return localStorage.getObject(`${_.DASHBOARD}.${t.id}`);
4808
- } catch (o) {
4809
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
4808
+ } catch (i) {
4809
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
4810
4810
  data: null,
4811
- message: `Dashboard ${t.id} load error: ${o.message}`,
4811
+ message: `Dashboard ${t.id} load error: ${i.message}`,
4812
4812
  success: !1
4813
4813
  };
4814
4814
  }
@@ -4819,15 +4819,15 @@ class Un {
4819
4819
  success: !1
4820
4820
  });
4821
4821
  setDashboard = async (t) => {
4822
- const o = `${_.DASHBOARD}.${t.dashboard}`;
4822
+ const i = `${_.DASHBOARD}.${t.dashboard}`;
4823
4823
  try {
4824
- return localStorage.setObject(o, t), {
4824
+ return localStorage.setObject(i, t), {
4825
4825
  data: null,
4826
4826
  message: `Dashboard ${t.data.id} saved to storage`,
4827
4827
  success: !0
4828
4828
  };
4829
4829
  } catch (l) {
4830
- return console.error("%cstorage", i.STORAGE, _.WIDGET, t, l), {
4830
+ return console.error("%cstorage", o.STORAGE, _.WIDGET, t, l), {
4831
4831
  data: null,
4832
4832
  message: `Dashboard ${t.data.id} save error: ${l.message}`,
4833
4833
  success: !1
@@ -4837,10 +4837,10 @@ class Un {
4837
4837
  getWidget = async (t) => {
4838
4838
  try {
4839
4839
  return localStorage.getObject(`${_.WIDGET}.${t.id}`);
4840
- } catch (o) {
4841
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
4840
+ } catch (i) {
4841
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
4842
4842
  data: null,
4843
- message: `Widget ${t.id} load error: ${o.message}`,
4843
+ message: `Widget ${t.id} load error: ${i.message}`,
4844
4844
  success: !1
4845
4845
  };
4846
4846
  }
@@ -4851,15 +4851,15 @@ class Un {
4851
4851
  success: !1
4852
4852
  });
4853
4853
  setWidget = async (t) => {
4854
- const o = `widget.${t.widget}`;
4854
+ const i = `widget.${t.widget}`;
4855
4855
  try {
4856
- return localStorage.setObject(o, t), {
4856
+ return localStorage.setObject(i, t), {
4857
4857
  data: null,
4858
4858
  message: `Widget ${t.data.id} saved to storage`,
4859
4859
  success: !0
4860
4860
  };
4861
4861
  } catch (l) {
4862
- return console.error("%cstorage", i.STORAGE, _.WIDGET, t, l), {
4862
+ return console.error("%cstorage", o.STORAGE, _.WIDGET, t, l), {
4863
4863
  data: null,
4864
4864
  message: `Widget ${t.data.id} save error: ${l.message}`,
4865
4865
  success: !1
@@ -4875,9 +4875,9 @@ class Un {
4875
4875
  (l) => l.widget === t.widget
4876
4876
  ).length || (console.debug(
4877
4877
  "%cstorage%c %csubscribe",
4878
- i.STORAGE,
4879
- i.NONE,
4880
- i.SUBSCRIBE,
4878
+ o.STORAGE,
4879
+ o.NONE,
4880
+ o.SUBSCRIBE,
4881
4881
  t.slide,
4882
4882
  t.widget
4883
4883
  ), this.subscribers.push(t)), null);
@@ -4889,10 +4889,10 @@ class Un {
4889
4889
  getSlide = async (t) => {
4890
4890
  try {
4891
4891
  return localStorage.getObject(`${_.SLIDE}.${t.id}`);
4892
- } catch (o) {
4893
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
4892
+ } catch (i) {
4893
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
4894
4894
  data: null,
4895
- message: `Slide ${t.id} load error: ${o.message}`,
4895
+ message: `Slide ${t.id} load error: ${i.message}`,
4896
4896
  success: !1
4897
4897
  };
4898
4898
  }
@@ -4900,10 +4900,10 @@ class Un {
4900
4900
  getSlides = async (t) => {
4901
4901
  try {
4902
4902
  return localStorage.getObject(`${_.SLIDE}.${t.id}`);
4903
- } catch (o) {
4904
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
4903
+ } catch (i) {
4904
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
4905
4905
  data: null,
4906
- message: `Slide ${t.id} load error: ${o.message}`,
4906
+ message: `Slide ${t.id} load error: ${i.message}`,
4907
4907
  success: !1
4908
4908
  };
4909
4909
  }
@@ -4920,10 +4920,10 @@ class Un {
4920
4920
  message: `Slide ${t.data.id} saved to storage`,
4921
4921
  success: !0
4922
4922
  };
4923
- } catch (o) {
4924
- return console.error("%cstorage", i.STORAGE, _.SLIDE, t, o), {
4923
+ } catch (i) {
4924
+ return console.error("%cstorage", o.STORAGE, _.SLIDE, t, i), {
4925
4925
  data: null,
4926
- message: `Slide ${t.data.id} save error: ${o.message}`,
4926
+ message: `Slide ${t.data.id} save error: ${i.message}`,
4927
4927
  success: !1
4928
4928
  };
4929
4929
  }
@@ -4933,16 +4933,16 @@ class Un {
4933
4933
  return localStorage.getObject(
4934
4934
  `${_.PRESENTATION}.${t.presentation}`
4935
4935
  );
4936
- } catch (o) {
4936
+ } catch (i) {
4937
4937
  return console.warn(
4938
4938
  "%capi",
4939
- i.API,
4939
+ o.API,
4940
4940
  _.PRESENTATION,
4941
4941
  t.presentation,
4942
- o
4942
+ i
4943
4943
  ), {
4944
4944
  data: null,
4945
- message: `Presentations ${t.id} load error: ${o.message}`,
4945
+ message: `Presentations ${t.id} load error: ${i.message}`,
4946
4946
  success: !1
4947
4947
  };
4948
4948
  }
@@ -4951,7 +4951,7 @@ class Un {
4951
4951
  try {
4952
4952
  return localStorage.getObject(`${_.PRESENTATION}.`);
4953
4953
  } catch (t) {
4954
- return console.warn("%capi", i.API, _.PRESENTATION, t), {
4954
+ return console.warn("%capi", o.API, _.PRESENTATION, t), {
4955
4955
  data: null,
4956
4956
  message: `Presentations get error: ${t.message}`,
4957
4957
  success: !1
@@ -4968,10 +4968,10 @@ class Un {
4968
4968
  message: `Presentation ${t.data.id} saved to storage`,
4969
4969
  success: !0
4970
4970
  };
4971
- } catch (o) {
4972
- return console.error("%cstorage", i.STORAGE, _.PRESENTATION, t, o), {
4971
+ } catch (i) {
4972
+ return console.error("%cstorage", o.STORAGE, _.PRESENTATION, t, i), {
4973
4973
  data: null,
4974
- message: `Presentation ${t.data.id} save error: ${o.message}`,
4974
+ message: `Presentation ${t.data.id} save error: ${i.message}`,
4975
4975
  success: !1
4976
4976
  };
4977
4977
  }
@@ -4979,10 +4979,10 @@ class Un {
4979
4979
  getPreference = async (t) => {
4980
4980
  try {
4981
4981
  return localStorage.getObject(`${_.PREFERENCE}.${t.id}`);
4982
- } catch (o) {
4983
- return console.warn("%capi", i.API, _.PREFERENCE, t.id, o), {
4982
+ } catch (i) {
4983
+ return console.warn("%capi", o.API, _.PREFERENCE, t.id, i), {
4984
4984
  data: null,
4985
- message: `Preference ${t.id} load error: ${o.message}`,
4985
+ message: `Preference ${t.id} load error: ${i.message}`,
4986
4986
  success: !1
4987
4987
  };
4988
4988
  }
@@ -4991,7 +4991,7 @@ class Un {
4991
4991
  try {
4992
4992
  return localStorage.getObject(`${_.PREFERENCE}.`);
4993
4993
  } catch (t) {
4994
- return console.warn("%capi", i.API, _.PREFERENCE, t), {
4994
+ return console.warn("%capi", o.API, _.PREFERENCE, t), {
4995
4995
  data: null,
4996
4996
  message: `Preference get error: ${t.message}`,
4997
4997
  success: !1
@@ -5008,16 +5008,16 @@ class Un {
5008
5008
  message: `Preference ${t.id} saved to storage`,
5009
5009
  success: !0
5010
5010
  };
5011
- } catch (o) {
5011
+ } catch (i) {
5012
5012
  return console.error(
5013
5013
  "%cstorage",
5014
- i.STORAGE,
5014
+ o.STORAGE,
5015
5015
  _.PREFERENCE,
5016
5016
  t,
5017
- o
5017
+ i
5018
5018
  ), {
5019
5019
  data: null,
5020
- message: `Preference ${t.id} save error: ${o.message}`,
5020
+ message: `Preference ${t.id} save error: ${i.message}`,
5021
5021
  success: !1
5022
5022
  };
5023
5023
  }
@@ -5037,25 +5037,25 @@ class Wn {
5037
5037
  subscribers = [];
5038
5038
  options;
5039
5039
  constructor(t) {
5040
- this.options = t, Storage.prototype.setObject = function(o, l) {
5041
- this.setItem(o, JSON.stringify(l));
5042
- }, Storage.prototype.getObject = function(o) {
5043
- const l = this.getItem(o);
5040
+ this.options = t, Storage.prototype.setObject = function(i, l) {
5041
+ this.setItem(i, JSON.stringify(l));
5042
+ }, Storage.prototype.getObject = function(i) {
5043
+ const l = this.getItem(i);
5044
5044
  return l && JSON.parse(l);
5045
5045
  };
5046
5046
  }
5047
- getHash = async (t, o) => "none";
5048
- setHash = async (t, o) => 404;
5047
+ getHash = async (t, i) => "none";
5048
+ setHash = async (t, i) => 404;
5049
5049
  setCards = async (t) => 404;
5050
5050
  clearCards = async () => 404;
5051
5051
  getCloud = async (t) => {
5052
- const o = Y(t);
5052
+ const i = Y(t);
5053
5053
  try {
5054
- return sessionStorage.getObject(o);
5054
+ return sessionStorage.getObject(i);
5055
5055
  } catch (l) {
5056
5056
  return console.warn(
5057
5057
  "%capi",
5058
- i.API,
5058
+ o.API,
5059
5059
  _.CLOUD,
5060
5060
  t.slide,
5061
5061
  t.widget,
@@ -5064,13 +5064,13 @@ class Wn {
5064
5064
  }
5065
5065
  };
5066
5066
  getSeries = async (t) => {
5067
- const o = Y(t);
5067
+ const i = Y(t);
5068
5068
  try {
5069
- return sessionStorage.getObject(o);
5069
+ return sessionStorage.getObject(i);
5070
5070
  } catch (l) {
5071
5071
  return console.warn(
5072
5072
  "%capi",
5073
- i.API,
5073
+ o.API,
5074
5074
  _.SERIES,
5075
5075
  t.slide,
5076
5076
  t.widget,
@@ -5079,13 +5079,13 @@ class Wn {
5079
5079
  }
5080
5080
  };
5081
5081
  getMessages = async (t) => {
5082
- const o = Y(t);
5082
+ const i = Y(t);
5083
5083
  try {
5084
- return sessionStorage.getObject(o);
5084
+ return sessionStorage.getObject(i);
5085
5085
  } catch (l) {
5086
5086
  return console.warn(
5087
5087
  "%capi",
5088
- i.API,
5088
+ o.API,
5089
5089
  _.MESSAGES,
5090
5090
  t.slide,
5091
5091
  t.widget,
@@ -5099,12 +5099,12 @@ class Wn {
5099
5099
  * @param data
5100
5100
  * @returns number
5101
5101
  */
5102
- setCloud = async (t, o) => {
5102
+ setCloud = async (t, i) => {
5103
5103
  const l = Y(t);
5104
5104
  try {
5105
- return sessionStorage.setObject(l, o), 201;
5105
+ return sessionStorage.setObject(l, i), 201;
5106
5106
  } catch (g) {
5107
- return console.error("%cstorage", i.STORAGE, _.CLOUD, t, g), 400;
5107
+ return console.error("%cstorage", o.STORAGE, _.CLOUD, t, g), 400;
5108
5108
  }
5109
5109
  };
5110
5110
  /**
@@ -5113,12 +5113,12 @@ class Wn {
5113
5113
  * @param data
5114
5114
  * @returns number
5115
5115
  */
5116
- setSeries = async (t, o) => {
5116
+ setSeries = async (t, i) => {
5117
5117
  const l = Y(t);
5118
5118
  try {
5119
- return sessionStorage.setObject(l, o), 201;
5119
+ return sessionStorage.setObject(l, i), 201;
5120
5120
  } catch (g) {
5121
- return console.error("%cstorage", i.STORAGE, _.SERIES, t, g), 400;
5121
+ return console.error("%cstorage", o.STORAGE, _.SERIES, t, g), 400;
5122
5122
  }
5123
5123
  };
5124
5124
  /**
@@ -5127,27 +5127,27 @@ class Wn {
5127
5127
  * @param data
5128
5128
  * @returns number
5129
5129
  */
5130
- setMessages = async (t, o) => {
5130
+ setMessages = async (t, i) => {
5131
5131
  const l = Y(t);
5132
5132
  try {
5133
- return sessionStorage.setObject(l, o), 200;
5133
+ return sessionStorage.setObject(l, i), 200;
5134
5134
  } catch (g) {
5135
- return console.error("%cstorage", i.STORAGE, _.MESSAGES, t, g), 400;
5135
+ return console.error("%cstorage", o.STORAGE, _.MESSAGES, t, g), 400;
5136
5136
  }
5137
5137
  };
5138
- cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
5139
- hideMessage = async (t, o) => {
5138
+ cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((i) => i(0)));
5139
+ hideMessage = async (t, i) => {
5140
5140
  console.debug(
5141
- `hideMessage ${t} ${o} not implemented for ${this.options.storage}`
5141
+ `hideMessage ${t} ${i} not implemented for ${this.options.storage}`
5142
5142
  );
5143
5143
  };
5144
5144
  getDashboard = async (t) => {
5145
5145
  try {
5146
5146
  return sessionStorage.getObject(`${_.DASHBOARD}.${t.id}`);
5147
- } catch (o) {
5148
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
5147
+ } catch (i) {
5148
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
5149
5149
  data: null,
5150
- message: `Dashboard ${t.id} load error: ${o.message}`,
5150
+ message: `Dashboard ${t.id} load error: ${i.message}`,
5151
5151
  success: !1
5152
5152
  };
5153
5153
  }
@@ -5158,15 +5158,15 @@ class Wn {
5158
5158
  success: !1
5159
5159
  });
5160
5160
  setDashboard = async (t) => {
5161
- const o = `${_.DASHBOARD}.${t.dashboard}`;
5161
+ const i = `${_.DASHBOARD}.${t.dashboard}`;
5162
5162
  try {
5163
- return sessionStorage.setObject(o, t), {
5163
+ return sessionStorage.setObject(i, t), {
5164
5164
  data: null,
5165
5165
  message: `Dashboard ${t.data.id} saved to storage`,
5166
5166
  success: !0
5167
5167
  };
5168
5168
  } catch (l) {
5169
- return console.error("%cstorage", i.STORAGE, _.WIDGET, t, l), {
5169
+ return console.error("%cstorage", o.STORAGE, _.WIDGET, t, l), {
5170
5170
  data: null,
5171
5171
  message: `Dashboard ${t.data.id} save error: ${l.message}`,
5172
5172
  success: !1
@@ -5176,10 +5176,10 @@ class Wn {
5176
5176
  getWidget = async (t) => {
5177
5177
  try {
5178
5178
  return sessionStorage.getObject(`${_.WIDGET}.${t.id}`);
5179
- } catch (o) {
5180
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
5179
+ } catch (i) {
5180
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
5181
5181
  data: null,
5182
- message: `Widget ${t.id} load error: ${o.message}`,
5182
+ message: `Widget ${t.id} load error: ${i.message}`,
5183
5183
  success: !1
5184
5184
  };
5185
5185
  }
@@ -5190,15 +5190,15 @@ class Wn {
5190
5190
  success: !1
5191
5191
  });
5192
5192
  setWidget = async (t) => {
5193
- const o = `widget.${t.widget}`;
5193
+ const i = `widget.${t.widget}`;
5194
5194
  try {
5195
- return sessionStorage.setObject(o, t), {
5195
+ return sessionStorage.setObject(i, t), {
5196
5196
  data: null,
5197
5197
  message: `Widget ${t.data.id} saved to storage`,
5198
5198
  success: !0
5199
5199
  };
5200
5200
  } catch (l) {
5201
- return console.error("%cstorage", i.STORAGE, _.WIDGET, t, l), {
5201
+ return console.error("%cstorage", o.STORAGE, _.WIDGET, t, l), {
5202
5202
  data: null,
5203
5203
  message: `Slide ${t.data.id} save error: ${l.message}`,
5204
5204
  success: !1
@@ -5214,9 +5214,9 @@ class Wn {
5214
5214
  (l) => l.widget === t.widget
5215
5215
  ).length || (console.debug(
5216
5216
  "%cstorage%c %csubscribe",
5217
- i.STORAGE,
5218
- i.NONE,
5219
- i.SUBSCRIBE,
5217
+ o.STORAGE,
5218
+ o.NONE,
5219
+ o.SUBSCRIBE,
5220
5220
  t.slide,
5221
5221
  t.widget
5222
5222
  ), this.subscribers.push(t)), null);
@@ -5228,10 +5228,10 @@ class Wn {
5228
5228
  getSlide = async (t) => {
5229
5229
  try {
5230
5230
  return sessionStorage.getObject(`${_.SLIDE}.${t.id}`);
5231
- } catch (o) {
5232
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
5231
+ } catch (i) {
5232
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
5233
5233
  data: null,
5234
- message: `Slide ${t.id} load error: ${o.message}`,
5234
+ message: `Slide ${t.id} load error: ${i.message}`,
5235
5235
  success: !1
5236
5236
  };
5237
5237
  }
@@ -5239,10 +5239,10 @@ class Wn {
5239
5239
  getSlides = async (t) => {
5240
5240
  try {
5241
5241
  return sessionStorage.getObject(`${_.SLIDE}.${t.id}`);
5242
- } catch (o) {
5243
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
5242
+ } catch (i) {
5243
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
5244
5244
  data: null,
5245
- message: `Slide ${t.id} load error: ${o.message}`,
5245
+ message: `Slide ${t.id} load error: ${i.message}`,
5246
5246
  success: !1
5247
5247
  };
5248
5248
  }
@@ -5264,10 +5264,10 @@ class Wn {
5264
5264
  message: `Slide ${t.data.id} saved to storage`,
5265
5265
  success: !0
5266
5266
  };
5267
- } catch (o) {
5268
- return console.error("%cstorage", i.STORAGE, _.SLIDE, t, o), {
5267
+ } catch (i) {
5268
+ return console.error("%cstorage", o.STORAGE, _.SLIDE, t, i), {
5269
5269
  data: null,
5270
- message: `Slide ${t.data.id} save error: ${o.message}`,
5270
+ message: `Slide ${t.data.id} save error: ${i.message}`,
5271
5271
  success: !1
5272
5272
  };
5273
5273
  }
@@ -5277,16 +5277,16 @@ class Wn {
5277
5277
  return sessionStorage.getObject(
5278
5278
  `${_.PRESENTATION}.${t.presentation}`
5279
5279
  );
5280
- } catch (o) {
5280
+ } catch (i) {
5281
5281
  return console.warn(
5282
5282
  "%capi",
5283
- i.API,
5283
+ o.API,
5284
5284
  _.PRESENTATION,
5285
5285
  t.presentation,
5286
- o
5286
+ i
5287
5287
  ), {
5288
5288
  data: null,
5289
- message: `Presentation ${t.presentation} load error: ${o.message}`,
5289
+ message: `Presentation ${t.presentation} load error: ${i.message}`,
5290
5290
  success: !1
5291
5291
  };
5292
5292
  }
@@ -5295,7 +5295,7 @@ class Wn {
5295
5295
  try {
5296
5296
  return sessionStorage.getObject(`${_.PRESENTATION}.`);
5297
5297
  } catch (t) {
5298
- return console.warn("%capi", i.API, _.PRESENTATION, t), {
5298
+ return console.warn("%capi", o.API, _.PRESENTATION, t), {
5299
5299
  data: null,
5300
5300
  message: `Presentations get error: ${t.message}`,
5301
5301
  success: !1
@@ -5312,10 +5312,10 @@ class Wn {
5312
5312
  message: `Presentation ${t.data.id} saved to storage`,
5313
5313
  success: !0
5314
5314
  };
5315
- } catch (o) {
5316
- return console.error("%cstorage", i.STORAGE, _.PRESENTATION, t, o), {
5315
+ } catch (i) {
5316
+ return console.error("%cstorage", o.STORAGE, _.PRESENTATION, t, i), {
5317
5317
  data: null,
5318
- message: `Presentation ${t.data.id} save error: ${o.message}`,
5318
+ message: `Presentation ${t.data.id} save error: ${i.message}`,
5319
5319
  success: !1
5320
5320
  };
5321
5321
  }
@@ -5323,10 +5323,10 @@ class Wn {
5323
5323
  getPreference = async (t) => {
5324
5324
  try {
5325
5325
  return sessionStorage.getObject(`${_.PREFERENCE}.${t.id}`);
5326
- } catch (o) {
5327
- return console.warn("%capi", i.API, _.PREFERENCE, t.id, o), {
5326
+ } catch (i) {
5327
+ return console.warn("%capi", o.API, _.PREFERENCE, t.id, i), {
5328
5328
  data: null,
5329
- message: `Preference ${t.id} load error: ${o.message}`,
5329
+ message: `Preference ${t.id} load error: ${i.message}`,
5330
5330
  success: !1
5331
5331
  };
5332
5332
  }
@@ -5335,7 +5335,7 @@ class Wn {
5335
5335
  try {
5336
5336
  return sessionStorage.getObject(`${_.PREFERENCE}`);
5337
5337
  } catch (t) {
5338
- return console.warn("%capi", i.API, _.PREFERENCE, t), {
5338
+ return console.warn("%capi", o.API, _.PREFERENCE, t), {
5339
5339
  data: null,
5340
5340
  message: `Preferences get error: ${t.message}`,
5341
5341
  success: !1
@@ -5352,16 +5352,16 @@ class Wn {
5352
5352
  message: `Preference ${t.id} saved to storage`,
5353
5353
  success: !0
5354
5354
  };
5355
- } catch (o) {
5355
+ } catch (i) {
5356
5356
  return console.error(
5357
5357
  "%cstorage",
5358
- i.STORAGE,
5358
+ o.STORAGE,
5359
5359
  _.PREFERENCE,
5360
5360
  t,
5361
- o
5361
+ i
5362
5362
  ), {
5363
5363
  data: null,
5364
- message: `Preference ${t.id} save error: ${o.message}`,
5364
+ message: `Preference ${t.id} save error: ${i.message}`,
5365
5365
  success: !1
5366
5366
  };
5367
5367
  }
@@ -5383,18 +5383,18 @@ class Fn {
5383
5383
  constructor(t) {
5384
5384
  this.options = t, window.__bc.WidgetData = /* @__PURE__ */ new Set();
5385
5385
  }
5386
- getHash = async (t, o) => "none";
5387
- setHash = async (t, o) => 404;
5386
+ getHash = async (t, i) => "none";
5387
+ setHash = async (t, i) => 404;
5388
5388
  setCards = async (t) => 404;
5389
5389
  clearCards = async () => 404;
5390
5390
  getCloud = async (t) => {
5391
- const o = Y(t);
5391
+ const i = Y(t);
5392
5392
  try {
5393
- return window.__bc.WidgetData[o];
5393
+ return window.__bc.WidgetData[i];
5394
5394
  } catch (l) {
5395
5395
  return console.warn(
5396
5396
  "%capi",
5397
- i.API,
5397
+ o.API,
5398
5398
  _.CLOUD,
5399
5399
  t.slide,
5400
5400
  t.widget,
@@ -5403,13 +5403,13 @@ class Fn {
5403
5403
  }
5404
5404
  };
5405
5405
  getSeries = async (t) => {
5406
- const o = Y(t);
5406
+ const i = Y(t);
5407
5407
  try {
5408
- return window.__bc.WidgetData[o];
5408
+ return window.__bc.WidgetData[i];
5409
5409
  } catch (l) {
5410
5410
  return console.warn(
5411
5411
  "%capi",
5412
- i.API,
5412
+ o.API,
5413
5413
  _.SERIES,
5414
5414
  t.slide,
5415
5415
  t.widget,
@@ -5418,13 +5418,13 @@ class Fn {
5418
5418
  }
5419
5419
  };
5420
5420
  getMessages = async (t) => {
5421
- const o = Y(t);
5421
+ const i = Y(t);
5422
5422
  try {
5423
- return window.__bc.WidgetData[o];
5423
+ return window.__bc.WidgetData[i];
5424
5424
  } catch (l) {
5425
5425
  return console.warn(
5426
5426
  "%capi",
5427
- i.API,
5427
+ o.API,
5428
5428
  _.MESSAGES,
5429
5429
  t.slide,
5430
5430
  t.widget,
@@ -5438,12 +5438,12 @@ class Fn {
5438
5438
  * @param data
5439
5439
  * @returns number
5440
5440
  */
5441
- setCloud = async (t, o) => {
5441
+ setCloud = async (t, i) => {
5442
5442
  const l = Y(t);
5443
5443
  try {
5444
- return window.__bc.WidgetData[l] = o, 201;
5444
+ return window.__bc.WidgetData[l] = i, 201;
5445
5445
  } catch (g) {
5446
- return console.error("%cstorage", i.STORAGE, "set", t, g), 400;
5446
+ return console.error("%cstorage", o.STORAGE, "set", t, g), 400;
5447
5447
  }
5448
5448
  };
5449
5449
  /**
@@ -5452,12 +5452,12 @@ class Fn {
5452
5452
  * @param data
5453
5453
  * @returns number
5454
5454
  */
5455
- setSeries = async (t, o) => {
5455
+ setSeries = async (t, i) => {
5456
5456
  const l = Y(t);
5457
5457
  try {
5458
- return window.__bc.WidgetData[l] = o, 201;
5458
+ return window.__bc.WidgetData[l] = i, 201;
5459
5459
  } catch (g) {
5460
- return console.error("%cstorage", i.STORAGE, "set", t, g), 400;
5460
+ return console.error("%cstorage", o.STORAGE, "set", t, g), 400;
5461
5461
  }
5462
5462
  };
5463
5463
  /**
@@ -5466,27 +5466,27 @@ class Fn {
5466
5466
  * @param data
5467
5467
  * @returns number
5468
5468
  */
5469
- setMessages = async (t, o) => {
5469
+ setMessages = async (t, i) => {
5470
5470
  const l = Y(t);
5471
5471
  try {
5472
- return window.__bc.WidgetData[l] = o, 201;
5472
+ return window.__bc.WidgetData[l] = i, 201;
5473
5473
  } catch (g) {
5474
- return console.error("%cstorage", i.STORAGE, "set", t, g), 400;
5474
+ return console.error("%cstorage", o.STORAGE, "set", t, g), 400;
5475
5475
  }
5476
5476
  };
5477
- cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((o) => o(0)));
5478
- hideMessage = async (t, o) => {
5477
+ cleanMessages = async (t) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((i) => i(0)));
5478
+ hideMessage = async (t, i) => {
5479
5479
  console.debug(
5480
- `hideMessage ${t} ${o} not implemented for ${this.options.storage}`
5480
+ `hideMessage ${t} ${i} not implemented for ${this.options.storage}`
5481
5481
  );
5482
5482
  };
5483
5483
  getDashboard = async (t) => {
5484
5484
  try {
5485
5485
  return window.__bc.DashboardData[t.id];
5486
- } catch (o) {
5487
- return console.warn("%capi", i.API, _.DASHBOARD, t.id, o), {
5486
+ } catch (i) {
5487
+ return console.warn("%capi", o.API, _.DASHBOARD, t.id, i), {
5488
5488
  data: null,
5489
- message: `Dashboard ${t.id} load error: ${o.message}`,
5489
+ message: `Dashboard ${t.id} load error: ${i.message}`,
5490
5490
  success: !1
5491
5491
  };
5492
5492
  }
@@ -5497,15 +5497,15 @@ class Fn {
5497
5497
  success: !1
5498
5498
  });
5499
5499
  setDashboard = async (t) => {
5500
- const o = `widget.${t.widget}`;
5500
+ const i = `widget.${t.widget}`;
5501
5501
  try {
5502
- return window.__bc.DashboardData[o] = t, {
5502
+ return window.__bc.DashboardData[i] = t, {
5503
5503
  data: null,
5504
5504
  message: `Dashboard ${t.data.id} saved to storage`,
5505
5505
  success: !0
5506
5506
  };
5507
5507
  } catch (l) {
5508
- return console.error("%cstorage", i.STORAGE, _.DASHBOARD, t, l), {
5508
+ return console.error("%cstorage", o.STORAGE, _.DASHBOARD, t, l), {
5509
5509
  data: null,
5510
5510
  message: `Dashboard ${t.data.id} save error: ${l.message}`,
5511
5511
  success: !1
@@ -5515,10 +5515,10 @@ class Fn {
5515
5515
  getWidget = async (t) => {
5516
5516
  try {
5517
5517
  return window.__bc.WidgetData[t.id];
5518
- } catch (o) {
5519
- return console.warn("%capi", i.API, _.WIDGET, t.id, o), {
5518
+ } catch (i) {
5519
+ return console.warn("%capi", o.API, _.WIDGET, t.id, i), {
5520
5520
  data: null,
5521
- message: `Widget ${t.id} load error: ${o.message}`,
5521
+ message: `Widget ${t.id} load error: ${i.message}`,
5522
5522
  success: !1
5523
5523
  };
5524
5524
  }
@@ -5529,15 +5529,15 @@ class Fn {
5529
5529
  success: !1
5530
5530
  });
5531
5531
  setWidget = async (t) => {
5532
- const o = `widget.${t.widget}`;
5532
+ const i = `widget.${t.widget}`;
5533
5533
  try {
5534
- return window.__bc.WidgetData[o] = t, {
5534
+ return window.__bc.WidgetData[i] = t, {
5535
5535
  data: null,
5536
5536
  message: `Widget ${t.data.id} saved to storage`,
5537
5537
  success: !0
5538
5538
  };
5539
5539
  } catch (l) {
5540
- return console.error("%cstorage", i.STORAGE, _.WIDGET, t, l), {
5540
+ return console.error("%cstorage", o.STORAGE, _.WIDGET, t, l), {
5541
5541
  data: null,
5542
5542
  message: `Slide ${t.data.id} save error: ${l.message}`,
5543
5543
  success: !1
@@ -5553,9 +5553,9 @@ class Fn {
5553
5553
  (l) => l.widget === t.widget
5554
5554
  ).length || (console.debug(
5555
5555
  "%cstorage%c %csubscribe",
5556
- i.STORAGE,
5557
- i.NONE,
5558
- i.SUBSCRIBE,
5556
+ o.STORAGE,
5557
+ o.NONE,
5558
+ o.SUBSCRIBE,
5559
5559
  t.slide,
5560
5560
  t.widget
5561
5561
  ), this.subscribers.push(t)), null);
@@ -5567,10 +5567,10 @@ class Fn {
5567
5567
  getSlide = async (t) => {
5568
5568
  try {
5569
5569
  return window.__bc.SlideData[t.id];
5570
- } catch (o) {
5571
- return console.warn("%capi", i.API, _.SLIDE, t.id, o), {
5570
+ } catch (i) {
5571
+ return console.warn("%capi", o.API, _.SLIDE, t.id, i), {
5572
5572
  data: null,
5573
- message: `Slide ${t.id} load error: ${o.message}`,
5573
+ message: `Slide ${t.id} load error: ${i.message}`,
5574
5574
  success: !1
5575
5575
  };
5576
5576
  }
@@ -5578,18 +5578,18 @@ class Fn {
5578
5578
  getSlides = async (t) => {
5579
5579
  try {
5580
5580
  return window.__bc.SlideData.filter(
5581
- (o) => o.presentation_id === t.presentation
5581
+ (i) => i.presentation_id === t.presentation
5582
5582
  );
5583
- } catch (o) {
5583
+ } catch (i) {
5584
5584
  return console.warn(
5585
5585
  "%capi",
5586
- i.API,
5586
+ o.API,
5587
5587
  _.PRESENTATION,
5588
5588
  t.presentation_id,
5589
- o
5589
+ i
5590
5590
  ), {
5591
5591
  data: null,
5592
- message: `Slides for presentation ${t.presentation} load error: ${o.message}`,
5592
+ message: `Slides for presentation ${t.presentation} load error: ${i.message}`,
5593
5593
  success: !1
5594
5594
  };
5595
5595
  }
@@ -5606,28 +5606,28 @@ class Fn {
5606
5606
  message: `Slide ${t.data.id} saved to storage`,
5607
5607
  success: !0
5608
5608
  };
5609
- } catch (o) {
5610
- return console.error("%cstorage", i.STORAGE, _.SLIDE, t, o), {
5609
+ } catch (i) {
5610
+ return console.error("%cstorage", o.STORAGE, _.SLIDE, t, i), {
5611
5611
  data: null,
5612
- message: `Slide ${t.data.id} save error: ${o.message}`,
5612
+ message: `Slide ${t.data.id} save error: ${i.message}`,
5613
5613
  success: !1
5614
5614
  };
5615
5615
  }
5616
5616
  };
5617
5617
  getPresentation = async (t) => {
5618
5618
  try {
5619
- const o = t.presentation || "none";
5620
- return window.__bc.PresentationData[o];
5621
- } catch (o) {
5619
+ const i = t.presentation || "none";
5620
+ return window.__bc.PresentationData[i];
5621
+ } catch (i) {
5622
5622
  return console.warn(
5623
5623
  "%capi",
5624
- i.API,
5624
+ o.API,
5625
5625
  _.PRESENTATION,
5626
5626
  t.presentation,
5627
- o
5627
+ i
5628
5628
  ), {
5629
5629
  data: null,
5630
- message: `Presentation ${t.presentation} load error: ${o.message}`,
5630
+ message: `Presentation ${t.presentation} load error: ${i.message}`,
5631
5631
  success: !1
5632
5632
  };
5633
5633
  }
@@ -5636,7 +5636,7 @@ class Fn {
5636
5636
  try {
5637
5637
  return window.__bc.PresentationData;
5638
5638
  } catch (t) {
5639
- return console.warn("%capi", i.API, _.PRESENTATION, t), {
5639
+ return console.warn("%capi", o.API, _.PRESENTATION, t), {
5640
5640
  data: null,
5641
5641
  message: `Presentations get error: ${t.message}`,
5642
5642
  success: !1
@@ -5650,10 +5650,10 @@ class Fn {
5650
5650
  message: `Presentation ${t.data.id} saved to storage`,
5651
5651
  success: !0
5652
5652
  };
5653
- } catch (o) {
5654
- return console.error("%cstorage", i.STORAGE, _.PRESENTATION, t, o), {
5653
+ } catch (i) {
5654
+ return console.error("%cstorage", o.STORAGE, _.PRESENTATION, t, i), {
5655
5655
  data: null,
5656
- message: `Presentation ${t.data.id} save error: ${o.message}`,
5656
+ message: `Presentation ${t.data.id} save error: ${i.message}`,
5657
5657
  success: !1
5658
5658
  };
5659
5659
  }
@@ -5661,10 +5661,10 @@ class Fn {
5661
5661
  getPreference = async (t) => {
5662
5662
  try {
5663
5663
  return window.__bc.Preferences[t.id];
5664
- } catch (o) {
5665
- return console.warn("%capi", i.API, _.PREFERENCE, t.id, o), {
5664
+ } catch (i) {
5665
+ return console.warn("%capi", o.API, _.PREFERENCE, t.id, i), {
5666
5666
  data: null,
5667
- message: `Preference ${t.id} load error: ${o.message}`,
5667
+ message: `Preference ${t.id} load error: ${i.message}`,
5668
5668
  success: !1
5669
5669
  };
5670
5670
  }
@@ -5673,7 +5673,7 @@ class Fn {
5673
5673
  try {
5674
5674
  return window.__bc.Preferences;
5675
5675
  } catch (t) {
5676
- return console.warn("%capi", i.API, _.PREFERENCE, t), {
5676
+ return console.warn("%capi", o.API, _.PREFERENCE, t), {
5677
5677
  data: null,
5678
5678
  message: `Preferences get error: ${t.message}`,
5679
5679
  success: !1
@@ -5687,16 +5687,16 @@ class Fn {
5687
5687
  message: `Preference ${t.id} saved to storage`,
5688
5688
  success: !0
5689
5689
  };
5690
- } catch (o) {
5690
+ } catch (i) {
5691
5691
  return console.error(
5692
5692
  "%cstorage",
5693
- i.STORAGE,
5693
+ o.STORAGE,
5694
5694
  _.PREFERENCE,
5695
5695
  t,
5696
- o
5696
+ i
5697
5697
  ), {
5698
5698
  data: null,
5699
- message: `Preference ${t.id} save error: ${o.message}`,
5699
+ message: `Preference ${t.id} save error: ${i.message}`,
5700
5700
  success: !1
5701
5701
  };
5702
5702
  }
@@ -5722,7 +5722,7 @@ class rs {
5722
5722
  constructor(t) {
5723
5723
  switch (j(3, [
5724
5724
  "%cpresentation",
5725
- i.PRESENTATION,
5725
+ o.PRESENTATION,
5726
5726
  t.presentation,
5727
5727
  J.VERSION,
5728
5728
  $a
@@ -5751,12 +5751,12 @@ class rs {
5751
5751
  delete this.subscribers[t.widget];
5752
5752
  }
5753
5753
  update = async (t) => {
5754
- if (j(3, ["%cupdate%c %cdata", i.NO_UPDATES, i.NONE, i.MESSAGES, t]), this.sm === null || Object.keys(this.subscribers).length === 0)
5754
+ if (j(3, ["%cupdate%c %cdata", o.NO_UPDATES, o.NONE, o.MESSAGES, t]), this.sm === null || Object.keys(this.subscribers).length === 0)
5755
5755
  return;
5756
- const o = [];
5756
+ const i = [];
5757
5757
  Object.values(this.subscribers).forEach((l) => {
5758
- l.dashboard?.length && l.widget?.length && l.type?.length && o.push(this.api.get(l));
5759
- }), o.forEach(async (l) => {
5758
+ l.dashboard?.length && l.widget?.length && l.type?.length && i.push(this.api.get(l));
5759
+ }), i.forEach(async (l) => {
5760
5760
  await l.then(
5761
5761
  async (g) => await this.processResponse(g)
5762
5762
  );
@@ -5764,13 +5764,13 @@ class rs {
5764
5764
  };
5765
5765
  stream = () => {
5766
5766
  const t = [];
5767
- Object.values(this.subscribers).forEach((o) => {
5768
- t.push(o);
5767
+ Object.values(this.subscribers).forEach((i) => {
5768
+ t.push(i);
5769
5769
  }), this.api.ndjson(t);
5770
5770
  };
5771
- apiQuery = async (t) => await this.api.get(t).then(async (o) => await this.processResponse(o)).catch((o) => ({ code: 204, hash: "" }));
5771
+ apiQuery = async (t) => await this.api.get(t).then(async (i) => await this.processResponse(i)).catch((i) => ({ code: 204, hash: "" }));
5772
5772
  processResponse = async (t) => {
5773
- let o, l = { code: 400, hash: "" }, g = "", b;
5773
+ let i, l = { code: 400, hash: "" }, g = "", b;
5774
5774
  if (t.success === !0)
5775
5775
  switch (t.query.type) {
5776
5776
  case _.MESSAGES:
@@ -5778,11 +5778,11 @@ class rs {
5778
5778
  (I) => I.id !== null
5779
5779
  ), g = t.data.messages.length > 0 ? Ur(t.data.messages[0].utc) : "none", b === g ? (j(3, [
5780
5780
  "%cset%c %cstorage%c %cmessages",
5781
- i.NO_UPDATES,
5782
- i.NONE,
5783
- i.STORAGE,
5784
- i.NONE,
5785
- i.MESSAGES,
5781
+ o.NO_UPDATES,
5782
+ o.NONE,
5783
+ o.STORAGE,
5784
+ o.NONE,
5785
+ o.MESSAGES,
5786
5786
  t.data?.title ?? t.query.widget,
5787
5787
  `same hash:${g}`
5788
5788
  ]), l.code = 204) : this.sm !== null ? (t.query.hash = g, await this.sm?.setHash("cards", t.query), l.code = await this.sm.setMessages(t.query, t).then(async (I) => (this.broadcastUpdate(I, t), I)).catch((I) => 500)) : l.code = 500;
@@ -5790,45 +5790,45 @@ class rs {
5790
5790
  case _.CLOUD:
5791
5791
  b = await this.sm?.getHash(_.CLOUD, t.query), g = Ur(t.data.cloud), b === g ? (j(3, [
5792
5792
  "%cset%c %cstorage%c %ccloud",
5793
- i.NO_UPDATES,
5794
- i.NONE,
5795
- i.STORAGE,
5796
- i.NONE,
5797
- i.CLOUD,
5793
+ o.NO_UPDATES,
5794
+ o.NONE,
5795
+ o.STORAGE,
5796
+ o.NONE,
5797
+ o.CLOUD,
5798
5798
  t.data?.title ?? t.query.widget,
5799
5799
  `same hash:${g}`
5800
5800
  ]), j(4, [
5801
5801
  "%cdebug%c %ccloud",
5802
- i.NO_UPDATES,
5803
- i.NONE,
5804
- i.CLOUD,
5802
+ o.NO_UPDATES,
5803
+ o.NONE,
5804
+ o.CLOUD,
5805
5805
  t.query
5806
- ]), l = { code: 204, hash: g }) : (t.query.hash = g, await this.sm?.setHash(_.CLOUD, t.query), o = {
5806
+ ]), l = { code: 204, hash: g }) : (t.query.hash = g, await this.sm?.setHash(_.CLOUD, t.query), i = {
5807
5807
  data: {
5808
5808
  cloud: t.data
5809
5809
  },
5810
5810
  message: t.message,
5811
5811
  success: t.success,
5812
5812
  query: t.query
5813
- }, this.sm !== null ? l.code = await this.sm.setCloud(t.query, o.data).then((I) => (this.broadcastUpdate(I, t), I)).catch((I) => 500) : l.code = 500);
5813
+ }, this.sm !== null ? l.code = await this.sm.setCloud(t.query, i.data).then((I) => (this.broadcastUpdate(I, t), I)).catch((I) => 500) : l.code = 500);
5814
5814
  break;
5815
5815
  case _.SERIES:
5816
5816
  b = await this.sm?.getHash(_.SERIES, t.query), g = Ur(t.data.series), b === g ? (j(3, [
5817
5817
  "%cset%c %cstorage%c %cseries",
5818
- i.NO_UPDATES,
5819
- i.NONE,
5820
- i.STORAGE,
5821
- i.NONE,
5822
- i.SERIES,
5818
+ o.NO_UPDATES,
5819
+ o.NONE,
5820
+ o.STORAGE,
5821
+ o.NONE,
5822
+ o.SERIES,
5823
5823
  t.data?.title ?? t.query.widget,
5824
5824
  `same hash:${g}`
5825
5825
  ]), j(4, [
5826
5826
  "%cdebug%c %cseries",
5827
- i.NO_UPDATES,
5828
- i.NONE,
5829
- i.SERIES,
5827
+ o.NO_UPDATES,
5828
+ o.NONE,
5829
+ o.SERIES,
5830
5830
  t.query
5831
- ]), l = { code: 204, hash: g }) : (t.query.hash = g, await this.sm?.setHash(_.SERIES, t.query), o = {
5831
+ ]), l = { code: 204, hash: g }) : (t.query.hash = g, await this.sm?.setHash(_.SERIES, t.query), i = {
5832
5832
  data: t.data,
5833
5833
  message: t.message,
5834
5834
  success: t.success,
@@ -5838,22 +5838,22 @@ class rs {
5838
5838
  default:
5839
5839
  j(3, [
5840
5840
  `%cfetch%c %capi% %c${t.query.type} `,
5841
- i.KO,
5842
- i.NONE,
5843
- i.API,
5844
- i.NONE,
5845
- i.NO_UPDATES,
5841
+ o.KO,
5842
+ o.NONE,
5843
+ o.API,
5844
+ o.NONE,
5845
+ o.NO_UPDATES,
5846
5846
  `Bad request: type ${t.query.type} unknown`
5847
5847
  ]), l = { code: 404, hash: g };
5848
5848
  }
5849
5849
  else
5850
5850
  switch (j(3, [
5851
5851
  `%cset%c %c${t.query.type}%c %cunauthorized`,
5852
- i.KO,
5853
- i.NONE,
5854
- i.STORAGE,
5855
- i.NONE,
5856
- i.NO_UPDATES,
5852
+ o.KO,
5853
+ o.NONE,
5854
+ o.STORAGE,
5855
+ o.NONE,
5856
+ o.NO_UPDATES,
5857
5857
  t.query
5858
5858
  ]), t.query.type) {
5859
5859
  case _.MESSAGES:
@@ -5867,48 +5867,48 @@ class rs {
5867
5867
  };
5868
5868
  startBroadcastListener = () => {
5869
5869
  const t = this.options.presentation;
5870
- j(3, ["%cchannel%c %capi", i.BROADCAST, i.NONE, i.API, t]), this.bc && (this.bc.onmessage = (o) => {
5871
- this.actions(o);
5870
+ j(3, ["%cchannel%c %capi", o.BROADCAST, o.NONE, o.API, t]), this.bc && (this.bc.onmessage = (i) => {
5871
+ this.actions(i);
5872
5872
  }, this.bc.postMessage({ event: J.STORAGE_INIT, data: {} }));
5873
5873
  };
5874
- broadcastMessage = (t, o) => {
5875
- this.bc && this.bc.postMessage({ event: t, data: o });
5874
+ broadcastMessage = (t, i) => {
5875
+ this.bc && this.bc.postMessage({ event: t, data: i });
5876
5876
  };
5877
- broadcastUpdate = (t, o) => {
5877
+ broadcastUpdate = (t, i) => {
5878
5878
  switch (t) {
5879
5879
  case 201:
5880
5880
  j(3, [
5881
- `%cupdate%c %cwidget%c %c${o.query?.type}`,
5882
- i.BROADCAST,
5883
- i.NONE,
5884
- i.WIDGET,
5885
- i.NONE,
5886
- St(o.query),
5881
+ `%cupdate%c %cwidget%c %c${i.query?.type}`,
5882
+ o.BROADCAST,
5883
+ o.NONE,
5884
+ o.WIDGET,
5885
+ o.NONE,
5886
+ St(i.query),
5887
5887
  // @ts-expect-error query.widget is obligatory but not always
5888
- `${o?.data?.title ?? ""} ${o.query.widget}`
5888
+ `${i?.data?.title ?? ""} ${i.query.widget}`
5889
5889
  ]), j(4, [
5890
5890
  "%cdebug%c %cevent",
5891
- i.NO_UPDATES,
5892
- i.NONE,
5893
- i.BROADCAST,
5894
- o
5891
+ o.NO_UPDATES,
5892
+ o.NONE,
5893
+ o.BROADCAST,
5894
+ i
5895
5895
  ]), this.bc?.postMessage({
5896
5896
  event: J.WIDGET_UPDATE,
5897
- data: o.query
5897
+ data: i.query
5898
5898
  });
5899
5899
  break;
5900
5900
  case 204:
5901
5901
  break;
5902
5902
  default:
5903
5903
  j(2, [
5904
- `%cupdate%c %cwidget%c %c${o.query?.type}`,
5905
- i.KO,
5906
- i.NONE,
5907
- i.WIDGET,
5908
- i.NONE,
5909
- St(o.query),
5904
+ `%cupdate%c %cwidget%c %c${i.query?.type}`,
5905
+ o.KO,
5906
+ o.NONE,
5907
+ o.WIDGET,
5908
+ o.NONE,
5909
+ St(i.query),
5910
5910
  "Fetch error",
5911
- o.query
5911
+ i.query
5912
5912
  ]);
5913
5913
  break;
5914
5914
  }
@@ -5919,66 +5919,77 @@ class rs {
5919
5919
  actions = async (t) => {
5920
5920
  switch (t.data.event) {
5921
5921
  case J.SUBSCRIBE:
5922
- const o = t.data.data;
5923
- o.widget !== void 0 && (j(3, [
5922
+ const i = t.data.data;
5923
+ i.widget !== void 0 && (j(3, [
5924
5924
  `%csubscribe%c %cwidget%c %c${t.data.data.type}`,
5925
- i.BROADCAST,
5926
- i.NONE,
5927
- i.WIDGET,
5928
- i.NONE,
5929
- St(o),
5930
- o
5931
- ]), this.addSubscriber(o));
5925
+ o.BROADCAST,
5926
+ o.NONE,
5927
+ o.WIDGET,
5928
+ o.NONE,
5929
+ St(i),
5930
+ i
5931
+ ]), this.addSubscriber(i));
5932
5932
  break;
5933
5933
  case J.UPDATE:
5934
5934
  j(3, [
5935
5935
  "%cupdate%c %capi%c %cstorage",
5936
- i.BROADCAST,
5937
- i.NONE,
5938
- i.API,
5939
- i.NONE,
5940
- i.STORAGE,
5936
+ o.BROADCAST,
5937
+ o.NONE,
5938
+ o.API,
5939
+ o.NONE,
5940
+ o.STORAGE,
5941
5941
  t.data
5942
5942
  ]), await this.update(t.data.data);
5943
5943
  break;
5944
+ case "stream":
5945
+ j(3, [
5946
+ "%cupdate%c %capi%c %cstorage",
5947
+ o.BROADCAST,
5948
+ o.NONE,
5949
+ o.API,
5950
+ o.NONE,
5951
+ o.STORAGE,
5952
+ t.data
5953
+ ]), await this.stream();
5954
+ break;
5944
5955
  }
5945
5956
  };
5946
5957
  cleanMessages = async () => {
5947
5958
  if (this.options?.suspended) {
5948
5959
  j(2, [
5949
5960
  "%cclean%c %cstorage%c %cmessages",
5950
- i.KO,
5951
- i.NONE,
5952
- i.STORAGE,
5953
- i.NONE,
5954
- i.MESSAGES,
5961
+ o.KO,
5962
+ o.NONE,
5963
+ o.STORAGE,
5964
+ o.NONE,
5965
+ o.MESSAGES,
5955
5966
  "Account suspended"
5956
5967
  ]);
5957
5968
  return;
5958
5969
  }
5959
- const t = this.options?.retention || 86400 * 40, o = await this.sm?.cleanMessages(
5970
+ const t = this.options?.retention || 86400 * 40, i = await this.sm?.cleanMessages(
5960
5971
  t
5961
5972
  );
5962
5973
  j(3, [
5963
5974
  "%cclean%c %cstorage%c %cmessages",
5964
- i.OK,
5965
- i.NONE,
5966
- i.STORAGE,
5967
- i.NONE,
5968
- i.MESSAGES,
5969
- `${o} messages deleted`
5975
+ o.OK,
5976
+ o.NONE,
5977
+ o.STORAGE,
5978
+ o.NONE,
5979
+ o.MESSAGES,
5980
+ `${i} messages deleted`
5970
5981
  ]);
5971
5982
  };
5972
5983
  hideMessage = async (t) => {
5973
- const o = await this.sm?.hideMessage(t.id, 0);
5984
+ const i = await this.sm?.hideMessage(t.id, 0);
5974
5985
  return j(3, [
5975
5986
  "%chide%c %cstorage%c %cmessages",
5976
- i.OK,
5977
- i.NONE,
5978
- i.STORAGE,
5979
- i.NONE,
5980
- i.MESSAGES,
5981
- `${o} messages hidden`
5987
+ o.OK,
5988
+ o.NONE,
5989
+ o.STORAGE,
5990
+ o.NONE,
5991
+ o.MESSAGES,
5992
+ `${i} messages hidden`
5982
5993
  ]), await this.api.hideMessage(t);
5983
5994
  };
5984
5995
  clearCards = async () => {
@@ -6014,11 +6025,11 @@ class rs {
6014
6025
  setDashboard = async (t) => await this.sm?.setDashboard(t);
6015
6026
  loadImages = async (t) => await this.api.loadImages(t);
6016
6027
  storeImage = async (t) => await this.api.storeImage(t);
6017
- deleteImage = async (t, o) => await this.api.deleteImage(t, o);
6028
+ deleteImage = async (t, i) => await this.api.deleteImage(t, i);
6018
6029
  getImages = async (t) => await this.sm?.getImages(t);
6019
6030
  setImage = async (t) => await this.sm?.setImage(t);
6020
- getHash = async (t, o) => await this.sm?.getHash(t, o);
6021
- setHash = async (t, o) => await this.sm?.setHash(t, o) ?? 400;
6031
+ getHash = async (t, i) => await this.sm?.getHash(t, i);
6032
+ setHash = async (t, i) => await this.sm?.setHash(t, i) ?? 400;
6022
6033
  }
6023
6034
  class Fa {
6024
6035
  sm;
@@ -6048,11 +6059,11 @@ class Fa {
6048
6059
  */
6049
6060
  getCloud = async (t) => t.type !== _.CLOUD ? (console.warn(
6050
6061
  "%cget%c %cstorage%c %ccloud",
6051
- i.KO,
6052
- i.NONE,
6053
- i.STORAGE,
6054
- i.NONE,
6055
- i.CLOUD,
6062
+ o.KO,
6063
+ o.NONE,
6064
+ o.STORAGE,
6065
+ o.NONE,
6066
+ o.CLOUD,
6056
6067
  t.widget,
6057
6068
  "wrong method call for getCloud, type used is",
6058
6069
  t.type
@@ -6068,11 +6079,11 @@ class Fa {
6068
6079
  */
6069
6080
  getMessages = async (t) => t.type !== _.MESSAGES ? (console.warn(
6070
6081
  "%cget%c %cstorage%c %cmessages",
6071
- i.KO,
6072
- i.NONE,
6073
- i.STORAGE,
6074
- i.NONE,
6075
- i.MESSAGES,
6082
+ o.KO,
6083
+ o.NONE,
6084
+ o.STORAGE,
6085
+ o.NONE,
6086
+ o.MESSAGES,
6076
6087
  t.widget,
6077
6088
  "wrong method call for getMessages, type used is",
6078
6089
  t.type
@@ -6088,11 +6099,11 @@ class Fa {
6088
6099
  */
6089
6100
  getSeries = async (t) => t.type !== _.SERIES ? (console.warn(
6090
6101
  "%cget%c %cstorage%c %cseries",
6091
- i.KO,
6092
- i.NONE,
6093
- i.STORAGE,
6094
- i.NONE,
6095
- i.SERIES,
6102
+ o.KO,
6103
+ o.NONE,
6104
+ o.STORAGE,
6105
+ o.NONE,
6106
+ o.SERIES,
6096
6107
  t.widget,
6097
6108
  "wrong method call for getSeries, type used is",
6098
6109
  t.type
@@ -6115,8 +6126,8 @@ class ns {
6115
6126
  * @param callbacks functions in the widget that will receive the update
6116
6127
  * @param selector container for the element - by default buzzcasting-app (optional)
6117
6128
  */
6118
- constructor(t, o, l) {
6119
- this.element = t, this.callbacks = o, l = typeof l < "u" ? l : "buzzcasting-app";
6129
+ constructor(t, i, l) {
6130
+ this.element = t, this.callbacks = i, l = typeof l < "u" ? l : "buzzcasting-app";
6120
6131
  const g = { ...t.dataset };
6121
6132
  delete g.hmr;
6122
6133
  const b = window.__bc.opts;
@@ -6133,19 +6144,19 @@ class ns {
6133
6144
  */
6134
6145
  broadcastListener() {
6135
6146
  const t = this.query;
6136
- this.broadcastChannel.onmessage = async (o) => {
6137
- const l = o.data.data;
6138
- switch (o.data.event) {
6147
+ this.broadcastChannel.onmessage = async (i) => {
6148
+ const l = i.data.data;
6149
+ switch (i.data.event) {
6139
6150
  case J.WIDGET_UPDATE:
6140
6151
  try {
6141
6152
  if (l.dashboard === t.dashboard && l.widget === t.widget) {
6142
6153
  const g = await this.getData();
6143
6154
  g?.success && (j(4, [
6144
6155
  `%cset%c %cwidget%c %c${this.query.type}`,
6145
- i.OK,
6146
- i.NONE,
6147
- i.WIDGET,
6148
- i.NONE,
6156
+ o.OK,
6157
+ o.NONE,
6158
+ o.WIDGET,
6159
+ o.NONE,
6149
6160
  //@ts-ignore
6150
6161
  St(this.query),
6151
6162
  this.query
@@ -6173,17 +6184,17 @@ class ns {
6173
6184
  data: this.query
6174
6185
  }), j(3, [
6175
6186
  `%csubscribe%c %cwidget%c %c${this.query.type}`,
6176
- i.SUBSCRIBE,
6177
- i.NONE,
6178
- i.WIDGET,
6179
- i.NONE,
6187
+ o.SUBSCRIBE,
6188
+ o.NONE,
6189
+ o.WIDGET,
6190
+ o.NONE,
6180
6191
  St(this.query),
6181
6192
  this.query.widget
6182
6193
  ]), j(4, [
6183
6194
  "%cdebug%c %cwidget",
6184
- i.NO_UPDATES,
6185
- i.NONE,
6186
- i.WIDGET,
6195
+ o.NO_UPDATES,
6196
+ o.NONE,
6197
+ o.WIDGET,
6187
6198
  this.query
6188
6199
  ]));
6189
6200
  }
@@ -6215,19 +6226,19 @@ class ns {
6215
6226
  */
6216
6227
  getCloud = async () => this.query.type !== _.CLOUD ? (j(3, [
6217
6228
  "%cget%c %cstorage%c %cwidget",
6218
- i.KO,
6219
- i.NONE,
6220
- i.STORAGE,
6221
- i.NONE,
6222
- i.WIDGET,
6229
+ o.KO,
6230
+ o.NONE,
6231
+ o.STORAGE,
6232
+ o.NONE,
6233
+ o.WIDGET,
6223
6234
  this.query.widget,
6224
6235
  "Wrong method call for getCloud, expected type is",
6225
6236
  this.query.type
6226
6237
  ]), j(4, [
6227
6238
  "%cdebug%c %ccloud",
6228
- i.NO_UPDATES,
6229
- i.NONE,
6230
- i.CLOUD,
6239
+ o.NO_UPDATES,
6240
+ o.NONE,
6241
+ o.CLOUD,
6231
6242
  this.query
6232
6243
  ]), {
6233
6244
  data: null,
@@ -6242,19 +6253,19 @@ class ns {
6242
6253
  */
6243
6254
  getMessages = async () => this.query.type !== _.MESSAGES ? (j(3, [
6244
6255
  "%cget%c %cstorage%c %cwidget",
6245
- i.KO,
6246
- i.NONE,
6247
- i.STORAGE,
6248
- i.NONE,
6249
- i.WIDGET,
6256
+ o.KO,
6257
+ o.NONE,
6258
+ o.STORAGE,
6259
+ o.NONE,
6260
+ o.WIDGET,
6250
6261
  this.query.widget,
6251
6262
  "Wrong method call for getMessages, expected type is",
6252
6263
  this.query.type
6253
6264
  ]), j(4, [
6254
6265
  "%debug%c %cmessages",
6255
- i.NO_UPDATES,
6256
- i.NONE,
6257
- i.MESSAGES,
6266
+ o.NO_UPDATES,
6267
+ o.NONE,
6268
+ o.MESSAGES,
6258
6269
  this.query
6259
6270
  ]), {
6260
6271
  data: null,
@@ -6268,19 +6279,19 @@ class ns {
6268
6279
  */
6269
6280
  getSeries = async () => this.query.type !== _.SERIES ? (j(3, [
6270
6281
  "%cget%c %cstorage%c %cwidget",
6271
- i.KO,
6272
- i.NONE,
6273
- i.STORAGE,
6274
- i.NONE,
6275
- i.WIDGET,
6282
+ o.KO,
6283
+ o.NONE,
6284
+ o.STORAGE,
6285
+ o.NONE,
6286
+ o.WIDGET,
6276
6287
  this.query.widget,
6277
6288
  "Wrong method call for getSeries, expected type is",
6278
6289
  this.query.type
6279
6290
  ]), j(4, [
6280
6291
  "%cdebug%c %cseries",
6281
- i.NO_UPDATES,
6282
- i.NONE,
6283
- i.SERIES,
6292
+ o.NO_UPDATES,
6293
+ o.NONE,
6294
+ o.SERIES,
6284
6295
  this.query
6285
6296
  ]), {
6286
6297
  data: null,
@@ -6297,15 +6308,15 @@ class ns {
6297
6308
  showModal = (t) => {
6298
6309
  j(3, [
6299
6310
  "%cmodal%c %cwidget",
6300
- i.OK,
6301
- i.NONE,
6302
- i.WIDGET,
6311
+ o.OK,
6312
+ o.NONE,
6313
+ o.WIDGET,
6303
6314
  J.SHOW_MODAL,
6304
6315
  t.showComponent,
6305
6316
  Da(this.element.attributes)
6306
6317
  // props['data-widget'],
6307
6318
  ]);
6308
- const o = new CustomEvent(J.SHOW_MODAL, {
6319
+ const i = new CustomEvent(J.SHOW_MODAL, {
6309
6320
  detail: {
6310
6321
  component: t.showComponent,
6311
6322
  props: t.props,
@@ -6316,7 +6327,7 @@ class ns {
6316
6327
  cancelable: !0,
6317
6328
  composed: !0
6318
6329
  });
6319
- window.dispatchEvent(o);
6330
+ window.dispatchEvent(i);
6320
6331
  };
6321
6332
  destroy() {
6322
6333
  this.broadcastChannel.close();