buzzcasting-utils 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  export declare function anonymize(name: string): string;
2
2
 
3
3
  export declare enum API {
4
+ CARDS = "cards",
4
5
  CLOUD = "cloud",
5
6
  DASHBOARD = "dashboard",
6
7
  DASHBOARDS = "dashboards",
@@ -140,6 +141,7 @@ export declare enum EVENTS {
140
141
  APP_READY = "appReady",
141
142
  API_UPDATE = "apiUpdate",
142
143
  BACKGROUND_UPDATE = "backgroundUpdate",
144
+ COMPONENT_UPDATE = "componentUpdate",
143
145
  WS_API_REQUEST = "wsApiRequest",
144
146
  WS_API_RESPONSE = "wsApiResponse",
145
147
  WS_API_UPDATE = "wsApiRUpdate",
@@ -155,6 +157,7 @@ export declare enum EVENTS {
155
157
  CSS_STORE = "storeCss",
156
158
  DASHBOARD_LOAD = "loadDashboard",
157
159
  DASHBOARD_STORE = "storeDashboard",
160
+ DASHBOARD_UPDATED = "dashboardUpdated",
158
161
  ERROR = "error",
159
162
  HIDE_MESSAGE = "hideMessage",
160
163
  HIDE_LABELS = "hideLabels",
@@ -169,10 +172,13 @@ export declare enum EVENTS {
169
172
  NEXT_SLIDE = "nextSlide",
170
173
  PREFERENCE_LOAD = "loadPreference",
171
174
  PREFERENCE_STORE = "storePreference",
175
+ PREFEENCE_UPDATED = "preferenceUpdated",
172
176
  PAUSE_PRESENTATION = "pausePresentation",
173
177
  PRESENTATION_READY = "presentationReady",
174
178
  PRESENTATION_LOAD = "loadPresentation",
175
179
  PRESENTATION_STORE = "storePresentation",
180
+ PRESENTATION_UPDATED = "presentationUpdated",
181
+ ROW_COL_UPDATE = "rowcolupdate",
176
182
  SCREENSHOT_TAKE = "takeScreenshot",
177
183
  SCREENSHOT_STORE = "storeScreenshot",
178
184
  SECTION_UPDATE = "sectionUpdate",
@@ -189,6 +195,7 @@ export declare enum EVENTS {
189
195
  SLIDE_STORE = "storeSlide",
190
196
  SLIDE_STORED = "slideStored",
191
197
  SLIDE_TRANSITIONER = "slideTransitioner",
198
+ SLIDE_UPDATED = "slideUpdated",
192
199
  START_TRANSITIONER = "startTransitioner",
193
200
  STORAGE_INIT = "storageInit",
194
201
  SUBSCRIBE = "subscribe",
@@ -199,6 +206,7 @@ export declare enum EVENTS {
199
206
  UPLOAD_COMPLETED = "uploadCompleted",
200
207
  VERSION = "version",
201
208
  WIDGETS_CLEAR = "widgetsClear",
209
+ WIDGET_DID_LOAD = "widgetDidLoad",
202
210
  WIDGET_DID_UPDATE = "widgetDidUpdate",
203
211
  WIDGET_LOAD = "widgetLoad",
204
212
  WIDGET_STORE = "widgetStore",
@@ -1,4 +1,4 @@
1
- var h = /* @__PURE__ */ ((e) => (e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(h || {}), m = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(m || {}), L = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.COLOR_UPDATE = "colorUpdate", e.COMPONENT_INDEX = "componentIndex", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GET = "getSlide", e.SLIDE_GOTO = "slideGoto", e.SLIDE_LOAD = "loadSlide", e.SLIDE_READY = "slideReady", e.SLIDE_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_DID_UPDATE = "widgetDidUpdate", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(L || {}), D = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(D || {}), v = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(v || {});
1
+ var h = /* @__PURE__ */ ((e) => (e.CARDS = "cards", e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e))(h || {}), m = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(m || {}), I = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.COMPONENT_UPDATE = "componentUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_BUILDER_DIALOG = "closeBuilderDialog", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.CLOSE_MODAL = "closeModal", e.COLOR_UPDATE = "colorUpdate", e.COMPONENT_INDEX = "componentIndex", e.CSS_SET = "setCss", e.CSS_STORE = "storeCss", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.DASHBOARD_UPDATED = "dashboardUpdated", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.IMAGE_GET = "getImage", e.IMAGE_SET = "setImage", e.IMAGE_STORED = "imageStored", e.LAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PREFEENCE_UPDATED = "preferenceUpdated", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.PRESENTATION_UPDATED = "presentationUpdated", e.ROW_COL_UPDATE = "rowcolupdate", e.SCREENSHOT_TAKE = "takeScreenshot", e.SCREENSHOT_STORE = "storeScreenshot", e.SECTION_UPDATE = "sectionUpdate", e.SHOW_BUILDER_DIALOG = "showBuilderDialog", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SHOW_MODAL = "showModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GET = "getSlide", e.SLIDE_GOTO = "slideGoto", e.SLIDE_LOAD = "loadSlide", e.SLIDE_READY = "slideReady", e.SLIDE_SAVED = "slideSaved", e.SLIDE_SET = "setSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_STORED = "slideStored", e.SLIDE_TRANSITIONER = "slideTransitioner", e.SLIDE_UPDATED = "slideUpdated", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.UPLOAD_COMPLETED = "uploadCompleted", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_DID_LOAD = "widgetDidLoad", e.WIDGET_DID_UPDATE = "widgetDidUpdate", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(I || {}), D = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(D || {}), P = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(P || {});
2
2
  function J(e) {
3
3
  const t = e.toUpperCase().split(/[\s_-]+/);
4
4
  return t.length > 0 ? (t.forEach((r, n) => {
@@ -39,7 +39,7 @@ function V(e) {
39
39
  const t = {};
40
40
  for (let r = 0; r < e.length; r++) {
41
41
  const n = e[r];
42
- n.name !== "class" && (t[n.name] = P(n.value));
42
+ n.name !== "class" && (t[n.name] = v(n.value));
43
43
  }
44
44
  return t;
45
45
  }
@@ -98,7 +98,7 @@ function te(e, t) {
98
98
  function re(e) {
99
99
  return e.replace(/^\w|[A-Z]|\b\w/g, (t, r) => r === 0 ? t.toLowerCase() : t.toUpperCase()).replace(/\s+/g, "");
100
100
  }
101
- function P(e) {
101
+ function v(e) {
102
102
  return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
103
103
  }
104
104
  const ne = (e) => e.charAt(0).toUpperCase() + e.slice(1);
@@ -159,10 +159,10 @@ function f(e, t) {
159
159
  function y(e, t, r) {
160
160
  return Object.keys(t).sort().reduce(n, e);
161
161
  function n(o, a) {
162
- return I(o, t[a], a, r);
162
+ return L(o, t[a], a, r);
163
163
  }
164
164
  }
165
- function I(e, t, r, n) {
165
+ function L(e, t, r, n) {
166
166
  const o = f(f(f(e, r), M(t)), typeof t);
167
167
  if (t === null)
168
168
  return f(o, "null");
@@ -187,11 +187,11 @@ function M(e) {
187
187
  return Object.prototype.toString.call(e);
188
188
  }
189
189
  function ge(e) {
190
- return k(I(0, e, "", []).toString(16), 8);
190
+ return k(L(0, e, "", []).toString(16), 8);
191
191
  }
192
192
  const be = (e) => {
193
193
  let t = "";
194
- return A(e, {
194
+ return x(e, {
195
195
  start: function(r, n, o) {
196
196
  t += "<" + r;
197
197
  for (let a = 0; a < n.length; a++)
@@ -218,7 +218,7 @@ const be = (e) => {
218
218
  }(), t.getElementsByTagName)
219
219
  for (let i in r) r[i] = t.getElementsByTagName(i)[0];
220
220
  let l = r.body;
221
- return A(e, {
221
+ return x(e, {
222
222
  start: function(i, u, c) {
223
223
  if (r[i]) {
224
224
  l = r[i], c || o.push(l);
@@ -242,15 +242,15 @@ const be = (e) => {
242
242
  let t = {}, r = e.split(",");
243
243
  for (let n = 0; n < r.length; n++) t[r[n]] = !0;
244
244
  return t;
245
- }, _ = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, R = /^<\/([-A-Za-z0-9_]+)[^>]*>/, $ = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, S = g(
245
+ }, w = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, R = /^<\/([-A-Za-z0-9_]+)[^>]*>/, U = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, $ = g(
246
246
  "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
247
247
  ), C = g(
248
248
  "a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
249
- ), U = g(
249
+ ), S = g(
250
250
  "abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"
251
251
  ), G = g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), B = g(
252
252
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
253
- ), T = g("script,style"), A = (e, t) => {
253
+ ), T = g("script,style"), x = (e, t) => {
254
254
  let r, n, o, a = [], l = e;
255
255
  const i = (c, s) => {
256
256
  let d;
@@ -266,7 +266,7 @@ const be = (e) => {
266
266
  };
267
267
  for (; e; ) {
268
268
  if (n = !0, !a.at(-1) || !T[a.at(-1)]) {
269
- if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(_), o && (e = e.substring(o[0].length), o[0].replace(_, u), n = !1)), n) {
269
+ if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(w), o && (e = e.substring(o[0].length), o[0].replace(w, u), n = !1)), n) {
270
270
  r = e.indexOf("<");
271
271
  let c = r < 0 ? e : e.substring(0, r);
272
272
  e = r < 0 ? "" : e.substring(r), t.chars && t.chars(c);
@@ -288,16 +288,16 @@ const be = (e) => {
288
288
  i();
289
289
  function u(c, s, d, p) {
290
290
  if (s = s.toLowerCase(), C[s])
291
- for (; a.at(-1) && U[a.at(-1)]; )
291
+ for (; a.at(-1) && S[a.at(-1)]; )
292
292
  i("", a.at(-1));
293
- if (G[s] && a.at(-1) == s && i("", s), p = S[s] || !!p, p || a.push(s), t.start) {
293
+ if (G[s] && a.at(-1) == s && i("", s), p = $[s] || !!p, p || a.push(s), t.start) {
294
294
  const O = [];
295
- d.replace($, function(Q, x) {
296
- let w = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[x] ? x : "";
295
+ d.replace(U, function(Q, A) {
296
+ let _ = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[A] ? A : "";
297
297
  O.push({
298
- name: x,
299
- value: w,
300
- escaped: w.replace(/(^|[^\\])"/g, '$1\\"')
298
+ name: A,
299
+ value: _,
300
+ escaped: _.replace(/(^|[^\\])"/g, '$1\\"')
301
301
  //"
302
302
  });
303
303
  }), t.start && t.start(s, O, p);
@@ -316,7 +316,7 @@ const he = (e) => {
316
316
  node: "root",
317
317
  child: []
318
318
  };
319
- return A(e, {
319
+ return x(e, {
320
320
  start: function(n, o, a) {
321
321
  let l = {
322
322
  node: "element",
@@ -406,7 +406,7 @@ const he = (e) => {
406
406
  return n !== null ? (n.moveTo(0, 0), n.lineTo(120, 121), n.stroke(), n.getImageData(0, 0, 200, 200).data.join()) : null;
407
407
  };
408
408
  return e(!0) !== e(!1);
409
- }, xe = (e, t = 0, r = !0, n = "en") => {
409
+ }, Ae = (e, t = 0, r = !0, n = "en") => {
410
410
  if (e === void 0) return "";
411
411
  if (e = typeof e == "string" || e instanceof String ? parseFloat(e.replace(/[^0-9.]/g, "")) : e, r === !1)
412
412
  return e.toLocaleString(n);
@@ -424,7 +424,7 @@ const he = (e) => {
424
424
  for (a = o.length - 1; a > 0 && !(e >= o[a].v); a--)
425
425
  ;
426
426
  return (e / o[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + o[a].s;
427
- }, Ae = (e) => Object.keys(e).length === 0, Oe = (e = 0, t) => {
427
+ }, xe = (e) => Object.keys(e).length === 0, Oe = (e = 0, t) => {
428
428
  switch (!0) {
429
429
  case e > 3:
430
430
  console.debug(...t);
@@ -439,12 +439,12 @@ const he = (e) => {
439
439
  console.error(...t);
440
440
  break;
441
441
  }
442
- }, we = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), _e = (e) => e.replace(/\>\</g, `>
443
- <`), Re = (e) => e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!"), Ie = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
442
+ }, _e = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), we = (e) => e.replace(/\>\</g, `>
443
+ <`), Re = (e) => e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!"), Le = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
444
444
  `).replace(/\}/g, `}
445
445
  `).replace(/\;/g, `;
446
446
  `);
447
- function Le(e, t) {
447
+ function Ie(e, t) {
448
448
  const r = [
449
449
  { value: 1, symbol: "" },
450
450
  { value: 1e3, symbol: "K" },
@@ -459,11 +459,11 @@ function Le(e, t) {
459
459
  ;
460
460
  return (e / r[o].value).toFixed(t).replace(n, "$1") + r[o].symbol;
461
461
  }
462
- function ve(e) {
462
+ function Pe(e) {
463
463
  const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
464
464
  return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
465
465
  }
466
- const Pe = (e) => new Proxy(new URLSearchParams(window.location.search), {
466
+ const ve = (e) => new Proxy(new URLSearchParams(window.location.search), {
467
467
  // @ts-ignore
468
468
  get: (r, n) => r.get(n)
469
469
  })[e];
@@ -482,9 +482,11 @@ function ke(e) {
482
482
  }
483
483
  }
484
484
  function ye(e) {
485
- const t = window.BuzzCasting.getOptions().suspended ?? !1;
486
- return e.forEach((r) => {
487
- if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = r.content?.replace(
485
+ const t = e.filter(
486
+ (r) => r !== void 0
487
+ );
488
+ return t.forEach((r) => {
489
+ if (window.BuzzCasting.getOptions().suspended === !0 ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = r.content?.replace(
488
490
  /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
489
491
  ""
490
492
  ) || "", r.sender !== null)
@@ -519,7 +521,7 @@ function ye(e) {
519
521
  const n = new URL(r.link);
520
522
  r.sender.title = n.hostname.replace("www.", "");
521
523
  }
522
- }), e;
524
+ }), t;
523
525
  }
524
526
  function Me(e, t, r, n) {
525
527
  e.stopPropagation(), t.showModal({
@@ -527,7 +529,7 @@ function Me(e, t, r, n) {
527
529
  props: { data: r, options: n }
528
530
  });
529
531
  }
530
- function $e(e) {
532
+ function Ue(e) {
531
533
  const t = [...e];
532
534
  for (let r = t.length - 1; r > 0; r--) {
533
535
  const n = Math.floor(Math.random() * (r + 1));
@@ -535,7 +537,7 @@ function $e(e) {
535
537
  }
536
538
  return t;
537
539
  }
538
- function Se() {
540
+ function $e() {
539
541
  let e = "";
540
542
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
541
543
  for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
@@ -554,7 +556,7 @@ const Ce = (e) => {
554
556
  }
555
557
  }, K = (e = 6) => Math.random().toString(36).substring(2, e + 2), Y = (e, t = []) => !t.find(function(n) {
556
558
  return n === e;
557
- }), Ue = (e, t = []) => {
559
+ }), Se = (e, t = []) => {
558
560
  let n = 0, o = "";
559
561
  for (; o == "" && n < 100; )
560
562
  o = K(e), Y(o, t) || (o = "", n++);
@@ -601,13 +603,13 @@ var X = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "P
601
603
  export {
602
604
  h as API,
603
605
  m as CSS,
604
- L as EVENTS,
605
- A as HTMLParser,
606
+ I as EVENTS,
607
+ x as HTMLParser,
606
608
  me as HTMLtoDOM,
607
609
  be as HTMLtoXML,
608
610
  D as MODERATION,
609
611
  ce as RGBAchangeA,
610
- v as STORAGE,
612
+ P as STORAGE,
611
613
  j as ShapeType,
612
614
  X as Type,
613
615
  J as anonymize,
@@ -615,7 +617,7 @@ export {
615
617
  q as attrs,
616
618
  ee as awaitElement,
617
619
  te as brandLogo,
618
- P as camelCase,
620
+ v as camelCase,
619
621
  V as camelCasedProps,
620
622
  re as camelize,
621
623
  ne as capitalizeFirstLetter,
@@ -626,21 +628,21 @@ export {
626
628
  fe as formatContent,
627
629
  pe as getGuid,
628
630
  Te as getKey,
629
- ve as getParameterByName,
630
- Pe as getQueryParam,
631
+ Pe as getParameterByName,
632
+ ve as getQueryParam,
631
633
  De as hasHWA,
632
634
  ge as hashSum,
633
635
  he as html2json,
634
- xe as intToString,
635
- Ae as isEmpty,
636
+ Ae as intToString,
637
+ xe as isEmpty,
636
638
  F as json2html,
637
639
  Oe as log,
638
- Ie as maxifyCss,
639
- _e as maxifyHtml,
640
+ Le as maxifyCss,
641
+ we as maxifyHtml,
640
642
  Re as minifyCss,
641
- we as minifyHtml,
643
+ _e as minifyHtml,
642
644
  We as moderation,
643
- Le as numberFormatter,
645
+ Ie as numberFormatter,
644
646
  ae as randomColor,
645
647
  le as randomRGB,
646
648
  se as randomRGBA,
@@ -649,10 +651,10 @@ export {
649
651
  ke as rtl,
650
652
  ye as sanitize,
651
653
  Me as showModal,
652
- $e as shuffleMessages,
653
- Se as stringGen,
654
+ Ue as shuffleMessages,
655
+ $e as stringGen,
654
656
  Ce as typeCss,
655
- Ue as uniq,
657
+ Se as uniq,
656
658
  de as unique,
657
659
  Ge as upDownColor,
658
660
  He as widgetParams,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.8.0",
4
+ "version": "1.8.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",