buzzcasting-storage 3.2.4 → 3.2.6

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.
@@ -174,6 +174,7 @@ export declare interface ICloud {
174
174
  total: number;
175
175
  current_total: number;
176
176
  previous_total: number;
177
+ query?: IQuery;
177
178
  }
178
179
 
179
180
  declare interface ICloudIndicators {
@@ -364,6 +365,7 @@ export declare interface ISeries {
364
365
  metrics?: IMetrics;
365
366
  indicators?: IIndicators;
366
367
  timestamp?: number;
368
+ query?: IQuery;
367
369
  }
368
370
 
369
371
  export declare interface ISeriesData {
@@ -2,7 +2,7 @@ var xa = Object.defineProperty;
2
2
  var Aa = (l, r, o) => r in l ? xa(l, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : l[r] = o;
3
3
  var k = (l, r, o) => Aa(l, typeof r != "symbol" ? r + "" : r, o);
4
4
  var j = /* @__PURE__ */ ((l) => (l.MESSAGES = "messages", l.CLOUD = "cloud", l.SERIES = "series", l.TOPICS = "topics", l.WIDGET = "widget", l.WIDGETS = "widgets", l.SLIDE = "slide", l))(j || {}), m = /* @__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))(m || {}), re = /* @__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.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.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.REMOVE_CLOUD = "removeCloud", l.UPDATE = "update", l.VERSION = "version", l.WIDGET_UPDATE = "widgetUpdate", l))(re || {}), Zt = /* @__PURE__ */ ((l) => (l.APPROVED = "approved", l.BEFORE = "before", l.DELAYED = "delayed", l.NONE = "none", l.REALTIME = "realtime", l))(Zt || {}), ye = /* @__PURE__ */ ((l) => (l.KEYVAL = "keyval", l.LOCAL = "local", l.SESSION = "session", l.DEXIE = "dexie", l.WINDOW = "window", l))(ye || {});
5
- const ka = "3.2.3";
5
+ const ka = "3.2.5";
6
6
  class Da {
7
7
  constructor(r) {
8
8
  k(this, "options");
@@ -44,11 +44,11 @@ class Da {
44
44
  ), console.debug("%capi%c %cfetch", m.API, m.NONE, m.GET_DATA, x), await fetch(
45
45
  [this.url, "api", o, r.type].join("/") + D,
46
46
  { ...d, method: "get" }
47
- ).then(async (K) => {
48
- if (!K.ok)
49
- throw new Error(`${K.status}`);
50
- return K;
51
- }).then((K) => K.json()).then((K) => (K.query = r, K)).catch((K) => ({ success: !1, message: `${K}`, data: null }));
47
+ ).then(async (N) => {
48
+ if (!N.ok)
49
+ throw new Error(`${N.status}`);
50
+ return N;
51
+ }).then((N) => N.json()).then((N) => (N.query = r, N.query = r, N.data && (N.data.query = r), N)).catch((N) => ({ success: !1, message: `${N}`, data: null }));
52
52
  }
53
53
  async hideMessage(r) {
54
54
  const { version: o } = this.options, d = this.headers(), x = "?action=visible";
@@ -71,8 +71,8 @@ class Da {
71
71
  }
72
72
  async hideLabels(r) {
73
73
  const { version: o } = this.options, d = this.formHeaders(), x = new URLSearchParams(), D = r.labels || [];
74
- for (const [K, U] of D.entries())
75
- x.append(`custom_filters[${K}]`, U);
74
+ for (const [N, U] of D.entries())
75
+ x.append(`custom_filters[${N}]`, U);
76
76
  return console.info(
77
77
  "%capi%c %cput",
78
78
  m.API,
@@ -84,11 +84,11 @@ class Da {
84
84
  ), await fetch(
85
85
  [this.url, "api", o, r.type, r.widget].join("/"),
86
86
  { ...d, body: x, method: "put" }
87
- ).then((K) => {
88
- if (!K.ok)
89
- throw new Error(K.statusText);
90
- return K;
91
- }).then((K) => K.json()).catch((K) => ({ succes: !1, message: K, data: [] }));
87
+ ).then((N) => {
88
+ if (!N.ok)
89
+ throw new Error(N.statusText);
90
+ return N;
91
+ }).then((N) => N.json()).catch((N) => ({ succes: !1, message: N, data: [] }));
92
92
  }
93
93
  async loadSlide(r) {
94
94
  const { version: o } = this.options, d = this.headers(), x = Object.assign({}, r);
@@ -162,9 +162,9 @@ function Ra() {
162
162
  for (var a, i = 0, s = t.length; i < s; i++) !a && i in t || ((a = a || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
163
163
  return e.concat(a || Array.prototype.slice.call(t));
164
164
  }
165
- var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Pa, K = Object.keys, U = Array.isArray;
166
- function N(e, t) {
167
- return typeof t != "object" || K(t).forEach(function(n) {
165
+ var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Pa, N = Object.keys, U = Array.isArray;
166
+ function K(e, t) {
167
+ return typeof t != "object" || N(t).forEach(function(n) {
168
168
  e[n] = t[n];
169
169
  }), e;
170
170
  }
@@ -174,13 +174,13 @@ function Ra() {
174
174
  return se.call(e, t);
175
175
  }
176
176
  function le(e, t) {
177
- typeof t == "function" && (t = t(X(e))), (typeof Reflect > "u" ? K : Reflect.ownKeys)(t).forEach(function(n) {
177
+ typeof t == "function" && (t = t(X(e))), (typeof Reflect > "u" ? N : Reflect.ownKeys)(t).forEach(function(n) {
178
178
  xe(e, n, t[n]);
179
179
  });
180
180
  }
181
181
  var He = Object.defineProperty;
182
182
  function xe(e, t, n, a) {
183
- He(e, t, N(n && ee(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
183
+ He(e, t, K(n && ee(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, a));
184
184
  }
185
185
  function Ye(e) {
186
186
  return { from: function(t) {
@@ -368,9 +368,9 @@ function Ra() {
368
368
  function Zr(e, t) {
369
369
  return e === J ? t : function(n) {
370
370
  var a = e.apply(this, arguments);
371
- N(n, a);
371
+ K(n, a);
372
372
  var i = this.onsuccess, s = this.onerror;
373
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), s && (this.onerror = this.onerror ? je(s, this.onerror) : s), a === void 0 ? n === void 0 ? void 0 : n : N(a, n);
373
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), i && (this.onsuccess = this.onsuccess ? je(i, this.onsuccess) : i), s && (this.onerror = this.onerror ? je(s, this.onerror) : s), a === void 0 ? n === void 0 ? void 0 : n : K(a, n);
374
374
  };
375
375
  }
376
376
  function qr(e, t) {
@@ -634,7 +634,7 @@ function Ra() {
634
634
  var ae = { awaits: 0, echoes: 0, id: 0 }, na = 0, Pt = [], It = 0, Ct = 0, ra = 0;
635
635
  function ke(e, t, n, a) {
636
636
  var i = G, s = Object.create(i);
637
- return s.parent = i, s.ref = 0, s.global = !1, s.id = ++ra, Ae.env, s.env = on ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && N(s, t), ++i.ref, s.finalize = function() {
637
+ return s.parent = i, s.ref = 0, s.global = !1, s.id = ++ra, Ae.env, s.env = on ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && K(s, t), ++i.ref, s.finalize = function() {
638
638
  --this.parent.ref || this.parent.finalize();
639
639
  }, a = Ge(s, e, n, a), s.ref === 0 && s.finalize(), a;
640
640
  }
@@ -798,7 +798,7 @@ function Ra() {
798
798
  }, Z.prototype.where = function(e) {
799
799
  if (typeof e == "string") return new this.db.WhereClause(this, e);
800
800
  if (U(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
801
- var t = K(e);
801
+ var t = N(e);
802
802
  if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
803
803
  var n = this.schema.indexes.concat(this.schema.primKey).filter(function(c) {
804
804
  if (c.compound && t.every(function(g) {
@@ -882,7 +882,7 @@ function Ra() {
882
882
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = c, this.hook("reading", c), e;
883
883
  }, Z.prototype.defineClass = function() {
884
884
  return this.mapToClass(function(e) {
885
- N(this, e);
885
+ K(this, e);
886
886
  });
887
887
  }, Z.prototype.add = function(e, t) {
888
888
  var n = this, a = this.schema.primKey, i = a.auto, s = a.keyPath, u = e;
@@ -1031,7 +1031,7 @@ function Ra() {
1031
1031
  } };
1032
1032
  return n[u] = t[u] = v;
1033
1033
  }
1034
- K(g = u).forEach(function(f) {
1034
+ N(g = u).forEach(function(f) {
1035
1035
  var _ = g[f];
1036
1036
  if (U(_)) s(f, g[f][0], g[f][1]);
1037
1037
  else {
@@ -1153,7 +1153,7 @@ function Ra() {
1153
1153
  return Nt(this._ctx, e, t, this._ctx.table.core);
1154
1154
  }, Q.prototype.clone = function(e) {
1155
1155
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1156
- return e && N(n, e), t._ctx = n, t;
1156
+ return e && K(n, e), t._ctx = n, t;
1157
1157
  }, Q.prototype.raw = function() {
1158
1158
  return this._ctx.valueMapper = null, this;
1159
1159
  }, Q.prototype.each = function(e) {
@@ -1305,7 +1305,7 @@ function Ra() {
1305
1305
  var t = this, n = this._ctx;
1306
1306
  return this._write(function(a) {
1307
1307
  var i, s, u;
1308
- u = typeof e == "function" ? e : (i = K(e), s = i.length, function(y) {
1308
+ u = typeof e == "function" ? e : (i = N(e), s = i.length, function(y) {
1309
1309
  for (var S = !1, E = 0; E < s; ++E) {
1310
1310
  var O = i[E], A = e[O], P = we(y, O);
1311
1311
  A instanceof ht ? (fe(y, O, A.execute(P)), S = !0) : P !== A && (fe(y, O, A), S = !0);
@@ -1317,7 +1317,7 @@ function Ra() {
1317
1317
  function _(y, O) {
1318
1318
  var E = O.failures, O = O.numFailures;
1319
1319
  b += y - O;
1320
- for (var A = 0, P = K(E); A < P.length; A++) {
1320
+ for (var A = 0, P = N(E); A < P.length; A++) {
1321
1321
  var T = P[A];
1322
1322
  p.push(E[T]);
1323
1323
  }
@@ -1942,7 +1942,7 @@ function Ra() {
1942
1942
  var T = Qn(O);
1943
1943
  A.del.forEach(function(M) {
1944
1944
  T[M] = E[M];
1945
- }), On(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], K(T), T), p.schema = T;
1945
+ }), On(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], N(T), T), p.schema = T;
1946
1946
  var I, C = rn(P);
1947
1947
  return C && qe(), A = B.follow(function() {
1948
1948
  var M;
@@ -1967,7 +1967,7 @@ function Ra() {
1967
1967
  br(y, b);
1968
1968
  })) : B.resolve();
1969
1969
  var f, _, p, b, w, y;
1970
- }).catch(u)) : (K(i).forEach(function(v) {
1970
+ }).catch(u)) : (N(i).forEach(function(v) {
1971
1971
  An(n, v, i[v].primKey, i[v].indexes);
1972
1972
  }), Bt(e, n), void B.follow(function() {
1973
1973
  return e.on.populate.fire(s);
@@ -2018,7 +2018,7 @@ function Ra() {
2018
2018
  }), i;
2019
2019
  }
2020
2020
  function br(e, t) {
2021
- K(e).forEach(function(n) {
2021
+ N(e).forEach(function(n) {
2022
2022
  t.db.objectStoreNames.contains(n) || (me && console.debug("Dexie: Creating missing table", n), An(t, n, e[n].primKey, e[n].indexes));
2023
2023
  });
2024
2024
  }
@@ -2053,7 +2053,7 @@ function Ra() {
2053
2053
  });
2054
2054
  }
2055
2055
  var ga = (Ft.prototype._parseStoresSpec = function(e, t) {
2056
- K(e).forEach(function(n) {
2056
+ N(e).forEach(function(n) {
2057
2057
  if (e[n] !== null) {
2058
2058
  var a = vr(e[n]), i = a.shift();
2059
2059
  if (i.unique = !0, i.multi) throw new $.Schema("Primary key cannot be multi-valued");
@@ -2065,11 +2065,11 @@ function Ra() {
2065
2065
  });
2066
2066
  }, Ft.prototype.stores = function(n) {
2067
2067
  var t = this.db;
2068
- this._cfg.storesSource = this._cfg.storesSource ? N(this._cfg.storesSource, n) : n;
2068
+ this._cfg.storesSource = this._cfg.storesSource ? K(this._cfg.storesSource, n) : n;
2069
2069
  var n = t._versions, a = {}, i = {};
2070
2070
  return n.forEach(function(s) {
2071
- N(a, s._cfg.storesSource), i = s._cfg.dbschema = {}, s._parseStoresSpec(a, i);
2072
- }), t._dbSchema = i, On(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], K(i), i), t._storeNames = K(i), this;
2071
+ K(a, s._cfg.storesSource), i = s._cfg.dbschema = {}, s._parseStoresSpec(a, i);
2072
+ }), t._dbSchema = i, On(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], N(i), i), t._storeNames = N(i), this;
2073
2073
  }, Ft.prototype.upgrade = function(e) {
2074
2074
  return this._cfg.contentUpgrade = sn(this._cfg.contentUpgrade || J, e), this;
2075
2075
  }, Ft);
@@ -2093,15 +2093,15 @@ function Ra() {
2093
2093
  var oe = function(e, t) {
2094
2094
  if (!this) {
2095
2095
  var n = new oe();
2096
- return e && "d" in e && N(n, e), n;
2096
+ return e && "d" in e && K(n, e), n;
2097
2097
  }
2098
- N(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2098
+ K(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2099
2099
  };
2100
2100
  function bt(e, t, n) {
2101
2101
  var a = Y(t, n);
2102
2102
  if (!isNaN(a)) {
2103
2103
  if (0 < a) throw RangeError();
2104
- if (In(e)) return N(e, { from: t, to: n, d: 1 });
2104
+ if (In(e)) return K(e, { from: t, to: n, d: 1 });
2105
2105
  var i = e.l, a = e.r;
2106
2106
  if (Y(n, e.from) < 0) return i ? bt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
2107
2107
  if (0 < Y(t, e.to)) return a ? bt(a, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, _r(e);
@@ -2152,7 +2152,7 @@ function Ra() {
2152
2152
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
2153
2153
  }
2154
2154
  function zt(e, t) {
2155
- return K(t).forEach(function(n) {
2155
+ return N(t).forEach(function(n) {
2156
2156
  e[n] ? vt(e[n], t[n]) : e[n] = function a(i) {
2157
2157
  var s, u, c = {};
2158
2158
  for (s in i) ee(i, s) && (u = i[s], c[s] = !u || typeof u != "object" || Jn.has(u.constructor) ? u : a(u));
@@ -2238,7 +2238,7 @@ function Ra() {
2238
2238
  var y, S, E, O, A, P = e.idbdb = w.result, T = St(P.objectStoreNames);
2239
2239
  if (0 < T.length) try {
2240
2240
  var I = P.transaction((O = T).length === 1 ? O[0] : O, "readonly");
2241
- if (t.autoSchema) S = P, E = I, (y = e).verno = S.version / 10, E = y._dbSchema = $t(0, S, E), y._storeNames = St(S.objectStoreNames, 0), Lt(y, [y._allTables], K(E), E);
2241
+ if (t.autoSchema) S = P, E = I, (y = e).verno = S.version / 10, E = y._dbSchema = $t(0, S, E), y._storeNames = St(S.objectStoreNames, 0), Lt(y, [y._allTables], N(E), E);
2242
2242
  else if (Ut(e, e._dbSchema, I), ((A = xn($t(0, (A = e).idbdb, I), A._dbSchema)).add.length || A.change.some(function(C) {
2243
2243
  return C.add.length || C.change.length;
2244
2244
  })) && !s) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), P.close(), i = P.version + 1, s = !0, _(c());
@@ -2367,10 +2367,10 @@ function Ra() {
2367
2367
  } });
2368
2368
  } };
2369
2369
  function Nn(e, t, n, a) {
2370
- return n = n || {}, a = a || "", K(e).forEach(function(i) {
2370
+ return n = n || {}, a = a || "", N(e).forEach(function(i) {
2371
2371
  var s, u, c;
2372
2372
  ee(t, i) ? (s = e[i], u = t[i], typeof s == "object" && typeof u == "object" && s && u ? (c = tn(s)) !== tn(u) ? n[a + i] = t[i] : c === "Object" ? Nn(s, u, n, a + i + ".") : s !== u && (n[a + i] = t[i]) : s !== u && (n[a + i] = t[i])) : n[a + i] = void 0;
2373
- }), K(t).forEach(function(i) {
2373
+ }), N(t).forEach(function(i) {
2374
2374
  ee(e, i) || (n[a + i] = t[i]);
2375
2375
  }), n;
2376
2376
  }
@@ -2524,7 +2524,7 @@ function Ra() {
2524
2524
  }, getMany: function(p) {
2525
2525
  return [u, new oe().addKeys(p.keys)];
2526
2526
  }, count: f, query: f, openCursor: f };
2527
- return K(_).forEach(function(p) {
2527
+ return N(_).forEach(function(p) {
2528
2528
  v[p] = function(b) {
2529
2529
  var w = G.subscr, y = !!w, S = xr(G, i) && Ar(p, b) ? b.obsSet = {} : w;
2530
2530
  if (y) {
@@ -2835,7 +2835,7 @@ function Ra() {
2835
2835
  return this._state.autoSchema;
2836
2836
  }, Object.defineProperty(ne.prototype, "tables", { get: function() {
2837
2837
  var e = this;
2838
- return K(this._allTables).map(function(t) {
2838
+ return N(this._allTables).map(function(t) {
2839
2839
  return e._allTables[t];
2840
2840
  });
2841
2841
  }, enumerable: !1, configurable: !0 }), ne.prototype.transaction = function() {
@@ -3081,7 +3081,7 @@ function Ra() {
3081
3081
  var t, n;
3082
3082
  }, defineClass: function() {
3083
3083
  return function(e) {
3084
- N(this, e);
3084
+ K(this, e);
3085
3085
  };
3086
3086
  }, ignoreTransaction: function(e) {
3087
3087
  return G.trans ? Ge(G.transless, e) : e();
@@ -3109,7 +3109,7 @@ function Ra() {
3109
3109
  return me;
3110
3110
  }, set: function(e) {
3111
3111
  qn(e);
3112
- } }, derive: Ye, extend: N, props: le, override: Hn, Events: dt, on: Ce, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
3112
+ } }, derive: Ye, extend: K, props: le, override: Hn, Events: dt, on: Ce, liveQuery: Ir, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: fe, delByKeyPath: function(e, t) {
3113
3113
  typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3114
3114
  fe(e, n, void 0);
3115
3115
  });
@@ -3169,10 +3169,10 @@ function Mr(l) {
3169
3169
  }
3170
3170
  function _t(l, r) {
3171
3171
  var U;
3172
- let o, d, x, D, K;
3172
+ let o, d, x, D, N;
3173
3173
  switch (l.moderation) {
3174
3174
  case Zt.BEFORE:
3175
- o = /* @__PURE__ */ new Date(), d = (U = l.beforeTime) == null ? void 0 : U.split(":"), x = Number.parseInt(d ? d[0] : "00"), D = Number.parseInt(d ? d[1] : "00"), K = Number.parseInt(d ? d[2] : "00"), r.before = o.setHours(x, D, K, 0) / 1e3, r.period || (r.period = o.getDay() === 1 ? 72 : 24);
3175
+ o = /* @__PURE__ */ new Date(), d = (U = l.beforeTime) == null ? void 0 : U.split(":"), x = Number.parseInt(d ? d[0] : "00"), D = Number.parseInt(d ? d[1] : "00"), N = Number.parseInt(d ? d[2] : "00"), r.before = o.setHours(x, D, N, 0) / 1e3, r.period || (r.period = o.getDay() === 1 ? 72 : 24);
3176
3176
  break;
3177
3177
  case Zt.DELAYED:
3178
3178
  l.delay && l.delay > 0 && (r.delay = `${l.delay}`);
@@ -3234,13 +3234,13 @@ class jr {
3234
3234
  k(this, "getMessages", async (r) => {
3235
3235
  const o = (r == null ? void 0 : r.order) ?? "utc";
3236
3236
  o !== "utc" && (r.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? r.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : r.before = Math.floor(Date.now() / 1e3);
3237
- const d = (K) => K.utc > ((r == null ? void 0 : r.since) || 0), x = (K) => K.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (K) => (K == null ? void 0 : K.visible) !== 0;
3237
+ const d = (N) => N.utc > ((r == null ? void 0 : r.since) || 0), x = (N) => N.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (N) => (N == null ? void 0 : N.visible) !== 0;
3238
3238
  try {
3239
3239
  const U = await this.db.table(j.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(d).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(o);
3240
3240
  if (U.length === 0)
3241
3241
  return { data: null, message: "No Messages error", success: !1 };
3242
- let N = U.map((X) => this.db.table(j.MESSAGES).get({ id: X.message_id }));
3243
- return en.Promise.all(N).then(async (X) => {
3242
+ let K = U.map((X) => this.db.table(j.MESSAGES).get({ id: X.message_id }));
3243
+ return en.Promise.all(K).then(async (X) => {
3244
3244
  const se = X.map((le) => le.data), ee = {
3245
3245
  data: {
3246
3246
  presentation: (r == null ? void 0 : r.presentation) || "not set",
@@ -3261,14 +3261,14 @@ class jr {
3261
3261
  ee
3262
3262
  ), ee;
3263
3263
  });
3264
- } catch (K) {
3264
+ } catch (N) {
3265
3265
  return console.warn(
3266
3266
  "%cstorage%c %cmessages",
3267
3267
  m.STORAGE,
3268
3268
  m.NONE,
3269
3269
  m.MESSAGES,
3270
3270
  r,
3271
- K
3271
+ N
3272
3272
  ), { data: null, message: "Messages Data error", success: !1 };
3273
3273
  }
3274
3274
  });
@@ -3308,7 +3308,7 @@ class jr {
3308
3308
  const d = o.data.title;
3309
3309
  let x = 0;
3310
3310
  return o.data.messages.forEach(async (D) => {
3311
- var K, U, N, X, se, ee, le;
3311
+ var N, U, K, X, se, ee, le;
3312
3312
  D.id !== null && (await this.db.table(j.MESSAGES).put({
3313
3313
  id: D.id,
3314
3314
  utc: D.utc,
@@ -3328,8 +3328,8 @@ class jr {
3328
3328
  widget_id: r.widget,
3329
3329
  message_id: D.id,
3330
3330
  dashboard_id: r.dashboard,
3331
- engagement: ((K = D.topics[0]) == null ? void 0 : K.engagement) || ((U = D.dynamics) == null ? void 0 : U.engagement) || 0,
3332
- impressions: ((N = D.topics[0]) == null ? void 0 : N.impressions) || ((X = D.dynamics) == null ? void 0 : X.semrush_visits) || 0,
3331
+ engagement: ((N = D.topics[0]) == null ? void 0 : N.engagement) || ((U = D.dynamics) == null ? void 0 : U.engagement) || 0,
3332
+ impressions: ((K = D.topics[0]) == null ? void 0 : K.impressions) || ((X = D.dynamics) == null ? void 0 : X.semrush_visits) || 0,
3333
3333
  reach: ((se = D.topics[0]) == null ? void 0 : se.reach) || ((ee = D.dynamics) == null ? void 0 : ee.potential_reach) || 0,
3334
3334
  sentiment: ((le = D.topics[0]) == null ? void 0 : le.sentiment) || 0,
3335
3335
  utc: D.utc,
@@ -3345,13 +3345,13 @@ class jr {
3345
3345
  );
3346
3346
  }));
3347
3347
  }), o.data.topics.forEach(async (D) => {
3348
- const K = D.message_id, U = D.visible ? 1 : 0, N = D.title;
3349
- await this.db.table(j.TOPICS).where("message_id").equals(K).modify({ visible: U }).catch((X) => {
3348
+ const N = D.message_id, U = D.visible ? 1 : 0, K = D.title;
3349
+ await this.db.table(j.TOPICS).where("message_id").equals(N).modify({ visible: U }).catch((X) => {
3350
3350
  x++, console.error(
3351
3351
  "%cstorage",
3352
3352
  m.STORAGE,
3353
3353
  "update message visibility",
3354
- `title: ${N}`,
3354
+ `title: ${K}`,
3355
3355
  `widget: ${D.widget_id}`,
3356
3356
  X.message
3357
3357
  );
@@ -3487,7 +3487,7 @@ function Ma(l, r) {
3487
3487
  const o = indexedDB.open(l);
3488
3488
  o.onupgradeneeded = () => o.result.createObjectStore(r);
3489
3489
  const d = zn(o);
3490
- return (x, D) => d.then((K) => D(K.transaction(r, x).objectStore(r)));
3490
+ return (x, D) => d.then((N) => D(N.transaction(r, x).objectStore(r)));
3491
3491
  }
3492
3492
  let Un;
3493
3493
  function Nr() {
@@ -4040,42 +4040,44 @@ function za(l) {
4040
4040
  }
4041
4041
  function Ha(l, r) {
4042
4042
  switch (l) {
4043
+ case "ax":
4044
+ return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
4043
4045
  case "bl":
4044
- return `text-blue fa-solid fa-rss fa-${r}`;
4046
+ return `<li class="text-blue fa-solid fa-rss fa-${r}"/>`;
4045
4047
  case "co":
4046
- return `fa-solid fa-comment fa-${r}`;
4048
+ return `<li class="fa-solid fa-comment fa-${r}"/>`;
4047
4049
  case "da":
4048
- return `fa-brands fa-dailymotion fa-${r}`;
4050
+ return `<li class="fa-brands fa-dailymotion fa-${r}"/>`;
4049
4051
  case "fb":
4050
- return `text-blue-900 fa-brands fa-facebook fa-${r}`;
4052
+ return `<li class="text-blue-900 fa-brands fa-facebook fa-${r}"/>`;
4051
4053
  case "fo":
4052
- return `fa-solid fa-messages fa-${r}`;
4054
+ return `<li class="fa-solid fa-messages fa-${r}"/>`;
4053
4055
  case "ig":
4054
- return `fa-brands fa-instagram fa-${r}`;
4056
+ return `<li class="fa-brands fa-instagram fa-${r}"/>`;
4055
4057
  case "lb":
4056
- return `fa-solid fa-comment fa-${r}`;
4058
+ return `<li class="fa-solid fa-comment fa-${r}"/>`;
4057
4059
  case "li":
4058
- return `fa-brands fa-linkedin fa-${r}`;
4060
+ return `<li class="fa-brands fa-linkedin fa-${r}"/>`;
4059
4061
  case "me":
4060
- return `fa-solid fa-rss fa-${r}`;
4062
+ return `<li class="fa-solid fa-rss fa-${r}"/>`;
4061
4063
  case "pi":
4062
- return `fa-brands fa-pinterest fa-${r}`;
4064
+ return `<li class="fa-brands fa-pinterest fa-${r}"/>`;
4063
4065
  case "qq":
4064
- return `fa-brands fa-weibo fa-${r}`;
4066
+ return `<li class="fa-brands fa-weibo fa-${r}"/>`;
4065
4067
  case "rd":
4066
- return `fa-brands fa-reddit fa-${r}`;
4068
+ return `<li class="fa-brands fa-reddit fa-${r}"/>`;
4067
4069
  case "re":
4068
- return `fa-solid fa-star-sharp-half-stroke fa-${r}`;
4070
+ return `<li class="fa-solid fa-star-sharp-half-stroke fa-${r}"/>`;
4069
4071
  case "ti":
4070
- return `fa-brands fa-tiktok fa-${r}`;
4072
+ return `<li class="fa-brands fa-tiktok fa-${r}"/>`;
4071
4073
  case "tw":
4072
- return `fa-brands fa-x-twitter fa-${r}`;
4074
+ return `<li class="fa-brands fa-x-twitter fa-${r}"/>`;
4073
4075
  case "vk":
4074
- return `fa-brands fa-vk fa-${r}`;
4076
+ return `<li class="fa-brands fa-vk fa-${r}"/>`;
4075
4077
  case "ws":
4076
- return `fa-solid fa-rss fa-${r}`;
4078
+ return `<li class="fa-solid fa-rss fa-${r}"/>`;
4077
4079
  case "yt":
4078
- return `text-red fa-brands fa-youtube fa-${r}`;
4080
+ return `<li class="text-red fa-brands fa-youtube fa-${r}"/>`;
4079
4081
  default:
4080
4082
  return "";
4081
4083
  }
@@ -4141,8 +4143,8 @@ function $r(l, r, o, d) {
4141
4143
  return D;
4142
4144
  try {
4143
4145
  return Oe(D, String(r.valueOf()));
4144
- } catch (K) {
4145
- return Oe(D, `[valueOf exception]${K.stack || K.message}`);
4146
+ } catch (N) {
4147
+ return Oe(D, `[valueOf exception]${N.stack || N.message}`);
4146
4148
  }
4147
4149
  }
4148
4150
  return Oe(x, r.toString());
@@ -4286,99 +4288,99 @@ class si {
4286
4288
  d.push(this.api.get(x));
4287
4289
  }), await Promise.allSettled(d).then(
4288
4290
  (x) => x.forEach(async (D) => {
4289
- let K, U = 400;
4291
+ let N, U = 400;
4290
4292
  if (D.status === "fulfilled") {
4291
- let N = D.value;
4293
+ let K = D.value;
4292
4294
  if (this.sm === null)
4293
4295
  return 400;
4294
- if (N.success === !0) {
4296
+ if (K.success === !0) {
4295
4297
  const X = this.sm.subscribers.filter(
4296
- (le) => le.widget === N.query.widget
4298
+ (le) => le.widget === K.query.widget
4297
4299
  )[0];
4298
4300
  let se = "", ee;
4299
- switch (N.query.type) {
4301
+ switch (K.query.type) {
4300
4302
  case j.MESSAGES:
4301
- if (ee = N.data.messages.filter(
4303
+ if (ee = K.data.messages.filter(
4302
4304
  (le) => le.id !== null
4303
- ), N.data.messages = ee, se = Fn(N.data.messages), X.hash === se)
4305
+ ), K.data.messages = ee, se = Fn(K.data.messages), X.hash === se)
4304
4306
  return console.info(
4305
4307
  "%capi%c %cno updates",
4306
4308
  m.API,
4307
4309
  m.NONE,
4308
4310
  m.NO_UPDATES,
4309
4311
  j.MESSAGES,
4310
- N.query.slide,
4311
- N.query.widget
4312
+ K.query.slide,
4313
+ K.query.widget
4312
4314
  ), console.debug(
4313
4315
  "%capi%c %cno updates",
4314
4316
  m.API,
4315
4317
  m.NONE,
4316
4318
  m.NO_UPDATES,
4317
4319
  j.MESSAGES,
4318
- N
4320
+ K
4319
4321
  ), 204;
4320
- K = N, X.hash = se, U = await this.sm.setMessages(N.query, N);
4322
+ N = K, X.hash = se, U = await this.sm.setMessages(K.query, K);
4321
4323
  break;
4322
4324
  case j.CLOUD:
4323
- se = Fn(N.data), X.hash === se ? (console.info(
4325
+ se = Fn(K.data), X.hash === se ? (console.info(
4324
4326
  "%capi%c %cno updates",
4325
4327
  m.API,
4326
4328
  m.NONE,
4327
4329
  m.NO_UPDATES,
4328
4330
  j.CLOUD,
4329
- N.query.slide,
4330
- N.query.widget
4331
+ K.query.slide,
4332
+ K.query.widget
4331
4333
  ), console.debug(
4332
4334
  "%capi%c %cno updates",
4333
4335
  m.API,
4334
4336
  m.NONE,
4335
4337
  m.NO_UPDATES,
4336
4338
  j.CLOUD,
4337
- N
4338
- ), U = 204) : (X.hash = se, K = {
4339
+ K
4340
+ ), U = 204) : (X.hash = se, N = {
4339
4341
  data: {
4340
- dashboard: N.query.dashboard,
4341
- cloud: N.data,
4342
- query: N.query,
4343
- slide: N.query.slide
4342
+ dashboard: K.query.dashboard,
4343
+ cloud: K.data,
4344
+ query: K.query,
4345
+ slide: K.query.slide
4344
4346
  },
4345
- query: N.query,
4346
- message: N.message,
4347
- success: N.success
4347
+ query: K.query,
4348
+ message: K.message,
4349
+ success: K.success
4348
4350
  }, U = await this.sm.setCloud(
4349
- N.query,
4350
- K.data.cloud
4351
+ K.query,
4352
+ N.data.cloud
4351
4353
  ));
4352
4354
  break;
4353
4355
  case j.SERIES:
4354
- se = Fn(N.data), X.hash === se ? (console.info(
4356
+ se = Fn(K.data), X.hash === se ? (console.info(
4355
4357
  "%capi%c %cno updates",
4356
4358
  m.API,
4357
4359
  m.NONE,
4358
4360
  m.NO_UPDATES,
4359
4361
  j.SERIES,
4360
- N.query.slide,
4361
- N.query.widget
4362
+ K.query.slide,
4363
+ K.query.widget
4362
4364
  ), console.debug(
4363
4365
  "%capi%c %cno updates",
4364
4366
  m.API,
4365
4367
  m.NONE,
4366
4368
  m.NO_UPDATES,
4367
4369
  j.SERIES,
4368
- N
4369
- ), U = 204) : (X.hash = se, K = {
4370
+ K
4371
+ ), U = 204) : (X.hash = se, N = {
4370
4372
  data: {
4371
- dashboard: N.query.dashboard,
4372
- series: N.data,
4373
- query: N.query,
4374
- slide: N.query.slide
4373
+ dashboard: K.query.dashboard,
4374
+ series: K.data,
4375
+ query: K.query,
4376
+ slide: K.query.slide
4375
4377
  },
4376
- query: N.query,
4377
- message: N.message,
4378
- success: N.success
4378
+ query: K.query,
4379
+ message: K.message,
4380
+ success: K.success
4379
4381
  }, U = await this.sm.setSeries(
4380
- N.query,
4381
- K.data.series
4382
+ K.query,
4383
+ N.data.series
4382
4384
  ));
4383
4385
  break;
4384
4386
  default:
@@ -4388,7 +4390,7 @@ class si {
4388
4390
  m.NONE,
4389
4391
  m.STORAGE,
4390
4392
  "error",
4391
- `data type ${N.query.type} unknown`
4393
+ `data type ${K.query.type} unknown`
4392
4394
  );
4393
4395
  }
4394
4396
  } else
@@ -4400,25 +4402,25 @@ class si {
4400
4402
  m.API,
4401
4403
  m.NONE,
4402
4404
  m.BROADCAST,
4403
- N.query.slide,
4404
- N.data.title ?? N.query.widget
4405
+ K.query.slide,
4406
+ K.data.title ?? K.query.widget
4405
4407
  ), console.debug(
4406
4408
  "%capp%c %cbroadcast",
4407
4409
  m.API,
4408
4410
  m.NONE,
4409
4411
  m.BROADCAST,
4410
- N
4412
+ K
4411
4413
  );
4412
- const X = structuredClone(K.query);
4413
- switch (N.query.type) {
4414
+ const X = structuredClone(N.query);
4415
+ switch (K.query.type) {
4414
4416
  case "messages":
4415
- N = await this.sm.getMessages(X);
4417
+ K = await this.sm.getMessages(X);
4416
4418
  break;
4417
4419
  case "cloud":
4418
- N = await this.sm.getCloud(X), N && (N.query = X);
4420
+ K = await this.sm.getCloud(X), K && (K.query = X);
4419
4421
  break;
4420
4422
  case "series":
4421
- N = await this.sm.getSeries(X), N && (N.query = X);
4423
+ K = await this.sm.getSeries(X), K && (K.query = X);
4422
4424
  break;
4423
4425
  default:
4424
4426
  console.warn(
@@ -4427,12 +4429,12 @@ class si {
4427
4429
  m.NONE,
4428
4430
  m.BROADCAST,
4429
4431
  "Unhandled data type",
4430
- N.query
4432
+ K.query
4431
4433
  );
4432
4434
  }
4433
- N && this.bc.postMessage({
4435
+ K && this.bc.postMessage({
4434
4436
  event: re.WIDGET_UPDATE,
4435
- data: N.data
4437
+ data: K.data
4436
4438
  });
4437
4439
  break;
4438
4440
  case 204:
@@ -4444,8 +4446,8 @@ class si {
4444
4446
  m.NONE,
4445
4447
  m.BROADCAST,
4446
4448
  "Fetch error",
4447
- N.query.slide,
4448
- N.data.title ?? N.query.widget
4449
+ K.query.slide,
4450
+ K.data.title ?? K.query.widget
4449
4451
  );
4450
4452
  break;
4451
4453
  }
@@ -4775,10 +4777,10 @@ class oi {
4775
4777
  });
4776
4778
  window.dispatchEvent(o);
4777
4779
  });
4778
- var K;
4780
+ var N;
4779
4781
  this.element = r, this.listeners = o, d = typeof d < "u" ? d : "buzzcasting-slide";
4780
4782
  let x;
4781
- x = { ...r.dataset }, delete x.hmr, x.slide = ((K = r.closest(d.toUpperCase())) == null ? void 0 : K.id) ?? `${d} not found`, x = Mr(x), this.query = x, Na(r);
4783
+ x = { ...r.dataset }, delete x.hmr, x.slide = ((N = r.closest(d.toUpperCase())) == null ? void 0 : N.id) ?? `${d} not found`, x = Mr(x), this.query = x, Na(r);
4782
4784
  const D = window.BuzzCasting.getOptions();
4783
4785
  this.storageReader = new $a(D), this.broadcastChannel = new BroadcastChannel(x.slide), this.startListener();
4784
4786
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "3.2.4",
4
+ "version": "3.2.6",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -32,19 +32,19 @@
32
32
  "idb-keyval": "^6.2.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@antfu/eslint-config": "^3.15.0",
36
- "@commitlint/cli": "^19.6.1",
37
- "@commitlint/config-conventional": "^19.6.0",
38
- "@types/node": "^22.10.7",
39
- "@vitest/coverage-v8": "^3.0.3",
35
+ "@antfu/eslint-config": "^3.16.0",
36
+ "@commitlint/cli": "^19.7.1",
37
+ "@commitlint/config-conventional": "^19.7.1",
38
+ "@types/node": "^22.13.1",
39
+ "@vitest/coverage-v8": "^3.0.5",
40
40
  "camelcase": "^8.0.0",
41
41
  "changelogen": "^0.5.7",
42
- "eslint": "^9.18.0",
43
- "lint-staged": "^15.4.1",
42
+ "eslint": "^9.19.0",
43
+ "lint-staged": "^15.4.3",
44
44
  "typescript": "^5.7.3",
45
45
  "vite": "^6.0.11",
46
46
  "vite-plugin-dts": "^4.5.0",
47
- "vitest": "^3.0.3"
47
+ "vitest": "^3.0.5"
48
48
  },
49
49
  "lint-staged": {
50
50
  "*.ts": "npm run lint"