buzzcasting-storage 3.5.8 → 3.6.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
1
  var Aa = Object.defineProperty;
2
- var Pa = (l, n, s) => n in l ? Aa(l, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[n] = s;
3
- var _ = (l, n, s) => Pa(l, typeof n != "symbol" ? n + "" : n, s);
4
- var D = /* @__PURE__ */ ((l) => (l.MESSAGES = "messages", l.CLOUD = "cloud", l.SERIES = "series", l.TOPICS = "topics", l.WIDGET = "widget", l.WIDGETS = "widgets", l.DASHBOARD = "dashboard", l.DASHBOARDS = "dashboards", l.SLIDE = "slide", l.SLIDES = "slides", l.PRESENTATION = "presentation", l.PRESENTATIONS = "presentations", l.PREFERENCE = "preference", l.PREFERENCES = "preferences", l))(D || {}), d = /* @__PURE__ */ ((l) => (l.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", l.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", l.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", l.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", l.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", l.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", l.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", l.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", l.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", l.NONE = "color:transparent;background-color:transparent;", l.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", l.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", l.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", l.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", l.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", l.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", l.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", l))(d || {}), q = /* @__PURE__ */ ((l) => (l.ADD_SLIDE = "addSlide", l.APP_READY = "appReady", l.API_UPDATE = "apiUpdate", l.WS_API_REQUEST = "wsApiRequest", l.WS_API_RESPONSE = "wsApiResponse", l.WS_API_UPDATE = "wsApiRUpdate", l.APPROVE_MESSAGE = "approveMessage", l.CHANNEL = "channel", l.CLEAN_MESSAGES = "cleanMessages", l.CLOSE_MODAL = "closeModal", l.CLOSE_BUILDER_MODAL = "closeBuilderModal", l.DASHBOARD_LOAD = "loadDashboard", l.DASHBOARD_STORE = "storeDashboard", l.ERROR = "error", l.HIDE_MESSAGE = "hideMessage", l.HIDE_LABELS = "hideLabels", l.MAUPPUT_UPDATE = "layoutUpdate", l.PAUSE_PRESENTATION = "pausePresentation", l.PRESENTATION_READY = "presentationReady", l.PREV_SLIDE = "prevSlide", l.RELOAD_PRESENTATION = "reloadPresentation", l.SHOW_MODAL = "showModal", l.STAR_MESSAGE = "starMessage", l.GOTO_SLIDE = "gotoSlide", l.NEXT_SLIDE = "nextSlide", l.PREFERENCE_LOAD = "loadPreference", l.PREFERENCE_STORE = "storePreference", l.PRESENTATION_LOAD = "loadPresentation", l.PRESENTATION_STORE = "storePresentation", l.SHOW_BUILDER_MODAL = "showBuilderModal", l.SLIDE_DID_LOAD = "slideDidLoad", l.SLIDE_GOTO = "slideGoto", l.SLIDE_READY = "slideReady", l.SLIDE_LOAD = "loadSlide", l.SLIDE_STORE = "storeSlide", l.SLIDE_TRANSITIONER = "slideTransitioner", l.START_TRANSITIONER = "startTransitioner", l.STORAGE_INIT = "storageInit", l.SUBSCRIBE = "subscribe", l.SUSPEND_ACCOUNT = "suspendAccount", l.SWITCH_PRESENTATION = "switchPresentation", l.REMOVE_CLOUD = "removeCloud", l.UPDATE = "update", l.VERSION = "version", l.WIDGET_LOAD = "widgetLoad", l.WIDGET_STORE = "widgetStore", l.WIDGET_UPDATE = "widgetUpdate", l))(q || {}), Vt = /* @__PURE__ */ ((l) => (l.APPROVED = "approved", l.BEFORE = "before", l.DELAYED = "delayed", l.NONE = "none", l.REALTIME = "realtime", l))(Vt || {}), me = /* @__PURE__ */ ((l) => (l.KEYVAL = "keyval", l.LOCAL = "local", l.SESSION = "session", l.DEXIE = "dexie", l.WINDOW = "window", l))(me || {});
5
- const Da = "3.5.7";
2
+ var Pa = (d, n, s) => n in d ? Aa(d, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[n] = s;
3
+ var _ = (d, n, s) => Pa(d, typeof n != "symbol" ? n + "" : n, s);
4
+ var D = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.DASHBOARD = "dashboard", d.DASHBOARDS = "dashboards", d.SLIDE = "slide", d.SLIDES = "slides", d.PRESENTATION = "presentation", d.PRESENTATIONS = "presentations", d.PREFERENCE = "preference", d.PREFERENCES = "preferences", d))(D || {}), l = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(l || {}), q = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.WS_API_REQUEST = "wsApiRequest", d.WS_API_RESPONSE = "wsApiResponse", d.WS_API_UPDATE = "wsApiRUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.DASHBOARD_LOAD = "loadDashboard", d.DASHBOARD_STORE = "storeDashboard", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.MAUPPUT_UPDATE = "layoutUpdate", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.PREFERENCE_LOAD = "loadPreference", d.PREFERENCE_STORE = "storePreference", d.PRESENTATION_LOAD = "loadPresentation", d.PRESENTATION_STORE = "storePresentation", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.SWITCH_PRESENTATION = "switchPresentation", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_LOAD = "widgetLoad", d.WIDGET_STORE = "widgetStore", d.WIDGET_UPDATE = "widgetUpdate", d))(q || {}), Vt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Vt || {}), me = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(me || {});
5
+ const Da = "3.6.0";
6
6
  class xa {
7
7
  constructor(n) {
8
8
  _(this, "options");
@@ -37,11 +37,11 @@ class xa {
37
37
  const k = Object.keys(S).length > 0 ? `?${new URLSearchParams(S).toString()}` : "";
38
38
  return console.info(
39
39
  "%capi%c %cfetch",
40
- d.API,
41
- d.NONE,
42
- d.GET_DATA,
40
+ l.API,
41
+ l.NONE,
42
+ l.GET_DATA,
43
43
  n.widget
44
- ), console.debug("%capi%c %cfetch", d.API, d.NONE, d.GET_DATA, S), await fetch(
44
+ ), console.debug("%capi%c %cfetch", l.API, l.NONE, l.GET_DATA, S), await fetch(
45
45
  [this.url, "api", s, n.type].join("/") + k,
46
46
  { ...u, method: "get" }
47
47
  ).then(async (M) => {
@@ -54,9 +54,9 @@ class xa {
54
54
  const { version: s } = this.options, u = this.headers(), S = "?action=visible";
55
55
  return console.info(
56
56
  "%capi%c %cput",
57
- d.API,
58
- d.NONE,
59
- d.GET_DATA,
57
+ l.API,
58
+ l.NONE,
59
+ l.GET_DATA,
60
60
  q.HIDE_MESSAGE,
61
61
  n.widget,
62
62
  n.id
@@ -75,9 +75,9 @@ class xa {
75
75
  S.append(`custom_filters[${M}]`, F);
76
76
  return console.info(
77
77
  "%capi%c %cput",
78
- d.API,
79
- d.NONE,
80
- d.GET_DATA,
78
+ l.API,
79
+ l.NONE,
80
+ l.GET_DATA,
81
81
  q.HIDE_LABELS,
82
82
  n.widget,
83
83
  k
@@ -94,9 +94,9 @@ class xa {
94
94
  const { version: s } = this.options, u = this.headers(), S = Object.assign({}, n);
95
95
  return delete S.slide, delete S.type, delete S.hash, console.debug(
96
96
  "%capi%c %cloadSlide",
97
- d.API,
98
- d.NONE,
99
- d.SLIDE,
97
+ l.API,
98
+ l.NONE,
99
+ l.SLIDE,
100
100
  n.id
101
101
  ), await fetch(
102
102
  [this.url, "api", s, "slides", n.id].join("/"),
@@ -120,9 +120,9 @@ class xa {
120
120
  const S = JSON.stringify(n);
121
121
  return console.info(
122
122
  "%capi%c %cput",
123
- d.API,
124
- d.NONE,
125
- d.SLIDE,
123
+ l.API,
124
+ l.NONE,
125
+ l.SLIDE,
126
126
  q.SLIDE_STORE,
127
127
  n.id
128
128
  ), await fetch(
@@ -138,9 +138,9 @@ class xa {
138
138
  const { version: s } = this.options, u = this.headers();
139
139
  return delete n.update, console.debug(
140
140
  "%capi%c %cloadPresentation",
141
- d.API,
142
- d.NONE,
143
- d.SLIDE,
141
+ l.API,
142
+ l.NONE,
143
+ l.SLIDE,
144
144
  n.id
145
145
  ), await fetch(
146
146
  [this.url, "api", s, D.PRESENTATIONS, n.id].join("/"),
@@ -162,7 +162,7 @@ class xa {
162
162
  const { version: s } = this.options, u = this.formHeaders();
163
163
  delete n.update;
164
164
  const S = JSON.stringify(n);
165
- return console.info("%capi%c %cput", d.API, d.NONE, d.SLIDE, n.name), await fetch(
165
+ return console.info("%capi%c %cput", l.API, l.NONE, l.SLIDE, n.name), await fetch(
166
166
  [this.url, "api", s, D.PRESENTATIONS, n.id].join("/"),
167
167
  { ...u, body: S, method: "put" }
168
168
  ).then((k) => {
@@ -175,9 +175,9 @@ class xa {
175
175
  const { version: s } = this.options, u = this.headers();
176
176
  return console.debug(
177
177
  "%capi%c %cloadPreference",
178
- d.API,
179
- d.NONE,
180
- d.SLIDE,
178
+ l.API,
179
+ l.NONE,
180
+ l.SLIDE,
181
181
  n.id
182
182
  ), await fetch(
183
183
  [this.url, "api", s, D.PREFERENCES, n.id].join("/"),
@@ -194,9 +194,9 @@ class xa {
194
194
  const S = JSON.stringify({ data: n });
195
195
  return console.info(
196
196
  "%capi%c %cstorePreference",
197
- d.API,
198
- d.NONE,
199
- d.SLIDE,
197
+ l.API,
198
+ l.NONE,
199
+ l.SLIDE,
200
200
  n.id
201
201
  ), await fetch(
202
202
  [this.url, "api", s, D.PREFERENCES, n.id].join("/"),
@@ -211,9 +211,9 @@ class xa {
211
211
  const { version: s } = this.options, u = this.headers();
212
212
  return console.debug(
213
213
  "%capi%c %cloadWidget",
214
- d.API,
215
- d.NONE,
216
- d.SLIDE,
214
+ l.API,
215
+ l.NONE,
216
+ l.SLIDE,
217
217
  n.id
218
218
  ), await fetch(
219
219
  [this.url, "api", s, D.WIDGETS, n.id].join("/"),
@@ -226,14 +226,14 @@ class xa {
226
226
  }
227
227
  }
228
228
  var ka = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
229
- function Ra(l) {
230
- return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
229
+ function Ra(d) {
230
+ return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
231
231
  }
232
232
  var qt = { exports: {} }, Ia = qt.exports, Tr;
233
233
  function Ta() {
234
- return Tr || (Tr = 1, function(l, n) {
234
+ return Tr || (Tr = 1, function(d, n) {
235
235
  (function(s, u) {
236
- l.exports = u();
236
+ d.exports = u();
237
237
  })(Ia, function() {
238
238
  var s = function(e, t) {
239
239
  return (s = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, a) {
@@ -3244,33 +3244,33 @@ var Ca = Ta();
3244
3244
  const Un = /* @__PURE__ */ Ra(Ca), Cr = Symbol.for("Dexie"), en = globalThis[Cr] || (globalThis[Cr] = Un);
3245
3245
  if (Un.semVer !== en.semVer)
3246
3246
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${en.semVer}`);
3247
- function X(l) {
3248
- let n = `${l.type}.${l.topics}`;
3249
- return l.order && (n += `.${l.order}`), l.period && (n += `.${l.period}`), n;
3247
+ function X(d) {
3248
+ let n = `${d.type}.${d.topics}`;
3249
+ return d.order && (n += `.${d.order}`), d.period && (n += `.${d.period}`), n;
3250
3250
  }
3251
- function $r(l) {
3251
+ function $r(d) {
3252
3252
  var n;
3253
- if (l.widget === void 0) {
3254
- const s = (n = l.topics) == null ? void 0 : n.split("-");
3255
- s && s.length > 1 ? (l.dashboard = s ? s[0] : "", l.widget = s ? s[1] : "") : (l.widget = l.topics, l.dashboard = l.slide);
3253
+ if (d.widget === void 0) {
3254
+ const s = (n = d.topics) == null ? void 0 : n.split("-");
3255
+ s && s.length > 1 ? (d.dashboard = s ? s[0] : "", d.widget = s ? s[1] : "") : (d.widget = d.topics, d.dashboard = d.slide);
3256
3256
  }
3257
- return l.topics === void 0 && (l.topics = `${l.dashboard}-${l.widget}`), l;
3257
+ return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
3258
3258
  }
3259
- function St(l, n) {
3259
+ function St(d, n) {
3260
3260
  var F;
3261
3261
  let s, u, S, k, M;
3262
- switch (l.moderation) {
3262
+ switch (d.moderation) {
3263
3263
  case Vt.BEFORE:
3264
- s = /* @__PURE__ */ new Date(), u = (F = l.beforeTime) == null ? void 0 : F.split(":"), S = Number.parseInt(u ? u[0] : "00"), k = Number.parseInt(u ? u[1] : "00"), M = Number.parseInt(u ? u[2] : "00"), n.before = s.setHours(S, k, M, 0) / 1e3, n.period || (n.period = s.getDay() === 1 ? 72 : 24);
3264
+ s = /* @__PURE__ */ new Date(), u = (F = d.beforeTime) == null ? void 0 : F.split(":"), S = Number.parseInt(u ? u[0] : "00"), k = Number.parseInt(u ? u[1] : "00"), M = Number.parseInt(u ? u[2] : "00"), n.before = s.setHours(S, k, M, 0) / 1e3, n.period || (n.period = s.getDay() === 1 ? 72 : 24);
3265
3265
  break;
3266
3266
  case Vt.DELAYED:
3267
- l.delay && l.delay > 0 && (n.delay = `${l.delay}`);
3267
+ d.delay && d.delay > 0 && (n.delay = `${d.delay}`);
3268
3268
  break;
3269
3269
  case Vt.APPROVED:
3270
3270
  n.approved = "1";
3271
3271
  break;
3272
3272
  default:
3273
- l.period !== 0 && (n.period = l.period);
3273
+ d.period !== 0 && (n.period = d.period);
3274
3274
  }
3275
3275
  return n;
3276
3276
  }
@@ -3288,18 +3288,18 @@ class Nr {
3288
3288
  const s = await this.db.table(D.CLOUD).where({ id: n.widget }).last().catch(() => {
3289
3289
  console.warn(
3290
3290
  "%capi%C %ccloud",
3291
- d.API,
3292
- d.NONE,
3293
- d.CLOUD,
3291
+ l.API,
3292
+ l.NONE,
3293
+ l.CLOUD,
3294
3294
  n.slide,
3295
3295
  n.widget
3296
3296
  );
3297
3297
  });
3298
3298
  return typeof s > "u" ? { data: null, message: "Cloud Data error", success: !1 } : (console.debug(
3299
3299
  "%cstorage%c %ccloud",
3300
- d.STORAGE,
3301
- d.NONE,
3302
- d.CLOUD,
3300
+ l.STORAGE,
3301
+ l.NONE,
3302
+ l.CLOUD,
3303
3303
  s
3304
3304
  ), s.data.presentation = (n == null ? void 0 : n.presentation) || "not set", s.data.slide = (n == null ? void 0 : n.slide) || "not set", s.data.query = n, s.query = n, s.message = "Cloud retrieved successfully", s.success = !0, s);
3305
3305
  });
@@ -3312,18 +3312,18 @@ class Nr {
3312
3312
  const s = await this.db.table(D.SERIES).where({ id: n.widget }).last().catch(() => {
3313
3313
  console.warn(
3314
3314
  "%capi%c %cseries",
3315
- d.API,
3316
- d.NONE,
3317
- d.SERIES,
3315
+ l.API,
3316
+ l.NONE,
3317
+ l.SERIES,
3318
3318
  n.slide,
3319
3319
  n.widget
3320
3320
  );
3321
3321
  });
3322
3322
  return s === void 0 ? { data: null, message: "Series Data error", success: !1 } : (console.debug(
3323
3323
  "%cstorage%c %cseries",
3324
- d.STORAGE,
3325
- d.NONE,
3326
- d.SERIES,
3324
+ l.STORAGE,
3325
+ l.NONE,
3326
+ l.SERIES,
3327
3327
  s
3328
3328
  ), s.data.presentation = (n == null ? void 0 : n.presentation) || "not set", s.data.slide = (n == null ? void 0 : n.slide) || "not set", s.data.query = n, s.query = n, s.message = "Series retrieved successfully", s.success = !0, s);
3329
3329
  });
@@ -3356,18 +3356,18 @@ class Nr {
3356
3356
  };
3357
3357
  return console.debug(
3358
3358
  "%cstorage%c %cmessages",
3359
- d.STORAGE,
3360
- d.NONE,
3361
- d.MESSAGES,
3359
+ l.STORAGE,
3360
+ l.NONE,
3361
+ l.MESSAGES,
3362
3362
  te
3363
3363
  ), te;
3364
3364
  });
3365
3365
  } catch (M) {
3366
3366
  return console.warn(
3367
3367
  "%cstorage%c %cmessages",
3368
- d.STORAGE,
3369
- d.NONE,
3370
- d.MESSAGES,
3368
+ l.STORAGE,
3369
+ l.NONE,
3370
+ l.MESSAGES,
3371
3371
  n,
3372
3372
  M
3373
3373
  ), { data: null, message: "Messages Data error", success: !1 };
@@ -3384,7 +3384,7 @@ class Nr {
3384
3384
  dashboard_id: n.dashboard,
3385
3385
  //data: data.data,
3386
3386
  data: s
3387
- }).then(() => 201).catch((u) => (console.error("%cstorage", d.STORAGE, "set", n, u.message), 400)) : 400);
3387
+ }).then(() => 201).catch((u) => (console.error("%cstorage", l.STORAGE, "set", n, u.message), 400)) : 400);
3388
3388
  /**
3389
3389
  * Update Series
3390
3390
  * @param query IQuery
@@ -3396,7 +3396,7 @@ class Nr {
3396
3396
  dashboard_id: n.dashboard,
3397
3397
  //data: data.data,
3398
3398
  data: s
3399
- }).then(() => 201).catch((u) => (console.error("%cstorage", d.STORAGE, "set", n, u.message), 400)) : 400);
3399
+ }).then(() => 201).catch((u) => (console.error("%cstorage", l.STORAGE, "set", n, u.message), 400)) : 400);
3400
3400
  /**
3401
3401
  * Update Messages
3402
3402
  * @param query IQuery
@@ -3418,7 +3418,7 @@ class Nr {
3418
3418
  }).catch((Qe) => {
3419
3419
  S++, console.error(
3420
3420
  "%cstorage",
3421
- d.STORAGE,
3421
+ l.STORAGE,
3422
3422
  "set message",
3423
3423
  `title: ${u}`,
3424
3424
  k,
@@ -3438,7 +3438,7 @@ class Nr {
3438
3438
  }).catch((Qe) => {
3439
3439
  S++, console.error(
3440
3440
  "%cstorage",
3441
- d.STORAGE,
3441
+ l.STORAGE,
3442
3442
  "set topic",
3443
3443
  `title: ${u}`,
3444
3444
  k,
@@ -3450,7 +3450,7 @@ class Nr {
3450
3450
  await this.db.table(D.TOPICS).where("message_id").equals(M).modify({ visible: F }).catch((J) => {
3451
3451
  S++, console.error(
3452
3452
  "%cstorage",
3453
- d.STORAGE,
3453
+ l.STORAGE,
3454
3454
  "update message visibility",
3455
3455
  `title: ${j}`,
3456
3456
  `widget: ${k.widget_id}`,
@@ -3466,30 +3466,30 @@ class Nr {
3466
3466
  const n = Date.now() / 1e3, s = (k) => k.expires < n, u = (k) => k.expires < n;
3467
3467
  return await this.db.table(D.TOPICS).orderBy("expires").filter(s).delete().catch((k) => (console.error(
3468
3468
  "%cstorage%c %cclean",
3469
- d.STORAGE,
3470
- d.NONE,
3471
- d.MESSAGES,
3469
+ l.STORAGE,
3470
+ l.NONE,
3471
+ l.MESSAGES,
3472
3472
  k.message
3473
3473
  ), 0)), await this.db.table(D.MESSAGES).orderBy("expires").filter(u).delete().catch((k) => (console.error(
3474
3474
  "%cstorage%c %clean",
3475
- d.STORAGE,
3476
- d.NONE,
3477
- d.MESSAGES,
3475
+ l.STORAGE,
3476
+ l.NONE,
3477
+ l.MESSAGES,
3478
3478
  k.message
3479
3479
  ), 0));
3480
3480
  });
3481
3481
  _(this, "hideMessage", async (n, s) => {
3482
3482
  await this.db.table(D.TOPICS).where("message_id").equals(n).modify({ visible: s ? 1 : 0 }).catch((u) => (console.error(
3483
3483
  "%cstorage%c %chide",
3484
- d.STORAGE,
3485
- d.NONE,
3486
- d.HIDE,
3484
+ l.STORAGE,
3485
+ l.NONE,
3486
+ l.HIDE,
3487
3487
  u.message
3488
3488
  ), 0));
3489
3489
  });
3490
3490
  _(this, "getDashboard", async (n) => {
3491
3491
  const s = await this.db.table(D.DASHBOARD).where({ id: n.id }).last().catch(() => {
3492
- console.warn("%cstorage", d.STORAGE, q.DASHBOARD_LOAD, n.id);
3492
+ console.warn("%cstorage", l.STORAGE, q.DASHBOARD_LOAD, n.id);
3493
3493
  });
3494
3494
  return s === void 0 ? {
3495
3495
  data: null,
@@ -3511,7 +3511,7 @@ class Nr {
3511
3511
  success: !0
3512
3512
  })).catch((s) => (console.error(
3513
3513
  "%cstorage",
3514
- d.STORAGE,
3514
+ l.STORAGE,
3515
3515
  D.WIDGET,
3516
3516
  n,
3517
3517
  s.message
@@ -3522,13 +3522,13 @@ class Nr {
3522
3522
  })));
3523
3523
  _(this, "getWidget", async (n) => {
3524
3524
  const s = await this.db.table(D.WIDGET).where({ id: n.id }).last().catch(() => {
3525
- console.warn("%cstorage", d.STORAGE, q.WIDGET_LOAD, n.id);
3525
+ console.warn("%cstorage", l.STORAGE, q.WIDGET_LOAD, n.id);
3526
3526
  });
3527
3527
  return s === void 0 ? {
3528
3528
  data: null,
3529
3529
  message: `Widget ${n.id} Load error`,
3530
3530
  success: !1
3531
- } : (s.message = `Slide ${n.id} retrieved from storage`, s.success = !0, s);
3531
+ } : (s.message = `Widget ${n.id} retrieved from storage`, s.success = !0, s);
3532
3532
  });
3533
3533
  // getWidgets = async (query: IQuery): Promise<IResponse> => {
3534
3534
  // const data = await this.db
@@ -3566,7 +3566,7 @@ class Nr {
3566
3566
  success: !0
3567
3567
  })).catch((s) => (console.error(
3568
3568
  "%cstorage",
3569
- d.STORAGE,
3569
+ l.STORAGE,
3570
3570
  D.WIDGET,
3571
3571
  n,
3572
3572
  s.message
@@ -3584,16 +3584,16 @@ class Nr {
3584
3584
  (u) => u.widget === n.widget
3585
3585
  ).length > 0 || (n.type === D.MESSAGES && (n = St(this.options, n)), console.info(
3586
3586
  "%cstorage%c %csubscribe",
3587
- d.STORAGE,
3588
- d.NONE,
3589
- d.SUBSCRIBE,
3587
+ l.STORAGE,
3588
+ l.NONE,
3589
+ l.SUBSCRIBE,
3590
3590
  n.slide,
3591
3591
  n.widget
3592
3592
  ), console.debug(
3593
3593
  "%cstorage%c %csubscribe",
3594
- d.STORAGE,
3595
- d.NONE,
3596
- d.SUBSCRIBE,
3594
+ l.STORAGE,
3595
+ l.NONE,
3596
+ l.SUBSCRIBE,
3597
3597
  n
3598
3598
  ), this.subscribers.push(n)), null));
3599
3599
  /**
@@ -3608,7 +3608,7 @@ class Nr {
3608
3608
  */
3609
3609
  _(this, "getSlide", async (n) => {
3610
3610
  const s = await this.db.table(D.SLIDE).where({ id: n.id }).last().catch(() => {
3611
- console.warn("%cstorage", d.STORAGE, q.SLIDE_LOAD, n.id);
3611
+ console.warn("%cstorage", l.STORAGE, q.SLIDE_LOAD, n.id);
3612
3612
  });
3613
3613
  return s === void 0 ? {
3614
3614
  data: null,
@@ -3635,7 +3635,7 @@ class Nr {
3635
3635
  success: !0
3636
3636
  })).catch((s) => (console.error(
3637
3637
  "%cstorage",
3638
- d.STORAGE,
3638
+ l.STORAGE,
3639
3639
  q.SLIDE_STORE,
3640
3640
  n,
3641
3641
  s.message
@@ -3653,7 +3653,7 @@ class Nr {
3653
3653
  const s = await this.db.table(D.PRESENTATION).where({ id: n.id }).last().catch(() => {
3654
3654
  console.warn(
3655
3655
  "%cstorage ",
3656
- d.STORAGE,
3656
+ l.STORAGE,
3657
3657
  q.PRESENTATION_LOAD,
3658
3658
  n.id
3659
3659
  );
@@ -3680,7 +3680,7 @@ class Nr {
3680
3680
  success: !0
3681
3681
  })).catch((s) => (console.error(
3682
3682
  "%cstorage",
3683
- d.STORAGE,
3683
+ l.STORAGE,
3684
3684
  q.PRESENTATION_STORE,
3685
3685
  n,
3686
3686
  s.message
@@ -3698,7 +3698,7 @@ class Nr {
3698
3698
  const s = await this.db.table(D.PREFERENCE).where({ id: n.id }).last().catch(() => {
3699
3699
  console.warn(
3700
3700
  "%cstorage",
3701
- d.STORAGE,
3701
+ l.STORAGE,
3702
3702
  q.PREFERENCE_LOAD,
3703
3703
  n.id
3704
3704
  );
@@ -3723,7 +3723,7 @@ class Nr {
3723
3723
  success: !0
3724
3724
  })).catch((s) => (console.error(
3725
3725
  "%cstorage",
3726
- d.STORAGE,
3726
+ l.STORAGE,
3727
3727
  q.PREFERENCE_STORE,
3728
3728
  n,
3729
3729
  s.message
@@ -3749,13 +3749,13 @@ class Nr {
3749
3749
  }), this.db.open();
3750
3750
  }
3751
3751
  }
3752
- function zn(l) {
3752
+ function zn(d) {
3753
3753
  return new Promise((n, s) => {
3754
- l.oncomplete = l.onsuccess = () => n(l.result), l.onabort = l.onerror = () => s(l.error);
3754
+ d.oncomplete = d.onsuccess = () => n(d.result), d.onabort = d.onerror = () => s(d.error);
3755
3755
  });
3756
3756
  }
3757
- function $a(l, n) {
3758
- const s = indexedDB.open(l);
3757
+ function $a(d, n) {
3758
+ const s = indexedDB.open(d);
3759
3759
  s.onupgradeneeded = () => s.result.createObjectStore(n);
3760
3760
  const u = zn(s);
3761
3761
  return (S, k) => u.then((M) => k(M.transaction(n, S).objectStore(n)));
@@ -3764,11 +3764,11 @@ let Fn;
3764
3764
  function Mr() {
3765
3765
  return Fn || (Fn = $a("keyval-store", "keyval")), Fn;
3766
3766
  }
3767
- function Ce(l, n = Mr()) {
3768
- return n("readonly", (s) => zn(s.get(l)));
3767
+ function Ce(d, n = Mr()) {
3768
+ return n("readonly", (s) => zn(s.get(d)));
3769
3769
  }
3770
- function $e(l, n, s = Mr()) {
3771
- return s("readwrite", (u) => (u.put(n, l), zn(u.transaction)));
3770
+ function $e(d, n, s = Mr()) {
3771
+ return s("readwrite", (u) => (u.put(n, d), zn(u.transaction)));
3772
3772
  }
3773
3773
  class jr {
3774
3774
  constructor(n) {
@@ -3776,15 +3776,15 @@ class jr {
3776
3776
  _(this, "options");
3777
3777
  _(this, "getCloud", async (n) => {
3778
3778
  const s = X(n);
3779
- return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", d.API, D.CLOUD, n.slide, n.widget), { data: null, message: "Cloud Data error", success: !1 }));
3779
+ return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.CLOUD, n.slide, n.widget), { data: null, message: "Cloud Data error", success: !1 }));
3780
3780
  });
3781
3781
  _(this, "getSeries", async (n) => {
3782
3782
  const s = X(n);
3783
- return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", d.API, D.SERIES, n.slide, n.widget), { data: null, message: "Series Data error", success: !1 }));
3783
+ return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.SERIES, n.slide, n.widget), { data: null, message: "Series Data error", success: !1 }));
3784
3784
  });
3785
3785
  _(this, "getMessages", async (n) => {
3786
3786
  const s = X(n);
3787
- return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", d.API, D.MESSAGES, n.slide, n.widget), { data: null, message: "Messages Data error", success: !1 }));
3787
+ return await Ce(s).then((u) => u).catch(() => (console.warn("%capi", l.API, D.MESSAGES, n.slide, n.widget), { data: null, message: "Messages Data error", success: !1 }));
3788
3788
  });
3789
3789
  /**
3790
3790
  * Update Cloud
@@ -3798,7 +3798,7 @@ class jr {
3798
3798
  const u = X(n);
3799
3799
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3800
3800
  "%cstorage",
3801
- d.STORAGE,
3801
+ l.STORAGE,
3802
3802
  D.CLOUD,
3803
3803
  n,
3804
3804
  S.message
@@ -3816,7 +3816,7 @@ class jr {
3816
3816
  const u = X(n);
3817
3817
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3818
3818
  "%cstorage",
3819
- d.STORAGE,
3819
+ l.STORAGE,
3820
3820
  D.SERIES,
3821
3821
  n,
3822
3822
  S.message
@@ -3834,7 +3834,7 @@ class jr {
3834
3834
  const u = X(n);
3835
3835
  return delete s.success, delete s.message, await $e(u, s).then(() => 201).catch((S) => (console.error(
3836
3836
  "%cstorage",
3837
- d.STORAGE,
3837
+ l.STORAGE,
3838
3838
  D.MESSAGES,
3839
3839
  n,
3840
3840
  S.message
@@ -3848,7 +3848,7 @@ class jr {
3848
3848
  });
3849
3849
  _(this, "getDashboard", async (n) => {
3850
3850
  const s = X(n);
3851
- return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", d.API, D.SLIDE, n.id), {
3851
+ return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3852
3852
  data: null,
3853
3853
  message: `Widget ${n.data.id} load error: ${u.message}`,
3854
3854
  success: !1
@@ -3870,7 +3870,7 @@ class jr {
3870
3870
  success: !0
3871
3871
  })).catch((S) => (console.error(
3872
3872
  "%cstorage",
3873
- d.STORAGE,
3873
+ l.STORAGE,
3874
3874
  D.WIDGET,
3875
3875
  n,
3876
3876
  S.message
@@ -3882,7 +3882,7 @@ class jr {
3882
3882
  });
3883
3883
  _(this, "getWidget", async (n) => {
3884
3884
  const s = X(n);
3885
- return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", d.API, D.SLIDE, n.id), {
3885
+ return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3886
3886
  data: null,
3887
3887
  message: `Widget ${n.data.id} load error: ${u.message}`,
3888
3888
  success: !1
@@ -3906,7 +3906,7 @@ class jr {
3906
3906
  success: !0
3907
3907
  })).catch((S) => (console.error(
3908
3908
  "%cstorage",
3909
- d.STORAGE,
3909
+ l.STORAGE,
3910
3910
  D.WIDGET,
3911
3911
  n,
3912
3912
  S.message
@@ -3925,9 +3925,9 @@ class jr {
3925
3925
  (u) => u.widget === n.widget
3926
3926
  ).length > 0 || (console.debug(
3927
3927
  "%cstorage%c %csubscribe",
3928
- d.STORAGE,
3929
- d.NONE,
3930
- d.SUBSCRIBE,
3928
+ l.STORAGE,
3929
+ l.NONE,
3930
+ l.SUBSCRIBE,
3931
3931
  n.slide,
3932
3932
  n.widget
3933
3933
  ), this.subscribers.push(n)), null));
@@ -3938,7 +3938,7 @@ class jr {
3938
3938
  _(this, "getSubscribers", async () => await new Promise((n) => n(this.subscribers)));
3939
3939
  _(this, "getSlide", async (n) => {
3940
3940
  const s = X(n);
3941
- return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", d.API, D.SLIDE, n.id), {
3941
+ return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.SLIDE, n.id), {
3942
3942
  data: null,
3943
3943
  message: `Slide ${n.data.id} load error: ${u.message}`,
3944
3944
  success: !1
@@ -3962,7 +3962,7 @@ class jr {
3962
3962
  success: !0
3963
3963
  })).catch((S) => (console.error(
3964
3964
  "%cstorage",
3965
- d.STORAGE,
3965
+ l.STORAGE,
3966
3966
  D.SLIDE,
3967
3967
  n,
3968
3968
  S.message
@@ -3974,7 +3974,7 @@ class jr {
3974
3974
  });
3975
3975
  _(this, "getPresentation", async (n) => {
3976
3976
  const s = X(n);
3977
- return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", d.API, D.PRESENTATION, n.id), {
3977
+ return await Ce(s).then((u) => u).catch((u) => (console.warn("%capi", l.API, D.PRESENTATION, n.id), {
3978
3978
  data: null,
3979
3979
  message: `Slide ${n.data.id} load error: ${u.message}`,
3980
3980
  success: !1
@@ -3993,7 +3993,7 @@ class jr {
3993
3993
  success: !0
3994
3994
  })).catch((S) => (console.error(
3995
3995
  "%cstorage",
3996
- d.STORAGE,
3996
+ l.STORAGE,
3997
3997
  D.PRESENTATION,
3998
3998
  n,
3999
3999
  S.message
@@ -4003,7 +4003,7 @@ class jr {
4003
4003
  success: !1
4004
4004
  }));
4005
4005
  });
4006
- _(this, "getPreference", async (n) => await Ce(`${D.PREFERENCE}.${n.id}`).then((s) => s).catch((s) => (console.warn("%capi", d.API, D.PREFERENCE, n.id), {
4006
+ _(this, "getPreference", async (n) => await Ce(`${D.PREFERENCE}.${n.id}`).then((s) => s).catch((s) => (console.warn("%capi", l.API, D.PREFERENCE, n.id), {
4007
4007
  data: null,
4008
4008
  message: `Preference ${n.id} save error: ${s.message}`,
4009
4009
  success: !1
@@ -4019,7 +4019,7 @@ class jr {
4019
4019
  success: !0
4020
4020
  })).catch((s) => (console.error(
4021
4021
  "%cstorage",
4022
- d.STORAGE,
4022
+ l.STORAGE,
4023
4023
  D.PREFERENCE,
4024
4024
  n,
4025
4025
  s.message
@@ -4042,7 +4042,7 @@ class Br {
4042
4042
  } catch (u) {
4043
4043
  return console.warn(
4044
4044
  "%capi",
4045
- d.API,
4045
+ l.API,
4046
4046
  D.CLOUD,
4047
4047
  n.slide,
4048
4048
  n.widget,
@@ -4057,7 +4057,7 @@ class Br {
4057
4057
  } catch (u) {
4058
4058
  return console.warn(
4059
4059
  "%capi",
4060
- d.API,
4060
+ l.API,
4061
4061
  D.SERIES,
4062
4062
  n.slide,
4063
4063
  n.widget,
@@ -4072,7 +4072,7 @@ class Br {
4072
4072
  } catch (u) {
4073
4073
  return console.warn(
4074
4074
  "%capi",
4075
- d.API,
4075
+ l.API,
4076
4076
  D.MESSAGES,
4077
4077
  n.slide,
4078
4078
  n.widget,
@@ -4091,7 +4091,7 @@ class Br {
4091
4091
  try {
4092
4092
  return localStorage.setObject(u, s), 201;
4093
4093
  } catch (S) {
4094
- return console.error("%cstorage", d.STORAGE, D.CLOUD, n, S), 400;
4094
+ return console.error("%cstorage", l.STORAGE, D.CLOUD, n, S), 400;
4095
4095
  }
4096
4096
  });
4097
4097
  /**
@@ -4105,7 +4105,7 @@ class Br {
4105
4105
  try {
4106
4106
  return localStorage.setObject(u, s), 201;
4107
4107
  } catch (S) {
4108
- return console.error("%cstorage", d.STORAGE, D.SERIES, n, S), 400;
4108
+ return console.error("%cstorage", l.STORAGE, D.SERIES, n, S), 400;
4109
4109
  }
4110
4110
  });
4111
4111
  /**
@@ -4119,7 +4119,7 @@ class Br {
4119
4119
  try {
4120
4120
  return localStorage.setObject(u, s), 200;
4121
4121
  } catch (S) {
4122
- return console.error("%cstorage", d.STORAGE, D.MESSAGES, n, S), 400;
4122
+ return console.error("%cstorage", l.STORAGE, D.MESSAGES, n, S), 400;
4123
4123
  }
4124
4124
  });
4125
4125
  _(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -4132,7 +4132,7 @@ class Br {
4132
4132
  try {
4133
4133
  return localStorage.getObject(`${D.DASHBOARD}.${n.id}`);
4134
4134
  } catch (s) {
4135
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4135
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4136
4136
  data: null,
4137
4137
  message: `Dashboard ${n.id} load error: ${s.message}`,
4138
4138
  success: !1
@@ -4148,7 +4148,7 @@ class Br {
4148
4148
  success: !0
4149
4149
  };
4150
4150
  } catch (u) {
4151
- return console.error("%cstorage", d.STORAGE, D.WIDGET, n, u), {
4151
+ return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
4152
4152
  data: null,
4153
4153
  message: `Dashboard ${n.data.id} save error: ${u.message}`,
4154
4154
  success: !1
@@ -4159,7 +4159,7 @@ class Br {
4159
4159
  try {
4160
4160
  return localStorage.getObject(`${D.WIDGET}.${n.id}`);
4161
4161
  } catch (s) {
4162
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4162
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4163
4163
  data: null,
4164
4164
  message: `Widget ${n.id} load error: ${s.message}`,
4165
4165
  success: !1
@@ -4175,7 +4175,7 @@ class Br {
4175
4175
  success: !0
4176
4176
  };
4177
4177
  } catch (u) {
4178
- return console.error("%cstorage", d.STORAGE, D.WIDGET, n, u), {
4178
+ return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
4179
4179
  data: null,
4180
4180
  message: `Widget ${n.data.id} save error: ${u.message}`,
4181
4181
  success: !1
@@ -4191,9 +4191,9 @@ class Br {
4191
4191
  (u) => u.widget === n.widget
4192
4192
  ).length || (console.debug(
4193
4193
  "%cstorage%c %csubscribe",
4194
- d.STORAGE,
4195
- d.NONE,
4196
- d.SUBSCRIBE,
4194
+ l.STORAGE,
4195
+ l.NONE,
4196
+ l.SUBSCRIBE,
4197
4197
  n.slide,
4198
4198
  n.widget
4199
4199
  ), this.subscribers.push(n)), null));
@@ -4206,7 +4206,7 @@ class Br {
4206
4206
  try {
4207
4207
  return localStorage.getObject(`${D.SLIDE}.${n.id}`);
4208
4208
  } catch (s) {
4209
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4209
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4210
4210
  data: null,
4211
4211
  message: `Slide ${n.id} load error: ${s.message}`,
4212
4212
  success: !1
@@ -4226,7 +4226,7 @@ class Br {
4226
4226
  success: !0
4227
4227
  };
4228
4228
  } catch (s) {
4229
- return console.error("%cstorage", d.STORAGE, D.SLIDE, n, s), {
4229
+ return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
4230
4230
  data: null,
4231
4231
  message: `Slide ${n.data.id} save error: ${s.message}`,
4232
4232
  success: !1
@@ -4237,7 +4237,7 @@ class Br {
4237
4237
  try {
4238
4238
  return localStorage.getObject(`${D.PRESENTATION}.${n.id}`);
4239
4239
  } catch (s) {
4240
- return console.warn("%capi", d.API, D.PRESENTATION, n.id, s), {
4240
+ return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
4241
4241
  data: null,
4242
4242
  message: `Slide ${n.id} load error: ${s.message}`,
4243
4243
  success: !1
@@ -4252,7 +4252,7 @@ class Br {
4252
4252
  success: !0
4253
4253
  };
4254
4254
  } catch (s) {
4255
- return console.error("%cstorage", d.STORAGE, D.PRESENTATION, n, s), {
4255
+ return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
4256
4256
  data: null,
4257
4257
  message: `Presentation ${n.data.id} save error: ${s.message}`,
4258
4258
  success: !1
@@ -4263,7 +4263,7 @@ class Br {
4263
4263
  try {
4264
4264
  return localStorage.getObject(`${D.PREFERENCE}.${n.id}`);
4265
4265
  } catch (s) {
4266
- return console.warn("%capi", d.API, D.PREFERENCE, n.id, s), {
4266
+ return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
4267
4267
  data: null,
4268
4268
  message: `Preference ${n.id} load error: ${s.message}`,
4269
4269
  success: !1
@@ -4283,7 +4283,7 @@ class Br {
4283
4283
  } catch (s) {
4284
4284
  return console.error(
4285
4285
  "%cstorage",
4286
- d.STORAGE,
4286
+ l.STORAGE,
4287
4287
  D.PREFERENCE,
4288
4288
  n,
4289
4289
  s
@@ -4313,7 +4313,7 @@ class Kr {
4313
4313
  } catch (u) {
4314
4314
  return console.warn(
4315
4315
  "%capi",
4316
- d.API,
4316
+ l.API,
4317
4317
  D.CLOUD,
4318
4318
  n.slide,
4319
4319
  n.widget,
@@ -4328,7 +4328,7 @@ class Kr {
4328
4328
  } catch (u) {
4329
4329
  return console.warn(
4330
4330
  "%capi",
4331
- d.API,
4331
+ l.API,
4332
4332
  D.SERIES,
4333
4333
  n.slide,
4334
4334
  n.widget,
@@ -4343,7 +4343,7 @@ class Kr {
4343
4343
  } catch (u) {
4344
4344
  return console.warn(
4345
4345
  "%capi",
4346
- d.API,
4346
+ l.API,
4347
4347
  D.MESSAGES,
4348
4348
  n.slide,
4349
4349
  n.widget,
@@ -4362,7 +4362,7 @@ class Kr {
4362
4362
  try {
4363
4363
  return sessionStorage.setObject(u, s), 201;
4364
4364
  } catch (S) {
4365
- return console.error("%cstorage", d.STORAGE, D.CLOUD, n, S), 400;
4365
+ return console.error("%cstorage", l.STORAGE, D.CLOUD, n, S), 400;
4366
4366
  }
4367
4367
  });
4368
4368
  /**
@@ -4376,7 +4376,7 @@ class Kr {
4376
4376
  try {
4377
4377
  return sessionStorage.setObject(u, s), 201;
4378
4378
  } catch (S) {
4379
- return console.error("%cstorage", d.STORAGE, D.SERIES, n, S), 400;
4379
+ return console.error("%cstorage", l.STORAGE, D.SERIES, n, S), 400;
4380
4380
  }
4381
4381
  });
4382
4382
  /**
@@ -4390,7 +4390,7 @@ class Kr {
4390
4390
  try {
4391
4391
  return sessionStorage.setObject(u, s), 200;
4392
4392
  } catch (S) {
4393
- return console.error("%cstorage", d.STORAGE, D.MESSAGES, n, S), 400;
4393
+ return console.error("%cstorage", l.STORAGE, D.MESSAGES, n, S), 400;
4394
4394
  }
4395
4395
  });
4396
4396
  _(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -4403,7 +4403,7 @@ class Kr {
4403
4403
  try {
4404
4404
  return sessionStorage.getObject(`${D.DASHBOARD}.${n.id}`);
4405
4405
  } catch (s) {
4406
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4406
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4407
4407
  data: null,
4408
4408
  message: `Dashboard ${n.id} load error: ${s.message}`,
4409
4409
  success: !1
@@ -4419,7 +4419,7 @@ class Kr {
4419
4419
  success: !0
4420
4420
  };
4421
4421
  } catch (u) {
4422
- return console.error("%cstorage", d.STORAGE, D.WIDGET, n, u), {
4422
+ return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
4423
4423
  data: null,
4424
4424
  message: `Dashboard ${n.data.id} save error: ${u.message}`,
4425
4425
  success: !1
@@ -4430,7 +4430,7 @@ class Kr {
4430
4430
  try {
4431
4431
  return sessionStorage.getObject(`${D.WIDGET}.${n.id}`);
4432
4432
  } catch (s) {
4433
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4433
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4434
4434
  data: null,
4435
4435
  message: `Widget ${n.id} load error: ${s.message}`,
4436
4436
  success: !1
@@ -4446,7 +4446,7 @@ class Kr {
4446
4446
  success: !0
4447
4447
  };
4448
4448
  } catch (u) {
4449
- return console.error("%cstorage", d.STORAGE, D.WIDGET, n, u), {
4449
+ return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
4450
4450
  data: null,
4451
4451
  message: `Slide ${n.data.id} save error: ${u.message}`,
4452
4452
  success: !1
@@ -4462,9 +4462,9 @@ class Kr {
4462
4462
  (u) => u.widget === n.widget
4463
4463
  ).length || (console.debug(
4464
4464
  "%cstorage%c %csubscribe",
4465
- d.STORAGE,
4466
- d.NONE,
4467
- d.SUBSCRIBE,
4465
+ l.STORAGE,
4466
+ l.NONE,
4467
+ l.SUBSCRIBE,
4468
4468
  n.slide,
4469
4469
  n.widget
4470
4470
  ), this.subscribers.push(n)), null));
@@ -4477,7 +4477,7 @@ class Kr {
4477
4477
  try {
4478
4478
  return sessionStorage.getObject(`${D.SLIDE}.${n.id}`);
4479
4479
  } catch (s) {
4480
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4480
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4481
4481
  data: null,
4482
4482
  message: `Slide ${n.id} load error: ${s.message}`,
4483
4483
  success: !1
@@ -4502,7 +4502,7 @@ class Kr {
4502
4502
  success: !0
4503
4503
  };
4504
4504
  } catch (s) {
4505
- return console.error("%cstorage", d.STORAGE, D.SLIDE, n, s), {
4505
+ return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
4506
4506
  data: null,
4507
4507
  message: `Slide ${n.data.id} save error: ${s.message}`,
4508
4508
  success: !1
@@ -4513,7 +4513,7 @@ class Kr {
4513
4513
  try {
4514
4514
  return sessionStorage.getObject(`${D.PRESENTATION}.${n.id}`);
4515
4515
  } catch (s) {
4516
- return console.warn("%capi", d.API, D.PRESENTATION, n.id, s), {
4516
+ return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
4517
4517
  data: null,
4518
4518
  message: `Slide ${n.id} load error: ${s.message}`,
4519
4519
  success: !1
@@ -4528,7 +4528,7 @@ class Kr {
4528
4528
  success: !0
4529
4529
  };
4530
4530
  } catch (s) {
4531
- return console.error("%cstorage", d.STORAGE, D.PRESENTATION, n, s), {
4531
+ return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
4532
4532
  data: null,
4533
4533
  message: `Presentation ${n.data.id} save error: ${s.message}`,
4534
4534
  success: !1
@@ -4539,7 +4539,7 @@ class Kr {
4539
4539
  try {
4540
4540
  return sessionStorage.getObject(`${D.PREFERENCE}.${n.id}`);
4541
4541
  } catch (s) {
4542
- return console.warn("%capi", d.API, D.PREFERENCE, n.id, s), {
4542
+ return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
4543
4543
  data: null,
4544
4544
  message: `Preference ${n.id} load error: ${s.message}`,
4545
4545
  success: !1
@@ -4559,7 +4559,7 @@ class Kr {
4559
4559
  } catch (s) {
4560
4560
  return console.error(
4561
4561
  "%cstorage",
4562
- d.STORAGE,
4562
+ l.STORAGE,
4563
4563
  D.PREFERENCE,
4564
4564
  n,
4565
4565
  s
@@ -4589,7 +4589,7 @@ class Lr {
4589
4589
  } catch (u) {
4590
4590
  return console.warn(
4591
4591
  "%capi",
4592
- d.API,
4592
+ l.API,
4593
4593
  D.CLOUD,
4594
4594
  n.slide,
4595
4595
  n.widget,
@@ -4604,7 +4604,7 @@ class Lr {
4604
4604
  } catch (u) {
4605
4605
  return console.warn(
4606
4606
  "%capi",
4607
- d.API,
4607
+ l.API,
4608
4608
  D.SERIES,
4609
4609
  n.slide,
4610
4610
  n.widget,
@@ -4619,7 +4619,7 @@ class Lr {
4619
4619
  } catch (u) {
4620
4620
  return console.warn(
4621
4621
  "%capi",
4622
- d.API,
4622
+ l.API,
4623
4623
  D.MESSAGES,
4624
4624
  n.slide,
4625
4625
  n.widget,
@@ -4638,7 +4638,7 @@ class Lr {
4638
4638
  try {
4639
4639
  return window.BuzzCasting.WidgetData[u] = s, 201;
4640
4640
  } catch (S) {
4641
- return console.error("%cstorage", d.STORAGE, "set", n, S), 400;
4641
+ return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
4642
4642
  }
4643
4643
  });
4644
4644
  /**
@@ -4652,7 +4652,7 @@ class Lr {
4652
4652
  try {
4653
4653
  return window.BuzzCasting.WidgetData[u] = s, 201;
4654
4654
  } catch (S) {
4655
- return console.error("%cstorage", d.STORAGE, "set", n, S), 400;
4655
+ return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
4656
4656
  }
4657
4657
  });
4658
4658
  /**
@@ -4666,7 +4666,7 @@ class Lr {
4666
4666
  try {
4667
4667
  return window.BuzzCasting.WidgetData[u] = s, 201;
4668
4668
  } catch (S) {
4669
- return console.error("%cstorage", d.STORAGE, "set", n, S), 400;
4669
+ return console.error("%cstorage", l.STORAGE, "set", n, S), 400;
4670
4670
  }
4671
4671
  });
4672
4672
  _(this, "cleanMessages", async (n) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -4679,7 +4679,7 @@ class Lr {
4679
4679
  try {
4680
4680
  return window.BuzzCasting.DashboardData[n.id];
4681
4681
  } catch (s) {
4682
- return console.warn("%capi", d.API, D.DASHBOARD, n.id, s), {
4682
+ return console.warn("%capi", l.API, D.DASHBOARD, n.id, s), {
4683
4683
  data: null,
4684
4684
  message: `Dashboard ${n.id} load error: ${s.message}`,
4685
4685
  success: !1
@@ -4695,7 +4695,7 @@ class Lr {
4695
4695
  success: !0
4696
4696
  };
4697
4697
  } catch (u) {
4698
- return console.error("%cstorage", d.STORAGE, D.DASHBOARD, n, u), {
4698
+ return console.error("%cstorage", l.STORAGE, D.DASHBOARD, n, u), {
4699
4699
  data: null,
4700
4700
  message: `Dashboard ${n.data.id} save error: ${u.message}`,
4701
4701
  success: !1
@@ -4706,7 +4706,7 @@ class Lr {
4706
4706
  try {
4707
4707
  return window.BuzzCasting.WidgetData[n.id];
4708
4708
  } catch (s) {
4709
- return console.warn("%capi", d.API, D.WIDGET, n.id, s), {
4709
+ return console.warn("%capi", l.API, D.WIDGET, n.id, s), {
4710
4710
  data: null,
4711
4711
  message: `Widget ${n.id} load error: ${s.message}`,
4712
4712
  success: !1
@@ -4722,7 +4722,7 @@ class Lr {
4722
4722
  success: !0
4723
4723
  };
4724
4724
  } catch (u) {
4725
- return console.error("%cstorage", d.STORAGE, D.WIDGET, n, u), {
4725
+ return console.error("%cstorage", l.STORAGE, D.WIDGET, n, u), {
4726
4726
  data: null,
4727
4727
  message: `Slide ${n.data.id} save error: ${u.message}`,
4728
4728
  success: !1
@@ -4738,9 +4738,9 @@ class Lr {
4738
4738
  (u) => u.widget === n.widget
4739
4739
  ).length || (console.debug(
4740
4740
  "%cstorage%c %csubscribe",
4741
- d.STORAGE,
4742
- d.NONE,
4743
- d.SUBSCRIBE,
4741
+ l.STORAGE,
4742
+ l.NONE,
4743
+ l.SUBSCRIBE,
4744
4744
  n.slide,
4745
4745
  n.widget
4746
4746
  ), this.subscribers.push(n)), null));
@@ -4753,7 +4753,7 @@ class Lr {
4753
4753
  try {
4754
4754
  return window.BuzzCasting.SlideData[n.id];
4755
4755
  } catch (s) {
4756
- return console.warn("%capi", d.API, D.SLIDE, n.id, s), {
4756
+ return console.warn("%capi", l.API, D.SLIDE, n.id, s), {
4757
4757
  data: null,
4758
4758
  message: `Slide ${n.id} load error: ${s.message}`,
4759
4759
  success: !1
@@ -4773,7 +4773,7 @@ class Lr {
4773
4773
  success: !0
4774
4774
  };
4775
4775
  } catch (s) {
4776
- return console.error("%cstorage", d.STORAGE, D.SLIDE, n, s), {
4776
+ return console.error("%cstorage", l.STORAGE, D.SLIDE, n, s), {
4777
4777
  data: null,
4778
4778
  message: `Slide ${n.data.id} save error: ${s.message}`,
4779
4779
  success: !1
@@ -4784,7 +4784,7 @@ class Lr {
4784
4784
  try {
4785
4785
  return window.BuzzCasting.PresentationData[n.id];
4786
4786
  } catch (s) {
4787
- return console.warn("%capi", d.API, D.PRESENTATION, n.id, s), {
4787
+ return console.warn("%capi", l.API, D.PRESENTATION, n.id, s), {
4788
4788
  data: null,
4789
4789
  message: `Presentation ${n.id} load error: ${s.message}`,
4790
4790
  success: !1
@@ -4799,7 +4799,7 @@ class Lr {
4799
4799
  success: !0
4800
4800
  };
4801
4801
  } catch (s) {
4802
- return console.error("%cstorage", d.STORAGE, D.PRESENTATION, n, s), {
4802
+ return console.error("%cstorage", l.STORAGE, D.PRESENTATION, n, s), {
4803
4803
  data: null,
4804
4804
  message: `Presentation ${n.data.id} save error: ${s.message}`,
4805
4805
  success: !1
@@ -4810,7 +4810,7 @@ class Lr {
4810
4810
  try {
4811
4811
  return window.BuzzCasting.Preferences[n.id];
4812
4812
  } catch (s) {
4813
- return console.warn("%capi", d.API, D.PREFERENCE, n.id, s), {
4813
+ return console.warn("%capi", l.API, D.PREFERENCE, n.id, s), {
4814
4814
  data: null,
4815
4815
  message: `Preference ${n.id} load error: ${s.message}`,
4816
4816
  success: !1
@@ -4827,7 +4827,7 @@ class Lr {
4827
4827
  } catch (s) {
4828
4828
  return console.error(
4829
4829
  "%cstorage",
4830
- d.STORAGE,
4830
+ l.STORAGE,
4831
4831
  D.PREFERENCE,
4832
4832
  n,
4833
4833
  s
@@ -4841,17 +4841,17 @@ class Lr {
4841
4841
  this.options = n, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
4842
4842
  }
4843
4843
  }
4844
- function Wa(l) {
4845
- const n = l.toUpperCase().split(/[\s_-]+/);
4844
+ function Wa(d) {
4845
+ const n = d.toUpperCase().split(/[\s_-]+/);
4846
4846
  return n.length > 0 ? (n.forEach((s, u) => {
4847
4847
  n[u] = `${s.charAt(0)}.`;
4848
4848
  }), n.join(" ")) : "";
4849
4849
  }
4850
- function Ua(l) {
4850
+ function Ua(d) {
4851
4851
  let n = "", s = "", u = {
4852
4852
  backgroundImage: ""
4853
4853
  };
4854
- return typeof l.media < "u" && l.media.forEach((S) => {
4854
+ return typeof d.media < "u" && d.media.forEach((S) => {
4855
4855
  (S.type === "photo" || S.type === "image") && (u = {
4856
4856
  backgroundImage: `url(${S.url})`
4857
4857
  }, s = S.url), S.type === "video" && (n = S.url);
@@ -4861,24 +4861,24 @@ function Ua(l) {
4861
4861
  video: n
4862
4862
  };
4863
4863
  }
4864
- function Na(l) {
4864
+ function Na(d) {
4865
4865
  const n = {};
4866
- for (let s = 0; s < l.length; s++) {
4867
- const u = l.item(s);
4866
+ for (let s = 0; s < d.length; s++) {
4867
+ const u = d.item(s);
4868
4868
  u != null && u.name && (n[u.name] = u.value);
4869
4869
  }
4870
4870
  return n;
4871
4871
  }
4872
- function za(l) {
4872
+ function za(d) {
4873
4873
  const n = {};
4874
- for (let s = 0; s < l.length; s++) {
4875
- const u = l[s];
4874
+ for (let s = 0; s < d.length; s++) {
4875
+ const u = d[s];
4876
4876
  u.name !== "class" && !u.name.includes("data") && (n[u.name] = u.value);
4877
4877
  }
4878
4878
  return n;
4879
4879
  }
4880
- function Ha(l, n) {
4881
- switch (l) {
4880
+ function Ha(d, n) {
4881
+ switch (d) {
4882
4882
  case "ax":
4883
4883
  return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
4884
4884
  case "bl":
@@ -4921,19 +4921,19 @@ function Ha(l, n) {
4921
4921
  return "";
4922
4922
  }
4923
4923
  }
4924
- function Ya(l) {
4925
- return l.replace(/^\w|[A-Z]|\b\w/g, (n, s) => s === 0 ? n.toLowerCase() : n.toUpperCase()).replace(/\s+/g, "");
4924
+ function Ya(d) {
4925
+ return d.replace(/^\w|[A-Z]|\b\w/g, (n, s) => s === 0 ? n.toLowerCase() : n.toUpperCase()).replace(/\s+/g, "");
4926
4926
  }
4927
- function Qa(l) {
4928
- return l.toLowerCase().split("-").reduce((n, s) => n + (s.charAt(0).toUpperCase() + s.slice(1)));
4927
+ function Qa(d) {
4928
+ return d.toLowerCase().split("-").reduce((n, s) => n + (s.charAt(0).toUpperCase() + s.slice(1)));
4929
4929
  }
4930
- const Xa = (l) => l.charAt(0).toUpperCase() + l.slice(1);
4931
- function Ma(l) {
4930
+ const Xa = (d) => d.charAt(0).toUpperCase() + d.slice(1);
4931
+ function Ma(d) {
4932
4932
  const n = document.createRange();
4933
- n.selectNodeContents(l), n.deleteContents();
4933
+ n.selectNodeContents(d), n.deleteContents();
4934
4934
  }
4935
- function ja(l) {
4936
- l.reduce(
4935
+ function ja(d) {
4936
+ d.reduce(
4937
4937
  (n, s) => Object.keys(s).reduce(
4938
4938
  (u, S) => ({
4939
4939
  ...u,
@@ -4944,31 +4944,31 @@ function ja(l) {
4944
4944
  {}
4945
4945
  );
4946
4946
  }
4947
- function Ja(l, n = "font-bold") {
4948
- return `${(l == null ? void 0 : l.title.length) > 0 ? `<div class="${n}">${l.title}</div>` : ""}${l != null && l.content ? l.content.replace(/\n\n/g, `
4947
+ function Ja(d, n = "font-bold") {
4948
+ return `${(d == null ? void 0 : d.title.length) > 0 ? `<div class="${n}">${d.title}</div>` : ""}${d != null && d.content ? d.content.replace(/\n\n/g, `
4949
4949
  `).replace(/\n/g, "<br/>") : ""}`;
4950
4950
  }
4951
- function Ba(l, n) {
4952
- for (; l.length < n; )
4953
- l = `0${l}`;
4954
- return l;
4951
+ function Ba(d, n) {
4952
+ for (; d.length < n; )
4953
+ d = `0${d}`;
4954
+ return d;
4955
4955
  }
4956
- function Oe(l, n) {
4956
+ function Oe(d, n) {
4957
4957
  let s, u, S;
4958
4958
  if (n.length === 0)
4959
- return l;
4959
+ return d;
4960
4960
  for (s = 0, S = n.length; s < S; s++)
4961
- u = n.charCodeAt(s), l = (l << 5) - l + u, l |= 0;
4962
- return l < 0 ? l * -2 : l;
4961
+ u = n.charCodeAt(s), d = (d << 5) - d + u, d |= 0;
4962
+ return d < 0 ? d * -2 : d;
4963
4963
  }
4964
- function Ka(l, n, s) {
4965
- return Object.keys(n).sort().reduce(u, l);
4964
+ function Ka(d, n, s) {
4965
+ return Object.keys(n).sort().reduce(u, d);
4966
4966
  function u(S, k) {
4967
4967
  return Gr(S, n[k], k, s);
4968
4968
  }
4969
4969
  }
4970
- function Gr(l, n, s, u) {
4971
- const S = Oe(Oe(Oe(l, s), La(n)), typeof n);
4970
+ function Gr(d, n, s, u) {
4971
+ const S = Oe(Oe(Oe(d, s), La(n)), typeof n);
4972
4972
  if (n === null)
4973
4973
  return Oe(S, "null");
4974
4974
  if (n === void 0)
@@ -4988,15 +4988,15 @@ function Gr(l, n, s, u) {
4988
4988
  }
4989
4989
  return Oe(S, n.toString());
4990
4990
  }
4991
- function La(l) {
4992
- return Object.prototype.toString.call(l);
4991
+ function La(d) {
4992
+ return Object.prototype.toString.call(d);
4993
4993
  }
4994
- function Wn(l) {
4995
- return Ba(Gr(0, l, "", []).toString(16), 8);
4994
+ function Wn(d) {
4995
+ return Ba(Gr(0, d, "", []).toString(16), 8);
4996
4996
  }
4997
- function Za(l, n) {
4998
- if (l = l.toString().replace(/[^0-9.]/g, ""), l < 1e3)
4999
- return l;
4997
+ function Za(d, n) {
4998
+ if (d = d.toString().replace(/[^0-9.]/g, ""), d < 1e3)
4999
+ return d;
5000
5000
  const s = [
5001
5001
  { v: 1e3, s: "K" },
5002
5002
  { v: 1e6, s: "M" },
@@ -5006,11 +5006,11 @@ function Za(l, n) {
5006
5006
  { v: 1e18, s: "E" }
5007
5007
  ];
5008
5008
  let u;
5009
- for (u = s.length - 1; u > 0 && !(l >= s[u].v); u--)
5009
+ for (u = s.length - 1; u > 0 && !(d >= s[u].v); u--)
5010
5010
  ;
5011
- return (l / s[u].v).toFixed(n).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
5011
+ return (d / s[u].v).toFixed(n).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1") + s[u].s;
5012
5012
  }
5013
- function Va(l, n) {
5013
+ function Va(d, n) {
5014
5014
  const s = [
5015
5015
  { value: 1, symbol: "" },
5016
5016
  { value: 1e3, symbol: "K" },
@@ -5021,12 +5021,12 @@ function Va(l, n) {
5021
5021
  { value: 1e18, symbol: "E" }
5022
5022
  ], u = /\.0+$|(\.\d*[1-9])0+$/;
5023
5023
  let S;
5024
- for (S = s.length - 1; S > 0 && !(l >= s[S].value); S--)
5024
+ for (S = s.length - 1; S > 0 && !(d >= s[S].value); S--)
5025
5025
  ;
5026
- return (l / s[S].value).toFixed(n).replace(u, "$1") + s[S].symbol;
5026
+ return (d / s[S].value).toFixed(n).replace(u, "$1") + s[S].symbol;
5027
5027
  }
5028
- function qa(l) {
5029
- switch (l.language) {
5028
+ function qa(d) {
5029
+ switch (d.language) {
5030
5030
  case "ar":
5031
5031
  return {
5032
5032
  direction: "rtl",
@@ -5036,9 +5036,9 @@ function qa(l) {
5036
5036
  return {};
5037
5037
  }
5038
5038
  }
5039
- function es(l) {
5039
+ function es(d) {
5040
5040
  const n = window.BuzzCasting.getOptions().suspended ?? !1;
5041
- return l.forEach((s) => {
5041
+ return d.forEach((s) => {
5042
5042
  var u;
5043
5043
  if (n ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((u = s.content) == null ? void 0 : u.replace(
5044
5044
  /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
@@ -5075,16 +5075,16 @@ function es(l) {
5075
5075
  const S = new URL(s.link);
5076
5076
  s.sender.title = S.hostname.replace("www.", "");
5077
5077
  }
5078
- }), l;
5078
+ }), d;
5079
5079
  }
5080
- function ts(l, n, s, u) {
5081
- l.stopPropagation(), n.showModal({
5080
+ function ts(d, n, s, u) {
5081
+ d.stopPropagation(), n.showModal({
5082
5082
  showComponent: "card-modal",
5083
5083
  props: { data: s, options: u }
5084
5084
  });
5085
5085
  }
5086
- function ns(l) {
5087
- const n = [...l];
5086
+ function ns(d) {
5087
+ const n = [...d];
5088
5088
  for (let s = n.length - 1; s > 0; s--) {
5089
5089
  const u = Math.floor(Math.random() * (s + 1));
5090
5090
  [n[s], n[u]] = [n[u], n[s]];
@@ -5092,19 +5092,19 @@ function ns(l) {
5092
5092
  return n;
5093
5093
  }
5094
5094
  function rs() {
5095
- let l = "";
5095
+ let d = "";
5096
5096
  const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
5097
- for (let s = 0; s < 7; s++) l += n.charAt(Math.floor(Math.random() * n.length));
5098
- return l;
5097
+ for (let s = 0; s < 7; s++) d += n.charAt(Math.floor(Math.random() * n.length));
5098
+ return d;
5099
5099
  }
5100
- function as(l) {
5101
- return l[Math.floor(Math.random() * l.length)];
5100
+ function as(d) {
5101
+ return d[Math.floor(Math.random() * d.length)];
5102
5102
  }
5103
- const ss = (l) => {
5103
+ const ss = (d) => {
5104
5104
  switch (!0) {
5105
- case l < 0:
5105
+ case d < 0:
5106
5106
  return "text-down text-xs";
5107
- case l > 0:
5107
+ case d > 0:
5108
5108
  return "text-up text-xs";
5109
5109
  default:
5110
5110
  return "text-white text-xs";
@@ -5144,17 +5144,17 @@ class is {
5144
5144
  ), j.data.messages = te, ie = Wn(j.data.messages), J.hash === ie)
5145
5145
  return console.info(
5146
5146
  "%capi%c %cno updates",
5147
- d.API,
5148
- d.NONE,
5149
- d.NO_UPDATES,
5147
+ l.API,
5148
+ l.NONE,
5149
+ l.NO_UPDATES,
5150
5150
  D.MESSAGES,
5151
5151
  j.query.slide,
5152
5152
  j.query.widget
5153
5153
  ), console.debug(
5154
5154
  "%capi%c %cno updates",
5155
- d.API,
5156
- d.NONE,
5157
- d.NO_UPDATES,
5155
+ l.API,
5156
+ l.NONE,
5157
+ l.NO_UPDATES,
5158
5158
  D.MESSAGES,
5159
5159
  j
5160
5160
  ), 204;
@@ -5163,17 +5163,17 @@ class is {
5163
5163
  case D.CLOUD:
5164
5164
  ie = Wn(j.data), J.hash === ie ? (console.info(
5165
5165
  "%capi%c %cno updates",
5166
- d.API,
5167
- d.NONE,
5168
- d.NO_UPDATES,
5166
+ l.API,
5167
+ l.NONE,
5168
+ l.NO_UPDATES,
5169
5169
  D.CLOUD,
5170
5170
  j.query.slide,
5171
5171
  j.query.widget
5172
5172
  ), console.debug(
5173
5173
  "%capi%c %cno updates",
5174
- d.API,
5175
- d.NONE,
5176
- d.NO_UPDATES,
5174
+ l.API,
5175
+ l.NONE,
5176
+ l.NO_UPDATES,
5177
5177
  D.CLOUD,
5178
5178
  j
5179
5179
  ), F = 204) : (J.hash = ie, M = {
@@ -5194,17 +5194,17 @@ class is {
5194
5194
  case D.SERIES:
5195
5195
  ie = Wn(j.data), J.hash === ie ? (console.info(
5196
5196
  "%capi%c %cno updates",
5197
- d.API,
5198
- d.NONE,
5199
- d.NO_UPDATES,
5197
+ l.API,
5198
+ l.NONE,
5199
+ l.NO_UPDATES,
5200
5200
  D.SERIES,
5201
5201
  j.query.slide,
5202
5202
  j.query.widget
5203
5203
  ), console.debug(
5204
5204
  "%capi%c %cno updates",
5205
- d.API,
5206
- d.NONE,
5207
- d.NO_UPDATES,
5205
+ l.API,
5206
+ l.NONE,
5207
+ l.NO_UPDATES,
5208
5208
  D.SERIES,
5209
5209
  j
5210
5210
  ), F = 204) : (J.hash = ie, M = {
@@ -5225,83 +5225,78 @@ class is {
5225
5225
  default:
5226
5226
  console.warn(
5227
5227
  "%capi%c %cstorage",
5228
- d.API,
5229
- d.NONE,
5230
- d.STORAGE,
5228
+ l.API,
5229
+ l.NONE,
5230
+ l.STORAGE,
5231
5231
  "error",
5232
5232
  `data type ${j.query.type} unknown`
5233
5233
  );
5234
5234
  }
5235
5235
  } else
5236
5236
  F = 401;
5237
- if (
5238
- // @ts-ignore
5239
- typeof WorkerGlobalScope < "u" && // @ts-ignore
5240
- self instanceof WorkerGlobalScope
5241
- )
5242
- switch (F) {
5243
- case 201:
5244
- console.info(
5245
- "%capp%c %cbroadcast",
5246
- d.API,
5247
- d.NONE,
5248
- d.BROADCAST,
5249
- j.query.slide,
5250
- j.data.title ?? j.query.widget
5251
- ), console.debug(
5252
- "%capp%c %cbroadcast",
5253
- d.API,
5254
- d.NONE,
5255
- d.BROADCAST,
5256
- j
5257
- );
5258
- const J = structuredClone(M.query);
5259
- switch (j.query.type) {
5260
- case "messages":
5261
- j = await this.sm.getMessages(J);
5262
- break;
5263
- case "cloud":
5264
- j = await this.sm.getCloud(J), j && (j.query = J);
5265
- break;
5266
- case "series":
5267
- j = await this.sm.getSeries(J), j && (j.query = J);
5268
- break;
5269
- default:
5270
- console.warn(
5271
- "%capp%c %cbroadcast",
5272
- d.API,
5273
- d.NONE,
5274
- d.BROADCAST,
5275
- "Unhandled data type",
5276
- j.query
5277
- );
5278
- }
5279
- j && this.bc.postMessage({
5280
- event: q.WIDGET_UPDATE,
5281
- data: j.data
5282
- });
5283
- break;
5284
- case 204:
5285
- break;
5286
- default:
5287
- console.warn(
5288
- "%capp%c %cbroadcast",
5289
- d.API,
5290
- d.NONE,
5291
- d.BROADCAST,
5292
- "Fetch error",
5293
- j.query.slide,
5294
- j.data.title ?? j.query.widget
5295
- );
5296
- break;
5297
- }
5237
+ switch (F) {
5238
+ case 201:
5239
+ console.info(
5240
+ "%capp%c %cbroadcast",
5241
+ l.API,
5242
+ l.NONE,
5243
+ l.BROADCAST,
5244
+ j.query.slide,
5245
+ j.data.title ?? j.query.widget
5246
+ ), console.debug(
5247
+ "%capp%c %cbroadcast",
5248
+ l.API,
5249
+ l.NONE,
5250
+ l.BROADCAST,
5251
+ j
5252
+ );
5253
+ const J = structuredClone(M.query);
5254
+ switch (j.query.type) {
5255
+ case "messages":
5256
+ j = await this.sm.getMessages(J);
5257
+ break;
5258
+ case "cloud":
5259
+ j = await this.sm.getCloud(J), j && (j.query = J);
5260
+ break;
5261
+ case "series":
5262
+ j = await this.sm.getSeries(J), j && (j.query = J);
5263
+ break;
5264
+ default:
5265
+ console.warn(
5266
+ "%capp%c %cbroadcast",
5267
+ l.API,
5268
+ l.NONE,
5269
+ l.BROADCAST,
5270
+ "Unhandled data type",
5271
+ j.query
5272
+ );
5273
+ }
5274
+ j && this.bc.postMessage({
5275
+ event: q.WIDGET_UPDATE,
5276
+ data: j.data
5277
+ });
5278
+ break;
5279
+ case 204:
5280
+ break;
5281
+ default:
5282
+ console.warn(
5283
+ "%capp%c %cbroadcast",
5284
+ l.API,
5285
+ l.NONE,
5286
+ l.BROADCAST,
5287
+ "Fetch error",
5288
+ j.query.slide,
5289
+ j.data.title ?? j.query.widget
5290
+ );
5291
+ break;
5292
+ }
5298
5293
  return F;
5299
5294
  } else
5300
5295
  return console.warn(
5301
5296
  "%capi%c %cstorage",
5302
- d.API,
5303
- d.NONE,
5304
- d.STORAGE,
5297
+ l.API,
5298
+ l.NONE,
5299
+ l.STORAGE,
5305
5300
  q.ERROR,
5306
5301
  k.status
5307
5302
  ), 400;
@@ -5320,9 +5315,9 @@ class is {
5320
5315
  case q.UPDATE:
5321
5316
  console.debug(
5322
5317
  "%capi%c %cstorage",
5323
- d.API,
5324
- d.NONE,
5325
- d.STORAGE,
5318
+ l.API,
5319
+ l.NONE,
5320
+ l.STORAGE,
5326
5321
  q.UPDATE,
5327
5322
  n.data
5328
5323
  ), await this.update();
@@ -5334,9 +5329,9 @@ class is {
5334
5329
  if ((u = this.options) != null && u.suspended) {
5335
5330
  console.info(
5336
5331
  "%cstorage%c %cstorage",
5337
- d.STORAGE,
5338
- d.NONE,
5339
- d.MESSAGES,
5332
+ l.STORAGE,
5333
+ l.NONE,
5334
+ l.MESSAGES,
5340
5335
  "Account suspended"
5341
5336
  );
5342
5337
  return;
@@ -5346,9 +5341,9 @@ class is {
5346
5341
  ));
5347
5342
  console.info(
5348
5343
  "%cstorage%c %cstorage",
5349
- d.STORAGE,
5350
- d.NONE,
5351
- d.MESSAGES,
5344
+ l.STORAGE,
5345
+ l.NONE,
5346
+ l.MESSAGES,
5352
5347
  `${s} messages deleted`
5353
5348
  );
5354
5349
  });
@@ -5357,9 +5352,9 @@ class is {
5357
5352
  const s = await ((u = this.sm) == null ? void 0 : u.hideMessage(n.id, 0));
5358
5353
  return console.info(
5359
5354
  "%cstorage%c %cstorage",
5360
- d.STORAGE,
5361
- d.NONE,
5362
- d.HIDE,
5355
+ l.STORAGE,
5356
+ l.NONE,
5357
+ l.HIDE,
5363
5358
  `${s} messages hidden`
5364
5359
  ), await this.api.hideMessage(n);
5365
5360
  });
@@ -5417,9 +5412,9 @@ class is {
5417
5412
  });
5418
5413
  console.info(
5419
5414
  "%cstorage%c %cslide",
5420
- d.STORAGE,
5421
- d.NONE,
5422
- d.SLIDE,
5415
+ l.STORAGE,
5416
+ l.NONE,
5417
+ l.SLIDE,
5423
5418
  n.slide,
5424
5419
  q.VERSION,
5425
5420
  Da
@@ -5427,9 +5422,9 @@ class is {
5427
5422
  const s = (n == null ? void 0 : n.slide) || n.app;
5428
5423
  switch (this.bc = new BroadcastChannel(s), console.info(
5429
5424
  "%capi%c %cbroadcast",
5430
- d.API,
5431
- d.NONE,
5432
- d.BROADCAST,
5425
+ l.API,
5426
+ l.NONE,
5427
+ l.BROADCAST,
5433
5428
  q.CHANNEL,
5434
5429
  s
5435
5430
  ), this.bc.onmessage = (u) => {
@@ -5465,9 +5460,9 @@ class Ga {
5465
5460
  var s;
5466
5461
  return n.type !== D.CLOUD ? (console.warn(
5467
5462
  "%capp%c %get",
5468
- d.APP,
5469
- d.NONE,
5470
- d.GET_DATA,
5463
+ l.APP,
5464
+ l.NONE,
5465
+ l.GET_DATA,
5471
5466
  n.widget,
5472
5467
  "wrong method call for getMessages, type used is",
5473
5468
  n.type
@@ -5486,9 +5481,9 @@ class Ga {
5486
5481
  var s;
5487
5482
  return n.type !== D.MESSAGES ? (console.warn(
5488
5483
  "%capp%c %get",
5489
- d.APP,
5490
- d.NONE,
5491
- d.GET_DATA,
5484
+ l.APP,
5485
+ l.NONE,
5486
+ l.GET_DATA,
5492
5487
  n.widget,
5493
5488
  "wrong method call for getMessages, type used is",
5494
5489
  n.type
@@ -5507,9 +5502,9 @@ class Ga {
5507
5502
  var s;
5508
5503
  return n.type !== D.SERIES ? (console.warn(
5509
5504
  "%capp%c %get",
5510
- d.APP,
5511
- d.NONE,
5512
- d.GET_DATA,
5505
+ l.APP,
5506
+ l.NONE,
5507
+ l.GET_DATA,
5513
5508
  n.widget,
5514
5509
  "wrong method call for getMessages, type used is",
5515
5510
  n.type
@@ -5579,12 +5574,18 @@ class os {
5579
5574
  */
5580
5575
  _(this, "getCloud", async () => this.query.type !== D.CLOUD ? (console.warn(
5581
5576
  "%cstorage%c %cwidget",
5582
- d.STORAGE,
5583
- d.NONE,
5584
- d.WIDGET,
5577
+ l.STORAGE,
5578
+ l.NONE,
5579
+ l.WIDGET,
5585
5580
  this.query.widget,
5586
5581
  "Wrong method call for getCloud, expected type is",
5587
5582
  this.query.type
5583
+ ), console.debug(
5584
+ "%cstorage%c %cwidget",
5585
+ l.API,
5586
+ l.NONE,
5587
+ l.CLOUD,
5588
+ this.query
5588
5589
  ), {
5589
5590
  data: null,
5590
5591
  message: `wrong method call for getCloud, expected type is '${this.query.type}'`,
@@ -5597,9 +5598,9 @@ class os {
5597
5598
  */
5598
5599
  _(this, "getMessages", async () => this.query.type !== D.MESSAGES ? (console.warn(
5599
5600
  "%cstorage%c %cwidget",
5600
- d.STORAGE,
5601
- d.NONE,
5602
- d.WIDGET,
5601
+ l.STORAGE,
5602
+ l.NONE,
5603
+ l.WIDGET,
5603
5604
  this.query.widget,
5604
5605
  "Wrong method call for getMessages, expected type is",
5605
5606
  this.query.type
@@ -5609,9 +5610,9 @@ class os {
5609
5610
  success: !1
5610
5611
  }) : (console.debug(
5611
5612
  "%cstorage%c %cwidget",
5612
- d.API,
5613
- d.NONE,
5614
- d.MESSAGES,
5613
+ l.API,
5614
+ l.NONE,
5615
+ l.MESSAGES,
5615
5616
  this.query
5616
5617
  ), await this.storageReader.getMessages(this.query)));
5617
5618
  /**
@@ -5621,12 +5622,18 @@ class os {
5621
5622
  */
5622
5623
  _(this, "getSeries", async () => this.query.type !== D.SERIES ? (console.warn(
5623
5624
  "%cstorage%c %cwidget",
5624
- d.STORAGE,
5625
- d.NONE,
5626
- d.WIDGET,
5625
+ l.STORAGE,
5626
+ l.NONE,
5627
+ l.WIDGET,
5627
5628
  this.query.widget,
5628
5629
  "Wrong method call for getSeries, expected type is",
5629
5630
  this.query.type
5631
+ ), console.debug(
5632
+ "%cstorage%c %cwidget",
5633
+ l.API,
5634
+ l.NONE,
5635
+ l.MESSAGES,
5636
+ this.query
5630
5637
  ), {
5631
5638
  data: null,
5632
5639
  message: `wrong method call for getSeries, expected type is '${this.query.type}'`,
@@ -5641,7 +5648,7 @@ class os {
5641
5648
  _(this, "showModal", (n) => {
5642
5649
  console.debug(
5643
5650
  "%cwidget",
5644
- d.WIDGET,
5651
+ l.WIDGET,
5645
5652
  q.SHOW_MODAL,
5646
5653
  n.showComponent,
5647
5654
  // @ts-ignore
@@ -5697,16 +5704,16 @@ class os {
5697
5704
  subscribe() {
5698
5705
  console.info(
5699
5706
  "%cwidget%c %csubscribe",
5700
- d.WIDGET,
5701
- d.NONE,
5702
- d.SUBSCRIBE,
5707
+ l.WIDGET,
5708
+ l.NONE,
5709
+ l.SUBSCRIBE,
5703
5710
  this.query.slide,
5704
5711
  this.query.widget
5705
5712
  ), console.debug(
5706
5713
  "%cwidget%c %csubscribe",
5707
- d.WIDGET,
5708
- d.NONE,
5709
- d.SUBSCRIBE,
5714
+ l.WIDGET,
5715
+ l.NONE,
5716
+ l.SUBSCRIBE,
5710
5717
  this.query
5711
5718
  ), this.broadcastChannel.postMessage({
5712
5719
  event: q.SUBSCRIBE,
@@ -5721,7 +5728,7 @@ export {
5721
5728
  D as API,
5722
5729
  is as BuzzcastingStorageManager,
5723
5730
  Ga as BuzzcastingStorageReader,
5724
- d as CSS,
5731
+ l as CSS,
5725
5732
  q as EVENTS,
5726
5733
  Vt as MODERATION,
5727
5734
  me as STORAGE,