buzzcasting-utils 1.9.3 → 1.9.5
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.
- package/dist/buzzcasting-utils.esm.js +162 -163
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var D = /* @__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))(D || {}), g = /* @__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:black;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))(g || {}), E = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.BACKGROUND_UPDATE = "backgroundUpdate", e.BUILDER_PREVIEW = "builderPreview", e.COMPONENT_UPDATE = "componentUpdate", 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.PREFERENCE_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.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e))(E || {}), A = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(A || {}), P = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(P || {});
|
|
2
|
+
function N(e) {
|
|
3
3
|
const t = e.toUpperCase().split(/[\s_-]+/);
|
|
4
4
|
return t.length > 0 ? (t.forEach((r, n) => {
|
|
5
5
|
t[n] = `${r.charAt(0)}.`;
|
|
6
6
|
}), t.join(" ")) : "";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function V(e) {
|
|
9
9
|
let t = "", r = "", n = {
|
|
10
10
|
backgroundImage: ""
|
|
11
11
|
};
|
|
@@ -19,7 +19,7 @@ function N(e) {
|
|
|
19
19
|
video: t
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ee(e) {
|
|
23
23
|
const t = {};
|
|
24
24
|
for (let r = 0; r < e.length; r++) {
|
|
25
25
|
const n = e.item(r);
|
|
@@ -27,7 +27,7 @@ function V(e) {
|
|
|
27
27
|
}
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function te(e) {
|
|
31
31
|
const t = {};
|
|
32
32
|
for (let r = 0; r < e.length; r++) {
|
|
33
33
|
const n = e[r];
|
|
@@ -35,15 +35,15 @@ function ee(e) {
|
|
|
35
35
|
}
|
|
36
36
|
return t;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function re(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] =
|
|
42
|
+
n.name !== "class" && (t[n.name] = I(n.value));
|
|
43
43
|
}
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const ne = (e) => new Promise((t) => {
|
|
47
47
|
if (document.querySelector(e))
|
|
48
48
|
return t(document.querySelector(e));
|
|
49
49
|
const r = new MutationObserver((n) => {
|
|
@@ -51,7 +51,7 @@ const re = (e) => new Promise((t) => {
|
|
|
51
51
|
});
|
|
52
52
|
r.observe(document.body, { childList: !0, subtree: !0 });
|
|
53
53
|
});
|
|
54
|
-
function
|
|
54
|
+
function ae(e, t) {
|
|
55
55
|
switch (e) {
|
|
56
56
|
case "ax":
|
|
57
57
|
return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
|
|
@@ -95,61 +95,61 @@ function ne(e, t) {
|
|
|
95
95
|
return "";
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function oe(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
|
|
101
|
+
function I(e) {
|
|
102
102
|
return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
104
|
+
const se = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), ie = (e) => e.charAt(0).toUpperCase() + e.slice(1);
|
|
105
|
+
function le(e) {
|
|
106
106
|
const t = document.createRange();
|
|
107
107
|
t.selectNodeContents(e), t.deleteContents();
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const ce = () => Math.floor(Math.random() * 16777215).toString(16), de = () => {
|
|
110
110
|
var e = Math.round, t = Math.random, r = 255;
|
|
111
111
|
return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + "," + t().toFixed(1) + ")";
|
|
112
|
-
},
|
|
112
|
+
}, ue = () => {
|
|
113
113
|
var e = Math.round, t = Math.random, r = 255;
|
|
114
114
|
return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + ", 0)";
|
|
115
|
-
},
|
|
115
|
+
}, fe = () => {
|
|
116
116
|
var e = Math.round, t = Math.random, r = 255;
|
|
117
117
|
return "rgba(" + e(t() * r) + "," + e(t() * r) + "," + e(t() * r) + ")";
|
|
118
|
-
},
|
|
118
|
+
}, pe = (e, t) => {
|
|
119
119
|
e = e.substring(e.indexOf("(") + 1, e.indexOf(")"));
|
|
120
120
|
let r = e.split(",");
|
|
121
121
|
return r = r.map((n) => parseFloat(n.trim()).toString()), e = "background-color: rgba(" + parseInt(r[0]) + "," + parseInt(r[1]) + "," + parseInt(r[2]) + "," + t + ");", e;
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function k(e) {
|
|
124
124
|
e.reduce(
|
|
125
125
|
(t, r) => Object.keys(r).reduce(
|
|
126
126
|
(n, a) => ({
|
|
127
127
|
...n,
|
|
128
|
-
[a]: a in t && typeof t[a] == "object" && t[a] !== null && typeof r[a] == "object" && r[a] !== null ?
|
|
128
|
+
[a]: a in t && typeof t[a] == "object" && t[a] !== null && typeof r[a] == "object" && r[a] !== null ? k([t[a], r[a]]) : r[a]
|
|
129
129
|
}),
|
|
130
130
|
t
|
|
131
131
|
),
|
|
132
132
|
{}
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
135
|
+
const ge = (e) => [...new Set(e)], be = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
136
|
+
function me(e, t = "font-bold") {
|
|
137
137
|
return `${e?.title !== null ? `<div class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
|
|
138
138
|
`).replace(/\n/g, "<br/>") : ""}`;
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const y = (e, t = {}, r = "") => {
|
|
141
141
|
for (let n in e) {
|
|
142
142
|
let a = r ? `${r}-${n}` : n;
|
|
143
|
-
typeof e[n] == "object" && !Array.isArray(e[n]) ?
|
|
143
|
+
typeof e[n] == "object" && !Array.isArray(e[n]) ? y(e[n], t, a) : e[n] !== "" && (t[a] = e[n]);
|
|
144
144
|
}
|
|
145
145
|
return t;
|
|
146
|
-
},
|
|
146
|
+
}, he = () => [m(2), m(1), m(1), m(1), m(3)].join("-"), m = (e) => {
|
|
147
147
|
let t = "";
|
|
148
148
|
for (let r = 0; r < e; r++)
|
|
149
149
|
t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
150
150
|
return t;
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function M(e, t) {
|
|
153
153
|
for (; e.length < t; )
|
|
154
154
|
e = `0${e}`;
|
|
155
155
|
return e;
|
|
@@ -162,14 +162,14 @@ function f(e, t) {
|
|
|
162
162
|
n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
|
|
163
163
|
return e < 0 ? e * -2 : e;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function U(e, t, r) {
|
|
166
166
|
return Object.keys(t).sort().reduce(n, e);
|
|
167
167
|
function n(a, o) {
|
|
168
|
-
return
|
|
168
|
+
return v(a, t[o], o, r);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const a = f(f(f(e, r),
|
|
171
|
+
function v(e, t, r, n) {
|
|
172
|
+
const a = f(f(f(e, r), $(t)), typeof t);
|
|
173
173
|
if (t === null)
|
|
174
174
|
return f(a, "null");
|
|
175
175
|
if (t === void 0)
|
|
@@ -178,7 +178,7 @@ function R(e, t, r, n) {
|
|
|
178
178
|
if (n.includes(t))
|
|
179
179
|
return f(a, `[Circular]${r}`);
|
|
180
180
|
n.push(t);
|
|
181
|
-
const o =
|
|
181
|
+
const o = U(a, t, n);
|
|
182
182
|
if (!("valueOf" in t) || typeof t.valueOf != "function")
|
|
183
183
|
return o;
|
|
184
184
|
try {
|
|
@@ -189,15 +189,15 @@ function R(e, t, r, n) {
|
|
|
189
189
|
}
|
|
190
190
|
return f(a, t.toString());
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function $(e) {
|
|
193
193
|
return Object.prototype.toString.call(e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return
|
|
195
|
+
function De(e) {
|
|
196
|
+
return M(v(0, e, "", []).toString(16), 8);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const Ae = (e) => {
|
|
199
199
|
let t = "";
|
|
200
|
-
return
|
|
200
|
+
return x(e, {
|
|
201
201
|
start: function(r, n, a) {
|
|
202
202
|
t += "<" + r;
|
|
203
203
|
for (let o = 0; o < n.length; o++)
|
|
@@ -214,7 +214,7 @@ const De = (e) => {
|
|
|
214
214
|
t += `<!-- ${r} -->`;
|
|
215
215
|
}
|
|
216
216
|
}), t;
|
|
217
|
-
},
|
|
217
|
+
}, Oe = (e, t) => {
|
|
218
218
|
const r = b("html,head,body,title"), n = { link: "head", base: "head" };
|
|
219
219
|
t ? t = t.ownerDocument || t.getOwnerDocument && t.getOwnerDocument() || t : typeof t < "u" ? t = new Document() : typeof document < "u" && document.implementation && document.implementation.createDocument && (t = document.implementation.createDocument("", "", null));
|
|
220
220
|
const a = [];
|
|
@@ -224,7 +224,7 @@ const De = (e) => {
|
|
|
224
224
|
}(), t.getElementsByTagName)
|
|
225
225
|
for (let s in r) r[s] = t.getElementsByTagName(s)[0];
|
|
226
226
|
let l = r.body;
|
|
227
|
-
return
|
|
227
|
+
return x(e, {
|
|
228
228
|
start: function(s, u, c) {
|
|
229
229
|
if (r[s]) {
|
|
230
230
|
l = r[s], c || a.push(l);
|
|
@@ -248,15 +248,15 @@ const De = (e) => {
|
|
|
248
248
|
let t = {}, r = e.split(",");
|
|
249
249
|
for (let n = 0; n < r.length; n++) t[r[n]] = !0;
|
|
250
250
|
return t;
|
|
251
|
-
},
|
|
251
|
+
}, L = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, R = /^<\/([-A-Za-z0-9_]+)[^>]*>/, S = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, C = b(
|
|
252
252
|
"area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
|
|
253
|
-
), C = b(
|
|
254
|
-
"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"
|
|
255
253
|
), G = b(
|
|
254
|
+
"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"
|
|
255
|
+
), B = b(
|
|
256
256
|
"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"
|
|
257
|
-
),
|
|
257
|
+
), T = b("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), H = b(
|
|
258
258
|
"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
|
|
259
|
-
),
|
|
259
|
+
), W = b("script,style"), x = (e, t) => {
|
|
260
260
|
let r, n, a, o = [], l = e;
|
|
261
261
|
const s = (c, i) => {
|
|
262
262
|
let d;
|
|
@@ -271,8 +271,8 @@ const De = (e) => {
|
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
for (; e; ) {
|
|
274
|
-
if (n = !0, !o.at(-1) || !
|
|
275
|
-
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 ? (a = e.match(
|
|
274
|
+
if (n = !0, !o.at(-1) || !W[o.at(-1)]) {
|
|
275
|
+
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 ? (a = e.match(R), a && (e = e.substring(a[0].length), a[0].replace(R, s), n = !1)) : e.indexOf("<") == 0 && (a = e.match(L), a && (e = e.substring(a[0].length), a[0].replace(L, u), n = !1)), n) {
|
|
276
276
|
r = e.indexOf("<");
|
|
277
277
|
let c = r < 0 ? e : e.substring(0, r);
|
|
278
278
|
e = r < 0 ? "" : e.substring(r), t.chars && t.chars(c);
|
|
@@ -293,36 +293,36 @@ const De = (e) => {
|
|
|
293
293
|
}
|
|
294
294
|
s();
|
|
295
295
|
function u(c, i, d, p) {
|
|
296
|
-
if (i = i.toLowerCase(),
|
|
297
|
-
for (; o.at(-1) &&
|
|
296
|
+
if (i = i.toLowerCase(), G[i])
|
|
297
|
+
for (; o.at(-1) && B[o.at(-1)]; )
|
|
298
298
|
s("", o.at(-1));
|
|
299
|
-
if (
|
|
300
|
-
const
|
|
301
|
-
d.replace(
|
|
302
|
-
let
|
|
303
|
-
|
|
304
|
-
name:
|
|
305
|
-
value:
|
|
306
|
-
escaped:
|
|
299
|
+
if (T[i] && o.at(-1) == i && s("", i), p = C[i] || !!p, p || o.push(i), t.start) {
|
|
300
|
+
const _ = [];
|
|
301
|
+
d.replace(S, function(q, O) {
|
|
302
|
+
let w = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : H[O] ? O : "";
|
|
303
|
+
_.push({
|
|
304
|
+
name: O,
|
|
305
|
+
value: w,
|
|
306
|
+
escaped: w.replace(/(^|[^\\])"/g, '$1\\"')
|
|
307
307
|
//"
|
|
308
308
|
});
|
|
309
|
-
}), t.start && t.start(i,
|
|
309
|
+
}), t.start && t.start(i, _, p);
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
function
|
|
313
|
+
function F(e) {
|
|
314
314
|
return `"${e}"`;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function K(e) {
|
|
317
317
|
return e.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*\>\n/, "").replace(/<!DOCTYPE.*\>\n/, "");
|
|
318
318
|
}
|
|
319
|
-
const
|
|
320
|
-
e =
|
|
319
|
+
const xe = (e) => {
|
|
320
|
+
e = K(e);
|
|
321
321
|
const t = [], r = {
|
|
322
322
|
node: "root",
|
|
323
323
|
child: []
|
|
324
324
|
};
|
|
325
|
-
return
|
|
325
|
+
return x(e, {
|
|
326
326
|
start: function(n, a, o) {
|
|
327
327
|
let l = {
|
|
328
328
|
node: "element",
|
|
@@ -368,7 +368,7 @@ const we = (e) => {
|
|
|
368
368
|
o.child === void 0 && (o.child = []), o.child.push(a);
|
|
369
369
|
}
|
|
370
370
|
}), r;
|
|
371
|
-
},
|
|
371
|
+
}, Y = (e) => {
|
|
372
372
|
const t = [
|
|
373
373
|
"area",
|
|
374
374
|
"base",
|
|
@@ -387,12 +387,12 @@ const we = (e) => {
|
|
|
387
387
|
];
|
|
388
388
|
let r = "";
|
|
389
389
|
e.child && (r = e.child.map(function(a) {
|
|
390
|
-
return
|
|
390
|
+
return Y(a);
|
|
391
391
|
}).join(""));
|
|
392
392
|
let n = "";
|
|
393
393
|
if (e.attr && (n = Object.keys(e.attr).map(function(a) {
|
|
394
394
|
let o = e.attr[a];
|
|
395
|
-
return Array.isArray(o) && (o = o.join(" ")), `${a}=${
|
|
395
|
+
return Array.isArray(o) && (o = o.join(" ")), `${a}=${F(o)}`;
|
|
396
396
|
}).join(" "), n !== "" && (n = ` ${n}`)), e.node === "element") {
|
|
397
397
|
let a = e.tag;
|
|
398
398
|
if (t.indexOf(a) > -1)
|
|
@@ -406,13 +406,13 @@ const we = (e) => {
|
|
|
406
406
|
return `<!-- ${e.text} -->`;
|
|
407
407
|
if (e.node === "root")
|
|
408
408
|
return r;
|
|
409
|
-
},
|
|
409
|
+
}, _e = () => {
|
|
410
410
|
const e = (t = !1) => {
|
|
411
411
|
const n = document.createElement("canvas").getContext("2d", { willReadFrequently: t });
|
|
412
412
|
return n !== null ? (n.moveTo(0, 0), n.lineTo(120, 121), n.stroke(), n.getImageData(0, 0, 200, 200).data.join()) : null;
|
|
413
413
|
};
|
|
414
414
|
return e(!0) !== e(!1);
|
|
415
|
-
},
|
|
415
|
+
}, we = (e, t = 0, r = !0, n = "en") => {
|
|
416
416
|
if (e === void 0) return "";
|
|
417
417
|
if (e = typeof e == "string" || e instanceof String ? parseFloat(e.replace(/[^0-9.]/g, "")) : e, r === !1)
|
|
418
418
|
return e.toLocaleString(n);
|
|
@@ -430,7 +430,7 @@ const we = (e) => {
|
|
|
430
430
|
for (o = a.length - 1; o > 0 && !(e >= a[o].v); o--)
|
|
431
431
|
;
|
|
432
432
|
return (e / a[o].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + a[o].s;
|
|
433
|
-
},
|
|
433
|
+
}, Le = (e) => Object.keys(e).length === 0, Z = new Blob(
|
|
434
434
|
[
|
|
435
435
|
`const LOG_LEVELS = new Set([1,2,3,4])
|
|
436
436
|
self.onmessage = function(e) {
|
|
@@ -472,25 +472,24 @@ const we = (e) => {
|
|
|
472
472
|
}`
|
|
473
473
|
],
|
|
474
474
|
{ type: "text/javascript" }
|
|
475
|
-
)
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
list: () => window.__bc.logger.postMessage({
|
|
475
|
+
), h = new Worker(window.URL.createObjectURL(Z), {
|
|
476
|
+
name: "logger"
|
|
477
|
+
}), Re = async (e = 0, t) => {
|
|
478
|
+
h.postMessage({ action: "log", level: e, message: t });
|
|
479
|
+
}, ve = {
|
|
480
|
+
add: (e) => h.postMessage({ action: "add", level: e }),
|
|
481
|
+
clear: () => h.postMessage({ action: "delete" }),
|
|
482
|
+
delete: (e) => h.postMessage({ action: "delete", level: e }),
|
|
483
|
+
list: () => h.postMessage({
|
|
485
484
|
action: "list",
|
|
486
485
|
message: ["%capp%c %clogging", g.APP, g.NONE, g.OK]
|
|
487
486
|
})
|
|
488
|
-
},
|
|
489
|
-
<`),
|
|
487
|
+
}, Ee = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), Pe = (e) => e.replace(/\>\</g, `>
|
|
488
|
+
<`), Ie = (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, "!"), ke = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
|
|
490
489
|
`).replace(/\}/g, `}
|
|
491
490
|
`).replace(/\;/g, `;
|
|
492
491
|
`);
|
|
493
|
-
function
|
|
492
|
+
function ye(e, t) {
|
|
494
493
|
const r = [
|
|
495
494
|
{ value: 1, symbol: "" },
|
|
496
495
|
{ value: 1e3, symbol: "K" },
|
|
@@ -505,18 +504,18 @@ function ke(e, t) {
|
|
|
505
504
|
;
|
|
506
505
|
return (e / r[a].value).toFixed(t).replace(n, "$1") + r[a].symbol;
|
|
507
506
|
}
|
|
508
|
-
function
|
|
507
|
+
function Me(e) {
|
|
509
508
|
const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
|
|
510
509
|
return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
|
|
511
510
|
}
|
|
512
|
-
const
|
|
511
|
+
const Ue = (e) => new Proxy(new URLSearchParams(window.location.search), {
|
|
513
512
|
// @ts-ignore
|
|
514
513
|
get: (r, n) => r.get(n)
|
|
515
514
|
})[e];
|
|
516
|
-
function
|
|
515
|
+
function $e(e) {
|
|
517
516
|
return e[Math.floor(Math.random() * e.length)];
|
|
518
517
|
}
|
|
519
|
-
function
|
|
518
|
+
function Se(e) {
|
|
520
519
|
switch (e.language) {
|
|
521
520
|
case "ar":
|
|
522
521
|
return {
|
|
@@ -527,7 +526,7 @@ function $e(e) {
|
|
|
527
526
|
return {};
|
|
528
527
|
}
|
|
529
528
|
}
|
|
530
|
-
function
|
|
529
|
+
function Ce(e) {
|
|
531
530
|
const t = e.filter(
|
|
532
531
|
(r) => r !== void 0
|
|
533
532
|
);
|
|
@@ -569,13 +568,13 @@ function Se(e) {
|
|
|
569
568
|
}
|
|
570
569
|
}), t;
|
|
571
570
|
}
|
|
572
|
-
function
|
|
571
|
+
function Ge(e, t, r, n) {
|
|
573
572
|
e.stopPropagation(), t.showModal({
|
|
574
573
|
showComponent: "card-modal",
|
|
575
574
|
props: { data: r, options: n }
|
|
576
575
|
});
|
|
577
576
|
}
|
|
578
|
-
function
|
|
577
|
+
function Be(e) {
|
|
579
578
|
const t = [...e];
|
|
580
579
|
for (let r = t.length - 1; r > 0; r--) {
|
|
581
580
|
const n = Math.floor(Math.random() * (r + 1));
|
|
@@ -583,31 +582,31 @@ function Ge(e) {
|
|
|
583
582
|
}
|
|
584
583
|
return t;
|
|
585
584
|
}
|
|
586
|
-
function
|
|
585
|
+
function Te() {
|
|
587
586
|
let e = "";
|
|
588
587
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
589
588
|
for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
|
|
590
589
|
return e;
|
|
591
590
|
}
|
|
592
|
-
const
|
|
591
|
+
const He = (e) => {
|
|
593
592
|
switch (e?.type) {
|
|
594
|
-
case
|
|
593
|
+
case D.MESSAGES:
|
|
595
594
|
return g.MESSAGES;
|
|
596
|
-
case
|
|
595
|
+
case D.SERIES:
|
|
597
596
|
return g.SERIES;
|
|
598
|
-
case
|
|
597
|
+
case D.CLOUD:
|
|
599
598
|
return g.CLOUD;
|
|
600
599
|
default:
|
|
601
600
|
return g.NO_UPDATES;
|
|
602
601
|
}
|
|
603
|
-
},
|
|
602
|
+
}, X = (e = 6) => Math.random().toString(36).substring(2, e + 2), Q = (e, t = []) => !t.find(function(n) {
|
|
604
603
|
return n === e;
|
|
605
|
-
}),
|
|
604
|
+
}), We = (e, t = []) => {
|
|
606
605
|
let n = 0, a = "";
|
|
607
606
|
for (; a == "" && n < 100; )
|
|
608
|
-
a =
|
|
607
|
+
a = X(e), Q(a, t) || (a = "", n++);
|
|
609
608
|
return a;
|
|
610
|
-
},
|
|
609
|
+
}, Fe = (e) => {
|
|
611
610
|
switch (!0) {
|
|
612
611
|
case e < 0:
|
|
613
612
|
return "text-down text-xs";
|
|
@@ -616,28 +615,28 @@ const Te = (e) => {
|
|
|
616
615
|
default:
|
|
617
616
|
return "text-white text-xs";
|
|
618
617
|
}
|
|
619
|
-
},
|
|
620
|
-
function
|
|
618
|
+
}, Ke = (e, t, r) => Promise.race([e, j(t, r)]), j = (e, t) => new Promise((r, n) => setTimeout(() => t === void 0 ? r("ok") : n(t), e));
|
|
619
|
+
function Ye(e) {
|
|
621
620
|
let t = `${e.type}.${e.topics}`;
|
|
622
621
|
return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
|
|
623
622
|
}
|
|
624
|
-
function
|
|
623
|
+
function Ze(e) {
|
|
625
624
|
if (e.widget === void 0) {
|
|
626
625
|
const t = e.topics?.split("-");
|
|
627
626
|
t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
|
|
628
627
|
}
|
|
629
628
|
return e;
|
|
630
629
|
}
|
|
631
|
-
function
|
|
630
|
+
function Xe(e, t) {
|
|
632
631
|
let r, n, a, o, l;
|
|
633
632
|
switch (e.moderation) {
|
|
634
|
-
case
|
|
633
|
+
case A.BEFORE:
|
|
635
634
|
r = /* @__PURE__ */ new Date(), n = e.beforeTime?.split(":"), a = Number.parseInt(n ? n[0] : "00"), o = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(a, o, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
|
|
636
635
|
break;
|
|
637
|
-
case
|
|
636
|
+
case A.DELAYED:
|
|
638
637
|
e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
|
|
639
638
|
break;
|
|
640
|
-
case
|
|
639
|
+
case A.APPROVED:
|
|
641
640
|
t.approved = "1";
|
|
642
641
|
break;
|
|
643
642
|
default:
|
|
@@ -645,67 +644,67 @@ function Ze(e, t) {
|
|
|
645
644
|
}
|
|
646
645
|
return t;
|
|
647
646
|
}
|
|
648
|
-
var
|
|
647
|
+
var J = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(J || {}), z = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(z || {});
|
|
649
648
|
export {
|
|
650
|
-
|
|
649
|
+
D as API,
|
|
651
650
|
g as CSS,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
651
|
+
E as EVENTS,
|
|
652
|
+
J as GeoType,
|
|
653
|
+
x as HTMLParser,
|
|
654
|
+
Oe as HTMLtoDOM,
|
|
655
|
+
Ae as HTMLtoXML,
|
|
656
|
+
A as MODERATION,
|
|
657
|
+
pe as RGBAchangeA,
|
|
658
|
+
P as STORAGE,
|
|
659
|
+
z as ShapeType,
|
|
660
|
+
N as anonymize,
|
|
661
|
+
V as attachedMedia,
|
|
662
|
+
ee as attrs,
|
|
663
|
+
ne as awaitElement,
|
|
664
|
+
ae as brandLogo,
|
|
665
|
+
I as camelCase,
|
|
666
|
+
re as camelCasedProps,
|
|
667
|
+
se as camelToHyphen,
|
|
668
|
+
oe as camelize,
|
|
669
|
+
ie as capitalizeFirstLetter,
|
|
670
|
+
le as clearContents,
|
|
671
|
+
k as deepMerge,
|
|
672
|
+
be as escape,
|
|
673
|
+
te as filterAttributes,
|
|
674
|
+
y as flatten,
|
|
675
|
+
me as formatContent,
|
|
676
|
+
he as getGuid,
|
|
677
|
+
Ye as getKey,
|
|
678
|
+
Me as getParameterByName,
|
|
679
|
+
Ue as getQueryParam,
|
|
680
|
+
_e as hasHWA,
|
|
681
|
+
De as hashSum,
|
|
682
|
+
xe as html2json,
|
|
683
|
+
we as intToString,
|
|
684
|
+
Le as isEmpty,
|
|
685
|
+
Y as json2html,
|
|
686
|
+
Re as log,
|
|
687
|
+
ve as logging,
|
|
688
|
+
ke as maxifyCss,
|
|
689
|
+
Pe as maxifyHtml,
|
|
690
|
+
Ie as minifyCss,
|
|
691
|
+
Ee as minifyHtml,
|
|
692
|
+
Xe as moderation,
|
|
693
|
+
ye as numberFormatter,
|
|
694
|
+
ce as randomColor,
|
|
695
|
+
fe as randomRGB,
|
|
696
|
+
ue as randomRGBA,
|
|
697
|
+
de as randomRGBAfull,
|
|
698
|
+
$e as randomValue,
|
|
699
|
+
Se as rtl,
|
|
700
|
+
Ce as sanitize,
|
|
701
|
+
Ge as showModal,
|
|
702
|
+
Be as shuffleMessages,
|
|
703
|
+
Te as stringGen,
|
|
704
|
+
He as typeCss,
|
|
705
|
+
We as uniq,
|
|
706
|
+
ge as unique,
|
|
707
|
+
Fe as upDownColor,
|
|
708
|
+
Ze as widgetParams,
|
|
709
|
+
Ke as wrapPromise
|
|
711
710
|
};
|