@learncard/render-method-plugin 4.0.3 → 5.0.0
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/plugin.d.ts.map +1 -1
- package/dist/read.d.ts.map +1 -1
- package/dist/render-method-plugin.cjs.development.cjs +872 -344
- package/dist/render-method-plugin.cjs.development.cjs.map +3 -3
- package/dist/render-method-plugin.cjs.production.min.cjs +14 -14
- package/dist/render-method-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/render-method-plugin.esm.js +866 -338
- package/dist/render-method-plugin.esm.js.map +3 -3
- package/package.json +13 -18
|
@@ -19,8 +19,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
|
-
var
|
|
23
|
-
__export(
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
24
|
DEFAULT_TEMPLATE_ID: () => DEFAULT_TEMPLATE_ID,
|
|
25
25
|
RENDER_METHOD_CONTEXT: () => RENDER_METHOD_CONTEXT,
|
|
26
26
|
attachRenderMethod: () => attachRenderMethod,
|
|
@@ -36,7 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
isSvgMustacheRenderMethod: () => isSvgMustacheRenderMethod,
|
|
37
37
|
isTemplateRenderMethod: () => isTemplateRenderMethod
|
|
38
38
|
});
|
|
39
|
-
module.exports = __toCommonJS(
|
|
39
|
+
module.exports = __toCommonJS(index_exports);
|
|
40
40
|
|
|
41
41
|
// src/types.ts
|
|
42
42
|
var RENDER_METHOD_CONTEXT = "https://digitalbazaar.github.io/vc-render-method-context/contexts/v2rc2.jsonld";
|
|
@@ -46,6 +46,7 @@ var NOTHING = Symbol.for("immer-nothing");
|
|
|
46
46
|
var DRAFTABLE = Symbol.for("immer-draftable");
|
|
47
47
|
var DRAFT_STATE = Symbol.for("immer-state");
|
|
48
48
|
var errors = true ? [
|
|
49
|
+
// All error codes, starting by 0:
|
|
49
50
|
function(plugin) {
|
|
50
51
|
return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \`enable${plugin}()\` when initializing your application.`;
|
|
51
52
|
},
|
|
@@ -72,6 +73,8 @@ var errors = true ? [
|
|
|
72
73
|
function(thing) {
|
|
73
74
|
return `'original' expects a draft, got: ${thing}`;
|
|
74
75
|
}
|
|
76
|
+
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
77
|
+
// See Patches.ts for additional errors
|
|
75
78
|
] : [];
|
|
76
79
|
function die(error51, ...args) {
|
|
77
80
|
if (true) {
|
|
@@ -191,6 +194,7 @@ function shallowCopy(base, strict) {
|
|
|
191
194
|
descriptors[key] = {
|
|
192
195
|
configurable: true,
|
|
193
196
|
writable: true,
|
|
197
|
+
// could live with !!desc.set as well here...
|
|
194
198
|
enumerable: desc.enumerable,
|
|
195
199
|
value: base[key]
|
|
196
200
|
};
|
|
@@ -255,6 +259,8 @@ function createScope(parent_, immer_) {
|
|
|
255
259
|
drafts_: [],
|
|
256
260
|
parent_,
|
|
257
261
|
immer_,
|
|
262
|
+
// Whenever the modified draft contains a draft from another scope, we
|
|
263
|
+
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
258
264
|
canAutoFreeze_: true,
|
|
259
265
|
unfinalizedDrafts_: 0
|
|
260
266
|
};
|
|
@@ -395,7 +401,8 @@ function finalizeProperty(rootScope, parentState, targetObject, prop, childValue
|
|
|
395
401
|
if (childValue === targetObject)
|
|
396
402
|
die(5);
|
|
397
403
|
if (isDraft(childValue)) {
|
|
398
|
-
const path = rootPath && parentState && parentState.type_ !== 3 &&
|
|
404
|
+
const path = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
405
|
+
!has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
399
406
|
const res = finalize(rootScope, childValue, path);
|
|
400
407
|
set(targetObject, prop, res);
|
|
401
408
|
if (isDraft(res)) {
|
|
@@ -428,14 +435,24 @@ function createProxyProxy(base, parent) {
|
|
|
428
435
|
const isArray = Array.isArray(base);
|
|
429
436
|
const state = {
|
|
430
437
|
type_: isArray ? 1 : 0,
|
|
438
|
+
// Track which produce call this is associated with.
|
|
431
439
|
scope_: parent ? parent.scope_ : getCurrentScope(),
|
|
440
|
+
// True for both shallow and deep changes.
|
|
432
441
|
modified_: false,
|
|
442
|
+
// Used during finalization.
|
|
433
443
|
finalized_: false,
|
|
444
|
+
// Track which properties have been assigned (true) or deleted (false).
|
|
434
445
|
assigned_: {},
|
|
446
|
+
// The parent draft state.
|
|
435
447
|
parent_: parent,
|
|
448
|
+
// The base state.
|
|
436
449
|
base_: base,
|
|
450
|
+
// The base proxy.
|
|
437
451
|
draft_: null,
|
|
452
|
+
// set below
|
|
453
|
+
// The base copy with any updated values.
|
|
438
454
|
copy_: null,
|
|
455
|
+
// Called by the `produce` function.
|
|
439
456
|
revoke_: null,
|
|
440
457
|
isManual_: false
|
|
441
458
|
};
|
|
@@ -494,7 +511,9 @@ var objectTraps = {
|
|
|
494
511
|
prepareCopy(state);
|
|
495
512
|
markChanged(state);
|
|
496
513
|
}
|
|
497
|
-
if (state.copy_[prop] === value &&
|
|
514
|
+
if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'
|
|
515
|
+
(value !== void 0 || prop in state.copy_) || // special case: NaN
|
|
516
|
+
Number.isNaN(value) && Number.isNaN(state.copy_[prop]))
|
|
498
517
|
return true;
|
|
499
518
|
state.copy_[prop] = value;
|
|
500
519
|
state.assigned_[prop] = true;
|
|
@@ -513,6 +532,8 @@ var objectTraps = {
|
|
|
513
532
|
}
|
|
514
533
|
return true;
|
|
515
534
|
},
|
|
535
|
+
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
536
|
+
// the same guarantee in ES5 mode.
|
|
516
537
|
getOwnPropertyDescriptor(state, prop) {
|
|
517
538
|
const owner = latest(state);
|
|
518
539
|
const desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
@@ -560,7 +581,11 @@ function peek(draft, prop) {
|
|
|
560
581
|
__name(peek, "peek");
|
|
561
582
|
function readPropFromProto(state, source, prop) {
|
|
562
583
|
const desc = getDescriptorFromProto(source, prop);
|
|
563
|
-
return desc ? `value` in desc ? desc.value :
|
|
584
|
+
return desc ? `value` in desc ? desc.value : (
|
|
585
|
+
// This is a very special case, if the prop is a getter defined by the
|
|
586
|
+
// prototype, we should invoke it with the draft as context!
|
|
587
|
+
desc.get?.call(state.draft_)
|
|
588
|
+
) : void 0;
|
|
564
589
|
}
|
|
565
590
|
__name(readPropFromProto, "readPropFromProto");
|
|
566
591
|
function getDescriptorFromProto(source, prop) {
|
|
@@ -594,7 +619,8 @@ function prepareCopy(state) {
|
|
|
594
619
|
}
|
|
595
620
|
}
|
|
596
621
|
__name(prepareCopy, "prepareCopy");
|
|
597
|
-
var
|
|
622
|
+
var _a;
|
|
623
|
+
var Immer2 = (_a = class {
|
|
598
624
|
constructor(config2) {
|
|
599
625
|
this.autoFreeze_ = true;
|
|
600
626
|
this.useStrictShallowCopy_ = false;
|
|
@@ -683,12 +709,28 @@ var Immer2 = /* @__PURE__ */ __name(class {
|
|
|
683
709
|
usePatchesInScope(scope, patchListener);
|
|
684
710
|
return processResult(void 0, scope);
|
|
685
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Pass true to automatically freeze all copies created by Immer.
|
|
714
|
+
*
|
|
715
|
+
* By default, auto-freezing is enabled.
|
|
716
|
+
*/
|
|
686
717
|
setAutoFreeze(value) {
|
|
687
718
|
this.autoFreeze_ = value;
|
|
688
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* Pass true to enable strict shallow copy.
|
|
722
|
+
*
|
|
723
|
+
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
724
|
+
*/
|
|
689
725
|
setUseStrictShallowCopy(value) {
|
|
690
726
|
this.useStrictShallowCopy_ = value;
|
|
691
727
|
}
|
|
728
|
+
/**
|
|
729
|
+
* Pass false to use faster iteration that skips non-enumerable properties
|
|
730
|
+
* but still handles symbols for compatibility.
|
|
731
|
+
*
|
|
732
|
+
* By default, strict iteration is enabled (includes all own properties).
|
|
733
|
+
*/
|
|
692
734
|
setUseStrictIteration(value) {
|
|
693
735
|
this.useStrictIteration_ = value;
|
|
694
736
|
}
|
|
@@ -716,7 +758,7 @@ var Immer2 = /* @__PURE__ */ __name(class {
|
|
|
716
758
|
(draft) => applyPatchesImpl(draft, patches)
|
|
717
759
|
);
|
|
718
760
|
}
|
|
719
|
-
}, "Immer2");
|
|
761
|
+
}, __name(_a, "Immer2"), _a);
|
|
720
762
|
function createProxy(value, parent) {
|
|
721
763
|
const draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
|
|
722
764
|
const scope = parent ? parent.scope_ : getCurrentScope();
|
|
@@ -1284,10 +1326,11 @@ __export(core_exports2, {
|
|
|
1284
1326
|
});
|
|
1285
1327
|
|
|
1286
1328
|
// ../../../node_modules/zod/v4/core/core.js
|
|
1287
|
-
var
|
|
1329
|
+
var _a2;
|
|
1288
1330
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1289
1331
|
status: "aborted"
|
|
1290
1332
|
});
|
|
1333
|
+
// @__NO_SIDE_EFFECTS__
|
|
1291
1334
|
function $constructor(name, initializer3, params) {
|
|
1292
1335
|
function init(inst, def) {
|
|
1293
1336
|
if (!inst._zod) {
|
|
@@ -1316,15 +1359,16 @@ function $constructor(name, initializer3, params) {
|
|
|
1316
1359
|
}
|
|
1317
1360
|
__name(init, "init");
|
|
1318
1361
|
const Parent = params?.Parent ?? Object;
|
|
1319
|
-
class
|
|
1320
|
-
}
|
|
1321
|
-
__name(
|
|
1362
|
+
const _Definition = class _Definition extends Parent {
|
|
1363
|
+
};
|
|
1364
|
+
__name(_Definition, "Definition");
|
|
1365
|
+
let Definition = _Definition;
|
|
1322
1366
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1323
1367
|
function _(def) {
|
|
1324
|
-
var
|
|
1368
|
+
var _a6;
|
|
1325
1369
|
const inst = params?.Parent ? new Definition() : this;
|
|
1326
1370
|
init(inst, def);
|
|
1327
|
-
(
|
|
1371
|
+
(_a6 = inst._zod).deferred ?? (_a6.deferred = []);
|
|
1328
1372
|
for (const fn of inst._zod.deferred) {
|
|
1329
1373
|
fn();
|
|
1330
1374
|
}
|
|
@@ -1333,31 +1377,33 @@ function $constructor(name, initializer3, params) {
|
|
|
1333
1377
|
__name(_, "_");
|
|
1334
1378
|
Object.defineProperty(_, "init", { value: init });
|
|
1335
1379
|
Object.defineProperty(_, Symbol.hasInstance, {
|
|
1336
|
-
value: (inst) => {
|
|
1380
|
+
value: /* @__PURE__ */ __name((inst) => {
|
|
1337
1381
|
if (params?.Parent && inst instanceof params.Parent)
|
|
1338
1382
|
return true;
|
|
1339
1383
|
return inst?._zod?.traits?.has(name);
|
|
1340
|
-
}
|
|
1384
|
+
}, "value")
|
|
1341
1385
|
});
|
|
1342
1386
|
Object.defineProperty(_, "name", { value: name });
|
|
1343
1387
|
return _;
|
|
1344
1388
|
}
|
|
1345
1389
|
__name($constructor, "$constructor");
|
|
1346
1390
|
var $brand = Symbol("zod_brand");
|
|
1347
|
-
var $ZodAsyncError = class extends Error {
|
|
1391
|
+
var _$ZodAsyncError = class _$ZodAsyncError extends Error {
|
|
1348
1392
|
constructor() {
|
|
1349
1393
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
1350
1394
|
}
|
|
1351
1395
|
};
|
|
1352
|
-
__name($ZodAsyncError, "$ZodAsyncError");
|
|
1353
|
-
var $
|
|
1396
|
+
__name(_$ZodAsyncError, "$ZodAsyncError");
|
|
1397
|
+
var $ZodAsyncError = _$ZodAsyncError;
|
|
1398
|
+
var _$ZodEncodeError = class _$ZodEncodeError extends Error {
|
|
1354
1399
|
constructor(name) {
|
|
1355
1400
|
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
1356
1401
|
this.name = "ZodEncodeError";
|
|
1357
1402
|
}
|
|
1358
1403
|
};
|
|
1359
|
-
__name($ZodEncodeError, "$ZodEncodeError");
|
|
1360
|
-
|
|
1404
|
+
__name(_$ZodEncodeError, "$ZodEncodeError");
|
|
1405
|
+
var $ZodEncodeError = _$ZodEncodeError;
|
|
1406
|
+
(_a2 = globalThis).__zod_globalConfig ?? (_a2.__zod_globalConfig = {});
|
|
1361
1407
|
var globalConfig = globalThis.__zod_globalConfig;
|
|
1362
1408
|
function config(newConfig) {
|
|
1363
1409
|
if (newConfig)
|
|
@@ -1517,6 +1563,7 @@ function defineLazy(object2, key, getter) {
|
|
|
1517
1563
|
set(v) {
|
|
1518
1564
|
Object.defineProperty(object2, key, {
|
|
1519
1565
|
value: v
|
|
1566
|
+
// configurable: true,
|
|
1520
1567
|
});
|
|
1521
1568
|
},
|
|
1522
1569
|
configurable: true
|
|
@@ -1713,7 +1760,7 @@ function normalizeParams(_params) {
|
|
|
1713
1760
|
if (!params)
|
|
1714
1761
|
return {};
|
|
1715
1762
|
if (typeof params === "string")
|
|
1716
|
-
return { error: () => params };
|
|
1763
|
+
return { error: /* @__PURE__ */ __name(() => params, "error") };
|
|
1717
1764
|
if (params?.message !== void 0) {
|
|
1718
1765
|
if (params?.error !== void 0)
|
|
1719
1766
|
throw new Error("Cannot specify both `message` and `error` params");
|
|
@@ -1721,7 +1768,7 @@ function normalizeParams(_params) {
|
|
|
1721
1768
|
}
|
|
1722
1769
|
delete params.message;
|
|
1723
1770
|
if (typeof params.error === "string")
|
|
1724
|
-
return { ...params, error: () => params.error };
|
|
1771
|
+
return { ...params, error: /* @__PURE__ */ __name(() => params.error, "error") };
|
|
1725
1772
|
return params;
|
|
1726
1773
|
}
|
|
1727
1774
|
__name(normalizeParams, "normalizeParams");
|
|
@@ -1987,8 +2034,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
1987
2034
|
__name(explicitlyAborted, "explicitlyAborted");
|
|
1988
2035
|
function prefixIssues(path, issues) {
|
|
1989
2036
|
return issues.map((iss) => {
|
|
1990
|
-
var
|
|
1991
|
-
(
|
|
2037
|
+
var _a6;
|
|
2038
|
+
(_a6 = iss).path ?? (_a6.path = []);
|
|
1992
2039
|
iss.path.unshift(path);
|
|
1993
2040
|
return iss;
|
|
1994
2041
|
});
|
|
@@ -2111,11 +2158,12 @@ function uint8ArrayToHex(bytes) {
|
|
|
2111
2158
|
return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
2112
2159
|
}
|
|
2113
2160
|
__name(uint8ArrayToHex, "uint8ArrayToHex");
|
|
2114
|
-
var
|
|
2161
|
+
var _Class = class _Class {
|
|
2115
2162
|
constructor(..._args) {
|
|
2116
2163
|
}
|
|
2117
2164
|
};
|
|
2118
|
-
__name(
|
|
2165
|
+
__name(_Class, "Class");
|
|
2166
|
+
var Class = _Class;
|
|
2119
2167
|
|
|
2120
2168
|
// ../../../node_modules/zod/v4/core/errors.js
|
|
2121
2169
|
var initializer = /* @__PURE__ */ __name((inst, def) => {
|
|
@@ -2130,7 +2178,7 @@ var initializer = /* @__PURE__ */ __name((inst, def) => {
|
|
|
2130
2178
|
});
|
|
2131
2179
|
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
2132
2180
|
Object.defineProperty(inst, "toString", {
|
|
2133
|
-
value: () => inst.message,
|
|
2181
|
+
value: /* @__PURE__ */ __name(() => inst.message, "value"),
|
|
2134
2182
|
enumerable: false
|
|
2135
2183
|
});
|
|
2136
2184
|
}, "initializer");
|
|
@@ -2190,7 +2238,7 @@ __name(formatError, "formatError");
|
|
|
2190
2238
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
2191
2239
|
const result = { errors: [] };
|
|
2192
2240
|
const processError = /* @__PURE__ */ __name((error52, path = []) => {
|
|
2193
|
-
var
|
|
2241
|
+
var _a6, _b;
|
|
2194
2242
|
for (const issue2 of error52.issues) {
|
|
2195
2243
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2196
2244
|
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
@@ -2211,7 +2259,7 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
2211
2259
|
const terminal = i === fullpath.length - 1;
|
|
2212
2260
|
if (typeof el === "string") {
|
|
2213
2261
|
curr.properties ?? (curr.properties = {});
|
|
2214
|
-
(
|
|
2262
|
+
(_a6 = curr.properties)[el] ?? (_a6[el] = { errors: [] });
|
|
2215
2263
|
curr = curr.properties[el];
|
|
2216
2264
|
} else {
|
|
2217
2265
|
curr.items ?? (curr.items = []);
|
|
@@ -2516,10 +2564,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
2516
2564
|
|
|
2517
2565
|
// ../../../node_modules/zod/v4/core/checks.js
|
|
2518
2566
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2519
|
-
var
|
|
2567
|
+
var _a6;
|
|
2520
2568
|
inst._zod ?? (inst._zod = {});
|
|
2521
2569
|
inst._zod.def = def;
|
|
2522
|
-
(
|
|
2570
|
+
(_a6 = inst._zod).onattach ?? (_a6.onattach = []);
|
|
2523
2571
|
});
|
|
2524
2572
|
var numericOriginMap = {
|
|
2525
2573
|
number: "number",
|
|
@@ -2585,8 +2633,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2585
2633
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2586
2634
|
$ZodCheck.init(inst, def);
|
|
2587
2635
|
inst._zod.onattach.push((inst2) => {
|
|
2588
|
-
var
|
|
2589
|
-
(
|
|
2636
|
+
var _a6;
|
|
2637
|
+
(_a6 = inst2._zod.bag).multipleOf ?? (_a6.multipleOf = def.value);
|
|
2590
2638
|
});
|
|
2591
2639
|
inst._zod.check = (payload) => {
|
|
2592
2640
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2719,9 +2767,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
2719
2767
|
};
|
|
2720
2768
|
});
|
|
2721
2769
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2722
|
-
var
|
|
2770
|
+
var _a6;
|
|
2723
2771
|
$ZodCheck.init(inst, def);
|
|
2724
|
-
(
|
|
2772
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2725
2773
|
const val = payload.value;
|
|
2726
2774
|
return !nullish(val) && val.size !== void 0;
|
|
2727
2775
|
});
|
|
@@ -2747,9 +2795,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2747
2795
|
};
|
|
2748
2796
|
});
|
|
2749
2797
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2750
|
-
var
|
|
2798
|
+
var _a6;
|
|
2751
2799
|
$ZodCheck.init(inst, def);
|
|
2752
|
-
(
|
|
2800
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2753
2801
|
const val = payload.value;
|
|
2754
2802
|
return !nullish(val) && val.size !== void 0;
|
|
2755
2803
|
});
|
|
@@ -2775,9 +2823,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2775
2823
|
};
|
|
2776
2824
|
});
|
|
2777
2825
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2778
|
-
var
|
|
2826
|
+
var _a6;
|
|
2779
2827
|
$ZodCheck.init(inst, def);
|
|
2780
|
-
(
|
|
2828
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2781
2829
|
const val = payload.value;
|
|
2782
2830
|
return !nullish(val) && val.size !== void 0;
|
|
2783
2831
|
});
|
|
@@ -2805,9 +2853,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2805
2853
|
};
|
|
2806
2854
|
});
|
|
2807
2855
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2808
|
-
var
|
|
2856
|
+
var _a6;
|
|
2809
2857
|
$ZodCheck.init(inst, def);
|
|
2810
|
-
(
|
|
2858
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2811
2859
|
const val = payload.value;
|
|
2812
2860
|
return !nullish(val) && val.length !== void 0;
|
|
2813
2861
|
});
|
|
@@ -2834,9 +2882,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2834
2882
|
};
|
|
2835
2883
|
});
|
|
2836
2884
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2837
|
-
var
|
|
2885
|
+
var _a6;
|
|
2838
2886
|
$ZodCheck.init(inst, def);
|
|
2839
|
-
(
|
|
2887
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2840
2888
|
const val = payload.value;
|
|
2841
2889
|
return !nullish(val) && val.length !== void 0;
|
|
2842
2890
|
});
|
|
@@ -2863,9 +2911,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2863
2911
|
};
|
|
2864
2912
|
});
|
|
2865
2913
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2866
|
-
var
|
|
2914
|
+
var _a6;
|
|
2867
2915
|
$ZodCheck.init(inst, def);
|
|
2868
|
-
(
|
|
2916
|
+
(_a6 = inst._zod.def).when ?? (_a6.when = (payload) => {
|
|
2869
2917
|
const val = payload.value;
|
|
2870
2918
|
return !nullish(val) && val.length !== void 0;
|
|
2871
2919
|
});
|
|
@@ -2894,7 +2942,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2894
2942
|
};
|
|
2895
2943
|
});
|
|
2896
2944
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2897
|
-
var
|
|
2945
|
+
var _a6, _b;
|
|
2898
2946
|
$ZodCheck.init(inst, def);
|
|
2899
2947
|
inst._zod.onattach.push((inst2) => {
|
|
2900
2948
|
const bag = inst2._zod.bag;
|
|
@@ -2905,7 +2953,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2905
2953
|
}
|
|
2906
2954
|
});
|
|
2907
2955
|
if (def.pattern)
|
|
2908
|
-
(
|
|
2956
|
+
(_a6 = inst._zod).check ?? (_a6.check = (payload) => {
|
|
2909
2957
|
def.pattern.lastIndex = 0;
|
|
2910
2958
|
if (def.pattern.test(payload.value))
|
|
2911
2959
|
return;
|
|
@@ -3064,7 +3112,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
3064
3112
|
});
|
|
3065
3113
|
|
|
3066
3114
|
// ../../../node_modules/zod/v4/core/doc.js
|
|
3067
|
-
var
|
|
3115
|
+
var _Doc = class _Doc {
|
|
3068
3116
|
constructor(args = []) {
|
|
3069
3117
|
this.content = [];
|
|
3070
3118
|
this.indent = 0;
|
|
@@ -3098,7 +3146,8 @@ var Doc = class {
|
|
|
3098
3146
|
return new F(...args, lines.join("\n"));
|
|
3099
3147
|
}
|
|
3100
3148
|
};
|
|
3101
|
-
__name(
|
|
3149
|
+
__name(_Doc, "Doc");
|
|
3150
|
+
var Doc = _Doc;
|
|
3102
3151
|
|
|
3103
3152
|
// ../../../node_modules/zod/v4/core/versions.js
|
|
3104
3153
|
var version = {
|
|
@@ -3109,7 +3158,7 @@ var version = {
|
|
|
3109
3158
|
|
|
3110
3159
|
// ../../../node_modules/zod/v4/core/schemas.js
|
|
3111
3160
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3112
|
-
var
|
|
3161
|
+
var _a6;
|
|
3113
3162
|
inst ?? (inst = {});
|
|
3114
3163
|
inst._zod.def = def;
|
|
3115
3164
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -3124,7 +3173,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3124
3173
|
}
|
|
3125
3174
|
}
|
|
3126
3175
|
if (checks.length === 0) {
|
|
3127
|
-
(
|
|
3176
|
+
(_a6 = inst._zod).deferred ?? (_a6.deferred = []);
|
|
3128
3177
|
inst._zod.deferred?.push(() => {
|
|
3129
3178
|
inst._zod.run = inst._zod.parse;
|
|
3130
3179
|
});
|
|
@@ -3207,14 +3256,14 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3207
3256
|
};
|
|
3208
3257
|
}
|
|
3209
3258
|
defineLazy(inst, "~standard", () => ({
|
|
3210
|
-
validate: (value) => {
|
|
3259
|
+
validate: /* @__PURE__ */ __name((value) => {
|
|
3211
3260
|
try {
|
|
3212
3261
|
const r = safeParse(inst, value);
|
|
3213
3262
|
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
3214
3263
|
} catch (_) {
|
|
3215
3264
|
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
3216
3265
|
}
|
|
3217
|
-
},
|
|
3266
|
+
}, "validate"),
|
|
3218
3267
|
vendor: "zod",
|
|
3219
3268
|
version: 1
|
|
3220
3269
|
}));
|
|
@@ -3857,13 +3906,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3857
3906
|
if (!desc?.get) {
|
|
3858
3907
|
const sh = def.shape;
|
|
3859
3908
|
Object.defineProperty(def, "shape", {
|
|
3860
|
-
get: () => {
|
|
3909
|
+
get: /* @__PURE__ */ __name(() => {
|
|
3861
3910
|
const newSh = { ...sh };
|
|
3862
3911
|
Object.defineProperty(def, "shape", {
|
|
3863
3912
|
value: newSh
|
|
3864
3913
|
});
|
|
3865
3914
|
return newSh;
|
|
3866
|
-
}
|
|
3915
|
+
}, "get")
|
|
3867
3916
|
});
|
|
3868
3917
|
}
|
|
3869
3918
|
const _normalized = cached(() => normalizeDef(def));
|
|
@@ -5211,8 +5260,11 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
5211
5260
|
code: "custom",
|
|
5212
5261
|
input,
|
|
5213
5262
|
inst,
|
|
5263
|
+
// incorporates params.error into issue reporting
|
|
5214
5264
|
path: [...inst._zod.def.path ?? []],
|
|
5265
|
+
// incorporates params.error into issue reporting
|
|
5215
5266
|
continue: !inst._zod.def.abort
|
|
5267
|
+
// params: inst._zod.def.params,
|
|
5216
5268
|
};
|
|
5217
5269
|
if (inst._zod.def.params)
|
|
5218
5270
|
_iss.params = inst._zod.def.params;
|
|
@@ -5874,6 +5926,7 @@ var error5 = /* @__PURE__ */ __name(() => {
|
|
|
5874
5926
|
return `Clau inv\xE0lida a ${issue2.origin}`;
|
|
5875
5927
|
case "invalid_union":
|
|
5876
5928
|
return "Entrada inv\xE0lida";
|
|
5929
|
+
// Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
|
|
5877
5930
|
case "invalid_element":
|
|
5878
5931
|
return `Element inv\xE0lid a ${issue2.origin}`;
|
|
5879
5932
|
default:
|
|
@@ -6388,7 +6441,9 @@ var error10 = /* @__PURE__ */ __name(() => {
|
|
|
6388
6441
|
template_literal: "input"
|
|
6389
6442
|
};
|
|
6390
6443
|
const TypeDictionary = {
|
|
6444
|
+
// Compatibility: "nan" -> "NaN" for display
|
|
6391
6445
|
nan: "NaN"
|
|
6446
|
+
// All other type names omitted - they fall back to raw values via ?? operator
|
|
6392
6447
|
};
|
|
6393
6448
|
return (issue2) => {
|
|
6394
6449
|
switch (issue2.code) {
|
|
@@ -7201,6 +7256,7 @@ var error17 = /* @__PURE__ */ __name(() => {
|
|
|
7201
7256
|
array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
7202
7257
|
set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
7203
7258
|
number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
|
|
7259
|
+
// no unit
|
|
7204
7260
|
};
|
|
7205
7261
|
const typeEntry = /* @__PURE__ */ __name((t) => t ? TypeNames[t] : void 0, "typeEntry");
|
|
7206
7262
|
const typeLabel = /* @__PURE__ */ __name((t) => {
|
|
@@ -11279,10 +11335,10 @@ function yo_default() {
|
|
|
11279
11335
|
__name(yo_default, "default");
|
|
11280
11336
|
|
|
11281
11337
|
// ../../../node_modules/zod/v4/core/registries.js
|
|
11282
|
-
var
|
|
11338
|
+
var _a3;
|
|
11283
11339
|
var $output = Symbol("ZodOutput");
|
|
11284
11340
|
var $input = Symbol("ZodInput");
|
|
11285
|
-
var $ZodRegistry = class {
|
|
11341
|
+
var _$ZodRegistry = class _$ZodRegistry {
|
|
11286
11342
|
constructor() {
|
|
11287
11343
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
11288
11344
|
this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -11322,15 +11378,17 @@ var $ZodRegistry = class {
|
|
|
11322
11378
|
return this._map.has(schema);
|
|
11323
11379
|
}
|
|
11324
11380
|
};
|
|
11325
|
-
__name($ZodRegistry, "$ZodRegistry");
|
|
11381
|
+
__name(_$ZodRegistry, "$ZodRegistry");
|
|
11382
|
+
var $ZodRegistry = _$ZodRegistry;
|
|
11326
11383
|
function registry() {
|
|
11327
11384
|
return new $ZodRegistry();
|
|
11328
11385
|
}
|
|
11329
11386
|
__name(registry, "registry");
|
|
11330
|
-
(
|
|
11387
|
+
(_a3 = globalThis).__zod_globalRegistry ?? (_a3.__zod_globalRegistry = registry());
|
|
11331
11388
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
11332
11389
|
|
|
11333
11390
|
// ../../../node_modules/zod/v4/core/api.js
|
|
11391
|
+
// @__NO_SIDE_EFFECTS__
|
|
11334
11392
|
function _string(Class2, params) {
|
|
11335
11393
|
return new Class2({
|
|
11336
11394
|
type: "string",
|
|
@@ -11338,6 +11396,7 @@ function _string(Class2, params) {
|
|
|
11338
11396
|
});
|
|
11339
11397
|
}
|
|
11340
11398
|
__name(_string, "_string");
|
|
11399
|
+
// @__NO_SIDE_EFFECTS__
|
|
11341
11400
|
function _coercedString(Class2, params) {
|
|
11342
11401
|
return new Class2({
|
|
11343
11402
|
type: "string",
|
|
@@ -11346,6 +11405,7 @@ function _coercedString(Class2, params) {
|
|
|
11346
11405
|
});
|
|
11347
11406
|
}
|
|
11348
11407
|
__name(_coercedString, "_coercedString");
|
|
11408
|
+
// @__NO_SIDE_EFFECTS__
|
|
11349
11409
|
function _email(Class2, params) {
|
|
11350
11410
|
return new Class2({
|
|
11351
11411
|
type: "string",
|
|
@@ -11356,6 +11416,7 @@ function _email(Class2, params) {
|
|
|
11356
11416
|
});
|
|
11357
11417
|
}
|
|
11358
11418
|
__name(_email, "_email");
|
|
11419
|
+
// @__NO_SIDE_EFFECTS__
|
|
11359
11420
|
function _guid(Class2, params) {
|
|
11360
11421
|
return new Class2({
|
|
11361
11422
|
type: "string",
|
|
@@ -11366,6 +11427,7 @@ function _guid(Class2, params) {
|
|
|
11366
11427
|
});
|
|
11367
11428
|
}
|
|
11368
11429
|
__name(_guid, "_guid");
|
|
11430
|
+
// @__NO_SIDE_EFFECTS__
|
|
11369
11431
|
function _uuid(Class2, params) {
|
|
11370
11432
|
return new Class2({
|
|
11371
11433
|
type: "string",
|
|
@@ -11376,6 +11438,7 @@ function _uuid(Class2, params) {
|
|
|
11376
11438
|
});
|
|
11377
11439
|
}
|
|
11378
11440
|
__name(_uuid, "_uuid");
|
|
11441
|
+
// @__NO_SIDE_EFFECTS__
|
|
11379
11442
|
function _uuidv4(Class2, params) {
|
|
11380
11443
|
return new Class2({
|
|
11381
11444
|
type: "string",
|
|
@@ -11387,6 +11450,7 @@ function _uuidv4(Class2, params) {
|
|
|
11387
11450
|
});
|
|
11388
11451
|
}
|
|
11389
11452
|
__name(_uuidv4, "_uuidv4");
|
|
11453
|
+
// @__NO_SIDE_EFFECTS__
|
|
11390
11454
|
function _uuidv6(Class2, params) {
|
|
11391
11455
|
return new Class2({
|
|
11392
11456
|
type: "string",
|
|
@@ -11398,6 +11462,7 @@ function _uuidv6(Class2, params) {
|
|
|
11398
11462
|
});
|
|
11399
11463
|
}
|
|
11400
11464
|
__name(_uuidv6, "_uuidv6");
|
|
11465
|
+
// @__NO_SIDE_EFFECTS__
|
|
11401
11466
|
function _uuidv7(Class2, params) {
|
|
11402
11467
|
return new Class2({
|
|
11403
11468
|
type: "string",
|
|
@@ -11409,6 +11474,7 @@ function _uuidv7(Class2, params) {
|
|
|
11409
11474
|
});
|
|
11410
11475
|
}
|
|
11411
11476
|
__name(_uuidv7, "_uuidv7");
|
|
11477
|
+
// @__NO_SIDE_EFFECTS__
|
|
11412
11478
|
function _url(Class2, params) {
|
|
11413
11479
|
return new Class2({
|
|
11414
11480
|
type: "string",
|
|
@@ -11419,6 +11485,7 @@ function _url(Class2, params) {
|
|
|
11419
11485
|
});
|
|
11420
11486
|
}
|
|
11421
11487
|
__name(_url, "_url");
|
|
11488
|
+
// @__NO_SIDE_EFFECTS__
|
|
11422
11489
|
function _emoji2(Class2, params) {
|
|
11423
11490
|
return new Class2({
|
|
11424
11491
|
type: "string",
|
|
@@ -11429,6 +11496,7 @@ function _emoji2(Class2, params) {
|
|
|
11429
11496
|
});
|
|
11430
11497
|
}
|
|
11431
11498
|
__name(_emoji2, "_emoji");
|
|
11499
|
+
// @__NO_SIDE_EFFECTS__
|
|
11432
11500
|
function _nanoid(Class2, params) {
|
|
11433
11501
|
return new Class2({
|
|
11434
11502
|
type: "string",
|
|
@@ -11439,6 +11507,7 @@ function _nanoid(Class2, params) {
|
|
|
11439
11507
|
});
|
|
11440
11508
|
}
|
|
11441
11509
|
__name(_nanoid, "_nanoid");
|
|
11510
|
+
// @__NO_SIDE_EFFECTS__
|
|
11442
11511
|
function _cuid(Class2, params) {
|
|
11443
11512
|
return new Class2({
|
|
11444
11513
|
type: "string",
|
|
@@ -11449,6 +11518,7 @@ function _cuid(Class2, params) {
|
|
|
11449
11518
|
});
|
|
11450
11519
|
}
|
|
11451
11520
|
__name(_cuid, "_cuid");
|
|
11521
|
+
// @__NO_SIDE_EFFECTS__
|
|
11452
11522
|
function _cuid2(Class2, params) {
|
|
11453
11523
|
return new Class2({
|
|
11454
11524
|
type: "string",
|
|
@@ -11459,6 +11529,7 @@ function _cuid2(Class2, params) {
|
|
|
11459
11529
|
});
|
|
11460
11530
|
}
|
|
11461
11531
|
__name(_cuid2, "_cuid2");
|
|
11532
|
+
// @__NO_SIDE_EFFECTS__
|
|
11462
11533
|
function _ulid(Class2, params) {
|
|
11463
11534
|
return new Class2({
|
|
11464
11535
|
type: "string",
|
|
@@ -11469,6 +11540,7 @@ function _ulid(Class2, params) {
|
|
|
11469
11540
|
});
|
|
11470
11541
|
}
|
|
11471
11542
|
__name(_ulid, "_ulid");
|
|
11543
|
+
// @__NO_SIDE_EFFECTS__
|
|
11472
11544
|
function _xid(Class2, params) {
|
|
11473
11545
|
return new Class2({
|
|
11474
11546
|
type: "string",
|
|
@@ -11479,6 +11551,7 @@ function _xid(Class2, params) {
|
|
|
11479
11551
|
});
|
|
11480
11552
|
}
|
|
11481
11553
|
__name(_xid, "_xid");
|
|
11554
|
+
// @__NO_SIDE_EFFECTS__
|
|
11482
11555
|
function _ksuid(Class2, params) {
|
|
11483
11556
|
return new Class2({
|
|
11484
11557
|
type: "string",
|
|
@@ -11489,6 +11562,7 @@ function _ksuid(Class2, params) {
|
|
|
11489
11562
|
});
|
|
11490
11563
|
}
|
|
11491
11564
|
__name(_ksuid, "_ksuid");
|
|
11565
|
+
// @__NO_SIDE_EFFECTS__
|
|
11492
11566
|
function _ipv4(Class2, params) {
|
|
11493
11567
|
return new Class2({
|
|
11494
11568
|
type: "string",
|
|
@@ -11499,6 +11573,7 @@ function _ipv4(Class2, params) {
|
|
|
11499
11573
|
});
|
|
11500
11574
|
}
|
|
11501
11575
|
__name(_ipv4, "_ipv4");
|
|
11576
|
+
// @__NO_SIDE_EFFECTS__
|
|
11502
11577
|
function _ipv6(Class2, params) {
|
|
11503
11578
|
return new Class2({
|
|
11504
11579
|
type: "string",
|
|
@@ -11509,6 +11584,7 @@ function _ipv6(Class2, params) {
|
|
|
11509
11584
|
});
|
|
11510
11585
|
}
|
|
11511
11586
|
__name(_ipv6, "_ipv6");
|
|
11587
|
+
// @__NO_SIDE_EFFECTS__
|
|
11512
11588
|
function _mac(Class2, params) {
|
|
11513
11589
|
return new Class2({
|
|
11514
11590
|
type: "string",
|
|
@@ -11519,6 +11595,7 @@ function _mac(Class2, params) {
|
|
|
11519
11595
|
});
|
|
11520
11596
|
}
|
|
11521
11597
|
__name(_mac, "_mac");
|
|
11598
|
+
// @__NO_SIDE_EFFECTS__
|
|
11522
11599
|
function _cidrv4(Class2, params) {
|
|
11523
11600
|
return new Class2({
|
|
11524
11601
|
type: "string",
|
|
@@ -11529,6 +11606,7 @@ function _cidrv4(Class2, params) {
|
|
|
11529
11606
|
});
|
|
11530
11607
|
}
|
|
11531
11608
|
__name(_cidrv4, "_cidrv4");
|
|
11609
|
+
// @__NO_SIDE_EFFECTS__
|
|
11532
11610
|
function _cidrv6(Class2, params) {
|
|
11533
11611
|
return new Class2({
|
|
11534
11612
|
type: "string",
|
|
@@ -11539,6 +11617,7 @@ function _cidrv6(Class2, params) {
|
|
|
11539
11617
|
});
|
|
11540
11618
|
}
|
|
11541
11619
|
__name(_cidrv6, "_cidrv6");
|
|
11620
|
+
// @__NO_SIDE_EFFECTS__
|
|
11542
11621
|
function _base64(Class2, params) {
|
|
11543
11622
|
return new Class2({
|
|
11544
11623
|
type: "string",
|
|
@@ -11549,6 +11628,7 @@ function _base64(Class2, params) {
|
|
|
11549
11628
|
});
|
|
11550
11629
|
}
|
|
11551
11630
|
__name(_base64, "_base64");
|
|
11631
|
+
// @__NO_SIDE_EFFECTS__
|
|
11552
11632
|
function _base64url(Class2, params) {
|
|
11553
11633
|
return new Class2({
|
|
11554
11634
|
type: "string",
|
|
@@ -11559,6 +11639,7 @@ function _base64url(Class2, params) {
|
|
|
11559
11639
|
});
|
|
11560
11640
|
}
|
|
11561
11641
|
__name(_base64url, "_base64url");
|
|
11642
|
+
// @__NO_SIDE_EFFECTS__
|
|
11562
11643
|
function _e164(Class2, params) {
|
|
11563
11644
|
return new Class2({
|
|
11564
11645
|
type: "string",
|
|
@@ -11569,6 +11650,7 @@ function _e164(Class2, params) {
|
|
|
11569
11650
|
});
|
|
11570
11651
|
}
|
|
11571
11652
|
__name(_e164, "_e164");
|
|
11653
|
+
// @__NO_SIDE_EFFECTS__
|
|
11572
11654
|
function _jwt(Class2, params) {
|
|
11573
11655
|
return new Class2({
|
|
11574
11656
|
type: "string",
|
|
@@ -11586,6 +11668,7 @@ var TimePrecision = {
|
|
|
11586
11668
|
Millisecond: 3,
|
|
11587
11669
|
Microsecond: 6
|
|
11588
11670
|
};
|
|
11671
|
+
// @__NO_SIDE_EFFECTS__
|
|
11589
11672
|
function _isoDateTime(Class2, params) {
|
|
11590
11673
|
return new Class2({
|
|
11591
11674
|
type: "string",
|
|
@@ -11598,6 +11681,7 @@ function _isoDateTime(Class2, params) {
|
|
|
11598
11681
|
});
|
|
11599
11682
|
}
|
|
11600
11683
|
__name(_isoDateTime, "_isoDateTime");
|
|
11684
|
+
// @__NO_SIDE_EFFECTS__
|
|
11601
11685
|
function _isoDate(Class2, params) {
|
|
11602
11686
|
return new Class2({
|
|
11603
11687
|
type: "string",
|
|
@@ -11607,6 +11691,7 @@ function _isoDate(Class2, params) {
|
|
|
11607
11691
|
});
|
|
11608
11692
|
}
|
|
11609
11693
|
__name(_isoDate, "_isoDate");
|
|
11694
|
+
// @__NO_SIDE_EFFECTS__
|
|
11610
11695
|
function _isoTime(Class2, params) {
|
|
11611
11696
|
return new Class2({
|
|
11612
11697
|
type: "string",
|
|
@@ -11617,6 +11702,7 @@ function _isoTime(Class2, params) {
|
|
|
11617
11702
|
});
|
|
11618
11703
|
}
|
|
11619
11704
|
__name(_isoTime, "_isoTime");
|
|
11705
|
+
// @__NO_SIDE_EFFECTS__
|
|
11620
11706
|
function _isoDuration(Class2, params) {
|
|
11621
11707
|
return new Class2({
|
|
11622
11708
|
type: "string",
|
|
@@ -11626,6 +11712,7 @@ function _isoDuration(Class2, params) {
|
|
|
11626
11712
|
});
|
|
11627
11713
|
}
|
|
11628
11714
|
__name(_isoDuration, "_isoDuration");
|
|
11715
|
+
// @__NO_SIDE_EFFECTS__
|
|
11629
11716
|
function _number(Class2, params) {
|
|
11630
11717
|
return new Class2({
|
|
11631
11718
|
type: "number",
|
|
@@ -11634,6 +11721,7 @@ function _number(Class2, params) {
|
|
|
11634
11721
|
});
|
|
11635
11722
|
}
|
|
11636
11723
|
__name(_number, "_number");
|
|
11724
|
+
// @__NO_SIDE_EFFECTS__
|
|
11637
11725
|
function _coercedNumber(Class2, params) {
|
|
11638
11726
|
return new Class2({
|
|
11639
11727
|
type: "number",
|
|
@@ -11643,6 +11731,7 @@ function _coercedNumber(Class2, params) {
|
|
|
11643
11731
|
});
|
|
11644
11732
|
}
|
|
11645
11733
|
__name(_coercedNumber, "_coercedNumber");
|
|
11734
|
+
// @__NO_SIDE_EFFECTS__
|
|
11646
11735
|
function _int(Class2, params) {
|
|
11647
11736
|
return new Class2({
|
|
11648
11737
|
type: "number",
|
|
@@ -11653,6 +11742,7 @@ function _int(Class2, params) {
|
|
|
11653
11742
|
});
|
|
11654
11743
|
}
|
|
11655
11744
|
__name(_int, "_int");
|
|
11745
|
+
// @__NO_SIDE_EFFECTS__
|
|
11656
11746
|
function _float32(Class2, params) {
|
|
11657
11747
|
return new Class2({
|
|
11658
11748
|
type: "number",
|
|
@@ -11663,6 +11753,7 @@ function _float32(Class2, params) {
|
|
|
11663
11753
|
});
|
|
11664
11754
|
}
|
|
11665
11755
|
__name(_float32, "_float32");
|
|
11756
|
+
// @__NO_SIDE_EFFECTS__
|
|
11666
11757
|
function _float64(Class2, params) {
|
|
11667
11758
|
return new Class2({
|
|
11668
11759
|
type: "number",
|
|
@@ -11673,6 +11764,7 @@ function _float64(Class2, params) {
|
|
|
11673
11764
|
});
|
|
11674
11765
|
}
|
|
11675
11766
|
__name(_float64, "_float64");
|
|
11767
|
+
// @__NO_SIDE_EFFECTS__
|
|
11676
11768
|
function _int32(Class2, params) {
|
|
11677
11769
|
return new Class2({
|
|
11678
11770
|
type: "number",
|
|
@@ -11683,6 +11775,7 @@ function _int32(Class2, params) {
|
|
|
11683
11775
|
});
|
|
11684
11776
|
}
|
|
11685
11777
|
__name(_int32, "_int32");
|
|
11778
|
+
// @__NO_SIDE_EFFECTS__
|
|
11686
11779
|
function _uint32(Class2, params) {
|
|
11687
11780
|
return new Class2({
|
|
11688
11781
|
type: "number",
|
|
@@ -11693,6 +11786,7 @@ function _uint32(Class2, params) {
|
|
|
11693
11786
|
});
|
|
11694
11787
|
}
|
|
11695
11788
|
__name(_uint32, "_uint32");
|
|
11789
|
+
// @__NO_SIDE_EFFECTS__
|
|
11696
11790
|
function _boolean(Class2, params) {
|
|
11697
11791
|
return new Class2({
|
|
11698
11792
|
type: "boolean",
|
|
@@ -11700,6 +11794,7 @@ function _boolean(Class2, params) {
|
|
|
11700
11794
|
});
|
|
11701
11795
|
}
|
|
11702
11796
|
__name(_boolean, "_boolean");
|
|
11797
|
+
// @__NO_SIDE_EFFECTS__
|
|
11703
11798
|
function _coercedBoolean(Class2, params) {
|
|
11704
11799
|
return new Class2({
|
|
11705
11800
|
type: "boolean",
|
|
@@ -11708,6 +11803,7 @@ function _coercedBoolean(Class2, params) {
|
|
|
11708
11803
|
});
|
|
11709
11804
|
}
|
|
11710
11805
|
__name(_coercedBoolean, "_coercedBoolean");
|
|
11806
|
+
// @__NO_SIDE_EFFECTS__
|
|
11711
11807
|
function _bigint(Class2, params) {
|
|
11712
11808
|
return new Class2({
|
|
11713
11809
|
type: "bigint",
|
|
@@ -11715,6 +11811,7 @@ function _bigint(Class2, params) {
|
|
|
11715
11811
|
});
|
|
11716
11812
|
}
|
|
11717
11813
|
__name(_bigint, "_bigint");
|
|
11814
|
+
// @__NO_SIDE_EFFECTS__
|
|
11718
11815
|
function _coercedBigint(Class2, params) {
|
|
11719
11816
|
return new Class2({
|
|
11720
11817
|
type: "bigint",
|
|
@@ -11723,6 +11820,7 @@ function _coercedBigint(Class2, params) {
|
|
|
11723
11820
|
});
|
|
11724
11821
|
}
|
|
11725
11822
|
__name(_coercedBigint, "_coercedBigint");
|
|
11823
|
+
// @__NO_SIDE_EFFECTS__
|
|
11726
11824
|
function _int64(Class2, params) {
|
|
11727
11825
|
return new Class2({
|
|
11728
11826
|
type: "bigint",
|
|
@@ -11733,6 +11831,7 @@ function _int64(Class2, params) {
|
|
|
11733
11831
|
});
|
|
11734
11832
|
}
|
|
11735
11833
|
__name(_int64, "_int64");
|
|
11834
|
+
// @__NO_SIDE_EFFECTS__
|
|
11736
11835
|
function _uint64(Class2, params) {
|
|
11737
11836
|
return new Class2({
|
|
11738
11837
|
type: "bigint",
|
|
@@ -11743,6 +11842,7 @@ function _uint64(Class2, params) {
|
|
|
11743
11842
|
});
|
|
11744
11843
|
}
|
|
11745
11844
|
__name(_uint64, "_uint64");
|
|
11845
|
+
// @__NO_SIDE_EFFECTS__
|
|
11746
11846
|
function _symbol(Class2, params) {
|
|
11747
11847
|
return new Class2({
|
|
11748
11848
|
type: "symbol",
|
|
@@ -11750,6 +11850,7 @@ function _symbol(Class2, params) {
|
|
|
11750
11850
|
});
|
|
11751
11851
|
}
|
|
11752
11852
|
__name(_symbol, "_symbol");
|
|
11853
|
+
// @__NO_SIDE_EFFECTS__
|
|
11753
11854
|
function _undefined2(Class2, params) {
|
|
11754
11855
|
return new Class2({
|
|
11755
11856
|
type: "undefined",
|
|
@@ -11757,6 +11858,7 @@ function _undefined2(Class2, params) {
|
|
|
11757
11858
|
});
|
|
11758
11859
|
}
|
|
11759
11860
|
__name(_undefined2, "_undefined");
|
|
11861
|
+
// @__NO_SIDE_EFFECTS__
|
|
11760
11862
|
function _null2(Class2, params) {
|
|
11761
11863
|
return new Class2({
|
|
11762
11864
|
type: "null",
|
|
@@ -11764,18 +11866,21 @@ function _null2(Class2, params) {
|
|
|
11764
11866
|
});
|
|
11765
11867
|
}
|
|
11766
11868
|
__name(_null2, "_null");
|
|
11869
|
+
// @__NO_SIDE_EFFECTS__
|
|
11767
11870
|
function _any(Class2) {
|
|
11768
11871
|
return new Class2({
|
|
11769
11872
|
type: "any"
|
|
11770
11873
|
});
|
|
11771
11874
|
}
|
|
11772
11875
|
__name(_any, "_any");
|
|
11876
|
+
// @__NO_SIDE_EFFECTS__
|
|
11773
11877
|
function _unknown(Class2) {
|
|
11774
11878
|
return new Class2({
|
|
11775
11879
|
type: "unknown"
|
|
11776
11880
|
});
|
|
11777
11881
|
}
|
|
11778
11882
|
__name(_unknown, "_unknown");
|
|
11883
|
+
// @__NO_SIDE_EFFECTS__
|
|
11779
11884
|
function _never(Class2, params) {
|
|
11780
11885
|
return new Class2({
|
|
11781
11886
|
type: "never",
|
|
@@ -11783,6 +11888,7 @@ function _never(Class2, params) {
|
|
|
11783
11888
|
});
|
|
11784
11889
|
}
|
|
11785
11890
|
__name(_never, "_never");
|
|
11891
|
+
// @__NO_SIDE_EFFECTS__
|
|
11786
11892
|
function _void(Class2, params) {
|
|
11787
11893
|
return new Class2({
|
|
11788
11894
|
type: "void",
|
|
@@ -11790,6 +11896,7 @@ function _void(Class2, params) {
|
|
|
11790
11896
|
});
|
|
11791
11897
|
}
|
|
11792
11898
|
__name(_void, "_void");
|
|
11899
|
+
// @__NO_SIDE_EFFECTS__
|
|
11793
11900
|
function _date(Class2, params) {
|
|
11794
11901
|
return new Class2({
|
|
11795
11902
|
type: "date",
|
|
@@ -11797,6 +11904,7 @@ function _date(Class2, params) {
|
|
|
11797
11904
|
});
|
|
11798
11905
|
}
|
|
11799
11906
|
__name(_date, "_date");
|
|
11907
|
+
// @__NO_SIDE_EFFECTS__
|
|
11800
11908
|
function _coercedDate(Class2, params) {
|
|
11801
11909
|
return new Class2({
|
|
11802
11910
|
type: "date",
|
|
@@ -11805,6 +11913,7 @@ function _coercedDate(Class2, params) {
|
|
|
11805
11913
|
});
|
|
11806
11914
|
}
|
|
11807
11915
|
__name(_coercedDate, "_coercedDate");
|
|
11916
|
+
// @__NO_SIDE_EFFECTS__
|
|
11808
11917
|
function _nan(Class2, params) {
|
|
11809
11918
|
return new Class2({
|
|
11810
11919
|
type: "nan",
|
|
@@ -11812,6 +11921,7 @@ function _nan(Class2, params) {
|
|
|
11812
11921
|
});
|
|
11813
11922
|
}
|
|
11814
11923
|
__name(_nan, "_nan");
|
|
11924
|
+
// @__NO_SIDE_EFFECTS__
|
|
11815
11925
|
function _lt(value, params) {
|
|
11816
11926
|
return new $ZodCheckLessThan({
|
|
11817
11927
|
check: "less_than",
|
|
@@ -11821,6 +11931,7 @@ function _lt(value, params) {
|
|
|
11821
11931
|
});
|
|
11822
11932
|
}
|
|
11823
11933
|
__name(_lt, "_lt");
|
|
11934
|
+
// @__NO_SIDE_EFFECTS__
|
|
11824
11935
|
function _lte(value, params) {
|
|
11825
11936
|
return new $ZodCheckLessThan({
|
|
11826
11937
|
check: "less_than",
|
|
@@ -11830,6 +11941,7 @@ function _lte(value, params) {
|
|
|
11830
11941
|
});
|
|
11831
11942
|
}
|
|
11832
11943
|
__name(_lte, "_lte");
|
|
11944
|
+
// @__NO_SIDE_EFFECTS__
|
|
11833
11945
|
function _gt(value, params) {
|
|
11834
11946
|
return new $ZodCheckGreaterThan({
|
|
11835
11947
|
check: "greater_than",
|
|
@@ -11839,6 +11951,7 @@ function _gt(value, params) {
|
|
|
11839
11951
|
});
|
|
11840
11952
|
}
|
|
11841
11953
|
__name(_gt, "_gt");
|
|
11954
|
+
// @__NO_SIDE_EFFECTS__
|
|
11842
11955
|
function _gte(value, params) {
|
|
11843
11956
|
return new $ZodCheckGreaterThan({
|
|
11844
11957
|
check: "greater_than",
|
|
@@ -11848,22 +11961,27 @@ function _gte(value, params) {
|
|
|
11848
11961
|
});
|
|
11849
11962
|
}
|
|
11850
11963
|
__name(_gte, "_gte");
|
|
11964
|
+
// @__NO_SIDE_EFFECTS__
|
|
11851
11965
|
function _positive(params) {
|
|
11852
|
-
return _gt(0, params);
|
|
11966
|
+
return /* @__PURE__ */ _gt(0, params);
|
|
11853
11967
|
}
|
|
11854
11968
|
__name(_positive, "_positive");
|
|
11969
|
+
// @__NO_SIDE_EFFECTS__
|
|
11855
11970
|
function _negative(params) {
|
|
11856
|
-
return _lt(0, params);
|
|
11971
|
+
return /* @__PURE__ */ _lt(0, params);
|
|
11857
11972
|
}
|
|
11858
11973
|
__name(_negative, "_negative");
|
|
11974
|
+
// @__NO_SIDE_EFFECTS__
|
|
11859
11975
|
function _nonpositive(params) {
|
|
11860
|
-
return _lte(0, params);
|
|
11976
|
+
return /* @__PURE__ */ _lte(0, params);
|
|
11861
11977
|
}
|
|
11862
11978
|
__name(_nonpositive, "_nonpositive");
|
|
11979
|
+
// @__NO_SIDE_EFFECTS__
|
|
11863
11980
|
function _nonnegative(params) {
|
|
11864
|
-
return _gte(0, params);
|
|
11981
|
+
return /* @__PURE__ */ _gte(0, params);
|
|
11865
11982
|
}
|
|
11866
11983
|
__name(_nonnegative, "_nonnegative");
|
|
11984
|
+
// @__NO_SIDE_EFFECTS__
|
|
11867
11985
|
function _multipleOf(value, params) {
|
|
11868
11986
|
return new $ZodCheckMultipleOf({
|
|
11869
11987
|
check: "multiple_of",
|
|
@@ -11872,6 +11990,7 @@ function _multipleOf(value, params) {
|
|
|
11872
11990
|
});
|
|
11873
11991
|
}
|
|
11874
11992
|
__name(_multipleOf, "_multipleOf");
|
|
11993
|
+
// @__NO_SIDE_EFFECTS__
|
|
11875
11994
|
function _maxSize(maximum, params) {
|
|
11876
11995
|
return new $ZodCheckMaxSize({
|
|
11877
11996
|
check: "max_size",
|
|
@@ -11880,6 +11999,7 @@ function _maxSize(maximum, params) {
|
|
|
11880
11999
|
});
|
|
11881
12000
|
}
|
|
11882
12001
|
__name(_maxSize, "_maxSize");
|
|
12002
|
+
// @__NO_SIDE_EFFECTS__
|
|
11883
12003
|
function _minSize(minimum, params) {
|
|
11884
12004
|
return new $ZodCheckMinSize({
|
|
11885
12005
|
check: "min_size",
|
|
@@ -11888,6 +12008,7 @@ function _minSize(minimum, params) {
|
|
|
11888
12008
|
});
|
|
11889
12009
|
}
|
|
11890
12010
|
__name(_minSize, "_minSize");
|
|
12011
|
+
// @__NO_SIDE_EFFECTS__
|
|
11891
12012
|
function _size(size, params) {
|
|
11892
12013
|
return new $ZodCheckSizeEquals({
|
|
11893
12014
|
check: "size_equals",
|
|
@@ -11896,6 +12017,7 @@ function _size(size, params) {
|
|
|
11896
12017
|
});
|
|
11897
12018
|
}
|
|
11898
12019
|
__name(_size, "_size");
|
|
12020
|
+
// @__NO_SIDE_EFFECTS__
|
|
11899
12021
|
function _maxLength(maximum, params) {
|
|
11900
12022
|
const ch = new $ZodCheckMaxLength({
|
|
11901
12023
|
check: "max_length",
|
|
@@ -11905,6 +12027,7 @@ function _maxLength(maximum, params) {
|
|
|
11905
12027
|
return ch;
|
|
11906
12028
|
}
|
|
11907
12029
|
__name(_maxLength, "_maxLength");
|
|
12030
|
+
// @__NO_SIDE_EFFECTS__
|
|
11908
12031
|
function _minLength(minimum, params) {
|
|
11909
12032
|
return new $ZodCheckMinLength({
|
|
11910
12033
|
check: "min_length",
|
|
@@ -11913,6 +12036,7 @@ function _minLength(minimum, params) {
|
|
|
11913
12036
|
});
|
|
11914
12037
|
}
|
|
11915
12038
|
__name(_minLength, "_minLength");
|
|
12039
|
+
// @__NO_SIDE_EFFECTS__
|
|
11916
12040
|
function _length(length, params) {
|
|
11917
12041
|
return new $ZodCheckLengthEquals({
|
|
11918
12042
|
check: "length_equals",
|
|
@@ -11921,6 +12045,7 @@ function _length(length, params) {
|
|
|
11921
12045
|
});
|
|
11922
12046
|
}
|
|
11923
12047
|
__name(_length, "_length");
|
|
12048
|
+
// @__NO_SIDE_EFFECTS__
|
|
11924
12049
|
function _regex(pattern, params) {
|
|
11925
12050
|
return new $ZodCheckRegex({
|
|
11926
12051
|
check: "string_format",
|
|
@@ -11930,6 +12055,7 @@ function _regex(pattern, params) {
|
|
|
11930
12055
|
});
|
|
11931
12056
|
}
|
|
11932
12057
|
__name(_regex, "_regex");
|
|
12058
|
+
// @__NO_SIDE_EFFECTS__
|
|
11933
12059
|
function _lowercase(params) {
|
|
11934
12060
|
return new $ZodCheckLowerCase({
|
|
11935
12061
|
check: "string_format",
|
|
@@ -11938,6 +12064,7 @@ function _lowercase(params) {
|
|
|
11938
12064
|
});
|
|
11939
12065
|
}
|
|
11940
12066
|
__name(_lowercase, "_lowercase");
|
|
12067
|
+
// @__NO_SIDE_EFFECTS__
|
|
11941
12068
|
function _uppercase(params) {
|
|
11942
12069
|
return new $ZodCheckUpperCase({
|
|
11943
12070
|
check: "string_format",
|
|
@@ -11946,6 +12073,7 @@ function _uppercase(params) {
|
|
|
11946
12073
|
});
|
|
11947
12074
|
}
|
|
11948
12075
|
__name(_uppercase, "_uppercase");
|
|
12076
|
+
// @__NO_SIDE_EFFECTS__
|
|
11949
12077
|
function _includes(includes, params) {
|
|
11950
12078
|
return new $ZodCheckIncludes({
|
|
11951
12079
|
check: "string_format",
|
|
@@ -11955,6 +12083,7 @@ function _includes(includes, params) {
|
|
|
11955
12083
|
});
|
|
11956
12084
|
}
|
|
11957
12085
|
__name(_includes, "_includes");
|
|
12086
|
+
// @__NO_SIDE_EFFECTS__
|
|
11958
12087
|
function _startsWith(prefix, params) {
|
|
11959
12088
|
return new $ZodCheckStartsWith({
|
|
11960
12089
|
check: "string_format",
|
|
@@ -11964,6 +12093,7 @@ function _startsWith(prefix, params) {
|
|
|
11964
12093
|
});
|
|
11965
12094
|
}
|
|
11966
12095
|
__name(_startsWith, "_startsWith");
|
|
12096
|
+
// @__NO_SIDE_EFFECTS__
|
|
11967
12097
|
function _endsWith(suffix, params) {
|
|
11968
12098
|
return new $ZodCheckEndsWith({
|
|
11969
12099
|
check: "string_format",
|
|
@@ -11973,6 +12103,7 @@ function _endsWith(suffix, params) {
|
|
|
11973
12103
|
});
|
|
11974
12104
|
}
|
|
11975
12105
|
__name(_endsWith, "_endsWith");
|
|
12106
|
+
// @__NO_SIDE_EFFECTS__
|
|
11976
12107
|
function _property(property, schema, params) {
|
|
11977
12108
|
return new $ZodCheckProperty({
|
|
11978
12109
|
check: "property",
|
|
@@ -11982,6 +12113,7 @@ function _property(property, schema, params) {
|
|
|
11982
12113
|
});
|
|
11983
12114
|
}
|
|
11984
12115
|
__name(_property, "_property");
|
|
12116
|
+
// @__NO_SIDE_EFFECTS__
|
|
11985
12117
|
function _mime(types, params) {
|
|
11986
12118
|
return new $ZodCheckMimeType({
|
|
11987
12119
|
check: "mime_type",
|
|
@@ -11990,6 +12122,7 @@ function _mime(types, params) {
|
|
|
11990
12122
|
});
|
|
11991
12123
|
}
|
|
11992
12124
|
__name(_mime, "_mime");
|
|
12125
|
+
// @__NO_SIDE_EFFECTS__
|
|
11993
12126
|
function _overwrite(tx) {
|
|
11994
12127
|
return new $ZodCheckOverwrite({
|
|
11995
12128
|
check: "overwrite",
|
|
@@ -11997,34 +12130,44 @@ function _overwrite(tx) {
|
|
|
11997
12130
|
});
|
|
11998
12131
|
}
|
|
11999
12132
|
__name(_overwrite, "_overwrite");
|
|
12133
|
+
// @__NO_SIDE_EFFECTS__
|
|
12000
12134
|
function _normalize(form) {
|
|
12001
|
-
return _overwrite((input) => input.normalize(form));
|
|
12135
|
+
return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
|
|
12002
12136
|
}
|
|
12003
12137
|
__name(_normalize, "_normalize");
|
|
12138
|
+
// @__NO_SIDE_EFFECTS__
|
|
12004
12139
|
function _trim() {
|
|
12005
|
-
return _overwrite((input) => input.trim());
|
|
12140
|
+
return /* @__PURE__ */ _overwrite((input) => input.trim());
|
|
12006
12141
|
}
|
|
12007
12142
|
__name(_trim, "_trim");
|
|
12143
|
+
// @__NO_SIDE_EFFECTS__
|
|
12008
12144
|
function _toLowerCase() {
|
|
12009
|
-
return _overwrite((input) => input.toLowerCase());
|
|
12145
|
+
return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
|
|
12010
12146
|
}
|
|
12011
12147
|
__name(_toLowerCase, "_toLowerCase");
|
|
12148
|
+
// @__NO_SIDE_EFFECTS__
|
|
12012
12149
|
function _toUpperCase() {
|
|
12013
|
-
return _overwrite((input) => input.toUpperCase());
|
|
12150
|
+
return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
|
|
12014
12151
|
}
|
|
12015
12152
|
__name(_toUpperCase, "_toUpperCase");
|
|
12153
|
+
// @__NO_SIDE_EFFECTS__
|
|
12016
12154
|
function _slugify() {
|
|
12017
|
-
return _overwrite((input) => slugify(input));
|
|
12155
|
+
return /* @__PURE__ */ _overwrite((input) => slugify(input));
|
|
12018
12156
|
}
|
|
12019
12157
|
__name(_slugify, "_slugify");
|
|
12158
|
+
// @__NO_SIDE_EFFECTS__
|
|
12020
12159
|
function _array(Class2, element, params) {
|
|
12021
12160
|
return new Class2({
|
|
12022
12161
|
type: "array",
|
|
12023
12162
|
element,
|
|
12163
|
+
// get element() {
|
|
12164
|
+
// return element;
|
|
12165
|
+
// },
|
|
12024
12166
|
...normalizeParams(params)
|
|
12025
12167
|
});
|
|
12026
12168
|
}
|
|
12027
12169
|
__name(_array, "_array");
|
|
12170
|
+
// @__NO_SIDE_EFFECTS__
|
|
12028
12171
|
function _union(Class2, options, params) {
|
|
12029
12172
|
return new Class2({
|
|
12030
12173
|
type: "union",
|
|
@@ -12042,6 +12185,7 @@ function _xor(Class2, options, params) {
|
|
|
12042
12185
|
});
|
|
12043
12186
|
}
|
|
12044
12187
|
__name(_xor, "_xor");
|
|
12188
|
+
// @__NO_SIDE_EFFECTS__
|
|
12045
12189
|
function _discriminatedUnion(Class2, discriminator, options, params) {
|
|
12046
12190
|
return new Class2({
|
|
12047
12191
|
type: "union",
|
|
@@ -12051,6 +12195,7 @@ function _discriminatedUnion(Class2, discriminator, options, params) {
|
|
|
12051
12195
|
});
|
|
12052
12196
|
}
|
|
12053
12197
|
__name(_discriminatedUnion, "_discriminatedUnion");
|
|
12198
|
+
// @__NO_SIDE_EFFECTS__
|
|
12054
12199
|
function _intersection(Class2, left, right) {
|
|
12055
12200
|
return new Class2({
|
|
12056
12201
|
type: "intersection",
|
|
@@ -12059,6 +12204,7 @@ function _intersection(Class2, left, right) {
|
|
|
12059
12204
|
});
|
|
12060
12205
|
}
|
|
12061
12206
|
__name(_intersection, "_intersection");
|
|
12207
|
+
// @__NO_SIDE_EFFECTS__
|
|
12062
12208
|
function _tuple(Class2, items, _paramsOrRest, _params) {
|
|
12063
12209
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
12064
12210
|
const params = hasRest ? _params : _paramsOrRest;
|
|
@@ -12071,6 +12217,7 @@ function _tuple(Class2, items, _paramsOrRest, _params) {
|
|
|
12071
12217
|
});
|
|
12072
12218
|
}
|
|
12073
12219
|
__name(_tuple, "_tuple");
|
|
12220
|
+
// @__NO_SIDE_EFFECTS__
|
|
12074
12221
|
function _record(Class2, keyType, valueType, params) {
|
|
12075
12222
|
return new Class2({
|
|
12076
12223
|
type: "record",
|
|
@@ -12080,6 +12227,7 @@ function _record(Class2, keyType, valueType, params) {
|
|
|
12080
12227
|
});
|
|
12081
12228
|
}
|
|
12082
12229
|
__name(_record, "_record");
|
|
12230
|
+
// @__NO_SIDE_EFFECTS__
|
|
12083
12231
|
function _map(Class2, keyType, valueType, params) {
|
|
12084
12232
|
return new Class2({
|
|
12085
12233
|
type: "map",
|
|
@@ -12089,6 +12237,7 @@ function _map(Class2, keyType, valueType, params) {
|
|
|
12089
12237
|
});
|
|
12090
12238
|
}
|
|
12091
12239
|
__name(_map, "_map");
|
|
12240
|
+
// @__NO_SIDE_EFFECTS__
|
|
12092
12241
|
function _set(Class2, valueType, params) {
|
|
12093
12242
|
return new Class2({
|
|
12094
12243
|
type: "set",
|
|
@@ -12097,6 +12246,7 @@ function _set(Class2, valueType, params) {
|
|
|
12097
12246
|
});
|
|
12098
12247
|
}
|
|
12099
12248
|
__name(_set, "_set");
|
|
12249
|
+
// @__NO_SIDE_EFFECTS__
|
|
12100
12250
|
function _enum(Class2, values, params) {
|
|
12101
12251
|
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
12102
12252
|
return new Class2({
|
|
@@ -12106,6 +12256,7 @@ function _enum(Class2, values, params) {
|
|
|
12106
12256
|
});
|
|
12107
12257
|
}
|
|
12108
12258
|
__name(_enum, "_enum");
|
|
12259
|
+
// @__NO_SIDE_EFFECTS__
|
|
12109
12260
|
function _nativeEnum(Class2, entries, params) {
|
|
12110
12261
|
return new Class2({
|
|
12111
12262
|
type: "enum",
|
|
@@ -12114,6 +12265,7 @@ function _nativeEnum(Class2, entries, params) {
|
|
|
12114
12265
|
});
|
|
12115
12266
|
}
|
|
12116
12267
|
__name(_nativeEnum, "_nativeEnum");
|
|
12268
|
+
// @__NO_SIDE_EFFECTS__
|
|
12117
12269
|
function _literal(Class2, value, params) {
|
|
12118
12270
|
return new Class2({
|
|
12119
12271
|
type: "literal",
|
|
@@ -12122,6 +12274,7 @@ function _literal(Class2, value, params) {
|
|
|
12122
12274
|
});
|
|
12123
12275
|
}
|
|
12124
12276
|
__name(_literal, "_literal");
|
|
12277
|
+
// @__NO_SIDE_EFFECTS__
|
|
12125
12278
|
function _file(Class2, params) {
|
|
12126
12279
|
return new Class2({
|
|
12127
12280
|
type: "file",
|
|
@@ -12129,6 +12282,7 @@ function _file(Class2, params) {
|
|
|
12129
12282
|
});
|
|
12130
12283
|
}
|
|
12131
12284
|
__name(_file, "_file");
|
|
12285
|
+
// @__NO_SIDE_EFFECTS__
|
|
12132
12286
|
function _transform(Class2, fn) {
|
|
12133
12287
|
return new Class2({
|
|
12134
12288
|
type: "transform",
|
|
@@ -12136,6 +12290,7 @@ function _transform(Class2, fn) {
|
|
|
12136
12290
|
});
|
|
12137
12291
|
}
|
|
12138
12292
|
__name(_transform, "_transform");
|
|
12293
|
+
// @__NO_SIDE_EFFECTS__
|
|
12139
12294
|
function _optional(Class2, innerType) {
|
|
12140
12295
|
return new Class2({
|
|
12141
12296
|
type: "optional",
|
|
@@ -12143,6 +12298,7 @@ function _optional(Class2, innerType) {
|
|
|
12143
12298
|
});
|
|
12144
12299
|
}
|
|
12145
12300
|
__name(_optional, "_optional");
|
|
12301
|
+
// @__NO_SIDE_EFFECTS__
|
|
12146
12302
|
function _nullable(Class2, innerType) {
|
|
12147
12303
|
return new Class2({
|
|
12148
12304
|
type: "nullable",
|
|
@@ -12150,6 +12306,7 @@ function _nullable(Class2, innerType) {
|
|
|
12150
12306
|
});
|
|
12151
12307
|
}
|
|
12152
12308
|
__name(_nullable, "_nullable");
|
|
12309
|
+
// @__NO_SIDE_EFFECTS__
|
|
12153
12310
|
function _default(Class2, innerType, defaultValue) {
|
|
12154
12311
|
return new Class2({
|
|
12155
12312
|
type: "default",
|
|
@@ -12160,6 +12317,7 @@ function _default(Class2, innerType, defaultValue) {
|
|
|
12160
12317
|
});
|
|
12161
12318
|
}
|
|
12162
12319
|
__name(_default, "_default");
|
|
12320
|
+
// @__NO_SIDE_EFFECTS__
|
|
12163
12321
|
function _nonoptional(Class2, innerType, params) {
|
|
12164
12322
|
return new Class2({
|
|
12165
12323
|
type: "nonoptional",
|
|
@@ -12168,6 +12326,7 @@ function _nonoptional(Class2, innerType, params) {
|
|
|
12168
12326
|
});
|
|
12169
12327
|
}
|
|
12170
12328
|
__name(_nonoptional, "_nonoptional");
|
|
12329
|
+
// @__NO_SIDE_EFFECTS__
|
|
12171
12330
|
function _success(Class2, innerType) {
|
|
12172
12331
|
return new Class2({
|
|
12173
12332
|
type: "success",
|
|
@@ -12175,6 +12334,7 @@ function _success(Class2, innerType) {
|
|
|
12175
12334
|
});
|
|
12176
12335
|
}
|
|
12177
12336
|
__name(_success, "_success");
|
|
12337
|
+
// @__NO_SIDE_EFFECTS__
|
|
12178
12338
|
function _catch(Class2, innerType, catchValue) {
|
|
12179
12339
|
return new Class2({
|
|
12180
12340
|
type: "catch",
|
|
@@ -12183,6 +12343,7 @@ function _catch(Class2, innerType, catchValue) {
|
|
|
12183
12343
|
});
|
|
12184
12344
|
}
|
|
12185
12345
|
__name(_catch, "_catch");
|
|
12346
|
+
// @__NO_SIDE_EFFECTS__
|
|
12186
12347
|
function _pipe(Class2, in_, out) {
|
|
12187
12348
|
return new Class2({
|
|
12188
12349
|
type: "pipe",
|
|
@@ -12191,6 +12352,7 @@ function _pipe(Class2, in_, out) {
|
|
|
12191
12352
|
});
|
|
12192
12353
|
}
|
|
12193
12354
|
__name(_pipe, "_pipe");
|
|
12355
|
+
// @__NO_SIDE_EFFECTS__
|
|
12194
12356
|
function _readonly(Class2, innerType) {
|
|
12195
12357
|
return new Class2({
|
|
12196
12358
|
type: "readonly",
|
|
@@ -12198,6 +12360,7 @@ function _readonly(Class2, innerType) {
|
|
|
12198
12360
|
});
|
|
12199
12361
|
}
|
|
12200
12362
|
__name(_readonly, "_readonly");
|
|
12363
|
+
// @__NO_SIDE_EFFECTS__
|
|
12201
12364
|
function _templateLiteral(Class2, parts, params) {
|
|
12202
12365
|
return new Class2({
|
|
12203
12366
|
type: "template_literal",
|
|
@@ -12206,6 +12369,7 @@ function _templateLiteral(Class2, parts, params) {
|
|
|
12206
12369
|
});
|
|
12207
12370
|
}
|
|
12208
12371
|
__name(_templateLiteral, "_templateLiteral");
|
|
12372
|
+
// @__NO_SIDE_EFFECTS__
|
|
12209
12373
|
function _lazy(Class2, getter) {
|
|
12210
12374
|
return new Class2({
|
|
12211
12375
|
type: "lazy",
|
|
@@ -12213,6 +12377,7 @@ function _lazy(Class2, getter) {
|
|
|
12213
12377
|
});
|
|
12214
12378
|
}
|
|
12215
12379
|
__name(_lazy, "_lazy");
|
|
12380
|
+
// @__NO_SIDE_EFFECTS__
|
|
12216
12381
|
function _promise(Class2, innerType) {
|
|
12217
12382
|
return new Class2({
|
|
12218
12383
|
type: "promise",
|
|
@@ -12220,6 +12385,7 @@ function _promise(Class2, innerType) {
|
|
|
12220
12385
|
});
|
|
12221
12386
|
}
|
|
12222
12387
|
__name(_promise, "_promise");
|
|
12388
|
+
// @__NO_SIDE_EFFECTS__
|
|
12223
12389
|
function _custom(Class2, fn, _params) {
|
|
12224
12390
|
const norm = normalizeParams(_params);
|
|
12225
12391
|
norm.abort ?? (norm.abort = true);
|
|
@@ -12232,6 +12398,7 @@ function _custom(Class2, fn, _params) {
|
|
|
12232
12398
|
return schema;
|
|
12233
12399
|
}
|
|
12234
12400
|
__name(_custom, "_custom");
|
|
12401
|
+
// @__NO_SIDE_EFFECTS__
|
|
12235
12402
|
function _refine(Class2, fn, _params) {
|
|
12236
12403
|
const schema = new Class2({
|
|
12237
12404
|
type: "custom",
|
|
@@ -12242,8 +12409,9 @@ function _refine(Class2, fn, _params) {
|
|
|
12242
12409
|
return schema;
|
|
12243
12410
|
}
|
|
12244
12411
|
__name(_refine, "_refine");
|
|
12412
|
+
// @__NO_SIDE_EFFECTS__
|
|
12245
12413
|
function _superRefine(fn, params) {
|
|
12246
|
-
const ch = _check((payload) => {
|
|
12414
|
+
const ch = /* @__PURE__ */ _check((payload) => {
|
|
12247
12415
|
payload.addIssue = (issue2) => {
|
|
12248
12416
|
if (typeof issue2 === "string") {
|
|
12249
12417
|
payload.issues.push(issue(issue2, payload.value, ch._zod.def));
|
|
@@ -12263,6 +12431,7 @@ function _superRefine(fn, params) {
|
|
|
12263
12431
|
return ch;
|
|
12264
12432
|
}
|
|
12265
12433
|
__name(_superRefine, "_superRefine");
|
|
12434
|
+
// @__NO_SIDE_EFFECTS__
|
|
12266
12435
|
function _check(fn, params) {
|
|
12267
12436
|
const ch = new $ZodCheck({
|
|
12268
12437
|
check: "custom",
|
|
@@ -12272,6 +12441,7 @@ function _check(fn, params) {
|
|
|
12272
12441
|
return ch;
|
|
12273
12442
|
}
|
|
12274
12443
|
__name(_check, "_check");
|
|
12444
|
+
// @__NO_SIDE_EFFECTS__
|
|
12275
12445
|
function describe(description) {
|
|
12276
12446
|
const ch = new $ZodCheck({ check: "describe" });
|
|
12277
12447
|
ch._zod.onattach = [
|
|
@@ -12285,6 +12455,7 @@ function describe(description) {
|
|
|
12285
12455
|
return ch;
|
|
12286
12456
|
}
|
|
12287
12457
|
__name(describe, "describe");
|
|
12458
|
+
// @__NO_SIDE_EFFECTS__
|
|
12288
12459
|
function meta(metadata) {
|
|
12289
12460
|
const ch = new $ZodCheck({ check: "meta" });
|
|
12290
12461
|
ch._zod.onattach = [
|
|
@@ -12298,6 +12469,7 @@ function meta(metadata) {
|
|
|
12298
12469
|
return ch;
|
|
12299
12470
|
}
|
|
12300
12471
|
__name(meta, "meta");
|
|
12472
|
+
// @__NO_SIDE_EFFECTS__
|
|
12301
12473
|
function _stringbool(Classes, _params) {
|
|
12302
12474
|
const params = normalizeParams(_params);
|
|
12303
12475
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
@@ -12317,7 +12489,7 @@ function _stringbool(Classes, _params) {
|
|
|
12317
12489
|
type: "pipe",
|
|
12318
12490
|
in: stringSchema,
|
|
12319
12491
|
out: booleanSchema,
|
|
12320
|
-
transform: (input, payload) => {
|
|
12492
|
+
transform: /* @__PURE__ */ __name(((input, payload) => {
|
|
12321
12493
|
let data = input;
|
|
12322
12494
|
if (params.case !== "sensitive")
|
|
12323
12495
|
data = data.toLowerCase();
|
|
@@ -12336,19 +12508,20 @@ function _stringbool(Classes, _params) {
|
|
|
12336
12508
|
});
|
|
12337
12509
|
return {};
|
|
12338
12510
|
}
|
|
12339
|
-
},
|
|
12340
|
-
reverseTransform: (input, _payload) => {
|
|
12511
|
+
}), "transform"),
|
|
12512
|
+
reverseTransform: /* @__PURE__ */ __name(((input, _payload) => {
|
|
12341
12513
|
if (input === true) {
|
|
12342
12514
|
return truthyArray[0] || "true";
|
|
12343
12515
|
} else {
|
|
12344
12516
|
return falsyArray[0] || "false";
|
|
12345
12517
|
}
|
|
12346
|
-
},
|
|
12518
|
+
}), "reverseTransform"),
|
|
12347
12519
|
error: params.error
|
|
12348
12520
|
});
|
|
12349
12521
|
return codec2;
|
|
12350
12522
|
}
|
|
12351
12523
|
__name(_stringbool, "_stringbool");
|
|
12524
|
+
// @__NO_SIDE_EFFECTS__
|
|
12352
12525
|
function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
12353
12526
|
const params = normalizeParams(_params);
|
|
12354
12527
|
const def = {
|
|
@@ -12391,7 +12564,7 @@ function initializeContext(params) {
|
|
|
12391
12564
|
}
|
|
12392
12565
|
__name(initializeContext, "initializeContext");
|
|
12393
12566
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
12394
|
-
var
|
|
12567
|
+
var _a6;
|
|
12395
12568
|
const def = schema._zod.def;
|
|
12396
12569
|
const seen = ctx.seen.get(schema);
|
|
12397
12570
|
if (seen) {
|
|
@@ -12439,7 +12612,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
12439
12612
|
delete result.schema.default;
|
|
12440
12613
|
}
|
|
12441
12614
|
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12442
|
-
(
|
|
12615
|
+
(_a6 = result.schema).default ?? (_a6.default = result.schema._prefault);
|
|
12443
12616
|
delete result.schema._prefault;
|
|
12444
12617
|
const _result = ctx.seen.get(schema);
|
|
12445
12618
|
return _result.schema;
|
|
@@ -12738,6 +12911,7 @@ var formatMap = {
|
|
|
12738
12911
|
datetime: "date-time",
|
|
12739
12912
|
json_string: "json-string",
|
|
12740
12913
|
regex: ""
|
|
12914
|
+
// do not set
|
|
12741
12915
|
};
|
|
12742
12916
|
var stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => {
|
|
12743
12917
|
const json2 = _json;
|
|
@@ -13276,28 +13450,35 @@ function toJSONSchema(input, params) {
|
|
|
13276
13450
|
__name(toJSONSchema, "toJSONSchema");
|
|
13277
13451
|
|
|
13278
13452
|
// ../../../node_modules/zod/v4/core/json-schema-generator.js
|
|
13279
|
-
var
|
|
13453
|
+
var _JSONSchemaGenerator = class _JSONSchemaGenerator {
|
|
13454
|
+
/** @deprecated Access via ctx instead */
|
|
13280
13455
|
get metadataRegistry() {
|
|
13281
13456
|
return this.ctx.metadataRegistry;
|
|
13282
13457
|
}
|
|
13458
|
+
/** @deprecated Access via ctx instead */
|
|
13283
13459
|
get target() {
|
|
13284
13460
|
return this.ctx.target;
|
|
13285
13461
|
}
|
|
13462
|
+
/** @deprecated Access via ctx instead */
|
|
13286
13463
|
get unrepresentable() {
|
|
13287
13464
|
return this.ctx.unrepresentable;
|
|
13288
13465
|
}
|
|
13466
|
+
/** @deprecated Access via ctx instead */
|
|
13289
13467
|
get override() {
|
|
13290
13468
|
return this.ctx.override;
|
|
13291
13469
|
}
|
|
13470
|
+
/** @deprecated Access via ctx instead */
|
|
13292
13471
|
get io() {
|
|
13293
13472
|
return this.ctx.io;
|
|
13294
13473
|
}
|
|
13474
|
+
/** @deprecated Access via ctx instead */
|
|
13295
13475
|
get counter() {
|
|
13296
13476
|
return this.ctx.counter;
|
|
13297
13477
|
}
|
|
13298
13478
|
set counter(value) {
|
|
13299
13479
|
this.ctx.counter = value;
|
|
13300
13480
|
}
|
|
13481
|
+
/** @deprecated Access via ctx instead */
|
|
13301
13482
|
get seen() {
|
|
13302
13483
|
return this.ctx.seen;
|
|
13303
13484
|
}
|
|
@@ -13316,9 +13497,17 @@ var JSONSchemaGenerator = class {
|
|
|
13316
13497
|
...params?.io && { io: params.io }
|
|
13317
13498
|
});
|
|
13318
13499
|
}
|
|
13500
|
+
/**
|
|
13501
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
13502
|
+
* This must be called before emit().
|
|
13503
|
+
*/
|
|
13319
13504
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
13320
13505
|
return process2(schema, this.ctx, _params);
|
|
13321
13506
|
}
|
|
13507
|
+
/**
|
|
13508
|
+
* Emit the final JSON Schema after processing.
|
|
13509
|
+
* Must call process() first.
|
|
13510
|
+
*/
|
|
13322
13511
|
emit(schema, _params) {
|
|
13323
13512
|
if (_params) {
|
|
13324
13513
|
if (_params.cycles)
|
|
@@ -13334,7 +13523,8 @@ var JSONSchemaGenerator = class {
|
|
|
13334
13523
|
return plainResult;
|
|
13335
13524
|
}
|
|
13336
13525
|
};
|
|
13337
|
-
__name(
|
|
13526
|
+
__name(_JSONSchemaGenerator, "JSONSchemaGenerator");
|
|
13527
|
+
var JSONSchemaGenerator = _JSONSchemaGenerator;
|
|
13338
13528
|
|
|
13339
13529
|
// ../../../node_modules/zod/v4/core/json-schema.js
|
|
13340
13530
|
var json_schema_exports = {};
|
|
@@ -13595,27 +13785,32 @@ var initializer2 = /* @__PURE__ */ __name((inst, issues) => {
|
|
|
13595
13785
|
inst.name = "ZodError";
|
|
13596
13786
|
Object.defineProperties(inst, {
|
|
13597
13787
|
format: {
|
|
13598
|
-
value: (mapper) => formatError(inst, mapper)
|
|
13788
|
+
value: /* @__PURE__ */ __name((mapper) => formatError(inst, mapper), "value")
|
|
13789
|
+
// enumerable: false,
|
|
13599
13790
|
},
|
|
13600
13791
|
flatten: {
|
|
13601
|
-
value: (mapper) => flattenError(inst, mapper)
|
|
13792
|
+
value: /* @__PURE__ */ __name((mapper) => flattenError(inst, mapper), "value")
|
|
13793
|
+
// enumerable: false,
|
|
13602
13794
|
},
|
|
13603
13795
|
addIssue: {
|
|
13604
|
-
value: (issue2) => {
|
|
13796
|
+
value: /* @__PURE__ */ __name((issue2) => {
|
|
13605
13797
|
inst.issues.push(issue2);
|
|
13606
13798
|
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
13607
|
-
}
|
|
13799
|
+
}, "value")
|
|
13800
|
+
// enumerable: false,
|
|
13608
13801
|
},
|
|
13609
13802
|
addIssues: {
|
|
13610
|
-
value: (issues2) => {
|
|
13803
|
+
value: /* @__PURE__ */ __name((issues2) => {
|
|
13611
13804
|
inst.issues.push(...issues2);
|
|
13612
13805
|
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
13613
|
-
}
|
|
13806
|
+
}, "value")
|
|
13807
|
+
// enumerable: false,
|
|
13614
13808
|
},
|
|
13615
13809
|
isEmpty: {
|
|
13616
13810
|
get() {
|
|
13617
13811
|
return inst.issues.length === 0;
|
|
13618
13812
|
}
|
|
13813
|
+
// enumerable: false,
|
|
13619
13814
|
}
|
|
13620
13815
|
});
|
|
13621
13816
|
}, "initializer");
|
|
@@ -14851,6 +15046,7 @@ function pipe(in_, out) {
|
|
|
14851
15046
|
type: "pipe",
|
|
14852
15047
|
in: in_,
|
|
14853
15048
|
out
|
|
15049
|
+
// ...util.normalizeParams(params),
|
|
14854
15050
|
});
|
|
14855
15051
|
}
|
|
14856
15052
|
__name(pipe, "pipe");
|
|
@@ -14956,6 +15152,7 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
14956
15152
|
function check(fn) {
|
|
14957
15153
|
const ch = new $ZodCheck({
|
|
14958
15154
|
check: "custom"
|
|
15155
|
+
// ...util.normalizeParams(params),
|
|
14959
15156
|
});
|
|
14960
15157
|
ch._zod.check = fn;
|
|
14961
15158
|
return ch;
|
|
@@ -14979,7 +15176,7 @@ function _instanceof(cls, params = {}) {
|
|
|
14979
15176
|
const inst = new ZodCustom({
|
|
14980
15177
|
type: "custom",
|
|
14981
15178
|
check: "custom",
|
|
14982
|
-
fn: (data) => data instanceof cls,
|
|
15179
|
+
fn: /* @__PURE__ */ __name((data) => data instanceof cls, "fn"),
|
|
14983
15180
|
abort: true,
|
|
14984
15181
|
...util_exports.normalizeParams(params)
|
|
14985
15182
|
});
|
|
@@ -15044,7 +15241,7 @@ function getErrorMap() {
|
|
|
15044
15241
|
}
|
|
15045
15242
|
__name(getErrorMap, "getErrorMap");
|
|
15046
15243
|
var ZodFirstPartyTypeKind;
|
|
15047
|
-
(function(ZodFirstPartyTypeKind2) {
|
|
15244
|
+
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
15048
15245
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
15049
15246
|
|
|
15050
15247
|
// ../../../node_modules/zod/v4/classic/from-json-schema.js
|
|
@@ -15054,10 +15251,12 @@ var z = {
|
|
|
15054
15251
|
iso: iso_exports
|
|
15055
15252
|
};
|
|
15056
15253
|
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
15254
|
+
// Schema identification
|
|
15057
15255
|
"$schema",
|
|
15058
15256
|
"$ref",
|
|
15059
15257
|
"$defs",
|
|
15060
15258
|
"definitions",
|
|
15259
|
+
// Core schema keywords
|
|
15061
15260
|
"$id",
|
|
15062
15261
|
"id",
|
|
15063
15262
|
"$comment",
|
|
@@ -15065,13 +15264,16 @@ var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
|
15065
15264
|
"$vocabulary",
|
|
15066
15265
|
"$dynamicRef",
|
|
15067
15266
|
"$dynamicAnchor",
|
|
15267
|
+
// Type
|
|
15068
15268
|
"type",
|
|
15069
15269
|
"enum",
|
|
15070
15270
|
"const",
|
|
15271
|
+
// Composition
|
|
15071
15272
|
"anyOf",
|
|
15072
15273
|
"oneOf",
|
|
15073
15274
|
"allOf",
|
|
15074
15275
|
"not",
|
|
15276
|
+
// Object
|
|
15075
15277
|
"properties",
|
|
15076
15278
|
"required",
|
|
15077
15279
|
"additionalProperties",
|
|
@@ -15079,6 +15281,7 @@ var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
|
15079
15281
|
"propertyNames",
|
|
15080
15282
|
"minProperties",
|
|
15081
15283
|
"maxProperties",
|
|
15284
|
+
// Array
|
|
15082
15285
|
"items",
|
|
15083
15286
|
"prefixItems",
|
|
15084
15287
|
"additionalItems",
|
|
@@ -15088,20 +15291,25 @@ var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
|
15088
15291
|
"contains",
|
|
15089
15292
|
"minContains",
|
|
15090
15293
|
"maxContains",
|
|
15294
|
+
// String
|
|
15091
15295
|
"minLength",
|
|
15092
15296
|
"maxLength",
|
|
15093
15297
|
"pattern",
|
|
15094
15298
|
"format",
|
|
15299
|
+
// Number
|
|
15095
15300
|
"minimum",
|
|
15096
15301
|
"maximum",
|
|
15097
15302
|
"exclusiveMinimum",
|
|
15098
15303
|
"exclusiveMaximum",
|
|
15099
15304
|
"multipleOf",
|
|
15305
|
+
// Already handled metadata
|
|
15100
15306
|
"description",
|
|
15101
15307
|
"default",
|
|
15308
|
+
// Content
|
|
15102
15309
|
"contentEncoding",
|
|
15103
15310
|
"contentMediaType",
|
|
15104
15311
|
"contentSchema",
|
|
15312
|
+
// Unsupported (error-throwing)
|
|
15105
15313
|
"unevaluatedItems",
|
|
15106
15314
|
"unevaluatedProperties",
|
|
15107
15315
|
"if",
|
|
@@ -15109,6 +15317,7 @@ var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
|
15109
15317
|
"else",
|
|
15110
15318
|
"dependentSchemas",
|
|
15111
15319
|
"dependentRequired",
|
|
15320
|
+
// OpenAPI
|
|
15112
15321
|
"nullable",
|
|
15113
15322
|
"readOnly"
|
|
15114
15323
|
]);
|
|
@@ -15554,9 +15763,8 @@ __name(date4, "date");
|
|
|
15554
15763
|
config(en_default());
|
|
15555
15764
|
|
|
15556
15765
|
// ../../../node_modules/js-base64/base64.mjs
|
|
15557
|
-
var version2 = "3.
|
|
15766
|
+
var version2 = "3.9.3";
|
|
15558
15767
|
var VERSION = version2;
|
|
15559
|
-
var _hasBuffer = typeof Buffer === "function";
|
|
15560
15768
|
var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
|
|
15561
15769
|
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
15562
15770
|
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
@@ -15582,8 +15790,8 @@ var btoaPolyfill = /* @__PURE__ */ __name((bin) => {
|
|
|
15582
15790
|
}
|
|
15583
15791
|
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
15584
15792
|
}, "btoaPolyfill");
|
|
15585
|
-
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) :
|
|
15586
|
-
var _fromUint8Array =
|
|
15793
|
+
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : btoaPolyfill;
|
|
15794
|
+
var _fromUint8Array = typeof Uint8Array.prototype.toBase64 === "function" ? (u8a) => u8a.toBase64() : (u8a) => {
|
|
15587
15795
|
const maxargs = 4096;
|
|
15588
15796
|
let strs = [];
|
|
15589
15797
|
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
@@ -15601,9 +15809,9 @@ var cb_utob = /* @__PURE__ */ __name((c) => {
|
|
|
15601
15809
|
return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
15602
15810
|
}
|
|
15603
15811
|
}, "cb_utob");
|
|
15604
|
-
var re_utob = /[\uD800-\uDBFF][\uDC00-\
|
|
15812
|
+
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
15605
15813
|
var utob = /* @__PURE__ */ __name((u) => u.replace(re_utob, cb_utob), "utob");
|
|
15606
|
-
var _encode2 =
|
|
15814
|
+
var _encode2 = _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
|
|
15607
15815
|
var encode3 = /* @__PURE__ */ __name((src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode2(src)) : _encode2(src), "encode");
|
|
15608
15816
|
var encodeURI = /* @__PURE__ */ __name((src) => encode3(src, true), "encodeURI");
|
|
15609
15817
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
@@ -15638,10 +15846,10 @@ var atobPolyfill = /* @__PURE__ */ __name((asc) => {
|
|
|
15638
15846
|
}
|
|
15639
15847
|
return binArray.join("");
|
|
15640
15848
|
}, "atobPolyfill");
|
|
15641
|
-
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) :
|
|
15642
|
-
var _toUint8Array =
|
|
15849
|
+
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
|
|
15850
|
+
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
|
|
15643
15851
|
var toUint8Array = /* @__PURE__ */ __name((a) => _toUint8Array(_unURI(a)), "toUint8Array");
|
|
15644
|
-
var _decode2 =
|
|
15852
|
+
var _decode2 = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
|
|
15645
15853
|
var _unURI = /* @__PURE__ */ __name((a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")), "_unURI");
|
|
15646
15854
|
var decode3 = /* @__PURE__ */ __name((src) => _decode2(_unURI(src)), "decode");
|
|
15647
15855
|
var isValid = /* @__PURE__ */ __name((src) => {
|
|
@@ -15738,18 +15946,22 @@ var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
|
15738
15946
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
15739
15947
|
for (let key of __getOwnPropNames2(from))
|
|
15740
15948
|
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
15741
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
15949
|
+
__defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
15742
15950
|
}
|
|
15743
15951
|
return to;
|
|
15744
15952
|
}, "__copyProps");
|
|
15745
15953
|
var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps2(
|
|
15954
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
15955
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
15956
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
15957
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
15746
15958
|
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
15747
15959
|
mod
|
|
15748
15960
|
)), "__toESM");
|
|
15749
15961
|
var require_types_cjs_development = __commonJS({
|
|
15750
15962
|
"../learn-card-types/dist/types.cjs.development.cjs"(exports, module2) {
|
|
15751
|
-
var _a5, _b, _c, _d, _e, _f, _g;
|
|
15752
15963
|
"use strict";
|
|
15964
|
+
var _a7, _b, _c, _d, _e, _f, _g;
|
|
15753
15965
|
var __defProp22 = Object.defineProperty;
|
|
15754
15966
|
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
15755
15967
|
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
@@ -15768,8 +15980,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
15768
15980
|
return to;
|
|
15769
15981
|
}, "__copyProps");
|
|
15770
15982
|
var __toCommonJS2 = /* @__PURE__ */ __name2((mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
15771
|
-
var
|
|
15772
|
-
__export22(
|
|
15983
|
+
var index_exports2 = {};
|
|
15984
|
+
__export22(index_exports2, {
|
|
15773
15985
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
15774
15986
|
AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator2, "AchievementCredentialValidator"),
|
|
15775
15987
|
AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator2, "AchievementCriteriaValidator"),
|
|
@@ -15912,6 +16124,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
15912
16124
|
LCNBoostClaimLinkSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkSigningAuthorityValidator2, "LCNBoostClaimLinkSigningAuthorityValidator"),
|
|
15913
16125
|
LCNBoostStatus: /* @__PURE__ */ __name2(() => LCNBoostStatus2, "LCNBoostStatus"),
|
|
15914
16126
|
LCNConnectionProfileValidator: /* @__PURE__ */ __name2(() => LCNConnectionProfileValidator2, "LCNConnectionProfileValidator"),
|
|
16127
|
+
LCNConnectionPromptActionResultValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptActionResultValidator2, "LCNConnectionPromptActionResultValidator"),
|
|
16128
|
+
LCNConnectionPromptActionStatusValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptActionStatusValidator2, "LCNConnectionPromptActionStatusValidator"),
|
|
16129
|
+
LCNConnectionPromptMetadataValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptMetadataValidator2, "LCNConnectionPromptMetadataValidator"),
|
|
16130
|
+
LCNConnectionPromptStatusValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptStatusValidator2, "LCNConnectionPromptStatusValidator"),
|
|
16131
|
+
LCNConnectionPromptSurfaceValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptSurfaceValidator2, "LCNConnectionPromptSurfaceValidator"),
|
|
16132
|
+
LCNConnectionPromptValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptValidator2, "LCNConnectionPromptValidator"),
|
|
15915
16133
|
LCNDomainOrOriginValidator: /* @__PURE__ */ __name2(() => LCNDomainOrOriginValidator2, "LCNDomainOrOriginValidator"),
|
|
15916
16134
|
LCNInboxContactMethodValidator: /* @__PURE__ */ __name2(() => LCNInboxContactMethodValidator2, "LCNInboxContactMethodValidator"),
|
|
15917
16135
|
LCNInboxStatusEnumValidator: /* @__PURE__ */ __name2(() => LCNInboxStatusEnumValidator2, "LCNInboxStatusEnumValidator"),
|
|
@@ -15923,6 +16141,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
15923
16141
|
LCNNotificationDataValidator: /* @__PURE__ */ __name2(() => LCNNotificationDataValidator2, "LCNNotificationDataValidator"),
|
|
15924
16142
|
LCNNotificationInboxValidator: /* @__PURE__ */ __name2(() => LCNNotificationInboxValidator2, "LCNNotificationInboxValidator"),
|
|
15925
16143
|
LCNNotificationMessageValidator: /* @__PURE__ */ __name2(() => LCNNotificationMessageValidator2, "LCNNotificationMessageValidator"),
|
|
16144
|
+
LCNNotificationMetadataValidator: /* @__PURE__ */ __name2(() => LCNNotificationMetadataValidator2, "LCNNotificationMetadataValidator"),
|
|
15926
16145
|
LCNNotificationTypeEnumValidator: /* @__PURE__ */ __name2(() => LCNNotificationTypeEnumValidator2, "LCNNotificationTypeEnumValidator"),
|
|
15927
16146
|
LCNNotificationValidator: /* @__PURE__ */ __name2(() => LCNNotificationValidator2, "LCNNotificationValidator"),
|
|
15928
16147
|
LCNProfileConnectionStatusEnum: /* @__PURE__ */ __name2(() => LCNProfileConnectionStatusEnum2, "LCNProfileConnectionStatusEnum"),
|
|
@@ -16052,7 +16271,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16052
16271
|
rolePredicateValidator: /* @__PURE__ */ __name2(() => rolePredicateValidator2, "rolePredicateValidator"),
|
|
16053
16272
|
versionPredicateValidator: /* @__PURE__ */ __name2(() => versionPredicateValidator2, "versionPredicateValidator")
|
|
16054
16273
|
});
|
|
16055
|
-
module2.exports = __toCommonJS2(
|
|
16274
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
16056
16275
|
var external_exports2 = {};
|
|
16057
16276
|
__export22(external_exports2, {
|
|
16058
16277
|
$brand: /* @__PURE__ */ __name2(() => $brand2, "$brand"),
|
|
@@ -16571,10 +16790,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
16571
16790
|
util: /* @__PURE__ */ __name2(() => util_exports2, "util"),
|
|
16572
16791
|
version: /* @__PURE__ */ __name2(() => version3, "version")
|
|
16573
16792
|
});
|
|
16574
|
-
var
|
|
16793
|
+
var _a6;
|
|
16575
16794
|
var NEVER2 = /* @__PURE__ */ Object.freeze({
|
|
16576
16795
|
status: "aborted"
|
|
16577
16796
|
});
|
|
16797
|
+
// @__NO_SIDE_EFFECTS__
|
|
16578
16798
|
function $constructor2(name, initializer32, params) {
|
|
16579
16799
|
function init(inst, def) {
|
|
16580
16800
|
if (!inst._zod) {
|
|
@@ -16605,16 +16825,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16605
16825
|
__name2(init, "init");
|
|
16606
16826
|
__name22(init, "init");
|
|
16607
16827
|
const Parent = params?.Parent ?? Object;
|
|
16608
|
-
const _Definition = class extends Parent {
|
|
16828
|
+
const _Definition = class _Definition extends Parent {
|
|
16609
16829
|
};
|
|
16830
|
+
__name(_Definition, "Definition");
|
|
16831
|
+
__name2(_Definition, "Definition");
|
|
16832
|
+
__name22(_Definition, "Definition");
|
|
16610
16833
|
let Definition = _Definition;
|
|
16611
|
-
__name(Definition, "Definition");
|
|
16612
|
-
(() => {
|
|
16613
|
-
__name2(_Definition, "Definition");
|
|
16614
|
-
})();
|
|
16615
|
-
(() => {
|
|
16616
|
-
__name22(_Definition, "Definition");
|
|
16617
|
-
})();
|
|
16618
16834
|
Object.defineProperty(Definition, "name", { value: name });
|
|
16619
16835
|
function _(def) {
|
|
16620
16836
|
var _a32;
|
|
@@ -16644,26 +16860,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16644
16860
|
__name2($constructor2, "$constructor");
|
|
16645
16861
|
__name22($constructor2, "$constructor");
|
|
16646
16862
|
var $brand2 = /* @__PURE__ */ Symbol("zod_brand");
|
|
16647
|
-
var $ZodAsyncError2 =
|
|
16863
|
+
var $ZodAsyncError2 = (_a7 = class extends Error {
|
|
16648
16864
|
constructor() {
|
|
16649
16865
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
16650
16866
|
}
|
|
16651
|
-
}, "
|
|
16652
|
-
|
|
16653
|
-
})(), (() => {
|
|
16654
|
-
__name22(_a5, "$ZodAsyncError");
|
|
16655
|
-
})(), _a5), "$ZodAsyncError");
|
|
16656
|
-
var $ZodEncodeError2 = /* @__PURE__ */ __name((/* @__PURE__ */ __name(_b = class extends Error {
|
|
16867
|
+
}, __name(_a7, "$ZodAsyncError"), __name2(_a7, "$ZodAsyncError"), __name22(_a7, "$ZodAsyncError"), _a7);
|
|
16868
|
+
var $ZodEncodeError2 = (_b = class extends Error {
|
|
16657
16869
|
constructor(name) {
|
|
16658
16870
|
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
16659
16871
|
this.name = "ZodEncodeError";
|
|
16660
16872
|
}
|
|
16661
|
-
}, "
|
|
16662
|
-
|
|
16663
|
-
})(), (() => {
|
|
16664
|
-
__name22(_b, "$ZodEncodeError");
|
|
16665
|
-
})(), _b), "$ZodEncodeError");
|
|
16666
|
-
(_a4 = globalThis).__zod_globalConfig ?? (_a4.__zod_globalConfig = {});
|
|
16873
|
+
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), __name22(_b, "$ZodEncodeError"), _b);
|
|
16874
|
+
(_a6 = globalThis).__zod_globalConfig ?? (_a6.__zod_globalConfig = {});
|
|
16667
16875
|
var globalConfig2 = globalThis.__zod_globalConfig;
|
|
16668
16876
|
function config2(newConfig) {
|
|
16669
16877
|
if (newConfig)
|
|
@@ -16847,6 +17055,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16847
17055
|
set(v) {
|
|
16848
17056
|
Object.defineProperty(object22, key, {
|
|
16849
17057
|
value: v
|
|
17058
|
+
// configurable: true,
|
|
16850
17059
|
});
|
|
16851
17060
|
},
|
|
16852
17061
|
configurable: true
|
|
@@ -17527,14 +17736,10 @@ var require_types_cjs_development = __commonJS({
|
|
|
17527
17736
|
__name(uint8ArrayToHex2, "uint8ArrayToHex");
|
|
17528
17737
|
__name2(uint8ArrayToHex2, "uint8ArrayToHex");
|
|
17529
17738
|
__name22(uint8ArrayToHex2, "uint8ArrayToHex");
|
|
17530
|
-
var Class2 =
|
|
17739
|
+
var Class2 = (_c = class {
|
|
17531
17740
|
constructor(..._args) {
|
|
17532
17741
|
}
|
|
17533
|
-
}, "
|
|
17534
|
-
__name2(_c, "Class");
|
|
17535
|
-
})(), (() => {
|
|
17536
|
-
__name22(_c, "Class");
|
|
17537
|
-
})(), _c), "Class");
|
|
17742
|
+
}, __name(_c, "Class"), __name2(_c, "Class"), __name22(_c, "Class"), _c);
|
|
17538
17743
|
var initializer3 = /* @__PURE__ */ __name22((inst, def) => {
|
|
17539
17744
|
inst.name = "$ZodError";
|
|
17540
17745
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -18497,7 +18702,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
18497
18702
|
payload.value = def.tx(payload.value);
|
|
18498
18703
|
};
|
|
18499
18704
|
});
|
|
18500
|
-
var Doc2 =
|
|
18705
|
+
var Doc2 = (_d = class {
|
|
18501
18706
|
constructor(args = []) {
|
|
18502
18707
|
this.content = [];
|
|
18503
18708
|
this.indent = 0;
|
|
@@ -18530,11 +18735,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
18530
18735
|
const lines = [...content.map((x) => ` ${x}`)];
|
|
18531
18736
|
return new F(...args, lines.join("\n"));
|
|
18532
18737
|
}
|
|
18533
|
-
}, "
|
|
18534
|
-
__name2(_d, "Doc");
|
|
18535
|
-
})(), (() => {
|
|
18536
|
-
__name22(_d, "Doc");
|
|
18537
|
-
})(), _d), "Doc");
|
|
18738
|
+
}, __name(_d, "Doc"), __name2(_d, "Doc"), __name22(_d, "Doc"), _d);
|
|
18538
18739
|
var version3 = {
|
|
18539
18740
|
major: 4,
|
|
18540
18741
|
minor: 4,
|
|
@@ -20689,8 +20890,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
20689
20890
|
code: "custom",
|
|
20690
20891
|
input,
|
|
20691
20892
|
inst,
|
|
20893
|
+
// incorporates params.error into issue reporting
|
|
20692
20894
|
path: [...inst._zod.def.path ?? []],
|
|
20895
|
+
// incorporates params.error into issue reporting
|
|
20693
20896
|
continue: !inst._zod.def.abort
|
|
20897
|
+
// params: inst._zod.def.params,
|
|
20694
20898
|
};
|
|
20695
20899
|
if (inst._zod.def.params)
|
|
20696
20900
|
_iss.params = inst._zod.def.params;
|
|
@@ -21362,6 +21566,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
21362
21566
|
return `Clau inv\xE0lida a ${issue22.origin}`;
|
|
21363
21567
|
case "invalid_union":
|
|
21364
21568
|
return "Entrada inv\xE0lida";
|
|
21569
|
+
// Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
|
|
21365
21570
|
case "invalid_element":
|
|
21366
21571
|
return `Element inv\xE0lid a ${issue22.origin}`;
|
|
21367
21572
|
default:
|
|
@@ -21886,7 +22091,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
21886
22091
|
template_literal: "input"
|
|
21887
22092
|
};
|
|
21888
22093
|
const TypeDictionary = {
|
|
22094
|
+
// Compatibility: "nan" -> "NaN" for display
|
|
21889
22095
|
nan: "NaN"
|
|
22096
|
+
// All other type names omitted - they fall back to raw values via ?? operator
|
|
21890
22097
|
};
|
|
21891
22098
|
return (issue22) => {
|
|
21892
22099
|
switch (issue22.code) {
|
|
@@ -22711,6 +22918,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
22711
22918
|
array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
22712
22919
|
set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
|
|
22713
22920
|
number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
|
|
22921
|
+
// no unit
|
|
22714
22922
|
};
|
|
22715
22923
|
const typeEntry = /* @__PURE__ */ __name22((t) => t ? TypeNames[t] : void 0, "typeEntry");
|
|
22716
22924
|
const typeLabel = /* @__PURE__ */ __name22((t) => {
|
|
@@ -26866,7 +27074,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26866
27074
|
var _a22;
|
|
26867
27075
|
var $output2 = /* @__PURE__ */ Symbol("ZodOutput");
|
|
26868
27076
|
var $input2 = /* @__PURE__ */ Symbol("ZodInput");
|
|
26869
|
-
var $ZodRegistry2 =
|
|
27077
|
+
var $ZodRegistry2 = (_e = class {
|
|
26870
27078
|
constructor() {
|
|
26871
27079
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
26872
27080
|
this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -26905,11 +27113,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26905
27113
|
has(schema) {
|
|
26906
27114
|
return this._map.has(schema);
|
|
26907
27115
|
}
|
|
26908
|
-
}, "
|
|
26909
|
-
__name2(_e, "$ZodRegistry");
|
|
26910
|
-
})(), (() => {
|
|
26911
|
-
__name22(_e, "$ZodRegistry");
|
|
26912
|
-
})(), _e), "$ZodRegistry");
|
|
27116
|
+
}, __name(_e, "$ZodRegistry"), __name2(_e, "$ZodRegistry"), __name22(_e, "$ZodRegistry"), _e);
|
|
26913
27117
|
function registry2() {
|
|
26914
27118
|
return new $ZodRegistry2();
|
|
26915
27119
|
}
|
|
@@ -26918,6 +27122,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26918
27122
|
__name22(registry2, "registry");
|
|
26919
27123
|
(_a22 = globalThis).__zod_globalRegistry ?? (_a22.__zod_globalRegistry = registry2());
|
|
26920
27124
|
var globalRegistry2 = globalThis.__zod_globalRegistry;
|
|
27125
|
+
// @__NO_SIDE_EFFECTS__
|
|
26921
27126
|
function _string2(Class22, params) {
|
|
26922
27127
|
return new Class22({
|
|
26923
27128
|
type: "string",
|
|
@@ -26927,6 +27132,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26927
27132
|
__name(_string2, "_string");
|
|
26928
27133
|
__name2(_string2, "_string");
|
|
26929
27134
|
__name22(_string2, "_string");
|
|
27135
|
+
// @__NO_SIDE_EFFECTS__
|
|
26930
27136
|
function _coercedString2(Class22, params) {
|
|
26931
27137
|
return new Class22({
|
|
26932
27138
|
type: "string",
|
|
@@ -26937,6 +27143,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26937
27143
|
__name(_coercedString2, "_coercedString");
|
|
26938
27144
|
__name2(_coercedString2, "_coercedString");
|
|
26939
27145
|
__name22(_coercedString2, "_coercedString");
|
|
27146
|
+
// @__NO_SIDE_EFFECTS__
|
|
26940
27147
|
function _email2(Class22, params) {
|
|
26941
27148
|
return new Class22({
|
|
26942
27149
|
type: "string",
|
|
@@ -26949,6 +27156,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26949
27156
|
__name(_email2, "_email");
|
|
26950
27157
|
__name2(_email2, "_email");
|
|
26951
27158
|
__name22(_email2, "_email");
|
|
27159
|
+
// @__NO_SIDE_EFFECTS__
|
|
26952
27160
|
function _guid2(Class22, params) {
|
|
26953
27161
|
return new Class22({
|
|
26954
27162
|
type: "string",
|
|
@@ -26961,6 +27169,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26961
27169
|
__name(_guid2, "_guid");
|
|
26962
27170
|
__name2(_guid2, "_guid");
|
|
26963
27171
|
__name22(_guid2, "_guid");
|
|
27172
|
+
// @__NO_SIDE_EFFECTS__
|
|
26964
27173
|
function _uuid2(Class22, params) {
|
|
26965
27174
|
return new Class22({
|
|
26966
27175
|
type: "string",
|
|
@@ -26973,6 +27182,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26973
27182
|
__name(_uuid2, "_uuid");
|
|
26974
27183
|
__name2(_uuid2, "_uuid");
|
|
26975
27184
|
__name22(_uuid2, "_uuid");
|
|
27185
|
+
// @__NO_SIDE_EFFECTS__
|
|
26976
27186
|
function _uuidv42(Class22, params) {
|
|
26977
27187
|
return new Class22({
|
|
26978
27188
|
type: "string",
|
|
@@ -26986,6 +27196,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26986
27196
|
__name(_uuidv42, "_uuidv4");
|
|
26987
27197
|
__name2(_uuidv42, "_uuidv4");
|
|
26988
27198
|
__name22(_uuidv42, "_uuidv4");
|
|
27199
|
+
// @__NO_SIDE_EFFECTS__
|
|
26989
27200
|
function _uuidv62(Class22, params) {
|
|
26990
27201
|
return new Class22({
|
|
26991
27202
|
type: "string",
|
|
@@ -26999,6 +27210,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
26999
27210
|
__name(_uuidv62, "_uuidv6");
|
|
27000
27211
|
__name2(_uuidv62, "_uuidv6");
|
|
27001
27212
|
__name22(_uuidv62, "_uuidv6");
|
|
27213
|
+
// @__NO_SIDE_EFFECTS__
|
|
27002
27214
|
function _uuidv72(Class22, params) {
|
|
27003
27215
|
return new Class22({
|
|
27004
27216
|
type: "string",
|
|
@@ -27012,6 +27224,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27012
27224
|
__name(_uuidv72, "_uuidv7");
|
|
27013
27225
|
__name2(_uuidv72, "_uuidv7");
|
|
27014
27226
|
__name22(_uuidv72, "_uuidv7");
|
|
27227
|
+
// @__NO_SIDE_EFFECTS__
|
|
27015
27228
|
function _url2(Class22, params) {
|
|
27016
27229
|
return new Class22({
|
|
27017
27230
|
type: "string",
|
|
@@ -27024,6 +27237,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27024
27237
|
__name(_url2, "_url");
|
|
27025
27238
|
__name2(_url2, "_url");
|
|
27026
27239
|
__name22(_url2, "_url");
|
|
27240
|
+
// @__NO_SIDE_EFFECTS__
|
|
27027
27241
|
function _emoji22(Class22, params) {
|
|
27028
27242
|
return new Class22({
|
|
27029
27243
|
type: "string",
|
|
@@ -27036,6 +27250,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27036
27250
|
__name(_emoji22, "_emoji2");
|
|
27037
27251
|
__name2(_emoji22, "_emoji2");
|
|
27038
27252
|
__name22(_emoji22, "_emoji");
|
|
27253
|
+
// @__NO_SIDE_EFFECTS__
|
|
27039
27254
|
function _nanoid2(Class22, params) {
|
|
27040
27255
|
return new Class22({
|
|
27041
27256
|
type: "string",
|
|
@@ -27048,6 +27263,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27048
27263
|
__name(_nanoid2, "_nanoid");
|
|
27049
27264
|
__name2(_nanoid2, "_nanoid");
|
|
27050
27265
|
__name22(_nanoid2, "_nanoid");
|
|
27266
|
+
// @__NO_SIDE_EFFECTS__
|
|
27051
27267
|
function _cuid3(Class22, params) {
|
|
27052
27268
|
return new Class22({
|
|
27053
27269
|
type: "string",
|
|
@@ -27060,6 +27276,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27060
27276
|
__name(_cuid3, "_cuid");
|
|
27061
27277
|
__name2(_cuid3, "_cuid");
|
|
27062
27278
|
__name22(_cuid3, "_cuid");
|
|
27279
|
+
// @__NO_SIDE_EFFECTS__
|
|
27063
27280
|
function _cuid22(Class22, params) {
|
|
27064
27281
|
return new Class22({
|
|
27065
27282
|
type: "string",
|
|
@@ -27072,6 +27289,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27072
27289
|
__name(_cuid22, "_cuid2");
|
|
27073
27290
|
__name2(_cuid22, "_cuid2");
|
|
27074
27291
|
__name22(_cuid22, "_cuid2");
|
|
27292
|
+
// @__NO_SIDE_EFFECTS__
|
|
27075
27293
|
function _ulid2(Class22, params) {
|
|
27076
27294
|
return new Class22({
|
|
27077
27295
|
type: "string",
|
|
@@ -27084,6 +27302,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27084
27302
|
__name(_ulid2, "_ulid");
|
|
27085
27303
|
__name2(_ulid2, "_ulid");
|
|
27086
27304
|
__name22(_ulid2, "_ulid");
|
|
27305
|
+
// @__NO_SIDE_EFFECTS__
|
|
27087
27306
|
function _xid2(Class22, params) {
|
|
27088
27307
|
return new Class22({
|
|
27089
27308
|
type: "string",
|
|
@@ -27096,6 +27315,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27096
27315
|
__name(_xid2, "_xid");
|
|
27097
27316
|
__name2(_xid2, "_xid");
|
|
27098
27317
|
__name22(_xid2, "_xid");
|
|
27318
|
+
// @__NO_SIDE_EFFECTS__
|
|
27099
27319
|
function _ksuid2(Class22, params) {
|
|
27100
27320
|
return new Class22({
|
|
27101
27321
|
type: "string",
|
|
@@ -27108,6 +27328,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27108
27328
|
__name(_ksuid2, "_ksuid");
|
|
27109
27329
|
__name2(_ksuid2, "_ksuid");
|
|
27110
27330
|
__name22(_ksuid2, "_ksuid");
|
|
27331
|
+
// @__NO_SIDE_EFFECTS__
|
|
27111
27332
|
function _ipv42(Class22, params) {
|
|
27112
27333
|
return new Class22({
|
|
27113
27334
|
type: "string",
|
|
@@ -27120,6 +27341,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27120
27341
|
__name(_ipv42, "_ipv4");
|
|
27121
27342
|
__name2(_ipv42, "_ipv4");
|
|
27122
27343
|
__name22(_ipv42, "_ipv4");
|
|
27344
|
+
// @__NO_SIDE_EFFECTS__
|
|
27123
27345
|
function _ipv62(Class22, params) {
|
|
27124
27346
|
return new Class22({
|
|
27125
27347
|
type: "string",
|
|
@@ -27132,6 +27354,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27132
27354
|
__name(_ipv62, "_ipv6");
|
|
27133
27355
|
__name2(_ipv62, "_ipv6");
|
|
27134
27356
|
__name22(_ipv62, "_ipv6");
|
|
27357
|
+
// @__NO_SIDE_EFFECTS__
|
|
27135
27358
|
function _mac2(Class22, params) {
|
|
27136
27359
|
return new Class22({
|
|
27137
27360
|
type: "string",
|
|
@@ -27144,6 +27367,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27144
27367
|
__name(_mac2, "_mac");
|
|
27145
27368
|
__name2(_mac2, "_mac");
|
|
27146
27369
|
__name22(_mac2, "_mac");
|
|
27370
|
+
// @__NO_SIDE_EFFECTS__
|
|
27147
27371
|
function _cidrv42(Class22, params) {
|
|
27148
27372
|
return new Class22({
|
|
27149
27373
|
type: "string",
|
|
@@ -27156,6 +27380,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27156
27380
|
__name(_cidrv42, "_cidrv4");
|
|
27157
27381
|
__name2(_cidrv42, "_cidrv4");
|
|
27158
27382
|
__name22(_cidrv42, "_cidrv4");
|
|
27383
|
+
// @__NO_SIDE_EFFECTS__
|
|
27159
27384
|
function _cidrv62(Class22, params) {
|
|
27160
27385
|
return new Class22({
|
|
27161
27386
|
type: "string",
|
|
@@ -27168,6 +27393,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27168
27393
|
__name(_cidrv62, "_cidrv6");
|
|
27169
27394
|
__name2(_cidrv62, "_cidrv6");
|
|
27170
27395
|
__name22(_cidrv62, "_cidrv6");
|
|
27396
|
+
// @__NO_SIDE_EFFECTS__
|
|
27171
27397
|
function _base642(Class22, params) {
|
|
27172
27398
|
return new Class22({
|
|
27173
27399
|
type: "string",
|
|
@@ -27180,6 +27406,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27180
27406
|
__name(_base642, "_base64");
|
|
27181
27407
|
__name2(_base642, "_base64");
|
|
27182
27408
|
__name22(_base642, "_base64");
|
|
27409
|
+
// @__NO_SIDE_EFFECTS__
|
|
27183
27410
|
function _base64url2(Class22, params) {
|
|
27184
27411
|
return new Class22({
|
|
27185
27412
|
type: "string",
|
|
@@ -27192,6 +27419,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27192
27419
|
__name(_base64url2, "_base64url");
|
|
27193
27420
|
__name2(_base64url2, "_base64url");
|
|
27194
27421
|
__name22(_base64url2, "_base64url");
|
|
27422
|
+
// @__NO_SIDE_EFFECTS__
|
|
27195
27423
|
function _e1642(Class22, params) {
|
|
27196
27424
|
return new Class22({
|
|
27197
27425
|
type: "string",
|
|
@@ -27204,6 +27432,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27204
27432
|
__name(_e1642, "_e164");
|
|
27205
27433
|
__name2(_e1642, "_e164");
|
|
27206
27434
|
__name22(_e1642, "_e164");
|
|
27435
|
+
// @__NO_SIDE_EFFECTS__
|
|
27207
27436
|
function _jwt2(Class22, params) {
|
|
27208
27437
|
return new Class22({
|
|
27209
27438
|
type: "string",
|
|
@@ -27223,6 +27452,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27223
27452
|
Millisecond: 3,
|
|
27224
27453
|
Microsecond: 6
|
|
27225
27454
|
};
|
|
27455
|
+
// @__NO_SIDE_EFFECTS__
|
|
27226
27456
|
function _isoDateTime2(Class22, params) {
|
|
27227
27457
|
return new Class22({
|
|
27228
27458
|
type: "string",
|
|
@@ -27237,6 +27467,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27237
27467
|
__name(_isoDateTime2, "_isoDateTime");
|
|
27238
27468
|
__name2(_isoDateTime2, "_isoDateTime");
|
|
27239
27469
|
__name22(_isoDateTime2, "_isoDateTime");
|
|
27470
|
+
// @__NO_SIDE_EFFECTS__
|
|
27240
27471
|
function _isoDate2(Class22, params) {
|
|
27241
27472
|
return new Class22({
|
|
27242
27473
|
type: "string",
|
|
@@ -27248,6 +27479,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27248
27479
|
__name(_isoDate2, "_isoDate");
|
|
27249
27480
|
__name2(_isoDate2, "_isoDate");
|
|
27250
27481
|
__name22(_isoDate2, "_isoDate");
|
|
27482
|
+
// @__NO_SIDE_EFFECTS__
|
|
27251
27483
|
function _isoTime2(Class22, params) {
|
|
27252
27484
|
return new Class22({
|
|
27253
27485
|
type: "string",
|
|
@@ -27260,6 +27492,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27260
27492
|
__name(_isoTime2, "_isoTime");
|
|
27261
27493
|
__name2(_isoTime2, "_isoTime");
|
|
27262
27494
|
__name22(_isoTime2, "_isoTime");
|
|
27495
|
+
// @__NO_SIDE_EFFECTS__
|
|
27263
27496
|
function _isoDuration2(Class22, params) {
|
|
27264
27497
|
return new Class22({
|
|
27265
27498
|
type: "string",
|
|
@@ -27271,6 +27504,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27271
27504
|
__name(_isoDuration2, "_isoDuration");
|
|
27272
27505
|
__name2(_isoDuration2, "_isoDuration");
|
|
27273
27506
|
__name22(_isoDuration2, "_isoDuration");
|
|
27507
|
+
// @__NO_SIDE_EFFECTS__
|
|
27274
27508
|
function _number2(Class22, params) {
|
|
27275
27509
|
return new Class22({
|
|
27276
27510
|
type: "number",
|
|
@@ -27281,6 +27515,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27281
27515
|
__name(_number2, "_number");
|
|
27282
27516
|
__name2(_number2, "_number");
|
|
27283
27517
|
__name22(_number2, "_number");
|
|
27518
|
+
// @__NO_SIDE_EFFECTS__
|
|
27284
27519
|
function _coercedNumber2(Class22, params) {
|
|
27285
27520
|
return new Class22({
|
|
27286
27521
|
type: "number",
|
|
@@ -27292,6 +27527,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27292
27527
|
__name(_coercedNumber2, "_coercedNumber");
|
|
27293
27528
|
__name2(_coercedNumber2, "_coercedNumber");
|
|
27294
27529
|
__name22(_coercedNumber2, "_coercedNumber");
|
|
27530
|
+
// @__NO_SIDE_EFFECTS__
|
|
27295
27531
|
function _int2(Class22, params) {
|
|
27296
27532
|
return new Class22({
|
|
27297
27533
|
type: "number",
|
|
@@ -27304,6 +27540,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27304
27540
|
__name(_int2, "_int");
|
|
27305
27541
|
__name2(_int2, "_int");
|
|
27306
27542
|
__name22(_int2, "_int");
|
|
27543
|
+
// @__NO_SIDE_EFFECTS__
|
|
27307
27544
|
function _float322(Class22, params) {
|
|
27308
27545
|
return new Class22({
|
|
27309
27546
|
type: "number",
|
|
@@ -27316,6 +27553,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27316
27553
|
__name(_float322, "_float32");
|
|
27317
27554
|
__name2(_float322, "_float32");
|
|
27318
27555
|
__name22(_float322, "_float32");
|
|
27556
|
+
// @__NO_SIDE_EFFECTS__
|
|
27319
27557
|
function _float642(Class22, params) {
|
|
27320
27558
|
return new Class22({
|
|
27321
27559
|
type: "number",
|
|
@@ -27328,6 +27566,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27328
27566
|
__name(_float642, "_float64");
|
|
27329
27567
|
__name2(_float642, "_float64");
|
|
27330
27568
|
__name22(_float642, "_float64");
|
|
27569
|
+
// @__NO_SIDE_EFFECTS__
|
|
27331
27570
|
function _int322(Class22, params) {
|
|
27332
27571
|
return new Class22({
|
|
27333
27572
|
type: "number",
|
|
@@ -27340,6 +27579,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27340
27579
|
__name(_int322, "_int32");
|
|
27341
27580
|
__name2(_int322, "_int32");
|
|
27342
27581
|
__name22(_int322, "_int32");
|
|
27582
|
+
// @__NO_SIDE_EFFECTS__
|
|
27343
27583
|
function _uint322(Class22, params) {
|
|
27344
27584
|
return new Class22({
|
|
27345
27585
|
type: "number",
|
|
@@ -27352,6 +27592,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27352
27592
|
__name(_uint322, "_uint32");
|
|
27353
27593
|
__name2(_uint322, "_uint32");
|
|
27354
27594
|
__name22(_uint322, "_uint32");
|
|
27595
|
+
// @__NO_SIDE_EFFECTS__
|
|
27355
27596
|
function _boolean2(Class22, params) {
|
|
27356
27597
|
return new Class22({
|
|
27357
27598
|
type: "boolean",
|
|
@@ -27361,6 +27602,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27361
27602
|
__name(_boolean2, "_boolean");
|
|
27362
27603
|
__name2(_boolean2, "_boolean");
|
|
27363
27604
|
__name22(_boolean2, "_boolean");
|
|
27605
|
+
// @__NO_SIDE_EFFECTS__
|
|
27364
27606
|
function _coercedBoolean2(Class22, params) {
|
|
27365
27607
|
return new Class22({
|
|
27366
27608
|
type: "boolean",
|
|
@@ -27371,6 +27613,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27371
27613
|
__name(_coercedBoolean2, "_coercedBoolean");
|
|
27372
27614
|
__name2(_coercedBoolean2, "_coercedBoolean");
|
|
27373
27615
|
__name22(_coercedBoolean2, "_coercedBoolean");
|
|
27616
|
+
// @__NO_SIDE_EFFECTS__
|
|
27374
27617
|
function _bigint2(Class22, params) {
|
|
27375
27618
|
return new Class22({
|
|
27376
27619
|
type: "bigint",
|
|
@@ -27380,6 +27623,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27380
27623
|
__name(_bigint2, "_bigint");
|
|
27381
27624
|
__name2(_bigint2, "_bigint");
|
|
27382
27625
|
__name22(_bigint2, "_bigint");
|
|
27626
|
+
// @__NO_SIDE_EFFECTS__
|
|
27383
27627
|
function _coercedBigint2(Class22, params) {
|
|
27384
27628
|
return new Class22({
|
|
27385
27629
|
type: "bigint",
|
|
@@ -27390,6 +27634,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27390
27634
|
__name(_coercedBigint2, "_coercedBigint");
|
|
27391
27635
|
__name2(_coercedBigint2, "_coercedBigint");
|
|
27392
27636
|
__name22(_coercedBigint2, "_coercedBigint");
|
|
27637
|
+
// @__NO_SIDE_EFFECTS__
|
|
27393
27638
|
function _int642(Class22, params) {
|
|
27394
27639
|
return new Class22({
|
|
27395
27640
|
type: "bigint",
|
|
@@ -27402,6 +27647,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27402
27647
|
__name(_int642, "_int64");
|
|
27403
27648
|
__name2(_int642, "_int64");
|
|
27404
27649
|
__name22(_int642, "_int64");
|
|
27650
|
+
// @__NO_SIDE_EFFECTS__
|
|
27405
27651
|
function _uint642(Class22, params) {
|
|
27406
27652
|
return new Class22({
|
|
27407
27653
|
type: "bigint",
|
|
@@ -27414,6 +27660,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27414
27660
|
__name(_uint642, "_uint64");
|
|
27415
27661
|
__name2(_uint642, "_uint64");
|
|
27416
27662
|
__name22(_uint642, "_uint64");
|
|
27663
|
+
// @__NO_SIDE_EFFECTS__
|
|
27417
27664
|
function _symbol2(Class22, params) {
|
|
27418
27665
|
return new Class22({
|
|
27419
27666
|
type: "symbol",
|
|
@@ -27423,6 +27670,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27423
27670
|
__name(_symbol2, "_symbol");
|
|
27424
27671
|
__name2(_symbol2, "_symbol");
|
|
27425
27672
|
__name22(_symbol2, "_symbol");
|
|
27673
|
+
// @__NO_SIDE_EFFECTS__
|
|
27426
27674
|
function _undefined22(Class22, params) {
|
|
27427
27675
|
return new Class22({
|
|
27428
27676
|
type: "undefined",
|
|
@@ -27432,6 +27680,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27432
27680
|
__name(_undefined22, "_undefined2");
|
|
27433
27681
|
__name2(_undefined22, "_undefined2");
|
|
27434
27682
|
__name22(_undefined22, "_undefined");
|
|
27683
|
+
// @__NO_SIDE_EFFECTS__
|
|
27435
27684
|
function _null22(Class22, params) {
|
|
27436
27685
|
return new Class22({
|
|
27437
27686
|
type: "null",
|
|
@@ -27441,6 +27690,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27441
27690
|
__name(_null22, "_null2");
|
|
27442
27691
|
__name2(_null22, "_null2");
|
|
27443
27692
|
__name22(_null22, "_null");
|
|
27693
|
+
// @__NO_SIDE_EFFECTS__
|
|
27444
27694
|
function _any2(Class22) {
|
|
27445
27695
|
return new Class22({
|
|
27446
27696
|
type: "any"
|
|
@@ -27449,6 +27699,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27449
27699
|
__name(_any2, "_any");
|
|
27450
27700
|
__name2(_any2, "_any");
|
|
27451
27701
|
__name22(_any2, "_any");
|
|
27702
|
+
// @__NO_SIDE_EFFECTS__
|
|
27452
27703
|
function _unknown2(Class22) {
|
|
27453
27704
|
return new Class22({
|
|
27454
27705
|
type: "unknown"
|
|
@@ -27457,6 +27708,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27457
27708
|
__name(_unknown2, "_unknown");
|
|
27458
27709
|
__name2(_unknown2, "_unknown");
|
|
27459
27710
|
__name22(_unknown2, "_unknown");
|
|
27711
|
+
// @__NO_SIDE_EFFECTS__
|
|
27460
27712
|
function _never2(Class22, params) {
|
|
27461
27713
|
return new Class22({
|
|
27462
27714
|
type: "never",
|
|
@@ -27466,6 +27718,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27466
27718
|
__name(_never2, "_never");
|
|
27467
27719
|
__name2(_never2, "_never");
|
|
27468
27720
|
__name22(_never2, "_never");
|
|
27721
|
+
// @__NO_SIDE_EFFECTS__
|
|
27469
27722
|
function _void3(Class22, params) {
|
|
27470
27723
|
return new Class22({
|
|
27471
27724
|
type: "void",
|
|
@@ -27475,6 +27728,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27475
27728
|
__name(_void3, "_void");
|
|
27476
27729
|
__name2(_void3, "_void");
|
|
27477
27730
|
__name22(_void3, "_void");
|
|
27731
|
+
// @__NO_SIDE_EFFECTS__
|
|
27478
27732
|
function _date2(Class22, params) {
|
|
27479
27733
|
return new Class22({
|
|
27480
27734
|
type: "date",
|
|
@@ -27484,6 +27738,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27484
27738
|
__name(_date2, "_date");
|
|
27485
27739
|
__name2(_date2, "_date");
|
|
27486
27740
|
__name22(_date2, "_date");
|
|
27741
|
+
// @__NO_SIDE_EFFECTS__
|
|
27487
27742
|
function _coercedDate2(Class22, params) {
|
|
27488
27743
|
return new Class22({
|
|
27489
27744
|
type: "date",
|
|
@@ -27494,6 +27749,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27494
27749
|
__name(_coercedDate2, "_coercedDate");
|
|
27495
27750
|
__name2(_coercedDate2, "_coercedDate");
|
|
27496
27751
|
__name22(_coercedDate2, "_coercedDate");
|
|
27752
|
+
// @__NO_SIDE_EFFECTS__
|
|
27497
27753
|
function _nan2(Class22, params) {
|
|
27498
27754
|
return new Class22({
|
|
27499
27755
|
type: "nan",
|
|
@@ -27503,6 +27759,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27503
27759
|
__name(_nan2, "_nan");
|
|
27504
27760
|
__name2(_nan2, "_nan");
|
|
27505
27761
|
__name22(_nan2, "_nan");
|
|
27762
|
+
// @__NO_SIDE_EFFECTS__
|
|
27506
27763
|
function _lt2(value, params) {
|
|
27507
27764
|
return new $ZodCheckLessThan2({
|
|
27508
27765
|
check: "less_than",
|
|
@@ -27514,6 +27771,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27514
27771
|
__name(_lt2, "_lt");
|
|
27515
27772
|
__name2(_lt2, "_lt");
|
|
27516
27773
|
__name22(_lt2, "_lt");
|
|
27774
|
+
// @__NO_SIDE_EFFECTS__
|
|
27517
27775
|
function _lte2(value, params) {
|
|
27518
27776
|
return new $ZodCheckLessThan2({
|
|
27519
27777
|
check: "less_than",
|
|
@@ -27525,6 +27783,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27525
27783
|
__name(_lte2, "_lte");
|
|
27526
27784
|
__name2(_lte2, "_lte");
|
|
27527
27785
|
__name22(_lte2, "_lte");
|
|
27786
|
+
// @__NO_SIDE_EFFECTS__
|
|
27528
27787
|
function _gt2(value, params) {
|
|
27529
27788
|
return new $ZodCheckGreaterThan2({
|
|
27530
27789
|
check: "greater_than",
|
|
@@ -27536,6 +27795,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27536
27795
|
__name(_gt2, "_gt");
|
|
27537
27796
|
__name2(_gt2, "_gt");
|
|
27538
27797
|
__name22(_gt2, "_gt");
|
|
27798
|
+
// @__NO_SIDE_EFFECTS__
|
|
27539
27799
|
function _gte2(value, params) {
|
|
27540
27800
|
return new $ZodCheckGreaterThan2({
|
|
27541
27801
|
check: "greater_than",
|
|
@@ -27547,30 +27807,35 @@ var require_types_cjs_development = __commonJS({
|
|
|
27547
27807
|
__name(_gte2, "_gte");
|
|
27548
27808
|
__name2(_gte2, "_gte");
|
|
27549
27809
|
__name22(_gte2, "_gte");
|
|
27810
|
+
// @__NO_SIDE_EFFECTS__
|
|
27550
27811
|
function _positive2(params) {
|
|
27551
27812
|
return /* @__PURE__ */ _gt2(0, params);
|
|
27552
27813
|
}
|
|
27553
27814
|
__name(_positive2, "_positive");
|
|
27554
27815
|
__name2(_positive2, "_positive");
|
|
27555
27816
|
__name22(_positive2, "_positive");
|
|
27817
|
+
// @__NO_SIDE_EFFECTS__
|
|
27556
27818
|
function _negative2(params) {
|
|
27557
27819
|
return /* @__PURE__ */ _lt2(0, params);
|
|
27558
27820
|
}
|
|
27559
27821
|
__name(_negative2, "_negative");
|
|
27560
27822
|
__name2(_negative2, "_negative");
|
|
27561
27823
|
__name22(_negative2, "_negative");
|
|
27824
|
+
// @__NO_SIDE_EFFECTS__
|
|
27562
27825
|
function _nonpositive2(params) {
|
|
27563
27826
|
return /* @__PURE__ */ _lte2(0, params);
|
|
27564
27827
|
}
|
|
27565
27828
|
__name(_nonpositive2, "_nonpositive");
|
|
27566
27829
|
__name2(_nonpositive2, "_nonpositive");
|
|
27567
27830
|
__name22(_nonpositive2, "_nonpositive");
|
|
27831
|
+
// @__NO_SIDE_EFFECTS__
|
|
27568
27832
|
function _nonnegative2(params) {
|
|
27569
27833
|
return /* @__PURE__ */ _gte2(0, params);
|
|
27570
27834
|
}
|
|
27571
27835
|
__name(_nonnegative2, "_nonnegative");
|
|
27572
27836
|
__name2(_nonnegative2, "_nonnegative");
|
|
27573
27837
|
__name22(_nonnegative2, "_nonnegative");
|
|
27838
|
+
// @__NO_SIDE_EFFECTS__
|
|
27574
27839
|
function _multipleOf2(value, params) {
|
|
27575
27840
|
return new $ZodCheckMultipleOf2({
|
|
27576
27841
|
check: "multiple_of",
|
|
@@ -27581,6 +27846,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27581
27846
|
__name(_multipleOf2, "_multipleOf");
|
|
27582
27847
|
__name2(_multipleOf2, "_multipleOf");
|
|
27583
27848
|
__name22(_multipleOf2, "_multipleOf");
|
|
27849
|
+
// @__NO_SIDE_EFFECTS__
|
|
27584
27850
|
function _maxSize2(maximum, params) {
|
|
27585
27851
|
return new $ZodCheckMaxSize2({
|
|
27586
27852
|
check: "max_size",
|
|
@@ -27591,6 +27857,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27591
27857
|
__name(_maxSize2, "_maxSize");
|
|
27592
27858
|
__name2(_maxSize2, "_maxSize");
|
|
27593
27859
|
__name22(_maxSize2, "_maxSize");
|
|
27860
|
+
// @__NO_SIDE_EFFECTS__
|
|
27594
27861
|
function _minSize2(minimum, params) {
|
|
27595
27862
|
return new $ZodCheckMinSize2({
|
|
27596
27863
|
check: "min_size",
|
|
@@ -27601,6 +27868,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27601
27868
|
__name(_minSize2, "_minSize");
|
|
27602
27869
|
__name2(_minSize2, "_minSize");
|
|
27603
27870
|
__name22(_minSize2, "_minSize");
|
|
27871
|
+
// @__NO_SIDE_EFFECTS__
|
|
27604
27872
|
function _size2(size, params) {
|
|
27605
27873
|
return new $ZodCheckSizeEquals2({
|
|
27606
27874
|
check: "size_equals",
|
|
@@ -27611,6 +27879,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27611
27879
|
__name(_size2, "_size");
|
|
27612
27880
|
__name2(_size2, "_size");
|
|
27613
27881
|
__name22(_size2, "_size");
|
|
27882
|
+
// @__NO_SIDE_EFFECTS__
|
|
27614
27883
|
function _maxLength2(maximum, params) {
|
|
27615
27884
|
const ch = new $ZodCheckMaxLength2({
|
|
27616
27885
|
check: "max_length",
|
|
@@ -27622,6 +27891,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27622
27891
|
__name(_maxLength2, "_maxLength");
|
|
27623
27892
|
__name2(_maxLength2, "_maxLength");
|
|
27624
27893
|
__name22(_maxLength2, "_maxLength");
|
|
27894
|
+
// @__NO_SIDE_EFFECTS__
|
|
27625
27895
|
function _minLength2(minimum, params) {
|
|
27626
27896
|
return new $ZodCheckMinLength2({
|
|
27627
27897
|
check: "min_length",
|
|
@@ -27632,6 +27902,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27632
27902
|
__name(_minLength2, "_minLength");
|
|
27633
27903
|
__name2(_minLength2, "_minLength");
|
|
27634
27904
|
__name22(_minLength2, "_minLength");
|
|
27905
|
+
// @__NO_SIDE_EFFECTS__
|
|
27635
27906
|
function _length2(length, params) {
|
|
27636
27907
|
return new $ZodCheckLengthEquals2({
|
|
27637
27908
|
check: "length_equals",
|
|
@@ -27642,6 +27913,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27642
27913
|
__name(_length2, "_length");
|
|
27643
27914
|
__name2(_length2, "_length");
|
|
27644
27915
|
__name22(_length2, "_length");
|
|
27916
|
+
// @__NO_SIDE_EFFECTS__
|
|
27645
27917
|
function _regex2(pattern, params) {
|
|
27646
27918
|
return new $ZodCheckRegex2({
|
|
27647
27919
|
check: "string_format",
|
|
@@ -27653,6 +27925,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27653
27925
|
__name(_regex2, "_regex");
|
|
27654
27926
|
__name2(_regex2, "_regex");
|
|
27655
27927
|
__name22(_regex2, "_regex");
|
|
27928
|
+
// @__NO_SIDE_EFFECTS__
|
|
27656
27929
|
function _lowercase2(params) {
|
|
27657
27930
|
return new $ZodCheckLowerCase2({
|
|
27658
27931
|
check: "string_format",
|
|
@@ -27663,6 +27936,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27663
27936
|
__name(_lowercase2, "_lowercase");
|
|
27664
27937
|
__name2(_lowercase2, "_lowercase");
|
|
27665
27938
|
__name22(_lowercase2, "_lowercase");
|
|
27939
|
+
// @__NO_SIDE_EFFECTS__
|
|
27666
27940
|
function _uppercase2(params) {
|
|
27667
27941
|
return new $ZodCheckUpperCase2({
|
|
27668
27942
|
check: "string_format",
|
|
@@ -27673,6 +27947,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27673
27947
|
__name(_uppercase2, "_uppercase");
|
|
27674
27948
|
__name2(_uppercase2, "_uppercase");
|
|
27675
27949
|
__name22(_uppercase2, "_uppercase");
|
|
27950
|
+
// @__NO_SIDE_EFFECTS__
|
|
27676
27951
|
function _includes2(includes, params) {
|
|
27677
27952
|
return new $ZodCheckIncludes2({
|
|
27678
27953
|
check: "string_format",
|
|
@@ -27684,6 +27959,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27684
27959
|
__name(_includes2, "_includes");
|
|
27685
27960
|
__name2(_includes2, "_includes");
|
|
27686
27961
|
__name22(_includes2, "_includes");
|
|
27962
|
+
// @__NO_SIDE_EFFECTS__
|
|
27687
27963
|
function _startsWith2(prefix, params) {
|
|
27688
27964
|
return new $ZodCheckStartsWith2({
|
|
27689
27965
|
check: "string_format",
|
|
@@ -27695,6 +27971,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27695
27971
|
__name(_startsWith2, "_startsWith");
|
|
27696
27972
|
__name2(_startsWith2, "_startsWith");
|
|
27697
27973
|
__name22(_startsWith2, "_startsWith");
|
|
27974
|
+
// @__NO_SIDE_EFFECTS__
|
|
27698
27975
|
function _endsWith2(suffix, params) {
|
|
27699
27976
|
return new $ZodCheckEndsWith2({
|
|
27700
27977
|
check: "string_format",
|
|
@@ -27706,6 +27983,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27706
27983
|
__name(_endsWith2, "_endsWith");
|
|
27707
27984
|
__name2(_endsWith2, "_endsWith");
|
|
27708
27985
|
__name22(_endsWith2, "_endsWith");
|
|
27986
|
+
// @__NO_SIDE_EFFECTS__
|
|
27709
27987
|
function _property2(property, schema, params) {
|
|
27710
27988
|
return new $ZodCheckProperty2({
|
|
27711
27989
|
check: "property",
|
|
@@ -27717,6 +27995,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27717
27995
|
__name(_property2, "_property");
|
|
27718
27996
|
__name2(_property2, "_property");
|
|
27719
27997
|
__name22(_property2, "_property");
|
|
27998
|
+
// @__NO_SIDE_EFFECTS__
|
|
27720
27999
|
function _mime2(types, params) {
|
|
27721
28000
|
return new $ZodCheckMimeType2({
|
|
27722
28001
|
check: "mime_type",
|
|
@@ -27727,6 +28006,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27727
28006
|
__name(_mime2, "_mime");
|
|
27728
28007
|
__name2(_mime2, "_mime");
|
|
27729
28008
|
__name22(_mime2, "_mime");
|
|
28009
|
+
// @__NO_SIDE_EFFECTS__
|
|
27730
28010
|
function _overwrite2(tx) {
|
|
27731
28011
|
return new $ZodCheckOverwrite2({
|
|
27732
28012
|
check: "overwrite",
|
|
@@ -27736,46 +28016,56 @@ var require_types_cjs_development = __commonJS({
|
|
|
27736
28016
|
__name(_overwrite2, "_overwrite");
|
|
27737
28017
|
__name2(_overwrite2, "_overwrite");
|
|
27738
28018
|
__name22(_overwrite2, "_overwrite");
|
|
28019
|
+
// @__NO_SIDE_EFFECTS__
|
|
27739
28020
|
function _normalize2(form) {
|
|
27740
28021
|
return /* @__PURE__ */ _overwrite2((input) => input.normalize(form));
|
|
27741
28022
|
}
|
|
27742
28023
|
__name(_normalize2, "_normalize");
|
|
27743
28024
|
__name2(_normalize2, "_normalize");
|
|
27744
28025
|
__name22(_normalize2, "_normalize");
|
|
28026
|
+
// @__NO_SIDE_EFFECTS__
|
|
27745
28027
|
function _trim2() {
|
|
27746
28028
|
return /* @__PURE__ */ _overwrite2((input) => input.trim());
|
|
27747
28029
|
}
|
|
27748
28030
|
__name(_trim2, "_trim");
|
|
27749
28031
|
__name2(_trim2, "_trim");
|
|
27750
28032
|
__name22(_trim2, "_trim");
|
|
28033
|
+
// @__NO_SIDE_EFFECTS__
|
|
27751
28034
|
function _toLowerCase2() {
|
|
27752
28035
|
return /* @__PURE__ */ _overwrite2((input) => input.toLowerCase());
|
|
27753
28036
|
}
|
|
27754
28037
|
__name(_toLowerCase2, "_toLowerCase");
|
|
27755
28038
|
__name2(_toLowerCase2, "_toLowerCase");
|
|
27756
28039
|
__name22(_toLowerCase2, "_toLowerCase");
|
|
28040
|
+
// @__NO_SIDE_EFFECTS__
|
|
27757
28041
|
function _toUpperCase2() {
|
|
27758
28042
|
return /* @__PURE__ */ _overwrite2((input) => input.toUpperCase());
|
|
27759
28043
|
}
|
|
27760
28044
|
__name(_toUpperCase2, "_toUpperCase");
|
|
27761
28045
|
__name2(_toUpperCase2, "_toUpperCase");
|
|
27762
28046
|
__name22(_toUpperCase2, "_toUpperCase");
|
|
28047
|
+
// @__NO_SIDE_EFFECTS__
|
|
27763
28048
|
function _slugify2() {
|
|
27764
28049
|
return /* @__PURE__ */ _overwrite2((input) => slugify2(input));
|
|
27765
28050
|
}
|
|
27766
28051
|
__name(_slugify2, "_slugify");
|
|
27767
28052
|
__name2(_slugify2, "_slugify");
|
|
27768
28053
|
__name22(_slugify2, "_slugify");
|
|
28054
|
+
// @__NO_SIDE_EFFECTS__
|
|
27769
28055
|
function _array2(Class22, element, params) {
|
|
27770
28056
|
return new Class22({
|
|
27771
28057
|
type: "array",
|
|
27772
28058
|
element,
|
|
28059
|
+
// get element() {
|
|
28060
|
+
// return element;
|
|
28061
|
+
// },
|
|
27773
28062
|
...normalizeParams2(params)
|
|
27774
28063
|
});
|
|
27775
28064
|
}
|
|
27776
28065
|
__name(_array2, "_array");
|
|
27777
28066
|
__name2(_array2, "_array");
|
|
27778
28067
|
__name22(_array2, "_array");
|
|
28068
|
+
// @__NO_SIDE_EFFECTS__
|
|
27779
28069
|
function _union2(Class22, options, params) {
|
|
27780
28070
|
return new Class22({
|
|
27781
28071
|
type: "union",
|
|
@@ -27797,6 +28087,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27797
28087
|
__name(_xor2, "_xor");
|
|
27798
28088
|
__name2(_xor2, "_xor");
|
|
27799
28089
|
__name22(_xor2, "_xor");
|
|
28090
|
+
// @__NO_SIDE_EFFECTS__
|
|
27800
28091
|
function _discriminatedUnion2(Class22, discriminator, options, params) {
|
|
27801
28092
|
return new Class22({
|
|
27802
28093
|
type: "union",
|
|
@@ -27808,6 +28099,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27808
28099
|
__name(_discriminatedUnion2, "_discriminatedUnion");
|
|
27809
28100
|
__name2(_discriminatedUnion2, "_discriminatedUnion");
|
|
27810
28101
|
__name22(_discriminatedUnion2, "_discriminatedUnion");
|
|
28102
|
+
// @__NO_SIDE_EFFECTS__
|
|
27811
28103
|
function _intersection2(Class22, left, right) {
|
|
27812
28104
|
return new Class22({
|
|
27813
28105
|
type: "intersection",
|
|
@@ -27818,6 +28110,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27818
28110
|
__name(_intersection2, "_intersection");
|
|
27819
28111
|
__name2(_intersection2, "_intersection");
|
|
27820
28112
|
__name22(_intersection2, "_intersection");
|
|
28113
|
+
// @__NO_SIDE_EFFECTS__
|
|
27821
28114
|
function _tuple2(Class22, items, _paramsOrRest, _params) {
|
|
27822
28115
|
const hasRest = _paramsOrRest instanceof $ZodType2;
|
|
27823
28116
|
const params = hasRest ? _params : _paramsOrRest;
|
|
@@ -27832,6 +28125,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27832
28125
|
__name(_tuple2, "_tuple");
|
|
27833
28126
|
__name2(_tuple2, "_tuple");
|
|
27834
28127
|
__name22(_tuple2, "_tuple");
|
|
28128
|
+
// @__NO_SIDE_EFFECTS__
|
|
27835
28129
|
function _record2(Class22, keyType, valueType, params) {
|
|
27836
28130
|
return new Class22({
|
|
27837
28131
|
type: "record",
|
|
@@ -27843,6 +28137,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27843
28137
|
__name(_record2, "_record");
|
|
27844
28138
|
__name2(_record2, "_record");
|
|
27845
28139
|
__name22(_record2, "_record");
|
|
28140
|
+
// @__NO_SIDE_EFFECTS__
|
|
27846
28141
|
function _map2(Class22, keyType, valueType, params) {
|
|
27847
28142
|
return new Class22({
|
|
27848
28143
|
type: "map",
|
|
@@ -27854,6 +28149,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27854
28149
|
__name(_map2, "_map");
|
|
27855
28150
|
__name2(_map2, "_map");
|
|
27856
28151
|
__name22(_map2, "_map");
|
|
28152
|
+
// @__NO_SIDE_EFFECTS__
|
|
27857
28153
|
function _set2(Class22, valueType, params) {
|
|
27858
28154
|
return new Class22({
|
|
27859
28155
|
type: "set",
|
|
@@ -27864,6 +28160,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27864
28160
|
__name(_set2, "_set");
|
|
27865
28161
|
__name2(_set2, "_set");
|
|
27866
28162
|
__name22(_set2, "_set");
|
|
28163
|
+
// @__NO_SIDE_EFFECTS__
|
|
27867
28164
|
function _enum3(Class22, values, params) {
|
|
27868
28165
|
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
27869
28166
|
return new Class22({
|
|
@@ -27875,6 +28172,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27875
28172
|
__name(_enum3, "_enum");
|
|
27876
28173
|
__name2(_enum3, "_enum");
|
|
27877
28174
|
__name22(_enum3, "_enum");
|
|
28175
|
+
// @__NO_SIDE_EFFECTS__
|
|
27878
28176
|
function _nativeEnum2(Class22, entries, params) {
|
|
27879
28177
|
return new Class22({
|
|
27880
28178
|
type: "enum",
|
|
@@ -27885,6 +28183,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27885
28183
|
__name(_nativeEnum2, "_nativeEnum");
|
|
27886
28184
|
__name2(_nativeEnum2, "_nativeEnum");
|
|
27887
28185
|
__name22(_nativeEnum2, "_nativeEnum");
|
|
28186
|
+
// @__NO_SIDE_EFFECTS__
|
|
27888
28187
|
function _literal2(Class22, value, params) {
|
|
27889
28188
|
return new Class22({
|
|
27890
28189
|
type: "literal",
|
|
@@ -27895,6 +28194,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27895
28194
|
__name(_literal2, "_literal");
|
|
27896
28195
|
__name2(_literal2, "_literal");
|
|
27897
28196
|
__name22(_literal2, "_literal");
|
|
28197
|
+
// @__NO_SIDE_EFFECTS__
|
|
27898
28198
|
function _file2(Class22, params) {
|
|
27899
28199
|
return new Class22({
|
|
27900
28200
|
type: "file",
|
|
@@ -27904,6 +28204,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27904
28204
|
__name(_file2, "_file");
|
|
27905
28205
|
__name2(_file2, "_file");
|
|
27906
28206
|
__name22(_file2, "_file");
|
|
28207
|
+
// @__NO_SIDE_EFFECTS__
|
|
27907
28208
|
function _transform2(Class22, fn) {
|
|
27908
28209
|
return new Class22({
|
|
27909
28210
|
type: "transform",
|
|
@@ -27913,6 +28214,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27913
28214
|
__name(_transform2, "_transform");
|
|
27914
28215
|
__name2(_transform2, "_transform");
|
|
27915
28216
|
__name22(_transform2, "_transform");
|
|
28217
|
+
// @__NO_SIDE_EFFECTS__
|
|
27916
28218
|
function _optional2(Class22, innerType) {
|
|
27917
28219
|
return new Class22({
|
|
27918
28220
|
type: "optional",
|
|
@@ -27922,6 +28224,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27922
28224
|
__name(_optional2, "_optional");
|
|
27923
28225
|
__name2(_optional2, "_optional");
|
|
27924
28226
|
__name22(_optional2, "_optional");
|
|
28227
|
+
// @__NO_SIDE_EFFECTS__
|
|
27925
28228
|
function _nullable2(Class22, innerType) {
|
|
27926
28229
|
return new Class22({
|
|
27927
28230
|
type: "nullable",
|
|
@@ -27931,6 +28234,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27931
28234
|
__name(_nullable2, "_nullable");
|
|
27932
28235
|
__name2(_nullable2, "_nullable");
|
|
27933
28236
|
__name22(_nullable2, "_nullable");
|
|
28237
|
+
// @__NO_SIDE_EFFECTS__
|
|
27934
28238
|
function _default3(Class22, innerType, defaultValue) {
|
|
27935
28239
|
return new Class22({
|
|
27936
28240
|
type: "default",
|
|
@@ -27943,6 +28247,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27943
28247
|
__name(_default3, "_default");
|
|
27944
28248
|
__name2(_default3, "_default");
|
|
27945
28249
|
__name22(_default3, "_default");
|
|
28250
|
+
// @__NO_SIDE_EFFECTS__
|
|
27946
28251
|
function _nonoptional2(Class22, innerType, params) {
|
|
27947
28252
|
return new Class22({
|
|
27948
28253
|
type: "nonoptional",
|
|
@@ -27953,6 +28258,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27953
28258
|
__name(_nonoptional2, "_nonoptional");
|
|
27954
28259
|
__name2(_nonoptional2, "_nonoptional");
|
|
27955
28260
|
__name22(_nonoptional2, "_nonoptional");
|
|
28261
|
+
// @__NO_SIDE_EFFECTS__
|
|
27956
28262
|
function _success2(Class22, innerType) {
|
|
27957
28263
|
return new Class22({
|
|
27958
28264
|
type: "success",
|
|
@@ -27962,6 +28268,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27962
28268
|
__name(_success2, "_success");
|
|
27963
28269
|
__name2(_success2, "_success");
|
|
27964
28270
|
__name22(_success2, "_success");
|
|
28271
|
+
// @__NO_SIDE_EFFECTS__
|
|
27965
28272
|
function _catch3(Class22, innerType, catchValue) {
|
|
27966
28273
|
return new Class22({
|
|
27967
28274
|
type: "catch",
|
|
@@ -27972,6 +28279,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27972
28279
|
__name(_catch3, "_catch");
|
|
27973
28280
|
__name2(_catch3, "_catch");
|
|
27974
28281
|
__name22(_catch3, "_catch");
|
|
28282
|
+
// @__NO_SIDE_EFFECTS__
|
|
27975
28283
|
function _pipe2(Class22, in_, out) {
|
|
27976
28284
|
return new Class22({
|
|
27977
28285
|
type: "pipe",
|
|
@@ -27982,6 +28290,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27982
28290
|
__name(_pipe2, "_pipe");
|
|
27983
28291
|
__name2(_pipe2, "_pipe");
|
|
27984
28292
|
__name22(_pipe2, "_pipe");
|
|
28293
|
+
// @__NO_SIDE_EFFECTS__
|
|
27985
28294
|
function _readonly2(Class22, innerType) {
|
|
27986
28295
|
return new Class22({
|
|
27987
28296
|
type: "readonly",
|
|
@@ -27991,6 +28300,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
27991
28300
|
__name(_readonly2, "_readonly");
|
|
27992
28301
|
__name2(_readonly2, "_readonly");
|
|
27993
28302
|
__name22(_readonly2, "_readonly");
|
|
28303
|
+
// @__NO_SIDE_EFFECTS__
|
|
27994
28304
|
function _templateLiteral2(Class22, parts, params) {
|
|
27995
28305
|
return new Class22({
|
|
27996
28306
|
type: "template_literal",
|
|
@@ -28001,6 +28311,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28001
28311
|
__name(_templateLiteral2, "_templateLiteral");
|
|
28002
28312
|
__name2(_templateLiteral2, "_templateLiteral");
|
|
28003
28313
|
__name22(_templateLiteral2, "_templateLiteral");
|
|
28314
|
+
// @__NO_SIDE_EFFECTS__
|
|
28004
28315
|
function _lazy2(Class22, getter) {
|
|
28005
28316
|
return new Class22({
|
|
28006
28317
|
type: "lazy",
|
|
@@ -28010,6 +28321,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28010
28321
|
__name(_lazy2, "_lazy");
|
|
28011
28322
|
__name2(_lazy2, "_lazy");
|
|
28012
28323
|
__name22(_lazy2, "_lazy");
|
|
28324
|
+
// @__NO_SIDE_EFFECTS__
|
|
28013
28325
|
function _promise2(Class22, innerType) {
|
|
28014
28326
|
return new Class22({
|
|
28015
28327
|
type: "promise",
|
|
@@ -28019,6 +28331,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28019
28331
|
__name(_promise2, "_promise");
|
|
28020
28332
|
__name2(_promise2, "_promise");
|
|
28021
28333
|
__name22(_promise2, "_promise");
|
|
28334
|
+
// @__NO_SIDE_EFFECTS__
|
|
28022
28335
|
function _custom2(Class22, fn, _params) {
|
|
28023
28336
|
const norm = normalizeParams2(_params);
|
|
28024
28337
|
norm.abort ?? (norm.abort = true);
|
|
@@ -28033,6 +28346,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28033
28346
|
__name(_custom2, "_custom");
|
|
28034
28347
|
__name2(_custom2, "_custom");
|
|
28035
28348
|
__name22(_custom2, "_custom");
|
|
28349
|
+
// @__NO_SIDE_EFFECTS__
|
|
28036
28350
|
function _refine2(Class22, fn, _params) {
|
|
28037
28351
|
const schema = new Class22({
|
|
28038
28352
|
type: "custom",
|
|
@@ -28045,6 +28359,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28045
28359
|
__name(_refine2, "_refine");
|
|
28046
28360
|
__name2(_refine2, "_refine");
|
|
28047
28361
|
__name22(_refine2, "_refine");
|
|
28362
|
+
// @__NO_SIDE_EFFECTS__
|
|
28048
28363
|
function _superRefine2(fn, params) {
|
|
28049
28364
|
const ch = /* @__PURE__ */ _check2((payload) => {
|
|
28050
28365
|
payload.addIssue = (issue22) => {
|
|
@@ -28068,6 +28383,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28068
28383
|
__name(_superRefine2, "_superRefine");
|
|
28069
28384
|
__name2(_superRefine2, "_superRefine");
|
|
28070
28385
|
__name22(_superRefine2, "_superRefine");
|
|
28386
|
+
// @__NO_SIDE_EFFECTS__
|
|
28071
28387
|
function _check2(fn, params) {
|
|
28072
28388
|
const ch = new $ZodCheck2({
|
|
28073
28389
|
check: "custom",
|
|
@@ -28079,6 +28395,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28079
28395
|
__name(_check2, "_check");
|
|
28080
28396
|
__name2(_check2, "_check");
|
|
28081
28397
|
__name22(_check2, "_check");
|
|
28398
|
+
// @__NO_SIDE_EFFECTS__
|
|
28082
28399
|
function describe3(description) {
|
|
28083
28400
|
const ch = new $ZodCheck2({ check: "describe" });
|
|
28084
28401
|
ch._zod.onattach = [
|
|
@@ -28094,6 +28411,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28094
28411
|
__name(describe3, "describe");
|
|
28095
28412
|
__name2(describe3, "describe");
|
|
28096
28413
|
__name22(describe3, "describe");
|
|
28414
|
+
// @__NO_SIDE_EFFECTS__
|
|
28097
28415
|
function meta3(metadata) {
|
|
28098
28416
|
const ch = new $ZodCheck2({ check: "meta" });
|
|
28099
28417
|
ch._zod.onattach = [
|
|
@@ -28109,6 +28427,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28109
28427
|
__name(meta3, "meta");
|
|
28110
28428
|
__name2(meta3, "meta");
|
|
28111
28429
|
__name22(meta3, "meta");
|
|
28430
|
+
// @__NO_SIDE_EFFECTS__
|
|
28112
28431
|
function _stringbool2(Classes, _params) {
|
|
28113
28432
|
const params = normalizeParams2(_params);
|
|
28114
28433
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
@@ -28128,7 +28447,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28128
28447
|
type: "pipe",
|
|
28129
28448
|
in: stringSchema,
|
|
28130
28449
|
out: booleanSchema,
|
|
28131
|
-
transform: /* @__PURE__ */ __name22((input, payload) => {
|
|
28450
|
+
transform: /* @__PURE__ */ __name22(((input, payload) => {
|
|
28132
28451
|
let data = input;
|
|
28133
28452
|
if (params.case !== "sensitive")
|
|
28134
28453
|
data = data.toLowerCase();
|
|
@@ -28147,14 +28466,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
28147
28466
|
});
|
|
28148
28467
|
return {};
|
|
28149
28468
|
}
|
|
28150
|
-
}, "transform"),
|
|
28151
|
-
reverseTransform: /* @__PURE__ */ __name22((input, _payload) => {
|
|
28469
|
+
}), "transform"),
|
|
28470
|
+
reverseTransform: /* @__PURE__ */ __name22(((input, _payload) => {
|
|
28152
28471
|
if (input === true) {
|
|
28153
28472
|
return truthyArray[0] || "true";
|
|
28154
28473
|
} else {
|
|
28155
28474
|
return falsyArray[0] || "false";
|
|
28156
28475
|
}
|
|
28157
|
-
}, "reverseTransform"),
|
|
28476
|
+
}), "reverseTransform"),
|
|
28158
28477
|
error: params.error
|
|
28159
28478
|
});
|
|
28160
28479
|
return codec22;
|
|
@@ -28162,6 +28481,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
28162
28481
|
__name(_stringbool2, "_stringbool");
|
|
28163
28482
|
__name2(_stringbool2, "_stringbool");
|
|
28164
28483
|
__name22(_stringbool2, "_stringbool");
|
|
28484
|
+
// @__NO_SIDE_EFFECTS__
|
|
28165
28485
|
function _stringFormat2(Class22, format, fnOrRegex, _params = {}) {
|
|
28166
28486
|
const params = normalizeParams2(_params);
|
|
28167
28487
|
const def = {
|
|
@@ -28559,6 +28879,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
28559
28879
|
datetime: "date-time",
|
|
28560
28880
|
json_string: "json-string",
|
|
28561
28881
|
regex: ""
|
|
28882
|
+
// do not set
|
|
28562
28883
|
};
|
|
28563
28884
|
var stringProcessor2 = /* @__PURE__ */ __name22((schema, ctx, _json, _params) => {
|
|
28564
28885
|
const json22 = _json;
|
|
@@ -29097,28 +29418,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29097
29418
|
__name(toJSONSchema2, "toJSONSchema");
|
|
29098
29419
|
__name2(toJSONSchema2, "toJSONSchema");
|
|
29099
29420
|
__name22(toJSONSchema2, "toJSONSchema");
|
|
29100
|
-
var JSONSchemaGenerator2 =
|
|
29421
|
+
var JSONSchemaGenerator2 = (_f = class {
|
|
29422
|
+
/** @deprecated Access via ctx instead */
|
|
29101
29423
|
get metadataRegistry() {
|
|
29102
29424
|
return this.ctx.metadataRegistry;
|
|
29103
29425
|
}
|
|
29426
|
+
/** @deprecated Access via ctx instead */
|
|
29104
29427
|
get target() {
|
|
29105
29428
|
return this.ctx.target;
|
|
29106
29429
|
}
|
|
29430
|
+
/** @deprecated Access via ctx instead */
|
|
29107
29431
|
get unrepresentable() {
|
|
29108
29432
|
return this.ctx.unrepresentable;
|
|
29109
29433
|
}
|
|
29434
|
+
/** @deprecated Access via ctx instead */
|
|
29110
29435
|
get override() {
|
|
29111
29436
|
return this.ctx.override;
|
|
29112
29437
|
}
|
|
29438
|
+
/** @deprecated Access via ctx instead */
|
|
29113
29439
|
get io() {
|
|
29114
29440
|
return this.ctx.io;
|
|
29115
29441
|
}
|
|
29442
|
+
/** @deprecated Access via ctx instead */
|
|
29116
29443
|
get counter() {
|
|
29117
29444
|
return this.ctx.counter;
|
|
29118
29445
|
}
|
|
29119
29446
|
set counter(value) {
|
|
29120
29447
|
this.ctx.counter = value;
|
|
29121
29448
|
}
|
|
29449
|
+
/** @deprecated Access via ctx instead */
|
|
29122
29450
|
get seen() {
|
|
29123
29451
|
return this.ctx.seen;
|
|
29124
29452
|
}
|
|
@@ -29137,9 +29465,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29137
29465
|
...params?.io && { io: params.io }
|
|
29138
29466
|
});
|
|
29139
29467
|
}
|
|
29468
|
+
/**
|
|
29469
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
29470
|
+
* This must be called before emit().
|
|
29471
|
+
*/
|
|
29140
29472
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
29141
29473
|
return process22(schema, this.ctx, _params);
|
|
29142
29474
|
}
|
|
29475
|
+
/**
|
|
29476
|
+
* Emit the final JSON Schema after processing.
|
|
29477
|
+
* Must call process() first.
|
|
29478
|
+
*/
|
|
29143
29479
|
emit(schema, _params) {
|
|
29144
29480
|
if (_params) {
|
|
29145
29481
|
if (_params.cycles)
|
|
@@ -29154,11 +29490,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29154
29490
|
const { "~standard": _, ...plainResult } = result;
|
|
29155
29491
|
return plainResult;
|
|
29156
29492
|
}
|
|
29157
|
-
}, "
|
|
29158
|
-
__name2(_f, "JSONSchemaGenerator");
|
|
29159
|
-
})(), (() => {
|
|
29160
|
-
__name22(_f, "JSONSchemaGenerator");
|
|
29161
|
-
})(), _f), "JSONSchemaGenerator");
|
|
29493
|
+
}, __name(_f, "JSONSchemaGenerator"), __name2(_f, "JSONSchemaGenerator"), __name22(_f, "JSONSchemaGenerator"), _f);
|
|
29162
29494
|
var json_schema_exports2 = {};
|
|
29163
29495
|
var schemas_exports22 = {};
|
|
29164
29496
|
__export22(schemas_exports22, {
|
|
@@ -29418,26 +29750,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
29418
29750
|
Object.defineProperties(inst, {
|
|
29419
29751
|
format: {
|
|
29420
29752
|
value: /* @__PURE__ */ __name22((mapper) => formatError2(inst, mapper), "value")
|
|
29753
|
+
// enumerable: false,
|
|
29421
29754
|
},
|
|
29422
29755
|
flatten: {
|
|
29423
29756
|
value: /* @__PURE__ */ __name22((mapper) => flattenError2(inst, mapper), "value")
|
|
29757
|
+
// enumerable: false,
|
|
29424
29758
|
},
|
|
29425
29759
|
addIssue: {
|
|
29426
29760
|
value: /* @__PURE__ */ __name22((issue22) => {
|
|
29427
29761
|
inst.issues.push(issue22);
|
|
29428
29762
|
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2);
|
|
29429
29763
|
}, "value")
|
|
29764
|
+
// enumerable: false,
|
|
29430
29765
|
},
|
|
29431
29766
|
addIssues: {
|
|
29432
29767
|
value: /* @__PURE__ */ __name22((issues2) => {
|
|
29433
29768
|
inst.issues.push(...issues2);
|
|
29434
29769
|
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2);
|
|
29435
29770
|
}, "value")
|
|
29771
|
+
// enumerable: false,
|
|
29436
29772
|
},
|
|
29437
29773
|
isEmpty: {
|
|
29438
29774
|
get() {
|
|
29439
29775
|
return inst.issues.length === 0;
|
|
29440
29776
|
}
|
|
29777
|
+
// enumerable: false,
|
|
29441
29778
|
}
|
|
29442
29779
|
});
|
|
29443
29780
|
}, "initializer");
|
|
@@ -30825,6 +31162,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30825
31162
|
type: "pipe",
|
|
30826
31163
|
in: in_,
|
|
30827
31164
|
out
|
|
31165
|
+
// ...util.normalizeParams(params),
|
|
30828
31166
|
});
|
|
30829
31167
|
}
|
|
30830
31168
|
__name(pipe2, "pipe");
|
|
@@ -30946,6 +31284,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
30946
31284
|
function check2(fn) {
|
|
30947
31285
|
const ch = new $ZodCheck2({
|
|
30948
31286
|
check: "custom"
|
|
31287
|
+
// ...util.normalizeParams(params),
|
|
30949
31288
|
});
|
|
30950
31289
|
ch._zod.check = fn;
|
|
30951
31290
|
return ch;
|
|
@@ -31052,16 +31391,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31052
31391
|
var ZodFirstPartyTypeKind2;
|
|
31053
31392
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind22) {
|
|
31054
31393
|
})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
|
|
31055
|
-
var
|
|
31394
|
+
var z3 = {
|
|
31056
31395
|
...schemas_exports22,
|
|
31057
31396
|
...checks_exports22,
|
|
31058
31397
|
iso: iso_exports2
|
|
31059
31398
|
};
|
|
31060
31399
|
var RECOGNIZED_KEYS2 = /* @__PURE__ */ new Set([
|
|
31400
|
+
// Schema identification
|
|
31061
31401
|
"$schema",
|
|
31062
31402
|
"$ref",
|
|
31063
31403
|
"$defs",
|
|
31064
31404
|
"definitions",
|
|
31405
|
+
// Core schema keywords
|
|
31065
31406
|
"$id",
|
|
31066
31407
|
"id",
|
|
31067
31408
|
"$comment",
|
|
@@ -31069,13 +31410,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31069
31410
|
"$vocabulary",
|
|
31070
31411
|
"$dynamicRef",
|
|
31071
31412
|
"$dynamicAnchor",
|
|
31413
|
+
// Type
|
|
31072
31414
|
"type",
|
|
31073
31415
|
"enum",
|
|
31074
31416
|
"const",
|
|
31417
|
+
// Composition
|
|
31075
31418
|
"anyOf",
|
|
31076
31419
|
"oneOf",
|
|
31077
31420
|
"allOf",
|
|
31078
31421
|
"not",
|
|
31422
|
+
// Object
|
|
31079
31423
|
"properties",
|
|
31080
31424
|
"required",
|
|
31081
31425
|
"additionalProperties",
|
|
@@ -31083,6 +31427,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31083
31427
|
"propertyNames",
|
|
31084
31428
|
"minProperties",
|
|
31085
31429
|
"maxProperties",
|
|
31430
|
+
// Array
|
|
31086
31431
|
"items",
|
|
31087
31432
|
"prefixItems",
|
|
31088
31433
|
"additionalItems",
|
|
@@ -31092,20 +31437,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31092
31437
|
"contains",
|
|
31093
31438
|
"minContains",
|
|
31094
31439
|
"maxContains",
|
|
31440
|
+
// String
|
|
31095
31441
|
"minLength",
|
|
31096
31442
|
"maxLength",
|
|
31097
31443
|
"pattern",
|
|
31098
31444
|
"format",
|
|
31445
|
+
// Number
|
|
31099
31446
|
"minimum",
|
|
31100
31447
|
"maximum",
|
|
31101
31448
|
"exclusiveMinimum",
|
|
31102
31449
|
"exclusiveMaximum",
|
|
31103
31450
|
"multipleOf",
|
|
31451
|
+
// Already handled metadata
|
|
31104
31452
|
"description",
|
|
31105
31453
|
"default",
|
|
31454
|
+
// Content
|
|
31106
31455
|
"contentEncoding",
|
|
31107
31456
|
"contentMediaType",
|
|
31108
31457
|
"contentSchema",
|
|
31458
|
+
// Unsupported (error-throwing)
|
|
31109
31459
|
"unevaluatedItems",
|
|
31110
31460
|
"unevaluatedProperties",
|
|
31111
31461
|
"if",
|
|
@@ -31113,6 +31463,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31113
31463
|
"else",
|
|
31114
31464
|
"dependentSchemas",
|
|
31115
31465
|
"dependentRequired",
|
|
31466
|
+
// OpenAPI
|
|
31116
31467
|
"nullable",
|
|
31117
31468
|
"readOnly"
|
|
31118
31469
|
]);
|
|
@@ -31156,7 +31507,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31156
31507
|
function convertBaseSchema2(schema, ctx) {
|
|
31157
31508
|
if (schema.not !== void 0) {
|
|
31158
31509
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
31159
|
-
return
|
|
31510
|
+
return z3.never();
|
|
31160
31511
|
}
|
|
31161
31512
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
31162
31513
|
}
|
|
@@ -31178,7 +31529,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31178
31529
|
return ctx.refs.get(refPath);
|
|
31179
31530
|
}
|
|
31180
31531
|
if (ctx.processing.has(refPath)) {
|
|
31181
|
-
return
|
|
31532
|
+
return z3.lazy(() => {
|
|
31182
31533
|
if (!ctx.refs.has(refPath)) {
|
|
31183
31534
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
31184
31535
|
}
|
|
@@ -31195,25 +31546,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31195
31546
|
if (schema.enum !== void 0) {
|
|
31196
31547
|
const enumValues = schema.enum;
|
|
31197
31548
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
31198
|
-
return
|
|
31549
|
+
return z3.null();
|
|
31199
31550
|
}
|
|
31200
31551
|
if (enumValues.length === 0) {
|
|
31201
|
-
return
|
|
31552
|
+
return z3.never();
|
|
31202
31553
|
}
|
|
31203
31554
|
if (enumValues.length === 1) {
|
|
31204
|
-
return
|
|
31555
|
+
return z3.literal(enumValues[0]);
|
|
31205
31556
|
}
|
|
31206
31557
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
31207
|
-
return
|
|
31558
|
+
return z3.enum(enumValues);
|
|
31208
31559
|
}
|
|
31209
|
-
const literalSchemas = enumValues.map((v) =>
|
|
31560
|
+
const literalSchemas = enumValues.map((v) => z3.literal(v));
|
|
31210
31561
|
if (literalSchemas.length < 2) {
|
|
31211
31562
|
return literalSchemas[0];
|
|
31212
31563
|
}
|
|
31213
|
-
return
|
|
31564
|
+
return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
31214
31565
|
}
|
|
31215
31566
|
if (schema.const !== void 0) {
|
|
31216
|
-
return
|
|
31567
|
+
return z3.literal(schema.const);
|
|
31217
31568
|
}
|
|
31218
31569
|
const type = schema.type;
|
|
31219
31570
|
if (Array.isArray(type)) {
|
|
@@ -31222,68 +31573,68 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31222
31573
|
return convertBaseSchema2(typeSchema, ctx);
|
|
31223
31574
|
});
|
|
31224
31575
|
if (typeSchemas.length === 0) {
|
|
31225
|
-
return
|
|
31576
|
+
return z3.never();
|
|
31226
31577
|
}
|
|
31227
31578
|
if (typeSchemas.length === 1) {
|
|
31228
31579
|
return typeSchemas[0];
|
|
31229
31580
|
}
|
|
31230
|
-
return
|
|
31581
|
+
return z3.union(typeSchemas);
|
|
31231
31582
|
}
|
|
31232
31583
|
if (!type) {
|
|
31233
|
-
return
|
|
31584
|
+
return z3.any();
|
|
31234
31585
|
}
|
|
31235
31586
|
let zodSchema;
|
|
31236
31587
|
switch (type) {
|
|
31237
31588
|
case "string": {
|
|
31238
|
-
let stringSchema =
|
|
31589
|
+
let stringSchema = z3.string();
|
|
31239
31590
|
if (schema.format) {
|
|
31240
31591
|
const format = schema.format;
|
|
31241
31592
|
if (format === "email") {
|
|
31242
|
-
stringSchema = stringSchema.check(
|
|
31593
|
+
stringSchema = stringSchema.check(z3.email());
|
|
31243
31594
|
} else if (format === "uri" || format === "uri-reference") {
|
|
31244
|
-
stringSchema = stringSchema.check(
|
|
31595
|
+
stringSchema = stringSchema.check(z3.url());
|
|
31245
31596
|
} else if (format === "uuid" || format === "guid") {
|
|
31246
|
-
stringSchema = stringSchema.check(
|
|
31597
|
+
stringSchema = stringSchema.check(z3.uuid());
|
|
31247
31598
|
} else if (format === "date-time") {
|
|
31248
|
-
stringSchema = stringSchema.check(
|
|
31599
|
+
stringSchema = stringSchema.check(z3.iso.datetime());
|
|
31249
31600
|
} else if (format === "date") {
|
|
31250
|
-
stringSchema = stringSchema.check(
|
|
31601
|
+
stringSchema = stringSchema.check(z3.iso.date());
|
|
31251
31602
|
} else if (format === "time") {
|
|
31252
|
-
stringSchema = stringSchema.check(
|
|
31603
|
+
stringSchema = stringSchema.check(z3.iso.time());
|
|
31253
31604
|
} else if (format === "duration") {
|
|
31254
|
-
stringSchema = stringSchema.check(
|
|
31605
|
+
stringSchema = stringSchema.check(z3.iso.duration());
|
|
31255
31606
|
} else if (format === "ipv4") {
|
|
31256
|
-
stringSchema = stringSchema.check(
|
|
31607
|
+
stringSchema = stringSchema.check(z3.ipv4());
|
|
31257
31608
|
} else if (format === "ipv6") {
|
|
31258
|
-
stringSchema = stringSchema.check(
|
|
31609
|
+
stringSchema = stringSchema.check(z3.ipv6());
|
|
31259
31610
|
} else if (format === "mac") {
|
|
31260
|
-
stringSchema = stringSchema.check(
|
|
31611
|
+
stringSchema = stringSchema.check(z3.mac());
|
|
31261
31612
|
} else if (format === "cidr") {
|
|
31262
|
-
stringSchema = stringSchema.check(
|
|
31613
|
+
stringSchema = stringSchema.check(z3.cidrv4());
|
|
31263
31614
|
} else if (format === "cidr-v6") {
|
|
31264
|
-
stringSchema = stringSchema.check(
|
|
31615
|
+
stringSchema = stringSchema.check(z3.cidrv6());
|
|
31265
31616
|
} else if (format === "base64") {
|
|
31266
|
-
stringSchema = stringSchema.check(
|
|
31617
|
+
stringSchema = stringSchema.check(z3.base64());
|
|
31267
31618
|
} else if (format === "base64url") {
|
|
31268
|
-
stringSchema = stringSchema.check(
|
|
31619
|
+
stringSchema = stringSchema.check(z3.base64url());
|
|
31269
31620
|
} else if (format === "e164") {
|
|
31270
|
-
stringSchema = stringSchema.check(
|
|
31621
|
+
stringSchema = stringSchema.check(z3.e164());
|
|
31271
31622
|
} else if (format === "jwt") {
|
|
31272
|
-
stringSchema = stringSchema.check(
|
|
31623
|
+
stringSchema = stringSchema.check(z3.jwt());
|
|
31273
31624
|
} else if (format === "emoji") {
|
|
31274
|
-
stringSchema = stringSchema.check(
|
|
31625
|
+
stringSchema = stringSchema.check(z3.emoji());
|
|
31275
31626
|
} else if (format === "nanoid") {
|
|
31276
|
-
stringSchema = stringSchema.check(
|
|
31627
|
+
stringSchema = stringSchema.check(z3.nanoid());
|
|
31277
31628
|
} else if (format === "cuid") {
|
|
31278
|
-
stringSchema = stringSchema.check(
|
|
31629
|
+
stringSchema = stringSchema.check(z3.cuid());
|
|
31279
31630
|
} else if (format === "cuid2") {
|
|
31280
|
-
stringSchema = stringSchema.check(
|
|
31631
|
+
stringSchema = stringSchema.check(z3.cuid2());
|
|
31281
31632
|
} else if (format === "ulid") {
|
|
31282
|
-
stringSchema = stringSchema.check(
|
|
31633
|
+
stringSchema = stringSchema.check(z3.ulid());
|
|
31283
31634
|
} else if (format === "xid") {
|
|
31284
|
-
stringSchema = stringSchema.check(
|
|
31635
|
+
stringSchema = stringSchema.check(z3.xid());
|
|
31285
31636
|
} else if (format === "ksuid") {
|
|
31286
|
-
stringSchema = stringSchema.check(
|
|
31637
|
+
stringSchema = stringSchema.check(z3.ksuid());
|
|
31287
31638
|
}
|
|
31288
31639
|
}
|
|
31289
31640
|
if (typeof schema.minLength === "number") {
|
|
@@ -31300,7 +31651,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31300
31651
|
}
|
|
31301
31652
|
case "number":
|
|
31302
31653
|
case "integer": {
|
|
31303
|
-
let numberSchema = type === "integer" ?
|
|
31654
|
+
let numberSchema = type === "integer" ? z3.number().int() : z3.number();
|
|
31304
31655
|
if (typeof schema.minimum === "number") {
|
|
31305
31656
|
numberSchema = numberSchema.min(schema.minimum);
|
|
31306
31657
|
}
|
|
@@ -31324,11 +31675,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31324
31675
|
break;
|
|
31325
31676
|
}
|
|
31326
31677
|
case "boolean": {
|
|
31327
|
-
zodSchema =
|
|
31678
|
+
zodSchema = z3.boolean();
|
|
31328
31679
|
break;
|
|
31329
31680
|
}
|
|
31330
31681
|
case "null": {
|
|
31331
|
-
zodSchema =
|
|
31682
|
+
zodSchema = z3.null();
|
|
31332
31683
|
break;
|
|
31333
31684
|
}
|
|
31334
31685
|
case "object": {
|
|
@@ -31341,14 +31692,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31341
31692
|
}
|
|
31342
31693
|
if (schema.propertyNames) {
|
|
31343
31694
|
const keySchema = convertSchema2(schema.propertyNames, ctx);
|
|
31344
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) :
|
|
31695
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) : z3.any();
|
|
31345
31696
|
if (Object.keys(shape).length === 0) {
|
|
31346
|
-
zodSchema =
|
|
31697
|
+
zodSchema = z3.record(keySchema, valueSchema);
|
|
31347
31698
|
break;
|
|
31348
31699
|
}
|
|
31349
|
-
const objectSchema2 =
|
|
31350
|
-
const recordSchema =
|
|
31351
|
-
zodSchema =
|
|
31700
|
+
const objectSchema2 = z3.object(shape).passthrough();
|
|
31701
|
+
const recordSchema = z3.looseRecord(keySchema, valueSchema);
|
|
31702
|
+
zodSchema = z3.intersection(objectSchema2, recordSchema);
|
|
31352
31703
|
break;
|
|
31353
31704
|
}
|
|
31354
31705
|
if (schema.patternProperties) {
|
|
@@ -31357,28 +31708,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31357
31708
|
const looseRecords = [];
|
|
31358
31709
|
for (const pattern of patternKeys) {
|
|
31359
31710
|
const patternValue = convertSchema2(patternProps[pattern], ctx);
|
|
31360
|
-
const keySchema =
|
|
31361
|
-
looseRecords.push(
|
|
31711
|
+
const keySchema = z3.string().regex(new RegExp(pattern));
|
|
31712
|
+
looseRecords.push(z3.looseRecord(keySchema, patternValue));
|
|
31362
31713
|
}
|
|
31363
31714
|
const schemasToIntersect = [];
|
|
31364
31715
|
if (Object.keys(shape).length > 0) {
|
|
31365
|
-
schemasToIntersect.push(
|
|
31716
|
+
schemasToIntersect.push(z3.object(shape).passthrough());
|
|
31366
31717
|
}
|
|
31367
31718
|
schemasToIntersect.push(...looseRecords);
|
|
31368
31719
|
if (schemasToIntersect.length === 0) {
|
|
31369
|
-
zodSchema =
|
|
31720
|
+
zodSchema = z3.object({}).passthrough();
|
|
31370
31721
|
} else if (schemasToIntersect.length === 1) {
|
|
31371
31722
|
zodSchema = schemasToIntersect[0];
|
|
31372
31723
|
} else {
|
|
31373
|
-
let result =
|
|
31724
|
+
let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
31374
31725
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
31375
|
-
result =
|
|
31726
|
+
result = z3.intersection(result, schemasToIntersect[i]);
|
|
31376
31727
|
}
|
|
31377
31728
|
zodSchema = result;
|
|
31378
31729
|
}
|
|
31379
31730
|
break;
|
|
31380
31731
|
}
|
|
31381
|
-
const objectSchema =
|
|
31732
|
+
const objectSchema = z3.object(shape);
|
|
31382
31733
|
if (schema.additionalProperties === false) {
|
|
31383
31734
|
zodSchema = objectSchema.strict();
|
|
31384
31735
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -31395,33 +31746,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31395
31746
|
const tupleItems = prefixItems.map((item) => convertSchema2(item, ctx));
|
|
31396
31747
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema2(items, ctx) : void 0;
|
|
31397
31748
|
if (rest) {
|
|
31398
|
-
zodSchema =
|
|
31749
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
31399
31750
|
} else {
|
|
31400
|
-
zodSchema =
|
|
31751
|
+
zodSchema = z3.tuple(tupleItems);
|
|
31401
31752
|
}
|
|
31402
31753
|
if (typeof schema.minItems === "number") {
|
|
31403
|
-
zodSchema = zodSchema.check(
|
|
31754
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
31404
31755
|
}
|
|
31405
31756
|
if (typeof schema.maxItems === "number") {
|
|
31406
|
-
zodSchema = zodSchema.check(
|
|
31757
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
31407
31758
|
}
|
|
31408
31759
|
} else if (Array.isArray(items)) {
|
|
31409
31760
|
const tupleItems = items.map((item) => convertSchema2(item, ctx));
|
|
31410
31761
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema2(schema.additionalItems, ctx) : void 0;
|
|
31411
31762
|
if (rest) {
|
|
31412
|
-
zodSchema =
|
|
31763
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
31413
31764
|
} else {
|
|
31414
|
-
zodSchema =
|
|
31765
|
+
zodSchema = z3.tuple(tupleItems);
|
|
31415
31766
|
}
|
|
31416
31767
|
if (typeof schema.minItems === "number") {
|
|
31417
|
-
zodSchema = zodSchema.check(
|
|
31768
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
31418
31769
|
}
|
|
31419
31770
|
if (typeof schema.maxItems === "number") {
|
|
31420
|
-
zodSchema = zodSchema.check(
|
|
31771
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
31421
31772
|
}
|
|
31422
31773
|
} else if (items !== void 0) {
|
|
31423
31774
|
const element = convertSchema2(items, ctx);
|
|
31424
|
-
let arraySchema =
|
|
31775
|
+
let arraySchema = z3.array(element);
|
|
31425
31776
|
if (typeof schema.minItems === "number") {
|
|
31426
31777
|
arraySchema = arraySchema.min(schema.minItems);
|
|
31427
31778
|
}
|
|
@@ -31430,7 +31781,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31430
31781
|
}
|
|
31431
31782
|
zodSchema = arraySchema;
|
|
31432
31783
|
} else {
|
|
31433
|
-
zodSchema =
|
|
31784
|
+
zodSchema = z3.array(z3.any());
|
|
31434
31785
|
}
|
|
31435
31786
|
break;
|
|
31436
31787
|
}
|
|
@@ -31444,37 +31795,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31444
31795
|
__name22(convertBaseSchema2, "convertBaseSchema");
|
|
31445
31796
|
function convertSchema2(schema, ctx) {
|
|
31446
31797
|
if (typeof schema === "boolean") {
|
|
31447
|
-
return schema ?
|
|
31798
|
+
return schema ? z3.any() : z3.never();
|
|
31448
31799
|
}
|
|
31449
31800
|
let baseSchema = convertBaseSchema2(schema, ctx);
|
|
31450
31801
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
31451
31802
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
31452
31803
|
const options = schema.anyOf.map((s) => convertSchema2(s, ctx));
|
|
31453
|
-
const anyOfUnion =
|
|
31454
|
-
baseSchema = hasExplicitType ?
|
|
31804
|
+
const anyOfUnion = z3.union(options);
|
|
31805
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
31455
31806
|
}
|
|
31456
31807
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
31457
31808
|
const options = schema.oneOf.map((s) => convertSchema2(s, ctx));
|
|
31458
|
-
const oneOfUnion =
|
|
31459
|
-
baseSchema = hasExplicitType ?
|
|
31809
|
+
const oneOfUnion = z3.xor(options);
|
|
31810
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
31460
31811
|
}
|
|
31461
31812
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
31462
31813
|
if (schema.allOf.length === 0) {
|
|
31463
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
31814
|
+
baseSchema = hasExplicitType ? baseSchema : z3.any();
|
|
31464
31815
|
} else {
|
|
31465
31816
|
let result = hasExplicitType ? baseSchema : convertSchema2(schema.allOf[0], ctx);
|
|
31466
31817
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
31467
31818
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
31468
|
-
result =
|
|
31819
|
+
result = z3.intersection(result, convertSchema2(schema.allOf[i], ctx));
|
|
31469
31820
|
}
|
|
31470
31821
|
baseSchema = result;
|
|
31471
31822
|
}
|
|
31472
31823
|
}
|
|
31473
31824
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
31474
|
-
baseSchema =
|
|
31825
|
+
baseSchema = z3.nullable(baseSchema);
|
|
31475
31826
|
}
|
|
31476
31827
|
if (schema.readOnly === true) {
|
|
31477
|
-
baseSchema =
|
|
31828
|
+
baseSchema = z3.readonly(baseSchema);
|
|
31478
31829
|
}
|
|
31479
31830
|
if (schema.default !== void 0) {
|
|
31480
31831
|
baseSchema = baseSchema.default(schema.default);
|
|
@@ -31510,7 +31861,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31510
31861
|
__name22(convertSchema2, "convertSchema");
|
|
31511
31862
|
function fromJSONSchema2(schema, params) {
|
|
31512
31863
|
if (typeof schema === "boolean") {
|
|
31513
|
-
return schema ?
|
|
31864
|
+
return schema ? z3.any() : z3.never();
|
|
31514
31865
|
}
|
|
31515
31866
|
let normalized;
|
|
31516
31867
|
try {
|
|
@@ -31634,12 +31985,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31634
31985
|
phone: external_exports2.string().optional(),
|
|
31635
31986
|
description: external_exports2.string().optional(),
|
|
31636
31987
|
endorsement: external_exports2.any().array().optional(),
|
|
31988
|
+
// Recursive type
|
|
31637
31989
|
image: ImageValidator2.optional(),
|
|
31638
31990
|
email: external_exports2.string().email().optional(),
|
|
31639
31991
|
address: AddressValidator2.optional(),
|
|
31640
31992
|
otherIdentifier: IdentifierEntryValidator2.array().optional(),
|
|
31641
31993
|
official: external_exports2.string().optional(),
|
|
31642
31994
|
parentOrg: external_exports2.any().optional(),
|
|
31995
|
+
// Recursive types are annoying =(
|
|
31643
31996
|
familyName: external_exports2.string().optional(),
|
|
31644
31997
|
givenName: external_exports2.string().optional(),
|
|
31645
31998
|
additionalName: external_exports2.string().optional(),
|
|
@@ -31687,11 +32040,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31687
32040
|
credentialSchema: CredentialSchemaValidator2.or(
|
|
31688
32041
|
CredentialSchemaValidator2.array()
|
|
31689
32042
|
).optional(),
|
|
32043
|
+
// V1
|
|
31690
32044
|
issuanceDate: external_exports2.string().optional(),
|
|
31691
32045
|
expirationDate: external_exports2.string().optional(),
|
|
31692
32046
|
credentialStatus: CredentialStatusValidator2.or(
|
|
31693
32047
|
CredentialStatusValidator2.array()
|
|
31694
32048
|
).optional(),
|
|
32049
|
+
// V2
|
|
31695
32050
|
name: external_exports2.string().optional(),
|
|
31696
32051
|
description: external_exports2.string().optional(),
|
|
31697
32052
|
validFrom: external_exports2.string().optional(),
|
|
@@ -32020,26 +32375,59 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32020
32375
|
data: external_exports2.string()
|
|
32021
32376
|
}).passthrough();
|
|
32022
32377
|
var isStoredCredentialEnvelope2 = /* @__PURE__ */ __name22((value) => {
|
|
32023
|
-
if (!value || typeof value !== "object")
|
|
32024
|
-
return false;
|
|
32378
|
+
if (!value || typeof value !== "object") return false;
|
|
32025
32379
|
const candidate = value;
|
|
32026
|
-
if (typeof candidate.format !== "string")
|
|
32027
|
-
|
|
32028
|
-
if (!CredentialFormatValidator2.safeParse(candidate.format).success)
|
|
32029
|
-
return false;
|
|
32380
|
+
if (typeof candidate.format !== "string") return false;
|
|
32381
|
+
if (!CredentialFormatValidator2.safeParse(candidate.format).success) return false;
|
|
32030
32382
|
return typeof candidate.data === "string" || candidate.data instanceof Uint8Array;
|
|
32031
32383
|
}, "isStoredCredentialEnvelope");
|
|
32032
32384
|
var StatusCheckEntryValidator2 = external_exports2.object({
|
|
32385
|
+
/**
|
|
32386
|
+
* The `credentialStatus.type` as it appeared on the credential.
|
|
32387
|
+
* One of `BitstringStatusListEntry`, `StatusList2021Entry`,
|
|
32388
|
+
* `RevocationList2020Status`, or any future custom status type.
|
|
32389
|
+
*/
|
|
32033
32390
|
entryType: external_exports2.string(),
|
|
32391
|
+
/**
|
|
32392
|
+
* The claimed purpose of the entry. Standard values are
|
|
32393
|
+
* `"revocation"` and `"suspension"`; the spec allows arbitrary
|
|
32394
|
+
* strings.
|
|
32395
|
+
*/
|
|
32034
32396
|
statusPurpose: external_exports2.string(),
|
|
32397
|
+
/**
|
|
32398
|
+
* Whether the bit at the credential's index in the status list
|
|
32399
|
+
* bitstring was set.
|
|
32400
|
+
*/
|
|
32035
32401
|
isSet: external_exports2.boolean(),
|
|
32402
|
+
/** URL of the status list credential, when known. */
|
|
32036
32403
|
statusListCredential: external_exports2.string().optional(),
|
|
32404
|
+
/** Original (string) index within the status list. */
|
|
32037
32405
|
statusListIndex: external_exports2.string().optional()
|
|
32038
32406
|
});
|
|
32039
32407
|
var VerificationCheckValidator2 = external_exports2.object({
|
|
32408
|
+
/**
|
|
32409
|
+
* Checks that completed successfully. This does not imply that warnings can be ignored.
|
|
32410
|
+
*/
|
|
32040
32411
|
checks: external_exports2.string().array(),
|
|
32412
|
+
/**
|
|
32413
|
+
* Security-relevant conditions that did not prevent the requested cryptographic checks from
|
|
32414
|
+
* completing. In particular, a non-DID issuer warning means the signature is valid but the
|
|
32415
|
+
* named URL issuer's authorization of that signing key was not established.
|
|
32416
|
+
*/
|
|
32041
32417
|
warnings: external_exports2.string().array(),
|
|
32418
|
+
/** Verification failures that prevented one or more requested checks from succeeding. */
|
|
32042
32419
|
errors: external_exports2.string().array(),
|
|
32420
|
+
/**
|
|
32421
|
+
* Per-entry results for the `credentialStatus` check, populated
|
|
32422
|
+
* by `@learncard/didkit-plugin` when the verified credential
|
|
32423
|
+
* carries one or more `credentialStatus` entries. Empty / absent
|
|
32424
|
+
* for credentials without a status entry.
|
|
32425
|
+
*
|
|
32426
|
+
* Marked `.optional()` because the underlying `ssi-ldp`
|
|
32427
|
+
* serializer omits the field when empty (`skip_serializing_if`),
|
|
32428
|
+
* so older WASM builds that pre-date the structured-status
|
|
32429
|
+
* change still validate against this schema.
|
|
32430
|
+
*/
|
|
32043
32431
|
status: StatusCheckEntryValidator2.array().optional()
|
|
32044
32432
|
});
|
|
32045
32433
|
var VerificationStatusValidator2 = external_exports2.enum(["Success", "Failed", "Error"]);
|
|
@@ -32085,8 +32473,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32085
32473
|
});
|
|
32086
32474
|
var parseRegexString2 = /* @__PURE__ */ __name22((regexStr) => {
|
|
32087
32475
|
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
32088
|
-
if (!match)
|
|
32089
|
-
throw new Error("Invalid RegExp string format");
|
|
32476
|
+
if (!match) throw new Error("Invalid RegExp string format");
|
|
32090
32477
|
return { pattern: match[1], flags: match[2] };
|
|
32091
32478
|
}, "parseRegexString");
|
|
32092
32479
|
var RegExpStringValidator2 = external_exports2.string().refine(
|
|
@@ -32172,6 +32559,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32172
32559
|
isServiceProfile: true,
|
|
32173
32560
|
display: true
|
|
32174
32561
|
});
|
|
32562
|
+
var LCNConnectionPromptStatusValidator2 = external_exports2.enum(["PENDING", "SKIPPED", "CONNECTED"]);
|
|
32563
|
+
var LCNConnectionPromptSurfaceValidator2 = external_exports2.enum(["POST_CLAIM", "NOTIFICATION"]);
|
|
32564
|
+
var LCNConnectionPromptActionStatusValidator2 = external_exports2.enum([
|
|
32565
|
+
"PENDING",
|
|
32566
|
+
"SKIPPED",
|
|
32567
|
+
"CONNECTED",
|
|
32568
|
+
"STALE"
|
|
32569
|
+
]);
|
|
32570
|
+
var LCNConnectionPromptValidator2 = external_exports2.object({
|
|
32571
|
+
promptId: external_exports2.string().uuid(),
|
|
32572
|
+
status: LCNConnectionPromptStatusValidator2,
|
|
32573
|
+
surface: LCNConnectionPromptSurfaceValidator2,
|
|
32574
|
+
triggerId: external_exports2.string(),
|
|
32575
|
+
triggeredAt: external_exports2.iso.datetime(),
|
|
32576
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
32577
|
+
counterpart: LCNPublicProfileValidator2
|
|
32578
|
+
});
|
|
32579
|
+
var LCNConnectionPromptActionResultValidator2 = external_exports2.object({
|
|
32580
|
+
promptId: external_exports2.string().uuid(),
|
|
32581
|
+
status: LCNConnectionPromptActionStatusValidator2
|
|
32582
|
+
});
|
|
32583
|
+
var LCNConnectionPromptMetadataValidator2 = external_exports2.object({
|
|
32584
|
+
promptId: external_exports2.string().uuid(),
|
|
32585
|
+
counterpartProfileId: external_exports2.string()
|
|
32586
|
+
});
|
|
32175
32587
|
var LCNAuthedProfileValidator2 = LCNPublicProfileValidator2.extend({
|
|
32176
32588
|
bio: LCNProfileValidator2.shape.bio,
|
|
32177
32589
|
websiteLink: LCNProfileValidator2.shape.websiteLink,
|
|
@@ -32180,7 +32592,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32180
32592
|
did: LCNProfileValidator2.shape.did
|
|
32181
32593
|
});
|
|
32182
32594
|
var LCNConnectionProfileValidator2 = LCNAuthedProfileValidator2.extend({
|
|
32183
|
-
email: LCNProfileValidator2.shape.email
|
|
32595
|
+
email: LCNProfileValidator2.shape.email,
|
|
32596
|
+
connectedAt: external_exports2.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
32184
32597
|
});
|
|
32185
32598
|
var LCNVisibleProfileValidator2 = external_exports2.union([
|
|
32186
32599
|
LCNConnectionProfileValidator2.strict(),
|
|
@@ -32722,7 +33135,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32722
33135
|
"PENDING",
|
|
32723
33136
|
"ISSUED",
|
|
32724
33137
|
"EXPIRED",
|
|
33138
|
+
/* DEPRECATED — use ISSUED */
|
|
32725
33139
|
"DELIVERED",
|
|
33140
|
+
/* DEPRECATED — use ISSUED */
|
|
32726
33141
|
"CLAIMED"
|
|
32727
33142
|
]);
|
|
32728
33143
|
var LCNNotificationInboxValidator2 = external_exports2.object({
|
|
@@ -32734,12 +33149,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32734
33149
|
}),
|
|
32735
33150
|
timestamp: external_exports2.iso.datetime().optional()
|
|
32736
33151
|
});
|
|
33152
|
+
var LCNNotificationMetadataValidator2 = external_exports2.object({
|
|
33153
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator2.optional()
|
|
33154
|
+
}).catchall(external_exports2.unknown());
|
|
32737
33155
|
var LCNNotificationDataValidator2 = external_exports2.object({
|
|
32738
33156
|
vcUris: external_exports2.array(external_exports2.string()).optional(),
|
|
32739
33157
|
vpUris: external_exports2.array(external_exports2.string()).optional(),
|
|
32740
33158
|
transaction: ConsentFlowTransactionValidator2.optional(),
|
|
32741
33159
|
inbox: LCNNotificationInboxValidator2.optional(),
|
|
32742
|
-
metadata:
|
|
33160
|
+
metadata: LCNNotificationMetadataValidator2.optional()
|
|
32743
33161
|
}).loose();
|
|
32744
33162
|
var LCNNotificationValidator2 = external_exports2.object({
|
|
32745
33163
|
type: LCNNotificationTypeEnumValidator2,
|
|
@@ -32758,8 +33176,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32758
33176
|
challenge: external_exports2.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
32759
33177
|
status: external_exports2.enum(["revoked", "active"], {
|
|
32760
33178
|
error: /* @__PURE__ */ __name22((issue22) => {
|
|
32761
|
-
if (issue22.code === "invalid_value")
|
|
32762
|
-
return "Status must be either active or revoked";
|
|
33179
|
+
if (issue22.code === "invalid_value") return "Status must be either active or revoked";
|
|
32763
33180
|
return "Status is required";
|
|
32764
33181
|
}, "error")
|
|
32765
33182
|
}),
|
|
@@ -32790,6 +33207,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32790
33207
|
external_exports2.object({
|
|
32791
33208
|
type: external_exports2.literal("phone"),
|
|
32792
33209
|
value: external_exports2.string()
|
|
33210
|
+
// Can be improved with a regex later
|
|
32793
33211
|
}).merge(contactMethodBase2)
|
|
32794
33212
|
]);
|
|
32795
33213
|
var createContactMethodBase2 = external_exports2.object({
|
|
@@ -32850,6 +33268,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32850
33268
|
endpoint: external_exports2.string().optional(),
|
|
32851
33269
|
name: external_exports2.string().optional()
|
|
32852
33270
|
}).optional(),
|
|
33271
|
+
// Guardian gate fields (all optional — absent on pre-existing credentials)
|
|
32853
33272
|
guardianEmail: external_exports2.string().email().optional(),
|
|
32854
33273
|
guardianStatus: GuardianStatusValidator2.optional(),
|
|
32855
33274
|
guardianApprovedAt: external_exports2.string().optional(),
|
|
@@ -32873,13 +33292,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32873
33292
|
name: external_exports2.string()
|
|
32874
33293
|
});
|
|
32875
33294
|
var IssueInboxCredentialValidator2 = external_exports2.object({
|
|
33295
|
+
// === CORE DATA (Required) ===
|
|
33296
|
+
// WHAT is being sent and WHO is it for?
|
|
32876
33297
|
recipient: ContactMethodQueryValidator2.describe("The recipient of the credential"),
|
|
33298
|
+
// Either credential OR templateUri must be provided
|
|
32877
33299
|
credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).optional().describe(
|
|
32878
33300
|
"The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
|
|
32879
33301
|
),
|
|
32880
33302
|
templateUri: external_exports2.string().optional().describe(
|
|
32881
33303
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
32882
33304
|
),
|
|
33305
|
+
// === OPTIONAL FEATURES ===
|
|
33306
|
+
// Add major, distinct features at the top level.
|
|
33307
|
+
//consentRequest: ConsentRequestValidator.optional(),
|
|
33308
|
+
// === PROCESS CONFIGURATION (Optional) ===
|
|
33309
|
+
// HOW should this issuance be handled?
|
|
32883
33310
|
configuration: external_exports2.object({
|
|
32884
33311
|
signingAuthority: IssueInboxSigningAuthorityValidator2.optional().describe(
|
|
32885
33312
|
"The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
|
|
@@ -32889,6 +33316,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32889
33316
|
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional().describe(
|
|
32890
33317
|
"Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
|
|
32891
33318
|
),
|
|
33319
|
+
// --- For User-Facing Delivery (Email/SMS) ---
|
|
32892
33320
|
delivery: external_exports2.object({
|
|
32893
33321
|
suppress: external_exports2.boolean().optional().default(false).describe(
|
|
32894
33322
|
"Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."
|
|
@@ -32971,9 +33399,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32971
33399
|
description: external_exports2.string().optional(),
|
|
32972
33400
|
publishableKey: external_exports2.string(),
|
|
32973
33401
|
whitelistedDomains: external_exports2.array(LCNDomainOrOriginValidator2).default([]),
|
|
33402
|
+
// Setup/onboarding status
|
|
32974
33403
|
status: LCNIntegrationStatusEnum2.default("setup"),
|
|
32975
33404
|
guideType: external_exports2.string().optional(),
|
|
32976
33405
|
guideState: external_exports2.record(external_exports2.string(), external_exports2.any()).optional(),
|
|
33406
|
+
// Timestamps
|
|
32977
33407
|
createdAt: external_exports2.string().optional(),
|
|
32978
33408
|
updatedAt: external_exports2.string().optional()
|
|
32979
33409
|
});
|
|
@@ -32988,6 +33418,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32988
33418
|
description: external_exports2.string().optional(),
|
|
32989
33419
|
whitelistedDomains: external_exports2.array(LCNDomainOrOriginValidator2).optional(),
|
|
32990
33420
|
rotatePublishableKey: external_exports2.boolean().optional(),
|
|
33421
|
+
// Setup/onboarding updates
|
|
32991
33422
|
status: LCNIntegrationStatusEnum2.optional(),
|
|
32992
33423
|
guideType: external_exports2.string().optional(),
|
|
32993
33424
|
guideState: external_exports2.record(external_exports2.string(), external_exports2.any()).optional()
|
|
@@ -33454,17 +33885,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33454
33885
|
failed: external_exports2.number(),
|
|
33455
33886
|
claimRate: external_exports2.number()
|
|
33456
33887
|
});
|
|
33457
|
-
var AuthSessionError2 =
|
|
33888
|
+
var AuthSessionError2 = (_g = class extends Error {
|
|
33458
33889
|
constructor(message, reason) {
|
|
33459
33890
|
super(message);
|
|
33460
33891
|
this.reason = reason;
|
|
33461
33892
|
this.name = "AuthSessionError";
|
|
33462
33893
|
}
|
|
33463
|
-
}, "
|
|
33464
|
-
__name2(_g, "AuthSessionError");
|
|
33465
|
-
})(), (() => {
|
|
33466
|
-
__name22(_g, "AuthSessionError");
|
|
33467
|
-
})(), _g), "AuthSessionError");
|
|
33894
|
+
}, __name(_g, "AuthSessionError"), __name2(_g, "AuthSessionError"), __name22(_g, "AuthSessionError"), _g);
|
|
33468
33895
|
var BITSTRING_STATUS_PURPOSES2 = ["revocation", "suspension"];
|
|
33469
33896
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
33470
33897
|
var BitstringStatusPurposeValidator2 = external_exports2.enum(BITSTRING_STATUS_PURPOSES2);
|
|
@@ -33532,12 +33959,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33532
33959
|
label: external_exports2.string(),
|
|
33533
33960
|
style: inAppMessageActionStyleValidator2,
|
|
33534
33961
|
action: inAppMessageActionTargetValidator2,
|
|
33962
|
+
/** When true, the message closes after this action runs (default true). */
|
|
33535
33963
|
closeOnComplete: external_exports2.boolean().default(true)
|
|
33536
33964
|
}).passthrough();
|
|
33537
33965
|
var inAppMessageMediaValidator2 = external_exports2.object({
|
|
33538
33966
|
type: external_exports2.enum(["youtube", "image", "gif"]),
|
|
33539
33967
|
url: external_exports2.string(),
|
|
33968
|
+
/** Aspect ratio hint, e.g. "16:9" or "1:1". Defaults to 16:9. */
|
|
33540
33969
|
aspect: external_exports2.string().default("16:9"),
|
|
33970
|
+
/** Alt text for images/gifs (accessibility). */
|
|
33541
33971
|
alt: external_exports2.string().optional()
|
|
33542
33972
|
}).passthrough();
|
|
33543
33973
|
var inAppMessageFrequencyValidator2 = external_exports2.union([
|
|
@@ -33548,17 +33978,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33548
33978
|
]).default("once");
|
|
33549
33979
|
var inAppMessagePresentationValidator2 = external_exports2.enum(["modal", "banner", "toast"]).default("modal");
|
|
33550
33980
|
var inAppMessageValidator2 = external_exports2.object({
|
|
33981
|
+
/** Stable identifier — used to persist dismissal / frequency state. */
|
|
33551
33982
|
id: external_exports2.string(),
|
|
33983
|
+
/** Higher priority wins when multiple messages match. Default 0. */
|
|
33552
33984
|
priority: external_exports2.number().default(0),
|
|
33985
|
+
/** When false, the message is required/blocking (no dismiss affordance). */
|
|
33553
33986
|
dismissible: external_exports2.boolean().default(true),
|
|
33554
33987
|
frequency: inAppMessageFrequencyValidator2,
|
|
33555
33988
|
presentation: inAppMessagePresentationValidator2,
|
|
33556
33989
|
media: inAppMessageMediaValidator2.optional(),
|
|
33990
|
+
/** Optional emoji hero glyph — rendered only when `media` is not set. */
|
|
33557
33991
|
emoji: external_exports2.string().optional(),
|
|
33558
33992
|
title: external_exports2.string(),
|
|
33559
33993
|
body: external_exports2.string().optional(),
|
|
33560
33994
|
actions: external_exports2.array(inAppMessageActionValidator2).default([]),
|
|
33995
|
+
/** Targeting predicate tree. Omitted → matches everyone. */
|
|
33561
33996
|
targeting: inAppMessagePredicateValidator2.optional(),
|
|
33997
|
+
/** Allow disabling a message without removing it from the flag. */
|
|
33562
33998
|
enabled: external_exports2.boolean().default(true)
|
|
33563
33999
|
}).passthrough();
|
|
33564
34000
|
var inAppMessagesFlagValidator2 = external_exports2.object({
|
|
@@ -33585,17 +34021,17 @@ var require_dist = __commonJS({
|
|
|
33585
34021
|
var import_types2 = __toESM(require_dist());
|
|
33586
34022
|
var filestack_helpers_exports = {};
|
|
33587
34023
|
__export2(filestack_helpers_exports, {
|
|
33588
|
-
changeQuality: () => changeQuality,
|
|
33589
|
-
fileTypeSupportsPreview: () => fileTypeSupportsPreview,
|
|
33590
|
-
fixSrcSetString: () => fixSrcSetString,
|
|
33591
|
-
fixUrl: () => fixUrl,
|
|
33592
|
-
generateSrcSet: () => generateSrcSet,
|
|
33593
|
-
getFileType: () => getFileType,
|
|
33594
|
-
getFilestackHandle: () => getFilestackHandle,
|
|
33595
|
-
getUrlFromUrlParams: () => getUrlFromUrlParams,
|
|
33596
|
-
getUrlParams: () => getUrlParams,
|
|
33597
|
-
resizeAndChangeQuality: () => resizeAndChangeQuality,
|
|
33598
|
-
resizeUrl: () => resizeUrl
|
|
34024
|
+
changeQuality: /* @__PURE__ */ __name(() => changeQuality, "changeQuality"),
|
|
34025
|
+
fileTypeSupportsPreview: /* @__PURE__ */ __name(() => fileTypeSupportsPreview, "fileTypeSupportsPreview"),
|
|
34026
|
+
fixSrcSetString: /* @__PURE__ */ __name(() => fixSrcSetString, "fixSrcSetString"),
|
|
34027
|
+
fixUrl: /* @__PURE__ */ __name(() => fixUrl, "fixUrl"),
|
|
34028
|
+
generateSrcSet: /* @__PURE__ */ __name(() => generateSrcSet, "generateSrcSet"),
|
|
34029
|
+
getFileType: /* @__PURE__ */ __name(() => getFileType, "getFileType"),
|
|
34030
|
+
getFilestackHandle: /* @__PURE__ */ __name(() => getFilestackHandle, "getFilestackHandle"),
|
|
34031
|
+
getUrlFromUrlParams: /* @__PURE__ */ __name(() => getUrlFromUrlParams, "getUrlFromUrlParams"),
|
|
34032
|
+
getUrlParams: /* @__PURE__ */ __name(() => getUrlParams, "getUrlParams"),
|
|
34033
|
+
resizeAndChangeQuality: /* @__PURE__ */ __name(() => resizeAndChangeQuality, "resizeAndChangeQuality"),
|
|
34034
|
+
resizeUrl: /* @__PURE__ */ __name(() => resizeUrl, "resizeUrl")
|
|
33599
34035
|
});
|
|
33600
34036
|
var getUrlParams = /* @__PURE__ */ __name2((url2) => url2.split(".com/")[1].split("/"), "getUrlParams");
|
|
33601
34037
|
var getUrlFromUrlParams = /* @__PURE__ */ __name2((urlParams) => `https://cdn.filestackcontent.com/${urlParams.join("/")}`, "getUrlFromUrlParams");
|
|
@@ -33616,20 +34052,20 @@ var getFileType = /* @__PURE__ */ __name2(async (url2) => {
|
|
|
33616
34052
|
var fileTypeSupportsPreview = /* @__PURE__ */ __name2((fileType) => {
|
|
33617
34053
|
const unsupportedFileTypes = [
|
|
33618
34054
|
"application/vnd.apple.pages",
|
|
34055
|
+
// .pages
|
|
33619
34056
|
"application/vnd.apple.numbers",
|
|
34057
|
+
// .numbers
|
|
33620
34058
|
"application/x-iwork-keynote-sffkey"
|
|
34059
|
+
// .key
|
|
33621
34060
|
];
|
|
33622
34061
|
return !unsupportedFileTypes.includes(fileType);
|
|
33623
34062
|
}, "fileTypeSupportsPreview");
|
|
33624
34063
|
var fixUrl = /* @__PURE__ */ __name2((url2, mimetype, webp = false) => {
|
|
33625
|
-
if (url2.split(" ").length > 1)
|
|
33626
|
-
return fixSrcSetString(url2, mimetype, webp);
|
|
34064
|
+
if (url2.split(" ").length > 1) return fixSrcSetString(url2, mimetype, webp);
|
|
33627
34065
|
const urlParams = getUrlParams(url2).filter((param) => param !== "rotate=deg:exif");
|
|
33628
34066
|
urlParams.splice(0, 0, "rotate=deg:exif");
|
|
33629
|
-
if (mimetype !== "image/gif")
|
|
33630
|
-
|
|
33631
|
-
if (webp)
|
|
33632
|
-
urlParams.splice(-1, 0, "output=format:webp");
|
|
34067
|
+
if (mimetype !== "image/gif") urlParams.splice(-1, 0, "auto_image");
|
|
34068
|
+
if (webp) urlParams.splice(-1, 0, "output=format:webp");
|
|
33633
34069
|
return getUrlFromUrlParams(urlParams);
|
|
33634
34070
|
}, "fixUrl");
|
|
33635
34071
|
var fixSrcSetString = /* @__PURE__ */ __name2((srcSetString, mimetype, webp = false) => {
|
|
@@ -33638,18 +34074,14 @@ var fixSrcSetString = /* @__PURE__ */ __name2((srcSetString, mimetype, webp = fa
|
|
|
33638
34074
|
}, "fixSrcSetString");
|
|
33639
34075
|
var resizeUrl = /* @__PURE__ */ __name2((url2, size) => {
|
|
33640
34076
|
const urlParams = getUrlParams(url2).filter((param) => !param.match(/resize.*/));
|
|
33641
|
-
if (urlParams.includes("rotate=deg:exif"))
|
|
33642
|
-
|
|
33643
|
-
else
|
|
33644
|
-
urlParams.splice(0, 0, `resize=width:${size}`);
|
|
34077
|
+
if (urlParams.includes("rotate=deg:exif")) urlParams.splice(1, 0, `resize=width:${size}`);
|
|
34078
|
+
else urlParams.splice(0, 0, `resize=width:${size}`);
|
|
33645
34079
|
return getUrlFromUrlParams(urlParams);
|
|
33646
34080
|
}, "resizeUrl");
|
|
33647
34081
|
var changeQuality = /* @__PURE__ */ __name2((url2, quality) => {
|
|
33648
34082
|
const urlParams = getUrlParams(url2).filter((param) => !param.match(/quality.*/));
|
|
33649
|
-
if (urlParams.includes("rotate=deg:exif"))
|
|
33650
|
-
|
|
33651
|
-
else
|
|
33652
|
-
urlParams.splice(0, 0, `quality=value:${quality}`);
|
|
34083
|
+
if (urlParams.includes("rotate=deg:exif")) urlParams.splice(1, 0, `quality=value:${quality}`);
|
|
34084
|
+
else urlParams.splice(0, 0, `quality=value:${quality}`);
|
|
33653
34085
|
return getUrlFromUrlParams(urlParams);
|
|
33654
34086
|
}, "changeQuality");
|
|
33655
34087
|
var resizeAndChangeQuality = /* @__PURE__ */ __name2((url2, size, quality, {
|
|
@@ -33670,12 +34102,12 @@ var generateSrcSet = /* @__PURE__ */ __name2((url2, resolutions, {
|
|
|
33670
34102
|
}, "generateSrcSet");
|
|
33671
34103
|
var unsplash_helpers_exports = {};
|
|
33672
34104
|
__export2(unsplash_helpers_exports, {
|
|
33673
|
-
changeQuality: () => changeQuality2,
|
|
33674
|
-
fixSrcSetString: () => fixSrcSetString2,
|
|
33675
|
-
fixUrl: () => fixUrl2,
|
|
33676
|
-
generateSrcSet: () => generateSrcSet2,
|
|
33677
|
-
resizeAndChangeQuality: () => resizeAndChangeQuality2,
|
|
33678
|
-
resizeUrl: () => resizeUrl2
|
|
34105
|
+
changeQuality: /* @__PURE__ */ __name(() => changeQuality2, "changeQuality"),
|
|
34106
|
+
fixSrcSetString: /* @__PURE__ */ __name(() => fixSrcSetString2, "fixSrcSetString"),
|
|
34107
|
+
fixUrl: /* @__PURE__ */ __name(() => fixUrl2, "fixUrl"),
|
|
34108
|
+
generateSrcSet: /* @__PURE__ */ __name(() => generateSrcSet2, "generateSrcSet"),
|
|
34109
|
+
resizeAndChangeQuality: /* @__PURE__ */ __name(() => resizeAndChangeQuality2, "resizeAndChangeQuality"),
|
|
34110
|
+
resizeUrl: /* @__PURE__ */ __name(() => resizeUrl2, "resizeUrl")
|
|
33679
34111
|
});
|
|
33680
34112
|
var parseUrl = /* @__PURE__ */ __name2((input) => {
|
|
33681
34113
|
const hashIndex = input.indexOf("#");
|
|
@@ -33685,8 +34117,7 @@ var parseUrl = /* @__PURE__ */ __name2((input) => {
|
|
|
33685
34117
|
const url2 = queryIndex === -1 ? withoutFragment : withoutFragment.slice(0, queryIndex);
|
|
33686
34118
|
const search = queryIndex === -1 ? "" : withoutFragment.slice(queryIndex + 1);
|
|
33687
34119
|
const query = {};
|
|
33688
|
-
for (const [key, value] of new URLSearchParams(search))
|
|
33689
|
-
query[key] = value;
|
|
34120
|
+
for (const [key, value] of new URLSearchParams(search)) query[key] = value;
|
|
33690
34121
|
return {
|
|
33691
34122
|
url: url2,
|
|
33692
34123
|
query,
|
|
@@ -33696,8 +34127,7 @@ var parseUrl = /* @__PURE__ */ __name2((input) => {
|
|
|
33696
34127
|
var stringifyUrl = /* @__PURE__ */ __name2((parsed) => {
|
|
33697
34128
|
const params = new URLSearchParams();
|
|
33698
34129
|
for (const [key, value] of Object.entries(parsed.query)) {
|
|
33699
|
-
if (value === void 0 || value === null)
|
|
33700
|
-
continue;
|
|
34130
|
+
if (value === void 0 || value === null) continue;
|
|
33701
34131
|
params.append(key, String(value));
|
|
33702
34132
|
}
|
|
33703
34133
|
const search = params.toString().replace(/\+/g, "%20");
|
|
@@ -33709,8 +34139,7 @@ var fixSrcSetString2 = /* @__PURE__ */ __name2((srcSetString, _mimetype, _webp =
|
|
|
33709
34139
|
return urls.map(([url2, width]) => `${fixUrl2(url2)} ${width}`).join(", ");
|
|
33710
34140
|
}, "fixSrcSetString");
|
|
33711
34141
|
var fixUrl2 = /* @__PURE__ */ __name2((url2, _mimetype, _webp = false) => {
|
|
33712
|
-
if (url2.split(" ").length > 1)
|
|
33713
|
-
return fixSrcSetString2(url2);
|
|
34142
|
+
if (url2.split(" ").length > 1) return fixSrcSetString2(url2);
|
|
33714
34143
|
const parsedUrl = parseUrl(url2);
|
|
33715
34144
|
parsedUrl.query.auto = "format";
|
|
33716
34145
|
return stringifyUrl(parsedUrl);
|
|
@@ -33735,18 +34164,17 @@ var generateSrcSet2 = /* @__PURE__ */ __name2((url2, resolutions, { fix = false
|
|
|
33735
34164
|
}, "generateSrcSet");
|
|
33736
34165
|
var discord_helpers_exports = {};
|
|
33737
34166
|
__export2(discord_helpers_exports, {
|
|
33738
|
-
VALID_DISCORD_SIZES: () => VALID_DISCORD_SIZES,
|
|
33739
|
-
changeQuality: () => changeQuality3,
|
|
33740
|
-
fixSrcSetString: () => fixSrcSetString3,
|
|
33741
|
-
fixUrl: () => fixUrl3,
|
|
33742
|
-
generateSrcSet: () => generateSrcSet3,
|
|
33743
|
-
resizeAndChangeQuality: () => resizeAndChangeQuality3,
|
|
33744
|
-
resizeUrl: () => resizeUrl3
|
|
34167
|
+
VALID_DISCORD_SIZES: /* @__PURE__ */ __name(() => VALID_DISCORD_SIZES, "VALID_DISCORD_SIZES"),
|
|
34168
|
+
changeQuality: /* @__PURE__ */ __name(() => changeQuality3, "changeQuality"),
|
|
34169
|
+
fixSrcSetString: /* @__PURE__ */ __name(() => fixSrcSetString3, "fixSrcSetString"),
|
|
34170
|
+
fixUrl: /* @__PURE__ */ __name(() => fixUrl3, "fixUrl"),
|
|
34171
|
+
generateSrcSet: /* @__PURE__ */ __name(() => generateSrcSet3, "generateSrcSet"),
|
|
34172
|
+
resizeAndChangeQuality: /* @__PURE__ */ __name(() => resizeAndChangeQuality3, "resizeAndChangeQuality"),
|
|
34173
|
+
resizeUrl: /* @__PURE__ */ __name(() => resizeUrl3, "resizeUrl")
|
|
33745
34174
|
});
|
|
33746
34175
|
var quantizeValue = /* @__PURE__ */ __name2((value, array2) => {
|
|
33747
34176
|
const foundIndex = array2.findIndex((number4) => number4 === value);
|
|
33748
|
-
if (foundIndex > -1)
|
|
33749
|
-
return array2[foundIndex];
|
|
34177
|
+
if (foundIndex > -1) return array2[foundIndex];
|
|
33750
34178
|
const closestIndex = array2.reduce(
|
|
33751
34179
|
(closest, current2, index) => {
|
|
33752
34180
|
const currentDistance = Math.abs(current2 - value);
|
|
@@ -33784,8 +34212,7 @@ var generateSrcSet3 = /* @__PURE__ */ __name2((url2, resolutions, { fix = false
|
|
|
33784
34212
|
}, "generateSrcSet");
|
|
33785
34213
|
var getUrlsFromSrcSet = /* @__PURE__ */ __name2((srcSet) => {
|
|
33786
34214
|
return srcSet.split(/,? /).reduce((accumulator, current2, index, array2) => {
|
|
33787
|
-
if (index % 2 === 0)
|
|
33788
|
-
return accumulator;
|
|
34215
|
+
if (index % 2 === 0) return accumulator;
|
|
33789
34216
|
accumulator.push([array2[index - 1], current2]);
|
|
33790
34217
|
return accumulator;
|
|
33791
34218
|
}, []);
|
|
@@ -33794,18 +34221,14 @@ function innerImmerOuterImmer(setState, field, value) {
|
|
|
33794
34221
|
if (value === void 0) {
|
|
33795
34222
|
return (innerValue) => {
|
|
33796
34223
|
setState((oldState) => {
|
|
33797
|
-
if (typeof innerValue === "function")
|
|
33798
|
-
|
|
33799
|
-
else
|
|
33800
|
-
oldState[field] = innerValue;
|
|
34224
|
+
if (typeof innerValue === "function") innerValue(oldState[field]);
|
|
34225
|
+
else oldState[field] = innerValue;
|
|
33801
34226
|
});
|
|
33802
34227
|
};
|
|
33803
34228
|
}
|
|
33804
34229
|
setState((oldState) => {
|
|
33805
|
-
if (typeof value === "function")
|
|
33806
|
-
|
|
33807
|
-
else
|
|
33808
|
-
oldState[field] = value;
|
|
34230
|
+
if (typeof value === "function") value(oldState[field]);
|
|
34231
|
+
else oldState[field] = value;
|
|
33809
34232
|
});
|
|
33810
34233
|
}
|
|
33811
34234
|
__name(innerImmerOuterImmer, "innerImmerOuterImmer");
|
|
@@ -33815,10 +34238,8 @@ function innerReactOuterImmer(setState, field, value) {
|
|
|
33815
34238
|
if (value === void 0) {
|
|
33816
34239
|
return (innerValue) => {
|
|
33817
34240
|
setState((oldState) => {
|
|
33818
|
-
if (typeof innerValue === "function")
|
|
33819
|
-
|
|
33820
|
-
else
|
|
33821
|
-
oldState[field] = innerValue;
|
|
34241
|
+
if (typeof innerValue === "function") innerValue(oldState[field]);
|
|
34242
|
+
else oldState[field] = innerValue;
|
|
33822
34243
|
});
|
|
33823
34244
|
};
|
|
33824
34245
|
}
|
|
@@ -33834,14 +34255,12 @@ function innerImmerOuterReact(setState, field, value) {
|
|
|
33834
34255
|
return (innerValue) => {
|
|
33835
34256
|
if (typeof innerValue === "function") {
|
|
33836
34257
|
setState(produce((oldState) => innerValue(oldState[field])));
|
|
33837
|
-
} else
|
|
33838
|
-
setState((oldState) => ({ ...oldState, [field]: innerValue }));
|
|
34258
|
+
} else setState((oldState) => ({ ...oldState, [field]: innerValue }));
|
|
33839
34259
|
};
|
|
33840
34260
|
}
|
|
33841
34261
|
if (typeof value === "function") {
|
|
33842
34262
|
setState(produce((oldState) => value(oldState[field])));
|
|
33843
|
-
} else
|
|
33844
|
-
setState((oldState) => ({ ...oldState, [field]: value }));
|
|
34263
|
+
} else setState((oldState) => ({ ...oldState, [field]: value }));
|
|
33845
34264
|
}
|
|
33846
34265
|
__name(innerImmerOuterReact, "innerImmerOuterReact");
|
|
33847
34266
|
__name2(innerImmerOuterReact, "innerImmerOuterReact");
|
|
@@ -33881,6 +34300,32 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
33881
34300
|
loading: external_exports.union([ImageResizingValidator, ImageUploadingValidator]).optional()
|
|
33882
34301
|
});
|
|
33883
34302
|
var import_types3 = __toESM(require_dist());
|
|
34303
|
+
var _a4;
|
|
34304
|
+
var EnvironmentConfigurationError = (_a4 = class extends Error {
|
|
34305
|
+
constructor(message) {
|
|
34306
|
+
super(message);
|
|
34307
|
+
this.name = "EnvironmentConfigurationError";
|
|
34308
|
+
}
|
|
34309
|
+
}, __name(_a4, "EnvironmentConfigurationError"), __name2(_a4, "EnvironmentConfigurationError"), _a4);
|
|
34310
|
+
var requiredEnvironmentString = external_exports.string().trim().min(1, "Required but missing");
|
|
34311
|
+
var optionalEnvironmentString = external_exports.preprocess(
|
|
34312
|
+
(value) => value === "" ? void 0 : value,
|
|
34313
|
+
requiredEnvironmentString.optional()
|
|
34314
|
+
);
|
|
34315
|
+
var optionalEnvironmentUrl = external_exports.preprocess(
|
|
34316
|
+
(value) => value === "" ? void 0 : value,
|
|
34317
|
+
external_exports.url("Expected a valid URL").optional()
|
|
34318
|
+
);
|
|
34319
|
+
var environmentBoolean = external_exports.enum(["true", "false", "1", "0"]).transform((value) => value === "true" || value === "1");
|
|
34320
|
+
var optionalEnvironmentBoolean = external_exports.preprocess(
|
|
34321
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34322
|
+
environmentBoolean.optional()
|
|
34323
|
+
);
|
|
34324
|
+
var environmentPort = external_exports.coerce.number().int().min(1).max(65535);
|
|
34325
|
+
var optionalEnvironmentPort = external_exports.preprocess(
|
|
34326
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34327
|
+
environmentPort.optional()
|
|
34328
|
+
);
|
|
33884
34329
|
var unwrapBoostCredential = /* @__PURE__ */ __name2((vc) => {
|
|
33885
34330
|
if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
|
|
33886
34331
|
return vc.boostCredential;
|
|
@@ -33954,12 +34399,14 @@ var ProfileValidator = external_exports.string().or(
|
|
|
33954
34399
|
phone: external_exports.string().optional(),
|
|
33955
34400
|
description: external_exports.string().optional(),
|
|
33956
34401
|
endorsement: external_exports.any().array().optional(),
|
|
34402
|
+
// Recursive type
|
|
33957
34403
|
image: ImageValidator.optional(),
|
|
33958
34404
|
email: external_exports.string().email().optional(),
|
|
33959
34405
|
address: AddressValidator.optional(),
|
|
33960
34406
|
otherIdentifier: IdentifierEntryValidator.array().optional(),
|
|
33961
34407
|
official: external_exports.string().optional(),
|
|
33962
34408
|
parentOrg: external_exports.any().optional(),
|
|
34409
|
+
// Recursive types are annoying =(
|
|
33963
34410
|
familyName: external_exports.string().optional(),
|
|
33964
34411
|
givenName: external_exports.string().optional(),
|
|
33965
34412
|
additionalName: external_exports.string().optional(),
|
|
@@ -34007,11 +34454,13 @@ var UnsignedVCValidator = external_exports.object({
|
|
|
34007
34454
|
credentialSchema: CredentialSchemaValidator.or(
|
|
34008
34455
|
CredentialSchemaValidator.array()
|
|
34009
34456
|
).optional(),
|
|
34457
|
+
// V1
|
|
34010
34458
|
issuanceDate: external_exports.string().optional(),
|
|
34011
34459
|
expirationDate: external_exports.string().optional(),
|
|
34012
34460
|
credentialStatus: CredentialStatusValidator.or(
|
|
34013
34461
|
CredentialStatusValidator.array()
|
|
34014
34462
|
).optional(),
|
|
34463
|
+
// V2
|
|
34015
34464
|
name: external_exports.string().optional(),
|
|
34016
34465
|
description: external_exports.string().optional(),
|
|
34017
34466
|
validFrom: external_exports.string().optional(),
|
|
@@ -34340,16 +34789,52 @@ var StoredCredentialEnvelopeValidator = external_exports.object({
|
|
|
34340
34789
|
data: external_exports.string()
|
|
34341
34790
|
}).passthrough();
|
|
34342
34791
|
var StatusCheckEntryValidator = external_exports.object({
|
|
34792
|
+
/**
|
|
34793
|
+
* The `credentialStatus.type` as it appeared on the credential.
|
|
34794
|
+
* One of `BitstringStatusListEntry`, `StatusList2021Entry`,
|
|
34795
|
+
* `RevocationList2020Status`, or any future custom status type.
|
|
34796
|
+
*/
|
|
34343
34797
|
entryType: external_exports.string(),
|
|
34798
|
+
/**
|
|
34799
|
+
* The claimed purpose of the entry. Standard values are
|
|
34800
|
+
* `"revocation"` and `"suspension"`; the spec allows arbitrary
|
|
34801
|
+
* strings.
|
|
34802
|
+
*/
|
|
34344
34803
|
statusPurpose: external_exports.string(),
|
|
34804
|
+
/**
|
|
34805
|
+
* Whether the bit at the credential's index in the status list
|
|
34806
|
+
* bitstring was set.
|
|
34807
|
+
*/
|
|
34345
34808
|
isSet: external_exports.boolean(),
|
|
34809
|
+
/** URL of the status list credential, when known. */
|
|
34346
34810
|
statusListCredential: external_exports.string().optional(),
|
|
34811
|
+
/** Original (string) index within the status list. */
|
|
34347
34812
|
statusListIndex: external_exports.string().optional()
|
|
34348
34813
|
});
|
|
34349
34814
|
var VerificationCheckValidator = external_exports.object({
|
|
34815
|
+
/**
|
|
34816
|
+
* Checks that completed successfully. This does not imply that warnings can be ignored.
|
|
34817
|
+
*/
|
|
34350
34818
|
checks: external_exports.string().array(),
|
|
34819
|
+
/**
|
|
34820
|
+
* Security-relevant conditions that did not prevent the requested cryptographic checks from
|
|
34821
|
+
* completing. In particular, a non-DID issuer warning means the signature is valid but the
|
|
34822
|
+
* named URL issuer's authorization of that signing key was not established.
|
|
34823
|
+
*/
|
|
34351
34824
|
warnings: external_exports.string().array(),
|
|
34825
|
+
/** Verification failures that prevented one or more requested checks from succeeding. */
|
|
34352
34826
|
errors: external_exports.string().array(),
|
|
34827
|
+
/**
|
|
34828
|
+
* Per-entry results for the `credentialStatus` check, populated
|
|
34829
|
+
* by `@learncard/didkit-plugin` when the verified credential
|
|
34830
|
+
* carries one or more `credentialStatus` entries. Empty / absent
|
|
34831
|
+
* for credentials without a status entry.
|
|
34832
|
+
*
|
|
34833
|
+
* Marked `.optional()` because the underlying `ssi-ldp`
|
|
34834
|
+
* serializer omits the field when empty (`skip_serializing_if`),
|
|
34835
|
+
* so older WASM builds that pre-date the structured-status
|
|
34836
|
+
* change still validate against this schema.
|
|
34837
|
+
*/
|
|
34353
34838
|
status: StatusCheckEntryValidator.array().optional()
|
|
34354
34839
|
});
|
|
34355
34840
|
var VerificationStatusValidator = external_exports.enum(["Success", "Failed", "Error"]);
|
|
@@ -34395,8 +34880,7 @@ var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.e
|
|
|
34395
34880
|
});
|
|
34396
34881
|
var parseRegexString = /* @__PURE__ */ __name3((regexStr) => {
|
|
34397
34882
|
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
34398
|
-
if (!match)
|
|
34399
|
-
throw new Error("Invalid RegExp string format");
|
|
34883
|
+
if (!match) throw new Error("Invalid RegExp string format");
|
|
34400
34884
|
return { pattern: match[1], flags: match[2] };
|
|
34401
34885
|
}, "parseRegexString");
|
|
34402
34886
|
var RegExpStringValidator = external_exports.string().refine(
|
|
@@ -34482,6 +34966,31 @@ var LCNPublicProfileValidator = LCNProfileValidator.pick({
|
|
|
34482
34966
|
isServiceProfile: true,
|
|
34483
34967
|
display: true
|
|
34484
34968
|
});
|
|
34969
|
+
var LCNConnectionPromptStatusValidator = external_exports.enum(["PENDING", "SKIPPED", "CONNECTED"]);
|
|
34970
|
+
var LCNConnectionPromptSurfaceValidator = external_exports.enum(["POST_CLAIM", "NOTIFICATION"]);
|
|
34971
|
+
var LCNConnectionPromptActionStatusValidator = external_exports.enum([
|
|
34972
|
+
"PENDING",
|
|
34973
|
+
"SKIPPED",
|
|
34974
|
+
"CONNECTED",
|
|
34975
|
+
"STALE"
|
|
34976
|
+
]);
|
|
34977
|
+
var LCNConnectionPromptValidator = external_exports.object({
|
|
34978
|
+
promptId: external_exports.string().uuid(),
|
|
34979
|
+
status: LCNConnectionPromptStatusValidator,
|
|
34980
|
+
surface: LCNConnectionPromptSurfaceValidator,
|
|
34981
|
+
triggerId: external_exports.string(),
|
|
34982
|
+
triggeredAt: external_exports.iso.datetime(),
|
|
34983
|
+
updatedAt: external_exports.iso.datetime(),
|
|
34984
|
+
counterpart: LCNPublicProfileValidator
|
|
34985
|
+
});
|
|
34986
|
+
var LCNConnectionPromptActionResultValidator = external_exports.object({
|
|
34987
|
+
promptId: external_exports.string().uuid(),
|
|
34988
|
+
status: LCNConnectionPromptActionStatusValidator
|
|
34989
|
+
});
|
|
34990
|
+
var LCNConnectionPromptMetadataValidator = external_exports.object({
|
|
34991
|
+
promptId: external_exports.string().uuid(),
|
|
34992
|
+
counterpartProfileId: external_exports.string()
|
|
34993
|
+
});
|
|
34485
34994
|
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
34486
34995
|
bio: LCNProfileValidator.shape.bio,
|
|
34487
34996
|
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
@@ -34490,7 +34999,8 @@ var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
|
34490
34999
|
did: LCNProfileValidator.shape.did
|
|
34491
35000
|
});
|
|
34492
35001
|
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
34493
|
-
email: LCNProfileValidator.shape.email
|
|
35002
|
+
email: LCNProfileValidator.shape.email,
|
|
35003
|
+
connectedAt: external_exports.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
34494
35004
|
});
|
|
34495
35005
|
var LCNVisibleProfileValidator = external_exports.union([
|
|
34496
35006
|
LCNConnectionProfileValidator.strict(),
|
|
@@ -35032,7 +35542,9 @@ var LCNInboxStatusEnumValidator = external_exports.enum([
|
|
|
35032
35542
|
"PENDING",
|
|
35033
35543
|
"ISSUED",
|
|
35034
35544
|
"EXPIRED",
|
|
35545
|
+
/* DEPRECATED — use ISSUED */
|
|
35035
35546
|
"DELIVERED",
|
|
35547
|
+
/* DEPRECATED — use ISSUED */
|
|
35036
35548
|
"CLAIMED"
|
|
35037
35549
|
]);
|
|
35038
35550
|
var LCNNotificationInboxValidator = external_exports.object({
|
|
@@ -35044,12 +35556,15 @@ var LCNNotificationInboxValidator = external_exports.object({
|
|
|
35044
35556
|
}),
|
|
35045
35557
|
timestamp: external_exports.iso.datetime().optional()
|
|
35046
35558
|
});
|
|
35559
|
+
var LCNNotificationMetadataValidator = external_exports.object({
|
|
35560
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
35561
|
+
}).catchall(external_exports.unknown());
|
|
35047
35562
|
var LCNNotificationDataValidator = external_exports.object({
|
|
35048
35563
|
vcUris: external_exports.array(external_exports.string()).optional(),
|
|
35049
35564
|
vpUris: external_exports.array(external_exports.string()).optional(),
|
|
35050
35565
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
35051
35566
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
35052
|
-
metadata:
|
|
35567
|
+
metadata: LCNNotificationMetadataValidator.optional()
|
|
35053
35568
|
}).loose();
|
|
35054
35569
|
var LCNNotificationValidator = external_exports.object({
|
|
35055
35570
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -35068,8 +35583,7 @@ var AuthGrantValidator = external_exports.object({
|
|
|
35068
35583
|
challenge: external_exports.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
35069
35584
|
status: external_exports.enum(["revoked", "active"], {
|
|
35070
35585
|
error: /* @__PURE__ */ __name3((issue2) => {
|
|
35071
|
-
if (issue2.code === "invalid_value")
|
|
35072
|
-
return "Status must be either active or revoked";
|
|
35586
|
+
if (issue2.code === "invalid_value") return "Status must be either active or revoked";
|
|
35073
35587
|
return "Status is required";
|
|
35074
35588
|
}, "error")
|
|
35075
35589
|
}),
|
|
@@ -35100,6 +35614,7 @@ var ContactMethodValidator = external_exports.discriminatedUnion("type", [
|
|
|
35100
35614
|
external_exports.object({
|
|
35101
35615
|
type: external_exports.literal("phone"),
|
|
35102
35616
|
value: external_exports.string()
|
|
35617
|
+
// Can be improved with a regex later
|
|
35103
35618
|
}).merge(contactMethodBase)
|
|
35104
35619
|
]);
|
|
35105
35620
|
var createContactMethodBase = external_exports.object({
|
|
@@ -35160,6 +35675,7 @@ var InboxCredentialValidator = external_exports.object({
|
|
|
35160
35675
|
endpoint: external_exports.string().optional(),
|
|
35161
35676
|
name: external_exports.string().optional()
|
|
35162
35677
|
}).optional(),
|
|
35678
|
+
// Guardian gate fields (all optional — absent on pre-existing credentials)
|
|
35163
35679
|
guardianEmail: external_exports.string().email().optional(),
|
|
35164
35680
|
guardianStatus: GuardianStatusValidator.optional(),
|
|
35165
35681
|
guardianApprovedAt: external_exports.string().optional(),
|
|
@@ -35183,13 +35699,21 @@ var IssueInboxSigningAuthorityValidator = external_exports.object({
|
|
|
35183
35699
|
name: external_exports.string()
|
|
35184
35700
|
});
|
|
35185
35701
|
var IssueInboxCredentialValidator = external_exports.object({
|
|
35702
|
+
// === CORE DATA (Required) ===
|
|
35703
|
+
// WHAT is being sent and WHO is it for?
|
|
35186
35704
|
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
35705
|
+
// Either credential OR templateUri must be provided
|
|
35187
35706
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).optional().describe(
|
|
35188
35707
|
"The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
|
|
35189
35708
|
),
|
|
35190
35709
|
templateUri: external_exports.string().optional().describe(
|
|
35191
35710
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
35192
35711
|
),
|
|
35712
|
+
// === OPTIONAL FEATURES ===
|
|
35713
|
+
// Add major, distinct features at the top level.
|
|
35714
|
+
//consentRequest: ConsentRequestValidator.optional(),
|
|
35715
|
+
// === PROCESS CONFIGURATION (Optional) ===
|
|
35716
|
+
// HOW should this issuance be handled?
|
|
35193
35717
|
configuration: external_exports.object({
|
|
35194
35718
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
35195
35719
|
"The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
|
|
@@ -35199,6 +35723,7 @@ var IssueInboxCredentialValidator = external_exports.object({
|
|
|
35199
35723
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
|
|
35200
35724
|
"Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
|
|
35201
35725
|
),
|
|
35726
|
+
// --- For User-Facing Delivery (Email/SMS) ---
|
|
35202
35727
|
delivery: external_exports.object({
|
|
35203
35728
|
suppress: external_exports.boolean().optional().default(false).describe(
|
|
35204
35729
|
"Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."
|
|
@@ -35281,9 +35806,11 @@ var LCNIntegrationValidator = external_exports.object({
|
|
|
35281
35806
|
description: external_exports.string().optional(),
|
|
35282
35807
|
publishableKey: external_exports.string(),
|
|
35283
35808
|
whitelistedDomains: external_exports.array(LCNDomainOrOriginValidator).default([]),
|
|
35809
|
+
// Setup/onboarding status
|
|
35284
35810
|
status: LCNIntegrationStatusEnum.default("setup"),
|
|
35285
35811
|
guideType: external_exports.string().optional(),
|
|
35286
35812
|
guideState: external_exports.record(external_exports.string(), external_exports.any()).optional(),
|
|
35813
|
+
// Timestamps
|
|
35287
35814
|
createdAt: external_exports.string().optional(),
|
|
35288
35815
|
updatedAt: external_exports.string().optional()
|
|
35289
35816
|
});
|
|
@@ -35298,6 +35825,7 @@ var LCNIntegrationUpdateValidator = external_exports.object({
|
|
|
35298
35825
|
description: external_exports.string().optional(),
|
|
35299
35826
|
whitelistedDomains: external_exports.array(LCNDomainOrOriginValidator).optional(),
|
|
35300
35827
|
rotatePublishableKey: external_exports.boolean().optional(),
|
|
35828
|
+
// Setup/onboarding updates
|
|
35301
35829
|
status: LCNIntegrationStatusEnum.optional(),
|
|
35302
35830
|
guideType: external_exports.string().optional(),
|
|
35303
35831
|
guideState: external_exports.record(external_exports.string(), external_exports.any()).optional()
|
|
@@ -35764,16 +36292,14 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
35764
36292
|
failed: external_exports.number(),
|
|
35765
36293
|
claimRate: external_exports.number()
|
|
35766
36294
|
});
|
|
35767
|
-
var
|
|
35768
|
-
var AuthSessionError =
|
|
36295
|
+
var _a5;
|
|
36296
|
+
var AuthSessionError = (_a5 = class extends Error {
|
|
35769
36297
|
constructor(message, reason) {
|
|
35770
36298
|
super(message);
|
|
35771
36299
|
this.reason = reason;
|
|
35772
36300
|
this.name = "AuthSessionError";
|
|
35773
36301
|
}
|
|
35774
|
-
}, "
|
|
35775
|
-
__name3(_a3, "AuthSessionError");
|
|
35776
|
-
})(), _a3), "AuthSessionError");
|
|
36302
|
+
}, __name(_a5, "AuthSessionError"), __name3(_a5, "AuthSessionError"), _a5);
|
|
35777
36303
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
35778
36304
|
var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
|
|
35779
36305
|
var BitstringStatusListEntryValidator = external_exports.object({
|
|
@@ -35840,12 +36366,15 @@ var inAppMessageActionValidator = external_exports.object({
|
|
|
35840
36366
|
label: external_exports.string(),
|
|
35841
36367
|
style: inAppMessageActionStyleValidator,
|
|
35842
36368
|
action: inAppMessageActionTargetValidator,
|
|
36369
|
+
/** When true, the message closes after this action runs (default true). */
|
|
35843
36370
|
closeOnComplete: external_exports.boolean().default(true)
|
|
35844
36371
|
}).passthrough();
|
|
35845
36372
|
var inAppMessageMediaValidator = external_exports.object({
|
|
35846
36373
|
type: external_exports.enum(["youtube", "image", "gif"]),
|
|
35847
36374
|
url: external_exports.string(),
|
|
36375
|
+
/** Aspect ratio hint, e.g. "16:9" or "1:1". Defaults to 16:9. */
|
|
35848
36376
|
aspect: external_exports.string().default("16:9"),
|
|
36377
|
+
/** Alt text for images/gifs (accessibility). */
|
|
35849
36378
|
alt: external_exports.string().optional()
|
|
35850
36379
|
}).passthrough();
|
|
35851
36380
|
var inAppMessageFrequencyValidator = external_exports.union([
|
|
@@ -35856,17 +36385,23 @@ var inAppMessageFrequencyValidator = external_exports.union([
|
|
|
35856
36385
|
]).default("once");
|
|
35857
36386
|
var inAppMessagePresentationValidator = external_exports.enum(["modal", "banner", "toast"]).default("modal");
|
|
35858
36387
|
var inAppMessageValidator = external_exports.object({
|
|
36388
|
+
/** Stable identifier — used to persist dismissal / frequency state. */
|
|
35859
36389
|
id: external_exports.string(),
|
|
36390
|
+
/** Higher priority wins when multiple messages match. Default 0. */
|
|
35860
36391
|
priority: external_exports.number().default(0),
|
|
36392
|
+
/** When false, the message is required/blocking (no dismiss affordance). */
|
|
35861
36393
|
dismissible: external_exports.boolean().default(true),
|
|
35862
36394
|
frequency: inAppMessageFrequencyValidator,
|
|
35863
36395
|
presentation: inAppMessagePresentationValidator,
|
|
35864
36396
|
media: inAppMessageMediaValidator.optional(),
|
|
36397
|
+
/** Optional emoji hero glyph — rendered only when `media` is not set. */
|
|
35865
36398
|
emoji: external_exports.string().optional(),
|
|
35866
36399
|
title: external_exports.string(),
|
|
35867
36400
|
body: external_exports.string().optional(),
|
|
35868
36401
|
actions: external_exports.array(inAppMessageActionValidator).default([]),
|
|
36402
|
+
/** Targeting predicate tree. Omitted → matches everyone. */
|
|
35869
36403
|
targeting: inAppMessagePredicateValidator.optional(),
|
|
36404
|
+
/** Allow disabling a message without removing it from the flag. */
|
|
35870
36405
|
enabled: external_exports.boolean().default(true)
|
|
35871
36406
|
}).passthrough();
|
|
35872
36407
|
var inAppMessagesFlagValidator = external_exports.object({
|
|
@@ -35883,14 +36418,12 @@ var isSvgMustacheRenderMethod = /* @__PURE__ */ __name((rm) => {
|
|
|
35883
36418
|
var getRenderMethods = /* @__PURE__ */ __name((vc) => {
|
|
35884
36419
|
const effective = unwrapBoostCredential(vc) ?? vc;
|
|
35885
36420
|
const raw = effective?.renderMethod;
|
|
35886
|
-
if (!raw)
|
|
35887
|
-
return [];
|
|
36421
|
+
if (!raw) return [];
|
|
35888
36422
|
return Array.isArray(raw) ? raw : [raw];
|
|
35889
36423
|
}, "getRenderMethods");
|
|
35890
36424
|
function findRenderMethod(vc, predicate) {
|
|
35891
36425
|
for (const entry of getRenderMethods(vc)) {
|
|
35892
|
-
if (predicate(entry))
|
|
35893
|
-
return entry;
|
|
36426
|
+
if (predicate(entry)) return entry;
|
|
35894
36427
|
}
|
|
35895
36428
|
return null;
|
|
35896
36429
|
}
|
|
@@ -35923,11 +36456,9 @@ var findTemplateRenderMethods = /* @__PURE__ */ __name((vc, suite) => {
|
|
|
35923
36456
|
var getSvgMustacheRenderMethod = /* @__PURE__ */ __name((vc) => findTemplateRenderMethod(vc, "svg-mustache"), "getSvgMustacheRenderMethod");
|
|
35924
36457
|
var isUnsafeKey = /* @__PURE__ */ __name((key) => key === "__proto__" || key === "constructor" || key === "prototype", "isUnsafeKey");
|
|
35925
36458
|
var resolvePointer = /* @__PURE__ */ __name((obj, pointer) => {
|
|
35926
|
-
if (!pointer || pointer === "/")
|
|
35927
|
-
return obj;
|
|
36459
|
+
if (!pointer || pointer === "/") return obj;
|
|
35928
36460
|
const parts = pointer.replace(/^\//, "").split("/").map((p) => p.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
35929
|
-
if (parts.some(isUnsafeKey))
|
|
35930
|
-
return void 0;
|
|
36461
|
+
if (parts.some(isUnsafeKey)) return void 0;
|
|
35931
36462
|
let current2 = obj;
|
|
35932
36463
|
for (const part of parts) {
|
|
35933
36464
|
if (current2 === null || current2 === void 0 || typeof current2 !== "object")
|
|
@@ -35941,11 +36472,9 @@ var buildRenderDataFromPointers = /* @__PURE__ */ __name((vc, pointers) => {
|
|
|
35941
36472
|
const isUnsafeKey2 = /* @__PURE__ */ __name((key) => key === "__proto__" || key === "constructor" || key === "prototype", "isUnsafeKey");
|
|
35942
36473
|
for (const pointer of pointers) {
|
|
35943
36474
|
const value = resolvePointer(vc, pointer);
|
|
35944
|
-
if (value === void 0)
|
|
35945
|
-
continue;
|
|
36475
|
+
if (value === void 0) continue;
|
|
35946
36476
|
const parts = pointer.replace(/^\//, "").split("/").map((p) => p.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
35947
|
-
if (parts.some(isUnsafeKey2))
|
|
35948
|
-
continue;
|
|
36477
|
+
if (parts.some(isUnsafeKey2)) continue;
|
|
35949
36478
|
let current2 = result;
|
|
35950
36479
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
35951
36480
|
const part = parts[i];
|
|
@@ -35955,8 +36484,7 @@ var buildRenderDataFromPointers = /* @__PURE__ */ __name((vc, pointers) => {
|
|
|
35955
36484
|
current2 = current2[part];
|
|
35956
36485
|
}
|
|
35957
36486
|
const lastPart = parts[parts.length - 1];
|
|
35958
|
-
if (isUnsafeKey2(lastPart))
|
|
35959
|
-
continue;
|
|
36487
|
+
if (isUnsafeKey2(lastPart)) continue;
|
|
35960
36488
|
current2[lastPart] = value;
|
|
35961
36489
|
}
|
|
35962
36490
|
return result;
|
|
@@ -35969,8 +36497,7 @@ var buildRenderData = /* @__PURE__ */ __name((vc, renderProperty) => {
|
|
|
35969
36497
|
credential,
|
|
35970
36498
|
credentialSubjects: Array.isArray(credential.credentialSubject) ? credential.credentialSubject : [credential.credentialSubject].filter(Boolean)
|
|
35971
36499
|
};
|
|
35972
|
-
if (!renderProperty || renderProperty.length === 0)
|
|
35973
|
-
return base;
|
|
36500
|
+
if (!renderProperty || renderProperty.length === 0) return base;
|
|
35974
36501
|
return {
|
|
35975
36502
|
...base,
|
|
35976
36503
|
...buildRenderDataFromPointers(vc, renderProperty),
|
|
@@ -35981,8 +36508,7 @@ var buildRenderData = /* @__PURE__ */ __name((vc, renderProperty) => {
|
|
|
35981
36508
|
// src/plugin.ts
|
|
35982
36509
|
var DEFAULT_TEMPLATE_ID = "https://templates.learncard.com/svg/card/card-1.0.0.svg";
|
|
35983
36510
|
var isValidTemplateId = /* @__PURE__ */ __name((templateId) => {
|
|
35984
|
-
if (!templateId || !templateId.trim())
|
|
35985
|
-
return false;
|
|
36511
|
+
if (!templateId || !templateId.trim()) return false;
|
|
35986
36512
|
return /^https?:\/\//i.test(templateId);
|
|
35987
36513
|
}, "isValidTemplateId");
|
|
35988
36514
|
var buildTemplateRenderMethod = /* @__PURE__ */ __name((config2) => {
|
|
@@ -36008,15 +36534,17 @@ var buildTemplateRenderMethod = /* @__PURE__ */ __name((config2) => {
|
|
|
36008
36534
|
}
|
|
36009
36535
|
return {
|
|
36010
36536
|
type: "TemplateRenderMethod",
|
|
36537
|
+
// TODO: Add other render suites (e.g., WebRenderingTemplate2022, HtmlMustacheRenderingTemplate)
|
|
36011
36538
|
renderSuite: "svg-mustache",
|
|
36012
36539
|
template,
|
|
36540
|
+
// Only include renderProperty when explicitly provided to avoid overriding VC defaults
|
|
36013
36541
|
...config2.renderProperty ? { renderProperty: config2.renderProperty } : {},
|
|
36542
|
+
// TODO: Make mediaType configurable per renderSuite once additional suites are supported
|
|
36014
36543
|
outputPreference: { mediaType: "image/svg+xml" }
|
|
36015
36544
|
};
|
|
36016
36545
|
}, "buildTemplateRenderMethod");
|
|
36017
36546
|
var attachRenderMethod = /* @__PURE__ */ __name((vc, config2) => {
|
|
36018
|
-
if (!config2)
|
|
36019
|
-
return vc;
|
|
36547
|
+
if (!config2) return vc;
|
|
36020
36548
|
const renderMethod = buildTemplateRenderMethod(config2);
|
|
36021
36549
|
const context = Array.isArray(vc["@context"]) ? vc["@context"] : [vc["@context"]];
|
|
36022
36550
|
const updatedContext = context.includes(RENDER_METHOD_CONTEXT) ? context : [...context, RENDER_METHOD_CONTEXT];
|
|
@@ -36040,15 +36568,15 @@ var getRenderMethodPlugin = /* @__PURE__ */ __name((_learnCard) => ({
|
|
|
36040
36568
|
displayName: "Render Method Plugin",
|
|
36041
36569
|
description: "Attaches W3C renderMethod to Verifiable Credentials for standards-based rendering",
|
|
36042
36570
|
methods: {
|
|
36043
|
-
attachRenderMethod: (_lc, vc, config2) => attachRenderMethod(vc, config2),
|
|
36044
|
-
buildTemplateRenderMethod: (_lc, config2) => buildTemplateRenderMethod(config2),
|
|
36045
|
-
getRenderMethods: (_lc, vc) => getRenderMethods(vc),
|
|
36046
|
-
findRenderMethod: (_lc, vc, predicate) => findRenderMethod(vc, predicate),
|
|
36047
|
-
findRenderMethods: (_lc, vc, predicate) => findRenderMethods(vc, predicate),
|
|
36048
|
-
findTemplateRenderMethod: (_lc, vc, suite) => findTemplateRenderMethod(vc, suite),
|
|
36049
|
-
findTemplateRenderMethods: (_lc, vc, suite) => findTemplateRenderMethods(vc, suite),
|
|
36050
|
-
getSvgMustacheRenderMethod: (_lc, vc) => getSvgMustacheRenderMethod(vc),
|
|
36051
|
-
buildRenderData: (_lc, vc, renderProperty) => buildRenderData(vc, renderProperty)
|
|
36571
|
+
attachRenderMethod: /* @__PURE__ */ __name((_lc, vc, config2) => attachRenderMethod(vc, config2), "attachRenderMethod"),
|
|
36572
|
+
buildTemplateRenderMethod: /* @__PURE__ */ __name((_lc, config2) => buildTemplateRenderMethod(config2), "buildTemplateRenderMethod"),
|
|
36573
|
+
getRenderMethods: /* @__PURE__ */ __name((_lc, vc) => getRenderMethods(vc), "getRenderMethods"),
|
|
36574
|
+
findRenderMethod: /* @__PURE__ */ __name((_lc, vc, predicate) => findRenderMethod(vc, predicate), "findRenderMethod"),
|
|
36575
|
+
findRenderMethods: /* @__PURE__ */ __name((_lc, vc, predicate) => findRenderMethods(vc, predicate), "findRenderMethods"),
|
|
36576
|
+
findTemplateRenderMethod: /* @__PURE__ */ __name((_lc, vc, suite) => findTemplateRenderMethod(vc, suite), "findTemplateRenderMethod"),
|
|
36577
|
+
findTemplateRenderMethods: /* @__PURE__ */ __name((_lc, vc, suite) => findTemplateRenderMethods(vc, suite), "findTemplateRenderMethods"),
|
|
36578
|
+
getSvgMustacheRenderMethod: /* @__PURE__ */ __name((_lc, vc) => getSvgMustacheRenderMethod(vc), "getSvgMustacheRenderMethod"),
|
|
36579
|
+
buildRenderData: /* @__PURE__ */ __name((_lc, vc, renderProperty) => buildRenderData(vc, renderProperty), "buildRenderData")
|
|
36052
36580
|
}
|
|
36053
36581
|
}), "getRenderMethodPlugin");
|
|
36054
36582
|
//# sourceMappingURL=render-method-plugin.cjs.development.cjs.map
|