@walkeros/cli 0.4.0 → 0.4.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/CHANGELOG.md +10 -0
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +2 -0
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js +285 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +1 -0
- package/dist/__tests__/bundle/bundler.test.js +3 -3
- package/dist/__tests__/bundle/bundler.test.js.map +1 -1
- package/dist/__tests__/bundle/programmatic.test.js +1 -1
- package/dist/__tests__/bundle/programmatic.test.js.map +1 -1
- package/dist/__tests__/bundle/serializer.test.js +1 -1
- package/dist/__tests__/bundle/serializer.test.js.map +1 -1
- package/dist/__tests__/bundle/template-engine.test.js +1 -1
- package/dist/__tests__/bundle/template-engine.test.js.map +1 -1
- package/dist/__tests__/cli-e2e.test.js +1 -1
- package/dist/__tests__/cli-e2e.test.js.map +1 -1
- package/dist/__tests__/cli.test.js +4 -73
- package/dist/__tests__/cli.test.js.map +1 -1
- package/dist/__tests__/config-loader.test.js +8 -5
- package/dist/__tests__/config-loader.test.js.map +1 -1
- package/dist/__tests__/core/config.test.js +1 -1
- package/dist/__tests__/core/config.test.js.map +1 -1
- package/dist/__tests__/core/logger.test.js +1 -1
- package/dist/__tests__/core/logger.test.js.map +1 -1
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +8 -0
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js +50 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +1 -0
- package/dist/__tests__/push/push.test.d.ts +7 -0
- package/dist/__tests__/push/push.test.d.ts.map +1 -0
- package/dist/__tests__/push/push.test.js +197 -0
- package/dist/__tests__/push/push.test.js.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts +2 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.js +47 -0
- package/dist/__tests__/simulate/env-loader.test.js.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts +8 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.js +58 -0
- package/dist/__tests__/smoke/production.smoke.test.js.map +1 -0
- package/dist/commands/bundle/bundler.d.ts +2 -2
- package/dist/commands/bundle/bundler.d.ts.map +1 -1
- package/dist/commands/bundle/bundler.js +63 -51
- package/dist/commands/bundle/bundler.js.map +1 -1
- package/dist/commands/bundle/index.d.ts +1 -1
- package/dist/commands/bundle/index.d.ts.map +1 -1
- package/dist/commands/bundle/index.js +11 -23
- package/dist/commands/bundle/index.js.map +1 -1
- package/dist/commands/bundle/package-manager.d.ts +1 -1
- package/dist/commands/bundle/package-manager.d.ts.map +1 -1
- package/dist/commands/bundle/serializer.d.ts +1 -1
- package/dist/commands/bundle/serializer.d.ts.map +1 -1
- package/dist/commands/bundle/serializer.js +1 -1
- package/dist/commands/bundle/serializer.js.map +1 -1
- package/dist/commands/bundle/stats.d.ts +2 -2
- package/dist/commands/bundle/stats.d.ts.map +1 -1
- package/dist/commands/bundle/stats.js +1 -1
- package/dist/commands/bundle/stats.js.map +1 -1
- package/dist/commands/bundle/template-engine.d.ts +1 -1
- package/dist/commands/bundle/template-engine.d.ts.map +1 -1
- package/dist/commands/bundle/template-engine.js +2 -2
- package/dist/commands/bundle/template-engine.js.map +1 -1
- package/dist/commands/push/index.d.ts +7 -0
- package/dist/commands/push/index.d.ts.map +1 -0
- package/dist/commands/push/index.js +252 -0
- package/dist/commands/push/index.js.map +1 -0
- package/dist/commands/push/types.d.ts +21 -0
- package/dist/commands/push/types.d.ts.map +1 -0
- package/dist/commands/push/types.js +2 -0
- package/dist/commands/push/types.js.map +1 -0
- package/dist/commands/run/__tests__/run.integration.test.js +1 -1
- package/dist/commands/run/__tests__/run.integration.test.js.map +1 -1
- package/dist/commands/run/__tests__/validators.test.js +1 -1
- package/dist/commands/run/__tests__/validators.test.js.map +1 -1
- package/dist/commands/run/execution.d.ts +14 -0
- package/dist/commands/run/execution.d.ts.map +1 -0
- package/dist/commands/run/execution.js +37 -0
- package/dist/commands/run/execution.js.map +1 -0
- package/dist/commands/run/index.d.ts +1 -1
- package/dist/commands/run/index.d.ts.map +1 -1
- package/dist/commands/run/index.js +33 -107
- package/dist/commands/run/index.js.map +1 -1
- package/dist/commands/run/types.d.ts +1 -1
- package/dist/commands/run/types.d.ts.map +1 -1
- package/dist/commands/run/utils.d.ts +26 -0
- package/dist/commands/run/utils.d.ts.map +1 -0
- package/dist/commands/run/utils.js +58 -0
- package/dist/commands/run/utils.js.map +1 -0
- package/dist/commands/run/validators.d.ts +1 -1
- package/dist/commands/run/validators.d.ts.map +1 -1
- package/dist/commands/run/validators.js +1 -1
- package/dist/commands/run/validators.js.map +1 -1
- package/dist/commands/simulate/env-loader.d.ts +19 -0
- package/dist/commands/simulate/env-loader.d.ts.map +1 -0
- package/dist/commands/simulate/env-loader.js +46 -0
- package/dist/commands/simulate/env-loader.js.map +1 -0
- package/dist/commands/simulate/index.d.ts +3 -3
- package/dist/commands/simulate/index.d.ts.map +1 -1
- package/dist/commands/simulate/index.js +10 -19
- package/dist/commands/simulate/index.js.map +1 -1
- package/dist/commands/simulate/jsdom-executor.d.ts +13 -8
- package/dist/commands/simulate/jsdom-executor.d.ts.map +1 -1
- package/dist/commands/simulate/jsdom-executor.js +26 -49
- package/dist/commands/simulate/jsdom-executor.js.map +1 -1
- package/dist/commands/simulate/simulator.d.ts +1 -1
- package/dist/commands/simulate/simulator.d.ts.map +1 -1
- package/dist/commands/simulate/simulator.js +14 -10
- package/dist/commands/simulate/simulator.js.map +1 -1
- package/dist/commands/simulate/types.d.ts +2 -2
- package/dist/commands/simulate/types.d.ts.map +1 -1
- package/dist/config/defaults.d.ts +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/index.d.ts +8 -8
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +5 -5
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +23 -19
- package/dist/config/loader.js.map +1 -1
- package/dist/config/parser.d.ts +65 -1
- package/dist/config/parser.d.ts.map +1 -1
- package/dist/config/parser.js +176 -71
- package/dist/config/parser.js.map +1 -1
- package/dist/config/utils.d.ts.map +1 -1
- package/dist/config/utils.js +3 -2
- package/dist/config/utils.js.map +1 -1
- package/dist/config/validators.d.ts +4 -1
- package/dist/config/validators.d.ts.map +1 -1
- package/dist/config/validators.js +4 -2
- package/dist/config/validators.js.map +1 -1
- package/dist/core/asset-resolver.d.ts.map +1 -1
- package/dist/core/asset-resolver.js +10 -3
- package/dist/core/asset-resolver.js.map +1 -1
- package/dist/core/docker.d.ts +17 -1
- package/dist/core/docker.d.ts.map +1 -1
- package/dist/core/docker.js +22 -1
- package/dist/core/docker.js.map +1 -1
- package/dist/core/execution.d.ts +2 -2
- package/dist/core/execution.d.ts.map +1 -1
- package/dist/core/execution.js +1 -1
- package/dist/core/execution.js.map +1 -1
- package/dist/core/index.d.ts +8 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/logger.d.ts +11 -0
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +14 -0
- package/dist/core/logger.js.map +1 -1
- package/dist/core/temp-manager.d.ts +51 -0
- package/dist/core/temp-manager.d.ts.map +1 -0
- package/dist/core/temp-manager.js +73 -0
- package/dist/core/temp-manager.js.map +1 -0
- package/dist/core/utils.d.ts +10 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/core/utils.js +12 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2531 -121
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/examples/event.json +1 -1
- package/examples/server-collect.mjs +1360 -1190
- package/examples/web-serve.js +25469 -11
- package/package.json +3 -2
- package/dist/__tests__/bundle/bundler-integration.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler-integration.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler-integration.test.js +0 -106
- package/dist/__tests__/bundle/bundler-integration.test.js.map +0 -1
- package/dist/__tests__/simulate/programmatic.test.d.ts +0 -2
- package/dist/__tests__/simulate/programmatic.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/programmatic.test.js +0 -51
- package/dist/__tests__/simulate/programmatic.test.js.map +0 -1
- package/dist/__tests__/simulate/simulator.test.d.ts +0 -2
- package/dist/__tests__/simulate/simulator.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/simulator.test.js +0 -29
- package/dist/__tests__/simulate/simulator.test.js.map +0 -1
|
@@ -4,6 +4,524 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
// node_modules/@walkeros/core/dist/index.mjs
|
|
8
|
+
var m = { merge: true, shallow: true, extend: true };
|
|
9
|
+
function y(e5, t3 = {}, n5 = {}) {
|
|
10
|
+
n5 = { ...m, ...n5 };
|
|
11
|
+
const o2 = Object.entries(t3).reduce((t4, [o3, r3]) => {
|
|
12
|
+
const i3 = e5[o3];
|
|
13
|
+
return n5.merge && Array.isArray(i3) && Array.isArray(r3) ? t4[o3] = r3.reduce((e6, t5) => e6.includes(t5) ? e6 : [...e6, t5], [...i3]) : (n5.extend || o3 in e5) && (t4[o3] = r3), t4;
|
|
14
|
+
}, {});
|
|
15
|
+
return n5.shallow ? { ...e5, ...o2 } : (Object.assign(e5, o2), e5);
|
|
16
|
+
}
|
|
17
|
+
function b(e5) {
|
|
18
|
+
return Array.isArray(e5);
|
|
19
|
+
}
|
|
20
|
+
function w(e5) {
|
|
21
|
+
return "boolean" == typeof e5;
|
|
22
|
+
}
|
|
23
|
+
function x(e5) {
|
|
24
|
+
return void 0 !== e5;
|
|
25
|
+
}
|
|
26
|
+
function O(e5) {
|
|
27
|
+
return "function" == typeof e5;
|
|
28
|
+
}
|
|
29
|
+
function k(e5) {
|
|
30
|
+
return "number" == typeof e5 && !Number.isNaN(e5);
|
|
31
|
+
}
|
|
32
|
+
function S(e5) {
|
|
33
|
+
return "object" == typeof e5 && null !== e5 && !b(e5) && "[object Object]" === Object.prototype.toString.call(e5);
|
|
34
|
+
}
|
|
35
|
+
function A(e5) {
|
|
36
|
+
return "string" == typeof e5;
|
|
37
|
+
}
|
|
38
|
+
function P(e5, t3 = /* @__PURE__ */ new WeakMap()) {
|
|
39
|
+
if ("object" != typeof e5 || null === e5)
|
|
40
|
+
return e5;
|
|
41
|
+
if (t3.has(e5))
|
|
42
|
+
return t3.get(e5);
|
|
43
|
+
const n5 = Object.prototype.toString.call(e5);
|
|
44
|
+
if ("[object Object]" === n5) {
|
|
45
|
+
const n6 = {};
|
|
46
|
+
t3.set(e5, n6);
|
|
47
|
+
for (const o2 in e5)
|
|
48
|
+
Object.prototype.hasOwnProperty.call(e5, o2) && (n6[o2] = P(e5[o2], t3));
|
|
49
|
+
return n6;
|
|
50
|
+
}
|
|
51
|
+
if ("[object Array]" === n5) {
|
|
52
|
+
const n6 = [];
|
|
53
|
+
return t3.set(e5, n6), e5.forEach((e6) => {
|
|
54
|
+
n6.push(P(e6, t3));
|
|
55
|
+
}), n6;
|
|
56
|
+
}
|
|
57
|
+
if ("[object Date]" === n5)
|
|
58
|
+
return new Date(e5.getTime());
|
|
59
|
+
if ("[object RegExp]" === n5) {
|
|
60
|
+
const t4 = e5;
|
|
61
|
+
return new RegExp(t4.source, t4.flags);
|
|
62
|
+
}
|
|
63
|
+
return e5;
|
|
64
|
+
}
|
|
65
|
+
function $(e5, t3 = "", n5) {
|
|
66
|
+
const o2 = t3.split(".");
|
|
67
|
+
let r3 = e5;
|
|
68
|
+
for (let e6 = 0; e6 < o2.length; e6++) {
|
|
69
|
+
const t4 = o2[e6];
|
|
70
|
+
if ("*" === t4 && b(r3)) {
|
|
71
|
+
const t5 = o2.slice(e6 + 1).join("."), i3 = [];
|
|
72
|
+
for (const e7 of r3) {
|
|
73
|
+
const o3 = $(e7, t5, n5);
|
|
74
|
+
i3.push(o3);
|
|
75
|
+
}
|
|
76
|
+
return i3;
|
|
77
|
+
}
|
|
78
|
+
if (r3 = r3 instanceof Object ? r3[t4] : void 0, !r3)
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return x(r3) ? r3 : n5;
|
|
82
|
+
}
|
|
83
|
+
function M(e5, t3, n5) {
|
|
84
|
+
if (!S(e5))
|
|
85
|
+
return e5;
|
|
86
|
+
const o2 = P(e5), r3 = t3.split(".");
|
|
87
|
+
let i3 = o2;
|
|
88
|
+
for (let e6 = 0; e6 < r3.length; e6++) {
|
|
89
|
+
const t4 = r3[e6];
|
|
90
|
+
e6 === r3.length - 1 ? i3[t4] = n5 : (t4 in i3 && "object" == typeof i3[t4] && null !== i3[t4] || (i3[t4] = {}), i3 = i3[t4]);
|
|
91
|
+
}
|
|
92
|
+
return o2;
|
|
93
|
+
}
|
|
94
|
+
function N(e5) {
|
|
95
|
+
if ("true" === e5)
|
|
96
|
+
return true;
|
|
97
|
+
if ("false" === e5)
|
|
98
|
+
return false;
|
|
99
|
+
const t3 = Number(e5);
|
|
100
|
+
return e5 == t3 && "" !== e5 ? t3 : String(e5);
|
|
101
|
+
}
|
|
102
|
+
function T(e5, t3 = {}, n5 = {}) {
|
|
103
|
+
const o2 = { ...t3, ...n5 }, r3 = {};
|
|
104
|
+
let i3 = void 0 === e5;
|
|
105
|
+
return Object.keys(o2).forEach((t4) => {
|
|
106
|
+
o2[t4] && (r3[t4] = true, e5 && e5[t4] && (i3 = true));
|
|
107
|
+
}), !!i3 && r3;
|
|
108
|
+
}
|
|
109
|
+
function D(e5 = 6) {
|
|
110
|
+
let t3 = "";
|
|
111
|
+
for (let n5 = 36; t3.length < e5; )
|
|
112
|
+
t3 += (Math.random() * n5 | 0).toString(n5);
|
|
113
|
+
return t3;
|
|
114
|
+
}
|
|
115
|
+
function L(e5, t3 = 1e3, n5 = false) {
|
|
116
|
+
let o2, r3 = null, i3 = false;
|
|
117
|
+
return (...s3) => new Promise((c3) => {
|
|
118
|
+
const a4 = n5 && !i3;
|
|
119
|
+
r3 && clearTimeout(r3), r3 = setTimeout(() => {
|
|
120
|
+
r3 = null, n5 && !i3 || (o2 = e5(...s3), c3(o2));
|
|
121
|
+
}, t3), a4 && (i3 = true, o2 = e5(...s3), c3(o2));
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function V(e5) {
|
|
125
|
+
return w(e5) || A(e5) || k(e5) || !x(e5) || b(e5) && e5.every(V) || S(e5) && Object.values(e5).every(V);
|
|
126
|
+
}
|
|
127
|
+
function H(e5) {
|
|
128
|
+
return V(e5) ? e5 : void 0;
|
|
129
|
+
}
|
|
130
|
+
function U(e5, t3, n5) {
|
|
131
|
+
return function(...o2) {
|
|
132
|
+
try {
|
|
133
|
+
return e5(...o2);
|
|
134
|
+
} catch (e6) {
|
|
135
|
+
if (!t3)
|
|
136
|
+
return;
|
|
137
|
+
return t3(e6);
|
|
138
|
+
} finally {
|
|
139
|
+
n5?.();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function W(e5, t3, n5) {
|
|
144
|
+
return async function(...o2) {
|
|
145
|
+
try {
|
|
146
|
+
return await e5(...o2);
|
|
147
|
+
} catch (e6) {
|
|
148
|
+
if (!t3)
|
|
149
|
+
return;
|
|
150
|
+
return await t3(e6);
|
|
151
|
+
} finally {
|
|
152
|
+
await n5?.();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
async function q(e5, t3) {
|
|
157
|
+
const [n5, o2] = (e5.name || "").split(" ");
|
|
158
|
+
if (!t3 || !n5 || !o2)
|
|
159
|
+
return {};
|
|
160
|
+
let r3, i3 = "", s3 = n5, c3 = o2;
|
|
161
|
+
const a4 = (t4) => {
|
|
162
|
+
if (t4)
|
|
163
|
+
return (t4 = b(t4) ? t4 : [t4]).find((t5) => !t5.condition || t5.condition(e5));
|
|
164
|
+
};
|
|
165
|
+
t3[s3] || (s3 = "*");
|
|
166
|
+
const u2 = t3[s3];
|
|
167
|
+
return u2 && (u2[c3] || (c3 = "*"), r3 = a4(u2[c3])), r3 || (s3 = "*", c3 = "*", r3 = a4(t3[s3]?.[c3])), r3 && (i3 = `${s3} ${c3}`), { eventMapping: r3, mappingKey: i3 };
|
|
168
|
+
}
|
|
169
|
+
async function B(e5, t3 = {}, n5 = {}) {
|
|
170
|
+
if (!x(e5))
|
|
171
|
+
return;
|
|
172
|
+
const o2 = S(e5) && e5.consent || n5.consent || n5.collector?.consent, r3 = b(t3) ? t3 : [t3];
|
|
173
|
+
for (const t4 of r3) {
|
|
174
|
+
const r4 = await W(F)(e5, t4, { ...n5, consent: o2 });
|
|
175
|
+
if (x(r4))
|
|
176
|
+
return r4;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async function F(e5, t3, n5 = {}) {
|
|
180
|
+
const { collector: o2, consent: r3 } = n5;
|
|
181
|
+
return (b(t3) ? t3 : [t3]).reduce(async (t4, i3) => {
|
|
182
|
+
const s3 = await t4;
|
|
183
|
+
if (s3)
|
|
184
|
+
return s3;
|
|
185
|
+
const c3 = A(i3) ? { key: i3 } : i3;
|
|
186
|
+
if (!Object.keys(c3).length)
|
|
187
|
+
return;
|
|
188
|
+
const { condition: a4, consent: u2, fn: l4, key: p4, loop: d4, map: f2, set: g4, validate: m3, value: y4 } = c3;
|
|
189
|
+
if (a4 && !await W(a4)(e5, i3, o2))
|
|
190
|
+
return;
|
|
191
|
+
if (u2 && !T(u2, r3))
|
|
192
|
+
return y4;
|
|
193
|
+
let h3 = x(y4) ? y4 : e5;
|
|
194
|
+
if (l4 && (h3 = await W(l4)(e5, i3, n5)), p4 && (h3 = $(e5, p4, y4)), d4) {
|
|
195
|
+
const [t5, o3] = d4, r4 = "this" === t5 ? [e5] : await B(e5, t5, n5);
|
|
196
|
+
b(r4) && (h3 = (await Promise.all(r4.map((e6) => B(e6, o3, n5)))).filter(x));
|
|
197
|
+
} else
|
|
198
|
+
f2 ? h3 = await Object.entries(f2).reduce(async (t5, [o3, r4]) => {
|
|
199
|
+
const i4 = await t5, s4 = await B(e5, r4, n5);
|
|
200
|
+
return x(s4) && (i4[o3] = s4), i4;
|
|
201
|
+
}, Promise.resolve({})) : g4 && (h3 = await Promise.all(g4.map((t5) => F(e5, t5, n5))));
|
|
202
|
+
m3 && !await W(m3)(h3) && (h3 = void 0);
|
|
203
|
+
const w3 = H(h3);
|
|
204
|
+
return x(w3) ? w3 : H(y4);
|
|
205
|
+
}, Promise.resolve(void 0));
|
|
206
|
+
}
|
|
207
|
+
async function X(e5, t3, n5) {
|
|
208
|
+
t3.policy && await Promise.all(Object.entries(t3.policy).map(async ([t4, o3]) => {
|
|
209
|
+
const r4 = await B(e5, o3, { collector: n5 });
|
|
210
|
+
e5 = M(e5, t4, r4);
|
|
211
|
+
}));
|
|
212
|
+
const { eventMapping: o2, mappingKey: r3 } = await q(e5, t3.mapping);
|
|
213
|
+
o2?.policy && await Promise.all(Object.entries(o2.policy).map(async ([t4, o3]) => {
|
|
214
|
+
const r4 = await B(e5, o3, { collector: n5 });
|
|
215
|
+
e5 = M(e5, t4, r4);
|
|
216
|
+
}));
|
|
217
|
+
let i3 = t3.data && await B(e5, t3.data, { collector: n5 });
|
|
218
|
+
if (o2) {
|
|
219
|
+
if (o2.ignore)
|
|
220
|
+
return { event: e5, data: i3, mapping: o2, mappingKey: r3, ignore: true };
|
|
221
|
+
if (o2.name && (e5.name = o2.name), o2.data) {
|
|
222
|
+
const t4 = o2.data && await B(e5, o2.data, { collector: n5 });
|
|
223
|
+
i3 = S(i3) && S(t4) ? y(i3, t4) : t4;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return { event: e5, data: i3, mapping: o2, mappingKey: r3, ignore: false };
|
|
227
|
+
}
|
|
228
|
+
function Q(e5, t3 = false) {
|
|
229
|
+
t3 && console.dir(e5, { depth: 4 });
|
|
230
|
+
}
|
|
231
|
+
function Y(e5) {
|
|
232
|
+
const t3 = String(e5), n5 = t3.split("?")[1] || t3;
|
|
233
|
+
return U(() => {
|
|
234
|
+
const e6 = new URLSearchParams(n5), t4 = {};
|
|
235
|
+
return e6.forEach((e7, n6) => {
|
|
236
|
+
const o2 = n6.split(/[[\]]+/).filter(Boolean);
|
|
237
|
+
let r3 = t4;
|
|
238
|
+
o2.forEach((t5, n7) => {
|
|
239
|
+
const i3 = n7 === o2.length - 1;
|
|
240
|
+
if (b(r3)) {
|
|
241
|
+
const s3 = parseInt(t5, 10);
|
|
242
|
+
i3 ? r3[s3] = N(e7) : (r3[s3] = r3[s3] || (isNaN(parseInt(o2[n7 + 1], 10)) ? {} : []), r3 = r3[s3]);
|
|
243
|
+
} else
|
|
244
|
+
S(r3) && (i3 ? r3[t5] = N(e7) : (r3[t5] = r3[t5] || (isNaN(parseInt(o2[n7 + 1], 10)) ? {} : []), r3 = r3[t5]));
|
|
245
|
+
});
|
|
246
|
+
}), t4;
|
|
247
|
+
})();
|
|
248
|
+
}
|
|
249
|
+
function re(e5, t3, n5) {
|
|
250
|
+
return function(...o2) {
|
|
251
|
+
let r3;
|
|
252
|
+
const i3 = "post" + t3, s3 = n5["pre" + t3], c3 = n5[i3];
|
|
253
|
+
return r3 = s3 ? s3({ fn: e5 }, ...o2) : e5(...o2), c3 && (r3 = c3({ fn: e5, result: r3 }, ...o2)), r3;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// node_modules/@walkeros/collector/dist/index.mjs
|
|
258
|
+
var n = { Action: "action", Actions: "actions", 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" };
|
|
259
|
+
var e = { Commands: n, Utils: { Storage: { Cookie: "cookie", Local: "local", Session: "session" } } };
|
|
260
|
+
async function d(n5, e5, o2) {
|
|
261
|
+
const { code: s3, config: t3 = {}, env: a4 = {} } = e5, c3 = o2 || t3 || { init: false }, r3 = { ...s3, config: c3, env: y2(s3.env, a4) };
|
|
262
|
+
let u2 = r3.config.id;
|
|
263
|
+
if (!u2)
|
|
264
|
+
do {
|
|
265
|
+
u2 = D(4);
|
|
266
|
+
} while (n5.destinations[u2]);
|
|
267
|
+
return n5.destinations[u2] = r3, false !== r3.config.queue && (r3.queue = [...n5.queue]), g(n5, void 0, { [u2]: r3 });
|
|
268
|
+
}
|
|
269
|
+
async function g(n5, e5, o2) {
|
|
270
|
+
const { allowed: a4, consent: i3, globals: r3, user: u2 } = n5;
|
|
271
|
+
if (!a4)
|
|
272
|
+
return b2({ ok: false });
|
|
273
|
+
e5 && n5.queue.push(e5), o2 || (o2 = n5.destinations);
|
|
274
|
+
const l4 = await Promise.all(Object.entries(o2 || {}).map(async ([o3, a5]) => {
|
|
275
|
+
let l5 = (a5.queue || []).map((n6) => ({ ...n6, consent: i3 }));
|
|
276
|
+
if (a5.queue = [], e5) {
|
|
277
|
+
const n6 = P(e5);
|
|
278
|
+
l5.push(n6);
|
|
279
|
+
}
|
|
280
|
+
if (!l5.length)
|
|
281
|
+
return { id: o3, destination: a5, skipped: true };
|
|
282
|
+
const f3 = [], d5 = l5.filter((n6) => {
|
|
283
|
+
const e6 = T(a5.config.consent, i3, n6.consent);
|
|
284
|
+
return !e6 || (n6.consent = e6, f3.push(n6), false);
|
|
285
|
+
});
|
|
286
|
+
if (a5.queue.concat(d5), !f3.length)
|
|
287
|
+
return { id: o3, destination: a5, queue: l5 };
|
|
288
|
+
if (!await W(p)(n5, a5))
|
|
289
|
+
return { id: o3, destination: a5, queue: l5 };
|
|
290
|
+
let g5 = false;
|
|
291
|
+
return a5.dlq || (a5.dlq = []), await Promise.all(f3.map(async (e6) => (e6.globals = y(r3, e6.globals), e6.user = y(u2, e6.user), await W(h, (o4) => (n5.config.onError && n5.config.onError(o4, n5), g5 = true, a5.dlq.push([e6, o4]), false))(n5, a5, e6), e6))), { id: o3, destination: a5, error: g5 };
|
|
292
|
+
})), f2 = [], d4 = [], g4 = [];
|
|
293
|
+
for (const n6 of l4) {
|
|
294
|
+
if (n6.skipped)
|
|
295
|
+
continue;
|
|
296
|
+
const e6 = n6.destination, o3 = { id: n6.id, destination: e6 };
|
|
297
|
+
n6.error ? g4.push(o3) : n6.queue && n6.queue.length ? (e6.queue = (e6.queue || []).concat(n6.queue), d4.push(o3)) : f2.push(o3);
|
|
298
|
+
}
|
|
299
|
+
return b2({ ok: !g4.length, event: e5, successful: f2, queued: d4, failed: g4 });
|
|
300
|
+
}
|
|
301
|
+
async function p(n5, e5) {
|
|
302
|
+
if (e5.init && !e5.config.init) {
|
|
303
|
+
const o2 = { collector: n5, config: e5.config, env: y2(e5.env, e5.config.env) }, s3 = await re(e5.init, "DestinationInit", n5.hooks)(o2);
|
|
304
|
+
if (false === s3)
|
|
305
|
+
return s3;
|
|
306
|
+
e5.config = { ...s3 || e5.config, init: true };
|
|
307
|
+
}
|
|
308
|
+
return true;
|
|
309
|
+
}
|
|
310
|
+
async function h(n5, e5, o2) {
|
|
311
|
+
const { config: s3 } = e5, t3 = await X(o2, s3, n5);
|
|
312
|
+
if (t3.ignore)
|
|
313
|
+
return false;
|
|
314
|
+
const i3 = { collector: n5, config: s3, data: t3.data, mapping: t3.mapping, env: y2(e5.env, s3.env) }, c3 = t3.mapping;
|
|
315
|
+
if (c3?.batch && e5.pushBatch) {
|
|
316
|
+
const o3 = c3.batched || { key: t3.mappingKey || "", events: [], data: [] };
|
|
317
|
+
o3.events.push(t3.event), x(t3.data) && o3.data.push(t3.data), c3.batchFn = c3.batchFn || L((n6, e6) => {
|
|
318
|
+
const a4 = { collector: e6, config: s3, data: t3.data, mapping: c3, env: y2(n6.env, s3.env) };
|
|
319
|
+
re(n6.pushBatch, "DestinationPushBatch", e6.hooks)(o3, a4), o3.events = [], o3.data = [];
|
|
320
|
+
}, c3.batch), c3.batched = o3, c3.batchFn?.(e5, n5);
|
|
321
|
+
} else
|
|
322
|
+
await re(e5.push, "DestinationPush", n5.hooks)(t3.event, i3);
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
function b2(n5) {
|
|
326
|
+
return y({ ok: !n5?.failed?.length, successful: [], queued: [], failed: [] }, n5);
|
|
327
|
+
}
|
|
328
|
+
async function k2(n5, e5 = {}) {
|
|
329
|
+
const o2 = {};
|
|
330
|
+
for (const [n6, s3] of Object.entries(e5)) {
|
|
331
|
+
const { code: e6, config: t3 = {}, env: a4 = {} } = s3, i3 = { ...e6.config, ...t3 }, c3 = y2(e6.env, a4);
|
|
332
|
+
o2[n6] = { ...e6, config: i3, env: c3 };
|
|
333
|
+
}
|
|
334
|
+
return o2;
|
|
335
|
+
}
|
|
336
|
+
function y2(n5, e5) {
|
|
337
|
+
return n5 || e5 ? e5 ? n5 && S(n5) && S(e5) ? { ...n5, ...e5 } : e5 : n5 : {};
|
|
338
|
+
}
|
|
339
|
+
function C(n5, e5, o2) {
|
|
340
|
+
const s3 = n5.on, t3 = s3[e5] || [], a4 = b(o2) ? o2 : [o2];
|
|
341
|
+
a4.forEach((n6) => {
|
|
342
|
+
t3.push(n6);
|
|
343
|
+
}), s3[e5] = t3, q2(n5, e5, a4);
|
|
344
|
+
}
|
|
345
|
+
function q2(n5, o2, s3, t3) {
|
|
346
|
+
let a4, i3 = s3 || [];
|
|
347
|
+
switch (s3 || (i3 = n5.on[o2] || []), o2) {
|
|
348
|
+
case e.Commands.Consent:
|
|
349
|
+
a4 = t3 || n5.consent;
|
|
350
|
+
break;
|
|
351
|
+
case e.Commands.Session:
|
|
352
|
+
a4 = n5.session;
|
|
353
|
+
break;
|
|
354
|
+
case e.Commands.Ready:
|
|
355
|
+
case e.Commands.Run:
|
|
356
|
+
default:
|
|
357
|
+
a4 = void 0;
|
|
358
|
+
}
|
|
359
|
+
if (Object.values(n5.sources).forEach((n6) => {
|
|
360
|
+
n6.on && U(n6.on)(o2, a4);
|
|
361
|
+
}), Object.values(n5.destinations).forEach((n6) => {
|
|
362
|
+
if (n6.on) {
|
|
363
|
+
const e5 = n6.on;
|
|
364
|
+
U(e5)(o2, a4);
|
|
365
|
+
}
|
|
366
|
+
}), i3.length)
|
|
367
|
+
switch (o2) {
|
|
368
|
+
case e.Commands.Consent:
|
|
369
|
+
!function(n6, e5, o3) {
|
|
370
|
+
const s4 = o3 || n6.consent;
|
|
371
|
+
e5.forEach((e6) => {
|
|
372
|
+
Object.keys(s4).filter((n7) => n7 in e6).forEach((o4) => {
|
|
373
|
+
U(e6[o4])(n6, s4);
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
}(n5, i3, t3);
|
|
377
|
+
break;
|
|
378
|
+
case e.Commands.Ready:
|
|
379
|
+
case e.Commands.Run:
|
|
380
|
+
!function(n6, e5) {
|
|
381
|
+
n6.allowed && e5.forEach((e6) => {
|
|
382
|
+
U(e6)(n6);
|
|
383
|
+
});
|
|
384
|
+
}(n5, i3);
|
|
385
|
+
break;
|
|
386
|
+
case e.Commands.Session:
|
|
387
|
+
!function(n6, e5) {
|
|
388
|
+
if (!n6.session)
|
|
389
|
+
return;
|
|
390
|
+
e5.forEach((e6) => {
|
|
391
|
+
U(e6)(n6, n6.session);
|
|
392
|
+
});
|
|
393
|
+
}(n5, i3);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
async function j(n5, e5) {
|
|
397
|
+
const { consent: s3 } = n5;
|
|
398
|
+
let t3 = false;
|
|
399
|
+
const a4 = {};
|
|
400
|
+
return Object.entries(e5).forEach(([n6, e6]) => {
|
|
401
|
+
const o2 = !!e6;
|
|
402
|
+
a4[n6] = o2, t3 = t3 || o2;
|
|
403
|
+
}), n5.consent = y(s3, a4), q2(n5, "consent", void 0, a4), t3 ? g(n5) : b2({ ok: true });
|
|
404
|
+
}
|
|
405
|
+
async function P2(n5, o2, s3, t3) {
|
|
406
|
+
let a4;
|
|
407
|
+
switch (o2) {
|
|
408
|
+
case e.Commands.Config:
|
|
409
|
+
S(s3) && y(n5.config, s3, { shallow: false });
|
|
410
|
+
break;
|
|
411
|
+
case e.Commands.Consent:
|
|
412
|
+
S(s3) && (a4 = await j(n5, s3));
|
|
413
|
+
break;
|
|
414
|
+
case e.Commands.Custom:
|
|
415
|
+
S(s3) && (n5.custom = y(n5.custom, s3));
|
|
416
|
+
break;
|
|
417
|
+
case e.Commands.Destination:
|
|
418
|
+
S(s3) && O(s3.push) && (a4 = await d(n5, { code: s3 }, t3));
|
|
419
|
+
break;
|
|
420
|
+
case e.Commands.Globals:
|
|
421
|
+
S(s3) && (n5.globals = y(n5.globals, s3));
|
|
422
|
+
break;
|
|
423
|
+
case e.Commands.On:
|
|
424
|
+
A(s3) && C(n5, s3, t3);
|
|
425
|
+
break;
|
|
426
|
+
case e.Commands.Ready:
|
|
427
|
+
q2(n5, "ready");
|
|
428
|
+
break;
|
|
429
|
+
case e.Commands.Run:
|
|
430
|
+
a4 = await L2(n5, s3);
|
|
431
|
+
break;
|
|
432
|
+
case e.Commands.Session:
|
|
433
|
+
q2(n5, "session");
|
|
434
|
+
break;
|
|
435
|
+
case e.Commands.User:
|
|
436
|
+
S(s3) && y(n5.user, s3, { shallow: false });
|
|
437
|
+
}
|
|
438
|
+
return a4 || { ok: true, successful: [], queued: [], failed: [] };
|
|
439
|
+
}
|
|
440
|
+
function $2(n5, e5) {
|
|
441
|
+
if (!e5.name)
|
|
442
|
+
throw new Error("Event name is required");
|
|
443
|
+
const [o2, s3] = e5.name.split(" ");
|
|
444
|
+
if (!o2 || !s3)
|
|
445
|
+
throw new Error("Event name is invalid");
|
|
446
|
+
++n5.count;
|
|
447
|
+
const { timestamp: t3 = Date.now(), group: a4 = n5.group, count: i3 = n5.count } = e5, { name: c3 = `${o2} ${s3}`, data: r3 = {}, context: u2 = {}, globals: l4 = n5.globals, custom: m3 = {}, user: f2 = n5.user, nested: d4 = [], consent: g4 = n5.consent, id: p4 = `${t3}-${a4}-${i3}`, trigger: h3 = "", entity: b4 = o2, action: k4 = s3, timing: y4 = 0, version: w3 = { source: n5.version, tagging: n5.config.tagging || 0 }, source: v2 = { type: "collector", id: "", previous_id: "" } } = e5;
|
|
448
|
+
return { name: c3, data: r3, context: u2, globals: l4, custom: m3, user: f2, nested: d4, consent: g4, id: p4, trigger: h3, entity: b4, action: k4, timestamp: t3, timing: y4, group: a4, count: i3, version: w3, source: v2 };
|
|
449
|
+
}
|
|
450
|
+
async function L2(n5, e5) {
|
|
451
|
+
n5.allowed = true, n5.count = 0, n5.group = D(), n5.timing = Date.now(), e5 && (e5.consent && (n5.consent = y(n5.consent, e5.consent)), e5.user && (n5.user = y(n5.user, e5.user)), e5.globals && (n5.globals = y(n5.config.globalsStatic || {}, e5.globals)), e5.custom && (n5.custom = y(n5.custom, e5.custom))), Object.values(n5.destinations).forEach((n6) => {
|
|
452
|
+
n6.queue = [];
|
|
453
|
+
}), n5.queue = [], n5.round++;
|
|
454
|
+
const o2 = await g(n5);
|
|
455
|
+
return q2(n5, "run"), o2;
|
|
456
|
+
}
|
|
457
|
+
function I(n5, e5) {
|
|
458
|
+
return re(async (o2, s3 = {}) => await W(async () => {
|
|
459
|
+
let t3 = o2;
|
|
460
|
+
if (s3.mapping) {
|
|
461
|
+
const e6 = await X(t3, s3.mapping, n5);
|
|
462
|
+
if (e6.ignore)
|
|
463
|
+
return b2({ ok: true });
|
|
464
|
+
if (s3.mapping.consent) {
|
|
465
|
+
if (!T(s3.mapping.consent, n5.consent, e6.event.consent))
|
|
466
|
+
return b2({ ok: true });
|
|
467
|
+
}
|
|
468
|
+
t3 = e6.event;
|
|
469
|
+
}
|
|
470
|
+
const a4 = e5(t3), i3 = $2(n5, a4);
|
|
471
|
+
return await g(n5, i3);
|
|
472
|
+
}, () => b2({ ok: false }))(), "Push", n5.hooks);
|
|
473
|
+
}
|
|
474
|
+
async function W2(n5) {
|
|
475
|
+
const e5 = y({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o2, run: true }, n5, { merge: false, extend: false });
|
|
476
|
+
function o2(n6, o3) {
|
|
477
|
+
Q({ message: n6 }, o3 || e5.verbose);
|
|
478
|
+
}
|
|
479
|
+
e5.onLog = o2;
|
|
480
|
+
const s3 = { ...e5.globalsStatic, ...n5.globals }, t3 = { allowed: false, config: e5, consent: n5.consent || {}, count: 0, custom: n5.custom || {}, destinations: {}, globals: s3, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: n5.user || {}, version: "0.3.1", sources: {}, push: void 0, command: void 0 };
|
|
481
|
+
return t3.push = I(t3, (n6) => ({ timing: Math.round((Date.now() - t3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...n6 })), t3.command = function(n6, e6) {
|
|
482
|
+
return re(async (o3, s4, t4) => await W(async () => await e6(n6, o3, s4, t4), () => b2({ ok: false }))(), "Command", n6.hooks);
|
|
483
|
+
}(t3, P2), t3.destinations = await k2(0, n5.destinations || {}), t3;
|
|
484
|
+
}
|
|
485
|
+
async function K(n5, e5 = {}) {
|
|
486
|
+
const o2 = {};
|
|
487
|
+
for (const [s3, t3] of Object.entries(e5)) {
|
|
488
|
+
const { code: e6, config: a4 = {}, env: i3 = {}, primary: c3 } = t3, r3 = { push: (e7, o3 = {}) => n5.push(e7, { ...o3, mapping: a4 }), command: n5.command, sources: n5.sources, elb: n5.sources.elb.push, ...i3 }, u2 = await W(e6)(a4, r3);
|
|
489
|
+
u2 && (c3 && (u2.config = { ...u2.config, primary: c3 }), o2[s3] = u2);
|
|
490
|
+
}
|
|
491
|
+
return o2;
|
|
492
|
+
}
|
|
493
|
+
async function z(n5) {
|
|
494
|
+
n5 = n5 || {};
|
|
495
|
+
const e5 = await W2(n5), o2 = (s3 = e5, { type: "elb", config: {}, push: async (n6, e6, o3, t4, a5, i4) => {
|
|
496
|
+
if ("string" == typeof n6 && n6.startsWith("walker ")) {
|
|
497
|
+
const t5 = n6.replace("walker ", "");
|
|
498
|
+
return s3.command(t5, e6, o3);
|
|
499
|
+
}
|
|
500
|
+
let c4;
|
|
501
|
+
if ("string" == typeof n6)
|
|
502
|
+
c4 = { name: n6 }, e6 && "object" == typeof e6 && !Array.isArray(e6) && (c4.data = e6);
|
|
503
|
+
else {
|
|
504
|
+
if (!n6 || "object" != typeof n6)
|
|
505
|
+
return { ok: false, successful: [], queued: [], failed: [] };
|
|
506
|
+
c4 = n6, e6 && "object" == typeof e6 && !Array.isArray(e6) && (c4.data = { ...c4.data || {}, ...e6 });
|
|
507
|
+
}
|
|
508
|
+
return t4 && "object" == typeof t4 && (c4.context = t4), a5 && Array.isArray(a5) && (c4.nested = a5), i4 && "object" == typeof i4 && (c4.custom = i4), s3.push(c4);
|
|
509
|
+
} });
|
|
510
|
+
var s3;
|
|
511
|
+
e5.sources.elb = o2;
|
|
512
|
+
const t3 = await K(e5, n5.sources || {});
|
|
513
|
+
Object.assign(e5.sources, t3);
|
|
514
|
+
const { consent: a4, user: i3, globals: c3, custom: r3 } = n5;
|
|
515
|
+
a4 && await e5.command("consent", a4), i3 && await e5.command("user", i3), c3 && Object.assign(e5.globals, c3), r3 && Object.assign(e5.custom, r3), e5.config.run && await e5.command("run");
|
|
516
|
+
let u2 = o2.push;
|
|
517
|
+
const l4 = Object.values(e5.sources).filter((n6) => "elb" !== n6.type), m3 = l4.find((n6) => n6.config.primary);
|
|
518
|
+
return m3 ? u2 = m3.push : l4.length > 0 && (u2 = l4[0].push), { collector: e5, elb: u2 };
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// node_modules/@walkeros/server-source-express/dist/index.mjs
|
|
522
|
+
import e3 from "express";
|
|
523
|
+
import o from "cors";
|
|
524
|
+
|
|
7
525
|
// node_modules/zod/v4/classic/external.js
|
|
8
526
|
var external_exports = {};
|
|
9
527
|
__export(external_exports, {
|
|
@@ -51,6 +569,7 @@ __export(external_exports, {
|
|
|
51
569
|
ZodKSUID: () => ZodKSUID,
|
|
52
570
|
ZodLazy: () => ZodLazy,
|
|
53
571
|
ZodLiteral: () => ZodLiteral,
|
|
572
|
+
ZodMAC: () => ZodMAC,
|
|
54
573
|
ZodMap: () => ZodMap,
|
|
55
574
|
ZodNaN: () => ZodNaN,
|
|
56
575
|
ZodNanoID: () => ZodNanoID,
|
|
@@ -109,6 +628,7 @@ __export(external_exports, {
|
|
|
109
628
|
date: () => date3,
|
|
110
629
|
decode: () => decode2,
|
|
111
630
|
decodeAsync: () => decodeAsync2,
|
|
631
|
+
describe: () => describe2,
|
|
112
632
|
discriminatedUnion: () => discriminatedUnion,
|
|
113
633
|
e164: () => e1642,
|
|
114
634
|
email: () => email2,
|
|
@@ -153,9 +673,11 @@ __export(external_exports, {
|
|
|
153
673
|
lowercase: () => _lowercase,
|
|
154
674
|
lt: () => _lt,
|
|
155
675
|
lte: () => _lte,
|
|
676
|
+
mac: () => mac2,
|
|
156
677
|
map: () => map,
|
|
157
678
|
maxLength: () => _maxLength,
|
|
158
679
|
maxSize: () => _maxSize,
|
|
680
|
+
meta: () => meta2,
|
|
159
681
|
mime: () => _mime,
|
|
160
682
|
minLength: () => _minLength,
|
|
161
683
|
minSize: () => _minSize,
|
|
@@ -201,6 +723,7 @@ __export(external_exports, {
|
|
|
201
723
|
set: () => set,
|
|
202
724
|
setErrorMap: () => setErrorMap,
|
|
203
725
|
size: () => _size,
|
|
726
|
+
slugify: () => _slugify,
|
|
204
727
|
startsWith: () => _startsWith,
|
|
205
728
|
strictObject: () => strictObject,
|
|
206
729
|
string: () => string2,
|
|
@@ -298,6 +821,7 @@ __export(core_exports2, {
|
|
|
298
821
|
$ZodKSUID: () => $ZodKSUID,
|
|
299
822
|
$ZodLazy: () => $ZodLazy,
|
|
300
823
|
$ZodLiteral: () => $ZodLiteral,
|
|
824
|
+
$ZodMAC: () => $ZodMAC,
|
|
301
825
|
$ZodMap: () => $ZodMap,
|
|
302
826
|
$ZodNaN: () => $ZodNaN,
|
|
303
827
|
$ZodNanoID: () => $ZodNanoID,
|
|
@@ -398,6 +922,7 @@ __export(core_exports2, {
|
|
|
398
922
|
_lowercase: () => _lowercase,
|
|
399
923
|
_lt: () => _lt,
|
|
400
924
|
_lte: () => _lte,
|
|
925
|
+
_mac: () => _mac,
|
|
401
926
|
_map: () => _map,
|
|
402
927
|
_max: () => _lte,
|
|
403
928
|
_maxLength: () => _maxLength,
|
|
@@ -439,6 +964,7 @@ __export(core_exports2, {
|
|
|
439
964
|
_safeParseAsync: () => _safeParseAsync,
|
|
440
965
|
_set: () => _set,
|
|
441
966
|
_size: () => _size,
|
|
967
|
+
_slugify: () => _slugify,
|
|
442
968
|
_startsWith: () => _startsWith,
|
|
443
969
|
_string: () => _string,
|
|
444
970
|
_stringFormat: () => _stringFormat,
|
|
@@ -470,6 +996,7 @@ __export(core_exports2, {
|
|
|
470
996
|
config: () => config,
|
|
471
997
|
decode: () => decode,
|
|
472
998
|
decodeAsync: () => decodeAsync,
|
|
999
|
+
describe: () => describe,
|
|
473
1000
|
encode: () => encode,
|
|
474
1001
|
encodeAsync: () => encodeAsync,
|
|
475
1002
|
flattenError: () => flattenError,
|
|
@@ -480,6 +1007,7 @@ __export(core_exports2, {
|
|
|
480
1007
|
isValidBase64URL: () => isValidBase64URL,
|
|
481
1008
|
isValidJWT: () => isValidJWT,
|
|
482
1009
|
locales: () => locales_exports,
|
|
1010
|
+
meta: () => meta,
|
|
483
1011
|
parse: () => parse,
|
|
484
1012
|
parseAsync: () => parseAsync,
|
|
485
1013
|
prettifyError: () => prettifyError,
|
|
@@ -505,45 +1033,54 @@ var NEVER = Object.freeze({
|
|
|
505
1033
|
// @__NO_SIDE_EFFECTS__
|
|
506
1034
|
function $constructor(name, initializer3, params) {
|
|
507
1035
|
function init(inst, def) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
1036
|
+
if (!inst._zod) {
|
|
1037
|
+
Object.defineProperty(inst, "_zod", {
|
|
1038
|
+
value: {
|
|
1039
|
+
def,
|
|
1040
|
+
constr: _2,
|
|
1041
|
+
traits: /* @__PURE__ */ new Set()
|
|
1042
|
+
},
|
|
1043
|
+
enumerable: false
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
if (inst._zod.traits.has(name)) {
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
514
1049
|
inst._zod.traits.add(name);
|
|
515
1050
|
initializer3(inst, def);
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
1051
|
+
const proto = _2.prototype;
|
|
1052
|
+
const keys = Object.keys(proto);
|
|
1053
|
+
for (let i3 = 0; i3 < keys.length; i3++) {
|
|
1054
|
+
const k4 = keys[i3];
|
|
1055
|
+
if (!(k4 in inst)) {
|
|
1056
|
+
inst[k4] = proto[k4].bind(inst);
|
|
1057
|
+
}
|
|
519
1058
|
}
|
|
520
|
-
inst._zod.constr = _3;
|
|
521
|
-
inst._zod.def = def;
|
|
522
1059
|
}
|
|
523
1060
|
const Parent = params?.Parent ?? Object;
|
|
524
1061
|
class Definition extends Parent {
|
|
525
1062
|
}
|
|
526
1063
|
Object.defineProperty(Definition, "name", { value: name });
|
|
527
|
-
function
|
|
528
|
-
var
|
|
1064
|
+
function _2(def) {
|
|
1065
|
+
var _a2;
|
|
529
1066
|
const inst = params?.Parent ? new Definition() : this;
|
|
530
1067
|
init(inst, def);
|
|
531
|
-
(
|
|
1068
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
532
1069
|
for (const fn2 of inst._zod.deferred) {
|
|
533
1070
|
fn2();
|
|
534
1071
|
}
|
|
535
1072
|
return inst;
|
|
536
1073
|
}
|
|
537
|
-
Object.defineProperty(
|
|
538
|
-
Object.defineProperty(
|
|
1074
|
+
Object.defineProperty(_2, "init", { value: init });
|
|
1075
|
+
Object.defineProperty(_2, Symbol.hasInstance, {
|
|
539
1076
|
value: (inst) => {
|
|
540
1077
|
if (params?.Parent && inst instanceof params.Parent)
|
|
541
1078
|
return true;
|
|
542
1079
|
return inst?._zod?.traits?.has(name);
|
|
543
1080
|
}
|
|
544
1081
|
});
|
|
545
|
-
Object.defineProperty(
|
|
546
|
-
return
|
|
1082
|
+
Object.defineProperty(_2, "name", { value: name });
|
|
1083
|
+
return _2;
|
|
547
1084
|
}
|
|
548
1085
|
var $brand = Symbol("zod_brand");
|
|
549
1086
|
var $ZodAsyncError = class extends Error {
|
|
@@ -622,6 +1159,7 @@ __export(util_exports, {
|
|
|
622
1159
|
required: () => required,
|
|
623
1160
|
safeExtend: () => safeExtend,
|
|
624
1161
|
shallowClone: () => shallowClone,
|
|
1162
|
+
slugify: () => slugify,
|
|
625
1163
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
626
1164
|
uint8ArrayToBase64: () => uint8ArrayToBase64,
|
|
627
1165
|
uint8ArrayToBase64url: () => uint8ArrayToBase64url,
|
|
@@ -639,17 +1177,17 @@ function assertIs(_arg) {
|
|
|
639
1177
|
function assertNever(_x) {
|
|
640
1178
|
throw new Error();
|
|
641
1179
|
}
|
|
642
|
-
function assert(
|
|
1180
|
+
function assert(_2) {
|
|
643
1181
|
}
|
|
644
1182
|
function getEnumValues(entries) {
|
|
645
|
-
const numericValues = Object.values(entries).filter((
|
|
646
|
-
const values = Object.entries(entries).filter(([
|
|
1183
|
+
const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
|
|
1184
|
+
const values = Object.entries(entries).filter(([k4, _2]) => numericValues.indexOf(+k4) === -1).map(([_2, v2]) => v2);
|
|
647
1185
|
return values;
|
|
648
1186
|
}
|
|
649
1187
|
function joinValues(array2, separator = "|") {
|
|
650
1188
|
return array2.map((val) => stringifyPrimitive(val)).join(separator);
|
|
651
1189
|
}
|
|
652
|
-
function jsonStringifyReplacer(
|
|
1190
|
+
function jsonStringifyReplacer(_2, value) {
|
|
653
1191
|
if (typeof value === "bigint")
|
|
654
1192
|
return value.toString();
|
|
655
1193
|
return value;
|
|
@@ -704,9 +1242,9 @@ function defineLazy(object2, key, getter) {
|
|
|
704
1242
|
}
|
|
705
1243
|
return value;
|
|
706
1244
|
},
|
|
707
|
-
set(
|
|
1245
|
+
set(v2) {
|
|
708
1246
|
Object.defineProperty(object2, key, {
|
|
709
|
-
value:
|
|
1247
|
+
value: v2
|
|
710
1248
|
// configurable: true,
|
|
711
1249
|
});
|
|
712
1250
|
},
|
|
@@ -745,8 +1283,8 @@ function promiseAllObject(promisesObj) {
|
|
|
745
1283
|
const promises = keys.map((key) => promisesObj[key]);
|
|
746
1284
|
return Promise.all(promises).then((results) => {
|
|
747
1285
|
const resolvedObj = {};
|
|
748
|
-
for (let
|
|
749
|
-
resolvedObj[keys[
|
|
1286
|
+
for (let i3 = 0; i3 < keys.length; i3++) {
|
|
1287
|
+
resolvedObj[keys[i3]] = results[i3];
|
|
750
1288
|
}
|
|
751
1289
|
return resolvedObj;
|
|
752
1290
|
});
|
|
@@ -754,7 +1292,7 @@ function promiseAllObject(promisesObj) {
|
|
|
754
1292
|
function randomString(length = 10) {
|
|
755
1293
|
const chars = "abcdefghijklmnopqrstuvwxyz";
|
|
756
1294
|
let str = "";
|
|
757
|
-
for (let
|
|
1295
|
+
for (let i3 = 0; i3 < length; i3++) {
|
|
758
1296
|
str += chars[Math.floor(Math.random() * chars.length)];
|
|
759
1297
|
}
|
|
760
1298
|
return str;
|
|
@@ -762,6 +1300,9 @@ function randomString(length = 10) {
|
|
|
762
1300
|
function esc(str) {
|
|
763
1301
|
return JSON.stringify(str);
|
|
764
1302
|
}
|
|
1303
|
+
function slugify(input) {
|
|
1304
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1305
|
+
}
|
|
765
1306
|
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
766
1307
|
};
|
|
767
1308
|
function isObject(data) {
|
|
@@ -772,19 +1313,21 @@ var allowsEval = cached(() => {
|
|
|
772
1313
|
return false;
|
|
773
1314
|
}
|
|
774
1315
|
try {
|
|
775
|
-
const
|
|
776
|
-
new
|
|
1316
|
+
const F3 = Function;
|
|
1317
|
+
new F3("");
|
|
777
1318
|
return true;
|
|
778
|
-
} catch (
|
|
1319
|
+
} catch (_2) {
|
|
779
1320
|
return false;
|
|
780
1321
|
}
|
|
781
1322
|
});
|
|
782
|
-
function isPlainObject(
|
|
783
|
-
if (isObject(
|
|
1323
|
+
function isPlainObject(o2) {
|
|
1324
|
+
if (isObject(o2) === false)
|
|
784
1325
|
return false;
|
|
785
|
-
const ctor =
|
|
1326
|
+
const ctor = o2.constructor;
|
|
786
1327
|
if (ctor === void 0)
|
|
787
1328
|
return true;
|
|
1329
|
+
if (typeof ctor !== "function")
|
|
1330
|
+
return true;
|
|
788
1331
|
const prot = ctor.prototype;
|
|
789
1332
|
if (isObject(prot) === false)
|
|
790
1333
|
return false;
|
|
@@ -793,12 +1336,12 @@ function isPlainObject(o3) {
|
|
|
793
1336
|
}
|
|
794
1337
|
return true;
|
|
795
1338
|
}
|
|
796
|
-
function shallowClone(
|
|
797
|
-
if (isPlainObject(
|
|
798
|
-
return { ...
|
|
799
|
-
if (Array.isArray(
|
|
800
|
-
return [...
|
|
801
|
-
return
|
|
1339
|
+
function shallowClone(o2) {
|
|
1340
|
+
if (isPlainObject(o2))
|
|
1341
|
+
return { ...o2 };
|
|
1342
|
+
if (Array.isArray(o2))
|
|
1343
|
+
return [...o2];
|
|
1344
|
+
return o2;
|
|
802
1345
|
}
|
|
803
1346
|
function numKeys(data) {
|
|
804
1347
|
let keyCount = 0;
|
|
@@ -883,31 +1426,31 @@ function normalizeParams(_params) {
|
|
|
883
1426
|
function createTransparentProxy(getter) {
|
|
884
1427
|
let target;
|
|
885
1428
|
return new Proxy({}, {
|
|
886
|
-
get(
|
|
1429
|
+
get(_2, prop, receiver) {
|
|
887
1430
|
target ?? (target = getter());
|
|
888
1431
|
return Reflect.get(target, prop, receiver);
|
|
889
1432
|
},
|
|
890
|
-
set(
|
|
1433
|
+
set(_2, prop, value, receiver) {
|
|
891
1434
|
target ?? (target = getter());
|
|
892
1435
|
return Reflect.set(target, prop, value, receiver);
|
|
893
1436
|
},
|
|
894
|
-
has(
|
|
1437
|
+
has(_2, prop) {
|
|
895
1438
|
target ?? (target = getter());
|
|
896
1439
|
return Reflect.has(target, prop);
|
|
897
1440
|
},
|
|
898
|
-
deleteProperty(
|
|
1441
|
+
deleteProperty(_2, prop) {
|
|
899
1442
|
target ?? (target = getter());
|
|
900
1443
|
return Reflect.deleteProperty(target, prop);
|
|
901
1444
|
},
|
|
902
|
-
ownKeys(
|
|
1445
|
+
ownKeys(_2) {
|
|
903
1446
|
target ?? (target = getter());
|
|
904
1447
|
return Reflect.ownKeys(target);
|
|
905
1448
|
},
|
|
906
|
-
getOwnPropertyDescriptor(
|
|
1449
|
+
getOwnPropertyDescriptor(_2, prop) {
|
|
907
1450
|
target ?? (target = getter());
|
|
908
1451
|
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
909
1452
|
},
|
|
910
|
-
defineProperty(
|
|
1453
|
+
defineProperty(_2, prop, descriptor) {
|
|
911
1454
|
target ?? (target = getter());
|
|
912
1455
|
return Reflect.defineProperty(target, prop, descriptor);
|
|
913
1456
|
}
|
|
@@ -921,8 +1464,8 @@ function stringifyPrimitive(value) {
|
|
|
921
1464
|
return `${value}`;
|
|
922
1465
|
}
|
|
923
1466
|
function optionalKeys(shape) {
|
|
924
|
-
return Object.keys(shape).filter((
|
|
925
|
-
return shape[
|
|
1467
|
+
return Object.keys(shape).filter((k4) => {
|
|
1468
|
+
return shape[k4]._zod.optin === "optional" && shape[k4]._zod.optout === "optional";
|
|
926
1469
|
});
|
|
927
1470
|
}
|
|
928
1471
|
var NUMBER_FORMAT_RANGES = {
|
|
@@ -1010,15 +1553,15 @@ function safeExtend(schema, shape) {
|
|
|
1010
1553
|
};
|
|
1011
1554
|
return clone(schema, def);
|
|
1012
1555
|
}
|
|
1013
|
-
function merge(a4,
|
|
1556
|
+
function merge(a4, b4) {
|
|
1014
1557
|
const def = mergeDefs(a4._zod.def, {
|
|
1015
1558
|
get shape() {
|
|
1016
|
-
const _shape = { ...a4._zod.def.shape, ...
|
|
1559
|
+
const _shape = { ...a4._zod.def.shape, ...b4._zod.def.shape };
|
|
1017
1560
|
assignProp(this, "shape", _shape);
|
|
1018
1561
|
return _shape;
|
|
1019
1562
|
},
|
|
1020
1563
|
get catchall() {
|
|
1021
|
-
return
|
|
1564
|
+
return b4._zod.def.catchall;
|
|
1022
1565
|
},
|
|
1023
1566
|
checks: []
|
|
1024
1567
|
// delete existing checks
|
|
@@ -1089,11 +1632,11 @@ function required(Class2, schema, mask) {
|
|
|
1089
1632
|
});
|
|
1090
1633
|
return clone(schema, def);
|
|
1091
1634
|
}
|
|
1092
|
-
function aborted(
|
|
1093
|
-
if (
|
|
1635
|
+
function aborted(x3, startIndex = 0) {
|
|
1636
|
+
if (x3.aborted === true)
|
|
1094
1637
|
return true;
|
|
1095
|
-
for (let
|
|
1096
|
-
if (
|
|
1638
|
+
for (let i3 = startIndex; i3 < x3.issues.length; i3++) {
|
|
1639
|
+
if (x3.issues[i3]?.continue !== true) {
|
|
1097
1640
|
return true;
|
|
1098
1641
|
}
|
|
1099
1642
|
}
|
|
@@ -1101,8 +1644,8 @@ function aborted(x2, startIndex = 0) {
|
|
|
1101
1644
|
}
|
|
1102
1645
|
function prefixIssues(path, issues) {
|
|
1103
1646
|
return issues.map((iss) => {
|
|
1104
|
-
var
|
|
1105
|
-
(
|
|
1647
|
+
var _a2;
|
|
1648
|
+
(_a2 = iss).path ?? (_a2.path = []);
|
|
1106
1649
|
iss.path.unshift(path);
|
|
1107
1650
|
return iss;
|
|
1108
1651
|
});
|
|
@@ -1152,22 +1695,22 @@ function issue(...args) {
|
|
|
1152
1695
|
return { ...iss };
|
|
1153
1696
|
}
|
|
1154
1697
|
function cleanEnum(obj) {
|
|
1155
|
-
return Object.entries(obj).filter(([
|
|
1156
|
-
return Number.isNaN(Number.parseInt(
|
|
1698
|
+
return Object.entries(obj).filter(([k4, _2]) => {
|
|
1699
|
+
return Number.isNaN(Number.parseInt(k4, 10));
|
|
1157
1700
|
}).map((el) => el[1]);
|
|
1158
1701
|
}
|
|
1159
1702
|
function base64ToUint8Array(base643) {
|
|
1160
1703
|
const binaryString = atob(base643);
|
|
1161
1704
|
const bytes = new Uint8Array(binaryString.length);
|
|
1162
|
-
for (let
|
|
1163
|
-
bytes[
|
|
1705
|
+
for (let i3 = 0; i3 < binaryString.length; i3++) {
|
|
1706
|
+
bytes[i3] = binaryString.charCodeAt(i3);
|
|
1164
1707
|
}
|
|
1165
1708
|
return bytes;
|
|
1166
1709
|
}
|
|
1167
1710
|
function uint8ArrayToBase64(bytes) {
|
|
1168
1711
|
let binaryString = "";
|
|
1169
|
-
for (let
|
|
1170
|
-
binaryString += String.fromCharCode(bytes[
|
|
1712
|
+
for (let i3 = 0; i3 < bytes.length; i3++) {
|
|
1713
|
+
binaryString += String.fromCharCode(bytes[i3]);
|
|
1171
1714
|
}
|
|
1172
1715
|
return btoa(binaryString);
|
|
1173
1716
|
}
|
|
@@ -1185,13 +1728,13 @@ function hexToUint8Array(hex3) {
|
|
|
1185
1728
|
throw new Error("Invalid hex string length");
|
|
1186
1729
|
}
|
|
1187
1730
|
const bytes = new Uint8Array(cleanHex.length / 2);
|
|
1188
|
-
for (let
|
|
1189
|
-
bytes[
|
|
1731
|
+
for (let i3 = 0; i3 < cleanHex.length; i3 += 2) {
|
|
1732
|
+
bytes[i3 / 2] = Number.parseInt(cleanHex.slice(i3, i3 + 2), 16);
|
|
1190
1733
|
}
|
|
1191
1734
|
return bytes;
|
|
1192
1735
|
}
|
|
1193
1736
|
function uint8ArrayToHex(bytes) {
|
|
1194
|
-
return Array.from(bytes).map((
|
|
1737
|
+
return Array.from(bytes).map((b4) => b4.toString(16).padStart(2, "0")).join("");
|
|
1195
1738
|
}
|
|
1196
1739
|
var Class = class {
|
|
1197
1740
|
constructor(..._args) {
|
|
@@ -1244,10 +1787,10 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1244
1787
|
fieldErrors._errors.push(mapper(issue2));
|
|
1245
1788
|
} else {
|
|
1246
1789
|
let curr = fieldErrors;
|
|
1247
|
-
let
|
|
1248
|
-
while (
|
|
1249
|
-
const el = issue2.path[
|
|
1250
|
-
const terminal =
|
|
1790
|
+
let i3 = 0;
|
|
1791
|
+
while (i3 < issue2.path.length) {
|
|
1792
|
+
const el = issue2.path[i3];
|
|
1793
|
+
const terminal = i3 === issue2.path.length - 1;
|
|
1251
1794
|
if (!terminal) {
|
|
1252
1795
|
curr[el] = curr[el] || { _errors: [] };
|
|
1253
1796
|
} else {
|
|
@@ -1255,7 +1798,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1255
1798
|
curr[el]._errors.push(mapper(issue2));
|
|
1256
1799
|
}
|
|
1257
1800
|
curr = curr[el];
|
|
1258
|
-
|
|
1801
|
+
i3++;
|
|
1259
1802
|
}
|
|
1260
1803
|
}
|
|
1261
1804
|
}
|
|
@@ -1266,7 +1809,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1266
1809
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
1267
1810
|
const result = { errors: [] };
|
|
1268
1811
|
const processError = (error47, path = []) => {
|
|
1269
|
-
var
|
|
1812
|
+
var _a2, _b;
|
|
1270
1813
|
for (const issue2 of error47.issues) {
|
|
1271
1814
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1272
1815
|
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
@@ -1281,13 +1824,13 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1281
1824
|
continue;
|
|
1282
1825
|
}
|
|
1283
1826
|
let curr = result;
|
|
1284
|
-
let
|
|
1285
|
-
while (
|
|
1286
|
-
const el = fullpath[
|
|
1287
|
-
const terminal =
|
|
1827
|
+
let i3 = 0;
|
|
1828
|
+
while (i3 < fullpath.length) {
|
|
1829
|
+
const el = fullpath[i3];
|
|
1830
|
+
const terminal = i3 === fullpath.length - 1;
|
|
1288
1831
|
if (typeof el === "string") {
|
|
1289
1832
|
curr.properties ?? (curr.properties = {});
|
|
1290
|
-
(
|
|
1833
|
+
(_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
|
|
1291
1834
|
curr = curr.properties[el];
|
|
1292
1835
|
} else {
|
|
1293
1836
|
curr.items ?? (curr.items = []);
|
|
@@ -1297,7 +1840,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1297
1840
|
if (terminal) {
|
|
1298
1841
|
curr.errors.push(mapper(issue2));
|
|
1299
1842
|
}
|
|
1300
|
-
|
|
1843
|
+
i3++;
|
|
1301
1844
|
}
|
|
1302
1845
|
}
|
|
1303
1846
|
}
|
|
@@ -1325,7 +1868,7 @@ function toDotPath(_path) {
|
|
|
1325
1868
|
}
|
|
1326
1869
|
function prettifyError(error46) {
|
|
1327
1870
|
const lines = [];
|
|
1328
|
-
const issues = [...error46.issues].sort((a4,
|
|
1871
|
+
const issues = [...error46.issues].sort((a4, b4) => (a4.path ?? []).length - (b4.path ?? []).length);
|
|
1329
1872
|
for (const issue2 of issues) {
|
|
1330
1873
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1331
1874
|
if (issue2.path?.length)
|
|
@@ -1452,6 +1995,7 @@ __export(regexes_exports, {
|
|
|
1452
1995
|
ipv6: () => ipv6,
|
|
1453
1996
|
ksuid: () => ksuid,
|
|
1454
1997
|
lowercase: () => lowercase,
|
|
1998
|
+
mac: () => mac,
|
|
1455
1999
|
md5_base64: () => md5_base64,
|
|
1456
2000
|
md5_base64url: () => md5_base64url,
|
|
1457
2001
|
md5_hex: () => md5_hex,
|
|
@@ -1512,6 +2056,10 @@ function emoji() {
|
|
|
1512
2056
|
}
|
|
1513
2057
|
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1514
2058
|
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
2059
|
+
var mac = (delimiter) => {
|
|
2060
|
+
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
2061
|
+
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
2062
|
+
};
|
|
1515
2063
|
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
1516
2064
|
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
1517
2065
|
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
@@ -1576,10 +2124,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1576
2124
|
|
|
1577
2125
|
// node_modules/zod/v4/core/checks.js
|
|
1578
2126
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1579
|
-
var
|
|
2127
|
+
var _a2;
|
|
1580
2128
|
inst._zod ?? (inst._zod = {});
|
|
1581
2129
|
inst._zod.def = def;
|
|
1582
|
-
(
|
|
2130
|
+
(_a2 = inst._zod).onattach ?? (_a2.onattach = []);
|
|
1583
2131
|
});
|
|
1584
2132
|
var numericOriginMap = {
|
|
1585
2133
|
number: "number",
|
|
@@ -1645,8 +2193,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1645
2193
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1646
2194
|
$ZodCheck.init(inst, def);
|
|
1647
2195
|
inst._zod.onattach.push((inst2) => {
|
|
1648
|
-
var
|
|
1649
|
-
(
|
|
2196
|
+
var _a2;
|
|
2197
|
+
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
1650
2198
|
});
|
|
1651
2199
|
inst._zod.check = (payload) => {
|
|
1652
2200
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1773,9 +2321,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1773
2321
|
};
|
|
1774
2322
|
});
|
|
1775
2323
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1776
|
-
var
|
|
2324
|
+
var _a2;
|
|
1777
2325
|
$ZodCheck.init(inst, def);
|
|
1778
|
-
(
|
|
2326
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1779
2327
|
const val = payload.value;
|
|
1780
2328
|
return !nullish(val) && val.size !== void 0;
|
|
1781
2329
|
});
|
|
@@ -1801,9 +2349,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1801
2349
|
};
|
|
1802
2350
|
});
|
|
1803
2351
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1804
|
-
var
|
|
2352
|
+
var _a2;
|
|
1805
2353
|
$ZodCheck.init(inst, def);
|
|
1806
|
-
(
|
|
2354
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1807
2355
|
const val = payload.value;
|
|
1808
2356
|
return !nullish(val) && val.size !== void 0;
|
|
1809
2357
|
});
|
|
@@ -1829,9 +2377,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1829
2377
|
};
|
|
1830
2378
|
});
|
|
1831
2379
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1832
|
-
var
|
|
2380
|
+
var _a2;
|
|
1833
2381
|
$ZodCheck.init(inst, def);
|
|
1834
|
-
(
|
|
2382
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1835
2383
|
const val = payload.value;
|
|
1836
2384
|
return !nullish(val) && val.size !== void 0;
|
|
1837
2385
|
});
|
|
@@ -1859,9 +2407,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1859
2407
|
};
|
|
1860
2408
|
});
|
|
1861
2409
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1862
|
-
var
|
|
2410
|
+
var _a2;
|
|
1863
2411
|
$ZodCheck.init(inst, def);
|
|
1864
|
-
(
|
|
2412
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1865
2413
|
const val = payload.value;
|
|
1866
2414
|
return !nullish(val) && val.length !== void 0;
|
|
1867
2415
|
});
|
|
@@ -1888,9 +2436,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
1888
2436
|
};
|
|
1889
2437
|
});
|
|
1890
2438
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1891
|
-
var
|
|
2439
|
+
var _a2;
|
|
1892
2440
|
$ZodCheck.init(inst, def);
|
|
1893
|
-
(
|
|
2441
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1894
2442
|
const val = payload.value;
|
|
1895
2443
|
return !nullish(val) && val.length !== void 0;
|
|
1896
2444
|
});
|
|
@@ -1917,9 +2465,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
1917
2465
|
};
|
|
1918
2466
|
});
|
|
1919
2467
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1920
|
-
var
|
|
2468
|
+
var _a2;
|
|
1921
2469
|
$ZodCheck.init(inst, def);
|
|
1922
|
-
(
|
|
2470
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
1923
2471
|
const val = payload.value;
|
|
1924
2472
|
return !nullish(val) && val.length !== void 0;
|
|
1925
2473
|
});
|
|
@@ -1948,7 +2496,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
1948
2496
|
};
|
|
1949
2497
|
});
|
|
1950
2498
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1951
|
-
var
|
|
2499
|
+
var _a2, _b;
|
|
1952
2500
|
$ZodCheck.init(inst, def);
|
|
1953
2501
|
inst._zod.onattach.push((inst2) => {
|
|
1954
2502
|
const bag = inst2._zod.bag;
|
|
@@ -1959,7 +2507,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
1959
2507
|
}
|
|
1960
2508
|
});
|
|
1961
2509
|
if (def.pattern)
|
|
1962
|
-
(
|
|
2510
|
+
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
1963
2511
|
def.pattern.lastIndex = 0;
|
|
1964
2512
|
if (def.pattern.test(payload.value))
|
|
1965
2513
|
return;
|
|
@@ -2136,19 +2684,19 @@ var Doc = class {
|
|
|
2136
2684
|
return;
|
|
2137
2685
|
}
|
|
2138
2686
|
const content = arg;
|
|
2139
|
-
const lines = content.split("\n").filter((
|
|
2140
|
-
const minIndent = Math.min(...lines.map((
|
|
2141
|
-
const dedented = lines.map((
|
|
2687
|
+
const lines = content.split("\n").filter((x3) => x3);
|
|
2688
|
+
const minIndent = Math.min(...lines.map((x3) => x3.length - x3.trimStart().length));
|
|
2689
|
+
const dedented = lines.map((x3) => x3.slice(minIndent)).map((x3) => " ".repeat(this.indent * 2) + x3);
|
|
2142
2690
|
for (const line of dedented) {
|
|
2143
2691
|
this.content.push(line);
|
|
2144
2692
|
}
|
|
2145
2693
|
}
|
|
2146
2694
|
compile() {
|
|
2147
|
-
const
|
|
2695
|
+
const F3 = Function;
|
|
2148
2696
|
const args = this?.args;
|
|
2149
2697
|
const content = this?.content ?? [``];
|
|
2150
|
-
const lines = [...content.map((
|
|
2151
|
-
return new
|
|
2698
|
+
const lines = [...content.map((x3) => ` ${x3}`)];
|
|
2699
|
+
return new F3(...args, lines.join("\n"));
|
|
2152
2700
|
}
|
|
2153
2701
|
};
|
|
2154
2702
|
|
|
@@ -2156,12 +2704,12 @@ var Doc = class {
|
|
|
2156
2704
|
var version = {
|
|
2157
2705
|
major: 4,
|
|
2158
2706
|
minor: 1,
|
|
2159
|
-
patch:
|
|
2707
|
+
patch: 13
|
|
2160
2708
|
};
|
|
2161
2709
|
|
|
2162
2710
|
// node_modules/zod/v4/core/schemas.js
|
|
2163
2711
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2164
|
-
var
|
|
2712
|
+
var _a2;
|
|
2165
2713
|
inst ?? (inst = {});
|
|
2166
2714
|
inst._zod.def = def;
|
|
2167
2715
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2176,7 +2724,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2176
2724
|
}
|
|
2177
2725
|
}
|
|
2178
2726
|
if (checks.length === 0) {
|
|
2179
|
-
(
|
|
2727
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
2180
2728
|
inst._zod.deferred?.push(() => {
|
|
2181
2729
|
inst._zod.run = inst._zod.parse;
|
|
2182
2730
|
});
|
|
@@ -2193,13 +2741,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2193
2741
|
continue;
|
|
2194
2742
|
}
|
|
2195
2743
|
const currLen = payload.issues.length;
|
|
2196
|
-
const
|
|
2197
|
-
if (
|
|
2744
|
+
const _2 = ch._zod.check(payload);
|
|
2745
|
+
if (_2 instanceof Promise && ctx?.async === false) {
|
|
2198
2746
|
throw new $ZodAsyncError();
|
|
2199
2747
|
}
|
|
2200
|
-
if (asyncResult ||
|
|
2748
|
+
if (asyncResult || _2 instanceof Promise) {
|
|
2201
2749
|
asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
2202
|
-
await
|
|
2750
|
+
await _2;
|
|
2203
2751
|
const nextLen = payload.issues.length;
|
|
2204
2752
|
if (nextLen === currLen)
|
|
2205
2753
|
return;
|
|
@@ -2259,10 +2807,10 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2259
2807
|
inst["~standard"] = {
|
|
2260
2808
|
validate: (value) => {
|
|
2261
2809
|
try {
|
|
2262
|
-
const
|
|
2263
|
-
return
|
|
2264
|
-
} catch (
|
|
2265
|
-
return safeParseAsync(inst, value).then((
|
|
2810
|
+
const r3 = safeParse(inst, value);
|
|
2811
|
+
return r3.success ? { value: r3.data } : { issues: r3.error?.issues };
|
|
2812
|
+
} catch (_2) {
|
|
2813
|
+
return safeParseAsync(inst, value).then((r3) => r3.success ? { value: r3.data } : { issues: r3.error?.issues });
|
|
2266
2814
|
}
|
|
2267
2815
|
},
|
|
2268
2816
|
vendor: "zod",
|
|
@@ -2272,11 +2820,11 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2272
2820
|
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
2273
2821
|
$ZodType.init(inst, def);
|
|
2274
2822
|
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
|
|
2275
|
-
inst._zod.parse = (payload,
|
|
2823
|
+
inst._zod.parse = (payload, _2) => {
|
|
2276
2824
|
if (def.coerce)
|
|
2277
2825
|
try {
|
|
2278
2826
|
payload.value = String(payload.value);
|
|
2279
|
-
} catch (
|
|
2827
|
+
} catch (_3) {
|
|
2280
2828
|
}
|
|
2281
2829
|
if (typeof payload.value === "string")
|
|
2282
2830
|
return payload;
|
|
@@ -2309,10 +2857,10 @@ var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
2309
2857
|
v7: 7,
|
|
2310
2858
|
v8: 8
|
|
2311
2859
|
};
|
|
2312
|
-
const
|
|
2313
|
-
if (
|
|
2860
|
+
const v2 = versionMap[def.version];
|
|
2861
|
+
if (v2 === void 0)
|
|
2314
2862
|
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
2315
|
-
def.pattern ?? (def.pattern = uuid(
|
|
2863
|
+
def.pattern ?? (def.pattern = uuid(v2));
|
|
2316
2864
|
} else
|
|
2317
2865
|
def.pattern ?? (def.pattern = uuid());
|
|
2318
2866
|
$ZodStringFormat.init(inst, def);
|
|
@@ -2334,7 +2882,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2334
2882
|
code: "invalid_format",
|
|
2335
2883
|
format: "url",
|
|
2336
2884
|
note: "Invalid hostname",
|
|
2337
|
-
pattern: hostname.source,
|
|
2885
|
+
pattern: def.hostname.source,
|
|
2338
2886
|
input: payload.value,
|
|
2339
2887
|
inst,
|
|
2340
2888
|
continue: !def.abort
|
|
@@ -2361,7 +2909,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2361
2909
|
payload.value = trimmed;
|
|
2362
2910
|
}
|
|
2363
2911
|
return;
|
|
2364
|
-
} catch (
|
|
2912
|
+
} catch (_2) {
|
|
2365
2913
|
payload.issues.push({
|
|
2366
2914
|
code: "invalid_format",
|
|
2367
2915
|
format: "url",
|
|
@@ -2419,18 +2967,12 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
|
|
|
2419
2967
|
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
2420
2968
|
def.pattern ?? (def.pattern = ipv4);
|
|
2421
2969
|
$ZodStringFormat.init(inst, def);
|
|
2422
|
-
inst._zod.
|
|
2423
|
-
const bag = inst2._zod.bag;
|
|
2424
|
-
bag.format = `ipv4`;
|
|
2425
|
-
});
|
|
2970
|
+
inst._zod.bag.format = `ipv4`;
|
|
2426
2971
|
});
|
|
2427
2972
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
2428
2973
|
def.pattern ?? (def.pattern = ipv6);
|
|
2429
2974
|
$ZodStringFormat.init(inst, def);
|
|
2430
|
-
inst._zod.
|
|
2431
|
-
const bag = inst2._zod.bag;
|
|
2432
|
-
bag.format = `ipv6`;
|
|
2433
|
-
});
|
|
2975
|
+
inst._zod.bag.format = `ipv6`;
|
|
2434
2976
|
inst._zod.check = (payload) => {
|
|
2435
2977
|
try {
|
|
2436
2978
|
new URL(`http://[${payload.value}]`);
|
|
@@ -2445,6 +2987,11 @@ var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
|
2445
2987
|
}
|
|
2446
2988
|
};
|
|
2447
2989
|
});
|
|
2990
|
+
var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
|
|
2991
|
+
def.pattern ?? (def.pattern = mac(def.delimiter));
|
|
2992
|
+
$ZodStringFormat.init(inst, def);
|
|
2993
|
+
inst._zod.bag.format = `mac`;
|
|
2994
|
+
});
|
|
2448
2995
|
var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
2449
2996
|
def.pattern ?? (def.pattern = cidrv4);
|
|
2450
2997
|
$ZodStringFormat.init(inst, def);
|
|
@@ -2492,9 +3039,7 @@ function isValidBase64(data) {
|
|
|
2492
3039
|
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
2493
3040
|
def.pattern ?? (def.pattern = base64);
|
|
2494
3041
|
$ZodStringFormat.init(inst, def);
|
|
2495
|
-
inst._zod.
|
|
2496
|
-
inst2._zod.bag.contentEncoding = "base64";
|
|
2497
|
-
});
|
|
3042
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
2498
3043
|
inst._zod.check = (payload) => {
|
|
2499
3044
|
if (isValidBase64(payload.value))
|
|
2500
3045
|
return;
|
|
@@ -2510,16 +3055,14 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
|
2510
3055
|
function isValidBase64URL(data) {
|
|
2511
3056
|
if (!base64url.test(data))
|
|
2512
3057
|
return false;
|
|
2513
|
-
const base643 = data.replace(/[-_]/g, (
|
|
3058
|
+
const base643 = data.replace(/[-_]/g, (c3) => c3 === "-" ? "+" : "/");
|
|
2514
3059
|
const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
|
|
2515
3060
|
return isValidBase64(padded);
|
|
2516
3061
|
}
|
|
2517
3062
|
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
2518
3063
|
def.pattern ?? (def.pattern = base64url);
|
|
2519
3064
|
$ZodStringFormat.init(inst, def);
|
|
2520
|
-
inst._zod.
|
|
2521
|
-
inst2._zod.bag.contentEncoding = "base64url";
|
|
2522
|
-
});
|
|
3065
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
2523
3066
|
inst._zod.check = (payload) => {
|
|
2524
3067
|
if (isValidBase64URL(payload.value))
|
|
2525
3068
|
return;
|
|
@@ -2591,7 +3134,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2591
3134
|
if (def.coerce)
|
|
2592
3135
|
try {
|
|
2593
3136
|
payload.value = Number(payload.value);
|
|
2594
|
-
} catch (
|
|
3137
|
+
} catch (_2) {
|
|
2595
3138
|
}
|
|
2596
3139
|
const input = payload.value;
|
|
2597
3140
|
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
|
|
@@ -2608,7 +3151,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2608
3151
|
return payload;
|
|
2609
3152
|
};
|
|
2610
3153
|
});
|
|
2611
|
-
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$
|
|
3154
|
+
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
2612
3155
|
$ZodCheckNumberFormat.init(inst, def);
|
|
2613
3156
|
$ZodNumber.init(inst, def);
|
|
2614
3157
|
});
|
|
@@ -2619,7 +3162,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
2619
3162
|
if (def.coerce)
|
|
2620
3163
|
try {
|
|
2621
3164
|
payload.value = Boolean(payload.value);
|
|
2622
|
-
} catch (
|
|
3165
|
+
} catch (_2) {
|
|
2623
3166
|
}
|
|
2624
3167
|
const input = payload.value;
|
|
2625
3168
|
if (typeof input === "boolean")
|
|
@@ -2640,7 +3183,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
2640
3183
|
if (def.coerce)
|
|
2641
3184
|
try {
|
|
2642
3185
|
payload.value = BigInt(payload.value);
|
|
2643
|
-
} catch (
|
|
3186
|
+
} catch (_2) {
|
|
2644
3187
|
}
|
|
2645
3188
|
if (typeof payload.value === "bigint")
|
|
2646
3189
|
return payload;
|
|
@@ -2653,7 +3196,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
2653
3196
|
return payload;
|
|
2654
3197
|
};
|
|
2655
3198
|
});
|
|
2656
|
-
var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$
|
|
3199
|
+
var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => {
|
|
2657
3200
|
$ZodCheckBigIntFormat.init(inst, def);
|
|
2658
3201
|
$ZodBigInt.init(inst, def);
|
|
2659
3202
|
});
|
|
@@ -2788,16 +3331,16 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2788
3331
|
}
|
|
2789
3332
|
payload.value = Array(input.length);
|
|
2790
3333
|
const proms = [];
|
|
2791
|
-
for (let
|
|
2792
|
-
const item = input[
|
|
3334
|
+
for (let i3 = 0; i3 < input.length; i3++) {
|
|
3335
|
+
const item = input[i3];
|
|
2793
3336
|
const result = def.element._zod.run({
|
|
2794
3337
|
value: item,
|
|
2795
3338
|
issues: []
|
|
2796
3339
|
}, ctx);
|
|
2797
3340
|
if (result instanceof Promise) {
|
|
2798
|
-
proms.push(result.then((result2) => handleArrayResult(result2, payload,
|
|
3341
|
+
proms.push(result.then((result2) => handleArrayResult(result2, payload, i3)));
|
|
2799
3342
|
} else {
|
|
2800
|
-
handleArrayResult(result, payload,
|
|
3343
|
+
handleArrayResult(result, payload, i3);
|
|
2801
3344
|
}
|
|
2802
3345
|
}
|
|
2803
3346
|
if (proms.length) {
|
|
@@ -2820,9 +3363,9 @@ function handlePropertyResult(result, final, key, input) {
|
|
|
2820
3363
|
}
|
|
2821
3364
|
function normalizeDef(def) {
|
|
2822
3365
|
const keys = Object.keys(def.shape);
|
|
2823
|
-
for (const
|
|
2824
|
-
if (!def.shape?.[
|
|
2825
|
-
throw new Error(`Invalid element at key "${
|
|
3366
|
+
for (const k4 of keys) {
|
|
3367
|
+
if (!def.shape?.[k4]?._zod?.traits?.has("$ZodType")) {
|
|
3368
|
+
throw new Error(`Invalid element at key "${k4}": expected a Zod schema`);
|
|
2826
3369
|
}
|
|
2827
3370
|
}
|
|
2828
3371
|
const okeys = optionalKeys(def.shape);
|
|
@@ -2839,18 +3382,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2839
3382
|
const keySet = def.keySet;
|
|
2840
3383
|
const _catchall = def.catchall._zod;
|
|
2841
3384
|
const t3 = _catchall.def.type;
|
|
2842
|
-
for (const key
|
|
3385
|
+
for (const key in input) {
|
|
2843
3386
|
if (keySet.has(key))
|
|
2844
3387
|
continue;
|
|
2845
3388
|
if (t3 === "never") {
|
|
2846
3389
|
unrecognized.push(key);
|
|
2847
3390
|
continue;
|
|
2848
3391
|
}
|
|
2849
|
-
const
|
|
2850
|
-
if (
|
|
2851
|
-
proms.push(
|
|
3392
|
+
const r3 = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3393
|
+
if (r3 instanceof Promise) {
|
|
3394
|
+
proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input)));
|
|
2852
3395
|
} else {
|
|
2853
|
-
handlePropertyResult(
|
|
3396
|
+
handlePropertyResult(r3, payload, key, input);
|
|
2854
3397
|
}
|
|
2855
3398
|
}
|
|
2856
3399
|
if (unrecognized.length) {
|
|
@@ -2890,8 +3433,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2890
3433
|
const field = shape[key]._zod;
|
|
2891
3434
|
if (field.values) {
|
|
2892
3435
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
2893
|
-
for (const
|
|
2894
|
-
propValues[key].add(
|
|
3436
|
+
for (const v2 of field.values)
|
|
3437
|
+
propValues[key].add(v2);
|
|
2895
3438
|
}
|
|
2896
3439
|
}
|
|
2897
3440
|
return propValues;
|
|
@@ -2916,11 +3459,11 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2916
3459
|
const shape = value.shape;
|
|
2917
3460
|
for (const key of value.keys) {
|
|
2918
3461
|
const el = shape[key];
|
|
2919
|
-
const
|
|
2920
|
-
if (
|
|
2921
|
-
proms.push(
|
|
3462
|
+
const r3 = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3463
|
+
if (r3 instanceof Promise) {
|
|
3464
|
+
proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input)));
|
|
2922
3465
|
} else {
|
|
2923
|
-
handlePropertyResult(
|
|
3466
|
+
handlePropertyResult(r3, payload, key, input);
|
|
2924
3467
|
}
|
|
2925
3468
|
}
|
|
2926
3469
|
if (!catchall) {
|
|
@@ -2937,8 +3480,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
2937
3480
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
2938
3481
|
const normalized = _normalized.value;
|
|
2939
3482
|
const parseStr = (key) => {
|
|
2940
|
-
const
|
|
2941
|
-
return `shape[${
|
|
3483
|
+
const k4 = esc(key);
|
|
3484
|
+
return `shape[${k4}]._zod.run({ value: input[${k4}], issues: [] }, ctx)`;
|
|
2942
3485
|
};
|
|
2943
3486
|
doc.write(`const input = payload.value;`);
|
|
2944
3487
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
@@ -2949,23 +3492,23 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
2949
3492
|
doc.write(`const newResult = {};`);
|
|
2950
3493
|
for (const key of normalized.keys) {
|
|
2951
3494
|
const id = ids[key];
|
|
2952
|
-
const
|
|
3495
|
+
const k4 = esc(key);
|
|
2953
3496
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2954
3497
|
doc.write(`
|
|
2955
3498
|
if (${id}.issues.length) {
|
|
2956
3499
|
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2957
3500
|
...iss,
|
|
2958
|
-
path: iss.path ? [${
|
|
3501
|
+
path: iss.path ? [${k4}, ...iss.path] : [${k4}]
|
|
2959
3502
|
})));
|
|
2960
3503
|
}
|
|
2961
3504
|
|
|
2962
3505
|
|
|
2963
3506
|
if (${id}.value === undefined) {
|
|
2964
|
-
if (${
|
|
2965
|
-
newResult[${
|
|
3507
|
+
if (${k4} in input) {
|
|
3508
|
+
newResult[${k4}] = undefined;
|
|
2966
3509
|
}
|
|
2967
3510
|
} else {
|
|
2968
|
-
newResult[${
|
|
3511
|
+
newResult[${k4}] = ${id}.value;
|
|
2969
3512
|
}
|
|
2970
3513
|
|
|
2971
3514
|
`);
|
|
@@ -3012,7 +3555,7 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
3012
3555
|
return final;
|
|
3013
3556
|
}
|
|
3014
3557
|
}
|
|
3015
|
-
const nonaborted = results.filter((
|
|
3558
|
+
const nonaborted = results.filter((r3) => !aborted(r3));
|
|
3016
3559
|
if (nonaborted.length === 1) {
|
|
3017
3560
|
final.value = nonaborted[0].value;
|
|
3018
3561
|
return nonaborted[0];
|
|
@@ -3027,18 +3570,18 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
3027
3570
|
}
|
|
3028
3571
|
var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
3029
3572
|
$ZodType.init(inst, def);
|
|
3030
|
-
defineLazy(inst._zod, "optin", () => def.options.some((
|
|
3031
|
-
defineLazy(inst._zod, "optout", () => def.options.some((
|
|
3573
|
+
defineLazy(inst._zod, "optin", () => def.options.some((o2) => o2._zod.optin === "optional") ? "optional" : void 0);
|
|
3574
|
+
defineLazy(inst._zod, "optout", () => def.options.some((o2) => o2._zod.optout === "optional") ? "optional" : void 0);
|
|
3032
3575
|
defineLazy(inst._zod, "values", () => {
|
|
3033
|
-
if (def.options.every((
|
|
3576
|
+
if (def.options.every((o2) => o2._zod.values)) {
|
|
3034
3577
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
3035
3578
|
}
|
|
3036
3579
|
return void 0;
|
|
3037
3580
|
});
|
|
3038
3581
|
defineLazy(inst._zod, "pattern", () => {
|
|
3039
|
-
if (def.options.every((
|
|
3040
|
-
const patterns = def.options.map((
|
|
3041
|
-
return new RegExp(`^(${patterns.map((
|
|
3582
|
+
if (def.options.every((o2) => o2._zod.pattern)) {
|
|
3583
|
+
const patterns = def.options.map((o2) => o2._zod.pattern);
|
|
3584
|
+
return new RegExp(`^(${patterns.map((p4) => cleanRegex(p4.source)).join("|")})$`);
|
|
3042
3585
|
}
|
|
3043
3586
|
return void 0;
|
|
3044
3587
|
});
|
|
@@ -3080,11 +3623,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3080
3623
|
const pv = option._zod.propValues;
|
|
3081
3624
|
if (!pv || Object.keys(pv).length === 0)
|
|
3082
3625
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
3083
|
-
for (const [
|
|
3084
|
-
if (!propValues[
|
|
3085
|
-
propValues[
|
|
3086
|
-
for (const val of
|
|
3087
|
-
propValues[
|
|
3626
|
+
for (const [k4, v2] of Object.entries(pv)) {
|
|
3627
|
+
if (!propValues[k4])
|
|
3628
|
+
propValues[k4] = /* @__PURE__ */ new Set();
|
|
3629
|
+
for (const val of v2) {
|
|
3630
|
+
propValues[k4].add(val);
|
|
3088
3631
|
}
|
|
3089
3632
|
}
|
|
3090
3633
|
}
|
|
@@ -3093,15 +3636,15 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3093
3636
|
const disc = cached(() => {
|
|
3094
3637
|
const opts = def.options;
|
|
3095
3638
|
const map2 = /* @__PURE__ */ new Map();
|
|
3096
|
-
for (const
|
|
3097
|
-
const values =
|
|
3639
|
+
for (const o2 of opts) {
|
|
3640
|
+
const values = o2._zod.propValues?.[def.discriminator];
|
|
3098
3641
|
if (!values || values.size === 0)
|
|
3099
|
-
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(
|
|
3100
|
-
for (const
|
|
3101
|
-
if (map2.has(
|
|
3102
|
-
throw new Error(`Duplicate discriminator value "${String(
|
|
3642
|
+
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`);
|
|
3643
|
+
for (const v2 of values) {
|
|
3644
|
+
if (map2.has(v2)) {
|
|
3645
|
+
throw new Error(`Duplicate discriminator value "${String(v2)}"`);
|
|
3103
3646
|
}
|
|
3104
|
-
map2.set(
|
|
3647
|
+
map2.set(v2, o2);
|
|
3105
3648
|
}
|
|
3106
3649
|
}
|
|
3107
3650
|
return map2;
|
|
@@ -3151,19 +3694,19 @@ var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, d
|
|
|
3151
3694
|
return handleIntersectionResults(payload, left, right);
|
|
3152
3695
|
};
|
|
3153
3696
|
});
|
|
3154
|
-
function mergeValues(a4,
|
|
3155
|
-
if (a4 ===
|
|
3697
|
+
function mergeValues(a4, b4) {
|
|
3698
|
+
if (a4 === b4) {
|
|
3156
3699
|
return { valid: true, data: a4 };
|
|
3157
3700
|
}
|
|
3158
|
-
if (a4 instanceof Date &&
|
|
3701
|
+
if (a4 instanceof Date && b4 instanceof Date && +a4 === +b4) {
|
|
3159
3702
|
return { valid: true, data: a4 };
|
|
3160
3703
|
}
|
|
3161
|
-
if (isPlainObject(a4) && isPlainObject(
|
|
3162
|
-
const bKeys = Object.keys(
|
|
3704
|
+
if (isPlainObject(a4) && isPlainObject(b4)) {
|
|
3705
|
+
const bKeys = Object.keys(b4);
|
|
3163
3706
|
const sharedKeys = Object.keys(a4).filter((key) => bKeys.indexOf(key) !== -1);
|
|
3164
|
-
const newObj = { ...a4, ...
|
|
3707
|
+
const newObj = { ...a4, ...b4 };
|
|
3165
3708
|
for (const key of sharedKeys) {
|
|
3166
|
-
const sharedValue = mergeValues(a4[key],
|
|
3709
|
+
const sharedValue = mergeValues(a4[key], b4[key]);
|
|
3167
3710
|
if (!sharedValue.valid) {
|
|
3168
3711
|
return {
|
|
3169
3712
|
valid: false,
|
|
@@ -3174,14 +3717,14 @@ function mergeValues(a4, b) {
|
|
|
3174
3717
|
}
|
|
3175
3718
|
return { valid: true, data: newObj };
|
|
3176
3719
|
}
|
|
3177
|
-
if (Array.isArray(a4) && Array.isArray(
|
|
3178
|
-
if (a4.length !==
|
|
3720
|
+
if (Array.isArray(a4) && Array.isArray(b4)) {
|
|
3721
|
+
if (a4.length !== b4.length) {
|
|
3179
3722
|
return { valid: false, mergeErrorPath: [] };
|
|
3180
3723
|
}
|
|
3181
3724
|
const newArray = [];
|
|
3182
3725
|
for (let index = 0; index < a4.length; index++) {
|
|
3183
3726
|
const itemA = a4[index];
|
|
3184
|
-
const itemB =
|
|
3727
|
+
const itemB = b4[index];
|
|
3185
3728
|
const sharedValue = mergeValues(itemA, itemB);
|
|
3186
3729
|
if (!sharedValue.valid) {
|
|
3187
3730
|
return {
|
|
@@ -3214,7 +3757,6 @@ function handleIntersectionResults(result, left, right) {
|
|
|
3214
3757
|
var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
3215
3758
|
$ZodType.init(inst, def);
|
|
3216
3759
|
const items = def.items;
|
|
3217
|
-
const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
3218
3760
|
inst._zod.parse = (payload, ctx) => {
|
|
3219
3761
|
const input = payload.value;
|
|
3220
3762
|
if (!Array.isArray(input)) {
|
|
@@ -3228,6 +3770,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3228
3770
|
}
|
|
3229
3771
|
payload.value = [];
|
|
3230
3772
|
const proms = [];
|
|
3773
|
+
const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
3774
|
+
const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
|
|
3231
3775
|
if (!def.rest) {
|
|
3232
3776
|
const tooBig = input.length > items.length;
|
|
3233
3777
|
const tooSmall = input.length < optStart - 1;
|
|
@@ -3241,35 +3785,35 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3241
3785
|
return payload;
|
|
3242
3786
|
}
|
|
3243
3787
|
}
|
|
3244
|
-
let
|
|
3788
|
+
let i3 = -1;
|
|
3245
3789
|
for (const item of items) {
|
|
3246
|
-
|
|
3247
|
-
if (
|
|
3248
|
-
if (
|
|
3790
|
+
i3++;
|
|
3791
|
+
if (i3 >= input.length) {
|
|
3792
|
+
if (i3 >= optStart)
|
|
3249
3793
|
continue;
|
|
3250
3794
|
}
|
|
3251
3795
|
const result = item._zod.run({
|
|
3252
|
-
value: input[
|
|
3796
|
+
value: input[i3],
|
|
3253
3797
|
issues: []
|
|
3254
3798
|
}, ctx);
|
|
3255
3799
|
if (result instanceof Promise) {
|
|
3256
|
-
proms.push(result.then((result2) => handleTupleResult(result2, payload,
|
|
3800
|
+
proms.push(result.then((result2) => handleTupleResult(result2, payload, i3)));
|
|
3257
3801
|
} else {
|
|
3258
|
-
handleTupleResult(result, payload,
|
|
3802
|
+
handleTupleResult(result, payload, i3);
|
|
3259
3803
|
}
|
|
3260
3804
|
}
|
|
3261
3805
|
if (def.rest) {
|
|
3262
3806
|
const rest = input.slice(items.length);
|
|
3263
3807
|
for (const el of rest) {
|
|
3264
|
-
|
|
3808
|
+
i3++;
|
|
3265
3809
|
const result = def.rest._zod.run({
|
|
3266
3810
|
value: el,
|
|
3267
3811
|
issues: []
|
|
3268
3812
|
}, ctx);
|
|
3269
3813
|
if (result instanceof Promise) {
|
|
3270
|
-
proms.push(result.then((result2) => handleTupleResult(result2, payload,
|
|
3814
|
+
proms.push(result.then((result2) => handleTupleResult(result2, payload, i3)));
|
|
3271
3815
|
} else {
|
|
3272
|
-
handleTupleResult(result, payload,
|
|
3816
|
+
handleTupleResult(result, payload, i3);
|
|
3273
3817
|
}
|
|
3274
3818
|
}
|
|
3275
3819
|
}
|
|
@@ -3298,11 +3842,13 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3298
3842
|
return payload;
|
|
3299
3843
|
}
|
|
3300
3844
|
const proms = [];
|
|
3301
|
-
|
|
3302
|
-
|
|
3845
|
+
const values = def.keyType._zod.values;
|
|
3846
|
+
if (values) {
|
|
3303
3847
|
payload.value = {};
|
|
3848
|
+
const recordKeys = /* @__PURE__ */ new Set();
|
|
3304
3849
|
for (const key of values) {
|
|
3305
3850
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3851
|
+
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3306
3852
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3307
3853
|
if (result instanceof Promise) {
|
|
3308
3854
|
proms.push(result.then((result2) => {
|
|
@@ -3321,7 +3867,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3321
3867
|
}
|
|
3322
3868
|
let unrecognized;
|
|
3323
3869
|
for (const key in input) {
|
|
3324
|
-
if (!
|
|
3870
|
+
if (!recordKeys.has(key)) {
|
|
3325
3871
|
unrecognized = unrecognized ?? [];
|
|
3326
3872
|
unrecognized.push(key);
|
|
3327
3873
|
}
|
|
@@ -3476,7 +4022,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
3476
4022
|
const values = getEnumValues(def.entries);
|
|
3477
4023
|
const valuesSet = new Set(values);
|
|
3478
4024
|
inst._zod.values = valuesSet;
|
|
3479
|
-
inst._zod.pattern = new RegExp(`^(${values.filter((
|
|
4025
|
+
inst._zod.pattern = new RegExp(`^(${values.filter((k4) => propertyKeyTypes.has(typeof k4)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`);
|
|
3480
4026
|
inst._zod.parse = (payload, _ctx) => {
|
|
3481
4027
|
const input = payload.value;
|
|
3482
4028
|
if (valuesSet.has(input)) {
|
|
@@ -3496,11 +4042,12 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
3496
4042
|
if (def.values.length === 0) {
|
|
3497
4043
|
throw new Error("Cannot create literal schema with no valid values");
|
|
3498
4044
|
}
|
|
3499
|
-
|
|
3500
|
-
inst._zod.
|
|
4045
|
+
const values = new Set(def.values);
|
|
4046
|
+
inst._zod.values = values;
|
|
4047
|
+
inst._zod.pattern = new RegExp(`^(${def.values.map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2 ? escapeRegex(o2.toString()) : String(o2)).join("|")})$`);
|
|
3501
4048
|
inst._zod.parse = (payload, _ctx) => {
|
|
3502
4049
|
const input = payload.value;
|
|
3503
|
-
if (
|
|
4050
|
+
if (values.has(input)) {
|
|
3504
4051
|
return payload;
|
|
3505
4052
|
}
|
|
3506
4053
|
payload.issues.push({
|
|
@@ -3569,7 +4116,7 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3569
4116
|
if (def.innerType._zod.optin === "optional") {
|
|
3570
4117
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3571
4118
|
if (result instanceof Promise)
|
|
3572
|
-
return result.then((
|
|
4119
|
+
return result.then((r3) => handleOptionalResult(r3, payload.value));
|
|
3573
4120
|
return handleOptionalResult(result, payload.value);
|
|
3574
4121
|
}
|
|
3575
4122
|
if (payload.value === void 0) {
|
|
@@ -3637,8 +4184,8 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
|
3637
4184
|
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
3638
4185
|
$ZodType.init(inst, def);
|
|
3639
4186
|
defineLazy(inst._zod, "values", () => {
|
|
3640
|
-
const
|
|
3641
|
-
return
|
|
4187
|
+
const v2 = def.innerType._zod.values;
|
|
4188
|
+
return v2 ? new Set([...v2].filter((x3) => x3 !== void 0)) : void 0;
|
|
3642
4189
|
});
|
|
3643
4190
|
inst._zod.parse = (payload, ctx) => {
|
|
3644
4191
|
const result = def.innerType._zod.run(payload, ctx);
|
|
@@ -3813,8 +4360,8 @@ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
|
3813
4360
|
$ZodType.init(inst, def);
|
|
3814
4361
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
3815
4362
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3816
|
-
defineLazy(inst._zod, "optin", () => def.innerType
|
|
3817
|
-
defineLazy(inst._zod, "optout", () => def.innerType
|
|
4363
|
+
defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
4364
|
+
defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
3818
4365
|
inst._zod.parse = (payload, ctx) => {
|
|
3819
4366
|
if (ctx.direction === "backward") {
|
|
3820
4367
|
return def.innerType._zod.run(payload, ctx);
|
|
@@ -3924,9 +4471,9 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
|
|
|
3924
4471
|
return payload;
|
|
3925
4472
|
};
|
|
3926
4473
|
inst.input = (...args) => {
|
|
3927
|
-
const
|
|
4474
|
+
const F3 = inst.constructor;
|
|
3928
4475
|
if (Array.isArray(args[0])) {
|
|
3929
|
-
return new
|
|
4476
|
+
return new F3({
|
|
3930
4477
|
type: "function",
|
|
3931
4478
|
input: new $ZodTuple({
|
|
3932
4479
|
type: "tuple",
|
|
@@ -3936,15 +4483,15 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
|
|
|
3936
4483
|
output: inst._def.output
|
|
3937
4484
|
});
|
|
3938
4485
|
}
|
|
3939
|
-
return new
|
|
4486
|
+
return new F3({
|
|
3940
4487
|
type: "function",
|
|
3941
4488
|
input: args[0],
|
|
3942
4489
|
output: inst._def.output
|
|
3943
4490
|
});
|
|
3944
4491
|
};
|
|
3945
4492
|
inst.output = (output) => {
|
|
3946
|
-
const
|
|
3947
|
-
return new
|
|
4493
|
+
const F3 = inst.constructor;
|
|
4494
|
+
return new F3({
|
|
3948
4495
|
type: "function",
|
|
3949
4496
|
input: inst._def.input,
|
|
3950
4497
|
output
|
|
@@ -3961,10 +4508,10 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
3961
4508
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
3962
4509
|
$ZodType.init(inst, def);
|
|
3963
4510
|
defineLazy(inst._zod, "innerType", () => def.getter());
|
|
3964
|
-
defineLazy(inst._zod, "pattern", () => inst._zod.innerType
|
|
3965
|
-
defineLazy(inst._zod, "propValues", () => inst._zod.innerType
|
|
3966
|
-
defineLazy(inst._zod, "optin", () => inst._zod.innerType
|
|
3967
|
-
defineLazy(inst._zod, "optout", () => inst._zod.innerType
|
|
4511
|
+
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4512
|
+
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4513
|
+
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
4514
|
+
defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
|
|
3968
4515
|
inst._zod.parse = (payload, ctx) => {
|
|
3969
4516
|
const inner = inst._zod.innerType;
|
|
3970
4517
|
return inner._zod.run(payload, ctx);
|
|
@@ -3973,16 +4520,16 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
|
3973
4520
|
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
3974
4521
|
$ZodCheck.init(inst, def);
|
|
3975
4522
|
$ZodType.init(inst, def);
|
|
3976
|
-
inst._zod.parse = (payload,
|
|
4523
|
+
inst._zod.parse = (payload, _2) => {
|
|
3977
4524
|
return payload;
|
|
3978
4525
|
};
|
|
3979
4526
|
inst._zod.check = (payload) => {
|
|
3980
4527
|
const input = payload.value;
|
|
3981
|
-
const
|
|
3982
|
-
if (
|
|
3983
|
-
return
|
|
4528
|
+
const r3 = def.fn(input);
|
|
4529
|
+
if (r3 instanceof Promise) {
|
|
4530
|
+
return r3.then((r4) => handleRefineResult(r4, payload, input, inst));
|
|
3984
4531
|
}
|
|
3985
|
-
handleRefineResult(
|
|
4532
|
+
handleRefineResult(r3, payload, input, inst);
|
|
3986
4533
|
return;
|
|
3987
4534
|
};
|
|
3988
4535
|
});
|
|
@@ -5138,6 +5685,7 @@ var error9 = () => {
|
|
|
5138
5685
|
duration: "ISO duration",
|
|
5139
5686
|
ipv4: "IPv4 address",
|
|
5140
5687
|
ipv6: "IPv6 address",
|
|
5688
|
+
mac: "MAC address",
|
|
5141
5689
|
cidrv4: "IPv4 range",
|
|
5142
5690
|
cidrv6: "IPv6 range",
|
|
5143
5691
|
base64: "base64-encoded string",
|
|
@@ -5953,110 +6501,201 @@ function fr_CA_default() {
|
|
|
5953
6501
|
|
|
5954
6502
|
// node_modules/zod/v4/locales/he.js
|
|
5955
6503
|
var error16 = () => {
|
|
5956
|
-
const
|
|
5957
|
-
string: {
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
6504
|
+
const TypeNames = {
|
|
6505
|
+
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6506
|
+
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
6507
|
+
boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" },
|
|
6508
|
+
bigint: { label: "BigInt", gender: "m" },
|
|
6509
|
+
date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" },
|
|
6510
|
+
array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" },
|
|
6511
|
+
object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" },
|
|
6512
|
+
null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" },
|
|
6513
|
+
undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" },
|
|
6514
|
+
symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" },
|
|
6515
|
+
function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" },
|
|
6516
|
+
map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" },
|
|
6517
|
+
set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" },
|
|
6518
|
+
file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" },
|
|
6519
|
+
promise: { label: "Promise", gender: "m" },
|
|
6520
|
+
NaN: { label: "NaN", gender: "m" },
|
|
6521
|
+
unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" },
|
|
6522
|
+
value: { label: "\u05E2\u05E8\u05DA", gender: "m" }
|
|
5961
6523
|
};
|
|
5962
|
-
|
|
6524
|
+
const Sizable = {
|
|
6525
|
+
string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" },
|
|
6526
|
+
file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
6527
|
+
array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
6528
|
+
set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
6529
|
+
number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
|
|
6530
|
+
// no unit
|
|
6531
|
+
};
|
|
6532
|
+
const typeEntry = (t3) => t3 ? TypeNames[t3] : void 0;
|
|
6533
|
+
const typeLabel = (t3) => {
|
|
6534
|
+
const e5 = typeEntry(t3);
|
|
6535
|
+
if (e5)
|
|
6536
|
+
return e5.label;
|
|
6537
|
+
return t3 ?? TypeNames.unknown.label;
|
|
6538
|
+
};
|
|
6539
|
+
const withDefinite = (t3) => `\u05D4${typeLabel(t3)}`;
|
|
6540
|
+
const verbFor = (t3) => {
|
|
6541
|
+
const e5 = typeEntry(t3);
|
|
6542
|
+
const gender = e5?.gender ?? "m";
|
|
6543
|
+
return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
|
|
6544
|
+
};
|
|
6545
|
+
const getSizing = (origin) => {
|
|
6546
|
+
if (!origin)
|
|
6547
|
+
return null;
|
|
5963
6548
|
return Sizable[origin] ?? null;
|
|
5964
|
-
}
|
|
6549
|
+
};
|
|
5965
6550
|
const parsedType8 = (data) => {
|
|
5966
6551
|
const t3 = typeof data;
|
|
5967
6552
|
switch (t3) {
|
|
5968
|
-
case "number":
|
|
6553
|
+
case "number":
|
|
5969
6554
|
return Number.isNaN(data) ? "NaN" : "number";
|
|
5970
|
-
}
|
|
5971
6555
|
case "object": {
|
|
5972
|
-
if (Array.isArray(data))
|
|
6556
|
+
if (Array.isArray(data))
|
|
5973
6557
|
return "array";
|
|
5974
|
-
|
|
5975
|
-
if (data === null) {
|
|
6558
|
+
if (data === null)
|
|
5976
6559
|
return "null";
|
|
5977
|
-
}
|
|
5978
6560
|
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
5979
6561
|
return data.constructor.name;
|
|
5980
6562
|
}
|
|
6563
|
+
return "object";
|
|
5981
6564
|
}
|
|
6565
|
+
default:
|
|
6566
|
+
return t3;
|
|
5982
6567
|
}
|
|
5983
|
-
return t3;
|
|
5984
6568
|
};
|
|
5985
6569
|
const Nouns = {
|
|
5986
|
-
regex: "\u05E7\u05DC\u05D8",
|
|
5987
|
-
email: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",
|
|
5988
|
-
url: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",
|
|
5989
|
-
emoji: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",
|
|
5990
|
-
uuid: "UUID",
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6570
|
+
regex: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
6571
|
+
email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" },
|
|
6572
|
+
url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" },
|
|
6573
|
+
emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" },
|
|
6574
|
+
uuid: { label: "UUID", gender: "m" },
|
|
6575
|
+
nanoid: { label: "nanoid", gender: "m" },
|
|
6576
|
+
guid: { label: "GUID", gender: "m" },
|
|
6577
|
+
cuid: { label: "cuid", gender: "m" },
|
|
6578
|
+
cuid2: { label: "cuid2", gender: "m" },
|
|
6579
|
+
ulid: { label: "ULID", gender: "m" },
|
|
6580
|
+
xid: { label: "XID", gender: "m" },
|
|
6581
|
+
ksuid: { label: "KSUID", gender: "m" },
|
|
6582
|
+
datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" },
|
|
6583
|
+
date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" },
|
|
6584
|
+
time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" },
|
|
6585
|
+
duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" },
|
|
6586
|
+
ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" },
|
|
6587
|
+
ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" },
|
|
6588
|
+
cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" },
|
|
6589
|
+
cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" },
|
|
6590
|
+
base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" },
|
|
6591
|
+
base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" },
|
|
6592
|
+
json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
|
|
6593
|
+
e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
|
|
6594
|
+
jwt: { label: "JWT", gender: "m" },
|
|
6595
|
+
ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
6596
|
+
includes: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
6597
|
+
lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
6598
|
+
starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
6599
|
+
uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }
|
|
6014
6600
|
};
|
|
6015
6601
|
return (issue2) => {
|
|
6016
6602
|
switch (issue2.code) {
|
|
6017
|
-
case "invalid_type":
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \
|
|
6603
|
+
case "invalid_type": {
|
|
6604
|
+
const expectedKey = issue2.expected;
|
|
6605
|
+
const expected = typeLabel(expectedKey);
|
|
6606
|
+
const receivedKey = parsedType8(issue2.input);
|
|
6607
|
+
const received = TypeNames[receivedKey]?.label ?? receivedKey;
|
|
6608
|
+
return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
|
|
6609
|
+
}
|
|
6610
|
+
case "invalid_value": {
|
|
6611
|
+
if (issue2.values.length === 1) {
|
|
6612
|
+
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`;
|
|
6613
|
+
}
|
|
6614
|
+
const stringified = issue2.values.map((v2) => stringifyPrimitive(v2));
|
|
6615
|
+
if (issue2.values.length === 2) {
|
|
6616
|
+
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;
|
|
6617
|
+
}
|
|
6618
|
+
const lastValue = stringified[stringified.length - 1];
|
|
6619
|
+
const restValues = stringified.slice(0, -1).join(", ");
|
|
6620
|
+
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;
|
|
6621
|
+
}
|
|
6023
6622
|
case "too_big": {
|
|
6024
|
-
const adj = issue2.inclusive ? "<=" : "<";
|
|
6025
6623
|
const sizing = getSizing(issue2.origin);
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6624
|
+
const subject = withDefinite(issue2.origin ?? "value");
|
|
6625
|
+
if (issue2.origin === "string") {
|
|
6626
|
+
return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();
|
|
6627
|
+
}
|
|
6628
|
+
if (issue2.origin === "number") {
|
|
6629
|
+
const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`;
|
|
6630
|
+
return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
|
|
6631
|
+
}
|
|
6632
|
+
if (issue2.origin === "array" || issue2.origin === "set") {
|
|
6633
|
+
const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
|
|
6634
|
+
const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`;
|
|
6635
|
+
return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
|
|
6636
|
+
}
|
|
6637
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6638
|
+
const be2 = verbFor(issue2.origin ?? "value");
|
|
6639
|
+
if (sizing?.unit) {
|
|
6640
|
+
return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
|
|
6641
|
+
}
|
|
6642
|
+
return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`;
|
|
6029
6643
|
}
|
|
6030
6644
|
case "too_small": {
|
|
6031
|
-
const adj = issue2.inclusive ? ">=" : ">";
|
|
6032
6645
|
const sizing = getSizing(issue2.origin);
|
|
6033
|
-
|
|
6034
|
-
|
|
6646
|
+
const subject = withDefinite(issue2.origin ?? "value");
|
|
6647
|
+
if (issue2.origin === "string") {
|
|
6648
|
+
return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();
|
|
6649
|
+
}
|
|
6650
|
+
if (issue2.origin === "number") {
|
|
6651
|
+
const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`;
|
|
6652
|
+
return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
|
|
6653
|
+
}
|
|
6654
|
+
if (issue2.origin === "array" || issue2.origin === "set") {
|
|
6655
|
+
const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
|
|
6656
|
+
if (issue2.minimum === 1 && issue2.inclusive) {
|
|
6657
|
+
const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";
|
|
6658
|
+
return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;
|
|
6659
|
+
}
|
|
6660
|
+
const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`;
|
|
6661
|
+
return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
|
|
6035
6662
|
}
|
|
6036
|
-
|
|
6663
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6664
|
+
const be2 = verbFor(issue2.origin ?? "value");
|
|
6665
|
+
if (sizing?.unit) {
|
|
6666
|
+
return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6667
|
+
}
|
|
6668
|
+
return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`;
|
|
6037
6669
|
}
|
|
6038
6670
|
case "invalid_format": {
|
|
6039
6671
|
const _issue = issue2;
|
|
6040
6672
|
if (_issue.format === "starts_with")
|
|
6041
|
-
return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \
|
|
6673
|
+
return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`;
|
|
6042
6674
|
if (_issue.format === "ends_with")
|
|
6043
|
-
return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \
|
|
6675
|
+
return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`;
|
|
6044
6676
|
if (_issue.format === "includes")
|
|
6045
|
-
return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \
|
|
6677
|
+
return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`;
|
|
6046
6678
|
if (_issue.format === "regex")
|
|
6047
|
-
return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \
|
|
6048
|
-
|
|
6679
|
+
return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;
|
|
6680
|
+
const nounEntry = Nouns[_issue.format];
|
|
6681
|
+
const noun = nounEntry?.label ?? _issue.format;
|
|
6682
|
+
const gender = nounEntry?.gender ?? "m";
|
|
6683
|
+
const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF";
|
|
6684
|
+
return `${noun} \u05DC\u05D0 ${adjective}`;
|
|
6049
6685
|
}
|
|
6050
6686
|
case "not_multiple_of":
|
|
6051
6687
|
return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`;
|
|
6052
6688
|
case "unrecognized_keys":
|
|
6053
6689
|
return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6054
|
-
case "invalid_key":
|
|
6055
|
-
return `\
|
|
6690
|
+
case "invalid_key": {
|
|
6691
|
+
return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;
|
|
6692
|
+
}
|
|
6056
6693
|
case "invalid_union":
|
|
6057
6694
|
return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";
|
|
6058
|
-
case "invalid_element":
|
|
6059
|
-
|
|
6695
|
+
case "invalid_element": {
|
|
6696
|
+
const place = withDefinite(issue2.origin ?? "array");
|
|
6697
|
+
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;
|
|
6698
|
+
}
|
|
6060
6699
|
default:
|
|
6061
6700
|
return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;
|
|
6062
6701
|
}
|
|
@@ -7492,10 +8131,10 @@ function ms_default() {
|
|
|
7492
8131
|
// node_modules/zod/v4/locales/nl.js
|
|
7493
8132
|
var error28 = () => {
|
|
7494
8133
|
const Sizable = {
|
|
7495
|
-
string: { unit: "tekens" },
|
|
7496
|
-
file: { unit: "bytes" },
|
|
7497
|
-
array: { unit: "elementen" },
|
|
7498
|
-
set: { unit: "elementen" }
|
|
8134
|
+
string: { unit: "tekens", verb: "te hebben" },
|
|
8135
|
+
file: { unit: "bytes", verb: "te hebben" },
|
|
8136
|
+
array: { unit: "elementen", verb: "te hebben" },
|
|
8137
|
+
set: { unit: "elementen", verb: "te hebben" }
|
|
7499
8138
|
};
|
|
7500
8139
|
function getSizing(origin) {
|
|
7501
8140
|
return Sizable[origin] ?? null;
|
|
@@ -7562,16 +8201,16 @@ var error28 = () => {
|
|
|
7562
8201
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
7563
8202
|
const sizing = getSizing(issue2.origin);
|
|
7564
8203
|
if (sizing)
|
|
7565
|
-
return `Te
|
|
7566
|
-
return `Te
|
|
8204
|
+
return `Te groot: verwacht dat ${issue2.origin ?? "waarde"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"}`;
|
|
8205
|
+
return `Te groot: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`;
|
|
7567
8206
|
}
|
|
7568
8207
|
case "too_small": {
|
|
7569
8208
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
7570
8209
|
const sizing = getSizing(issue2.origin);
|
|
7571
8210
|
if (sizing) {
|
|
7572
|
-
return `Te
|
|
8211
|
+
return `Te klein: verwacht dat ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
7573
8212
|
}
|
|
7574
|
-
return `Te
|
|
8213
|
+
return `Te klein: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`;
|
|
7575
8214
|
}
|
|
7576
8215
|
case "invalid_format": {
|
|
7577
8216
|
const _issue = issue2;
|
|
@@ -9662,6 +10301,7 @@ function yo_default() {
|
|
|
9662
10301
|
}
|
|
9663
10302
|
|
|
9664
10303
|
// node_modules/zod/v4/core/registries.js
|
|
10304
|
+
var _a;
|
|
9665
10305
|
var $output = Symbol("ZodOutput");
|
|
9666
10306
|
var $input = Symbol("ZodInput");
|
|
9667
10307
|
var $ZodRegistry = class {
|
|
@@ -9670,13 +10310,13 @@ var $ZodRegistry = class {
|
|
|
9670
10310
|
this._idmap = /* @__PURE__ */ new Map();
|
|
9671
10311
|
}
|
|
9672
10312
|
add(schema, ..._meta) {
|
|
9673
|
-
const
|
|
9674
|
-
this._map.set(schema,
|
|
9675
|
-
if (
|
|
9676
|
-
if (this._idmap.has(
|
|
9677
|
-
throw new Error(`ID ${
|
|
10313
|
+
const meta3 = _meta[0];
|
|
10314
|
+
this._map.set(schema, meta3);
|
|
10315
|
+
if (meta3 && typeof meta3 === "object" && "id" in meta3) {
|
|
10316
|
+
if (this._idmap.has(meta3.id)) {
|
|
10317
|
+
throw new Error(`ID ${meta3.id} already exists in the registry`);
|
|
9678
10318
|
}
|
|
9679
|
-
this._idmap.set(
|
|
10319
|
+
this._idmap.set(meta3.id, schema);
|
|
9680
10320
|
}
|
|
9681
10321
|
return this;
|
|
9682
10322
|
}
|
|
@@ -9686,20 +10326,20 @@ var $ZodRegistry = class {
|
|
|
9686
10326
|
return this;
|
|
9687
10327
|
}
|
|
9688
10328
|
remove(schema) {
|
|
9689
|
-
const
|
|
9690
|
-
if (
|
|
9691
|
-
this._idmap.delete(
|
|
10329
|
+
const meta3 = this._map.get(schema);
|
|
10330
|
+
if (meta3 && typeof meta3 === "object" && "id" in meta3) {
|
|
10331
|
+
this._idmap.delete(meta3.id);
|
|
9692
10332
|
}
|
|
9693
10333
|
this._map.delete(schema);
|
|
9694
10334
|
return this;
|
|
9695
10335
|
}
|
|
9696
10336
|
get(schema) {
|
|
9697
|
-
const
|
|
9698
|
-
if (
|
|
9699
|
-
const pm = { ...this.get(
|
|
10337
|
+
const p4 = schema._zod.parent;
|
|
10338
|
+
if (p4) {
|
|
10339
|
+
const pm = { ...this.get(p4) ?? {} };
|
|
9700
10340
|
delete pm.id;
|
|
9701
|
-
const
|
|
9702
|
-
return Object.keys(
|
|
10341
|
+
const f2 = { ...pm, ...this._map.get(schema) };
|
|
10342
|
+
return Object.keys(f2).length ? f2 : void 0;
|
|
9703
10343
|
}
|
|
9704
10344
|
return this._map.get(schema);
|
|
9705
10345
|
}
|
|
@@ -9710,7 +10350,8 @@ var $ZodRegistry = class {
|
|
|
9710
10350
|
function registry() {
|
|
9711
10351
|
return new $ZodRegistry();
|
|
9712
10352
|
}
|
|
9713
|
-
|
|
10353
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
10354
|
+
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
9714
10355
|
|
|
9715
10356
|
// node_modules/zod/v4/core/api.js
|
|
9716
10357
|
function _string(Class2, params) {
|
|
@@ -9873,6 +10514,15 @@ function _ipv6(Class2, params) {
|
|
|
9873
10514
|
...normalizeParams(params)
|
|
9874
10515
|
});
|
|
9875
10516
|
}
|
|
10517
|
+
function _mac(Class2, params) {
|
|
10518
|
+
return new Class2({
|
|
10519
|
+
type: "string",
|
|
10520
|
+
format: "mac",
|
|
10521
|
+
check: "string_format",
|
|
10522
|
+
abort: false,
|
|
10523
|
+
...normalizeParams(params)
|
|
10524
|
+
});
|
|
10525
|
+
}
|
|
9876
10526
|
function _cidrv4(Class2, params) {
|
|
9877
10527
|
return new Class2({
|
|
9878
10528
|
type: "string",
|
|
@@ -10306,6 +10956,9 @@ function _toLowerCase() {
|
|
|
10306
10956
|
function _toUpperCase() {
|
|
10307
10957
|
return _overwrite((input) => input.toUpperCase());
|
|
10308
10958
|
}
|
|
10959
|
+
function _slugify() {
|
|
10960
|
+
return _overwrite((input) => slugify(input));
|
|
10961
|
+
}
|
|
10309
10962
|
function _array(Class2, element, params) {
|
|
10310
10963
|
return new Class2({
|
|
10311
10964
|
type: "array",
|
|
@@ -10373,7 +11026,7 @@ function _set(Class2, valueType, params) {
|
|
|
10373
11026
|
});
|
|
10374
11027
|
}
|
|
10375
11028
|
function _enum(Class2, values, params) {
|
|
10376
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
11029
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
10377
11030
|
return new Class2({
|
|
10378
11031
|
type: "enum",
|
|
10379
11032
|
entries,
|
|
@@ -10527,13 +11180,37 @@ function _check(fn2, params) {
|
|
|
10527
11180
|
ch._zod.check = fn2;
|
|
10528
11181
|
return ch;
|
|
10529
11182
|
}
|
|
11183
|
+
function describe(description) {
|
|
11184
|
+
const ch = new $ZodCheck({ check: "describe" });
|
|
11185
|
+
ch._zod.onattach = [
|
|
11186
|
+
(inst) => {
|
|
11187
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
11188
|
+
globalRegistry.add(inst, { ...existing, description });
|
|
11189
|
+
}
|
|
11190
|
+
];
|
|
11191
|
+
ch._zod.check = () => {
|
|
11192
|
+
};
|
|
11193
|
+
return ch;
|
|
11194
|
+
}
|
|
11195
|
+
function meta(metadata) {
|
|
11196
|
+
const ch = new $ZodCheck({ check: "meta" });
|
|
11197
|
+
ch._zod.onattach = [
|
|
11198
|
+
(inst) => {
|
|
11199
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
11200
|
+
globalRegistry.add(inst, { ...existing, ...metadata });
|
|
11201
|
+
}
|
|
11202
|
+
];
|
|
11203
|
+
ch._zod.check = () => {
|
|
11204
|
+
};
|
|
11205
|
+
return ch;
|
|
11206
|
+
}
|
|
10530
11207
|
function _stringbool(Classes, _params) {
|
|
10531
11208
|
const params = normalizeParams(_params);
|
|
10532
11209
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
10533
11210
|
let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
10534
11211
|
if (params.case !== "sensitive") {
|
|
10535
|
-
truthyArray = truthyArray.map((
|
|
10536
|
-
falsyArray = falsyArray.map((
|
|
11212
|
+
truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
11213
|
+
falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
10537
11214
|
}
|
|
10538
11215
|
const truthySet = new Set(truthyArray);
|
|
10539
11216
|
const falsySet = new Set(falsyArray);
|
|
@@ -10607,7 +11284,7 @@ var JSONSchemaGenerator = class {
|
|
|
10607
11284
|
this.seen = /* @__PURE__ */ new Map();
|
|
10608
11285
|
}
|
|
10609
11286
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
10610
|
-
var
|
|
11287
|
+
var _a2;
|
|
10611
11288
|
const def = schema._zod.def;
|
|
10612
11289
|
const formatMap = {
|
|
10613
11290
|
guid: "uuid",
|
|
@@ -10798,11 +11475,11 @@ var JSONSchemaGenerator = class {
|
|
|
10798
11475
|
}
|
|
10799
11476
|
const allKeys = new Set(Object.keys(shape));
|
|
10800
11477
|
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
10801
|
-
const
|
|
11478
|
+
const v2 = def.shape[key]._zod;
|
|
10802
11479
|
if (this.io === "input") {
|
|
10803
|
-
return
|
|
11480
|
+
return v2.optin === void 0;
|
|
10804
11481
|
} else {
|
|
10805
|
-
return
|
|
11482
|
+
return v2.optout === void 0;
|
|
10806
11483
|
}
|
|
10807
11484
|
}));
|
|
10808
11485
|
if (requiredKeys.size > 0) {
|
|
@@ -10823,11 +11500,16 @@ var JSONSchemaGenerator = class {
|
|
|
10823
11500
|
}
|
|
10824
11501
|
case "union": {
|
|
10825
11502
|
const json2 = _json;
|
|
10826
|
-
const
|
|
11503
|
+
const isDiscriminated = def.discriminator !== void 0;
|
|
11504
|
+
const options = def.options.map((x3, i3) => this.process(x3, {
|
|
10827
11505
|
...params,
|
|
10828
|
-
path: [...params.path, "anyOf",
|
|
11506
|
+
path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i3]
|
|
10829
11507
|
}));
|
|
10830
|
-
|
|
11508
|
+
if (isDiscriminated) {
|
|
11509
|
+
json2.oneOf = options;
|
|
11510
|
+
} else {
|
|
11511
|
+
json2.anyOf = options;
|
|
11512
|
+
}
|
|
10831
11513
|
break;
|
|
10832
11514
|
}
|
|
10833
11515
|
case "intersection": {
|
|
@@ -10836,14 +11518,14 @@ var JSONSchemaGenerator = class {
|
|
|
10836
11518
|
...params,
|
|
10837
11519
|
path: [...params.path, "allOf", 0]
|
|
10838
11520
|
});
|
|
10839
|
-
const
|
|
11521
|
+
const b4 = this.process(def.right, {
|
|
10840
11522
|
...params,
|
|
10841
11523
|
path: [...params.path, "allOf", 1]
|
|
10842
11524
|
});
|
|
10843
11525
|
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
10844
11526
|
const allOf = [
|
|
10845
11527
|
...isSimpleIntersection(a4) ? a4.allOf : [a4],
|
|
10846
|
-
...isSimpleIntersection(
|
|
11528
|
+
...isSimpleIntersection(b4) ? b4.allOf : [b4]
|
|
10847
11529
|
];
|
|
10848
11530
|
json2.allOf = allOf;
|
|
10849
11531
|
break;
|
|
@@ -10853,9 +11535,9 @@ var JSONSchemaGenerator = class {
|
|
|
10853
11535
|
json2.type = "array";
|
|
10854
11536
|
const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
10855
11537
|
const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
10856
|
-
const prefixItems = def.items.map((
|
|
11538
|
+
const prefixItems = def.items.map((x3, i3) => this.process(x3, {
|
|
10857
11539
|
...params,
|
|
10858
|
-
path: [...params.path, prefixPath,
|
|
11540
|
+
path: [...params.path, prefixPath, i3]
|
|
10859
11541
|
}));
|
|
10860
11542
|
const rest = def.rest ? this.process(def.rest, {
|
|
10861
11543
|
...params,
|
|
@@ -10920,9 +11602,9 @@ var JSONSchemaGenerator = class {
|
|
|
10920
11602
|
case "enum": {
|
|
10921
11603
|
const json2 = _json;
|
|
10922
11604
|
const values = getEnumValues(def.entries);
|
|
10923
|
-
if (values.every((
|
|
11605
|
+
if (values.every((v2) => typeof v2 === "number"))
|
|
10924
11606
|
json2.type = "number";
|
|
10925
|
-
if (values.every((
|
|
11607
|
+
if (values.every((v2) => typeof v2 === "string"))
|
|
10926
11608
|
json2.type = "string";
|
|
10927
11609
|
json2.enum = values;
|
|
10928
11610
|
break;
|
|
@@ -10956,13 +11638,13 @@ var JSONSchemaGenerator = class {
|
|
|
10956
11638
|
json2.const = val;
|
|
10957
11639
|
}
|
|
10958
11640
|
} else {
|
|
10959
|
-
if (vals.every((
|
|
11641
|
+
if (vals.every((v2) => typeof v2 === "number"))
|
|
10960
11642
|
json2.type = "number";
|
|
10961
|
-
if (vals.every((
|
|
11643
|
+
if (vals.every((v2) => typeof v2 === "string"))
|
|
10962
11644
|
json2.type = "string";
|
|
10963
|
-
if (vals.every((
|
|
11645
|
+
if (vals.every((v2) => typeof v2 === "boolean"))
|
|
10964
11646
|
json2.type = "string";
|
|
10965
|
-
if (vals.every((
|
|
11647
|
+
if (vals.every((v2) => v2 === null))
|
|
10966
11648
|
json2.type = "null";
|
|
10967
11649
|
json2.enum = vals;
|
|
10968
11650
|
}
|
|
@@ -10985,8 +11667,8 @@ var JSONSchemaGenerator = class {
|
|
|
10985
11667
|
file2.contentMediaType = mime[0];
|
|
10986
11668
|
Object.assign(json2, file2);
|
|
10987
11669
|
} else {
|
|
10988
|
-
json2.anyOf = mime.map((
|
|
10989
|
-
const mFile = { ...file2, contentMediaType:
|
|
11670
|
+
json2.anyOf = mime.map((m3) => {
|
|
11671
|
+
const mFile = { ...file2, contentMediaType: m3 };
|
|
10990
11672
|
return mFile;
|
|
10991
11673
|
});
|
|
10992
11674
|
}
|
|
@@ -11107,15 +11789,15 @@ var JSONSchemaGenerator = class {
|
|
|
11107
11789
|
}
|
|
11108
11790
|
}
|
|
11109
11791
|
}
|
|
11110
|
-
const
|
|
11111
|
-
if (
|
|
11112
|
-
Object.assign(result.schema,
|
|
11792
|
+
const meta3 = this.metadataRegistry.get(schema);
|
|
11793
|
+
if (meta3)
|
|
11794
|
+
Object.assign(result.schema, meta3);
|
|
11113
11795
|
if (this.io === "input" && isTransforming(schema)) {
|
|
11114
11796
|
delete result.schema.examples;
|
|
11115
11797
|
delete result.schema.default;
|
|
11116
11798
|
}
|
|
11117
11799
|
if (this.io === "input" && result.schema._prefault)
|
|
11118
|
-
(
|
|
11800
|
+
(_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
|
|
11119
11801
|
delete result.schema._prefault;
|
|
11120
11802
|
const _result = this.seen.get(schema);
|
|
11121
11803
|
return _result.schema;
|
|
@@ -11282,7 +11964,7 @@ function toJSONSchema(input, _params) {
|
|
|
11282
11964
|
const gen2 = new JSONSchemaGenerator(_params);
|
|
11283
11965
|
const defs = {};
|
|
11284
11966
|
for (const entry of input._idmap.entries()) {
|
|
11285
|
-
const [
|
|
11967
|
+
const [_2, schema] = entry;
|
|
11286
11968
|
gen2.process(schema);
|
|
11287
11969
|
}
|
|
11288
11970
|
const schemas = {};
|
|
@@ -11315,101 +11997,51 @@ function isTransforming(_schema, _ctx) {
|
|
|
11315
11997
|
if (ctx.seen.has(_schema))
|
|
11316
11998
|
return false;
|
|
11317
11999
|
ctx.seen.add(_schema);
|
|
11318
|
-
const
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
case "object": {
|
|
11343
|
-
for (const key in def.shape) {
|
|
11344
|
-
if (isTransforming(def.shape[key], ctx))
|
|
11345
|
-
return true;
|
|
11346
|
-
}
|
|
11347
|
-
return false;
|
|
11348
|
-
}
|
|
11349
|
-
case "union": {
|
|
11350
|
-
for (const option of def.options) {
|
|
11351
|
-
if (isTransforming(option, ctx))
|
|
11352
|
-
return true;
|
|
11353
|
-
}
|
|
11354
|
-
return false;
|
|
11355
|
-
}
|
|
11356
|
-
case "intersection": {
|
|
11357
|
-
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
11358
|
-
}
|
|
11359
|
-
case "tuple": {
|
|
11360
|
-
for (const item of def.items) {
|
|
11361
|
-
if (isTransforming(item, ctx))
|
|
11362
|
-
return true;
|
|
11363
|
-
}
|
|
11364
|
-
if (def.rest && isTransforming(def.rest, ctx))
|
|
12000
|
+
const def = _schema._zod.def;
|
|
12001
|
+
if (def.type === "transform")
|
|
12002
|
+
return true;
|
|
12003
|
+
if (def.type === "array")
|
|
12004
|
+
return isTransforming(def.element, ctx);
|
|
12005
|
+
if (def.type === "set")
|
|
12006
|
+
return isTransforming(def.valueType, ctx);
|
|
12007
|
+
if (def.type === "lazy")
|
|
12008
|
+
return isTransforming(def.getter(), ctx);
|
|
12009
|
+
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
|
|
12010
|
+
return isTransforming(def.innerType, ctx);
|
|
12011
|
+
}
|
|
12012
|
+
if (def.type === "intersection") {
|
|
12013
|
+
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
12014
|
+
}
|
|
12015
|
+
if (def.type === "record" || def.type === "map") {
|
|
12016
|
+
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
12017
|
+
}
|
|
12018
|
+
if (def.type === "pipe") {
|
|
12019
|
+
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
12020
|
+
}
|
|
12021
|
+
if (def.type === "object") {
|
|
12022
|
+
for (const key in def.shape) {
|
|
12023
|
+
if (isTransforming(def.shape[key], ctx))
|
|
11365
12024
|
return true;
|
|
11366
|
-
return false;
|
|
11367
|
-
}
|
|
11368
|
-
case "record": {
|
|
11369
|
-
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11370
|
-
}
|
|
11371
|
-
case "map": {
|
|
11372
|
-
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11373
|
-
}
|
|
11374
|
-
case "set": {
|
|
11375
|
-
return isTransforming(def.valueType, ctx);
|
|
11376
|
-
}
|
|
11377
|
-
case "promise":
|
|
11378
|
-
case "optional":
|
|
11379
|
-
case "nonoptional":
|
|
11380
|
-
case "nullable":
|
|
11381
|
-
case "readonly":
|
|
11382
|
-
return isTransforming(def.innerType, ctx);
|
|
11383
|
-
case "lazy":
|
|
11384
|
-
return isTransforming(def.getter(), ctx);
|
|
11385
|
-
case "default": {
|
|
11386
|
-
return isTransforming(def.innerType, ctx);
|
|
11387
12025
|
}
|
|
11388
|
-
|
|
11389
|
-
|
|
12026
|
+
return false;
|
|
12027
|
+
}
|
|
12028
|
+
if (def.type === "union") {
|
|
12029
|
+
for (const option of def.options) {
|
|
12030
|
+
if (isTransforming(option, ctx))
|
|
12031
|
+
return true;
|
|
11390
12032
|
}
|
|
11391
|
-
|
|
11392
|
-
|
|
12033
|
+
return false;
|
|
12034
|
+
}
|
|
12035
|
+
if (def.type === "tuple") {
|
|
12036
|
+
for (const item of def.items) {
|
|
12037
|
+
if (isTransforming(item, ctx))
|
|
12038
|
+
return true;
|
|
11393
12039
|
}
|
|
11394
|
-
|
|
12040
|
+
if (def.rest && isTransforming(def.rest, ctx))
|
|
11395
12041
|
return true;
|
|
11396
|
-
|
|
11397
|
-
case "pipe": {
|
|
11398
|
-
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11399
|
-
}
|
|
11400
|
-
case "success": {
|
|
11401
|
-
return false;
|
|
11402
|
-
}
|
|
11403
|
-
case "catch": {
|
|
11404
|
-
return false;
|
|
11405
|
-
}
|
|
11406
|
-
case "function": {
|
|
11407
|
-
return false;
|
|
11408
|
-
}
|
|
11409
|
-
default:
|
|
11410
|
-
def;
|
|
12042
|
+
return false;
|
|
11411
12043
|
}
|
|
11412
|
-
|
|
12044
|
+
return false;
|
|
11413
12045
|
}
|
|
11414
12046
|
|
|
11415
12047
|
// node_modules/zod/v4/core/json-schema.js
|
|
@@ -11526,8 +12158,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
11526
12158
|
};
|
|
11527
12159
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
11528
12160
|
inst.brand = () => inst;
|
|
11529
|
-
inst.register = (reg,
|
|
11530
|
-
reg.add(inst,
|
|
12161
|
+
inst.register = (reg, meta3) => {
|
|
12162
|
+
reg.add(inst, meta3);
|
|
11531
12163
|
return inst;
|
|
11532
12164
|
};
|
|
11533
12165
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
@@ -11603,6 +12235,7 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
11603
12235
|
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
11604
12236
|
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
11605
12237
|
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
12238
|
+
inst.slugify = () => inst.check(_slugify());
|
|
11606
12239
|
});
|
|
11607
12240
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
11608
12241
|
$ZodString.init(inst, def);
|
|
@@ -11742,6 +12375,13 @@ var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
|
|
|
11742
12375
|
function ipv42(params) {
|
|
11743
12376
|
return _ipv4(ZodIPv4, params);
|
|
11744
12377
|
}
|
|
12378
|
+
var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
|
|
12379
|
+
$ZodMAC.init(inst, def);
|
|
12380
|
+
ZodStringFormat.init(inst, def);
|
|
12381
|
+
});
|
|
12382
|
+
function mac2(params) {
|
|
12383
|
+
return _mac(ZodMAC, params);
|
|
12384
|
+
}
|
|
11745
12385
|
var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
11746
12386
|
$ZodIPv6.init(inst, def);
|
|
11747
12387
|
ZodStringFormat.init(inst, def);
|
|
@@ -11954,9 +12594,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
|
11954
12594
|
ZodType.init(inst, def);
|
|
11955
12595
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11956
12596
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11957
|
-
const
|
|
11958
|
-
inst.minDate =
|
|
11959
|
-
inst.maxDate =
|
|
12597
|
+
const c3 = inst._zod.bag;
|
|
12598
|
+
inst.minDate = c3.minimum ? new Date(c3.minimum) : null;
|
|
12599
|
+
inst.maxDate = c3.maximum ? new Date(c3.maximum) : null;
|
|
11960
12600
|
});
|
|
11961
12601
|
function date3(params) {
|
|
11962
12602
|
return _date(ZodDate, params);
|
|
@@ -12095,11 +12735,11 @@ function record(keyType, valueType, params) {
|
|
|
12095
12735
|
});
|
|
12096
12736
|
}
|
|
12097
12737
|
function partialRecord(keyType, valueType, params) {
|
|
12098
|
-
const
|
|
12099
|
-
|
|
12738
|
+
const k4 = clone(keyType);
|
|
12739
|
+
k4._zod.values = void 0;
|
|
12100
12740
|
return new ZodRecord({
|
|
12101
12741
|
type: "record",
|
|
12102
|
-
keyType:
|
|
12742
|
+
keyType: k4,
|
|
12103
12743
|
valueType,
|
|
12104
12744
|
...util_exports.normalizeParams(params)
|
|
12105
12745
|
});
|
|
@@ -12171,7 +12811,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
12171
12811
|
};
|
|
12172
12812
|
});
|
|
12173
12813
|
function _enum2(values, params) {
|
|
12174
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
12814
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
12175
12815
|
return new ZodEnum({
|
|
12176
12816
|
type: "enum",
|
|
12177
12817
|
entries,
|
|
@@ -12452,6 +13092,8 @@ function refine(fn2, _params = {}) {
|
|
|
12452
13092
|
function superRefine(fn2) {
|
|
12453
13093
|
return _superRefine(fn2);
|
|
12454
13094
|
}
|
|
13095
|
+
var describe2 = describe;
|
|
13096
|
+
var meta2 = meta;
|
|
12455
13097
|
function _instanceof(cls, params = {
|
|
12456
13098
|
error: `Input not instance of ${cls.name}`
|
|
12457
13099
|
}) {
|
|
@@ -12534,798 +13176,326 @@ function date4(params) {
|
|
|
12534
13176
|
// node_modules/zod/v4/classic/external.js
|
|
12535
13177
|
config(en_default());
|
|
12536
13178
|
|
|
12537
|
-
// node_modules/@walkeros/core/dist/
|
|
12538
|
-
var e = Object.defineProperty;
|
|
12539
|
-
var n = (n5, t3) => {
|
|
12540
|
-
for (var i2 in t3)
|
|
12541
|
-
e(n5, i2, { get: t3[i2], enumerable: true });
|
|
12542
|
-
};
|
|
12543
|
-
function h(e5, n5, t3 = "draft-7") {
|
|
12544
|
-
return external_exports.toJSONSchema(e5, { target: t3 });
|
|
12545
|
-
}
|
|
12546
|
-
var v = external_exports.string();
|
|
12547
|
-
var S = external_exports.number();
|
|
12548
|
-
var w = external_exports.boolean();
|
|
12549
|
-
var k = external_exports.string().min(1);
|
|
12550
|
-
var j = external_exports.number().int().positive();
|
|
12551
|
-
var x = external_exports.number().int().nonnegative();
|
|
12552
|
-
var E = external_exports.number().describe("Tagging version number");
|
|
12553
|
-
var P = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
12554
|
-
var C = P.optional();
|
|
12555
|
-
var O = {};
|
|
12556
|
-
n(O, { ErrorHandlerSchema: () => J, HandlerSchema: () => M, LogHandlerSchema: () => L, StorageSchema: () => I, StorageTypeSchema: () => D, errorHandlerJsonSchema: () => A, handlerJsonSchema: () => q, logHandlerJsonSchema: () => N, storageJsonSchema: () => z, storageTypeJsonSchema: () => R });
|
|
12557
|
-
var D = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie");
|
|
12558
|
-
var I = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references");
|
|
12559
|
-
var J = external_exports.any().describe("Error handler function: (error, state?) => void");
|
|
12560
|
-
var L = external_exports.any().describe("Log handler function: (message, verbose?) => void");
|
|
12561
|
-
var M = external_exports.object({ Error: J.describe("Error handler function"), Log: L.describe("Log handler function") }).describe("Handler interface with error and log functions");
|
|
12562
|
-
var R = h(D);
|
|
12563
|
-
var z = h(I);
|
|
12564
|
-
var A = h(J);
|
|
12565
|
-
var N = h(L);
|
|
12566
|
-
var q = h(M);
|
|
12567
|
-
var T = external_exports.object({ onError: J.optional().describe("Error handler function: (error, state?) => void"), onLog: L.optional().describe("Log handler function: (message, verbose?) => void") }).partial();
|
|
12568
|
-
var U = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial();
|
|
12569
|
-
var W = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial();
|
|
12570
|
-
var B = external_exports.object({}).partial();
|
|
12571
|
-
var $ = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial();
|
|
12572
|
-
var V = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial();
|
|
12573
|
-
var H = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial();
|
|
12574
|
-
var _ = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial();
|
|
12575
|
-
var K = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial();
|
|
12576
|
-
var Y = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial();
|
|
12577
|
-
var Z = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial();
|
|
12578
|
-
var ee = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial();
|
|
12579
|
-
var ne = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial();
|
|
12580
|
-
var te = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial();
|
|
12581
|
-
var ie = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial();
|
|
12582
|
-
var oe = {};
|
|
12583
|
-
n(oe, { ConsentSchema: () => ue, DeepPartialEventSchema: () => ve, EntitiesSchema: () => fe, EntitySchema: () => ge, EventSchema: () => he, OrderedPropertiesSchema: () => le, PartialEventSchema: () => ye, PropertiesSchema: () => ce, PropertySchema: () => ae, PropertyTypeSchema: () => se, SourceSchema: () => be, SourceTypeSchema: () => de, UserSchema: () => pe, VersionSchema: () => me, consentJsonSchema: () => Ce, entityJsonSchema: () => Ee, eventJsonSchema: () => Se, orderedPropertiesJsonSchema: () => xe, partialEventJsonSchema: () => we, propertiesJsonSchema: () => je, sourceTypeJsonSchema: () => Pe, userJsonSchema: () => ke });
|
|
12584
|
-
var re;
|
|
12585
|
-
var se = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), ae)]));
|
|
12586
|
-
var ae = external_exports.lazy(() => external_exports.union([se, external_exports.array(se)]));
|
|
12587
|
-
var ce = external_exports.record(external_exports.string(), ae.optional()).describe("Flexible property collection with optional values");
|
|
12588
|
-
var le = external_exports.record(external_exports.string(), external_exports.tuple([ae, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
|
|
12589
|
-
var de = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
|
|
12590
|
-
var ue = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
|
|
12591
|
-
var pe = ce.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties");
|
|
12592
|
-
var me = ce.and(external_exports.object({ source: v.describe('Walker implementation version (e.g., "2.0.0")'), tagging: E })).describe("Walker version information");
|
|
12593
|
-
var be = ce.and(external_exports.object({ type: de.describe("Source type identifier"), id: v.describe("Source identifier (typically URL on web)"), previous_id: v.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
|
|
12594
|
-
var ge = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: ce.describe("Entity-specific properties"), nested: external_exports.array(ge).describe("Nested child entities"), context: le.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
|
|
12595
|
-
var fe = external_exports.array(ge).describe("Array of nested entities");
|
|
12596
|
-
var he = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: ce.describe("Event-specific properties"), context: le.describe("Ordered context properties with priorities"), globals: ce.describe("Global properties shared across events"), custom: ce.describe("Custom implementation-specific properties"), user: pe.describe("User identification and attributes"), nested: fe.describe("Related nested entities"), consent: ue.describe("Consent states at event time"), id: k.describe("Unique event identifier (timestamp-based)"), trigger: v.describe("Event trigger identifier"), entity: v.describe("Parsed entity from event name"), action: v.describe("Parsed action from event name"), timestamp: j.describe("Unix timestamp in milliseconds since epoch"), timing: S.describe("Event processing timing information"), group: v.describe("Event grouping identifier"), count: x.describe("Event count in session"), version: me.describe("Walker version information"), source: be.describe("Event source information") }).describe("Complete walkerOS event structure");
|
|
12597
|
-
var ye = he.partial().describe("Partial event structure with all fields optional");
|
|
12598
|
-
var ve = he.partial().describe("Partial event structure with all top-level fields optional");
|
|
12599
|
-
var Se = h(he);
|
|
12600
|
-
var we = h(ye);
|
|
12601
|
-
var ke = h(pe);
|
|
12602
|
-
var je = h(ce);
|
|
12603
|
-
var xe = h(le);
|
|
12604
|
-
var Ee = h(ge);
|
|
12605
|
-
var Pe = h(de);
|
|
12606
|
-
var Ce = h(ue);
|
|
12607
|
-
var Oe = {};
|
|
12608
|
-
n(Oe, { ConfigSchema: () => qe, LoopSchema: () => Je, MapSchema: () => Me, PolicySchema: () => ze, ResultSchema: () => Te, RuleSchema: () => Ae, RulesSchema: () => Ne, SetSchema: () => Le, ValueConfigSchema: () => Re, ValueSchema: () => De, ValuesSchema: () => Ie, configJsonSchema: () => Fe, loopJsonSchema: () => Be, mapJsonSchema: () => Ve, policyJsonSchema: () => He, ruleJsonSchema: () => _e, rulesJsonSchema: () => Ke, setJsonSchema: () => $e, valueConfigJsonSchema: () => We, valueJsonSchema: () => Ue });
|
|
12609
|
-
var De = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => re), external_exports.array(De).describe("Array of values")]));
|
|
12610
|
-
var Ie = external_exports.array(De).describe("Array of transformation values");
|
|
12611
|
-
var Je = external_exports.lazy(() => external_exports.tuple([De, De]).describe("Loop transformation: [source, transform] tuple for array processing"));
|
|
12612
|
-
var Le = external_exports.lazy(() => external_exports.array(De).describe("Set: Array of values for selection or combination"));
|
|
12613
|
-
var Me = external_exports.lazy(() => external_exports.record(external_exports.string(), De).describe("Map: Object mapping keys to transformation values"));
|
|
12614
|
-
var Re = re = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: Me.optional().describe("Object mapping: transform event data to structured output"), loop: Je.optional().describe("Loop transformation: [source, transform] for array processing"), set: Le.optional().describe("Set of values: combine or select from multiple values"), consent: ue.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
|
|
12615
|
-
var ze = external_exports.record(external_exports.string(), De).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
12616
|
-
var Ae = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: ue.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([De, Ie]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: ze.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
|
|
12617
|
-
var Ne = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Ae, external_exports.array(Ae)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support");
|
|
12618
|
-
var qe = external_exports.object({ consent: ue.optional().describe("Required consent states to process any events"), data: external_exports.union([De, Ie]).optional().describe("Global data transformation applied to all events"), mapping: Ne.optional().describe("Entity-action specific mapping rules"), policy: ze.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
|
|
12619
|
-
var Te = external_exports.object({ eventMapping: Ae.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result");
|
|
12620
|
-
var Ue = h(De);
|
|
12621
|
-
var We = h(Re);
|
|
12622
|
-
var Be = h(Je);
|
|
12623
|
-
var $e = h(Le);
|
|
12624
|
-
var Ve = h(Me);
|
|
12625
|
-
var He = h(ze);
|
|
12626
|
-
var _e = h(Ae);
|
|
12627
|
-
var Ke = h(Ne);
|
|
12628
|
-
var Fe = h(qe);
|
|
12629
|
-
var Ge = {};
|
|
12630
|
-
n(Ge, { BatchSchema: () => rn, ConfigSchema: () => Qe, ContextSchema: () => Ze, DLQSchema: () => bn, DataSchema: () => sn, DestinationPolicySchema: () => Ye, DestinationsSchema: () => dn, InitDestinationsSchema: () => ln, InitSchema: () => cn, InstanceSchema: () => an, PartialConfigSchema: () => Xe, PushBatchContextSchema: () => nn, PushContextSchema: () => en, PushEventSchema: () => tn, PushEventsSchema: () => on, PushResultSchema: () => pn, RefSchema: () => un, ResultSchema: () => mn, batchJsonSchema: () => vn, configJsonSchema: () => gn, contextJsonSchema: () => hn, instanceJsonSchema: () => Sn, partialConfigJsonSchema: () => fn, pushContextJsonSchema: () => yn, resultJsonSchema: () => wn });
|
|
12631
|
-
var Qe = external_exports.object({ consent: ue.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([De, Ie]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: k.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ne.optional().describe("Entity-action specific mapping rules for this destination"), policy: ze.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: J.optional(), onLog: L.optional() }).describe("Destination configuration");
|
|
12632
|
-
var Xe = Qe.partial().describe("Partial destination configuration with all fields optional");
|
|
12633
|
-
var Ye = ze.describe("Destination policy rules for event pre-processing");
|
|
12634
|
-
var Ze = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Qe.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
|
|
12635
|
-
var en = Ze.extend({ mapping: Ae.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
|
|
12636
|
-
var nn = en.describe("Batch push context with event-specific mapping");
|
|
12637
|
-
var tn = external_exports.object({ event: he.describe("The event to process"), mapping: Ae.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
|
|
12638
|
-
var on = external_exports.array(tn).describe("Array of events with mappings");
|
|
12639
|
-
var rn = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(he).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: Ae.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
|
|
12640
|
-
var sn = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
12641
|
-
var an = external_exports.object({ config: Qe.describe("Destination configuration"), queue: external_exports.array(he).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([he, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
|
|
12642
|
-
var cn = external_exports.object({ code: an.describe("Destination instance with implementation"), config: Xe.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
|
|
12643
|
-
var ln = external_exports.record(external_exports.string(), cn).describe("Map of destination IDs to initialization configurations");
|
|
12644
|
-
var dn = external_exports.record(external_exports.string(), an).describe("Map of destination IDs to runtime instances");
|
|
12645
|
-
var un = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: an.describe("Destination instance") }).describe("Destination reference (ID + instance)");
|
|
12646
|
-
var pn = external_exports.object({ queue: external_exports.array(he).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
|
|
12647
|
-
var mn = external_exports.object({ successful: external_exports.array(un).describe("Destinations that processed successfully"), queued: external_exports.array(un).describe("Destinations that queued events"), failed: external_exports.array(un).describe("Destinations that failed to process") }).describe("Overall destination processing result");
|
|
12648
|
-
var bn = external_exports.array(external_exports.tuple([he, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
|
|
12649
|
-
var gn = h(Qe);
|
|
12650
|
-
var fn = h(Xe);
|
|
12651
|
-
var hn = h(Ze);
|
|
12652
|
-
var yn = h(en);
|
|
12653
|
-
var vn = h(rn);
|
|
12654
|
-
var Sn = h(an);
|
|
12655
|
-
var wn = h(mn);
|
|
12656
|
-
var kn = {};
|
|
12657
|
-
n(kn, { CommandTypeSchema: () => jn, ConfigSchema: () => xn, DestinationsSchema: () => Dn, InitConfigSchema: () => Pn, InstanceSchema: () => In, PushContextSchema: () => Cn, SessionDataSchema: () => En, SourcesSchema: () => On, commandTypeJsonSchema: () => Jn, configJsonSchema: () => Ln, initConfigJsonSchema: () => Rn, instanceJsonSchema: () => An, pushContextJsonSchema: () => zn, sessionDataJsonSchema: () => Mn });
|
|
12658
|
-
var jn = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
|
|
12659
|
-
var xn = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: E, globalsStatic: ce.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: J.optional(), onLog: L.optional() }).describe("Core collector configuration");
|
|
12660
|
-
var En = ce.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: k.describe("Session identifier").optional(), start: j.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: j.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: k.describe("Device identifier").optional(), count: x.describe("Event count in session").optional(), runs: x.describe("Number of runs").optional() })).describe("Session state and tracking data");
|
|
12661
|
-
var Pn = xn.partial().extend({ consent: ue.optional().describe("Initial consent state"), user: pe.optional().describe("Initial user data"), globals: ce.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: ce.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
|
|
12662
|
-
var Cn = external_exports.object({ mapping: qe.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
|
|
12663
|
-
var On = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
|
|
12664
|
-
var Dn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
|
|
12665
|
-
var In = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: xn.describe("Current collector configuration"), consent: ue.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: ce.describe("Custom implementation-specific properties"), sources: On.describe("Registered source instances"), destinations: Dn.describe("Registered destination instances"), globals: ce.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(he).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([En]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: pe.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
|
|
12666
|
-
var Jn = h(jn);
|
|
12667
|
-
var Ln = h(xn);
|
|
12668
|
-
var Mn = h(En);
|
|
12669
|
-
var Rn = h(Pn);
|
|
12670
|
-
var zn = h(Cn);
|
|
12671
|
-
var An = h(In);
|
|
12672
|
-
var Nn = {};
|
|
12673
|
-
n(Nn, { BaseEnvSchema: () => qn, ConfigSchema: () => Tn, InitSchema: () => Bn, InitSourceSchema: () => $n, InitSourcesSchema: () => Vn, InstanceSchema: () => Wn, PartialConfigSchema: () => Un, baseEnvJsonSchema: () => Hn, configJsonSchema: () => _n, initSourceJsonSchema: () => Gn, initSourcesJsonSchema: () => Qn, instanceJsonSchema: () => Fn, partialConfigJsonSchema: () => Kn });
|
|
12674
|
-
var qn = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
|
|
12675
|
-
var Tn = qe.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: qn.optional().describe("Environment dependencies (platform-specific)"), id: k.describe("Source identifier (defaults to source key)").optional(), onError: J.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment");
|
|
12676
|
-
var Un = Tn.partial().describe("Partial source configuration with all fields optional");
|
|
12677
|
-
var Wn = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Tn.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods");
|
|
12678
|
-
var Bn = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
|
|
12679
|
-
var $n = external_exports.object({ code: Bn.describe("Source initialization function"), config: Un.optional().describe("Partial configuration overrides"), env: qn.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
|
|
12680
|
-
var Vn = external_exports.record(external_exports.string(), $n).describe("Map of source IDs to initialization configurations");
|
|
12681
|
-
var Hn = h(qn);
|
|
12682
|
-
var _n = h(Tn);
|
|
12683
|
-
var Kn = h(Un);
|
|
12684
|
-
var Fn = h(Wn);
|
|
12685
|
-
var Gn = h($n);
|
|
12686
|
-
var Qn = h(Vn);
|
|
12687
|
-
var Xn = {};
|
|
12688
|
-
n(Xn, { ConfigSchema: () => nt, DestinationReferenceSchema: () => et, PrimitiveSchema: () => Yn, SetupSchema: () => tt, SourceReferenceSchema: () => Zn, configJsonSchema: () => ct, destinationReferenceJsonSchema: () => dt, parseConfig: () => rt, parseSetup: () => it, safeParseConfig: () => st, safeParseSetup: () => ot, setupJsonSchema: () => at, sourceReferenceJsonSchema: () => lt });
|
|
12689
|
-
var Yn = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
|
|
12690
|
-
var Zn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary.") }).describe("Source package reference with configuration");
|
|
12691
|
-
var et = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration") }).describe("Destination package reference with configuration");
|
|
12692
|
-
var nt = external_exports.object({ platform: external_exports.enum(["web", "server"], { error: 'Platform must be "web" or "server"' }).describe('Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection'), sources: external_exports.record(external_exports.string(), Zn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), et).optional().describe("Destination configurations (data output) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Environment-specific variables (override root-level variables)") }).passthrough().describe("Single environment configuration for one deployment target");
|
|
12693
|
-
var tt = external_exports.object({ version: external_exports.literal(1, { error: "Only version 1 is currently supported" }).describe("Configuration schema version (currently only 1 is supported)"), $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'), variables: external_exports.record(external_exports.string(), Yn).optional().describe("Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)"), definitions: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Reusable configuration definitions (reference with JSON Schema $ref syntax)"), environments: external_exports.record(external_exports.string(), nt).refine((e5) => Object.keys(e5).length > 0, { message: "At least one environment is required" }).describe("Named environment configurations (e.g., web_prod, server_stage)") }).describe("Complete multi-environment walkerOS configuration (walkeros.config.json)");
|
|
12694
|
-
function it(e5) {
|
|
12695
|
-
return tt.parse(e5);
|
|
12696
|
-
}
|
|
12697
|
-
function ot(e5) {
|
|
12698
|
-
return tt.safeParse(e5);
|
|
12699
|
-
}
|
|
12700
|
-
function rt(e5) {
|
|
12701
|
-
return nt.parse(e5);
|
|
12702
|
-
}
|
|
12703
|
-
function st(e5) {
|
|
12704
|
-
return nt.safeParse(e5);
|
|
12705
|
-
}
|
|
12706
|
-
var at = external_exports.toJSONSchema(tt, { target: "draft-7" });
|
|
12707
|
-
var ct = h(nt);
|
|
12708
|
-
var lt = h(Zn);
|
|
12709
|
-
var dt = h(et);
|
|
12710
|
-
var yt = { merge: true, shallow: true, extend: true };
|
|
12711
|
-
function vt(e5, n5 = {}, t3 = {}) {
|
|
12712
|
-
t3 = { ...yt, ...t3 };
|
|
12713
|
-
const i2 = Object.entries(n5).reduce((n6, [i3, o3]) => {
|
|
12714
|
-
const r2 = e5[i3];
|
|
12715
|
-
return t3.merge && Array.isArray(r2) && Array.isArray(o3) ? n6[i3] = o3.reduce((e6, n7) => e6.includes(n7) ? e6 : [...e6, n7], [...r2]) : (t3.extend || i3 in e5) && (n6[i3] = o3), n6;
|
|
12716
|
-
}, {});
|
|
12717
|
-
return t3.shallow ? { ...e5, ...i2 } : (Object.assign(e5, i2), e5);
|
|
12718
|
-
}
|
|
12719
|
-
function wt(e5) {
|
|
12720
|
-
return Array.isArray(e5);
|
|
12721
|
-
}
|
|
12722
|
-
function kt(e5) {
|
|
12723
|
-
return "boolean" == typeof e5;
|
|
12724
|
-
}
|
|
12725
|
-
function xt(e5) {
|
|
12726
|
-
return void 0 !== e5;
|
|
12727
|
-
}
|
|
12728
|
-
function Pt(e5) {
|
|
12729
|
-
return "function" == typeof e5;
|
|
12730
|
-
}
|
|
12731
|
-
function Ct(e5) {
|
|
12732
|
-
return "number" == typeof e5 && !Number.isNaN(e5);
|
|
12733
|
-
}
|
|
12734
|
-
function Ot(e5) {
|
|
12735
|
-
return "object" == typeof e5 && null !== e5 && !wt(e5) && "[object Object]" === Object.prototype.toString.call(e5);
|
|
12736
|
-
}
|
|
12737
|
-
function It(e5) {
|
|
12738
|
-
return "string" == typeof e5;
|
|
12739
|
-
}
|
|
12740
|
-
function Jt(e5, n5 = /* @__PURE__ */ new WeakMap()) {
|
|
12741
|
-
if ("object" != typeof e5 || null === e5)
|
|
12742
|
-
return e5;
|
|
12743
|
-
if (n5.has(e5))
|
|
12744
|
-
return n5.get(e5);
|
|
12745
|
-
const t3 = Object.prototype.toString.call(e5);
|
|
12746
|
-
if ("[object Object]" === t3) {
|
|
12747
|
-
const t4 = {};
|
|
12748
|
-
n5.set(e5, t4);
|
|
12749
|
-
for (const i2 in e5)
|
|
12750
|
-
Object.prototype.hasOwnProperty.call(e5, i2) && (t4[i2] = Jt(e5[i2], n5));
|
|
12751
|
-
return t4;
|
|
12752
|
-
}
|
|
12753
|
-
if ("[object Array]" === t3) {
|
|
12754
|
-
const t4 = [];
|
|
12755
|
-
return n5.set(e5, t4), e5.forEach((e6) => {
|
|
12756
|
-
t4.push(Jt(e6, n5));
|
|
12757
|
-
}), t4;
|
|
12758
|
-
}
|
|
12759
|
-
if ("[object Date]" === t3)
|
|
12760
|
-
return new Date(e5.getTime());
|
|
12761
|
-
if ("[object RegExp]" === t3) {
|
|
12762
|
-
const n6 = e5;
|
|
12763
|
-
return new RegExp(n6.source, n6.flags);
|
|
12764
|
-
}
|
|
12765
|
-
return e5;
|
|
12766
|
-
}
|
|
12767
|
-
function Lt(e5, n5 = "", t3) {
|
|
12768
|
-
const i2 = n5.split(".");
|
|
12769
|
-
let o3 = e5;
|
|
12770
|
-
for (let e6 = 0; e6 < i2.length; e6++) {
|
|
12771
|
-
const n6 = i2[e6];
|
|
12772
|
-
if ("*" === n6 && wt(o3)) {
|
|
12773
|
-
const n7 = i2.slice(e6 + 1).join("."), r2 = [];
|
|
12774
|
-
for (const e7 of o3) {
|
|
12775
|
-
const i3 = Lt(e7, n7, t3);
|
|
12776
|
-
r2.push(i3);
|
|
12777
|
-
}
|
|
12778
|
-
return r2;
|
|
12779
|
-
}
|
|
12780
|
-
if (o3 = o3 instanceof Object ? o3[n6] : void 0, !o3)
|
|
12781
|
-
break;
|
|
12782
|
-
}
|
|
12783
|
-
return xt(o3) ? o3 : t3;
|
|
12784
|
-
}
|
|
12785
|
-
function Mt(e5, n5, t3) {
|
|
12786
|
-
if (!Ot(e5))
|
|
12787
|
-
return e5;
|
|
12788
|
-
const i2 = Jt(e5), o3 = n5.split(".");
|
|
12789
|
-
let r2 = i2;
|
|
12790
|
-
for (let e6 = 0; e6 < o3.length; e6++) {
|
|
12791
|
-
const n6 = o3[e6];
|
|
12792
|
-
e6 === o3.length - 1 ? r2[n6] = t3 : (n6 in r2 && "object" == typeof r2[n6] && null !== r2[n6] || (r2[n6] = {}), r2 = r2[n6]);
|
|
12793
|
-
}
|
|
12794
|
-
return i2;
|
|
12795
|
-
}
|
|
12796
|
-
function Rt(e5) {
|
|
12797
|
-
if ("true" === e5)
|
|
12798
|
-
return true;
|
|
12799
|
-
if ("false" === e5)
|
|
12800
|
-
return false;
|
|
12801
|
-
const n5 = Number(e5);
|
|
12802
|
-
return e5 == n5 && "" !== e5 ? n5 : String(e5);
|
|
12803
|
-
}
|
|
12804
|
-
function zt(e5, n5 = {}, t3 = {}) {
|
|
12805
|
-
const i2 = { ...n5, ...t3 }, o3 = {};
|
|
12806
|
-
let r2 = void 0 === e5;
|
|
12807
|
-
return Object.keys(i2).forEach((n6) => {
|
|
12808
|
-
i2[n6] && (o3[n6] = true, e5 && e5[n6] && (r2 = true));
|
|
12809
|
-
}), !!r2 && o3;
|
|
12810
|
-
}
|
|
12811
|
-
function Tt(e5 = 6) {
|
|
12812
|
-
let n5 = "";
|
|
12813
|
-
for (let t3 = 36; n5.length < e5; )
|
|
12814
|
-
n5 += (Math.random() * t3 | 0).toString(t3);
|
|
12815
|
-
return n5;
|
|
12816
|
-
}
|
|
12817
|
-
function Wt(e5, n5 = 1e3, t3 = false) {
|
|
12818
|
-
let i2, o3 = null, r2 = false;
|
|
12819
|
-
return (...s3) => new Promise((a4) => {
|
|
12820
|
-
const c2 = t3 && !r2;
|
|
12821
|
-
o3 && clearTimeout(o3), o3 = setTimeout(() => {
|
|
12822
|
-
o3 = null, t3 && !r2 || (i2 = e5(...s3), a4(i2));
|
|
12823
|
-
}, n5), c2 && (r2 = true, i2 = e5(...s3), a4(i2));
|
|
12824
|
-
});
|
|
12825
|
-
}
|
|
12826
|
-
function $t(e5) {
|
|
12827
|
-
return kt(e5) || It(e5) || Ct(e5) || !xt(e5) || wt(e5) && e5.every($t) || Ot(e5) && Object.values(e5).every($t);
|
|
12828
|
-
}
|
|
12829
|
-
function Ht(e5) {
|
|
12830
|
-
return $t(e5) ? e5 : void 0;
|
|
12831
|
-
}
|
|
12832
|
-
function _t(e5, n5, t3) {
|
|
12833
|
-
return function(...i2) {
|
|
12834
|
-
try {
|
|
12835
|
-
return e5(...i2);
|
|
12836
|
-
} catch (e6) {
|
|
12837
|
-
if (!n5)
|
|
12838
|
-
return;
|
|
12839
|
-
return n5(e6);
|
|
12840
|
-
} finally {
|
|
12841
|
-
t3?.();
|
|
12842
|
-
}
|
|
12843
|
-
};
|
|
12844
|
-
}
|
|
12845
|
-
function Kt(e5, n5, t3) {
|
|
12846
|
-
return async function(...i2) {
|
|
12847
|
-
try {
|
|
12848
|
-
return await e5(...i2);
|
|
12849
|
-
} catch (e6) {
|
|
12850
|
-
if (!n5)
|
|
12851
|
-
return;
|
|
12852
|
-
return await n5(e6);
|
|
12853
|
-
} finally {
|
|
12854
|
-
await t3?.();
|
|
12855
|
-
}
|
|
12856
|
-
};
|
|
12857
|
-
}
|
|
12858
|
-
async function Ft(e5, n5) {
|
|
12859
|
-
const [t3, i2] = (e5.name || "").split(" ");
|
|
12860
|
-
if (!n5 || !t3 || !i2)
|
|
12861
|
-
return {};
|
|
12862
|
-
let o3, r2 = "", s3 = t3, a4 = i2;
|
|
12863
|
-
const c2 = (n6) => {
|
|
12864
|
-
if (n6)
|
|
12865
|
-
return (n6 = wt(n6) ? n6 : [n6]).find((n7) => !n7.condition || n7.condition(e5));
|
|
12866
|
-
};
|
|
12867
|
-
n5[s3] || (s3 = "*");
|
|
12868
|
-
const l3 = n5[s3];
|
|
12869
|
-
return l3 && (l3[a4] || (a4 = "*"), o3 = c2(l3[a4])), o3 || (s3 = "*", a4 = "*", o3 = c2(n5[s3]?.[a4])), o3 && (r2 = `${s3} ${a4}`), { eventMapping: o3, mappingKey: r2 };
|
|
12870
|
-
}
|
|
12871
|
-
async function Gt(e5, n5 = {}, t3 = {}) {
|
|
12872
|
-
if (!xt(e5))
|
|
12873
|
-
return;
|
|
12874
|
-
const i2 = Ot(e5) && e5.consent || t3.consent || t3.collector?.consent, o3 = wt(n5) ? n5 : [n5];
|
|
12875
|
-
for (const n6 of o3) {
|
|
12876
|
-
const o4 = await Kt(Qt)(e5, n6, { ...t3, consent: i2 });
|
|
12877
|
-
if (xt(o4))
|
|
12878
|
-
return o4;
|
|
12879
|
-
}
|
|
12880
|
-
}
|
|
12881
|
-
async function Qt(e5, n5, t3 = {}) {
|
|
12882
|
-
const { collector: i2, consent: o3 } = t3;
|
|
12883
|
-
return (wt(n5) ? n5 : [n5]).reduce(async (n6, r2) => {
|
|
12884
|
-
const s3 = await n6;
|
|
12885
|
-
if (s3)
|
|
12886
|
-
return s3;
|
|
12887
|
-
const a4 = It(r2) ? { key: r2 } : r2;
|
|
12888
|
-
if (!Object.keys(a4).length)
|
|
12889
|
-
return;
|
|
12890
|
-
const { condition: c2, consent: l3, fn: d2, key: u, loop: p2, map: m, set: b, validate: g2, value: f } = a4;
|
|
12891
|
-
if (c2 && !await Kt(c2)(e5, r2, i2))
|
|
12892
|
-
return;
|
|
12893
|
-
if (l3 && !zt(l3, o3))
|
|
12894
|
-
return f;
|
|
12895
|
-
let h3 = xt(f) ? f : e5;
|
|
12896
|
-
if (d2 && (h3 = await Kt(d2)(e5, r2, t3)), u && (h3 = Lt(e5, u, f)), p2) {
|
|
12897
|
-
const [n7, i3] = p2, o4 = "this" === n7 ? [e5] : await Gt(e5, n7, t3);
|
|
12898
|
-
wt(o4) && (h3 = (await Promise.all(o4.map((e6) => Gt(e6, i3, t3)))).filter(xt));
|
|
12899
|
-
} else
|
|
12900
|
-
m ? h3 = await Object.entries(m).reduce(async (n7, [i3, o4]) => {
|
|
12901
|
-
const r3 = await n7, s4 = await Gt(e5, o4, t3);
|
|
12902
|
-
return xt(s4) && (r3[i3] = s4), r3;
|
|
12903
|
-
}, Promise.resolve({})) : b && (h3 = await Promise.all(b.map((n7) => Qt(e5, n7, t3))));
|
|
12904
|
-
g2 && !await Kt(g2)(h3) && (h3 = void 0);
|
|
12905
|
-
const y2 = Ht(h3);
|
|
12906
|
-
return xt(y2) ? y2 : Ht(f);
|
|
12907
|
-
}, Promise.resolve(void 0));
|
|
12908
|
-
}
|
|
12909
|
-
async function Xt(e5, n5, t3) {
|
|
12910
|
-
n5.policy && await Promise.all(Object.entries(n5.policy).map(async ([n6, i3]) => {
|
|
12911
|
-
const o4 = await Gt(e5, i3, { collector: t3 });
|
|
12912
|
-
e5 = Mt(e5, n6, o4);
|
|
12913
|
-
}));
|
|
12914
|
-
const { eventMapping: i2, mappingKey: o3 } = await Ft(e5, n5.mapping);
|
|
12915
|
-
i2?.policy && await Promise.all(Object.entries(i2.policy).map(async ([n6, i3]) => {
|
|
12916
|
-
const o4 = await Gt(e5, i3, { collector: t3 });
|
|
12917
|
-
e5 = Mt(e5, n6, o4);
|
|
12918
|
-
}));
|
|
12919
|
-
let r2 = n5.data && await Gt(e5, n5.data, { collector: t3 });
|
|
12920
|
-
if (i2) {
|
|
12921
|
-
if (i2.ignore)
|
|
12922
|
-
return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: true };
|
|
12923
|
-
if (i2.name && (e5.name = i2.name), i2.data) {
|
|
12924
|
-
const n6 = i2.data && await Gt(e5, i2.data, { collector: t3 });
|
|
12925
|
-
r2 = Ot(r2) && Ot(n6) ? vt(r2, n6) : n6;
|
|
12926
|
-
}
|
|
12927
|
-
}
|
|
12928
|
-
return { event: e5, data: r2, mapping: i2, mappingKey: o3, ignore: false };
|
|
12929
|
-
}
|
|
12930
|
-
function ei(e5, n5 = false) {
|
|
12931
|
-
n5 && console.dir(e5, { depth: 4 });
|
|
12932
|
-
}
|
|
12933
|
-
function ni(e5) {
|
|
12934
|
-
const n5 = String(e5), t3 = n5.split("?")[1] || n5;
|
|
12935
|
-
return _t(() => {
|
|
12936
|
-
const e6 = new URLSearchParams(t3), n6 = {};
|
|
12937
|
-
return e6.forEach((e7, t4) => {
|
|
12938
|
-
const i2 = t4.split(/[[\]]+/).filter(Boolean);
|
|
12939
|
-
let o3 = n6;
|
|
12940
|
-
i2.forEach((n7, t5) => {
|
|
12941
|
-
const r2 = t5 === i2.length - 1;
|
|
12942
|
-
if (wt(o3)) {
|
|
12943
|
-
const s3 = parseInt(n7, 10);
|
|
12944
|
-
r2 ? o3[s3] = Rt(e7) : (o3[s3] = o3[s3] || (isNaN(parseInt(i2[t5 + 1], 10)) ? {} : []), o3 = o3[s3]);
|
|
12945
|
-
} else
|
|
12946
|
-
Ot(o3) && (r2 ? o3[n7] = Rt(e7) : (o3[n7] = o3[n7] || (isNaN(parseInt(i2[t5 + 1], 10)) ? {} : []), o3 = o3[n7]));
|
|
12947
|
-
});
|
|
12948
|
-
}), n6;
|
|
12949
|
-
})();
|
|
12950
|
-
}
|
|
12951
|
-
function ai(e5, n5, t3) {
|
|
12952
|
-
return function(...i2) {
|
|
12953
|
-
let o3;
|
|
12954
|
-
const r2 = "post" + n5, s3 = t3["pre" + n5], a4 = t3[r2];
|
|
12955
|
-
return o3 = s3 ? s3({ fn: e5 }, ...i2) : e5(...i2), a4 && (o3 = a4({ fn: e5, result: o3 }, ...i2)), o3;
|
|
12956
|
-
};
|
|
12957
|
-
}
|
|
12958
|
-
|
|
12959
|
-
// node_modules/@walkeros/collector/dist/index.mjs
|
|
13179
|
+
// node_modules/@walkeros/core/dist/dev.mjs
|
|
12960
13180
|
var e2 = Object.defineProperty;
|
|
12961
|
-
var n2 =
|
|
12962
|
-
var
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
}
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
}
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
}
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
}
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
}
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
const n5 = vt({ globalsStatic: {}, sessionStatic: {}, tagging: 0, verbose: false, onLog: o3, run: true }, e5, { merge: false, extend: false });
|
|
13186
|
-
function o3(e6, o4) {
|
|
13187
|
-
ei({ message: e6 }, o4 || n5.verbose);
|
|
13188
|
-
}
|
|
13189
|
-
n5.onLog = o3;
|
|
13190
|
-
const t3 = { ...n5.globalsStatic, ...e5.globals }, s3 = { allowed: false, config: n5, consent: e5.consent || {}, count: 0, custom: e5.custom || {}, destinations: {}, globals: t3, group: "", hooks: {}, on: {}, queue: [], round: 0, session: void 0, timing: Date.now(), user: e5.user || {}, version: "0.3.1", sources: {}, push: void 0, command: void 0 };
|
|
13191
|
-
return s3.push = _2(s3, (e6) => ({ timing: Math.round((Date.now() - s3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...e6 })), s3.command = function(e6, n6) {
|
|
13192
|
-
return ai(async (o4, t4, s4) => await Kt(async () => await n6(e6, o4, t4, s4), () => w2({ ok: false }))(), "Command", e6.hooks);
|
|
13193
|
-
}(s3, B2), s3.destinations = await C2(0, e5.destinations || {}), s3;
|
|
13194
|
-
}
|
|
13195
|
-
async function Q(e5, n5 = {}) {
|
|
13196
|
-
const o3 = {};
|
|
13197
|
-
for (const [t3, s3] of Object.entries(n5)) {
|
|
13198
|
-
const { code: n6, config: a4 = {}, env: i2 = {}, primary: c2 } = s3, r2 = { push: (n7, o4 = {}) => e5.push(n7, { ...o4, mapping: a4 }), command: e5.command, sources: e5.sources, elb: e5.sources.elb.push, ...i2 }, u = await Kt(n6)(a4, r2);
|
|
13199
|
-
u && (c2 && (u.config = { ...u.config, primary: c2 }), o3[t3] = u);
|
|
13200
|
-
}
|
|
13201
|
-
return o3;
|
|
13202
|
-
}
|
|
13203
|
-
async function T2(e5) {
|
|
13204
|
-
e5 = e5 || {};
|
|
13205
|
-
const n5 = await J2(e5), o3 = (t3 = n5, { type: "elb", config: {}, push: async (e6, n6, o4, s4, a5, i3) => {
|
|
13206
|
-
if ("string" == typeof e6 && e6.startsWith("walker ")) {
|
|
13207
|
-
const s5 = e6.replace("walker ", "");
|
|
13208
|
-
return t3.command(s5, n6, o4);
|
|
13209
|
-
}
|
|
13210
|
-
let c3;
|
|
13211
|
-
if ("string" == typeof e6)
|
|
13212
|
-
c3 = { name: e6 }, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c3.data = n6);
|
|
13213
|
-
else {
|
|
13214
|
-
if (!e6 || "object" != typeof e6)
|
|
13215
|
-
return { ok: false, successful: [], queued: [], failed: [] };
|
|
13216
|
-
c3 = e6, n6 && "object" == typeof n6 && !Array.isArray(n6) && (c3.data = { ...c3.data || {}, ...n6 });
|
|
13217
|
-
}
|
|
13218
|
-
return s4 && "object" == typeof s4 && (c3.context = s4), a5 && Array.isArray(a5) && (c3.nested = a5), i3 && "object" == typeof i3 && (c3.custom = i3), t3.push(c3);
|
|
13219
|
-
} });
|
|
13220
|
-
var t3;
|
|
13221
|
-
n5.sources.elb = o3;
|
|
13222
|
-
const s3 = await Q(n5, e5.sources || {});
|
|
13223
|
-
Object.assign(n5.sources, s3);
|
|
13224
|
-
const { consent: a4, user: i2, globals: c2, custom: r2 } = e5;
|
|
13225
|
-
a4 && await n5.command("consent", a4), i2 && await n5.command("user", i2), c2 && Object.assign(n5.globals, c2), r2 && Object.assign(n5.custom, r2), n5.config.run && await n5.command("run");
|
|
13226
|
-
let u = o3.push;
|
|
13227
|
-
const l3 = Object.values(n5.sources).filter((e6) => "elb" !== e6.type), d2 = l3.find((e6) => e6.config.primary);
|
|
13228
|
-
return d2 ? u = d2.push : l3.length > 0 && (u = l3[0].push), { collector: n5, elb: u };
|
|
13181
|
+
var n2 = (n5, i3) => {
|
|
13182
|
+
for (var o2 in i3)
|
|
13183
|
+
e2(n5, o2, { get: i3[o2], enumerable: true });
|
|
13184
|
+
};
|
|
13185
|
+
var i = {};
|
|
13186
|
+
n2(i, { BaseContextConfig: () => B2, BatchConfig: () => N2, CollectorSchemas: () => cn, ConsentSchema: () => X2, Counter: () => d2, DeepPartialEventSchema: () => re2, DestinationReferenceSchema: () => Nn, DestinationSchemas: () => Me, DestinationsMapConfig: () => A2, DisabledConfig: () => I2, EntitiesSchema: () => ie, EntitySchema: () => ne, EventSchema: () => oe, FlowConfigSchema: () => Vn, FlowSchemas: () => Tn, GenericEnvConfig: () => z2, GenericSettingsConfig: () => L3, HandlersConfig: () => P3, IdConfig: () => D2, Identifier: () => c, InitConfig: () => x2, LoopSchema: () => he, MapSchema: () => ve, MappingResultSchema: () => Pe, MappingSchemas: () => be, OptionalPrimitiveValue: () => m2, OrderedPropertiesSchema: () => $3, PartialEventSchema: () => te, PolicySchema: () => we, PrimaryConfig: () => R, PrimitiveSchema: () => Un, PrimitiveValue: () => u, ProcessingControlConfig: () => V2, PropertiesSchema: () => F2, PropertySchema: () => Q2, PropertyTypeSchema: () => _, QueueConfig: () => E, RequiredBoolean: () => s, RequiredNumber: () => a, RequiredString: () => r, RuleSchema: () => ke, RulesSchema: () => Ce, RuntimeInstanceConfig: () => U2, SetSchema: () => Se, SetupSchema: () => Wn, SourceReferenceSchema: () => Bn, SourceSchema: () => ee, SourceSchemas: () => Cn, SourceTypeSchema: () => K2, SourcesMapConfig: () => W3, TaggingVersion: () => p2, Timestamp: () => l, UserSchema: () => Y2, UtilitySchemas: () => b3, ValueConfigSchema: () => ye, ValueSchema: () => ge, ValuesSchema: () => fe, VerboseConfig: () => J, VersionSchema: () => Z, WalkerOSSchemas: () => H2, configJsonSchema: () => Fn, consentJsonSchema: () => me, createArraySchema: () => Zn, createConsentConfig: () => T2, createDataTransformationConfig: () => q3, createEnumSchema: () => ei, createMappingRulesConfig: () => M2, createObjectSchema: () => Xn, createPolicyConfig: () => O2, createTupleSchema: () => ni, destinationReferenceJsonSchema: () => Kn, entityJsonSchema: () => pe, eventJsonSchema: () => ae, loopJsonSchema: () => De, mapJsonSchema: () => Ie, orderedPropertiesJsonSchema: () => de, parseConfig: () => Gn, parseSetup: () => An, partialEventJsonSchema: () => se, policyJsonSchema: () => Re, propertiesJsonSchema: () => le, ruleJsonSchema: () => Le, rulesJsonSchema: () => ze, safeParseConfig: () => _n, safeParseSetup: () => Hn, setJsonSchema: () => xe, setupJsonSchema: () => Qn, sourceReferenceJsonSchema: () => $n, sourceTypeJsonSchema: () => ue, userJsonSchema: () => ce, valueConfigJsonSchema: () => Ee, valueJsonSchema: () => Je, z: () => external_exports, zodToSchema: () => ii });
|
|
13187
|
+
function t(e5, n5, i3 = "draft-7") {
|
|
13188
|
+
return external_exports.toJSONSchema(e5, { target: i3 });
|
|
13189
|
+
}
|
|
13190
|
+
var r = external_exports.string();
|
|
13191
|
+
var a = external_exports.number();
|
|
13192
|
+
var s = external_exports.boolean();
|
|
13193
|
+
var c = external_exports.string().min(1);
|
|
13194
|
+
var l = external_exports.number().int().positive();
|
|
13195
|
+
var d2 = external_exports.number().int().nonnegative();
|
|
13196
|
+
var p2 = external_exports.number().describe("Tagging version number");
|
|
13197
|
+
var u = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
13198
|
+
var m2 = u.optional();
|
|
13199
|
+
var b3 = {};
|
|
13200
|
+
n2(b3, { ErrorHandlerSchema: () => h2, HandlerSchema: () => v, LogHandlerSchema: () => S2, StorageSchema: () => f, StorageTypeSchema: () => g2, errorHandlerJsonSchema: () => k3, handlerJsonSchema: () => j2, logHandlerJsonSchema: () => C2, storageJsonSchema: () => w2, storageTypeJsonSchema: () => y3 });
|
|
13201
|
+
var g2 = external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie");
|
|
13202
|
+
var f = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references");
|
|
13203
|
+
var h2 = external_exports.any().describe("Error handler function: (error, state?) => void");
|
|
13204
|
+
var S2 = external_exports.any().describe("Log handler function: (message, verbose?) => void");
|
|
13205
|
+
var v = external_exports.object({ Error: h2.describe("Error handler function"), Log: S2.describe("Log handler function") }).describe("Handler interface with error and log functions");
|
|
13206
|
+
var y3 = t(g2);
|
|
13207
|
+
var w2 = t(f);
|
|
13208
|
+
var k3 = t(h2);
|
|
13209
|
+
var C2 = t(S2);
|
|
13210
|
+
var j2 = t(v);
|
|
13211
|
+
var P3 = external_exports.object({ onError: h2.optional().describe("Error handler function: (error, state?) => void"), onLog: S2.optional().describe("Log handler function: (message, verbose?) => void") }).partial();
|
|
13212
|
+
var J = external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial();
|
|
13213
|
+
var E = external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial();
|
|
13214
|
+
var D2 = external_exports.object({}).partial();
|
|
13215
|
+
var x2 = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial();
|
|
13216
|
+
var I2 = external_exports.object({ disabled: external_exports.boolean().describe("Set to true to disable").optional() }).partial();
|
|
13217
|
+
var R = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial();
|
|
13218
|
+
var L3 = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial();
|
|
13219
|
+
var z2 = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial();
|
|
13220
|
+
function q3(e5, n5) {
|
|
13221
|
+
return external_exports.object({ data: external_exports.union([e5, n5]).optional().describe("Data transformation rules") }).partial();
|
|
13222
|
+
}
|
|
13223
|
+
function M2(e5) {
|
|
13224
|
+
return external_exports.object({ mapping: e5.optional().describe("Event mapping rules") }).partial();
|
|
13225
|
+
}
|
|
13226
|
+
function O2(e5) {
|
|
13227
|
+
return external_exports.object({ policy: e5.optional().describe("Pre-processing policy rules") }).partial();
|
|
13228
|
+
}
|
|
13229
|
+
function T2(e5) {
|
|
13230
|
+
return external_exports.object({ consent: e5.optional().describe("Required consent states") }).partial();
|
|
13231
|
+
}
|
|
13232
|
+
var U2 = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial();
|
|
13233
|
+
var B2 = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial();
|
|
13234
|
+
var N2 = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial();
|
|
13235
|
+
var V2 = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial();
|
|
13236
|
+
var W3 = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial();
|
|
13237
|
+
var A2 = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial();
|
|
13238
|
+
var H2 = {};
|
|
13239
|
+
n2(H2, { ConsentSchema: () => X2, DeepPartialEventSchema: () => re2, EntitiesSchema: () => ie, EntitySchema: () => ne, EventSchema: () => oe, OrderedPropertiesSchema: () => $3, PartialEventSchema: () => te, PropertiesSchema: () => F2, PropertySchema: () => Q2, PropertyTypeSchema: () => _, SourceSchema: () => ee, SourceTypeSchema: () => K2, UserSchema: () => Y2, VersionSchema: () => Z, consentJsonSchema: () => me, entityJsonSchema: () => pe, eventJsonSchema: () => ae, orderedPropertiesJsonSchema: () => de, partialEventJsonSchema: () => se, propertiesJsonSchema: () => le, sourceTypeJsonSchema: () => ue, userJsonSchema: () => ce });
|
|
13240
|
+
var G;
|
|
13241
|
+
var _ = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), Q2)]));
|
|
13242
|
+
var Q2 = external_exports.lazy(() => external_exports.union([_, external_exports.array(_)]));
|
|
13243
|
+
var F2 = external_exports.record(external_exports.string(), Q2.optional()).describe("Flexible property collection with optional values");
|
|
13244
|
+
var $3 = external_exports.record(external_exports.string(), external_exports.tuple([Q2, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
|
|
13245
|
+
var K2 = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
|
|
13246
|
+
var X2 = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
|
|
13247
|
+
var Y2 = F2.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties");
|
|
13248
|
+
var Z = F2.and(external_exports.object({ source: r.describe('Walker implementation version (e.g., "2.0.0")'), tagging: p2 })).describe("Walker version information");
|
|
13249
|
+
var ee = F2.and(external_exports.object({ type: K2.describe("Source type identifier"), id: r.describe("Source identifier (typically URL on web)"), previous_id: r.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
|
|
13250
|
+
var ne = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: F2.describe("Entity-specific properties"), nested: external_exports.array(ne).describe("Nested child entities"), context: $3.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
|
|
13251
|
+
var ie = external_exports.array(ne).describe("Array of nested entities");
|
|
13252
|
+
var oe = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: F2.describe("Event-specific properties"), context: $3.describe("Ordered context properties with priorities"), globals: F2.describe("Global properties shared across events"), custom: F2.describe("Custom implementation-specific properties"), user: Y2.describe("User identification and attributes"), nested: ie.describe("Related nested entities"), consent: X2.describe("Consent states at event time"), id: c.describe("Unique event identifier (timestamp-based)"), trigger: r.describe("Event trigger identifier"), entity: r.describe("Parsed entity from event name"), action: r.describe("Parsed action from event name"), timestamp: l.describe("Unix timestamp in milliseconds since epoch"), timing: a.describe("Event processing timing information"), group: r.describe("Event grouping identifier"), count: d2.describe("Event count in session"), version: Z.describe("Walker version information"), source: ee.describe("Event source information") }).describe("Complete walkerOS event structure");
|
|
13253
|
+
var te = oe.partial().describe("Partial event structure with all fields optional");
|
|
13254
|
+
var re2 = oe.partial().describe("Partial event structure with all top-level fields optional");
|
|
13255
|
+
var ae = t(oe);
|
|
13256
|
+
var se = t(te);
|
|
13257
|
+
var ce = t(Y2);
|
|
13258
|
+
var le = t(F2);
|
|
13259
|
+
var de = t($3);
|
|
13260
|
+
var pe = t(ne);
|
|
13261
|
+
var ue = t(K2);
|
|
13262
|
+
var me = t(X2);
|
|
13263
|
+
var be = {};
|
|
13264
|
+
n2(be, { ConfigSchema: () => je, LoopSchema: () => he, MapSchema: () => ve, PolicySchema: () => we, ResultSchema: () => Pe, RuleSchema: () => ke, RulesSchema: () => Ce, SetSchema: () => Se, ValueConfigSchema: () => ye, ValueSchema: () => ge, ValuesSchema: () => fe, configJsonSchema: () => qe, loopJsonSchema: () => De, mapJsonSchema: () => Ie, policyJsonSchema: () => Re, ruleJsonSchema: () => Le, rulesJsonSchema: () => ze, setJsonSchema: () => xe, valueConfigJsonSchema: () => Ee, valueJsonSchema: () => Je });
|
|
13265
|
+
var ge = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => G), external_exports.array(ge).describe("Array of values")]));
|
|
13266
|
+
var fe = external_exports.array(ge).describe("Array of transformation values");
|
|
13267
|
+
var he = external_exports.lazy(() => external_exports.tuple([ge, ge]).describe("Loop transformation: [source, transform] tuple for array processing"));
|
|
13268
|
+
var Se = external_exports.lazy(() => external_exports.array(ge).describe("Set: Array of values for selection or combination"));
|
|
13269
|
+
var ve = external_exports.lazy(() => external_exports.record(external_exports.string(), ge).describe("Map: Object mapping keys to transformation values"));
|
|
13270
|
+
var ye = G = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: ve.optional().describe("Object mapping: transform event data to structured output"), loop: he.optional().describe("Loop transformation: [source, transform] for array processing"), set: Se.optional().describe("Set of values: combine or select from multiple values"), consent: X2.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e5) => Object.keys(e5).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
|
|
13271
|
+
var we = external_exports.record(external_exports.string(), ge).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
13272
|
+
var ke = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: X2.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([ge, fe]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: we.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
|
|
13273
|
+
var Ce = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([ke, external_exports.array(ke)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support");
|
|
13274
|
+
var je = external_exports.object({ consent: X2.optional().describe("Required consent states to process any events"), data: external_exports.union([ge, fe]).optional().describe("Global data transformation applied to all events"), mapping: Ce.optional().describe("Entity-action specific mapping rules"), policy: we.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
|
|
13275
|
+
var Pe = external_exports.object({ eventMapping: ke.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result");
|
|
13276
|
+
var Je = t(ge);
|
|
13277
|
+
var Ee = t(ye);
|
|
13278
|
+
var De = t(he);
|
|
13279
|
+
var xe = t(Se);
|
|
13280
|
+
var Ie = t(ve);
|
|
13281
|
+
var Re = t(we);
|
|
13282
|
+
var Le = t(ke);
|
|
13283
|
+
var ze = t(Ce);
|
|
13284
|
+
var qe = t(je);
|
|
13285
|
+
var Me = {};
|
|
13286
|
+
n2(Me, { BatchSchema: () => He, ConfigSchema: () => Oe, ContextSchema: () => Be, DLQSchema: () => Ze, DataSchema: () => Ge, DestinationPolicySchema: () => Ue, DestinationsSchema: () => $e, InitDestinationsSchema: () => Fe, InitSchema: () => Qe, InstanceSchema: () => _e, PartialConfigSchema: () => Te, PushBatchContextSchema: () => Ve, PushContextSchema: () => Ne, PushEventSchema: () => We, PushEventsSchema: () => Ae, PushResultSchema: () => Xe, RefSchema: () => Ke, ResultSchema: () => Ye, batchJsonSchema: () => rn, configJsonSchema: () => en, contextJsonSchema: () => on, instanceJsonSchema: () => an, partialConfigJsonSchema: () => nn, pushContextJsonSchema: () => tn, resultJsonSchema: () => sn });
|
|
13287
|
+
var Oe = external_exports.object({ consent: X2.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([ge, fe]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: c.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ce.optional().describe("Entity-action specific mapping rules for this destination"), policy: we.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: h2.optional(), onLog: S2.optional() }).describe("Destination configuration");
|
|
13288
|
+
var Te = Oe.partial().describe("Partial destination configuration with all fields optional");
|
|
13289
|
+
var Ue = we.describe("Destination policy rules for event pre-processing");
|
|
13290
|
+
var Be = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Oe.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
|
|
13291
|
+
var Ne = Be.extend({ mapping: ke.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
|
|
13292
|
+
var Ve = Ne.describe("Batch push context with event-specific mapping");
|
|
13293
|
+
var We = external_exports.object({ event: oe.describe("The event to process"), mapping: ke.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
|
|
13294
|
+
var Ae = external_exports.array(We).describe("Array of events with mappings");
|
|
13295
|
+
var He = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(oe).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: ke.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
|
|
13296
|
+
var Ge = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
13297
|
+
var _e = external_exports.object({ config: Oe.describe("Destination configuration"), queue: external_exports.array(oe).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([oe, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
|
|
13298
|
+
var Qe = external_exports.object({ code: _e.describe("Destination instance with implementation"), config: Te.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
|
|
13299
|
+
var Fe = external_exports.record(external_exports.string(), Qe).describe("Map of destination IDs to initialization configurations");
|
|
13300
|
+
var $e = external_exports.record(external_exports.string(), _e).describe("Map of destination IDs to runtime instances");
|
|
13301
|
+
var Ke = external_exports.object({ id: external_exports.string().describe("Destination ID"), destination: _e.describe("Destination instance") }).describe("Destination reference (ID + instance)");
|
|
13302
|
+
var Xe = external_exports.object({ queue: external_exports.array(oe).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
|
|
13303
|
+
var Ye = external_exports.object({ successful: external_exports.array(Ke).describe("Destinations that processed successfully"), queued: external_exports.array(Ke).describe("Destinations that queued events"), failed: external_exports.array(Ke).describe("Destinations that failed to process") }).describe("Overall destination processing result");
|
|
13304
|
+
var Ze = external_exports.array(external_exports.tuple([oe, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
|
|
13305
|
+
var en = t(Oe);
|
|
13306
|
+
var nn = t(Te);
|
|
13307
|
+
var on = t(Be);
|
|
13308
|
+
var tn = t(Ne);
|
|
13309
|
+
var rn = t(He);
|
|
13310
|
+
var an = t(_e);
|
|
13311
|
+
var sn = t(Ye);
|
|
13312
|
+
var cn = {};
|
|
13313
|
+
n2(cn, { CommandTypeSchema: () => ln, ConfigSchema: () => dn, DestinationsSchema: () => gn, InitConfigSchema: () => un, InstanceSchema: () => fn, PushContextSchema: () => mn, SessionDataSchema: () => pn, SourcesSchema: () => bn, commandTypeJsonSchema: () => hn, configJsonSchema: () => Sn, initConfigJsonSchema: () => yn, instanceJsonSchema: () => kn, pushContextJsonSchema: () => wn, sessionDataJsonSchema: () => vn });
|
|
13314
|
+
var ln = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
|
|
13315
|
+
var dn = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: p2, globalsStatic: F2.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: h2.optional(), onLog: S2.optional() }).describe("Core collector configuration");
|
|
13316
|
+
var pn = F2.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: c.describe("Session identifier").optional(), start: l.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: l.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: c.describe("Device identifier").optional(), count: d2.describe("Event count in session").optional(), runs: d2.describe("Number of runs").optional() })).describe("Session state and tracking data");
|
|
13317
|
+
var un = dn.partial().extend({ consent: X2.optional().describe("Initial consent state"), user: Y2.optional().describe("Initial user data"), globals: F2.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: F2.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
|
|
13318
|
+
var mn = external_exports.object({ mapping: je.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
|
|
13319
|
+
var bn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
|
|
13320
|
+
var gn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
|
|
13321
|
+
var fn = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: dn.describe("Current collector configuration"), consent: X2.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: F2.describe("Custom implementation-specific properties"), sources: bn.describe("Registered source instances"), destinations: gn.describe("Registered destination instances"), globals: F2.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(oe).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([pn]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: Y2.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
|
|
13322
|
+
var hn = t(ln);
|
|
13323
|
+
var Sn = t(dn);
|
|
13324
|
+
var vn = t(pn);
|
|
13325
|
+
var yn = t(un);
|
|
13326
|
+
var wn = t(mn);
|
|
13327
|
+
var kn = t(fn);
|
|
13328
|
+
var Cn = {};
|
|
13329
|
+
n2(Cn, { BaseEnvSchema: () => jn, ConfigSchema: () => Pn, InitSchema: () => Dn, InitSourceSchema: () => xn, InitSourcesSchema: () => In, InstanceSchema: () => En, PartialConfigSchema: () => Jn, baseEnvJsonSchema: () => Rn, configJsonSchema: () => Ln, initSourceJsonSchema: () => Mn, initSourcesJsonSchema: () => On, instanceJsonSchema: () => qn, partialConfigJsonSchema: () => zn });
|
|
13330
|
+
var jn = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
|
|
13331
|
+
var Pn = je.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: jn.optional().describe("Environment dependencies (platform-specific)"), id: c.describe("Source identifier (defaults to source key)").optional(), onError: h2.optional(), disabled: external_exports.boolean().describe("Set to true to disable").optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment");
|
|
13332
|
+
var Jn = Pn.partial().describe("Partial source configuration with all fields optional");
|
|
13333
|
+
var En = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Pn.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods");
|
|
13334
|
+
var Dn = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
|
|
13335
|
+
var xn = external_exports.object({ code: Dn.describe("Source initialization function"), config: Jn.optional().describe("Partial configuration overrides"), env: jn.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
|
|
13336
|
+
var In = external_exports.record(external_exports.string(), xn).describe("Map of source IDs to initialization configurations");
|
|
13337
|
+
var Rn = t(jn);
|
|
13338
|
+
var Ln = t(Pn);
|
|
13339
|
+
var zn = t(Jn);
|
|
13340
|
+
var qn = t(En);
|
|
13341
|
+
var Mn = t(xn);
|
|
13342
|
+
var On = t(In);
|
|
13343
|
+
var Tn = {};
|
|
13344
|
+
n2(Tn, { ConfigSchema: () => Vn, DestinationReferenceSchema: () => Nn, PrimitiveSchema: () => Un, SetupSchema: () => Wn, SourceReferenceSchema: () => Bn, configJsonSchema: () => Fn, destinationReferenceJsonSchema: () => Kn, parseConfig: () => Gn, parseSetup: () => An, safeParseConfig: () => _n, safeParseSetup: () => Hn, setupJsonSchema: () => Qn, sourceReferenceJsonSchema: () => $n });
|
|
13345
|
+
var Un = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
|
|
13346
|
+
var Bn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary.") }).describe("Source package reference with configuration");
|
|
13347
|
+
var Nn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration") }).describe("Destination package reference with configuration");
|
|
13348
|
+
var Vn = external_exports.object({ platform: external_exports.enum(["web", "server"], { error: 'Platform must be "web" or "server"' }).describe('Target platform: "web" for browser-based tracking, "server" for Node.js server-side collection'), sources: external_exports.record(external_exports.string(), Bn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), Nn).optional().describe("Destination configurations (data output) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Environment-specific variables (override root-level variables)") }).passthrough().describe("Single environment configuration for one deployment target");
|
|
13349
|
+
var Wn = external_exports.object({ version: external_exports.literal(1, { error: "Only version 1 is currently supported" }).describe("Configuration schema version (currently only 1 is supported)"), $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v1.json")'), variables: external_exports.record(external_exports.string(), Un).optional().describe("Shared variables for interpolation across all environments (use ${VAR_NAME:default} syntax)"), definitions: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Reusable configuration definitions (reference with JSON Schema $ref syntax)"), environments: external_exports.record(external_exports.string(), Vn).refine((e5) => Object.keys(e5).length > 0, { message: "At least one environment is required" }).describe("Named environment configurations (e.g., web_prod, server_stage)") }).describe("Complete multi-environment walkerOS configuration (walkeros.config.json)");
|
|
13350
|
+
function An(e5) {
|
|
13351
|
+
return Wn.parse(e5);
|
|
13352
|
+
}
|
|
13353
|
+
function Hn(e5) {
|
|
13354
|
+
return Wn.safeParse(e5);
|
|
13355
|
+
}
|
|
13356
|
+
function Gn(e5) {
|
|
13357
|
+
return Vn.parse(e5);
|
|
13358
|
+
}
|
|
13359
|
+
function _n(e5) {
|
|
13360
|
+
return Vn.safeParse(e5);
|
|
13361
|
+
}
|
|
13362
|
+
var Qn = external_exports.toJSONSchema(Wn, { target: "draft-7" });
|
|
13363
|
+
var Fn = t(Vn);
|
|
13364
|
+
var $n = t(Bn);
|
|
13365
|
+
var Kn = t(Nn);
|
|
13366
|
+
function Xn(e5, n5) {
|
|
13367
|
+
const i3 = [], o2 = {};
|
|
13368
|
+
for (const [n6, t4] of Object.entries(e5)) {
|
|
13369
|
+
t4.required && i3.push(n6);
|
|
13370
|
+
const e6 = { type: t4.type };
|
|
13371
|
+
if (t4.description && (e6.description = t4.description), t4.pattern && (e6.pattern = t4.pattern), void 0 !== t4.minLength && (e6.minLength = t4.minLength), void 0 !== t4.maxLength && (e6.maxLength = t4.maxLength), void 0 !== t4.minimum && (e6.minimum = t4.minimum), void 0 !== t4.maximum && (e6.maximum = t4.maximum), t4.enum && (e6.enum = [...t4.enum]), void 0 !== t4.default && (e6.default = t4.default), "object" === t4.type && t4.properties) {
|
|
13372
|
+
const n7 = {};
|
|
13373
|
+
for (const [e7, i4] of Object.entries(t4.properties))
|
|
13374
|
+
n7[e7] = Yn(i4);
|
|
13375
|
+
e6.properties = n7;
|
|
13376
|
+
}
|
|
13377
|
+
"array" === t4.type && t4.items && (e6.items = Yn(t4.items)), o2[n6] = e6;
|
|
13378
|
+
}
|
|
13379
|
+
const t3 = { type: "object", properties: o2 };
|
|
13380
|
+
return n5 && (t3.title = n5), i3.length > 0 && (t3.required = i3), t3;
|
|
13381
|
+
}
|
|
13382
|
+
function Yn(e5) {
|
|
13383
|
+
const n5 = { type: e5.type };
|
|
13384
|
+
if (e5.description && (n5.description = e5.description), e5.pattern && (n5.pattern = e5.pattern), void 0 !== e5.minLength && (n5.minLength = e5.minLength), void 0 !== e5.maxLength && (n5.maxLength = e5.maxLength), void 0 !== e5.minimum && (n5.minimum = e5.minimum), void 0 !== e5.maximum && (n5.maximum = e5.maximum), e5.enum && (n5.enum = [...e5.enum]), void 0 !== e5.default && (n5.default = e5.default), "object" === e5.type && e5.properties) {
|
|
13385
|
+
const i3 = {};
|
|
13386
|
+
for (const [n6, o2] of Object.entries(e5.properties))
|
|
13387
|
+
i3[n6] = Yn(o2);
|
|
13388
|
+
n5.properties = i3;
|
|
13389
|
+
}
|
|
13390
|
+
return "array" === e5.type && e5.items && (n5.items = Yn(e5.items)), n5;
|
|
13391
|
+
}
|
|
13392
|
+
function Zn(e5, n5) {
|
|
13393
|
+
const i3 = { type: "array", items: Yn(e5) };
|
|
13394
|
+
return void 0 !== n5?.minItems && (i3.minItems = n5.minItems), void 0 !== n5?.maxItems && (i3.maxItems = n5.maxItems), n5?.description && (i3.description = n5.description), n5?.title && (i3.title = n5.title), i3;
|
|
13395
|
+
}
|
|
13396
|
+
function ei(e5, n5 = "string", i3) {
|
|
13397
|
+
const o2 = { type: n5, enum: [...e5] };
|
|
13398
|
+
return i3?.description && (o2.description = i3.description), i3?.title && (o2.title = i3.title), o2;
|
|
13399
|
+
}
|
|
13400
|
+
function ni(e5, n5, i3) {
|
|
13401
|
+
return Zn({ type: "object" }, { minItems: 2, maxItems: 2, description: i3 || "Tuple with exactly 2 elements [source, transform]" });
|
|
13402
|
+
}
|
|
13403
|
+
function ii(e5) {
|
|
13404
|
+
return external_exports.toJSONSchema(e5, { target: "draft-7" });
|
|
13229
13405
|
}
|
|
13230
13406
|
|
|
13231
13407
|
// node_modules/@walkeros/server-source-express/dist/index.mjs
|
|
13232
|
-
|
|
13233
|
-
import o2 from "cors";
|
|
13234
|
-
var r = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]);
|
|
13408
|
+
var r2 = external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]);
|
|
13235
13409
|
var n3 = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.literal("*")]);
|
|
13236
|
-
var a2 = external_exports.object({ origin: n3.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: external_exports.array(
|
|
13237
|
-
var
|
|
13238
|
-
function
|
|
13239
|
-
if (false !==
|
|
13240
|
-
if (true ===
|
|
13410
|
+
var a2 = external_exports.object({ origin: n3.describe("Allowed origins (* for all, URL string, or array of URLs)").optional(), methods: external_exports.array(r2).describe("Allowed HTTP methods").optional(), headers: external_exports.array(external_exports.string()).describe("Allowed request headers").optional(), credentials: external_exports.boolean().describe("Allow credentials (cookies, authorization headers)").optional(), maxAge: external_exports.number().int().positive().describe("Preflight cache duration in seconds").optional() });
|
|
13411
|
+
var l2 = external_exports.object({ port: external_exports.number().int().min(0).max(65535).describe("HTTP server port to listen on. Use 0 for random available port. If not provided, server will not start (app only mode)").optional(), path: external_exports.string().describe("Event collection endpoint path").default("/collect"), cors: external_exports.union([external_exports.boolean(), a2]).describe("CORS configuration: false = disabled, true = allow all origins (default), object = custom configuration").default(true), status: external_exports.boolean().describe("Enable health check endpoints (/health, /ready)").default(true) });
|
|
13412
|
+
function c2(e5, o2 = true) {
|
|
13413
|
+
if (false !== o2)
|
|
13414
|
+
if (true === o2)
|
|
13241
13415
|
e5.set("Access-Control-Allow-Origin", "*"), e5.set("Access-Control-Allow-Methods", "GET, POST, OPTIONS"), e5.set("Access-Control-Allow-Headers", "Content-Type");
|
|
13242
13416
|
else {
|
|
13243
|
-
if (
|
|
13244
|
-
const s3 = Array.isArray(
|
|
13417
|
+
if (o2.origin) {
|
|
13418
|
+
const s3 = Array.isArray(o2.origin) ? o2.origin.join(", ") : o2.origin;
|
|
13245
13419
|
e5.set("Access-Control-Allow-Origin", s3);
|
|
13246
13420
|
}
|
|
13247
|
-
|
|
13421
|
+
o2.methods && e5.set("Access-Control-Allow-Methods", o2.methods.join(", ")), o2.headers && e5.set("Access-Control-Allow-Headers", o2.headers.join(", ")), o2.credentials && e5.set("Access-Control-Allow-Credentials", "true"), o2.maxAge && e5.set("Access-Control-Max-Age", String(o2.maxAge));
|
|
13248
13422
|
}
|
|
13249
13423
|
}
|
|
13250
|
-
var
|
|
13251
|
-
var
|
|
13252
|
-
const n5 =
|
|
13424
|
+
var d3 = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64");
|
|
13425
|
+
var p3 = async (t3, r3) => {
|
|
13426
|
+
const n5 = l2.parse(t3.settings || {}), a4 = e3();
|
|
13253
13427
|
if (a4.use(e3.json({ limit: "1mb" })), false !== n5.cors) {
|
|
13254
13428
|
const e5 = true === n5.cors ? {} : n5.cors;
|
|
13255
|
-
a4.use(
|
|
13429
|
+
a4.use(o(e5));
|
|
13256
13430
|
}
|
|
13257
|
-
const
|
|
13431
|
+
const i3 = async (e5, o2) => {
|
|
13258
13432
|
try {
|
|
13259
13433
|
if ("OPTIONS" === e5.method)
|
|
13260
|
-
return
|
|
13434
|
+
return c2(o2, n5.cors), void o2.status(204).send();
|
|
13261
13435
|
if ("GET" === e5.method) {
|
|
13262
|
-
const t4 =
|
|
13263
|
-
return t4 && "object" == typeof t4 && await
|
|
13436
|
+
const t4 = Y(e5.url);
|
|
13437
|
+
return t4 && "object" == typeof t4 && await r3.push(t4), o2.set("Content-Type", "image/gif"), o2.set("Cache-Control", "no-cache, no-store, must-revalidate"), void o2.send(d3);
|
|
13264
13438
|
}
|
|
13265
13439
|
if ("POST" === e5.method) {
|
|
13266
13440
|
const s3 = e5.body;
|
|
13267
|
-
return s3 && "object" == typeof s3 ? (await
|
|
13441
|
+
return s3 && "object" == typeof s3 ? (await r3.push(s3), void o2.json({ success: true, timestamp: Date.now() })) : void o2.status(400).json({ success: false, error: "Invalid event: body must be an object" });
|
|
13268
13442
|
}
|
|
13269
|
-
|
|
13443
|
+
o2.status(405).json({ success: false, error: "Method not allowed. Use POST, GET, or OPTIONS." });
|
|
13270
13444
|
} catch (e6) {
|
|
13271
|
-
|
|
13445
|
+
o2.status(500).json({ success: false, error: e6 instanceof Error ? e6.message : "Internal server error" });
|
|
13272
13446
|
}
|
|
13273
13447
|
};
|
|
13274
|
-
let
|
|
13275
|
-
if (a4.post(n5.path,
|
|
13276
|
-
|
|
13277
|
-
}), a4.get("/ready", (e5,
|
|
13278
|
-
|
|
13448
|
+
let p4;
|
|
13449
|
+
if (a4.post(n5.path, i3), a4.get(n5.path, i3), a4.options(n5.path, i3), n5.status && (a4.get("/health", (e5, o2) => {
|
|
13450
|
+
o2.json({ status: "ok", timestamp: Date.now(), source: "express" });
|
|
13451
|
+
}), a4.get("/ready", (e5, o2) => {
|
|
13452
|
+
o2.json({ status: "ready", timestamp: Date.now(), source: "express" });
|
|
13279
13453
|
})), void 0 !== n5.port) {
|
|
13280
|
-
|
|
13454
|
+
p4 = a4.listen(n5.port, () => {
|
|
13281
13455
|
console.log(`\u2705 Express source listening on port ${n5.port}`), console.log(` POST ${n5.path} - Event collection (JSON body)`), console.log(` GET ${n5.path} - Pixel tracking (query params)`), console.log(` OPTIONS ${n5.path} - CORS preflight`), n5.status && (console.log(" GET /health - Health check"), console.log(" GET /ready - Readiness check"));
|
|
13282
13456
|
});
|
|
13283
13457
|
const e5 = () => {
|
|
13284
|
-
|
|
13458
|
+
p4 && p4.close();
|
|
13285
13459
|
};
|
|
13286
13460
|
process.on("SIGTERM", e5), process.on("SIGINT", e5);
|
|
13287
13461
|
}
|
|
13288
|
-
return { type: "express", config: { ...t3, settings: n5 }, push:
|
|
13462
|
+
return { type: "express", config: { ...t3, settings: n5 }, push: i3, app: a4, server: p4 };
|
|
13289
13463
|
};
|
|
13290
13464
|
|
|
13291
13465
|
// node_modules/@walkeros/destination-demo/dist/index.mjs
|
|
13292
13466
|
var e4 = Object.defineProperty;
|
|
13293
|
-
var n4 = (n5,
|
|
13294
|
-
for (var
|
|
13295
|
-
e4(n5,
|
|
13467
|
+
var n4 = (n5, o2) => {
|
|
13468
|
+
for (var i3 in o2)
|
|
13469
|
+
e4(n5, i3, { get: o2[i3], enumerable: true });
|
|
13296
13470
|
};
|
|
13297
|
-
var
|
|
13298
|
-
n4(
|
|
13471
|
+
var i2 = {};
|
|
13472
|
+
n4(i2, { env: () => t2 });
|
|
13299
13473
|
var t2 = {};
|
|
13300
|
-
n4(t2, { init: () => s2, push: () => a3, simulation: () =>
|
|
13474
|
+
n4(t2, { init: () => s2, push: () => a3, simulation: () => l3 });
|
|
13301
13475
|
var s2 = { log: void 0 };
|
|
13302
13476
|
var a3 = { log: Object.assign(() => {
|
|
13303
13477
|
}, {}) };
|
|
13304
|
-
var
|
|
13305
|
-
var
|
|
13478
|
+
var l3 = ["call:log"];
|
|
13479
|
+
var g3 = { type: "demo", config: { settings: { name: "demo" } }, init({ config: e5, env: n5 }) {
|
|
13306
13480
|
(n5?.log || console.log)(`[${{ name: "demo", ...e5?.settings }.name}] initialized`);
|
|
13307
|
-
}, push(e5, { config: n5, env:
|
|
13308
|
-
const
|
|
13309
|
-
const
|
|
13310
|
-
for (const
|
|
13311
|
-
const n7 =
|
|
13312
|
-
void 0 !== n7 && (
|
|
13313
|
-
}
|
|
13314
|
-
return
|
|
13481
|
+
}, push(e5, { config: n5, env: o2 }) {
|
|
13482
|
+
const i3 = o2?.log || console.log, t3 = { name: "demo", ...n5?.settings }, s3 = t3.values ? function(e6, n6) {
|
|
13483
|
+
const o3 = {};
|
|
13484
|
+
for (const i4 of n6) {
|
|
13485
|
+
const n7 = i4.split(".").reduce((e7, n8) => e7?.[n8], e6);
|
|
13486
|
+
void 0 !== n7 && (o3[i4] = n7);
|
|
13487
|
+
}
|
|
13488
|
+
return o3;
|
|
13315
13489
|
}(e5, t3.values) : e5;
|
|
13316
|
-
|
|
13490
|
+
i3(`[${t3.name}] ${JSON.stringify(s3, null, 2)}`);
|
|
13317
13491
|
} };
|
|
13318
13492
|
|
|
13319
13493
|
// entry.js
|
|
13320
13494
|
async function entry_default(context = {}) {
|
|
13321
|
-
const { tracker } = context;
|
|
13322
|
-
const __simulationTracker = tracker;
|
|
13323
|
-
const window = typeof globalThis.window !== "undefined" ? globalThis.window : void 0;
|
|
13324
|
-
const document2 = typeof globalThis.document !== "undefined" ? globalThis.document : void 0;
|
|
13325
13495
|
const config2 = {
|
|
13326
13496
|
sources: {
|
|
13327
13497
|
http: {
|
|
13328
|
-
code:
|
|
13498
|
+
code: p3,
|
|
13329
13499
|
config: {
|
|
13330
13500
|
settings: {
|
|
13331
13501
|
path: "/collect",
|
|
@@ -13338,7 +13508,7 @@ async function entry_default(context = {}) {
|
|
|
13338
13508
|
},
|
|
13339
13509
|
destinations: {
|
|
13340
13510
|
demo: {
|
|
13341
|
-
code:
|
|
13511
|
+
code: g3,
|
|
13342
13512
|
config: {
|
|
13343
13513
|
settings: {
|
|
13344
13514
|
name: "Server Collection Demo",
|
|
@@ -13362,7 +13532,7 @@ async function entry_default(context = {}) {
|
|
|
13362
13532
|
}
|
|
13363
13533
|
}
|
|
13364
13534
|
};
|
|
13365
|
-
const result = await
|
|
13535
|
+
const result = await z(config2);
|
|
13366
13536
|
return result;
|
|
13367
13537
|
}
|
|
13368
13538
|
export {
|