@useinsider/guido 3.3.0-beta.6d597b3 → 3.3.0-beta.74912fc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +1 -1
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +42 -40
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +9 -11
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +70 -35
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/composables/useCortexBlueprintBridge.js +66 -0
- package/dist/composables/useCustomInterfaceAppearance.js +16 -18
- package/dist/composables/useEmailTemplateApplier.js +41 -0
- package/dist/composables/useGuidoStateBridge.js +48 -0
- package/dist/composables/useHtmlValidator.js +41 -36
- package/dist/composables/useRecommendation.js +2 -2
- package/dist/composables/useResponsivePreview.js +1 -1
- package/dist/composables/useStripo.js +49 -47
- package/dist/composables/useStripoNotifications.js +28 -0
- package/dist/config/migrator/radioButtonMigrator.js +30 -29
- package/dist/enums/extensions/recommendationBlock.js +101 -46
- package/dist/enums/toaster.js +2 -2
- package/dist/enums/unsubscribe.js +25 -24
- package/dist/extensions/Blocks/Checkbox/control.js +23 -23
- package/dist/extensions/Blocks/RadioButton/control.js +15 -15
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.js +43 -36
- package/dist/extensions/Blocks/Recommendation/services/configService.js +33 -26
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +35 -26
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -3
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +25 -12
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +329 -252
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +22 -21
- package/dist/services/unsubscribeApi.js +6 -6
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +25 -0
- package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
- package/dist/src/composables/useGuidoStateBridge.d.ts +22 -0
- package/dist/src/composables/useStripoNotifications.d.ts +4 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +6 -1
- package/dist/src/enums/toaster.d.ts +2 -1
- package/dist/src/enums/unsubscribe.d.ts +8 -3
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +11 -3
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
- package/dist/src/stores/guido-email-editor.d.ts +41 -0
- package/dist/src/stores/toaster.d.ts +2 -1
- package/dist/stores/guido-email-editor.js +20 -0
- package/dist/stores/toaster.js +10 -9
- package/package.json +4 -31
- package/dist/static/styles/components/notification.css.js +0 -74
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var m;
|
|
2
2
|
// @__NO_SIDE_EFFECTS__
|
|
3
3
|
function j(n) {
|
|
4
4
|
return {
|
|
@@ -8,30 +8,30 @@ function j(n) {
|
|
|
8
8
|
abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (m == null ? void 0 : m.abortPipeEarly)
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
var d;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
|
-
function
|
|
13
|
+
function I(n) {
|
|
14
14
|
return d == null ? void 0 : d.get(n);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
var x;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function
|
|
18
|
+
function A(n) {
|
|
19
19
|
return x == null ? void 0 : x.get(n);
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
var E;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
|
-
function
|
|
23
|
+
function q(n, s) {
|
|
24
24
|
var e;
|
|
25
25
|
return (e = E == null ? void 0 : E.get(n)) == null ? void 0 : e.get(s);
|
|
26
26
|
}
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
28
|
function _(n) {
|
|
29
|
-
var e,
|
|
29
|
+
var e, r;
|
|
30
30
|
const s = typeof n;
|
|
31
|
-
return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((
|
|
31
|
+
return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((r = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : r.name)) ?? "null" : s;
|
|
32
32
|
}
|
|
33
|
-
function y(n, s, e,
|
|
34
|
-
const l =
|
|
33
|
+
function y(n, s, e, r, t) {
|
|
34
|
+
const l = t && "input" in t ? t.input : e.value, i = (t == null ? void 0 : t.expected) ?? n.expects ?? null, p = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ _(l), u = {
|
|
35
35
|
kind: n.kind,
|
|
36
36
|
type: n.type,
|
|
37
37
|
input: l,
|
|
@@ -39,13 +39,16 @@ function y(n, s, e, t, r) {
|
|
|
39
39
|
received: p,
|
|
40
40
|
message: `Invalid ${s}: ${i ? `Expected ${i} but r` : "R"}eceived ${p}`,
|
|
41
41
|
requirement: n.requirement,
|
|
42
|
-
path:
|
|
43
|
-
issues:
|
|
44
|
-
lang:
|
|
45
|
-
abortEarly:
|
|
46
|
-
abortPipeEarly:
|
|
47
|
-
}, a = n.kind === "schema", c = (
|
|
48
|
-
c !== void 0 && (u.message = typeof c == "function" ?
|
|
42
|
+
path: t == null ? void 0 : t.path,
|
|
43
|
+
issues: t == null ? void 0 : t.issues,
|
|
44
|
+
lang: r.lang,
|
|
45
|
+
abortEarly: r.abortEarly,
|
|
46
|
+
abortPipeEarly: r.abortPipeEarly
|
|
47
|
+
}, a = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ q(n.reference, u.lang) ?? (a ? /* @__PURE__ */ A(u.lang) : null) ?? r.message ?? /* @__PURE__ */ I(u.lang);
|
|
48
|
+
c !== void 0 && (u.message = typeof c == "function" ? (
|
|
49
|
+
// @ts-expect-error
|
|
50
|
+
c(u)
|
|
51
|
+
) : c), a && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
|
|
49
52
|
}
|
|
50
53
|
// @__NO_SIDE_EFFECTS__
|
|
51
54
|
function o(n) {
|
|
@@ -58,79 +61,85 @@ function o(n) {
|
|
|
58
61
|
};
|
|
59
62
|
}
|
|
60
63
|
// @__NO_SIDE_EFFECTS__
|
|
61
|
-
function
|
|
64
|
+
function O(n, s) {
|
|
62
65
|
return Object.hasOwn(n, s) && s !== "__proto__" && s !== "prototype" && s !== "constructor";
|
|
63
66
|
}
|
|
64
67
|
// @__NO_SIDE_EFFECTS__
|
|
65
|
-
function
|
|
68
|
+
function $(n, s) {
|
|
66
69
|
const e = [...new Set(n)];
|
|
67
70
|
return e.length > 1 ? `(${e.join(` ${s} `)})` : e[0] ?? "never";
|
|
68
71
|
}
|
|
69
72
|
// @__NO_SIDE_EFFECTS__
|
|
70
|
-
function
|
|
73
|
+
function K(n, s) {
|
|
71
74
|
return {
|
|
72
75
|
kind: "validation",
|
|
73
76
|
type: "check",
|
|
74
|
-
reference:
|
|
77
|
+
reference: K,
|
|
75
78
|
async: !0,
|
|
76
79
|
expects: null,
|
|
77
80
|
requirement: n,
|
|
78
81
|
message: s,
|
|
79
|
-
async "~run"(e,
|
|
80
|
-
return e.typed && !await this.requirement(e.value) && y(this, "input", e,
|
|
82
|
+
async "~run"(e, r) {
|
|
83
|
+
return e.typed && !await this.requirement(e.value) && y(this, "input", e, r), e;
|
|
81
84
|
}
|
|
82
85
|
};
|
|
83
86
|
}
|
|
84
87
|
// @__NO_SIDE_EFFECTS__
|
|
85
|
-
function
|
|
88
|
+
function M(n, s) {
|
|
86
89
|
return {
|
|
87
90
|
kind: "validation",
|
|
88
91
|
type: "max_length",
|
|
89
|
-
reference:
|
|
92
|
+
reference: M,
|
|
90
93
|
async: !1,
|
|
91
94
|
expects: `<=${n}`,
|
|
92
95
|
requirement: n,
|
|
93
96
|
message: s,
|
|
94
|
-
"~run"(e,
|
|
95
|
-
return e.typed && e.value.length > this.requirement && y(this, "length", e,
|
|
97
|
+
"~run"(e, r) {
|
|
98
|
+
return e.typed && e.value.length > this.requirement && y(this, "length", e, r, {
|
|
99
|
+
received: `${e.value.length}`
|
|
100
|
+
}), e;
|
|
96
101
|
}
|
|
97
102
|
};
|
|
98
103
|
}
|
|
99
104
|
// @__NO_SIDE_EFFECTS__
|
|
100
|
-
function
|
|
105
|
+
function V(n, s) {
|
|
101
106
|
return {
|
|
102
107
|
kind: "validation",
|
|
103
108
|
type: "min_length",
|
|
104
|
-
reference:
|
|
109
|
+
reference: V,
|
|
105
110
|
async: !1,
|
|
106
111
|
expects: `>=${n}`,
|
|
107
112
|
requirement: n,
|
|
108
113
|
message: s,
|
|
109
|
-
"~run"(e,
|
|
110
|
-
return e.typed && e.value.length < this.requirement && y(this, "length", e,
|
|
114
|
+
"~run"(e, r) {
|
|
115
|
+
return e.typed && e.value.length < this.requirement && y(this, "length", e, r, {
|
|
116
|
+
received: `${e.value.length}`
|
|
117
|
+
}), e;
|
|
111
118
|
}
|
|
112
119
|
};
|
|
113
120
|
}
|
|
114
121
|
// @__NO_SIDE_EFFECTS__
|
|
115
|
-
function
|
|
122
|
+
function G(n) {
|
|
116
123
|
return {
|
|
117
124
|
kind: "validation",
|
|
118
125
|
type: "non_empty",
|
|
119
|
-
reference:
|
|
126
|
+
reference: G,
|
|
120
127
|
async: !1,
|
|
121
128
|
expects: "!0",
|
|
122
129
|
message: n,
|
|
123
130
|
"~run"(s, e) {
|
|
124
|
-
return s.typed && s.value.length === 0 && y(this, "length", s, e, {
|
|
131
|
+
return s.typed && s.value.length === 0 && y(this, "length", s, e, {
|
|
132
|
+
received: "0"
|
|
133
|
+
}), s;
|
|
125
134
|
}
|
|
126
135
|
};
|
|
127
136
|
}
|
|
128
137
|
// @__NO_SIDE_EFFECTS__
|
|
129
|
-
function
|
|
138
|
+
function L() {
|
|
130
139
|
return {
|
|
131
140
|
kind: "transformation",
|
|
132
141
|
type: "trim",
|
|
133
|
-
reference:
|
|
142
|
+
reference: L,
|
|
134
143
|
async: !1,
|
|
135
144
|
"~run"(n) {
|
|
136
145
|
return n.value = n.value.trim(), n;
|
|
@@ -138,19 +147,31 @@ function N() {
|
|
|
138
147
|
};
|
|
139
148
|
}
|
|
140
149
|
// @__NO_SIDE_EFFECTS__
|
|
141
|
-
function
|
|
142
|
-
return typeof n.fallback == "function" ?
|
|
150
|
+
function S(n, s, e) {
|
|
151
|
+
return typeof n.fallback == "function" ? (
|
|
152
|
+
// @ts-expect-error
|
|
153
|
+
n.fallback(s, e)
|
|
154
|
+
) : (
|
|
155
|
+
// @ts-expect-error
|
|
156
|
+
n.fallback
|
|
157
|
+
);
|
|
143
158
|
}
|
|
144
159
|
// @__NO_SIDE_EFFECTS__
|
|
145
|
-
function
|
|
146
|
-
return typeof n.default == "function" ?
|
|
160
|
+
function D(n, s, e) {
|
|
161
|
+
return typeof n.default == "function" ? (
|
|
162
|
+
// @ts-expect-error
|
|
163
|
+
n.default(s, e)
|
|
164
|
+
) : (
|
|
165
|
+
// @ts-expect-error
|
|
166
|
+
n.default
|
|
167
|
+
);
|
|
147
168
|
}
|
|
148
169
|
// @__NO_SIDE_EFFECTS__
|
|
149
|
-
function
|
|
170
|
+
function N(n, s) {
|
|
150
171
|
return {
|
|
151
172
|
kind: "schema",
|
|
152
173
|
type: "array",
|
|
153
|
-
reference:
|
|
174
|
+
reference: N,
|
|
154
175
|
expects: "Array",
|
|
155
176
|
async: !1,
|
|
156
177
|
item: n,
|
|
@@ -158,41 +179,42 @@ function C(n, s) {
|
|
|
158
179
|
get "~standard"() {
|
|
159
180
|
return /* @__PURE__ */ o(this);
|
|
160
181
|
},
|
|
161
|
-
"~run"(e,
|
|
182
|
+
"~run"(e, r) {
|
|
162
183
|
var l;
|
|
163
|
-
const
|
|
164
|
-
if (Array.isArray(
|
|
184
|
+
const t = e.value;
|
|
185
|
+
if (Array.isArray(t)) {
|
|
165
186
|
e.typed = !0, e.value = [];
|
|
166
|
-
for (let i = 0; i <
|
|
167
|
-
const p =
|
|
187
|
+
for (let i = 0; i < t.length; i++) {
|
|
188
|
+
const p = t[i], u = this.item["~run"]({ value: p }, r);
|
|
168
189
|
if (u.issues) {
|
|
169
190
|
const a = {
|
|
170
191
|
type: "array",
|
|
171
192
|
origin: "value",
|
|
172
|
-
input:
|
|
193
|
+
input: t,
|
|
173
194
|
key: i,
|
|
174
195
|
value: p
|
|
175
196
|
};
|
|
176
197
|
for (const c of u.issues)
|
|
177
198
|
c.path ? c.path.unshift(a) : c.path = [a], (l = e.issues) == null || l.push(c);
|
|
178
|
-
if (e.issues || (e.issues = u.issues),
|
|
199
|
+
if (e.issues || (e.issues = u.issues), r.abortEarly) {
|
|
179
200
|
e.typed = !1;
|
|
180
201
|
break;
|
|
181
202
|
}
|
|
182
203
|
}
|
|
183
204
|
u.typed || (e.typed = !1), e.value.push(u.value);
|
|
184
205
|
}
|
|
185
|
-
} else
|
|
206
|
+
} else
|
|
207
|
+
y(this, "type", e, r);
|
|
186
208
|
return e;
|
|
187
209
|
}
|
|
188
210
|
};
|
|
189
211
|
}
|
|
190
212
|
// @__NO_SIDE_EFFECTS__
|
|
191
|
-
function
|
|
213
|
+
function C(n) {
|
|
192
214
|
return {
|
|
193
215
|
kind: "schema",
|
|
194
216
|
type: "boolean",
|
|
195
|
-
reference:
|
|
217
|
+
reference: C,
|
|
196
218
|
expects: "boolean",
|
|
197
219
|
async: !1,
|
|
198
220
|
message: n,
|
|
@@ -205,11 +227,11 @@ function F(n) {
|
|
|
205
227
|
};
|
|
206
228
|
}
|
|
207
229
|
// @__NO_SIDE_EFFECTS__
|
|
208
|
-
function
|
|
230
|
+
function F(n, s) {
|
|
209
231
|
return {
|
|
210
232
|
kind: "schema",
|
|
211
233
|
type: "custom",
|
|
212
|
-
reference:
|
|
234
|
+
reference: F,
|
|
213
235
|
expects: "unknown",
|
|
214
236
|
async: !1,
|
|
215
237
|
check: n,
|
|
@@ -217,17 +239,17 @@ function R(n, s) {
|
|
|
217
239
|
get "~standard"() {
|
|
218
240
|
return /* @__PURE__ */ o(this);
|
|
219
241
|
},
|
|
220
|
-
"~run"(e,
|
|
221
|
-
return this.check(e.value) ? e.typed = !0 : y(this, "type", e,
|
|
242
|
+
"~run"(e, r) {
|
|
243
|
+
return this.check(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
|
|
222
244
|
}
|
|
223
245
|
};
|
|
224
246
|
}
|
|
225
247
|
// @__NO_SIDE_EFFECTS__
|
|
226
|
-
function
|
|
248
|
+
function R(n, s) {
|
|
227
249
|
return {
|
|
228
250
|
kind: "schema",
|
|
229
251
|
type: "literal",
|
|
230
|
-
reference:
|
|
252
|
+
reference: R,
|
|
231
253
|
expects: /* @__PURE__ */ _(n),
|
|
232
254
|
async: !1,
|
|
233
255
|
literal: n,
|
|
@@ -235,17 +257,17 @@ function z(n, s) {
|
|
|
235
257
|
get "~standard"() {
|
|
236
258
|
return /* @__PURE__ */ o(this);
|
|
237
259
|
},
|
|
238
|
-
"~run"(e,
|
|
239
|
-
return e.value === this.literal ? e.typed = !0 : y(this, "type", e,
|
|
260
|
+
"~run"(e, r) {
|
|
261
|
+
return e.value === this.literal ? e.typed = !0 : y(this, "type", e, r), e;
|
|
240
262
|
}
|
|
241
263
|
};
|
|
242
264
|
}
|
|
243
265
|
// @__NO_SIDE_EFFECTS__
|
|
244
|
-
function
|
|
266
|
+
function z(n, s) {
|
|
245
267
|
return {
|
|
246
268
|
kind: "schema",
|
|
247
269
|
type: "loose_object",
|
|
248
|
-
reference:
|
|
270
|
+
reference: z,
|
|
249
271
|
expects: "Object",
|
|
250
272
|
async: !1,
|
|
251
273
|
entries: n,
|
|
@@ -253,58 +275,68 @@ function B(n, s) {
|
|
|
253
275
|
get "~standard"() {
|
|
254
276
|
return /* @__PURE__ */ o(this);
|
|
255
277
|
},
|
|
256
|
-
"~run"(e,
|
|
278
|
+
"~run"(e, r) {
|
|
257
279
|
var l;
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
280
|
+
const t = e.value;
|
|
281
|
+
if (t && typeof t == "object") {
|
|
260
282
|
e.typed = !0, e.value = {};
|
|
261
283
|
for (const i in this.entries) {
|
|
262
284
|
const p = this.entries[i];
|
|
263
|
-
if (i in
|
|
264
|
-
|
|
285
|
+
if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
|
|
286
|
+
p.default !== void 0) {
|
|
287
|
+
const u = i in t ? (
|
|
288
|
+
// @ts-expect-error
|
|
289
|
+
t[i]
|
|
290
|
+
) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
|
|
265
291
|
if (a.issues) {
|
|
266
292
|
const c = {
|
|
267
293
|
type: "object",
|
|
268
294
|
origin: "value",
|
|
269
|
-
input:
|
|
295
|
+
input: t,
|
|
270
296
|
key: i,
|
|
271
297
|
value: u
|
|
272
298
|
};
|
|
273
299
|
for (const f of a.issues)
|
|
274
300
|
f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
|
|
275
|
-
if (e.issues || (e.issues = a.issues),
|
|
301
|
+
if (e.issues || (e.issues = a.issues), r.abortEarly) {
|
|
276
302
|
e.typed = !1;
|
|
277
303
|
break;
|
|
278
304
|
}
|
|
279
305
|
}
|
|
280
306
|
a.typed || (e.typed = !1), e.value[i] = a.value;
|
|
281
|
-
} else if (p.fallback !== void 0)
|
|
282
|
-
|
|
307
|
+
} else if (p.fallback !== void 0)
|
|
308
|
+
e.value[i] = /* @__PURE__ */ S(p);
|
|
309
|
+
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
|
|
283
310
|
input: void 0,
|
|
284
311
|
expected: `"${i}"`,
|
|
285
|
-
path: [
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
312
|
+
path: [
|
|
313
|
+
{
|
|
314
|
+
type: "object",
|
|
315
|
+
origin: "key",
|
|
316
|
+
input: t,
|
|
317
|
+
key: i,
|
|
318
|
+
// @ts-expect-error
|
|
319
|
+
value: t[i]
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
}), r.abortEarly))
|
|
293
323
|
break;
|
|
294
324
|
}
|
|
295
|
-
if (!e.issues || !
|
|
296
|
-
for (const i in
|
|
297
|
-
|
|
325
|
+
if (!e.issues || !r.abortEarly)
|
|
326
|
+
for (const i in t)
|
|
327
|
+
/* @__PURE__ */ O(t, i) && !(i in this.entries) && (e.value[i] = t[i]);
|
|
328
|
+
} else
|
|
329
|
+
y(this, "type", e, r);
|
|
298
330
|
return e;
|
|
299
331
|
}
|
|
300
332
|
};
|
|
301
333
|
}
|
|
302
334
|
// @__NO_SIDE_EFFECTS__
|
|
303
|
-
function
|
|
335
|
+
function B(n) {
|
|
304
336
|
return {
|
|
305
337
|
kind: "schema",
|
|
306
338
|
type: "number",
|
|
307
|
-
reference:
|
|
339
|
+
reference: B,
|
|
308
340
|
expects: "number",
|
|
309
341
|
async: !1,
|
|
310
342
|
message: n,
|
|
@@ -317,11 +349,11 @@ function H(n) {
|
|
|
317
349
|
};
|
|
318
350
|
}
|
|
319
351
|
// @__NO_SIDE_EFFECTS__
|
|
320
|
-
function
|
|
352
|
+
function H(n, s) {
|
|
321
353
|
return {
|
|
322
354
|
kind: "schema",
|
|
323
355
|
type: "object",
|
|
324
|
-
reference:
|
|
356
|
+
reference: H,
|
|
325
357
|
expects: "Object",
|
|
326
358
|
async: !1,
|
|
327
359
|
entries: n,
|
|
@@ -329,56 +361,65 @@ function J(n, s) {
|
|
|
329
361
|
get "~standard"() {
|
|
330
362
|
return /* @__PURE__ */ o(this);
|
|
331
363
|
},
|
|
332
|
-
"~run"(e,
|
|
364
|
+
"~run"(e, r) {
|
|
333
365
|
var l;
|
|
334
|
-
const
|
|
335
|
-
if (
|
|
366
|
+
const t = e.value;
|
|
367
|
+
if (t && typeof t == "object") {
|
|
336
368
|
e.typed = !0, e.value = {};
|
|
337
369
|
for (const i in this.entries) {
|
|
338
370
|
const p = this.entries[i];
|
|
339
|
-
if (i in
|
|
340
|
-
|
|
371
|
+
if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
|
|
372
|
+
p.default !== void 0) {
|
|
373
|
+
const u = i in t ? (
|
|
374
|
+
// @ts-expect-error
|
|
375
|
+
t[i]
|
|
376
|
+
) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
|
|
341
377
|
if (a.issues) {
|
|
342
378
|
const c = {
|
|
343
379
|
type: "object",
|
|
344
380
|
origin: "value",
|
|
345
|
-
input:
|
|
381
|
+
input: t,
|
|
346
382
|
key: i,
|
|
347
383
|
value: u
|
|
348
384
|
};
|
|
349
385
|
for (const f of a.issues)
|
|
350
386
|
f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
|
|
351
|
-
if (e.issues || (e.issues = a.issues),
|
|
387
|
+
if (e.issues || (e.issues = a.issues), r.abortEarly) {
|
|
352
388
|
e.typed = !1;
|
|
353
389
|
break;
|
|
354
390
|
}
|
|
355
391
|
}
|
|
356
392
|
a.typed || (e.typed = !1), e.value[i] = a.value;
|
|
357
|
-
} else if (p.fallback !== void 0)
|
|
358
|
-
|
|
393
|
+
} else if (p.fallback !== void 0)
|
|
394
|
+
e.value[i] = /* @__PURE__ */ S(p);
|
|
395
|
+
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
|
|
359
396
|
input: void 0,
|
|
360
397
|
expected: `"${i}"`,
|
|
361
|
-
path: [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
398
|
+
path: [
|
|
399
|
+
{
|
|
400
|
+
type: "object",
|
|
401
|
+
origin: "key",
|
|
402
|
+
input: t,
|
|
403
|
+
key: i,
|
|
404
|
+
// @ts-expect-error
|
|
405
|
+
value: t[i]
|
|
406
|
+
}
|
|
407
|
+
]
|
|
408
|
+
}), r.abortEarly))
|
|
369
409
|
break;
|
|
370
410
|
}
|
|
371
|
-
} else
|
|
411
|
+
} else
|
|
412
|
+
y(this, "type", e, r);
|
|
372
413
|
return e;
|
|
373
414
|
}
|
|
374
415
|
};
|
|
375
416
|
}
|
|
376
417
|
// @__NO_SIDE_EFFECTS__
|
|
377
|
-
function
|
|
418
|
+
function J(n, s) {
|
|
378
419
|
return {
|
|
379
420
|
kind: "schema",
|
|
380
421
|
type: "optional",
|
|
381
|
-
reference:
|
|
422
|
+
reference: J,
|
|
382
423
|
expects: `(${n.expects} | undefined)`,
|
|
383
424
|
async: !1,
|
|
384
425
|
wrapped: n,
|
|
@@ -386,35 +427,35 @@ function Q(n, s) {
|
|
|
386
427
|
get "~standard"() {
|
|
387
428
|
return /* @__PURE__ */ o(this);
|
|
388
429
|
},
|
|
389
|
-
"~run"(e,
|
|
390
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
430
|
+
"~run"(e, r) {
|
|
431
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ D(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
|
|
391
432
|
}
|
|
392
433
|
};
|
|
393
434
|
}
|
|
394
435
|
// @__NO_SIDE_EFFECTS__
|
|
395
|
-
function
|
|
436
|
+
function Q(n, s) {
|
|
396
437
|
return {
|
|
397
438
|
kind: "schema",
|
|
398
439
|
type: "picklist",
|
|
399
|
-
reference:
|
|
400
|
-
expects: /* @__PURE__ */
|
|
440
|
+
reference: Q,
|
|
441
|
+
expects: /* @__PURE__ */ $(n.map(_), "|"),
|
|
401
442
|
async: !1,
|
|
402
443
|
options: n,
|
|
403
444
|
message: s,
|
|
404
445
|
get "~standard"() {
|
|
405
446
|
return /* @__PURE__ */ o(this);
|
|
406
447
|
},
|
|
407
|
-
"~run"(e,
|
|
408
|
-
return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e,
|
|
448
|
+
"~run"(e, r) {
|
|
449
|
+
return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
|
|
409
450
|
}
|
|
410
451
|
};
|
|
411
452
|
}
|
|
412
453
|
// @__NO_SIDE_EFFECTS__
|
|
413
|
-
function
|
|
454
|
+
function T(n, s, e) {
|
|
414
455
|
return {
|
|
415
456
|
kind: "schema",
|
|
416
457
|
type: "record",
|
|
417
|
-
reference:
|
|
458
|
+
reference: T,
|
|
418
459
|
expects: "Object",
|
|
419
460
|
async: !1,
|
|
420
461
|
key: n,
|
|
@@ -423,57 +464,62 @@ function U(n, s, e) {
|
|
|
423
464
|
get "~standard"() {
|
|
424
465
|
return /* @__PURE__ */ o(this);
|
|
425
466
|
},
|
|
426
|
-
"~run"(
|
|
467
|
+
"~run"(r, t) {
|
|
427
468
|
var i, p;
|
|
428
|
-
const l =
|
|
469
|
+
const l = r.value;
|
|
429
470
|
if (l && typeof l == "object") {
|
|
430
|
-
|
|
431
|
-
for (const u in l)
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
471
|
+
r.typed = !0, r.value = {};
|
|
472
|
+
for (const u in l)
|
|
473
|
+
if (/* @__PURE__ */ O(l, u)) {
|
|
474
|
+
const a = l[u], c = this.key["~run"]({ value: u }, t);
|
|
475
|
+
if (c.issues) {
|
|
476
|
+
const b = {
|
|
477
|
+
type: "object",
|
|
478
|
+
origin: "key",
|
|
479
|
+
input: l,
|
|
480
|
+
key: u,
|
|
481
|
+
value: a
|
|
482
|
+
};
|
|
483
|
+
for (const h of c.issues)
|
|
484
|
+
h.path = [b], (i = r.issues) == null || i.push(h);
|
|
485
|
+
if (r.issues || (r.issues = c.issues), t.abortEarly) {
|
|
486
|
+
r.typed = !1;
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
446
489
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
490
|
+
const f = this.value["~run"](
|
|
491
|
+
{ value: a },
|
|
492
|
+
t
|
|
493
|
+
);
|
|
494
|
+
if (f.issues) {
|
|
495
|
+
const b = {
|
|
496
|
+
type: "object",
|
|
497
|
+
origin: "value",
|
|
498
|
+
input: l,
|
|
499
|
+
key: u,
|
|
500
|
+
value: a
|
|
501
|
+
};
|
|
502
|
+
for (const h of f.issues)
|
|
503
|
+
h.path ? h.path.unshift(b) : h.path = [b], (p = r.issues) == null || p.push(h);
|
|
504
|
+
if (r.issues || (r.issues = f.issues), t.abortEarly) {
|
|
505
|
+
r.typed = !1;
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
462
508
|
}
|
|
509
|
+
(!c.typed || !f.typed) && (r.typed = !1), c.typed && (r.value[c.value] = f.value);
|
|
463
510
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return t;
|
|
511
|
+
} else
|
|
512
|
+
y(this, "type", r, t);
|
|
513
|
+
return r;
|
|
468
514
|
}
|
|
469
515
|
};
|
|
470
516
|
}
|
|
471
517
|
// @__NO_SIDE_EFFECTS__
|
|
472
|
-
function
|
|
518
|
+
function U(n) {
|
|
473
519
|
return {
|
|
474
520
|
kind: "schema",
|
|
475
521
|
type: "string",
|
|
476
|
-
reference:
|
|
522
|
+
reference: U,
|
|
477
523
|
expects: "string",
|
|
478
524
|
async: !1,
|
|
479
525
|
message: n,
|
|
@@ -486,53 +532,68 @@ function W(n) {
|
|
|
486
532
|
};
|
|
487
533
|
}
|
|
488
534
|
// @__NO_SIDE_EFFECTS__
|
|
489
|
-
function
|
|
535
|
+
function w(n) {
|
|
490
536
|
let s;
|
|
491
|
-
if (n)
|
|
537
|
+
if (n)
|
|
538
|
+
for (const e of n)
|
|
539
|
+
s ? s.push(...e.issues) : s = e.issues;
|
|
492
540
|
return s;
|
|
493
541
|
}
|
|
494
542
|
// @__NO_SIDE_EFFECTS__
|
|
495
|
-
function
|
|
543
|
+
function W(n, s) {
|
|
496
544
|
return {
|
|
497
545
|
kind: "schema",
|
|
498
546
|
type: "union",
|
|
499
|
-
reference:
|
|
500
|
-
expects: /* @__PURE__ */
|
|
547
|
+
reference: W,
|
|
548
|
+
expects: /* @__PURE__ */ $(
|
|
549
|
+
n.map((e) => e.expects),
|
|
550
|
+
"|"
|
|
551
|
+
),
|
|
501
552
|
async: !1,
|
|
502
553
|
options: n,
|
|
503
554
|
message: s,
|
|
504
555
|
get "~standard"() {
|
|
505
556
|
return /* @__PURE__ */ o(this);
|
|
506
557
|
},
|
|
507
|
-
"~run"(e,
|
|
508
|
-
let
|
|
558
|
+
"~run"(e, r) {
|
|
559
|
+
let t, l, i;
|
|
509
560
|
for (const p of this.options) {
|
|
510
|
-
const u = p["~run"]({ value: e.value },
|
|
511
|
-
if (u.typed)
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
561
|
+
const u = p["~run"]({ value: e.value }, r);
|
|
562
|
+
if (u.typed)
|
|
563
|
+
if (u.issues)
|
|
564
|
+
l ? l.push(u) : l = [u];
|
|
565
|
+
else {
|
|
566
|
+
t = u;
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
else
|
|
570
|
+
i ? i.push(u) : i = [u];
|
|
517
571
|
}
|
|
518
|
-
if (
|
|
572
|
+
if (t)
|
|
573
|
+
return t;
|
|
519
574
|
if (l) {
|
|
520
|
-
if (l.length === 1)
|
|
521
|
-
|
|
575
|
+
if (l.length === 1)
|
|
576
|
+
return l[0];
|
|
577
|
+
y(this, "type", e, r, {
|
|
578
|
+
issues: /* @__PURE__ */ w(l)
|
|
579
|
+
}), e.typed = !0;
|
|
522
580
|
} else {
|
|
523
|
-
if ((i == null ? void 0 : i.length) === 1)
|
|
524
|
-
|
|
581
|
+
if ((i == null ? void 0 : i.length) === 1)
|
|
582
|
+
return i[0];
|
|
583
|
+
y(this, "type", e, r, {
|
|
584
|
+
issues: /* @__PURE__ */ w(i)
|
|
585
|
+
});
|
|
525
586
|
}
|
|
526
587
|
return e;
|
|
527
588
|
}
|
|
528
589
|
};
|
|
529
590
|
}
|
|
530
591
|
// @__NO_SIDE_EFFECTS__
|
|
531
|
-
function
|
|
592
|
+
function X() {
|
|
532
593
|
return {
|
|
533
594
|
kind: "schema",
|
|
534
595
|
type: "unknown",
|
|
535
|
-
reference:
|
|
596
|
+
reference: X,
|
|
536
597
|
expects: "unknown",
|
|
537
598
|
async: !1,
|
|
538
599
|
get "~standard"() {
|
|
@@ -544,11 +605,11 @@ function Y() {
|
|
|
544
605
|
};
|
|
545
606
|
}
|
|
546
607
|
// @__NO_SIDE_EFFECTS__
|
|
547
|
-
function
|
|
608
|
+
function Y(n, s, e) {
|
|
548
609
|
return {
|
|
549
610
|
kind: "schema",
|
|
550
611
|
type: "variant",
|
|
551
|
-
reference:
|
|
612
|
+
reference: Y,
|
|
552
613
|
expects: "Object",
|
|
553
614
|
async: !1,
|
|
554
615
|
key: n,
|
|
@@ -557,53 +618,64 @@ function Z(n, s, e) {
|
|
|
557
618
|
get "~standard"() {
|
|
558
619
|
return /* @__PURE__ */ o(this);
|
|
559
620
|
},
|
|
560
|
-
"~run"(
|
|
561
|
-
const l =
|
|
621
|
+
"~run"(r, t) {
|
|
622
|
+
const l = r.value;
|
|
562
623
|
if (l && typeof l == "object") {
|
|
563
624
|
let i, p = 0, u = this.key, a = [];
|
|
564
625
|
const c = (f, b) => {
|
|
565
626
|
for (const h of f.options) {
|
|
566
|
-
if (h.type === "variant")
|
|
627
|
+
if (h.type === "variant")
|
|
628
|
+
c(h, new Set(b).add(h.key));
|
|
567
629
|
else {
|
|
568
|
-
let
|
|
630
|
+
let P = !0, k = 0;
|
|
569
631
|
for (const v of b) {
|
|
570
632
|
const g = h.entries[v];
|
|
571
|
-
if (v in l ? g["~run"](
|
|
572
|
-
|
|
573
|
-
value: l[v]
|
|
574
|
-
|
|
575
|
-
|
|
633
|
+
if (v in l ? g["~run"](
|
|
634
|
+
// @ts-expect-error
|
|
635
|
+
{ typed: !1, value: l[v] },
|
|
636
|
+
{ abortEarly: !0 }
|
|
637
|
+
).issues : g.type !== "exact_optional" && g.type !== "optional" && g.type !== "nullish") {
|
|
638
|
+
P = !1, u !== v && (p < k || p === k && v in l && !(u in l)) && (p = k, u = v, a = []), u === v && a.push(
|
|
639
|
+
h.entries[v].expects
|
|
640
|
+
);
|
|
576
641
|
break;
|
|
577
642
|
}
|
|
578
643
|
k++;
|
|
579
644
|
}
|
|
580
|
-
if (
|
|
581
|
-
const v = h["~run"]({ value: l },
|
|
645
|
+
if (P) {
|
|
646
|
+
const v = h["~run"]({ value: l }, t);
|
|
582
647
|
(!i || !i.typed && v.typed) && (i = v);
|
|
583
648
|
}
|
|
584
649
|
}
|
|
585
|
-
if (i && !i.issues)
|
|
650
|
+
if (i && !i.issues)
|
|
651
|
+
break;
|
|
586
652
|
}
|
|
587
653
|
};
|
|
588
|
-
if (c(this, /* @__PURE__ */ new Set([this.key])), i)
|
|
589
|
-
|
|
654
|
+
if (c(this, /* @__PURE__ */ new Set([this.key])), i)
|
|
655
|
+
return i;
|
|
656
|
+
y(this, "type", r, t, {
|
|
657
|
+
// @ts-expect-error
|
|
590
658
|
input: l[u],
|
|
591
|
-
expected: /* @__PURE__ */
|
|
592
|
-
path: [
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
659
|
+
expected: /* @__PURE__ */ $(a, "|"),
|
|
660
|
+
path: [
|
|
661
|
+
{
|
|
662
|
+
type: "object",
|
|
663
|
+
origin: "value",
|
|
664
|
+
input: l,
|
|
665
|
+
key: u,
|
|
666
|
+
// @ts-expect-error
|
|
667
|
+
value: l[u]
|
|
668
|
+
}
|
|
669
|
+
]
|
|
599
670
|
});
|
|
600
|
-
} else
|
|
601
|
-
|
|
671
|
+
} else
|
|
672
|
+
y(this, "type", r, t);
|
|
673
|
+
return r;
|
|
602
674
|
}
|
|
603
675
|
};
|
|
604
676
|
}
|
|
605
677
|
// @__NO_SIDE_EFFECTS__
|
|
606
|
-
function
|
|
678
|
+
function Z(...n) {
|
|
607
679
|
return {
|
|
608
680
|
...n[0],
|
|
609
681
|
pipe: n,
|
|
@@ -611,13 +683,14 @@ function $(...n) {
|
|
|
611
683
|
return /* @__PURE__ */ o(this);
|
|
612
684
|
},
|
|
613
685
|
"~run"(s, e) {
|
|
614
|
-
for (const
|
|
615
|
-
if (
|
|
616
|
-
s.
|
|
617
|
-
|
|
686
|
+
for (const r of n)
|
|
687
|
+
if (r.kind !== "metadata") {
|
|
688
|
+
if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
689
|
+
s.typed = !1;
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = r["~run"](s, e));
|
|
618
693
|
}
|
|
619
|
-
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = t["~run"](s, e));
|
|
620
|
-
}
|
|
621
694
|
return s;
|
|
622
695
|
}
|
|
623
696
|
};
|
|
@@ -632,70 +705,74 @@ function ee(...n) {
|
|
|
632
705
|
return /* @__PURE__ */ o(this);
|
|
633
706
|
},
|
|
634
707
|
async "~run"(s, e) {
|
|
635
|
-
for (const
|
|
636
|
-
if (
|
|
637
|
-
s.
|
|
638
|
-
|
|
708
|
+
for (const r of n)
|
|
709
|
+
if (r.kind !== "metadata") {
|
|
710
|
+
if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
711
|
+
s.typed = !1;
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await r["~run"](s, e));
|
|
639
715
|
}
|
|
640
|
-
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await t["~run"](s, e));
|
|
641
|
-
}
|
|
642
716
|
return s;
|
|
643
717
|
}
|
|
644
718
|
};
|
|
645
719
|
}
|
|
646
720
|
// @__NO_SIDE_EFFECTS__
|
|
647
721
|
function ne(n, s, e) {
|
|
648
|
-
const
|
|
722
|
+
const r = n["~run"]({ value: s }, /* @__PURE__ */ j(e));
|
|
649
723
|
return {
|
|
650
|
-
typed:
|
|
651
|
-
success: !
|
|
652
|
-
output:
|
|
653
|
-
issues:
|
|
724
|
+
typed: r.typed,
|
|
725
|
+
success: !r.issues,
|
|
726
|
+
output: r.value,
|
|
727
|
+
issues: r.issues
|
|
654
728
|
};
|
|
655
729
|
}
|
|
656
730
|
// @__NO_SIDE_EFFECTS__
|
|
657
731
|
async function se(n, s, e) {
|
|
658
|
-
const
|
|
732
|
+
const r = await n["~run"](
|
|
733
|
+
{ value: s },
|
|
734
|
+
/* @__PURE__ */ j(e)
|
|
735
|
+
);
|
|
659
736
|
return {
|
|
660
|
-
typed:
|
|
661
|
-
success: !
|
|
662
|
-
output:
|
|
663
|
-
issues:
|
|
737
|
+
typed: r.typed,
|
|
738
|
+
success: !r.issues,
|
|
739
|
+
output: r.value,
|
|
740
|
+
issues: r.issues
|
|
664
741
|
};
|
|
665
742
|
}
|
|
666
743
|
export {
|
|
667
744
|
y as _addIssue,
|
|
668
745
|
o as _getStandardProps,
|
|
669
|
-
|
|
670
|
-
|
|
746
|
+
O as _isValidObjectKey,
|
|
747
|
+
$ as _joinExpects,
|
|
671
748
|
_ as _stringify,
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
749
|
+
N as array,
|
|
750
|
+
C as boolean,
|
|
751
|
+
K as checkAsync,
|
|
752
|
+
F as custom,
|
|
753
|
+
D as getDefault,
|
|
754
|
+
S as getFallback,
|
|
678
755
|
j as getGlobalConfig,
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
756
|
+
I as getGlobalMessage,
|
|
757
|
+
A as getSchemaMessage,
|
|
758
|
+
q as getSpecificMessage,
|
|
759
|
+
R as literal,
|
|
760
|
+
z as looseObject,
|
|
761
|
+
M as maxLength,
|
|
762
|
+
V as minLength,
|
|
763
|
+
G as nonEmpty,
|
|
764
|
+
B as number,
|
|
765
|
+
H as object,
|
|
766
|
+
J as optional,
|
|
767
|
+
Q as picklist,
|
|
768
|
+
Z as pipe,
|
|
692
769
|
ee as pipeAsync,
|
|
693
|
-
|
|
770
|
+
T as record,
|
|
694
771
|
ne as safeParse,
|
|
695
772
|
se as safeParseAsync,
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
773
|
+
U as string,
|
|
774
|
+
L as trim,
|
|
775
|
+
W as union,
|
|
776
|
+
X as unknown,
|
|
777
|
+
Y as variant
|
|
701
778
|
};
|