@walkeros/explorer 0.0.7 → 0.0.8
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/explorer.js +116 -115
- package/dist/explorer.js.map +1 -1
- package/package.json +1 -1
package/dist/explorer.js
CHANGED
|
@@ -2251,7 +2251,7 @@ var WalkerExplorer = (() => {
|
|
|
2251
2251
|
var t;
|
|
2252
2252
|
var n = Object.getOwnPropertyNames;
|
|
2253
2253
|
var r = (e = { "package.json"(e3, t3) {
|
|
2254
|
-
t3.exports = { name: "@walkeros/core", description: "Core types and platform-agnostic utilities for walkerOS", version: "0.0.
|
|
2254
|
+
t3.exports = { name: "@walkeros/core", description: "Core types and platform-agnostic utilities for walkerOS", version: "0.0.8", main: "./dist/index.js", module: "./dist/index.mjs", types: "./dist/index.d.ts", license: "MIT", files: ["dist/**"], scripts: { build: "tsup --silent", clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist", dev: "jest --watchAll --colors", lint: 'tsc && eslint "**/*.ts*"', test: "jest", update: "npx npm-check-updates -u && npm update" }, dependencies: {}, devDependencies: {}, repository: { url: "git+https://github.com/elbwalker/walkerOS.git", directory: "packages/core" }, author: "elbwalker <hello@elbwalker.com>", homepage: "https://github.com/elbwalker/walkerOS#readme", bugs: { url: "https://github.com/elbwalker/walkerOS/issues" }, keywords: ["walker", "walkerOS", "analytics", "tracking", "data collection", "measurement", "data privacy", "privacy friendly", "web analytics", "product analytics", "core", "types", "utils"], funding: [{ type: "GitHub Sponsors", url: "https://github.com/sponsors/elbwalker" }] };
|
|
2255
2255
|
} }, function() {
|
|
2256
2256
|
return t || (0, e[n(e)[0]])((t = { exports: {} }).exports, t), t.exports;
|
|
2257
2257
|
});
|
|
@@ -2459,88 +2459,88 @@ var WalkerExplorer = (() => {
|
|
|
2459
2459
|
|
|
2460
2460
|
// ../../packages/collector/dist/index.mjs
|
|
2461
2461
|
var e2;
|
|
2462
|
-
var
|
|
2463
|
-
var
|
|
2464
|
-
var o = (e2 = { "package.json"(e3,
|
|
2465
|
-
|
|
2462
|
+
var t2;
|
|
2463
|
+
var n2 = Object.getOwnPropertyNames;
|
|
2464
|
+
var o = (e2 = { "package.json"(e3, t3) {
|
|
2465
|
+
t3.exports = { name: "@walkeros/collector", description: "Unified platform-agnostic collector for walkerOS", version: "0.0.8", main: "./dist/index.js", module: "./dist/index.mjs", types: "./dist/index.d.ts", license: "MIT", files: ["dist/**"], scripts: { build: "tsup --silent", clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist", dev: "jest --watchAll --colors", lint: 'tsc && eslint "**/*.ts*"', test: "jest", update: "npx npm-check-updates -u && npm update" }, dependencies: { "@walkeros/core": "0.0.8" }, devDependencies: {}, repository: { url: "git+https://github.com/elbwalker/walkerOS.git", directory: "packages/collector" }, author: "elbwalker <hello@elbwalker.com>", homepage: "https://github.com/elbwalker/walkerOS#readme", bugs: { url: "https://github.com/elbwalker/walkerOS/issues" }, keywords: ["walker", "walkerOS", "analytics", "tracking", "data collection", "measurement", "data privacy", "privacy friendly", "collector", "event processing"], funding: [{ type: "GitHub Sponsors", url: "https://github.com/sponsors/elbwalker" }] };
|
|
2466
2466
|
} }, function() {
|
|
2467
|
-
return
|
|
2467
|
+
return t2 || (0, e2[n2(e2)[0]])((t2 = { exports: {} }).exports, t2), t2.exports;
|
|
2468
2468
|
});
|
|
2469
2469
|
var s = { Action: "action", Config: "config", Consent: "consent", Context: "context", Custom: "custom", Destination: "destination", Elb: "elb", Globals: "globals", Hook: "hook", Init: "init", Link: "link", On: "on", Prefix: "data-elb", Ready: "ready", Run: "run", Session: "session", User: "user", Walker: "walker" };
|
|
2470
2470
|
var i = { Commands: s, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } };
|
|
2471
|
-
function S2(e3,
|
|
2472
|
-
const o2 = e3.on, s2 = o2[
|
|
2471
|
+
function S2(e3, t3, n3) {
|
|
2472
|
+
const o2 = e3.on, s2 = o2[t3] || [], i2 = k(n3) ? n3 : [n3];
|
|
2473
2473
|
i2.forEach((e4) => {
|
|
2474
2474
|
s2.push(e4);
|
|
2475
|
-
}), o2[
|
|
2475
|
+
}), o2[t3] = s2, D2(e3, t3, i2);
|
|
2476
2476
|
}
|
|
2477
|
-
function D2(e3,
|
|
2478
|
-
let s2 =
|
|
2479
|
-
if (
|
|
2477
|
+
function D2(e3, t3, n3, o2) {
|
|
2478
|
+
let s2 = n3 || [];
|
|
2479
|
+
if (n3 || (s2 = e3.on[t3] || [], Object.values(e3.destinations).forEach((e4) => {
|
|
2480
2480
|
var _a;
|
|
2481
|
-
const
|
|
2482
|
-
|
|
2483
|
-
})), s2.length) switch (
|
|
2481
|
+
const n4 = (_a = e4.config.on) == null ? void 0 : _a[t3];
|
|
2482
|
+
n4 && (s2 = s2.concat(n4));
|
|
2483
|
+
})), s2.length) switch (t3) {
|
|
2484
2484
|
case i.Commands.Consent:
|
|
2485
|
-
!function(e4,
|
|
2486
|
-
const o3 =
|
|
2487
|
-
|
|
2488
|
-
Object.keys(o3).filter((e5) => e5 in
|
|
2489
|
-
G(n5
|
|
2485
|
+
!function(e4, t4, n4) {
|
|
2486
|
+
const o3 = n4 || e4.consent;
|
|
2487
|
+
t4.forEach((t5) => {
|
|
2488
|
+
Object.keys(o3).filter((e5) => e5 in t5).forEach((n5) => {
|
|
2489
|
+
G(t5[n5])(e4, o3);
|
|
2490
2490
|
});
|
|
2491
2491
|
});
|
|
2492
2492
|
}(e3, s2, o2);
|
|
2493
2493
|
break;
|
|
2494
2494
|
case i.Commands.Ready:
|
|
2495
2495
|
case i.Commands.Run:
|
|
2496
|
-
!function(e4,
|
|
2497
|
-
e4.allowed &&
|
|
2498
|
-
G(
|
|
2496
|
+
!function(e4, t4) {
|
|
2497
|
+
e4.allowed && t4.forEach((t5) => {
|
|
2498
|
+
G(t5)(e4);
|
|
2499
2499
|
});
|
|
2500
2500
|
}(e3, s2);
|
|
2501
2501
|
break;
|
|
2502
2502
|
case i.Commands.Session:
|
|
2503
|
-
!function(e4,
|
|
2503
|
+
!function(e4, t4) {
|
|
2504
2504
|
if (!e4.session) return;
|
|
2505
|
-
|
|
2506
|
-
G(
|
|
2505
|
+
t4.forEach((t5) => {
|
|
2506
|
+
G(t5)(e4, e4.session);
|
|
2507
2507
|
});
|
|
2508
2508
|
}(e3, s2);
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
function R(e3,
|
|
2511
|
+
function R(e3, t3, n3, o2) {
|
|
2512
2512
|
return __async(this, null, function* () {
|
|
2513
2513
|
let s2;
|
|
2514
|
-
switch (
|
|
2514
|
+
switch (t3) {
|
|
2515
2515
|
case i.Commands.Config:
|
|
2516
|
-
M(
|
|
2516
|
+
M(n3) && v(e3.config, n3, { shallow: false });
|
|
2517
2517
|
break;
|
|
2518
2518
|
case i.Commands.Consent:
|
|
2519
|
-
M(
|
|
2519
|
+
M(n3) && (s2 = yield M2(e3, n3));
|
|
2520
2520
|
break;
|
|
2521
2521
|
case i.Commands.Custom:
|
|
2522
|
-
M(
|
|
2522
|
+
M(n3) && (e3.custom = v(e3.custom, n3));
|
|
2523
2523
|
break;
|
|
2524
2524
|
case i.Commands.Destination:
|
|
2525
|
-
M(
|
|
2525
|
+
M(n3) && $(n3.push) && (s2 = yield L(e3, n3, o2));
|
|
2526
2526
|
break;
|
|
2527
2527
|
case i.Commands.Globals:
|
|
2528
|
-
M(
|
|
2528
|
+
M(n3) && (e3.globals = v(e3.globals, n3));
|
|
2529
2529
|
break;
|
|
2530
2530
|
case i.Commands.On:
|
|
2531
|
-
T(
|
|
2531
|
+
T(n3) && S2(e3, n3, o2);
|
|
2532
2532
|
break;
|
|
2533
2533
|
case i.Commands.Run:
|
|
2534
|
-
s2 = yield $2(e3,
|
|
2534
|
+
s2 = yield $2(e3, n3);
|
|
2535
2535
|
break;
|
|
2536
2536
|
case i.Commands.User:
|
|
2537
|
-
M(
|
|
2537
|
+
M(n3) && v(e3.user, n3, { shallow: false });
|
|
2538
2538
|
}
|
|
2539
2539
|
return s2 || { ok: true, successful: [], queued: [], failed: [] };
|
|
2540
2540
|
});
|
|
2541
2541
|
}
|
|
2542
|
-
function P2(e3,
|
|
2543
|
-
const o2 = P(
|
|
2542
|
+
function P2(e3, t3, n3 = {}) {
|
|
2543
|
+
const o2 = P(t3, "") ? __spreadValues({ event: t3 }, n3) : __spreadValues(__spreadValues({}, n3), t3 || {});
|
|
2544
2544
|
if (!o2.event) throw new Error("Event name is required");
|
|
2545
2545
|
const [i2, a] = o2.event.split(" ");
|
|
2546
2546
|
if (!i2 || !a) throw new Error("Event name is invalid");
|
|
@@ -2549,31 +2549,32 @@ var WalkerExplorer = (() => {
|
|
|
2549
2549
|
const { timestamp: r2 = Date.now(), group: c = e3.group, count: u = e3.count } = o2, { event: l = `${i2} ${a}`, data: d = {}, context: g = {}, globals: f = e3.globals, custom: m = {}, user: p = e3.user, nested: b = [], consent: w2 = e3.consent, id: h = `${r2}-${c}-${u}`, trigger: k2 = "", entity: y = i2, action: v2 = a, timing: q = 0, version: C2 = { source: e3.version, tagging: e3.config.tagging || 0 }, source: O2 = { type: "collector", id: "", previous_id: "" } } = o2;
|
|
2550
2550
|
return { event: { event: l, data: d, context: g, globals: f, custom: m, user: p, nested: b, consent: w2, id: h, trigger: k2, entity: y, action: v2, timestamp: r2, timing: q, group: c, count: u, version: C2, source: O2 } };
|
|
2551
2551
|
}
|
|
2552
|
-
function $2(e3,
|
|
2552
|
+
function $2(e3, t3) {
|
|
2553
2553
|
return __async(this, null, function* () {
|
|
2554
|
-
e3.allowed = true, e3.count = 0, e3.group = K(), e3.timing = Date.now(),
|
|
2554
|
+
e3.allowed = true, e3.count = 0, e3.group = K(), e3.timing = Date.now(), t3 && (t3.consent && (e3.consent = v(e3.consent, t3.consent)), t3.user && (e3.user = v(e3.user, t3.user)), t3.globals && (e3.globals = v(e3.config.globalsStatic || {}, t3.globals)), t3.custom && (e3.custom = v(e3.custom, t3.custom))), Object.values(e3.destinations).forEach((e4) => {
|
|
2555
2555
|
e4.queue = [];
|
|
2556
|
-
}), e3.
|
|
2557
|
-
|
|
2556
|
+
}), e3.queue = [], e3.round++;
|
|
2557
|
+
const n3 = yield U2(e3);
|
|
2558
|
+
return D2(e3, "run"), n3;
|
|
2558
2559
|
});
|
|
2559
2560
|
}
|
|
2560
|
-
function I2(e3,
|
|
2561
|
+
function I2(e3, t3, n3) {
|
|
2561
2562
|
return ce((o2, s2, i2) => __async(null, null, function* () {
|
|
2562
2563
|
return yield J(() => __async(null, null, function* () {
|
|
2563
2564
|
if ("string" == typeof o2 && o2.startsWith("walker ")) {
|
|
2564
|
-
const
|
|
2565
|
-
return yield
|
|
2565
|
+
const n4 = o2.replace("walker ", "");
|
|
2566
|
+
return yield t3(e3, n4, s2, i2);
|
|
2566
2567
|
}
|
|
2567
2568
|
{
|
|
2568
|
-
const a =
|
|
2569
|
-
return c ? yield
|
|
2569
|
+
const a = n3("string" == typeof o2 ? { event: o2 } : o2), { event: r2, command: c } = P2(e3, a.event, a);
|
|
2570
|
+
return c ? yield t3(e3, c, s2, i2) : yield U2(e3, r2);
|
|
2570
2571
|
}
|
|
2571
2572
|
}), () => B2({ ok: false }))();
|
|
2572
2573
|
}), "Push", e3.hooks);
|
|
2573
2574
|
}
|
|
2574
|
-
function L(e3,
|
|
2575
|
+
function L(e3, t3, n3) {
|
|
2575
2576
|
return __async(this, null, function* () {
|
|
2576
|
-
const o2 =
|
|
2577
|
+
const o2 = n3 || t3.config || { init: false }, s2 = __spreadProps(__spreadValues({}, t3), { config: o2 });
|
|
2577
2578
|
let i2 = o2.id;
|
|
2578
2579
|
if (!i2) do {
|
|
2579
2580
|
i2 = K(4);
|
|
@@ -2581,70 +2582,70 @@ var WalkerExplorer = (() => {
|
|
|
2581
2582
|
return e3.destinations[i2] = s2, false !== o2.queue && (s2.queue = [...e3.queue]), U2(e3, void 0, { [i2]: s2 });
|
|
2582
2583
|
});
|
|
2583
2584
|
}
|
|
2584
|
-
function U2(e3,
|
|
2585
|
+
function U2(e3, t3, n3) {
|
|
2585
2586
|
return __async(this, null, function* () {
|
|
2586
2587
|
const { allowed: o2, consent: s2, globals: i2, user: a } = e3;
|
|
2587
2588
|
if (!o2) return B2({ ok: false });
|
|
2588
|
-
|
|
2589
|
-
const u = yield Promise.all(Object.entries(
|
|
2589
|
+
t3 && e3.queue.push(t3), n3 || (n3 = e3.destinations);
|
|
2590
|
+
const u = yield Promise.all(Object.entries(n3 || {}).map((_0) => __async(null, [_0], function* ([n4, o3]) {
|
|
2590
2591
|
let u2 = (o3.queue || []).map((e4) => __spreadProps(__spreadValues({}, e4), { consent: s2 }));
|
|
2591
|
-
if (o3.queue = [],
|
|
2592
|
-
let
|
|
2592
|
+
if (o3.queue = [], t3) {
|
|
2593
|
+
let n5 = C(t3);
|
|
2593
2594
|
yield Promise.all(Object.entries(o3.config.policy || []).map((_02) => __async(null, [_02], function* ([o4, s3]) {
|
|
2594
|
-
const i3 = yield Y(
|
|
2595
|
-
|
|
2596
|
-
}))), u2.push(
|
|
2595
|
+
const i3 = yield Y(t3, s3, { collector: e3 });
|
|
2596
|
+
n5 = N(n5, o4, i3);
|
|
2597
|
+
}))), u2.push(n5);
|
|
2597
2598
|
}
|
|
2598
|
-
if (!u2.length) return { id:
|
|
2599
|
+
if (!u2.length) return { id: n4, destination: o3, skipped: true };
|
|
2599
2600
|
const l2 = [], d2 = u2.filter((e4) => {
|
|
2600
|
-
const
|
|
2601
|
-
return !
|
|
2601
|
+
const t4 = D(o3.config.consent, s2, e4.consent);
|
|
2602
|
+
return !t4 || (e4.consent = t4, l2.push(e4), false);
|
|
2602
2603
|
});
|
|
2603
|
-
if (o3.queue.concat(d2), !l2.length) return { id:
|
|
2604
|
-
if (!(yield J(_)(e3, o3))) return { id:
|
|
2604
|
+
if (o3.queue.concat(d2), !l2.length) return { id: n4, destination: o3, queue: u2 };
|
|
2605
|
+
if (!(yield J(_)(e3, o3))) return { id: n4, destination: o3, queue: u2 };
|
|
2605
2606
|
let f2 = false;
|
|
2606
|
-
return o3.dlq || (o3.dlq = []), yield Promise.all(l2.map((
|
|
2607
|
-
return
|
|
2608
|
-
}))), { id:
|
|
2607
|
+
return o3.dlq || (o3.dlq = []), yield Promise.all(l2.map((t4) => __async(null, null, function* () {
|
|
2608
|
+
return t4.globals = v(i2, t4.globals), t4.user = v(a, t4.user), yield J(A2, (n5) => (e3.config.onError && e3.config.onError(n5, e3), f2 = true, o3.dlq.push([t4, n5]), false))(e3, o3, t4), t4;
|
|
2609
|
+
}))), { id: n4, destination: o3, error: f2 };
|
|
2609
2610
|
}))), l = [], d = [], f = [];
|
|
2610
2611
|
for (const e4 of u) {
|
|
2611
2612
|
if (e4.skipped) continue;
|
|
2612
|
-
const
|
|
2613
|
-
e4.error ? f.push(
|
|
2613
|
+
const t4 = e4.destination, n4 = { id: e4.id, destination: t4 };
|
|
2614
|
+
e4.error ? f.push(n4) : e4.queue && e4.queue.length ? (t4.queue = (t4.queue || []).concat(e4.queue), d.push(n4)) : l.push(n4);
|
|
2614
2615
|
}
|
|
2615
|
-
return B2({ ok: !f.length, event:
|
|
2616
|
+
return B2({ ok: !f.length, event: t3, successful: l, queued: d, failed: f });
|
|
2616
2617
|
});
|
|
2617
2618
|
}
|
|
2618
|
-
function _(e3,
|
|
2619
|
+
function _(e3, t3) {
|
|
2619
2620
|
return __async(this, null, function* () {
|
|
2620
|
-
if (
|
|
2621
|
-
const
|
|
2621
|
+
if (t3.init && !t3.config.init) {
|
|
2622
|
+
const n3 = { collector: e3, config: t3.config, wrap: G2(t3, e3) }, o2 = yield ce(t3.init, "DestinationInit", e3.hooks)(n3);
|
|
2622
2623
|
if (false === o2) return o2;
|
|
2623
|
-
|
|
2624
|
+
t3.config = __spreadProps(__spreadValues({}, o2 || t3.config), { init: true });
|
|
2624
2625
|
}
|
|
2625
2626
|
return true;
|
|
2626
2627
|
});
|
|
2627
2628
|
}
|
|
2628
|
-
function A2(e3,
|
|
2629
|
+
function A2(e3, t3, n3) {
|
|
2629
2630
|
return __async(this, null, function* () {
|
|
2630
2631
|
var _a;
|
|
2631
|
-
const { config: o2 } =
|
|
2632
|
-
let a = o2.data && (yield Y(
|
|
2632
|
+
const { config: o2 } = t3, { eventMapping: s2, mappingKey: i2 } = yield Q(n3, o2.mapping);
|
|
2633
|
+
let a = o2.data && (yield Y(n3, o2.data, { collector: e3 }));
|
|
2633
2634
|
if (s2) {
|
|
2634
2635
|
if (s2.ignore) return false;
|
|
2635
|
-
if (s2.name && (
|
|
2636
|
-
const
|
|
2637
|
-
a = M(a) && M(
|
|
2636
|
+
if (s2.name && (n3.event = s2.name), s2.data) {
|
|
2637
|
+
const t4 = s2.data && (yield Y(n3, s2.data, { collector: e3 }));
|
|
2638
|
+
a = M(a) && M(t4) ? v(a, t4) : t4;
|
|
2638
2639
|
}
|
|
2639
2640
|
}
|
|
2640
|
-
const c = { collector: e3, config: o2, data: a, mapping: s2, wrap: G2(
|
|
2641
|
-
if ((s2 == null ? void 0 : s2.batch) &&
|
|
2641
|
+
const c = { collector: e3, config: o2, data: a, mapping: s2, wrap: G2(t3, e3) };
|
|
2642
|
+
if ((s2 == null ? void 0 : s2.batch) && t3.pushBatch) {
|
|
2642
2643
|
const r2 = s2.batched || { key: i2 || "", events: [], data: [] };
|
|
2643
|
-
r2.events.push(
|
|
2644
|
-
const
|
|
2645
|
-
ce(e4.pushBatch, "DestinationPushBatch",
|
|
2646
|
-
}, s2.batch), s2.batched = r2, (_a = s2.batchFn) == null ? void 0 : _a.call(s2,
|
|
2647
|
-
} else yield ce(
|
|
2644
|
+
r2.events.push(n3), O(a) && r2.data.push(a), s2.batchFn = s2.batchFn || U((e4, t4) => {
|
|
2645
|
+
const n4 = { collector: t4, config: o2, data: a, mapping: s2, wrap: G2(e4, t4) };
|
|
2646
|
+
ce(e4.pushBatch, "DestinationPushBatch", t4.hooks)(r2, n4), r2.events = [], r2.data = [];
|
|
2647
|
+
}, s2.batch), s2.batched = r2, (_a = s2.batchFn) == null ? void 0 : _a.call(s2, t3, e3);
|
|
2648
|
+
} else yield ce(t3.push, "DestinationPush", e3.hooks)(n3, c);
|
|
2648
2649
|
return true;
|
|
2649
2650
|
});
|
|
2650
2651
|
}
|
|
@@ -2653,63 +2654,63 @@ var WalkerExplorer = (() => {
|
|
|
2653
2654
|
return v({ ok: !((_a = e3 == null ? void 0 : e3.failed) == null ? void 0 : _a.length), successful: [], queued: [], failed: [] }, e3);
|
|
2654
2655
|
}
|
|
2655
2656
|
function F(e3) {
|
|
2656
|
-
return Object.entries(e3).reduce((e4, [
|
|
2657
|
+
return Object.entries(e3).reduce((e4, [t3, n3]) => (e4[t3] = __spreadProps(__spreadValues({}, n3), { config: M(n3.config) ? n3.config : {} }), e4), {});
|
|
2657
2658
|
}
|
|
2658
|
-
function G2(e3,
|
|
2659
|
+
function G2(e3, t3) {
|
|
2659
2660
|
var _a;
|
|
2660
|
-
const
|
|
2661
|
-
return he(e3.type || "unknown", __spreadValues(__spreadValues({},
|
|
2661
|
+
const n3 = e3.config.wrapper || {}, o2 = (_a = e3.config.dryRun) != null ? _a : t3 == null ? void 0 : t3.config.dryRun;
|
|
2662
|
+
return he(e3.type || "unknown", __spreadValues(__spreadValues({}, n3), O(o2) && { dryRun: o2 }));
|
|
2662
2663
|
}
|
|
2663
|
-
function M2(e3,
|
|
2664
|
+
function M2(e3, t3) {
|
|
2664
2665
|
return __async(this, null, function* () {
|
|
2665
|
-
const { consent:
|
|
2666
|
+
const { consent: n3 } = e3;
|
|
2666
2667
|
let o2 = false;
|
|
2667
2668
|
const s2 = {};
|
|
2668
|
-
return Object.entries(
|
|
2669
|
-
const
|
|
2670
|
-
s2[e4] =
|
|
2671
|
-
}), e3.consent = v(
|
|
2669
|
+
return Object.entries(t3).forEach(([e4, t4]) => {
|
|
2670
|
+
const n4 = !!t4;
|
|
2671
|
+
s2[e4] = n4, o2 = o2 || n4;
|
|
2672
|
+
}), e3.consent = v(n3, s2), D2(e3, "consent", void 0, s2), o2 ? U2(e3) : B2({ ok: true });
|
|
2672
2673
|
});
|
|
2673
2674
|
}
|
|
2674
|
-
function T2(e3,
|
|
2675
|
+
function T2(e3, t3, n3) {
|
|
2675
2676
|
return __async(this, null, function* () {
|
|
2676
2677
|
var _a, _b;
|
|
2677
|
-
const o2 = { disabled: (_a =
|
|
2678
|
+
const o2 = { disabled: (_a = n3.disabled) != null ? _a : false, settings: (_b = n3.settings) != null ? _b : {}, onError: n3.onError };
|
|
2678
2679
|
if (o2.disabled) return {};
|
|
2679
|
-
const s2 = yield J(
|
|
2680
|
+
const s2 = yield J(t3)(e3, o2);
|
|
2680
2681
|
if (!s2 || !s2.source) return {};
|
|
2681
|
-
const i2 = o2.type || s2.source.type || "", a =
|
|
2682
|
+
const i2 = o2.type || s2.source.type || "", a = n3.id || `${i2}_${K(5)}`;
|
|
2682
2683
|
if (s2.source && s2.elb) {
|
|
2683
2684
|
s2.source.elb = s2.elb;
|
|
2684
2685
|
}
|
|
2685
|
-
return e3.sources[a] = { type: i2, settings: o2.settings, mapping: void 0, elb: s2.elb }, s2;
|
|
2686
|
+
return e3.sources || (e3.sources = {}), e3.sources[a] = { type: i2, settings: o2.settings, mapping: void 0, elb: s2.elb }, s2;
|
|
2686
2687
|
});
|
|
2687
2688
|
}
|
|
2688
2689
|
function z(_0) {
|
|
2689
|
-
return __async(this, arguments, function* (e3,
|
|
2690
|
-
for (const [
|
|
2691
|
-
const
|
|
2692
|
-
if (
|
|
2693
|
-
if (
|
|
2694
|
-
|
|
2690
|
+
return __async(this, arguments, function* (e3, t3 = {}) {
|
|
2691
|
+
for (const [n3, o2] of Object.entries(t3)) {
|
|
2692
|
+
const t4 = { id: n3 }, s2 = yield T2(e3, o2, t4);
|
|
2693
|
+
if (s2.source) {
|
|
2694
|
+
if (s2.elb) {
|
|
2695
|
+
s2.source.elb = s2.elb;
|
|
2695
2696
|
}
|
|
2696
|
-
e3.sources[
|
|
2697
|
+
e3.sources[n3] = { type: s2.source.type, settings: s2.source.config.settings, mapping: void 0, elb: s2.elb };
|
|
2697
2698
|
}
|
|
2698
2699
|
}
|
|
2699
2700
|
});
|
|
2700
2701
|
}
|
|
2701
2702
|
function J2() {
|
|
2702
2703
|
return __async(this, arguments, function* (e3 = {}) {
|
|
2703
|
-
const
|
|
2704
|
-
const { version:
|
|
2705
|
-
function s3(e5,
|
|
2706
|
-
ee({ message: e5 },
|
|
2704
|
+
const t3 = function(e4) {
|
|
2705
|
+
const { version: t4 } = o(), n4 = v({ dryRun: false, globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: s3, run: true, destinations: {}, consent: {}, user: {}, globals: {}, custom: {} }, e4, { merge: false, extend: false });
|
|
2706
|
+
function s3(e5, t5) {
|
|
2707
|
+
ee({ message: e5 }, t5 || n4.verbose);
|
|
2707
2708
|
}
|
|
2708
|
-
|
|
2709
|
-
const i3 = __spreadValues(__spreadValues({},
|
|
2709
|
+
n4.onLog = s3;
|
|
2710
|
+
const i3 = __spreadValues(__spreadValues({}, n4.globalsStatic), n4.globals), a2 = { allowed: false, config: n4, consent: n4.consent || {}, count: 0, custom: n4.custom || {}, destinations: F(n4.destinations || {}), globals: i3, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: n4.user || {}, version: t4, sources: {}, push: void 0 };
|
|
2710
2711
|
return a2.push = I2(a2, R, (e5) => __spreadValues({ timing: Math.round((Date.now() - a2.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" } }, e5)), a2;
|
|
2711
|
-
}(e3), { consent:
|
|
2712
|
-
return
|
|
2712
|
+
}(e3), { consent: n3, user: s2, globals: i2, custom: a, sources: r2 } = e3;
|
|
2713
|
+
return n3 && (yield t3.push("walker consent", n3)), s2 && (yield t3.push("walker user", s2)), i2 && Object.assign(t3.globals, i2), a && Object.assign(t3.custom, a), r2 && (yield z(t3, r2)), t3.config.run && (yield t3.push("walker run")), { collector: t3, elb: t3.push };
|
|
2713
2714
|
});
|
|
2714
2715
|
}
|
|
2715
2716
|
|