buzzcasting-storage 3.15.2 → 3.15.4

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.
@@ -17,6 +17,7 @@ export declare class BuzzcastingStorageManager {
17
17
  apiQuery: (apiQuery: any) => Promise<IprocessResponse>;
18
18
  private processResponse;
19
19
  startBroadcastListener: () => void;
20
+ broadcastMessage: (eventName: string, detail: any) => void;
20
21
  private broadcastUpdate;
21
22
  hide: (query: IQuery) => void;
22
23
  private actions;
@@ -1,4 +1,4 @@
1
- var S = /* @__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))(S || {}), 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:gret;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 || {}), X = /* @__PURE__ */ ((f) => (f.ADD_SLIDE = "addSlide", f.APP_READY = "appReady", f.API_UPDATE = "apiUpdate", f.BACKGROUND_UPDATE = "backgroundUpdate", f.COMPONENT_UPDATE = "componentUpdate", f.WS_API_REQUEST = "wsApiRequest", f.WS_API_RESPONSE = "wsApiResponse", f.WS_API_UPDATE = "wsApiRUpdate", 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.PREFEENCE_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))(X || {}), qt = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(qt || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
1
+ var S = /* @__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))(S || {}), 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:gret;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 || {}), X = /* @__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))(X || {}), qt = /* @__PURE__ */ ((f) => (f.APPROVED = "approved", f.BEFORE = "before", f.DELAYED = "delayed", f.NONE = "none", f.REALTIME = "realtime", f))(qt || {}), pe = /* @__PURE__ */ ((f) => (f.KEYVAL = "keyval", f.LOCAL = "local", f.SESSION = "session", f.DEXIE = "dexie", f.WINDOW = "window", f))(pe || {});
2
2
  function Pa(f) {
3
3
  const t = {};
4
4
  for (let i = 0; i < f.length; i++) {
@@ -76,7 +76,7 @@ at(
76
76
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
77
77
  );
78
78
  at("script,style");
79
- const M = (f = 0, t) => {
79
+ const G = (f = 0, t) => {
80
80
  switch (!0) {
81
81
  case f > 3:
82
82
  console.debug(...t);
@@ -131,7 +131,7 @@ function St(f, t) {
131
131
  }
132
132
  return t;
133
133
  }
134
- const xa = "3.15.1";
134
+ const xa = "3.15.3";
135
135
  class ka {
136
136
  options;
137
137
  url;
@@ -184,7 +184,7 @@ class ka {
184
184
  I = o.CLOUD;
185
185
  break;
186
186
  }
187
- return M(3, [
187
+ return G(3, [
188
188
  `%cfetch%c %capi%c %c${t.type}`,
189
189
  o.OK,
190
190
  o.NONE,
@@ -196,11 +196,11 @@ class ka {
196
196
  ]), await fetch(
197
197
  [this.url, "api", i, t.type].join("/") + b,
198
198
  { ...l, method: "get" }
199
- ).then(async (G) => {
200
- if (!G.ok)
201
- throw new Error(`${G.status}`);
202
- return G;
203
- }).then((G) => G.json()).then((G) => (G.query = t, G)).catch((G) => ({ success: !1, message: `${G}`, data: null, query: t }));
199
+ ).then(async (M) => {
200
+ if (!M.ok)
201
+ throw new Error(`${M.status}`);
202
+ return M;
203
+ }).then((M) => M.json()).then((M) => (M.query = t, M)).catch((M) => ({ success: !1, message: `${M}`, data: null, query: t }));
204
204
  }
205
205
  async hideMessage(t) {
206
206
  const { version: i } = this.options, l = this.headers(), g = "?action=visible";
@@ -223,8 +223,8 @@ class ka {
223
223
  }
224
224
  async hideLabels(t) {
225
225
  const { version: i } = this.options, l = this.formHeaders(), g = new URLSearchParams(), b = t.labels || [];
226
- for (const [I, G] of b.entries())
227
- g.append(`custom_filters[${I}]`, G);
226
+ for (const [I, M] of b.entries())
227
+ g.append(`custom_filters[${I}]`, M);
228
228
  return console.info(
229
229
  "%capi%c %cput",
230
230
  o.API,
@@ -244,7 +244,7 @@ class ka {
244
244
  }
245
245
  async loadSlide(t) {
246
246
  const { version: i } = this.options, l = this.headers(), g = Object.assign({}, t);
247
- return delete g.type, delete g.hash, M(3, [
247
+ return delete g.type, delete g.hash, G(3, [
248
248
  "%cload%c %capi%c %cslide",
249
249
  o.OK,
250
250
  o.NONE,
@@ -261,8 +261,8 @@ class ka {
261
261
  return b;
262
262
  }).then((b) => b.json()).then((b) => {
263
263
  let I;
264
- return t.type = "slides", b.query = t, b?.data && (Array.isArray(b.data) ? (I = structuredClone(b.data), I.forEach((G) => {
265
- typeof G.json == "string" && (G.json = JSON.parse(G.json));
264
+ return t.type = "slides", b.query = t, b?.data && (Array.isArray(b.data) ? (I = structuredClone(b.data), I.forEach((M) => {
265
+ typeof M.json == "string" && (M.json = JSON.parse(M.json));
266
266
  })) : (I = structuredClone(b.data), I.json = JSON.parse(I.json)), b.data = I), b;
267
267
  }).catch((b) => ({ success: !1, message: `${b}`, data: null }));
268
268
  }
@@ -277,7 +277,7 @@ class ka {
277
277
  const { version: i } = this.options, l = this.formHeaders();
278
278
  delete t.update, delete t.type;
279
279
  const g = JSON.stringify(t);
280
- return M(3, [
280
+ return G(3, [
281
281
  "%cput%c %capi%c %cslide",
282
282
  o.OK,
283
283
  o.NONE,
@@ -297,7 +297,7 @@ class ka {
297
297
  }
298
298
  async loadPresentation(t) {
299
299
  const { version: i } = this.options, l = this.headers();
300
- return delete t.update, M(3, [
300
+ return delete t.update, G(3, [
301
301
  "%cload%c %capi%c %cpresentation",
302
302
  o.OK,
303
303
  o.NONE,
@@ -328,7 +328,7 @@ class ka {
328
328
  const { version: i } = this.options, l = this.formHeaders();
329
329
  delete t.update;
330
330
  const g = JSON.stringify(t);
331
- return M(2, ["%capi%c %cput", o.API, o.NONE, o.PRESENTATION, t.name]), await fetch(
331
+ return G(2, ["%capi%c %cput", o.API, o.NONE, o.PRESENTATION, t.name]), await fetch(
332
332
  [this.url, "api", i, S.PRESENTATIONS, t.id].join("/"),
333
333
  { ...l, body: g, method: "put" }
334
334
  ).then((b) => {
@@ -339,7 +339,7 @@ class ka {
339
339
  }
340
340
  async loadPreference(t) {
341
341
  const { version: i } = this.options, l = this.headers();
342
- return M(3, [
342
+ return G(3, [
343
343
  "%cload%c %capi%c %cpreference",
344
344
  o.OK,
345
345
  o.NONE,
@@ -377,7 +377,7 @@ class ka {
377
377
  }
378
378
  async loadDashboards(t) {
379
379
  const { version: i } = this.options, l = this.headers();
380
- return M(3, ["%capi%c %cdashboards", o.API, o.NONE, o.WIDGET]), await fetch(
380
+ return G(3, ["%capi%c %cdashboards", o.API, o.NONE, o.WIDGET]), await fetch(
381
381
  [this.url, "api", i, S.WIDGETS, t?.id || ""].join("/"),
382
382
  {
383
383
  ...l,
@@ -468,7 +468,7 @@ function $a(f) {
468
468
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
469
469
  }
470
470
  var er = { exports: {} }, ja = er.exports, Cn;
471
- function Ga() {
471
+ function Ma() {
472
472
  return Cn || (Cn = 1, function(f, t) {
473
473
  (function(i, l) {
474
474
  f.exports = l();
@@ -489,7 +489,7 @@ function Ga() {
489
489
  for (var a, s = 0, c = r.length; s < c; s++) !a && s in r || ((a = a || Array.prototype.slice.call(r, 0, s))[s] = r[s]);
490
490
  return e.concat(a || Array.prototype.slice.call(r));
491
491
  }
492
- var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, I = Object.keys, G = Array.isArray;
492
+ var b = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ca, I = Object.keys, M = Array.isArray;
493
493
  function te(e, r) {
494
494
  return typeof r != "object" || I(r).forEach(function(n) {
495
495
  e[n] = r[n];
@@ -549,7 +549,7 @@ function Ga() {
549
549
  for (var a = 0, s = r.length; a < s; ++a) le(e, r[a], n[a]);
550
550
  } else {
551
551
  var c, u, d = r.indexOf(".");
552
- d !== -1 ? (c = r.substr(0, d), (u = r.substr(d + 1)) === "" ? n === void 0 ? G(e) && !isNaN(parseInt(c)) ? e.splice(c, 1) : delete e[c] : e[c] = n : le(d = !(d = e[c]) || !re(e, c) ? e[c] = {} : d, u, n)) : n === void 0 ? G(e) && !isNaN(parseInt(r)) ? e.splice(r, 1) : delete e[r] : e[r] = n;
552
+ d !== -1 ? (c = r.substr(0, d), (u = r.substr(d + 1)) === "" ? n === void 0 ? M(e) && !isNaN(parseInt(c)) ? e.splice(c, 1) : delete e[c] : e[c] = n : le(d = !(d = e[c]) || !re(e, c) ? e[c] = {} : d, u, n)) : n === void 0 ? M(e) && !isNaN(parseInt(r)) ? e.splice(r, 1) : delete e[r] : e[r] = n;
553
553
  }
554
554
  }
555
555
  function Qr(e) {
@@ -561,13 +561,13 @@ function Ga() {
561
561
  function Xr(e) {
562
562
  return zn.apply([], e);
563
563
  }
564
- var Ge = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Xr([8, 16, 32, 64].map(function(e) {
564
+ var Me = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Xr([8, 16, 32, 64].map(function(e) {
565
565
  return ["Int", "Uint", "Float"].map(function(r) {
566
566
  return r + e + "Array";
567
567
  });
568
568
  }))).filter(function(e) {
569
569
  return b[e];
570
- }), Jr = new Set(Ge.map(function(e) {
570
+ }), Jr = new Set(Me.map(function(e) {
571
571
  return b[e];
572
572
  })), ot = null;
573
573
  function Ce(e) {
@@ -575,7 +575,7 @@ function Ga() {
575
575
  if (!n || typeof n != "object") return n;
576
576
  var a = ot.get(n);
577
577
  if (a) return a;
578
- if (G(n)) {
578
+ if (M(n)) {
579
579
  a = [], ot.set(n, a);
580
580
  for (var s = 0, c = n.length; s < c; ++s) a.push(r(n[s]));
581
581
  } else if (Jr.has(n.constructor)) a = n;
@@ -603,7 +603,7 @@ function Ga() {
603
603
  function Ee(e) {
604
604
  var r, n, a, s;
605
605
  if (arguments.length === 1) {
606
- if (G(e)) return e.slice();
606
+ if (M(e)) return e.slice();
607
607
  if (this === Ye && typeof e == "string") return [e];
608
608
  if (s = Vn(e)) {
609
609
  for (n = []; !(a = s.next()).done; ) n.push(a.value);
@@ -722,12 +722,12 @@ function Ga() {
722
722
  function en(e) {
723
723
  me = e;
724
724
  }
725
- var ct = {}, tn = 100, Ge = typeof Promise > "u" ? [] : function() {
725
+ var ct = {}, tn = 100, Me = typeof Promise > "u" ? [] : function() {
726
726
  var e = Promise.resolve();
727
727
  if (typeof crypto > "u" || !crypto.subtle) return [e, se(e), e];
728
728
  var r = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
729
729
  return [r, se(r), e];
730
- }(), ut = Ge[0], fe = Ge[1], Ge = Ge[2], fe = fe && fe.then, Me = ut && ut.constructor, ir = !!Ge, lt = function(e, r) {
730
+ }(), ut = Me[0], fe = Me[1], Me = Me[2], fe = fe && fe.then, Ge = ut && ut.constructor, ir = !!Me, lt = function(e, r) {
731
731
  dt.push([e, r]), Nt && (queueMicrotask(ra), Nt = !1);
732
732
  }, cr = !0, Nt = !0, Ke = [], Dt = [], ur = it, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, B = Pe, dt = [], Be = 0, It = [];
733
733
  function j(e) {
@@ -929,7 +929,7 @@ function Ga() {
929
929
  }, u.finalize), e();
930
930
  }, r, n, a);
931
931
  });
932
- } }), Me && (Me.allSettled && Ae(j, "allSettled", function() {
932
+ } }), Ge && (Ge.allSettled && Ae(j, "allSettled", function() {
933
933
  var e = Ee.apply(null, arguments).map(Ct);
934
934
  return new j(function(r) {
935
935
  e.length === 0 && r([]);
@@ -944,7 +944,7 @@ function Ga() {
944
944
  });
945
945
  });
946
946
  });
947
- }), Me.any && typeof AggregateError < "u" && Ae(j, "any", function() {
947
+ }), Ge.any && typeof AggregateError < "u" && Ae(j, "any", function() {
948
948
  var e = Ee.apply(null, arguments).map(Ct);
949
949
  return new j(function(r, n) {
950
950
  e.length === 0 && n(new AggregateError([]));
@@ -957,7 +957,7 @@ function Ga() {
957
957
  });
958
958
  });
959
959
  });
960
- }), Me.withResolvers && (j.withResolvers = Me.withResolvers));
960
+ }), Ge.withResolvers && (j.withResolvers = Ge.withResolvers));
961
961
  var ne = { awaits: 0, echoes: 0, id: 0 }, na = 0, Rt = [], xt = 0, kt = 0, aa = 0;
962
962
  function Ne(e, r, n, a) {
963
963
  var s = B, c = Object.create(s);
@@ -972,7 +972,7 @@ function Ga() {
972
972
  return !!ne.awaits && (--ne.awaits == 0 && (ne.id = 0), ne.echoes = ne.awaits * tn, !0);
973
973
  }
974
974
  function Ct(e) {
975
- return ne.echoes && e && e.constructor === Me ? (qe(), e.then(function(r) {
975
+ return ne.echoes && e && e.constructor === Ge ? (qe(), e.then(function(r) {
976
976
  return De(), r;
977
977
  }, function(r) {
978
978
  return De(), q(r);
@@ -1012,7 +1012,7 @@ function Ga() {
1012
1012
  };
1013
1013
  }
1014
1014
  function gr(e) {
1015
- Promise === Me && ne.echoes === 0 ? xt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1015
+ Promise === Ge && ne.echoes === 0 ? xt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
1016
1016
  }
1017
1017
  ("" + fe).indexOf("[native code]") === -1 && (qe = De = Q);
1018
1018
  var q = j.reject, Ue = "￿", we = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", on = "String expected.", et = [], $t = "__dbnames", pr = "readonly", mr = "readwrite";
@@ -1124,7 +1124,7 @@ function Ga() {
1124
1124
  }).then(r);
1125
1125
  }, J.prototype.where = function(e) {
1126
1126
  if (typeof e == "string") return new this.db.WhereClause(this, e);
1127
- if (G(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1127
+ if (M(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
1128
1128
  var r = I(e);
1129
1129
  if (r.length === 1) return this.where(r[0]).equals(e[r[0]]);
1130
1130
  var n = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
@@ -1152,7 +1152,7 @@ function Ga() {
1152
1152
  var u = r.reduce(function(h, p) {
1153
1153
  var y = h[0], w = h[1], h = a[p], _ = e[p];
1154
1154
  return [y || h, y || !h ? We(w, h && h.multi ? function(m) {
1155
- return m = ve(m, p), G(m) && m.some(function(E) {
1155
+ return m = ve(m, p), M(m) && m.some(function(E) {
1156
1156
  return s(_, E);
1157
1157
  });
1158
1158
  } : function(m) {
@@ -1175,7 +1175,7 @@ function Ga() {
1175
1175
  }, J.prototype.toCollection = function() {
1176
1176
  return new this.db.Collection(new this.db.WhereClause(this));
1177
1177
  }, J.prototype.orderBy = function(e) {
1178
- return new this.db.Collection(new this.db.WhereClause(this, G(e) ? "[".concat(e.join("+"), "]") : e));
1178
+ return new this.db.Collection(new this.db.WhereClause(this, M(e) ? "[".concat(e.join("+"), "]") : e));
1179
1179
  }, J.prototype.reverse = function() {
1180
1180
  return this.toCollection().reverse();
1181
1181
  }, J.prototype.mapToClass = function(e) {
@@ -1225,7 +1225,7 @@ function Ga() {
1225
1225
  return d;
1226
1226
  });
1227
1227
  }, J.prototype.update = function(e, r) {
1228
- return typeof e != "object" || G(e) ? this.where(":id").equals(e).modify(r) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new L.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(r));
1228
+ return typeof e != "object" || M(e) ? this.where(":id").equals(e).modify(r) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new L.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(r));
1229
1229
  }, J.prototype.put = function(e, r) {
1230
1230
  var n = this, a = this.schema.primKey, s = a.auto, c = a.keyPath, u = e;
1231
1231
  return c && s && (u = jt(c)(e)), this._trans("readwrite", function(d) {
@@ -1360,7 +1360,7 @@ function Ga() {
1360
1360
  }
1361
1361
  I(y = u).forEach(function(h) {
1362
1362
  var _ = y[h];
1363
- if (G(_)) c(h, y[h][0], y[h][1]);
1363
+ if (M(_)) c(h, y[h][0], y[h][1]);
1364
1364
  else {
1365
1365
  if (_ !== "asap") throw new L.InvalidArgument("Invalid event config");
1366
1366
  var m = c(h, it, function() {
@@ -1390,17 +1390,17 @@ function Ga() {
1390
1390
  return We(a(), r());
1391
1391
  } : r, e.justLimit = n && !a;
1392
1392
  }
1393
- function Gt(e, r) {
1393
+ function Mt(e, r) {
1394
1394
  if (e.isPrimKey) return r.primaryKey;
1395
1395
  var n = r.getIndexByKeyPath(e.index);
1396
1396
  if (!n) throw new L.Schema("KeyPath " + e.index + " on object store " + r.name + " is not indexed");
1397
1397
  return n;
1398
1398
  }
1399
1399
  function fn(e, r, n) {
1400
- var a = Gt(e, r.schema);
1400
+ var a = Mt(e, r.schema);
1401
1401
  return r.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: a, range: e.range } });
1402
1402
  }
1403
- function Mt(e, r, n, a) {
1403
+ function Gt(e, r, n, a) {
1404
1404
  var s = e.replayFilter ? We(e.filter, e.replayFilter()) : e.filter;
1405
1405
  if (e.or) {
1406
1406
  var c = {}, u = function(d, p, y) {
@@ -1440,7 +1440,7 @@ function Ga() {
1440
1440
  var r = this["@@propmod"];
1441
1441
  if (r.add !== void 0) {
1442
1442
  var n = r.add;
1443
- if (G(n)) return g(g([], G(e) ? e : [], !0), n).sort();
1443
+ if (M(n)) return g(g([], M(e) ? e : [], !0), n).sort();
1444
1444
  if (typeof n == "number") return (Number(e) || 0) + n;
1445
1445
  if (typeof n == "bigint") try {
1446
1446
  return BigInt(e) + n;
@@ -1451,7 +1451,7 @@ function Ga() {
1451
1451
  }
1452
1452
  if (r.remove !== void 0) {
1453
1453
  var a = r.remove;
1454
- if (G(a)) return G(e) ? e.filter(function(s) {
1454
+ if (M(a)) return M(e) ? e.filter(function(s) {
1455
1455
  return !a.includes(s);
1456
1456
  }).sort() : [];
1457
1457
  if (typeof a == "number") return Number(e) - a;
@@ -1477,7 +1477,7 @@ function Ga() {
1477
1477
  var r = this._ctx;
1478
1478
  r.algorithm = We(r.algorithm, e);
1479
1479
  }, V.prototype._iterate = function(e, r) {
1480
- return Mt(this._ctx, e, r, this._ctx.table.core);
1480
+ return Gt(this._ctx, e, r, this._ctx.table.core);
1481
1481
  }, V.prototype.clone = function(e) {
1482
1482
  var r = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1483
1483
  return e && te(n, e), r._ctx = n, r;
@@ -1486,17 +1486,17 @@ function Ga() {
1486
1486
  }, V.prototype.each = function(e) {
1487
1487
  var r = this._ctx;
1488
1488
  return this._read(function(n) {
1489
- return Mt(r, e, n, r.table.core);
1489
+ return Gt(r, e, n, r.table.core);
1490
1490
  });
1491
1491
  }, V.prototype.count = function(e) {
1492
1492
  var r = this;
1493
1493
  return this._read(function(n) {
1494
1494
  var a = r._ctx, s = a.table.core;
1495
- if (tt(a, !0)) return s.count({ trans: n, query: { index: Gt(a, s.schema), range: a.range } }).then(function(u) {
1495
+ if (tt(a, !0)) return s.count({ trans: n, query: { index: Mt(a, s.schema), range: a.range } }).then(function(u) {
1496
1496
  return Math.min(u, a.limit);
1497
1497
  });
1498
1498
  var c = 0;
1499
- return Mt(a, function() {
1499
+ return Gt(a, function() {
1500
1500
  return ++c, !1;
1501
1501
  }, n, s).then(function() {
1502
1502
  return c;
@@ -1519,13 +1519,13 @@ function Ga() {
1519
1519
  return this._read(function(n) {
1520
1520
  var a = r._ctx;
1521
1521
  if (a.dir === "next" && tt(a, !0) && 0 < a.limit) {
1522
- var s = a.valueMapper, c = Gt(a, a.table.core.schema);
1522
+ var s = a.valueMapper, c = Mt(a, a.table.core.schema);
1523
1523
  return a.table.core.query({ trans: n, limit: a.limit, values: !0, query: { index: c, range: a.range } }).then(function(d) {
1524
1524
  return d = d.result, s ? d.map(s) : d;
1525
1525
  });
1526
1526
  }
1527
1527
  var u = [];
1528
- return Mt(a, function(d) {
1528
+ return Gt(a, function(d) {
1529
1529
  return u.push(d);
1530
1530
  }, n, a.table.core).then(function() {
1531
1531
  return u;
@@ -1600,7 +1600,7 @@ function Ga() {
1600
1600
  }, V.prototype.primaryKeys = function(e) {
1601
1601
  var r = this._ctx;
1602
1602
  if (r.dir === "next" && tt(r, !0) && 0 < r.limit) return this._read(function(a) {
1603
- var s = Gt(r, r.table.core.schema);
1603
+ var s = Mt(r, r.table.core.schema);
1604
1604
  return r.table.core.query({ trans: a, values: !1, limit: r.limit, query: { index: s, range: r.range } });
1605
1605
  }).then(function(a) {
1606
1606
  return a.result;
@@ -2178,10 +2178,10 @@ function Ga() {
2178
2178
  var c, u, d, w = (u = p, d = vn((c = e).objectStoreNames), { schema: { name: c.name, tables: d.map(function(_) {
2179
2179
  return u.objectStore(_);
2180
2180
  }).map(function(_) {
2181
- var m = _.keyPath, v = _.autoIncrement, E = G(m), O = {}, v = { name: _.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m == null, compound: E, keyPath: m, autoIncrement: v, unique: !0, extractKey: Or(m) }, indexes: vn(_.indexNames).map(function(A) {
2181
+ var m = _.keyPath, v = _.autoIncrement, E = M(m), O = {}, v = { name: _.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m == null, compound: E, keyPath: m, autoIncrement: v, unique: !0, extractKey: Or(m) }, indexes: vn(_.indexNames).map(function(A) {
2182
2182
  return _.index(A);
2183
2183
  }).map(function(D) {
2184
- var P = D.name, N = D.unique, T = D.multiEntry, D = D.keyPath, T = { name: P, compound: G(D), keyPath: D, unique: N, multiEntry: T, extractKey: Or(D) };
2184
+ var P = D.name, N = D.unique, T = D.multiEntry, D = D.keyPath, T = { name: P, compound: M(D), keyPath: D, unique: N, multiEntry: T, extractKey: Or(D) };
2185
2185
  return O[bt(D)] = T;
2186
2186
  }), getIndexByKeyPath: function(A) {
2187
2187
  return O[bt(A)];
@@ -2376,7 +2376,7 @@ function Ga() {
2376
2376
  function wn(e) {
2377
2377
  return e.split(",").map(function(r, n) {
2378
2378
  var a = (r = r.trim()).replace(/([&*]|\+\+)/g, ""), s = /^\[/.test(a) ? a.match(/^\[(.*)\]$/)[1].split("+") : a;
2379
- return wr(a, s || null, /\&/.test(r), /\*/.test(r), /\+\+/.test(r), G(s), n === 0);
2379
+ return wr(a, s || null, /\&/.test(r), /\*/.test(r), /\+\+/.test(r), M(s), n === 0);
2380
2380
  });
2381
2381
  }
2382
2382
  var ma = (zt.prototype._parseStoresSpec = function(e, r) {
@@ -2638,13 +2638,13 @@ function Ga() {
2638
2638
  function s(c) {
2639
2639
  return function(p) {
2640
2640
  var d = c(p), p = d.value;
2641
- return d.done ? p : p && typeof p.then == "function" ? p.then(n, a) : G(p) ? Promise.all(p).then(n, a) : n(p);
2641
+ return d.done ? p : p && typeof p.then == "function" ? p.then(n, a) : M(p) ? Promise.all(p).then(n, a) : n(p);
2642
2642
  };
2643
2643
  }
2644
2644
  return s(r)();
2645
2645
  }
2646
2646
  function Qt(e, r, n) {
2647
- for (var a = G(e) ? e.slice() : [e], s = 0; s < n; ++s) a.push(r);
2647
+ for (var a = M(e) ? e.slice() : [e], s = 0; s < n; ++s) a.push(r);
2648
2648
  return a;
2649
2649
  }
2650
2650
  var ba = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
@@ -2701,7 +2701,7 @@ function Ga() {
2701
2701
  re(e, s) || (n[a + s] = r[s]);
2702
2702
  }), n;
2703
2703
  }
2704
- function Gr(e, r) {
2704
+ function Mr(e, r) {
2705
2705
  return r.type === "delete" ? r.keys : r.keys || r.values.map(e.extractKey);
2706
2706
  }
2707
2707
  var va = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
@@ -2740,7 +2740,7 @@ function Ga() {
2740
2740
  }
2741
2741
  return n.mutate(s);
2742
2742
  function w(h) {
2743
- var _, m, E, O = B.trans, v = h.keys || Gr(a, h);
2743
+ var _, m, E, O = B.trans, v = h.keys || Mr(a, h);
2744
2744
  if (!v) throw new Error("Keys missing");
2745
2745
  return (h = h.type === "add" || h.type === "put" ? l(l({}, h), { keys: v }) : l({}, h)).type !== "delete" && (h.values = g([], h.values)), h.keys && (h.keys = g([], h.keys)), _ = n, E = v, ((m = h).type === "add" ? Promise.resolve([]) : _.getMany({ trans: m.trans, keys: E, cache: "immutable" })).then(function(A) {
2746
2746
  var P = v.map(function(N, D) {
@@ -2814,16 +2814,16 @@ function Ga() {
2814
2814
  function E(k) {
2815
2815
  return k = "idb://".concat(r, "/").concat(a, "/").concat(k), N[k] || (N[k] = new oe());
2816
2816
  }
2817
- var O, v, A, P = m.trans, N = m.mutatedParts || (m.mutatedParts = {}), D = E(""), T = E(":dels"), C = m.type, $ = m.type === "deleteRange" ? [m.range] : m.type === "delete" ? [m.keys] : m.values.length < 50 ? [Gr(u, m).filter(function(k) {
2817
+ var O, v, A, P = m.trans, N = m.mutatedParts || (m.mutatedParts = {}), D = E(""), T = E(":dels"), C = m.type, $ = m.type === "deleteRange" ? [m.range] : m.type === "delete" ? [m.keys] : m.values.length < 50 ? [Mr(u, m).filter(function(k) {
2818
2818
  return k;
2819
2819
  }), m.values] : [], R = $[0], x = $[1], $ = m.trans._cache;
2820
- return G(R) ? (D.addKeys(R), ($ = C === "delete" || R.length === x.length ? Pn(R, $) : null) || T.addKeys(R), ($ || x) && (O = E, v = $, A = x, c.indexes.forEach(function(k) {
2820
+ return M(R) ? (D.addKeys(R), ($ = C === "delete" || R.length === x.length ? Pn(R, $) : null) || T.addKeys(R), ($ || x) && (O = E, v = $, A = x, c.indexes.forEach(function(k) {
2821
2821
  var K = O(k.name || "");
2822
2822
  function W(z) {
2823
2823
  return z != null ? k.extractKey(z) : null;
2824
2824
  }
2825
2825
  function F(z) {
2826
- return k.multiEntry && G(z) ? z.forEach(function(he) {
2826
+ return k.multiEntry && M(z) ? z.forEach(function(he) {
2827
2827
  return K.addKey(he);
2828
2828
  }) : K.addKey(z);
2829
2829
  }
@@ -2894,13 +2894,13 @@ function Ga() {
2894
2894
  if (n.numFailures === 0) return r;
2895
2895
  if (r.type === "deleteRange") return null;
2896
2896
  var a = r.keys ? r.keys.length : "values" in r && r.values ? r.values.length : 1;
2897
- return n.numFailures === a ? null : (r = l({}, r), G(r.keys) && (r.keys = r.keys.filter(function(s, c) {
2897
+ return n.numFailures === a ? null : (r = l({}, r), M(r.keys) && (r.keys = r.keys.filter(function(s, c) {
2898
2898
  return !(c in n.failures);
2899
- })), "values" in r && G(r.values) && (r.values = r.values.filter(function(s, c) {
2899
+ })), "values" in r && M(r.values) && (r.values = r.values.filter(function(s, c) {
2900
2900
  return !(c in n.failures);
2901
2901
  })), r);
2902
2902
  }
2903
- function Mr(e, r) {
2903
+ function Gr(e, r) {
2904
2904
  return n = e, ((a = r).lower === void 0 || (a.lowerOpen ? 0 < H(n, a.lower) : 0 <= H(n, a.lower))) && (e = e, (r = r).upper === void 0 || (r.upperOpen ? H(e, r.upper) < 0 : H(e, r.upper) <= 0));
2905
2905
  var n, a;
2906
2906
  }
@@ -2910,9 +2910,9 @@ function Ga() {
2910
2910
  var O = m, v = [];
2911
2911
  if (E.type === "add" || E.type === "put") for (var A = new oe(), P = E.values.length - 1; 0 <= P; --P) {
2912
2912
  var N, D = E.values[P], T = y(D);
2913
- A.hasKey(T) || (N = w(D), (d && G(N) ? N.some(function(k) {
2914
- return Mr(k, p);
2915
- }) : Mr(N, p)) && (A.addKey(T), v.push(D)));
2913
+ A.hasKey(T) || (N = w(D), (d && M(N) ? N.some(function(k) {
2914
+ return Gr(k, p);
2915
+ }) : Gr(N, p)) && (A.addKey(T), v.push(D)));
2916
2916
  }
2917
2917
  switch (E.type) {
2918
2918
  case "add":
@@ -2945,7 +2945,7 @@ function Ga() {
2945
2945
  case "deleteRange":
2946
2946
  var $ = E.range;
2947
2947
  O = m.filter(function(K) {
2948
- return !Mr(y(K), $);
2948
+ return !Gr(y(K), $);
2949
2949
  });
2950
2950
  }
2951
2951
  return O;
@@ -3026,7 +3026,7 @@ function Ga() {
3026
3026
  var u = B.trans;
3027
3027
  if (s.outbound || u.db._options.cache === "disabled" || u.explicit || u.idbtrans.mode !== "readwrite") return a.mutate(c);
3028
3028
  var d = Fe["idb://".concat(r, "/").concat(n)];
3029
- return d ? (u = a.mutate(c), c.type !== "add" && c.type !== "put" || !(50 <= c.values.length || Gr(s, c).some(function(p) {
3029
+ return d ? (u = a.mutate(c), c.type !== "add" && c.type !== "put" || !(50 <= c.values.length || Mr(s, c).some(function(p) {
3030
3030
  return p == null;
3031
3031
  })) ? (d.optimisticOps.push(c), c.mutatedParts && Yt(c.mutatedParts), u.then(function(p) {
3032
3032
  0 < p.numFailures && ($e(d.optimisticOps, c), (p = In(0, c, p)) && d.optimisticOps.push(p), c.mutatedParts && Yt(c.mutatedParts));
@@ -3478,8 +3478,8 @@ function Ga() {
3478
3478
  });
3479
3479
  }(er)), er.exports;
3480
3480
  }
3481
- var Ma = Ga();
3482
- const Fr = /* @__PURE__ */ $a(Ma), $n = Symbol.for("Dexie"), wt = globalThis[$n] || (globalThis[$n] = Fr);
3481
+ var Ga = Ma();
3482
+ const Fr = /* @__PURE__ */ $a(Ga), $n = Symbol.for("Dexie"), wt = globalThis[$n] || (globalThis[$n] = Fr);
3483
3483
  if (Fr.semVer !== wt.semVer)
3484
3484
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Fr.semVer} and ${wt.semVer}`);
3485
3485
  const {
@@ -3494,7 +3494,7 @@ const {
3494
3494
  add: Qa,
3495
3495
  remove: Xa
3496
3496
  } = wt;
3497
- class Gn {
3497
+ class Mn {
3498
3498
  db;
3499
3499
  subscribers = [];
3500
3500
  options;
@@ -3519,9 +3519,9 @@ class Gn {
3519
3519
  }
3520
3520
  getHash = async (t, i) => {
3521
3521
  const l = await this.db.table(t).where({ id: i.widget }).last().catch(() => {
3522
- M(2, [`%chash%c %capi%C %c${t}`, o.API, o.NONE, o.APP]);
3522
+ G(2, [`%chash%c %capi%C %c${t}`, o.API, o.NONE, o.APP]);
3523
3523
  });
3524
- return M(3, [
3524
+ return G(3, [
3525
3525
  `%cget%c %chash%c %c${t}`,
3526
3526
  o.OK,
3527
3527
  o.NONE,
@@ -3533,7 +3533,7 @@ class Gn {
3533
3533
  };
3534
3534
  setHash = async (t, i) => await this.db.table(t).where({
3535
3535
  id: i.widget
3536
- }).modify({ hash: i.hash }).then(() => (M(3, [
3536
+ }).modify({ hash: i.hash }).then(() => (G(3, [
3537
3537
  `%cset%c %chash%c %c${t}`,
3538
3538
  o.OK,
3539
3539
  o.NONE,
@@ -3541,7 +3541,7 @@ class Gn {
3541
3541
  o.NONE,
3542
3542
  o.APP,
3543
3543
  i
3544
- ]), 201)).catch((l) => (M(2, [
3544
+ ]), 201)).catch((l) => (G(2, [
3545
3545
  `%cget%c %chash%c %c${t}`,
3546
3546
  o.OK,
3547
3547
  o.NONE,
@@ -3555,7 +3555,7 @@ class Gn {
3555
3555
  id: t.widget,
3556
3556
  dashboard_id: t.dashboard,
3557
3557
  hash: t.hash
3558
- }).then(() => 201).catch((i) => (M(2, [
3558
+ }).then(() => 201).catch((i) => (G(2, [
3559
3559
  "%cset%c %cstorage%c %ccloud",
3560
3560
  o.KO,
3561
3561
  o.NONE,
@@ -3572,7 +3572,7 @@ class Gn {
3572
3572
  */
3573
3573
  getCloud = async (t) => {
3574
3574
  if (t.widget === "")
3575
- return M(3, [
3575
+ return G(3, [
3576
3576
  "%cget%c %cstorage%c %ccloud",
3577
3577
  o.NO_UPDATES,
3578
3578
  o.NONE,
@@ -3587,7 +3587,7 @@ class Gn {
3587
3587
  query: t
3588
3588
  };
3589
3589
  const i = await this.db.table(S.CLOUD).where({ id: t.widget }).last().catch(() => {
3590
- M(2, ["%capi%C %ccloud", o.API, o.NONE, o.CLOUD, t.widget]);
3590
+ G(2, ["%capi%C %ccloud", o.API, o.NONE, o.CLOUD, t.widget]);
3591
3591
  });
3592
3592
  if (typeof i > "u")
3593
3593
  return { data: null, message: "Cloud Data error", success: !1, query: t };
@@ -3597,7 +3597,7 @@ class Gn {
3597
3597
  success: i !== void 0,
3598
3598
  query: t
3599
3599
  };
3600
- return M(3, [
3600
+ return G(3, [
3601
3601
  "%cget%c %cstorage%c %ccloud",
3602
3602
  o.OK,
3603
3603
  o.NONE,
@@ -3613,7 +3613,7 @@ class Gn {
3613
3613
  * @param data
3614
3614
  * @returns number
3615
3615
  */
3616
- setCloud = async (t, i) => t.type === S.CLOUD && i !== "" ? (M(3, [
3616
+ setCloud = async (t, i) => t.type === S.CLOUD && i !== "" ? (G(3, [
3617
3617
  "%cset%c %cstorage%c %ccloud",
3618
3618
  o.OK,
3619
3619
  o.NONE,
@@ -3627,7 +3627,7 @@ class Gn {
3627
3627
  hash: t.hash,
3628
3628
  // data: data.data,
3629
3629
  data: i
3630
- }).then(() => 201).catch((l) => (M(2, [
3630
+ }).then(() => 201).catch((l) => (G(2, [
3631
3631
  "%cset%c %cstorage%c %ccloud",
3632
3632
  o.KO,
3633
3633
  o.NONE,
@@ -3639,7 +3639,7 @@ class Gn {
3639
3639
  ]), 400))) : 400;
3640
3640
  getDashboard = async (t) => {
3641
3641
  const i = await this.db.table(S.DASHBOARD).where({ id: t.id }).last().catch(() => {
3642
- M(2, ["%cstorage", o.STORAGE, X.DASHBOARD_LOAD, t.id]);
3642
+ G(2, ["%cstorage", o.STORAGE, X.DASHBOARD_LOAD, t.id]);
3643
3643
  });
3644
3644
  return i === void 0 ? {
3645
3645
  data: null,
@@ -3649,9 +3649,9 @@ class Gn {
3649
3649
  };
3650
3650
  getDashboards = async (t) => {
3651
3651
  const i = (b) => t?.id === b.id, l = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(S.DASHBOARD).toArray().then((b) => t?.id ? b.filter(i) : b).then((b) => t?.name ? b.filter(l) : b).catch(() => {
3652
- M(2, ["%cstorage", o.STORAGE, X.DASHBOARD_LOAD, t]);
3652
+ G(2, ["%cstorage", o.STORAGE, X.DASHBOARD_LOAD, t]);
3653
3653
  });
3654
- return g !== void 0 && M(3, [
3654
+ return g !== void 0 && G(3, [
3655
3655
  "%cstorage%c %cdashboards",
3656
3656
  o.STORAGE,
3657
3657
  o.NONE,
@@ -3679,7 +3679,7 @@ class Gn {
3679
3679
  data: null,
3680
3680
  message: `Dashboard ${i.data.id} saved to storage`,
3681
3681
  success: !0
3682
- })).catch((l) => (M(4, ["%cstorage", o.STORAGE, S.WIDGET, t, l.message]), {
3682
+ })).catch((l) => (G(4, ["%cstorage", o.STORAGE, S.WIDGET, t, l.message]), {
3683
3683
  data: null,
3684
3684
  message: `Dashboard ${i.data.id} save error: ${l.message}`,
3685
3685
  success: !1
@@ -3713,7 +3713,7 @@ class Gn {
3713
3713
  */
3714
3714
  getMessages = async (t) => {
3715
3715
  if (t.widget === "")
3716
- return M(3, [
3716
+ return G(3, [
3717
3717
  "%cget%c %cstorage%c %cmessages",
3718
3718
  o.NO_UPDATES,
3719
3719
  o.NONE,
@@ -3733,15 +3733,15 @@ class Gn {
3733
3733
  try {
3734
3734
  const I = this.db.table(S.TOPICS).where("widget_id").equals(t.widget).filter(g).filter(b);
3735
3735
  t?.approved === "true" ? I.and((se) => se.approved === 1) : I.and((se) => se.visible === 1), I.reverse();
3736
- const G = await I.limit(t?.limit ?? 25).sortBy(i);
3737
- if (G.length === 0)
3736
+ const M = await I.limit(t?.limit ?? 25).sortBy(i);
3737
+ if (M.length === 0)
3738
3738
  return {
3739
3739
  data: null,
3740
3740
  message: "No Messages error",
3741
3741
  success: !1,
3742
3742
  query: t
3743
3743
  };
3744
- const te = G.map((se) => this.db.table(S.MESSAGES).get({ id: se.message_id }));
3744
+ const te = M.map((se) => this.db.table(S.MESSAGES).get({ id: se.message_id }));
3745
3745
  return wt.Promise.all(te).then(async (se) => {
3746
3746
  const re = {
3747
3747
  data: {
@@ -3753,7 +3753,7 @@ class Gn {
3753
3753
  message: "Messages retrieved successfully",
3754
3754
  success: !0
3755
3755
  };
3756
- return M(3, [
3756
+ return G(3, [
3757
3757
  "%cget%c %cstorage%c %cmessages",
3758
3758
  o.OK,
3759
3759
  o.NONE,
@@ -3764,7 +3764,7 @@ class Gn {
3764
3764
  ]), re;
3765
3765
  });
3766
3766
  } catch (I) {
3767
- return M(2, [
3767
+ return G(2, [
3768
3768
  "%cget%c %cstorage%c %cmessages",
3769
3769
  o.OK,
3770
3770
  o.NONE,
@@ -3798,7 +3798,7 @@ class Gn {
3798
3798
  return 400;
3799
3799
  const l = i.data.title;
3800
3800
  let g = 0;
3801
- return M(3, [
3801
+ return G(3, [
3802
3802
  "%cset%c %cstorage%c %cmessages",
3803
3803
  o.OK,
3804
3804
  o.NONE,
@@ -3821,8 +3821,8 @@ class Gn {
3821
3821
  utc: b.utc,
3822
3822
  data: b,
3823
3823
  expires: b.expires
3824
- }).catch((G) => {
3825
- g++, M(4, [
3824
+ }).catch((M) => {
3825
+ g++, G(4, [
3826
3826
  "%cset%c %cstorage",
3827
3827
  o.KO,
3828
3828
  o.NONE,
@@ -3830,7 +3830,7 @@ class Gn {
3830
3830
  "set message",
3831
3831
  `title: ${l}`,
3832
3832
  b,
3833
- G.message
3833
+ M.message
3834
3834
  ]);
3835
3835
  });
3836
3836
  const I = {
@@ -3848,8 +3848,8 @@ class Gn {
3848
3848
  utc: b.utc,
3849
3849
  expires: b.expires
3850
3850
  };
3851
- await this.db.table(S.TOPICS).put(I).catch((G) => {
3852
- g++, M(4, [
3851
+ await this.db.table(S.TOPICS).put(I).catch((M) => {
3852
+ g++, G(4, [
3853
3853
  "%cset%c %cstorage",
3854
3854
  o.KO,
3855
3855
  o.NONE,
@@ -3857,19 +3857,19 @@ class Gn {
3857
3857
  "set topic",
3858
3858
  `title: ${l}`,
3859
3859
  b,
3860
- G.message
3860
+ M.message
3861
3861
  ]);
3862
- }), await i.data.topics.forEach(async (G) => {
3863
- const te = G.message_id, se = G.visible ? 1 : 0, Ot = G.approve ? 1 : 0, re = G.title;
3862
+ }), await i.data.topics.forEach(async (M) => {
3863
+ const te = M.message_id, se = M.visible ? 1 : 0, Ot = M.approve ? 1 : 0, re = M.title;
3864
3864
  await this.db.table(S.TOPICS).where("message_id").equals(te).modify({ visible: se, approve: Ot }).catch((ge) => {
3865
- g++, M(4, [
3865
+ g++, G(4, [
3866
3866
  "%cset%c %cstorage",
3867
3867
  o.KO,
3868
3868
  o.NONE,
3869
3869
  o.STORAGE,
3870
3870
  "update message visibility",
3871
3871
  `title: ${re}`,
3872
- `widget: ${G.widget_id}`,
3872
+ `widget: ${M.widget_id}`,
3873
3873
  ge.message
3874
3874
  ]);
3875
3875
  });
@@ -3884,7 +3884,7 @@ class Gn {
3884
3884
  */
3885
3885
  getSeries = async (t) => {
3886
3886
  if (t.widget === "")
3887
- return M(3, [
3887
+ return G(3, [
3888
3888
  "%cget%c %cstorage%c %cseries",
3889
3889
  o.NO_UPDATES,
3890
3890
  o.NONE,
@@ -3899,7 +3899,7 @@ class Gn {
3899
3899
  query: t
3900
3900
  };
3901
3901
  const i = await this.db.table(S.SERIES).where({ id: t.widget }).last().catch(() => {
3902
- M(2, [
3902
+ G(2, [
3903
3903
  "%cget%c %cstorage%c %cseries",
3904
3904
  o.KO,
3905
3905
  o.NONE,
@@ -3914,7 +3914,7 @@ class Gn {
3914
3914
  success: i !== void 0,
3915
3915
  query: t
3916
3916
  };
3917
- return M(3, [
3917
+ return G(3, [
3918
3918
  "%cget%c %cstorage%c %cseries",
3919
3919
  o.OK,
3920
3920
  o.NONE,
@@ -3930,7 +3930,7 @@ class Gn {
3930
3930
  * @param data
3931
3931
  * @returns number
3932
3932
  */
3933
- setSeries = async (t, i) => (delete i?.query, t.type === S.SERIES && i !== "" ? (M(3, [
3933
+ setSeries = async (t, i) => (delete i?.query, t.type === S.SERIES && i !== "" ? (G(3, [
3934
3934
  "%cset%c %cstorage%c %cseries",
3935
3935
  o.OK,
3936
3936
  o.NONE,
@@ -3944,7 +3944,7 @@ class Gn {
3944
3944
  hash: t.hash,
3945
3945
  // data: data.data,
3946
3946
  data: i
3947
- }).then(() => 201).catch((l) => (M(2, [
3947
+ }).then(() => 201).catch((l) => (G(2, [
3948
3948
  "%cset%c %cstorage%c %cseries",
3949
3949
  o.KO,
3950
3950
  o.NONE,
@@ -3961,7 +3961,7 @@ class Gn {
3961
3961
  */
3962
3962
  getWidget = async (t) => {
3963
3963
  if (t.id === "")
3964
- return M(3, [
3964
+ return G(3, [
3965
3965
  "%cget%c %cstorage%c %cwidget",
3966
3966
  o.KO,
3967
3967
  o.NONE,
@@ -3991,9 +3991,9 @@ class Gn {
3991
3991
  */
3992
3992
  getWidgets = async (t) => {
3993
3993
  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(S.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(() => {
3994
- M(2, ["%cstorage", o.STORAGE, X.WIDGET_LOAD, t]);
3994
+ G(2, ["%cstorage", o.STORAGE, X.WIDGET_LOAD, t]);
3995
3995
  });
3996
- return b !== void 0 && M(3, [
3996
+ return b !== void 0 && G(3, [
3997
3997
  "%cstorage%c %cwidgets",
3998
3998
  o.STORAGE,
3999
3999
  o.NONE,
@@ -4065,7 +4065,7 @@ class Gn {
4065
4065
  */
4066
4066
  getSlide = async (t) => {
4067
4067
  const i = await this.db.table(S.SLIDE).where({ id: t.id }).last().catch(() => {
4068
- M(2, ["%cstorage", o.STORAGE, X.SLIDE_LOAD, t.id]);
4068
+ G(2, ["%cstorage", o.STORAGE, X.SLIDE_LOAD, t.id]);
4069
4069
  });
4070
4070
  return {
4071
4071
  data: i,
@@ -4080,8 +4080,8 @@ class Gn {
4080
4080
  * @returns IResponse
4081
4081
  */
4082
4082
  getSlides = async (t) => {
4083
- const i = (G) => t?.id ? G.id === t.id : !1, l = (G) => t?.name ? G.name.includes(t?.name) : !1, g = (G) => t?.presentation_id ? G.presentation_id === t.presentation_id : !1, I = await this.db.table(S.SLIDE).toArray().then((G) => t?.presentation_id ? G.filter(g) : G).then((G) => t?.id ? G.filter(i) : G).then((G) => t?.name ? G.filter(l) : G);
4084
- return I && I.sort((G, te) => G.order_index - te.order_index), I !== void 0 && M(3, ["%cstorage%c %cslides", o.STORAGE, o.NONE, o.SLIDE, t]), {
4083
+ 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(S.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);
4084
+ return I && I.sort((M, te) => M.order_index - te.order_index), I !== void 0 && G(3, ["%cstorage%c %cslides", o.STORAGE, o.NONE, o.SLIDE, t]), {
4085
4085
  // @ts-ignore
4086
4086
  data: I,
4087
4087
  query: t,
@@ -4145,7 +4145,7 @@ class Gn {
4145
4145
  */
4146
4146
  getPresentations = async (t) => {
4147
4147
  const i = (b) => t?.name ? b.name.includes(t?.name) : !1, g = await this.db.table(S.PRESENTATION).toArray().then((b) => t?.name ? b.filter(i) : b);
4148
- return g !== void 0 && M(3, [
4148
+ return g !== void 0 && G(3, [
4149
4149
  "%cstorage%c %cpresentations",
4150
4150
  o.STORAGE,
4151
4151
  o.NONE,
@@ -4192,7 +4192,7 @@ class Gn {
4192
4192
  */
4193
4193
  getPreference = async (t) => {
4194
4194
  const i = await this.db.table(S.PREFERENCE).where({ id: t.id }).last().catch(() => {
4195
- M(2, [
4195
+ G(2, [
4196
4196
  "%cstorage",
4197
4197
  o.STORAGE,
4198
4198
  X.PREFERENCE_LOAD,
@@ -4215,7 +4215,7 @@ class Gn {
4215
4215
  */
4216
4216
  getPreferences = async (t) => {
4217
4217
  const i = (b) => t?.id ? t.id = b.id : !1, g = await this.db.table(S.SLIDE).toArray().then((b) => t?.id ? b.filter(i) : b);
4218
- return g !== void 0 && M(3, [
4218
+ return g !== void 0 && G(3, [
4219
4219
  "%cstorage%c %cpreferences",
4220
4220
  o.STORAGE,
4221
4221
  o.NONE,
@@ -4259,7 +4259,7 @@ class Gn {
4259
4259
  */
4260
4260
  getImages = async (t) => {
4261
4261
  const i = (b) => t?.id ? b.includes(t.id) : !1, g = await this.db.table(S.IMAGES).toArray().then((b) => t?.id ? b.filter(i) : b);
4262
- return g !== void 0 && M(3, [
4262
+ return g !== void 0 && G(3, [
4263
4263
  "%cstorage%c %cimages",
4264
4264
  o.STORAGE,
4265
4265
  o.NONE,
@@ -4319,13 +4319,13 @@ function Ka(f, t) {
4319
4319
  return (g, b) => l().then((I) => b(I.transaction(t, g).objectStore(t)));
4320
4320
  }
4321
4321
  let Wr;
4322
- function Mn() {
4322
+ function Gn() {
4323
4323
  return Wr || (Wr = Ka("keyval-store", "keyval")), Wr;
4324
4324
  }
4325
- function _e(f, t = Mn()) {
4325
+ function _e(f, t = Gn()) {
4326
4326
  return t("readonly", (i) => zr(i.get(f)));
4327
4327
  }
4328
- function ke(f, t, i = Mn()) {
4328
+ function ke(f, t, i = Gn()) {
4329
4329
  return i("readwrite", (l) => (l.put(t, f), zr(l.transaction)));
4330
4330
  }
4331
4331
  class Kn {
@@ -5650,15 +5650,15 @@ class Ja {
5650
5650
  subscribers = [];
5651
5651
  // private temp: {[x:string]:any} = []
5652
5652
  constructor(t) {
5653
- switch (M(3, [
5653
+ switch (G(3, [
5654
5654
  "%cpresentation",
5655
5655
  o.PRESENTATION,
5656
5656
  t.presentation,
5657
5657
  X.VERSION,
5658
5658
  xa
5659
- ]), this.options = t, this.sm = null, this.bc = null, this.api = new ka(t), t.storage) {
5659
+ ]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new ka(t), t.storage) {
5660
5660
  case pe.DEXIE:
5661
- this.sm = new Gn(t);
5661
+ this.sm = new Mn(t);
5662
5662
  break;
5663
5663
  case pe.LOCAL:
5664
5664
  this.sm = new Ln(t);
@@ -5681,7 +5681,7 @@ class Ja {
5681
5681
  delete this.subscribers[t.widget];
5682
5682
  }
5683
5683
  update = async (t) => {
5684
- if (M(3, ["%cupdate%c %cdata", o.NO_UPDATES, o.NONE, o.MESSAGES, t]), this.sm === null || Object.keys(this.subscribers).length === 0)
5684
+ if (G(3, ["%cupdate%c %cdata", o.NO_UPDATES, o.NONE, o.MESSAGES, t]), this.sm === null || Object.keys(this.subscribers).length === 0)
5685
5685
  return;
5686
5686
  const i = [];
5687
5687
  Object.values(this.subscribers).forEach((l) => {
@@ -5700,7 +5700,7 @@ class Ja {
5700
5700
  case S.MESSAGES:
5701
5701
  b = await this.sm?.getHash("cards", t.query), b === "none" && (t.query.hash = "none", await this.sm?.setCards(t.query)), t.data.messages = t.data.messages.filter(
5702
5702
  (I) => I.id !== null
5703
- ), g = t.data.messages.length > 0 ? Ur(t.data.messages[0].utc) : "none", b === g ? (M(3, [
5703
+ ), g = t.data.messages.length > 0 ? Ur(t.data.messages[0].utc) : "none", b === g ? (G(3, [
5704
5704
  "%cset%c %cstorage%c %cmessages",
5705
5705
  o.NO_UPDATES,
5706
5706
  o.NONE,
@@ -5712,7 +5712,7 @@ class Ja {
5712
5712
  ]), 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;
5713
5713
  break;
5714
5714
  case S.CLOUD:
5715
- b = await this.sm?.getHash(S.CLOUD, t.query), g = Ur(t.data.cloud), b === g ? (M(3, [
5715
+ b = await this.sm?.getHash(S.CLOUD, t.query), g = Ur(t.data.cloud), b === g ? (G(3, [
5716
5716
  "%cset%c %cstorage%c %ccloud",
5717
5717
  o.NO_UPDATES,
5718
5718
  o.NONE,
@@ -5721,7 +5721,7 @@ class Ja {
5721
5721
  o.CLOUD,
5722
5722
  t.data?.title ?? t.query.widget,
5723
5723
  `same hash:${g}`
5724
- ]), M(4, [
5724
+ ]), G(4, [
5725
5725
  "%cdebug%c %ccloud",
5726
5726
  o.NO_UPDATES,
5727
5727
  o.NONE,
@@ -5737,7 +5737,7 @@ class Ja {
5737
5737
  }, 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);
5738
5738
  break;
5739
5739
  case S.SERIES:
5740
- b = await this.sm?.getHash(S.SERIES, t.query), g = Ur(t.data.series), b === g ? (M(3, [
5740
+ b = await this.sm?.getHash(S.SERIES, t.query), g = Ur(t.data.series), b === g ? (G(3, [
5741
5741
  "%cset%c %cstorage%c %cseries",
5742
5742
  o.NO_UPDATES,
5743
5743
  o.NONE,
@@ -5746,7 +5746,7 @@ class Ja {
5746
5746
  o.SERIES,
5747
5747
  t.data?.title ?? t.query.widget,
5748
5748
  `same hash:${g}`
5749
- ]), M(4, [
5749
+ ]), G(4, [
5750
5750
  "%cdebug%c %cseries",
5751
5751
  o.NO_UPDATES,
5752
5752
  o.NONE,
@@ -5760,7 +5760,7 @@ class Ja {
5760
5760
  }, this.sm !== null ? l.code = await this.sm?.setSeries(t.query, t.data).then((I) => (this.broadcastUpdate(I, t), I)).catch((I) => 500) : l.code = 500);
5761
5761
  break;
5762
5762
  default:
5763
- M(3, [
5763
+ G(3, [
5764
5764
  `%cfetch%c %capi% %c${t.query.type} `,
5765
5765
  o.KO,
5766
5766
  o.NONE,
@@ -5771,7 +5771,7 @@ class Ja {
5771
5771
  ]), l = { code: 404, hash: g };
5772
5772
  }
5773
5773
  else
5774
- switch (M(3, [
5774
+ switch (G(3, [
5775
5775
  `%cset%c %c${t.query.type}%c %cunauthorized`,
5776
5776
  o.KO,
5777
5777
  o.NONE,
@@ -5791,14 +5791,17 @@ class Ja {
5791
5791
  };
5792
5792
  startBroadcastListener = () => {
5793
5793
  const t = this.options.presentation;
5794
- this.bc = new BroadcastChannel(t), M(3, ["%cchannel%c %capi", o.BROADCAST, o.NONE, o.API, t]), this.bc.onmessage = (i) => {
5794
+ G(3, ["%cchannel%c %capi", o.BROADCAST, o.NONE, o.API, t]), this.bc && (this.bc.onmessage = (i) => {
5795
5795
  this.actions(i);
5796
- }, this.bc.postMessage({ event: X.STORAGE_INIT, data: {} });
5796
+ }, this.bc.postMessage({ event: X.STORAGE_INIT, data: {} }));
5797
+ };
5798
+ broadcastMessage = (t, i) => {
5799
+ this.bc && this.bc.postMessage({ event: t, data: i });
5797
5800
  };
5798
5801
  broadcastUpdate = (t, i) => {
5799
5802
  switch (t) {
5800
5803
  case 201:
5801
- M(3, [
5804
+ G(3, [
5802
5805
  `%cupdate%c %cwidget%c %c${i.query?.type}`,
5803
5806
  o.BROADCAST,
5804
5807
  o.NONE,
@@ -5807,7 +5810,7 @@ class Ja {
5807
5810
  tr(i.query),
5808
5811
  // @ts-expect-error query.widget is obligatory but not always
5809
5812
  `${i?.data?.title ?? ""} ${i.query.widget}`
5810
- ]), M(4, [
5813
+ ]), G(4, [
5811
5814
  "%cdebug%c %cevent",
5812
5815
  o.NO_UPDATES,
5813
5816
  o.NONE,
@@ -5821,7 +5824,7 @@ class Ja {
5821
5824
  case 204:
5822
5825
  break;
5823
5826
  default:
5824
- M(2, [
5827
+ G(2, [
5825
5828
  `%cupdate%c %cwidget%c %c${i.query?.type}`,
5826
5829
  o.KO,
5827
5830
  o.NONE,
@@ -5843,7 +5846,7 @@ class Ja {
5843
5846
  this.addSubscriber(t.data.data);
5844
5847
  break;
5845
5848
  case X.UPDATE:
5846
- M(3, [
5849
+ G(3, [
5847
5850
  "%cupdate%c %capi%c %cstorage",
5848
5851
  o.BROADCAST,
5849
5852
  o.NONE,
@@ -5857,7 +5860,7 @@ class Ja {
5857
5860
  };
5858
5861
  cleanMessages = async () => {
5859
5862
  if (this.options?.suspended) {
5860
- M(2, [
5863
+ G(2, [
5861
5864
  "%cclean%c %cstorage%c %cmessages",
5862
5865
  o.KO,
5863
5866
  o.NONE,
@@ -5871,7 +5874,7 @@ class Ja {
5871
5874
  const t = this.options?.retention || 86400 * 4, i = await this.sm?.cleanMessages(
5872
5875
  t
5873
5876
  );
5874
- M(3, [
5877
+ G(3, [
5875
5878
  "%cclean%c %cstorage%c %cmessages",
5876
5879
  o.OK,
5877
5880
  o.NONE,
@@ -5883,7 +5886,7 @@ class Ja {
5883
5886
  };
5884
5887
  hideMessage = async (t) => {
5885
5888
  const i = await this.sm?.hideMessage(t.id, 0);
5886
- return M(3, [
5889
+ return G(3, [
5887
5890
  "%chide%c %cstorage%c %cmessages",
5888
5891
  o.OK,
5889
5892
  o.NONE,
@@ -5934,7 +5937,7 @@ class Ba {
5934
5937
  constructor(t) {
5935
5938
  switch (this.sm = null, t.storage) {
5936
5939
  case pe.DEXIE:
5937
- this.sm = new Gn(t);
5940
+ this.sm = new Mn(t);
5938
5941
  break;
5939
5942
  case pe.LOCAL:
5940
5943
  this.sm = new Ln(t);
@@ -6028,7 +6031,7 @@ class Za {
6028
6031
  this.element = t, this.callbacks = i, l = typeof l < "u" ? l : "buzzcasting-app";
6029
6032
  const g = { ...t.dataset };
6030
6033
  delete g.hmr;
6031
- const b = window.BuzzCasting.getOptions();
6034
+ const b = window.__bc.opts;
6032
6035
  g.presentation = b?.presentation ?? `${l} not found`, this.query = g, Na(t), this.storageReader = new Ba(b), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
6033
6036
  }
6034
6037
  addCallbackListener(t) {
@@ -6047,7 +6050,7 @@ class Za {
6047
6050
  try {
6048
6051
  if (l.dashboard === t.dashboard && l.widget === t.widget) {
6049
6052
  const g = await this.getData();
6050
- g?.success && (M(4, [
6053
+ g?.success && (G(4, [
6051
6054
  `%cset%c %cwidget%c %c${this.query.type}`,
6052
6055
  o.OK,
6053
6056
  o.NONE,
@@ -6061,7 +6064,7 @@ class Za {
6061
6064
  }));
6062
6065
  }
6063
6066
  } catch (g) {
6064
- M(4, [X.WIDGET_UPDATE, l, g.message, g]);
6067
+ G(4, [X.WIDGET_UPDATE, l, g.message, g]);
6065
6068
  }
6066
6069
  break;
6067
6070
  case X.APP_READY:
@@ -6075,7 +6078,7 @@ class Za {
6075
6078
  * This takes place when the container indicates it has finished loading (ready)
6076
6079
  */
6077
6080
  subscribe() {
6078
- M(3, [
6081
+ G(3, [
6079
6082
  `%csubscribe%c %cwidget%c %c${this.query.type}`,
6080
6083
  o.SUBSCRIBE,
6081
6084
  o.NONE,
@@ -6083,7 +6086,7 @@ class Za {
6083
6086
  o.NONE,
6084
6087
  tr(this.query),
6085
6088
  this.query.widget
6086
- ]), M(4, [
6089
+ ]), G(4, [
6087
6090
  "%cdebug%c %cwidget",
6088
6091
  o.NO_UPDATES,
6089
6092
  o.NONE,
@@ -6120,7 +6123,7 @@ class Za {
6120
6123
  *
6121
6124
  * @returns IResponse
6122
6125
  */
6123
- getCloud = async () => this.query.type !== S.CLOUD ? (M(3, [
6126
+ getCloud = async () => this.query.type !== S.CLOUD ? (G(3, [
6124
6127
  "%cget%c %cstorage%c %cwidget",
6125
6128
  o.KO,
6126
6129
  o.NONE,
@@ -6130,7 +6133,7 @@ class Za {
6130
6133
  this.query.widget,
6131
6134
  "Wrong method call for getCloud, expected type is",
6132
6135
  this.query.type
6133
- ]), M(4, [
6136
+ ]), G(4, [
6134
6137
  "%cdebug%c %ccloud",
6135
6138
  o.NO_UPDATES,
6136
6139
  o.NONE,
@@ -6147,7 +6150,7 @@ class Za {
6147
6150
  *
6148
6151
  * @returns IResponse
6149
6152
  */
6150
- getMessages = async () => this.query.type !== S.MESSAGES ? (M(3, [
6153
+ getMessages = async () => this.query.type !== S.MESSAGES ? (G(3, [
6151
6154
  "%cget%c %cstorage%c %cwidget",
6152
6155
  o.KO,
6153
6156
  o.NONE,
@@ -6157,7 +6160,7 @@ class Za {
6157
6160
  this.query.widget,
6158
6161
  "Wrong method call for getMessages, expected type is",
6159
6162
  this.query.type
6160
- ]), M(4, [
6163
+ ]), G(4, [
6161
6164
  "%debug%c %cmessages",
6162
6165
  o.NO_UPDATES,
6163
6166
  o.NONE,
@@ -6173,7 +6176,7 @@ class Za {
6173
6176
  *
6174
6177
  * @returns IResponse
6175
6178
  */
6176
- getSeries = async () => this.query.type !== S.SERIES ? (M(3, [
6179
+ getSeries = async () => this.query.type !== S.SERIES ? (G(3, [
6177
6180
  "%cget%c %cstorage%c %cwidget",
6178
6181
  o.KO,
6179
6182
  o.NONE,
@@ -6183,7 +6186,7 @@ class Za {
6183
6186
  this.query.widget,
6184
6187
  "Wrong method call for getSeries, expected type is",
6185
6188
  this.query.type
6186
- ]), M(4, [
6189
+ ]), G(4, [
6187
6190
  "%cdebug%c %cseries",
6188
6191
  o.NO_UPDATES,
6189
6192
  o.NONE,
@@ -6202,7 +6205,7 @@ class Za {
6202
6205
  * @param modal IModal
6203
6206
  */
6204
6207
  showModal = (t) => {
6205
- M(3, [
6208
+ G(3, [
6206
6209
  "%cmodal%c %cwidget",
6207
6210
  o.OK,
6208
6211
  o.NONE,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "3.15.2",
4
+ "version": "3.15.4",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -33,20 +33,20 @@
33
33
  "idb-keyval": "^6.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@antfu/eslint-config": "^5.2.1",
36
+ "@antfu/eslint-config": "^5.3.0",
37
37
  "@commitlint/cli": "^19.8.1",
38
38
  "@commitlint/config-conventional": "^19.8.1",
39
- "@types/node": "^22.17.2",
40
- "@typescript-eslint/eslint-plugin": "^8.39.0",
41
- "@typescript-eslint/parser": "^8.39.1",
39
+ "@types/node": "^22.18.1",
40
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
41
+ "@typescript-eslint/parser": "^8.43.0",
42
42
  "@vitest/coverage-v8": "^3.2.4",
43
- "buzzcasting-utils": "^1.8.2",
43
+ "buzzcasting-utils": "^1.8.5",
44
44
  "camelcase": "^8.0.0",
45
45
  "changelogen": "^0.6.2",
46
- "eslint": "^9.33.0",
47
- "lint-staged": "^16.1.5",
46
+ "eslint": "^9.35.0",
47
+ "lint-staged": "^16.1.6",
48
48
  "typescript": "^5.9.2",
49
- "vite": "^7.1.2",
49
+ "vite": "^7.1.5",
50
50
  "vite-plugin-dts": "^4.5.4",
51
51
  "vitest": "^3.2.4"
52
52
  },