@telia-ace/widget-utilities 1.0.3 → 1.0.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.
package/dist/index.js
CHANGED
|
@@ -1,114 +1,89 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
for (var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var T = Object.getOwnPropertySymbols;
|
|
3
|
+
var W = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var M = (o, t, e) => t in o ? z(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
5
|
+
var E = (o, t) => {
|
|
6
|
+
var e = {};
|
|
7
|
+
for (var r in o)
|
|
8
|
+
W.call(o, r) && t.indexOf(r) < 0 && (e[r] = o[r]);
|
|
9
|
+
if (o != null && T)
|
|
10
|
+
for (var r of T(o))
|
|
11
|
+
t.indexOf(r) < 0 && I.call(o, r) && (e[r] = o[r]);
|
|
12
|
+
return e;
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
return classArray;
|
|
14
|
+
var a = (o, t, e) => (M(o, typeof t != "symbol" ? t + "" : t, e), e);
|
|
15
|
+
function V(o) {
|
|
16
|
+
const t = [];
|
|
17
|
+
return o.forEach((e) => {
|
|
18
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
19
|
+
}), t;
|
|
24
20
|
}
|
|
25
|
-
function
|
|
26
|
-
const
|
|
27
|
-
return
|
|
21
|
+
function w(o = "", t = "") {
|
|
22
|
+
const e = o.split(" ").concat(t.split(" "));
|
|
23
|
+
return V(e).join(" ").trim();
|
|
28
24
|
}
|
|
29
|
-
function
|
|
30
|
-
if (Boolean(
|
|
31
|
-
if (typeof
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
classes.forEach((c) => className = append(className, c));
|
|
37
|
-
return className;
|
|
25
|
+
function Y(o, t) {
|
|
26
|
+
if (Boolean(o)) {
|
|
27
|
+
if (typeof t == "string")
|
|
28
|
+
return t;
|
|
29
|
+
if (Array.isArray(t)) {
|
|
30
|
+
let e = "";
|
|
31
|
+
return t.forEach((r) => e = w(e, r)), e;
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
|
-
function
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
} else
|
|
50
|
-
;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return className;
|
|
35
|
+
function Q(...o) {
|
|
36
|
+
let t = "";
|
|
37
|
+
return o.length && o.forEach((e) => {
|
|
38
|
+
typeof e == "string" ? t = w(t, e) : Array.isArray(e) ? t = w(t, Y(...e)) : typeof e != "undefined" && e !== null && process.env.NODE_ENV !== "production" && p.warn(
|
|
39
|
+
"appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",
|
|
40
|
+
...o
|
|
41
|
+
);
|
|
42
|
+
}), t;
|
|
54
43
|
}
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
acc = fn2(acc);
|
|
66
|
-
});
|
|
67
|
-
queue = [];
|
|
68
|
-
resolve(acc);
|
|
69
|
-
}, delay);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
44
|
+
const H = (o, t) => {
|
|
45
|
+
let e, r = [];
|
|
46
|
+
return (i) => (clearTimeout(e), new Promise((n, c) => {
|
|
47
|
+
r.push([i, n, c]), e = setTimeout(() => {
|
|
48
|
+
let f = t();
|
|
49
|
+
r.forEach(([u, g, d]) => {
|
|
50
|
+
f = u(f);
|
|
51
|
+
}), r = [], n(f);
|
|
52
|
+
}, o);
|
|
53
|
+
}));
|
|
72
54
|
};
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
if (typeof
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
} else if (p !== null && typeof p === "object") {
|
|
88
|
-
camilizedObject[camilizedProp] = camilize(p);
|
|
89
|
-
} else {
|
|
90
|
-
camilizedObject[camilizedProp] = p;
|
|
91
|
-
}
|
|
55
|
+
function j(o) {
|
|
56
|
+
const t = {};
|
|
57
|
+
if (typeof o == "number" || typeof o == "string")
|
|
58
|
+
return o;
|
|
59
|
+
for (const e in o)
|
|
60
|
+
if (o.hasOwnProperty(e)) {
|
|
61
|
+
const r = o[e], i = e.substring(0, 1).toLowerCase() + e.substring(1);
|
|
62
|
+
if (Object.prototype.toString.call(r) === "[object Array]") {
|
|
63
|
+
t[i] = [];
|
|
64
|
+
for (let n = 0, c = r.length; n < c; n++)
|
|
65
|
+
t[i].push(j(r[n]));
|
|
66
|
+
} else
|
|
67
|
+
r !== null && typeof r == "object" ? t[i] = j(r) : t[i] = r;
|
|
92
68
|
}
|
|
93
|
-
|
|
94
|
-
return camilizedObject;
|
|
69
|
+
return t;
|
|
95
70
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
phrase = "",
|
|
99
|
-
category,
|
|
100
|
-
guideCategory,
|
|
101
|
-
contactCategory,
|
|
102
|
-
take,
|
|
103
|
-
connectionKey,
|
|
104
|
-
accordion,
|
|
105
|
-
id,
|
|
106
|
-
uriName,
|
|
107
|
-
sorting,
|
|
108
|
-
tag,
|
|
109
|
-
tagId,
|
|
110
|
-
tagTitle
|
|
111
|
-
} =
|
|
71
|
+
function N(o = {}) {
|
|
72
|
+
const x = o, {
|
|
73
|
+
phrase: t = "",
|
|
74
|
+
category: e,
|
|
75
|
+
guideCategory: r,
|
|
76
|
+
contactCategory: i,
|
|
77
|
+
take: n,
|
|
78
|
+
connectionKey: c,
|
|
79
|
+
accordion: f,
|
|
80
|
+
id: u,
|
|
81
|
+
uriName: g,
|
|
82
|
+
sorting: d,
|
|
83
|
+
tag: m,
|
|
84
|
+
tagId: l,
|
|
85
|
+
tagTitle: y
|
|
86
|
+
} = x, D = E(x, [
|
|
112
87
|
"phrase",
|
|
113
88
|
"category",
|
|
114
89
|
"guideCategory",
|
|
@@ -122,122 +97,28 @@ function createParams(args = {}) {
|
|
|
122
97
|
"tag",
|
|
123
98
|
"tagId",
|
|
124
99
|
"tagTitle"
|
|
125
|
-
]);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
params[k] = args[k];
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
if (typeof phrase === "string" && phrase.length) {
|
|
133
|
-
params.phrase = phrase;
|
|
134
|
-
}
|
|
135
|
-
if (phrase === null) {
|
|
136
|
-
params.phrase = phrase;
|
|
137
|
-
}
|
|
138
|
-
if (typeof guideCategory === "string" && guideCategory !== "0") {
|
|
139
|
-
params.guideCategory = guideCategory;
|
|
140
|
-
}
|
|
141
|
-
if (typeof guideCategory === "number" && guideCategory !== 0) {
|
|
142
|
-
params.guideCategory = guideCategory;
|
|
143
|
-
}
|
|
144
|
-
if (typeof guideCategory === "object" && guideCategory !== null) {
|
|
145
|
-
if (typeof guideCategory.id === "string" && guideCategory.id !== "0") {
|
|
146
|
-
params.guideCategory = guideCategory.id;
|
|
147
|
-
}
|
|
148
|
-
if (typeof guideCategory.id === "number" && guideCategory.id !== 0) {
|
|
149
|
-
params.guideCategory = guideCategory.id;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (typeof contactCategory === "string" && contactCategory !== "0") {
|
|
153
|
-
params.contactCategory = contactCategory;
|
|
154
|
-
}
|
|
155
|
-
if (typeof contactCategory === "number" && contactCategory !== 0) {
|
|
156
|
-
params.contactCategory = contactCategory;
|
|
157
|
-
}
|
|
158
|
-
if (typeof contactCategory === "object" && contactCategory !== null) {
|
|
159
|
-
if (typeof contactCategory.id === "string" && contactCategory.id !== "0") {
|
|
160
|
-
params.contactCategory = contactCategory.id;
|
|
161
|
-
}
|
|
162
|
-
if (typeof contactCategory.id === "number" && contactCategory.id !== 0) {
|
|
163
|
-
params.contactCategory = contactCategory.id;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (typeof category === "string" && category !== "0") {
|
|
167
|
-
params.category = category;
|
|
168
|
-
}
|
|
169
|
-
if (typeof category === "number" && category !== 0) {
|
|
170
|
-
params.category = category;
|
|
171
|
-
}
|
|
172
|
-
if (typeof category === "object" && category !== null) {
|
|
173
|
-
if (typeof category.id === "string" && category.id !== "0") {
|
|
174
|
-
params.category = category.id;
|
|
175
|
-
}
|
|
176
|
-
if (typeof category.id === "number" && category.id !== 0) {
|
|
177
|
-
params.category = category.id;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (id) {
|
|
181
|
-
params.id = id;
|
|
182
|
-
}
|
|
183
|
-
if (uriName && (!!+params.category || !!+params.guideCategory || !!+params.guide || !!+params.contactCategory || !!+params.contactMethod)) {
|
|
184
|
-
params.uriName = uriName;
|
|
185
|
-
}
|
|
186
|
-
if (connectionKey) {
|
|
187
|
-
params.connectionKey = connectionKey;
|
|
188
|
-
}
|
|
189
|
-
if (take) {
|
|
190
|
-
params.take = take;
|
|
191
|
-
}
|
|
192
|
-
if (sorting) {
|
|
193
|
-
params.sorting = sorting;
|
|
194
|
-
}
|
|
195
|
-
if (typeof accordion === "string" && accordion.length > 0) {
|
|
196
|
-
params.accordion = accordion;
|
|
197
|
-
}
|
|
198
|
-
if (typeof tag === "string" && tag !== "0") {
|
|
199
|
-
params.tag = tag;
|
|
200
|
-
}
|
|
201
|
-
if (typeof tag === "number" && tag !== 0) {
|
|
202
|
-
params.tag = tag;
|
|
203
|
-
}
|
|
204
|
-
if (typeof tagId === "string" || typeof tagId === "number") {
|
|
205
|
-
params.tagId = tagId;
|
|
206
|
-
}
|
|
207
|
-
if (typeof tagTitle === "string") {
|
|
208
|
-
params.tagTitle = tagTitle;
|
|
209
|
-
}
|
|
210
|
-
return params;
|
|
100
|
+
]), s = {};
|
|
101
|
+
return Object.keys(D).forEach((k) => {
|
|
102
|
+
typeof o[k] == "string" && (s[k] = o[k]);
|
|
103
|
+
}), typeof t == "string" && t.length && (s.phrase = t), t === null && (s.phrase = t), typeof r == "string" && r !== "0" && (s.guideCategory = r), typeof r == "number" && r !== 0 && (s.guideCategory = r), typeof r == "object" && r !== null && (typeof r.id == "string" && r.id !== "0" && (s.guideCategory = r.id), typeof r.id == "number" && r.id !== 0 && (s.guideCategory = r.id)), typeof i == "string" && i !== "0" && (s.contactCategory = i), typeof i == "number" && i !== 0 && (s.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (s.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (s.contactCategory = i.id)), typeof e == "string" && e !== "0" && (s.category = e), typeof e == "number" && e !== 0 && (s.category = e), typeof e == "object" && e !== null && (typeof e.id == "string" && e.id !== "0" && (s.category = e.id), typeof e.id == "number" && e.id !== 0 && (s.category = e.id)), u && (s.id = u), g && (!!+s.category || !!+s.guideCategory || !!+s.guide || !!+s.contactCategory || !!+s.contactMethod) && (s.uriName = g), c && (s.connectionKey = c), n && (s.take = n), d && (s.sorting = d), typeof f == "string" && f.length > 0 && (s.accordion = f), typeof m == "string" && m !== "0" && (s.tag = m), typeof m == "number" && m !== 0 && (s.tag = m), (typeof l == "string" || typeof l == "number") && (s.tagId = l), typeof y == "string" && (s.tagTitle = y), s;
|
|
211
104
|
}
|
|
212
|
-
function*
|
|
213
|
-
if (
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const val = data[i];
|
|
218
|
-
yield val;
|
|
219
|
-
if (val.items) {
|
|
220
|
-
yield* processData(val.items);
|
|
105
|
+
function* S(o) {
|
|
106
|
+
if (!!o)
|
|
107
|
+
for (let t = 0; t < o.length; t++) {
|
|
108
|
+
const e = o[t];
|
|
109
|
+
yield e, e.items && (yield* S(e.items));
|
|
221
110
|
}
|
|
222
|
-
}
|
|
223
111
|
}
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
let
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
res = it.next();
|
|
233
|
-
}
|
|
234
|
-
return found;
|
|
235
|
-
};
|
|
236
|
-
const formatUrl = (url) => {
|
|
237
|
-
if (!url) {
|
|
112
|
+
const B = (o, t) => {
|
|
113
|
+
const e = S(t);
|
|
114
|
+
let r = e.next(), i = null;
|
|
115
|
+
for (; !r.done; )
|
|
116
|
+
r.value.id === o && (i = r.value), r = e.next();
|
|
117
|
+
return i;
|
|
118
|
+
}, q = (o) => {
|
|
119
|
+
if (!o)
|
|
238
120
|
return "";
|
|
239
|
-
|
|
240
|
-
const replacements = [
|
|
121
|
+
const t = [
|
|
241
122
|
{ from: /[äæǽ]+/gi, to: "ae" },
|
|
242
123
|
{ from: /[öœ]+/gi, to: "oe" },
|
|
243
124
|
{ from: /[ü]+/gi, to: "ue" },
|
|
@@ -327,476 +208,320 @@ const formatUrl = (url) => {
|
|
|
327
208
|
{ from: /[ю]+/gi, to: "yu" },
|
|
328
209
|
{ from: /[Я]+/gi, to: "Ya" },
|
|
329
210
|
{ from: /[я]+/gi, to: "ya" }
|
|
330
|
-
]
|
|
331
|
-
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
if (replacements.hasOwnProperty(i) && replacements[i].from.test(url)) {
|
|
336
|
-
parsed = parsed.replace(replacements[i].from, replacements[i].to);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
parsed = parsed.replace(alphanumericExpression, "-");
|
|
340
|
-
parsed = parsed.replace(trailingDashExpression, "");
|
|
341
|
-
parsed = parsed.toLowerCase();
|
|
342
|
-
return parsed || "humany";
|
|
211
|
+
], e = /[^a-zA-Z0-9]+/g, r = /[-]$/;
|
|
212
|
+
let i = o;
|
|
213
|
+
for (const n in t)
|
|
214
|
+
t.hasOwnProperty(n) && t[n].from.test(o) && (i = i.replace(t[n].from, t[n].to));
|
|
215
|
+
return i = i.replace(e, "-"), i = i.replace(r, ""), i = i.toLowerCase(), i || "humany";
|
|
343
216
|
};
|
|
344
|
-
function
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
if (item.items) {
|
|
350
|
-
childParentStructure(item.items, structure, item.id);
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
return structure;
|
|
217
|
+
function P(o, t = {}, e) {
|
|
218
|
+
return o.forEach((r) => {
|
|
219
|
+
e && (t[+r.id] = e), r.items && P(r.items, t, r.id);
|
|
220
|
+
}), t;
|
|
354
221
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
const parentId = structure[+id];
|
|
364
|
-
if (parentId) {
|
|
365
|
-
ids.unshift(parentId);
|
|
366
|
-
addAncestors(parentId);
|
|
367
|
-
}
|
|
368
|
-
return ids;
|
|
222
|
+
function F(o, t, e = [o], r = P(t)) {
|
|
223
|
+
const i = (c) => {
|
|
224
|
+
const f = r[+c];
|
|
225
|
+
f && (e.unshift(f), i(f));
|
|
226
|
+
}, n = r[+o];
|
|
227
|
+
return n && (e.unshift(n), i(n)), e;
|
|
369
228
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
if (Array.isArray(categoryIds)) {
|
|
407
|
-
return categoryIds.reduce((acc, id) => {
|
|
408
|
-
const result = buildTrail(id);
|
|
409
|
-
if (result.length > 0) {
|
|
410
|
-
acc.push(result);
|
|
411
|
-
}
|
|
412
|
-
return acc;
|
|
413
|
-
}, []);
|
|
414
|
-
}
|
|
415
|
-
return buildTrail(categoryIds);
|
|
416
|
-
});
|
|
417
|
-
});
|
|
418
|
-
};
|
|
419
|
-
const dataURItoBlob = (dataURI) => {
|
|
420
|
-
let byteString;
|
|
421
|
-
let mimestring;
|
|
422
|
-
if (dataURI.split(",")[0].indexOf("base64") !== -1) {
|
|
423
|
-
byteString = atob(dataURI.split(",")[1]);
|
|
424
|
-
} else {
|
|
425
|
-
byteString = decodeURI(dataURI.split(",")[1]);
|
|
426
|
-
}
|
|
427
|
-
mimestring = dataURI.split(",")[0].split(":")[1].split(";")[0];
|
|
428
|
-
const content = [];
|
|
429
|
-
for (let i = 0; i < byteString.length; i++) {
|
|
430
|
-
content[i] = byteString.charCodeAt(i);
|
|
431
|
-
}
|
|
432
|
-
return new Blob([new Uint8Array(content)], { type: mimestring });
|
|
229
|
+
const K = (o, t) => typeof o == "undefined" || typeof t == "undefined" ? /* @__PURE__ */ new Map() : new Map(
|
|
230
|
+
o.map((e) => {
|
|
231
|
+
const r = B(e, t);
|
|
232
|
+
return [e, r];
|
|
233
|
+
})
|
|
234
|
+
), G = (o, t, e, r = "guide-categories") => e.getAsync("dataClient").then((i) => i.fetch(r, { expandCategories: "descendants" }).then(({ categories: n }) => {
|
|
235
|
+
const c = (f) => {
|
|
236
|
+
const u = F(f, n), g = K(u, n), d = [];
|
|
237
|
+
return u.forEach((m) => {
|
|
238
|
+
const l = g.get(m);
|
|
239
|
+
l && d.push({
|
|
240
|
+
routeName: o,
|
|
241
|
+
title: l.title,
|
|
242
|
+
symbol: l.symbol,
|
|
243
|
+
id: l.id,
|
|
244
|
+
routeParams: N(r === "contact-method-categories" ? {
|
|
245
|
+
contactCategory: l.id,
|
|
246
|
+
uriName: q(l.title)
|
|
247
|
+
} : {
|
|
248
|
+
guideCategory: l.id,
|
|
249
|
+
uriName: q(l.title)
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
}), d;
|
|
253
|
+
};
|
|
254
|
+
return Array.isArray(t) ? t.reduce((f, u) => {
|
|
255
|
+
const g = c(u);
|
|
256
|
+
return g.length > 0 && f.push(g), f;
|
|
257
|
+
}, []) : c(t);
|
|
258
|
+
})), R = (o) => {
|
|
259
|
+
let t, e;
|
|
260
|
+
o.split(",")[0].indexOf("base64") !== -1 ? t = atob(o.split(",")[1]) : t = decodeURI(o.split(",")[1]), e = o.split(",")[0].split(":")[1].split(";")[0];
|
|
261
|
+
const r = [];
|
|
262
|
+
for (let i = 0; i < t.length; i++)
|
|
263
|
+
r[i] = t.charCodeAt(i);
|
|
264
|
+
return new Blob([new Uint8Array(r)], { type: e });
|
|
433
265
|
};
|
|
434
|
-
function
|
|
435
|
-
return
|
|
266
|
+
function _(...o) {
|
|
267
|
+
return process.env.NODE_ENV !== "production" && console && console.warn(...o);
|
|
436
268
|
}
|
|
437
|
-
const
|
|
438
|
-
if (typeof msgOrObj === "string") {
|
|
439
|
-
return print2(`[humany] ${msgOrObj}`, ...args);
|
|
440
|
-
}
|
|
441
|
-
return print2(msgOrObj, ...args);
|
|
442
|
-
};
|
|
443
|
-
const _Logger = class {
|
|
269
|
+
const C = (o, t, ...e) => typeof t == "string" ? o(`[humany] ${t}`, ...e) : o(t, ...e), b = class {
|
|
444
270
|
constructor() {
|
|
445
|
-
this
|
|
446
|
-
this
|
|
447
|
-
this
|
|
448
|
-
this
|
|
449
|
-
this
|
|
271
|
+
a(this, "keys", []);
|
|
272
|
+
a(this, "log", (t, ...e) => this.lookup(t, () => b.log(...e)));
|
|
273
|
+
a(this, "warn", (t, ...e) => this.lookup(t, () => b.warn(...e)));
|
|
274
|
+
a(this, "error", (t, ...e) => this.lookup(t, () => b.error(...e)));
|
|
275
|
+
a(this, "info", (t, ...e) => this.lookup(t, () => b.info(...e)));
|
|
450
276
|
}
|
|
451
|
-
lookup(
|
|
452
|
-
|
|
453
|
-
this.keys.push(key);
|
|
454
|
-
fn();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
let Logger = _Logger;
|
|
459
|
-
Logger.log = (...args) => print(console.log, ...args);
|
|
460
|
-
Logger.warn = (...args) => print(console.warn, ...args);
|
|
461
|
-
Logger.error = (...args) => print(console.error, ...args);
|
|
462
|
-
Logger.info = (...args) => print(console.info, ...args);
|
|
463
|
-
const deepClone = (data) => {
|
|
464
|
-
let out = {};
|
|
465
|
-
let value;
|
|
466
|
-
let key;
|
|
467
|
-
if (typeof data !== "object" || data === null) {
|
|
468
|
-
return data;
|
|
469
|
-
}
|
|
470
|
-
out = Array.isArray(data) ? [] : {};
|
|
471
|
-
for (key in data) {
|
|
472
|
-
value = data[key];
|
|
473
|
-
out[key] = typeof value === "object" && value !== null ? deepClone(value) : value;
|
|
277
|
+
lookup(t, e) {
|
|
278
|
+
this.keys.indexOf(t) === -1 && (this.keys.push(t), e());
|
|
474
279
|
}
|
|
475
|
-
return out;
|
|
476
280
|
};
|
|
477
|
-
|
|
478
|
-
|
|
281
|
+
let p = b;
|
|
282
|
+
a(p, "log", (...t) => C(console.log, ...t)), a(p, "warn", (...t) => C(console.warn, ...t)), a(p, "error", (...t) => C(console.error, ...t)), a(p, "info", (...t) => C(console.info, ...t));
|
|
283
|
+
const O = (o) => {
|
|
284
|
+
let t = {}, e, r;
|
|
285
|
+
if (typeof o != "object" || o === null)
|
|
286
|
+
return o;
|
|
287
|
+
t = Array.isArray(o) ? [] : {};
|
|
288
|
+
for (r in o)
|
|
289
|
+
e = o[r], t[r] = typeof e == "object" && e !== null ? O(e) : e;
|
|
290
|
+
return t;
|
|
291
|
+
}, X = (o) => {
|
|
292
|
+
if (!o)
|
|
479
293
|
return null;
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
294
|
+
const t = localStorage.getItem(
|
|
295
|
+
`humany_${L(o.tenant + o.name)}`
|
|
296
|
+
);
|
|
297
|
+
if (t) {
|
|
298
|
+
const { activeStickyWidget: e } = JSON.parse(t);
|
|
299
|
+
if (e && e.value && o.widgets.get(e.value)) {
|
|
300
|
+
const i = document.createElement("a");
|
|
301
|
+
i.setAttribute(
|
|
302
|
+
"href",
|
|
303
|
+
`//${o.bindings[0]}/${e.value}`
|
|
304
|
+
), document.body.appendChild(i);
|
|
491
305
|
}
|
|
492
306
|
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
month = `0${month}`;
|
|
501
|
-
if (day.length < 2)
|
|
502
|
-
day = `0${day}`;
|
|
503
|
-
if (includeTime) {
|
|
504
|
-
let hours = `${d.getHours()}`;
|
|
505
|
-
let minutes = `${d.getMinutes()}`;
|
|
506
|
-
if (hours.length < 2)
|
|
507
|
-
hours = `0${hours}`;
|
|
508
|
-
if (minutes.length < 2)
|
|
509
|
-
minutes = `0${minutes}`;
|
|
510
|
-
return `${[year, month, day].join("-")} ${[hours, minutes].join(":")}`;
|
|
307
|
+
}, tt = (o, t = !1) => {
|
|
308
|
+
const e = new Date(o);
|
|
309
|
+
let r = `${e.getMonth() + 1}`, i = `${e.getDate()}`;
|
|
310
|
+
const n = e.getFullYear();
|
|
311
|
+
if (r.length < 2 && (r = `0${r}`), i.length < 2 && (i = `0${i}`), t) {
|
|
312
|
+
let c = `${e.getHours()}`, f = `${e.getMinutes()}`;
|
|
313
|
+
return c.length < 2 && (c = `0${c}`), f.length < 2 && (f = `0${f}`), `${[n, r, i].join("-")} ${[c, f].join(":")}`;
|
|
511
314
|
}
|
|
512
|
-
return [
|
|
315
|
+
return [n, r, i].join("-");
|
|
513
316
|
};
|
|
514
|
-
function
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
let
|
|
518
|
-
if (
|
|
519
|
-
|
|
520
|
-
let
|
|
521
|
-
|
|
522
|
-
end = documentCookie.length;
|
|
523
|
-
}
|
|
524
|
-
return unescape(documentCookie.substring(start, end));
|
|
317
|
+
function et(o) {
|
|
318
|
+
const t = document.cookie;
|
|
319
|
+
if (t.length > 0) {
|
|
320
|
+
let e = t.indexOf(`${o}=`);
|
|
321
|
+
if (e !== -1) {
|
|
322
|
+
e = e + o.length + 1;
|
|
323
|
+
let r = t.indexOf(";", e);
|
|
324
|
+
return r === -1 && (r = t.length), unescape(t.substring(e, r));
|
|
525
325
|
}
|
|
526
326
|
}
|
|
527
327
|
return null;
|
|
528
328
|
}
|
|
529
|
-
function
|
|
530
|
-
let
|
|
531
|
-
if (
|
|
532
|
-
return
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
return hash2.toString();
|
|
329
|
+
function L(o) {
|
|
330
|
+
let t = 0;
|
|
331
|
+
if (o.length === 0)
|
|
332
|
+
return t.toString();
|
|
333
|
+
for (let e = 0; e < o.length; e++) {
|
|
334
|
+
const r = o.charCodeAt(e);
|
|
335
|
+
t = (t << 5) - t + r, t = t & t;
|
|
336
|
+
}
|
|
337
|
+
return t.toString();
|
|
540
338
|
}
|
|
541
|
-
|
|
542
|
-
if (!
|
|
543
|
-
return
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
if (node === parent) {
|
|
549
|
-
hasChild = true;
|
|
550
|
-
}
|
|
551
|
-
node = node.parentNode;
|
|
552
|
-
}
|
|
553
|
-
return hasChild;
|
|
339
|
+
const ot = (o, t) => {
|
|
340
|
+
if (!o || !t)
|
|
341
|
+
return !0;
|
|
342
|
+
let e = t.parentNode, r = !1;
|
|
343
|
+
for (; e !== null; )
|
|
344
|
+
e === o && (r = !0), e = e.parentNode;
|
|
345
|
+
return r;
|
|
554
346
|
};
|
|
555
|
-
function
|
|
556
|
-
return
|
|
347
|
+
function rt(o) {
|
|
348
|
+
return o.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase();
|
|
557
349
|
}
|
|
558
|
-
class
|
|
559
|
-
constructor(
|
|
560
|
-
this
|
|
561
|
-
this
|
|
562
|
-
this.
|
|
563
|
-
this.current = Promise.resolve();
|
|
564
|
-
this.next = this.next.bind(this);
|
|
350
|
+
class U {
|
|
351
|
+
constructor(t, e) {
|
|
352
|
+
a(this, "tasks", []);
|
|
353
|
+
a(this, "current", Promise.resolve());
|
|
354
|
+
this.lockWarningTime = t, this.lockErrorTime = e, this.next = this.next.bind(this);
|
|
565
355
|
}
|
|
566
|
-
add(
|
|
567
|
-
this.tasks.push({ task, resolve, reject, done });
|
|
568
|
-
this.next();
|
|
356
|
+
add(t, e, r, i) {
|
|
357
|
+
this.tasks.push({ task: t, resolve: e, reject: r, done: i }), this.next();
|
|
569
358
|
}
|
|
570
359
|
next() {
|
|
571
360
|
this.current = this.current.then(() => {
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
let
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
|
|
361
|
+
const t = this.tasks.shift();
|
|
362
|
+
if (t) {
|
|
363
|
+
let e;
|
|
364
|
+
const r = setTimeout(() => {
|
|
365
|
+
process.env.NODE_ENV !== "production" && p.warn(
|
|
366
|
+
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
367
|
+
t
|
|
368
|
+
), e = setTimeout(() => {
|
|
369
|
+
t.reject("lock timeout exceeded");
|
|
578
370
|
}, this.lockErrorTime);
|
|
579
|
-
}, this.lockWarningTime);
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
return Promise.resolve(taskPromise).then(this.next).then(() => taskPromise.then((data) => {
|
|
586
|
-
next.done();
|
|
587
|
-
next.resolve(data);
|
|
588
|
-
})).catch((reason) => {
|
|
589
|
-
next.done();
|
|
590
|
-
next.reject(reason);
|
|
591
|
-
return this.next();
|
|
592
|
-
});
|
|
371
|
+
}, this.lockWarningTime), i = Promise.resolve(t.task()).then((n) => (clearTimeout(r), clearTimeout(e), n));
|
|
372
|
+
return Promise.resolve(i).then(this.next).then(
|
|
373
|
+
() => i.then((n) => {
|
|
374
|
+
t.done(), t.resolve(n);
|
|
375
|
+
})
|
|
376
|
+
).catch((n) => (t.done(), t.reject(n), this.next()));
|
|
593
377
|
}
|
|
594
378
|
return Promise.resolve();
|
|
595
379
|
});
|
|
596
380
|
}
|
|
597
381
|
}
|
|
598
|
-
const
|
|
599
|
-
function
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
return new Promise((resolve, reject) => {
|
|
605
|
-
const queue = locks.get(key);
|
|
606
|
-
queue.add(task, resolve, reject, () => {
|
|
607
|
-
if (!queue.tasks.length) {
|
|
608
|
-
locks.delete(key);
|
|
609
|
-
}
|
|
610
|
-
});
|
|
382
|
+
const A = /* @__PURE__ */ new WeakMap();
|
|
383
|
+
function it(o, t = 5e3, e = 1e3) {
|
|
384
|
+
return A.has(o) || A.set(o, new U(t, e)), (r) => new Promise((i, n) => {
|
|
385
|
+
const c = A.get(o);
|
|
386
|
+
c.add(r, i, n, () => {
|
|
387
|
+
c.tasks.length || A.delete(o);
|
|
611
388
|
});
|
|
612
|
-
};
|
|
389
|
+
});
|
|
613
390
|
}
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
if (isObject(source[key])) {
|
|
629
|
-
if (!target[key])
|
|
630
|
-
Object.assign(target, { [key]: {} });
|
|
631
|
-
mergeDeepRecursive(target[key], source[key]);
|
|
632
|
-
} else {
|
|
633
|
-
Object.assign(target, { [key]: source[key] });
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
return mergeDeepRecursive(target, ...sources);
|
|
638
|
-
};
|
|
639
|
-
const watchForLoadingComplete = (container, widgetDOMElement) => {
|
|
640
|
-
const isLoading = () => widgetDOMElement.querySelectorAll("[data-loading=true]").length > 0;
|
|
641
|
-
const complete = () => {
|
|
642
|
-
let dispatched = false;
|
|
391
|
+
const v = (o) => !!o && typeof o == "object" && !Array.isArray(o), nt = (o, ...t) => {
|
|
392
|
+
const e = O(o), r = O(t);
|
|
393
|
+
return $(e, ...r);
|
|
394
|
+
}, $ = (o, ...t) => {
|
|
395
|
+
if (!t.length)
|
|
396
|
+
return o;
|
|
397
|
+
const e = t.shift();
|
|
398
|
+
if (v(o) && v(e))
|
|
399
|
+
for (const r in e)
|
|
400
|
+
v(e[r]) ? (o[r] || Object.assign(o, { [r]: {} }), $(o[r], e[r])) : Object.assign(o, { [r]: e[r] });
|
|
401
|
+
return $(o, ...t);
|
|
402
|
+
}, Z = (o, t) => {
|
|
403
|
+
const e = () => t.querySelectorAll("[data-loading=true]").length > 0, i = (() => {
|
|
404
|
+
let c = !1;
|
|
643
405
|
return () => {
|
|
644
|
-
if (
|
|
406
|
+
if (c)
|
|
645
407
|
return;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
element: widgetDOMElement
|
|
650
|
-
});
|
|
651
|
-
dispatched = true;
|
|
408
|
+
o.get("$widget").events.dispatch("widget:data-loaded", {
|
|
409
|
+
element: t
|
|
410
|
+
}), c = !0;
|
|
652
411
|
};
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
412
|
+
})();
|
|
413
|
+
if (!e())
|
|
414
|
+
return i();
|
|
415
|
+
new MutationObserver((c, f) => {
|
|
416
|
+
c.find(
|
|
417
|
+
(g) => g.type === "attributes" && g.attributeName === "data-loading"
|
|
418
|
+
) && !e() && (f.disconnect(), i());
|
|
419
|
+
}).observe(t, {
|
|
420
|
+
attributes: !0,
|
|
421
|
+
childList: !0,
|
|
422
|
+
subtree: !0
|
|
664
423
|
});
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
return acc;
|
|
681
|
-
}, []);
|
|
682
|
-
let complete = false;
|
|
683
|
-
const observer = new MutationObserver((mutations, observer2) => {
|
|
684
|
-
mutations.forEach((mutation) => {
|
|
685
|
-
if (mutation.addedNodes) {
|
|
686
|
-
const componentElements = Array.from(mutation.addedNodes).reduce((acc, element) => {
|
|
687
|
-
const dataName = element.getAttribute && element.getAttribute("data-name");
|
|
688
|
-
if (dataName && waitingFor.indexOf(dataName) > -1) {
|
|
689
|
-
acc.push(dataName);
|
|
690
|
-
}
|
|
691
|
-
return acc;
|
|
424
|
+
}, st = (o, t) => {
|
|
425
|
+
o.get("$widget").container.getAsync("components").then((r) => {
|
|
426
|
+
r.events.subscribeOnce("components:component-model-initialized", () => {
|
|
427
|
+
let i = r.nodes.visible.reduce(
|
|
428
|
+
(f, u) => (!u.name || !u.type || u.type === "view" || u.type === "root" || u.attributes.layout.size === "none" || t.querySelector(`[data-name="${u.name}"]`) || f.push(u.name), f),
|
|
429
|
+
[]
|
|
430
|
+
), n = !1;
|
|
431
|
+
new MutationObserver((f, u) => {
|
|
432
|
+
f.forEach((g) => {
|
|
433
|
+
if (g.addedNodes) {
|
|
434
|
+
const d = Array.from(
|
|
435
|
+
g.addedNodes
|
|
436
|
+
).reduce((m, l) => {
|
|
437
|
+
const y = l.getAttribute && l.getAttribute("data-name");
|
|
438
|
+
return y && i.indexOf(y) > -1 && m.push(y), m;
|
|
692
439
|
}, []);
|
|
693
|
-
|
|
694
|
-
return componentElements.indexOf(name) === -1;
|
|
695
|
-
});
|
|
696
|
-
if (!complete && waitingFor.length === 0) {
|
|
697
|
-
complete = true;
|
|
698
|
-
watchForLoadingComplete(viewOutletContainer, widgetDOMElement);
|
|
699
|
-
observer2.disconnect();
|
|
700
|
-
}
|
|
440
|
+
i = i.filter((m) => d.indexOf(m) === -1), !n && i.length === 0 && (n = !0, Z(o, t), u.disconnect());
|
|
701
441
|
}
|
|
702
442
|
});
|
|
703
|
-
})
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
characterDataOldValue: false
|
|
443
|
+
}).observe(t, {
|
|
444
|
+
attributes: !1,
|
|
445
|
+
characterData: !1,
|
|
446
|
+
childList: !0,
|
|
447
|
+
subtree: !0,
|
|
448
|
+
attributeOldValue: !1,
|
|
449
|
+
characterDataOldValue: !1
|
|
711
450
|
});
|
|
712
451
|
});
|
|
713
452
|
});
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
let expires = "";
|
|
725
|
-
if (days) {
|
|
726
|
-
const date = new Date();
|
|
727
|
-
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1e3);
|
|
728
|
-
expires = `; expires=${date.toUTCString()}`;
|
|
729
|
-
}
|
|
730
|
-
document.cookie = `${cookieName}=${value}${expires}; path=/`;
|
|
453
|
+
}, ft = (o = {}) => (Object.keys(o).forEach((t) => {
|
|
454
|
+
(o[t] === null || typeof o[t] == "undefined") && delete o[t];
|
|
455
|
+
}), o);
|
|
456
|
+
function ct(o, t, e) {
|
|
457
|
+
let r = "";
|
|
458
|
+
if (e) {
|
|
459
|
+
const i = new Date();
|
|
460
|
+
i.setTime(i.getTime() + e * 24 * 60 * 60 * 1e3), r = `; expires=${i.toUTCString()}`;
|
|
461
|
+
}
|
|
462
|
+
document.cookie = `${o}=${t}${r}; path=/`;
|
|
731
463
|
}
|
|
732
|
-
|
|
733
|
-
let
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
const found = Object.keys(b).some((bKey) => {
|
|
739
|
-
return key === bKey;
|
|
740
|
-
});
|
|
741
|
-
return !found;
|
|
742
|
-
});
|
|
743
|
-
if (missingKey) {
|
|
744
|
-
return false;
|
|
745
|
-
}
|
|
746
|
-
Object.keys(a).forEach((key) => {
|
|
747
|
-
if (equal) {
|
|
748
|
-
const c = typeof a[key] === "undefined" ? "" : a[key];
|
|
749
|
-
const d = typeof b[key] === "undefined" ? "" : b[key];
|
|
750
|
-
equal = c.toString() === d.toString();
|
|
464
|
+
const ut = (o, t) => {
|
|
465
|
+
let e = !0;
|
|
466
|
+
return Object.keys(o).length !== Object.keys(t).length || Object.keys(o).some((i) => !Object.keys(t).some((c) => i === c)) ? !1 : (Object.keys(o).forEach((i) => {
|
|
467
|
+
if (e) {
|
|
468
|
+
const n = typeof o[i] == "undefined" ? "" : o[i], c = typeof t[i] == "undefined" ? "" : t[i];
|
|
469
|
+
e = n.toString() === c.toString();
|
|
751
470
|
}
|
|
752
|
-
});
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
757
|
-
};
|
|
758
|
-
function uuid() {
|
|
759
|
-
return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
|
|
471
|
+
}), e);
|
|
472
|
+
}, h = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
473
|
+
function at() {
|
|
474
|
+
return h() + h() + "-" + h() + "-" + h() + "-" + h() + "-" + h() + h() + h();
|
|
760
475
|
}
|
|
761
|
-
class
|
|
762
|
-
constructor(
|
|
763
|
-
this
|
|
764
|
-
this
|
|
765
|
-
this
|
|
766
|
-
this
|
|
767
|
-
|
|
768
|
-
this.queueAttempt = setInterval(this.processQueue, 1e3);
|
|
769
|
-
};
|
|
770
|
-
this
|
|
476
|
+
class lt {
|
|
477
|
+
constructor(t) {
|
|
478
|
+
a(this, "queue", []);
|
|
479
|
+
a(this, "queueAttempt");
|
|
480
|
+
a(this, "queueAttemptCalls", 0);
|
|
481
|
+
a(this, "callCount", 5);
|
|
482
|
+
a(this, "add", (t) => {
|
|
483
|
+
this.queue.push(t), this.queueAttempt = setInterval(this.processQueue, 1e3);
|
|
484
|
+
});
|
|
485
|
+
a(this, "processQueue", () => {
|
|
771
486
|
if (this.queue.length > 0) {
|
|
772
|
-
const
|
|
773
|
-
this.queue.forEach((
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
indexOfActionsEmitted.push(index);
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
this.queue = this.queue.filter((_, index) => {
|
|
781
|
-
if (indexOfActionsEmitted.indexOf(index) > -1) {
|
|
782
|
-
return false;
|
|
783
|
-
}
|
|
784
|
-
return true;
|
|
785
|
-
});
|
|
786
|
-
if (this.queueAttempt) {
|
|
787
|
-
clearInterval(this.queueAttempt);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
if (this.queueAttemptCalls > this.callCount) {
|
|
791
|
-
clearInterval(this.queueAttempt);
|
|
792
|
-
this.queueAttemptCalls = 0;
|
|
487
|
+
const t = [];
|
|
488
|
+
this.queue.forEach((e, r) => {
|
|
489
|
+
const i = e();
|
|
490
|
+
typeof i == "function" && (i(), t.push(r));
|
|
491
|
+
}), this.queue = this.queue.filter((e, r) => !(t.indexOf(r) > -1)), this.queueAttempt && clearInterval(this.queueAttempt);
|
|
793
492
|
}
|
|
794
|
-
this.queueAttemptCalls = this.queueAttemptCalls + 1;
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
this.callCount = options.callCount;
|
|
798
|
-
}
|
|
493
|
+
this.queueAttemptCalls > this.callCount && (clearInterval(this.queueAttempt), this.queueAttemptCalls = 0), this.queueAttemptCalls = this.queueAttemptCalls + 1;
|
|
494
|
+
});
|
|
495
|
+
t && t.callCount && (this.callCount = t.callCount);
|
|
799
496
|
}
|
|
800
497
|
}
|
|
801
|
-
export {
|
|
498
|
+
export {
|
|
499
|
+
p as Logger,
|
|
500
|
+
lt as WaitFor,
|
|
501
|
+
Q as appendClassNames,
|
|
502
|
+
G as buildCategoryTrail,
|
|
503
|
+
j as camilize,
|
|
504
|
+
F as categoryTrail,
|
|
505
|
+
H as createBatch,
|
|
506
|
+
N as createParams,
|
|
507
|
+
R as dataURItoBlob,
|
|
508
|
+
_ as debugLog,
|
|
509
|
+
O as deepClone,
|
|
510
|
+
X as findAndActivateStoredWidgets,
|
|
511
|
+
B as findCategoryById,
|
|
512
|
+
tt as formatDate,
|
|
513
|
+
q as formatUrl,
|
|
514
|
+
K as getCategoryTrailAsObjects,
|
|
515
|
+
et as getCookie,
|
|
516
|
+
L as hash,
|
|
517
|
+
ot as htmlParentContains,
|
|
518
|
+
rt as kebabCase,
|
|
519
|
+
it as lock,
|
|
520
|
+
nt as mergeDeep,
|
|
521
|
+
st as notifyDataLoaded,
|
|
522
|
+
ft as removeNullAndUndefinedValues,
|
|
523
|
+
ct as setCookie,
|
|
524
|
+
ut as shallowCompare,
|
|
525
|
+
at as uuid
|
|
526
|
+
};
|
|
802
527
|
//# sourceMappingURL=index.js.map
|