@naturalcycles/internal-web-lib 1.6.1 → 1.7.1
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/bundle/analyticsClient.js +137 -137
- package/bundle/analyticsClient.js.map +1 -1
- package/bundle/conversionClient.js +28 -28
- package/bundle/conversionClient.js.map +1 -1
- package/bundle/cookieMonster.js +86 -76
- package/bundle/cookieMonster.js.map +1 -1
- package/dist/cookie-monster/components/setting-dropdown/setting-dropdown.component.js +1 -1
- package/dist/cookie-monster/components/themed-button/themed-button.component.js +1 -1
- package/dist/cookie-monster/consent/consent.service.js +1 -1
- package/dist/cookie-monster/cookie-monster-element.d.ts +2 -2
- package/dist/cookie-monster/cookie-monster-element.js +9 -5
- package/dist/cookie-monster/cookieMonsterService.d.ts +3 -0
- package/dist/cookie-monster/cookieMonsterService.js +12 -4
- package/dist/cookie-monster/css/variants.js +3 -0
- package/dist/cookie-monster/index.js +2 -2
- package/dist/cookie-monster/types/CookieMonster.types.d.ts +5 -0
- package/dist/cookie-monster/types/CookieMonster.types.js +6 -1
- package/dist/cookie-monster/views/settings.view.js +1 -2
- package/dist/cookie-monster/views/views.js +1 -1
- package/package.json +1 -1
- package/dist/cookie-monster/icons/back.js +0 -3
|
@@ -7,7 +7,7 @@ function e(e = 21) {
|
|
|
7
7
|
function t() {
|
|
8
8
|
return e();
|
|
9
9
|
}
|
|
10
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
10
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/is.util.js
|
|
11
11
|
var n = (e) => !!e;
|
|
12
12
|
function r(e) {
|
|
13
13
|
return typeof e == "object" && !!e && !Array.isArray(e) || !1;
|
|
@@ -22,7 +22,7 @@ function i(e) {
|
|
|
22
22
|
}
|
|
23
23
|
return !1;
|
|
24
24
|
}
|
|
25
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
25
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/abort.js
|
|
26
26
|
function a(e) {
|
|
27
27
|
return e ? o(e) : void 0;
|
|
28
28
|
}
|
|
@@ -51,7 +51,7 @@ function u(e) {
|
|
|
51
51
|
});
|
|
52
52
|
return t.signal;
|
|
53
53
|
}
|
|
54
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
54
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/log/commonLogger.js
|
|
55
55
|
function d(e, t) {
|
|
56
56
|
let n = (n, [r, i]) => e({
|
|
57
57
|
...t?.(),
|
|
@@ -111,7 +111,7 @@ var f = d(({ level: e, msg: t, err: n, ...r }) => {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}(), m = p.runInBackground.bind(p), te = (...e) => void 0, h = Object.entries;
|
|
114
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
114
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/object/object.util.js
|
|
115
115
|
function g(e, t, n = {}) {
|
|
116
116
|
if (n.mutate) {
|
|
117
117
|
for (let n of Object.keys(e)) t.includes(n) || delete e[n];
|
|
@@ -160,14 +160,14 @@ function S(e, ...t) {
|
|
|
160
160
|
for (let n of t) if (r(n)) for (let t of Object.keys(n)) t !== "__proto__" && t !== "constructor" && t !== "prototype" && (r(n[t]) ? (e[t] ||= {}, S(e[t], n[t])) : e[t] = n[t]);
|
|
161
161
|
return e;
|
|
162
162
|
}
|
|
163
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
163
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/env.js
|
|
164
164
|
function C() {
|
|
165
165
|
return !ie();
|
|
166
166
|
}
|
|
167
167
|
function ie() {
|
|
168
168
|
return typeof window < "u" && !!window?.document;
|
|
169
169
|
}
|
|
170
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
170
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/string/json.util.js
|
|
171
171
|
var ae = /^\s*[{["\-\d]/;
|
|
172
172
|
function w(e, t) {
|
|
173
173
|
if (typeof e == "string" && e && ae.test(e)) try {
|
|
@@ -182,7 +182,7 @@ function oe(e, t) {
|
|
|
182
182
|
throw new le({ text: e });
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
185
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/string/string.util.js
|
|
186
186
|
function T(e, t, n = "...") {
|
|
187
187
|
if (!e || e.length <= t) return e;
|
|
188
188
|
if (t <= n.length) return n;
|
|
@@ -193,7 +193,7 @@ function E(e, t) {
|
|
|
193
193
|
let n = e.indexOf(t);
|
|
194
194
|
return e.slice(0, n === -1 ? void 0 : n);
|
|
195
195
|
}
|
|
196
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
196
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/error/error.util.js
|
|
197
197
|
function D(e, t = Error, n) {
|
|
198
198
|
let r;
|
|
199
199
|
return r = e instanceof t ? e : se(O(e), t), n && (r.data ||= {}, Object.assign(r.data, n)), r;
|
|
@@ -332,7 +332,7 @@ var P = class e extends Error {
|
|
|
332
332
|
super(e || "expected error was not thrown", {}, { name: "UnexpectedPassError" });
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
335
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/string/safeJsonStringify.js
|
|
336
336
|
function R(e, t, n, r) {
|
|
337
337
|
try {
|
|
338
338
|
return JSON.stringify(e, t, n);
|
|
@@ -350,7 +350,7 @@ function z(e, t) {
|
|
|
350
350
|
return e == null ? a : e.call(this, i, a);
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
353
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/string/stringify.js
|
|
354
354
|
var B = typeof globalThis.AggregateError == "function", V = R;
|
|
355
355
|
function H(e, t = {}) {
|
|
356
356
|
if (e === void 0) return "undefined";
|
|
@@ -387,24 +387,14 @@ function U(e, t) {
|
|
|
387
387
|
...e.errors.map((e, n) => `${n + 1}. ${H(e, t)}`)
|
|
388
388
|
].join("\n")), e.cause && n && (r = r + "\nCaused by: " + H(e.cause, t)), r;
|
|
389
389
|
}
|
|
390
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
390
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/error/assert.js
|
|
391
391
|
function W(e, t = Error) {
|
|
392
392
|
if (!(e instanceof t)) throw new ce(`Expected to be instanceof ${t.name}, actual typeof: ${typeof e}`);
|
|
393
393
|
}
|
|
394
394
|
function ue(e, t) {
|
|
395
395
|
if (!(e instanceof t)) throw e;
|
|
396
396
|
}
|
|
397
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
398
|
-
async function de(e, t) {
|
|
399
|
-
t?.aborted || await new Promise((n) => {
|
|
400
|
-
let r = setTimeout(i, e);
|
|
401
|
-
function i() {
|
|
402
|
-
clearTimeout(r), t?.removeEventListener("abort", i), n();
|
|
403
|
-
}
|
|
404
|
-
t?.addEventListener("abort", i);
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.98.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/datetime/time.util.js
|
|
397
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/datetime/time.util.js
|
|
408
398
|
function G(e, t = Date.now()) {
|
|
409
399
|
return K(t - e);
|
|
410
400
|
}
|
|
@@ -414,11 +404,21 @@ function K(e) {
|
|
|
414
404
|
let t = Math.floor(e / 1e3) % 60, n = Math.floor(e / 6e4) % 60, r = Math.floor(e / 36e5);
|
|
415
405
|
return r === 0 ? n === 0 ? `${t} sec` : `${n}m${t}s` : r < 24 ? `${r}h${n}m` : r < 48 ? `${Math.round(r + n / 60)}h` : `${Math.floor(r / 24)} days`;
|
|
416
406
|
}
|
|
417
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
418
|
-
function
|
|
407
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/number/number.util.js
|
|
408
|
+
function de(e, t, n) {
|
|
419
409
|
return e <= t ? t : e >= n ? n : e;
|
|
420
410
|
}
|
|
421
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
411
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/promise/pDelay.js
|
|
412
|
+
async function fe(e, t) {
|
|
413
|
+
t?.aborted || await new Promise((n) => {
|
|
414
|
+
let r = setTimeout(i, e);
|
|
415
|
+
function i() {
|
|
416
|
+
clearTimeout(r), t?.removeEventListener("abort", i), n();
|
|
417
|
+
}
|
|
418
|
+
t?.addEventListener("abort", i);
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/promise/pTimeout.js
|
|
422
422
|
async function pe(e, t) {
|
|
423
423
|
let n = new AbortController(), { signal: r } = n;
|
|
424
424
|
if (!t.timeout) return await e(r);
|
|
@@ -444,7 +444,7 @@ async function pe(e, t) {
|
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
447
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/string/url.util.js
|
|
448
448
|
function me(e, t) {
|
|
449
449
|
if (typeof e != "string") return null;
|
|
450
450
|
try {
|
|
@@ -453,7 +453,7 @@ function me(e, t) {
|
|
|
453
453
|
return null;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.
|
|
456
|
+
// ../../node_modules/.pnpm/@naturalcycles+js-lib@15.99.0_undici@8.12.3/node_modules/@naturalcycles/js-lib/dist/http/http.model.js
|
|
457
457
|
var he = [
|
|
458
458
|
"GET",
|
|
459
459
|
"POST",
|
|
@@ -720,7 +720,7 @@ var he = [
|
|
|
720
720
|
}), t.retryStopped) return;
|
|
721
721
|
t.retryAttempt++;
|
|
722
722
|
let a = this.getRetryTimeout(e);
|
|
723
|
-
a === null ? (this.cfg.logger.warn(`${e.signature} server-indicated delay exceeds maxRetryAfter, will not retry`), t.retryStopped = !0) : (t.retryTimeout =
|
|
723
|
+
a === null ? (this.cfg.logger.warn(`${e.signature} server-indicated delay exceeds maxRetryAfter, will not retry`), t.retryStopped = !0) : (t.retryTimeout = de(t.retryTimeout * r, 0, i), e.req.debug && this.cfg.logger.log(` .. ${e.signature} waiting ${K(a)}`), await fe(a, e.req.signal), e.req.signal?.aborted && (t.retryStopped = !0));
|
|
724
724
|
}
|
|
725
725
|
getRetryTimeout(e) {
|
|
726
726
|
let t = 0;
|