@notabene/javascript-sdk 2.19.1 → 2.20.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/cjs/notabene.cjs +3 -3
- package/dist/cjs/notabene.d.ts +37 -1
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +37 -1
- package/dist/esm/notabene.js +163 -156
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +37 -1
- package/dist/notabene.js +163 -156
- package/package.json +1 -1
- package/src/notabene.ts +1 -0
- package/src/types.ts +17 -0
- package/src/utils/__tests__/connections.test.ts +29 -0
- package/src/utils/connections.ts +25 -1
package/dist/esm/notabene.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Rr = Object.defineProperty;
|
|
2
2
|
var Lr = (e, n, d) => n in e ? Rr(e, n, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[n] = d;
|
|
3
3
|
var q = (e, n, d) => Lr(e, typeof n != "symbol" ? n + "" : n, d);
|
|
4
|
-
var Br = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(Br || {}), Ee = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(Ee || {}), Fr = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(Fr || {}), Vr = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(Vr || {}), Gr = /* @__PURE__ */ ((e) => (e.SMS = "sms", e))(Gr || {}), Jr = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(Jr || {}), Wr = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(Wr || {}), de = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(de || {}), Kr = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(Kr || {}), Xr = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(Xr || {}), Hr = /* @__PURE__ */ ((e) => (e.CONTACT_SUPPORT = "CONTACT_SUPPORT", e))(Hr || {}),
|
|
4
|
+
var Br = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(Br || {}), Ee = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(Ee || {}), Fr = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(Fr || {}), Vr = /* @__PURE__ */ ((e) => (e.ALLOWED = "allowed", e.PENDING = "pending", e))(Vr || {}), Gr = /* @__PURE__ */ ((e) => (e.SMS = "sms", e))(Gr || {}), Jr = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.APPROVED = "approved", e.FAILED = "failed", e.EXPIRED = "expired", e.MAX_ATTEMPTS_REACHED = "max_attempts_reached", e.UNREACHABLE = "unreachable", e))(Jr || {}), Wr = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(Wr || {}), de = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e.WARNING = "warning", e.INFO = "info", e))(de || {}), Kr = /* @__PURE__ */ ((e) => (e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.WALLET_CONNECTION_FAILED = "WALLET_CONNECTION_FAILED", e.WALLET_NOT_SUPPORTED = "WALLET_NOT_SUPPORTED", e.TOKEN_INVALID = "TOKEN_INVALID", e))(Kr || {}), Xr = /* @__PURE__ */ ((e) => (e.WALLET_ADDRESS_NOT_CONNECTED = "WALLET_ADDRESS_NOT_CONNECTED", e.WALLET_LOCKED = "WALLET_LOCKED", e.WALLET_UNREACHABLE = "WALLET_UNREACHABLE", e.JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE = "JURISDICTIONAL_REQUIREMENTS_UNAVAILABLE", e.IDV_UNAVAILABLE = "IDV_UNAVAILABLE", e))(Xr || {}), Hr = /* @__PURE__ */ ((e) => (e.CONTACT_SUPPORT = "CONTACT_SUPPORT", e))(Hr || {}), En = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(En || {}), qr = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(qr || {}), Yr = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.SOL_SIWX = "sol-siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP322 = "bip-322", e.TIP191 = "tip-191", e.ED25519 = "ed25519", e.XRP_ED25519 = "xrp-ed25519", e.XLM_ED25519 = "xlm-ed25519", e.CIP8 = "cip-8", e.COSMOS = "cosmos-ecdsa", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e.CONCORDIUM = "concordium", e))(Yr || {});
|
|
5
5
|
class Qr {
|
|
6
6
|
constructor() {
|
|
7
7
|
q(this, "listeners", /* @__PURE__ */ new Map());
|
|
@@ -168,7 +168,7 @@ class xr {
|
|
|
168
168
|
* @param value - The new transaction value
|
|
169
169
|
*/
|
|
170
170
|
update(n, d) {
|
|
171
|
-
this._value = n, d && (this._options = d), this.send({ type:
|
|
171
|
+
this._value = n, d && (this._options = d), this.send({ type: En.UPDATE, value: n, options: this._options });
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* Waits for the component to complete and returns the transaction response
|
|
@@ -282,7 +282,7 @@ function ni(e) {
|
|
|
282
282
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class Nn extends Error {
|
|
286
286
|
constructor(d, g) {
|
|
287
287
|
var l;
|
|
288
288
|
super(d, g);
|
|
@@ -290,8 +290,8 @@ class En extends Error {
|
|
|
290
290
|
this.name = this.constructor.name, (l = Error.captureStackTrace) == null || l.call(Error, this, this.constructor);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
q(
|
|
294
|
-
class pe extends
|
|
293
|
+
q(Nn, "code", "ERR_JOSE_GENERIC");
|
|
294
|
+
class pe extends Nn {
|
|
295
295
|
constructor() {
|
|
296
296
|
super(...arguments);
|
|
297
297
|
q(this, "code", "ERR_JWT_INVALID");
|
|
@@ -337,54 +337,54 @@ function ai(e) {
|
|
|
337
337
|
throw new pe("Invalid JWT Claims Set");
|
|
338
338
|
return l;
|
|
339
339
|
}
|
|
340
|
-
var b = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
341
|
-
Object.defineProperty(
|
|
340
|
+
var b = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Tn = {}, Un = {};
|
|
341
|
+
Object.defineProperty(Un, "__esModule", { value: !0 });
|
|
342
342
|
var ge = {};
|
|
343
343
|
Object.defineProperty(ge, "__esModule", { value: !0 });
|
|
344
344
|
ge.DocumentTypeCode = ge.TaxSchemeCode = ge.TaxCategoryCode = ge.UnitCode = void 0;
|
|
345
|
-
var
|
|
345
|
+
var hn;
|
|
346
346
|
(function(e) {
|
|
347
347
|
e.Kilogram = "KGM", e.Gram = "GRM", e.Milligram = "MGM", e.Tonne = "TNE", e.Liter = "LTR", e.Milliliter = "MLT", e.CubicMillimeter = "MMQ", e.CubicCentimeter = "CMQ", e.CubicDecimeter = "DMQ", e.CubicMeter = "MTQ", e.Millimeter = "MMT", e.Centimeter = "CMT", e.Decimeter = "DMT", e.Meter = "MTR", e.Kilometer = "KMT", e.SquareMeter = "MTK", e.Each = "EA", e.Piece = "PCE", e.NumberOfPairs = "NPR", e.Second = "SEC", e.Minute = "MIN", e.Hour = "HUR", e.Day = "DAY", e.Week = "WEE", e.Month = "MON", e.Year = "ANN", e.KilowattHour = "KWH", e.NumberOfArticles = "NAR";
|
|
348
|
-
})(
|
|
349
|
-
var
|
|
348
|
+
})(hn || (ge.UnitCode = hn = {}));
|
|
349
|
+
var pn;
|
|
350
350
|
(function(e) {
|
|
351
351
|
e.StandardRate = "S", e.ZeroRated = "Z", e.ExemptFromTax = "E", e.VATReverseCharge = "AE", e.FreeExportItem = "G", e.OutsideScopeOfTax = "O", e.VATExemptIntraCommunity = "K", e.CanaryIslandsIndirectTax = "L", e.CeutaMelillaTax = "M", e.HigherRate = "H", e.LowerRate = "AA", e.TransferredVAT = "B", e.MixedTaxRate = "A", e.ExemptForResale = "AB", e.VATReverseChargeAlt = "AC", e.VATExemptIntraCommunityAlt = "AD", e.ExemptFromTaxDeprecated = "C", e.ExemptArticle309 = "D";
|
|
352
|
-
})(
|
|
353
|
-
var
|
|
352
|
+
})(pn || (ge.TaxCategoryCode = pn = {}));
|
|
353
|
+
var yn;
|
|
354
354
|
(function(e) {
|
|
355
355
|
e.ProfitTax = "AAA", e.CorporateIncomeTax = "AAB", e.PersonalIncomeTax = "AAC", e.SocialSecurityTax = "AAD", e.PropertyTax = "AAE", e.InheritanceTax = "AAF", e.GiftTax = "AAG", e.CapitalGainsTax = "AAH", e.WealthTax = "AAI", e.StampDuty = "AAJ", e.ConsumptionTax = "CST", e.CustomsDuty = "CUS", e.EnvironmentalTax = "ENV", e.ExciseTax = "EXC", e.ExportTax = "EXP", e.FreightTax = "FRT", e.GoodsAndServicesTax = "GST", e.ImportTax = "IMP", e.OtherTax = "OTH", e.SalesTax = "SAL", e.TurnoverTax = "TOT", e.ValueAddedTax = "VAT";
|
|
356
|
-
})(
|
|
357
|
-
var
|
|
356
|
+
})(yn || (ge.TaxSchemeCode = yn = {}));
|
|
357
|
+
var $n;
|
|
358
358
|
(function(e) {
|
|
359
359
|
e.Order = "Order", e.OrderResponse = "OrderResponse", e.OrderChange = "OrderChange", e.OrderCancellation = "OrderCancellation", e.Quotation = "Quotation", e.DespatchAdvice = "DespatchAdvice", e.ReceiptAdvice = "ReceiptAdvice", e.Invoice = "Invoice", e.CreditNote = "CreditNote", e.DebitNote = "DebitNote", e.SelfBilledInvoice = "SelfBilledInvoice", e.RemittanceAdvice = "RemittanceAdvice", e.Statement = "Statement", e.CertificateOfOrigin = "CertificateOfOrigin", e.Contract = "Contract", e.Timesheet = "Timesheet", e.Waybill = "Waybill", e.Manifest = "Manifest";
|
|
360
|
-
})(
|
|
361
|
-
var Un = {};
|
|
362
|
-
Object.defineProperty(Un, "__esModule", { value: !0 });
|
|
360
|
+
})($n || (ge.DocumentTypeCode = $n = {}));
|
|
363
361
|
var An = {};
|
|
364
362
|
Object.defineProperty(An, "__esModule", { value: !0 });
|
|
363
|
+
var Mn = {};
|
|
364
|
+
Object.defineProperty(Mn, "__esModule", { value: !0 });
|
|
365
365
|
var Ke = {};
|
|
366
366
|
Object.defineProperty(Ke, "__esModule", { value: !0 });
|
|
367
|
-
Ke.normalizeForHashing =
|
|
367
|
+
Ke.normalizeForHashing = kn;
|
|
368
368
|
Ke.generateNameHash = ci;
|
|
369
|
-
function
|
|
369
|
+
function kn(e) {
|
|
370
370
|
return e.replace(/\s+/g, "").toUpperCase();
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Cn(e) {
|
|
373
373
|
var l;
|
|
374
374
|
if (!((l = e.name) != null && l.nameIdentifier) || e.name.nameIdentifier.length === 0)
|
|
375
375
|
return "";
|
|
376
376
|
const d = e.name.nameIdentifier.find((s) => s.naturalPersonNameIdentifierType === "LEGL") || e.name.nameIdentifier[0], g = [];
|
|
377
377
|
return d.secondaryIdentifier && g.push(d.secondaryIdentifier), g.push(d.primaryIdentifier), g.join(" ");
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Rn(e) {
|
|
380
380
|
var g;
|
|
381
381
|
return !((g = e.name) != null && g.nameIdentifier) || e.name.nameIdentifier.length === 0 ? "" : (e.name.nameIdentifier.find((l) => l.legalPersonNameIdentifierType === "LEGL") || e.name.nameIdentifier[0]).legalPersonName;
|
|
382
382
|
}
|
|
383
383
|
function oi(e) {
|
|
384
|
-
return e.originatorPerson.map((d) => d.naturalPerson ?
|
|
384
|
+
return e.originatorPerson.map((d) => d.naturalPerson ? Cn(d.naturalPerson) : d.legalPerson ? Rn(d.legalPerson) : "").filter((d) => d.length > 0);
|
|
385
385
|
}
|
|
386
386
|
function ui(e) {
|
|
387
|
-
return e.beneficiaryPerson.map((d) => d.naturalPerson ?
|
|
387
|
+
return e.beneficiaryPerson.map((d) => d.naturalPerson ? Cn(d.naturalPerson) : d.legalPerson ? Rn(d.legalPerson) : "").filter((d) => d.length > 0);
|
|
388
388
|
}
|
|
389
389
|
async function ci(e) {
|
|
390
390
|
let n;
|
|
@@ -396,7 +396,7 @@ async function ci(e) {
|
|
|
396
396
|
n = ui(e).join(" ");
|
|
397
397
|
else
|
|
398
398
|
throw new Error("Invalid input type. Expected string, IVMS101 Originator, or IVMS101 Beneficiary");
|
|
399
|
-
const d =
|
|
399
|
+
const d = kn(n), l = new TextEncoder().encode(d);
|
|
400
400
|
let s;
|
|
401
401
|
if (typeof globalThis < "u" && "crypto" in globalThis && globalThis.crypto && "subtle" in globalThis.crypto)
|
|
402
402
|
s = await globalThis.crypto.subtle.digest("SHA-256", l);
|
|
@@ -409,7 +409,7 @@ async function ci(e) {
|
|
|
409
409
|
}
|
|
410
410
|
return Array.from(new Uint8Array(s)).map((h) => h.toString(16).padStart(2, "0")).join("");
|
|
411
411
|
}
|
|
412
|
-
var
|
|
412
|
+
var Ln = {}, Bn = {}, at = {}, te = {}, Ze = {};
|
|
413
413
|
(function(e) {
|
|
414
414
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.globalConfig = e.$ZodEncodeError = e.$ZodAsyncError = e.$brand = e.NEVER = void 0, e.$constructor = n, e.config = l, e.NEVER = Object.freeze({
|
|
415
415
|
status: "aborted"
|
|
@@ -472,7 +472,7 @@ Z.assert = mi;
|
|
|
472
472
|
Z.getEnumValues = gi;
|
|
473
473
|
Z.joinValues = vi;
|
|
474
474
|
Z.jsonStringifyReplacer = _i;
|
|
475
|
-
Z.cached =
|
|
475
|
+
Z.cached = Fn;
|
|
476
476
|
Z.nullish = bi;
|
|
477
477
|
Z.cleanRegex = hi;
|
|
478
478
|
Z.floatSafeRemainder = pi;
|
|
@@ -493,7 +493,7 @@ Z.escapeRegex = Di;
|
|
|
493
493
|
Z.clone = Se;
|
|
494
494
|
Z.normalizeParams = Ei;
|
|
495
495
|
Z.createTransparentProxy = Ni;
|
|
496
|
-
Z.stringifyPrimitive =
|
|
496
|
+
Z.stringifyPrimitive = Vn;
|
|
497
497
|
Z.optionalKeys = Ti;
|
|
498
498
|
Z.pick = Ui;
|
|
499
499
|
Z.omit = Ai;
|
|
@@ -510,8 +510,8 @@ Z.getSizableOrigin = Gi;
|
|
|
510
510
|
Z.getLengthableOrigin = Ji;
|
|
511
511
|
Z.issue = Wi;
|
|
512
512
|
Z.cleanEnum = Ki;
|
|
513
|
-
Z.base64ToUint8Array =
|
|
514
|
-
Z.uint8ArrayToBase64 =
|
|
513
|
+
Z.base64ToUint8Array = Gn;
|
|
514
|
+
Z.uint8ArrayToBase64 = Jn;
|
|
515
515
|
Z.base64urlToUint8Array = Xi;
|
|
516
516
|
Z.uint8ArrayToBase64url = Hi;
|
|
517
517
|
Z.hexToUint8Array = qi;
|
|
@@ -534,12 +534,12 @@ function gi(e) {
|
|
|
534
534
|
return Object.entries(e).filter(([g, l]) => n.indexOf(+g) === -1).map(([g, l]) => l);
|
|
535
535
|
}
|
|
536
536
|
function vi(e, n = "|") {
|
|
537
|
-
return e.map((d) =>
|
|
537
|
+
return e.map((d) => Vn(d)).join(n);
|
|
538
538
|
}
|
|
539
539
|
function _i(e, n) {
|
|
540
540
|
return typeof n == "bigint" ? n.toString() : n;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Fn(e) {
|
|
543
543
|
return {
|
|
544
544
|
get value() {
|
|
545
545
|
{
|
|
@@ -566,13 +566,13 @@ function pi(e, n) {
|
|
|
566
566
|
const s = d > l ? d : l, h = Number.parseInt(e.toFixed(s).replace(".", "")), y = Number.parseInt(n.toFixed(s).replace(".", ""));
|
|
567
567
|
return h % y / 10 ** s;
|
|
568
568
|
}
|
|
569
|
-
const
|
|
569
|
+
const Sn = Symbol("evaluating");
|
|
570
570
|
function yi(e, n, d) {
|
|
571
571
|
let g;
|
|
572
572
|
Object.defineProperty(e, n, {
|
|
573
573
|
get() {
|
|
574
|
-
if (g !==
|
|
575
|
-
return g === void 0 && (g =
|
|
574
|
+
if (g !== Sn)
|
|
575
|
+
return g === void 0 && (g = Sn, g = d()), g;
|
|
576
576
|
},
|
|
577
577
|
set(l) {
|
|
578
578
|
Object.defineProperty(e, n, {
|
|
@@ -632,7 +632,7 @@ Z.captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (
|
|
|
632
632
|
function ot(e) {
|
|
633
633
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
634
634
|
}
|
|
635
|
-
Z.allowsEval =
|
|
635
|
+
Z.allowsEval = Fn(() => {
|
|
636
636
|
var e;
|
|
637
637
|
if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
638
638
|
return !1;
|
|
@@ -733,7 +733,7 @@ function Ni(e) {
|
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Vn(e) {
|
|
737
737
|
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
738
738
|
}
|
|
739
739
|
function Ti(e) {
|
|
@@ -917,13 +917,13 @@ function Wi(...e) {
|
|
|
917
917
|
function Ki(e) {
|
|
918
918
|
return Object.entries(e).filter(([n, d]) => Number.isNaN(Number.parseInt(n, 10))).map((n) => n[1]);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Gn(e) {
|
|
921
921
|
const n = atob(e), d = new Uint8Array(n.length);
|
|
922
922
|
for (let g = 0; g < n.length; g++)
|
|
923
923
|
d[g] = n.charCodeAt(g);
|
|
924
924
|
return d;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Jn(e) {
|
|
927
927
|
let n = "";
|
|
928
928
|
for (let d = 0; d < e.length; d++)
|
|
929
929
|
n += String.fromCharCode(e[d]);
|
|
@@ -931,10 +931,10 @@ function Gn(e) {
|
|
|
931
931
|
}
|
|
932
932
|
function Xi(e) {
|
|
933
933
|
const n = e.replace(/-/g, "+").replace(/_/g, "/"), d = "=".repeat((4 - n.length % 4) % 4);
|
|
934
|
-
return
|
|
934
|
+
return Gn(n + d);
|
|
935
935
|
}
|
|
936
936
|
function Hi(e) {
|
|
937
|
-
return
|
|
937
|
+
return Jn(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
938
938
|
}
|
|
939
939
|
function qi(e) {
|
|
940
940
|
const n = e.replace(/^0x/, "");
|
|
@@ -976,9 +976,9 @@ ue.$ZodRealError = ue.$ZodError = void 0;
|
|
|
976
976
|
ue.flattenError = ra;
|
|
977
977
|
ue.formatError = ia;
|
|
978
978
|
ue.treeifyError = aa;
|
|
979
|
-
ue.toDotPath =
|
|
979
|
+
ue.toDotPath = Xn;
|
|
980
980
|
ue.prettifyError = oa;
|
|
981
|
-
const
|
|
981
|
+
const Wn = Ze, na = ta(Z), Kn = (e, n) => {
|
|
982
982
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
983
983
|
value: e._zod,
|
|
984
984
|
enumerable: !1
|
|
@@ -990,8 +990,8 @@ const Jn = Ze, na = ta(Z), Wn = (e, n) => {
|
|
|
990
990
|
enumerable: !1
|
|
991
991
|
});
|
|
992
992
|
};
|
|
993
|
-
ue.$ZodError = (0,
|
|
994
|
-
ue.$ZodRealError = (0,
|
|
993
|
+
ue.$ZodError = (0, Wn.$constructor)("$ZodError", Kn);
|
|
994
|
+
ue.$ZodRealError = (0, Wn.$constructor)("$ZodError", Kn, { Parent: Error });
|
|
995
995
|
function ra(e, n = (d) => d.message) {
|
|
996
996
|
const d = {}, g = [];
|
|
997
997
|
for (const l of e.issues)
|
|
@@ -1044,7 +1044,7 @@ function aa(e, n = (d) => d.message) {
|
|
|
1044
1044
|
};
|
|
1045
1045
|
return g(e), d;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Xn(e) {
|
|
1048
1048
|
const n = [], d = e.map((g) => typeof g == "object" ? g.key : g);
|
|
1049
1049
|
for (const g of d)
|
|
1050
1050
|
typeof g == "number" ? n.push(`[${g}]`) : typeof g == "symbol" ? n.push(`[${JSON.stringify(String(g))}]`) : /[^\w$]/.test(g) ? n.push(`[${JSON.stringify(g)}]`) : (n.length && n.push("."), n.push(g));
|
|
@@ -1054,7 +1054,7 @@ function oa(e) {
|
|
|
1054
1054
|
var g;
|
|
1055
1055
|
const n = [], d = [...e.issues].sort((l, s) => (l.path ?? []).length - (s.path ?? []).length);
|
|
1056
1056
|
for (const l of d)
|
|
1057
|
-
n.push(`✖ ${l.message}`), (g = l.path) != null && g.length && n.push(` → at ${
|
|
1057
|
+
n.push(`✖ ${l.message}`), (g = l.path) != null && g.length && n.push(` → at ${Xn(l.path)}`);
|
|
1058
1058
|
return n.join(`
|
|
1059
1059
|
`);
|
|
1060
1060
|
}
|
|
@@ -3219,7 +3219,7 @@ var la = ct.exports, lt = { exports: {} };
|
|
|
3219
3219
|
}
|
|
3220
3220
|
e.exports = n.default;
|
|
3221
3221
|
})(lt, lt.exports);
|
|
3222
|
-
var da = lt.exports,
|
|
3222
|
+
var da = lt.exports, Hn = {};
|
|
3223
3223
|
(function(e) {
|
|
3224
3224
|
var n = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
3225
3225
|
u === void 0 && (u = o);
|
|
@@ -3344,7 +3344,7 @@ var da = lt.exports, Xn = {};
|
|
|
3344
3344
|
localeError: h()
|
|
3345
3345
|
};
|
|
3346
3346
|
}
|
|
3347
|
-
})(
|
|
3347
|
+
})(Hn);
|
|
3348
3348
|
var dt = { exports: {} };
|
|
3349
3349
|
(function(e, n) {
|
|
3350
3350
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -3943,7 +3943,7 @@ var ga = mt.exports, xt = {};
|
|
|
3943
3943
|
};
|
|
3944
3944
|
}
|
|
3945
3945
|
})(xt);
|
|
3946
|
-
var
|
|
3946
|
+
var qn = {};
|
|
3947
3947
|
(function(e) {
|
|
3948
3948
|
var n = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
3949
3949
|
u === void 0 && (u = o);
|
|
@@ -4059,7 +4059,7 @@ var Hn = {};
|
|
|
4059
4059
|
localeError: h()
|
|
4060
4060
|
};
|
|
4061
4061
|
}
|
|
4062
|
-
})(
|
|
4062
|
+
})(qn);
|
|
4063
4063
|
var gt = { exports: {} };
|
|
4064
4064
|
(function(e, n) {
|
|
4065
4065
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -5014,7 +5014,7 @@ var $a = yt.exports, $t = { exports: {} };
|
|
|
5014
5014
|
}
|
|
5015
5015
|
e.exports = n.default;
|
|
5016
5016
|
})($t, $t.exports);
|
|
5017
|
-
var Sa = $t.exports,
|
|
5017
|
+
var Sa = $t.exports, Yn = {};
|
|
5018
5018
|
(function(e) {
|
|
5019
5019
|
var n = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
5020
5020
|
u === void 0 && (u = o);
|
|
@@ -5130,7 +5130,7 @@ var Sa = $t.exports, qn = {};
|
|
|
5130
5130
|
localeError: h()
|
|
5131
5131
|
};
|
|
5132
5132
|
}
|
|
5133
|
-
})(
|
|
5133
|
+
})(Yn);
|
|
5134
5134
|
var St = { exports: {} };
|
|
5135
5135
|
(function(e, n) {
|
|
5136
5136
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -5363,7 +5363,7 @@ var Oa = St.exports, Ot = { exports: {} };
|
|
|
5363
5363
|
}
|
|
5364
5364
|
e.exports = n.default;
|
|
5365
5365
|
})(Ot, Ot.exports);
|
|
5366
|
-
var ja = Ot.exports,
|
|
5366
|
+
var ja = Ot.exports, Qn = {};
|
|
5367
5367
|
(function(e) {
|
|
5368
5368
|
var n = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
5369
5369
|
u === void 0 && (u = o);
|
|
@@ -5486,7 +5486,7 @@ var ja = Ot.exports, Yn = {};
|
|
|
5486
5486
|
localeError: h()
|
|
5487
5487
|
};
|
|
5488
5488
|
}
|
|
5489
|
-
})(
|
|
5489
|
+
})(Qn);
|
|
5490
5490
|
var jt = { exports: {} }, Pt = { exports: {} };
|
|
5491
5491
|
(function(e, n) {
|
|
5492
5492
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -5603,13 +5603,13 @@ var jt = { exports: {} }, Pt = { exports: {} };
|
|
|
5603
5603
|
}
|
|
5604
5604
|
e.exports = n.default;
|
|
5605
5605
|
})(Pt, Pt.exports);
|
|
5606
|
-
var
|
|
5606
|
+
var xn = Pt.exports;
|
|
5607
5607
|
(function(e, n) {
|
|
5608
5608
|
var d = b && b.__importDefault || function(s) {
|
|
5609
5609
|
return s && s.__esModule ? s : { default: s };
|
|
5610
5610
|
};
|
|
5611
5611
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.default = l;
|
|
5612
|
-
const g = d(
|
|
5612
|
+
const g = d(xn);
|
|
5613
5613
|
function l() {
|
|
5614
5614
|
return (0, g.default)();
|
|
5615
5615
|
}
|
|
@@ -5731,7 +5731,7 @@ var Pa = jt.exports, It = { exports: {} };
|
|
|
5731
5731
|
}
|
|
5732
5732
|
e.exports = n.default;
|
|
5733
5733
|
})(It, It.exports);
|
|
5734
|
-
var Ia = It.exports,
|
|
5734
|
+
var Ia = It.exports, er = {};
|
|
5735
5735
|
(function(e) {
|
|
5736
5736
|
var n = b && b.__createBinding || (Object.create ? function(u, t, a, f) {
|
|
5737
5737
|
f === void 0 && (f = a);
|
|
@@ -5936,7 +5936,7 @@ var Ia = It.exports, xn = {};
|
|
|
5936
5936
|
localeError: r()
|
|
5937
5937
|
};
|
|
5938
5938
|
}
|
|
5939
|
-
})(
|
|
5939
|
+
})(er);
|
|
5940
5940
|
var zt = { exports: {} };
|
|
5941
5941
|
(function(e, n) {
|
|
5942
5942
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -7486,7 +7486,7 @@ var Ca = Ct.exports, Rt = { exports: {} };
|
|
|
7486
7486
|
}
|
|
7487
7487
|
e.exports = n.default;
|
|
7488
7488
|
})(Rt, Rt.exports);
|
|
7489
|
-
var Ra = Rt.exports,
|
|
7489
|
+
var Ra = Rt.exports, tr = {};
|
|
7490
7490
|
(function(e) {
|
|
7491
7491
|
var n = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
7492
7492
|
u === void 0 && (u = o);
|
|
@@ -7602,7 +7602,7 @@ var Ra = Rt.exports, er = {};
|
|
|
7602
7602
|
localeError: h()
|
|
7603
7603
|
};
|
|
7604
7604
|
}
|
|
7605
|
-
})(
|
|
7605
|
+
})(tr);
|
|
7606
7606
|
var Lt = { exports: {} }, Bt = { exports: {} };
|
|
7607
7607
|
(function(e, n) {
|
|
7608
7608
|
var d = b && b.__createBinding || (Object.create ? function(i, r, o, u) {
|
|
@@ -7719,13 +7719,13 @@ var Lt = { exports: {} }, Bt = { exports: {} };
|
|
|
7719
7719
|
}
|
|
7720
7720
|
e.exports = n.default;
|
|
7721
7721
|
})(Bt, Bt.exports);
|
|
7722
|
-
var
|
|
7722
|
+
var nr = Bt.exports;
|
|
7723
7723
|
(function(e, n) {
|
|
7724
7724
|
var d = b && b.__importDefault || function(s) {
|
|
7725
7725
|
return s && s.__esModule ? s : { default: s };
|
|
7726
7726
|
};
|
|
7727
7727
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.default = l;
|
|
7728
|
-
const g = d(
|
|
7728
|
+
const g = d(nr);
|
|
7729
7729
|
function l() {
|
|
7730
7730
|
return (0, g.default)();
|
|
7731
7731
|
}
|
|
@@ -8329,7 +8329,7 @@ var Ja = Wt.exports;
|
|
|
8329
8329
|
Object.defineProperty(e, "be", { enumerable: !0, get: function() {
|
|
8330
8330
|
return n(l).default;
|
|
8331
8331
|
} });
|
|
8332
|
-
var s =
|
|
8332
|
+
var s = Hn;
|
|
8333
8333
|
Object.defineProperty(e, "bg", { enumerable: !0, get: function() {
|
|
8334
8334
|
return n(s).default;
|
|
8335
8335
|
} });
|
|
@@ -8353,7 +8353,7 @@ var Ja = Wt.exports;
|
|
|
8353
8353
|
Object.defineProperty(e, "en", { enumerable: !0, get: function() {
|
|
8354
8354
|
return n(o).default;
|
|
8355
8355
|
} });
|
|
8356
|
-
var u =
|
|
8356
|
+
var u = qn;
|
|
8357
8357
|
Object.defineProperty(e, "eo", { enumerable: !0, get: function() {
|
|
8358
8358
|
return n(u).default;
|
|
8359
8359
|
} });
|
|
@@ -8389,7 +8389,7 @@ var Ja = Wt.exports;
|
|
|
8389
8389
|
Object.defineProperty(e, "id", { enumerable: !0, get: function() {
|
|
8390
8390
|
return n(T).default;
|
|
8391
8391
|
} });
|
|
8392
|
-
var k =
|
|
8392
|
+
var k = Yn;
|
|
8393
8393
|
Object.defineProperty(e, "is", { enumerable: !0, get: function() {
|
|
8394
8394
|
return n(k).default;
|
|
8395
8395
|
} });
|
|
@@ -8401,7 +8401,7 @@ var Ja = Wt.exports;
|
|
|
8401
8401
|
Object.defineProperty(e, "ja", { enumerable: !0, get: function() {
|
|
8402
8402
|
return n(C).default;
|
|
8403
8403
|
} });
|
|
8404
|
-
var B =
|
|
8404
|
+
var B = Qn;
|
|
8405
8405
|
Object.defineProperty(e, "ka", { enumerable: !0, get: function() {
|
|
8406
8406
|
return n(B).default;
|
|
8407
8407
|
} });
|
|
@@ -8409,7 +8409,7 @@ var Ja = Wt.exports;
|
|
|
8409
8409
|
Object.defineProperty(e, "kh", { enumerable: !0, get: function() {
|
|
8410
8410
|
return n(J).default;
|
|
8411
8411
|
} });
|
|
8412
|
-
var X =
|
|
8412
|
+
var X = xn;
|
|
8413
8413
|
Object.defineProperty(e, "km", { enumerable: !0, get: function() {
|
|
8414
8414
|
return n(X).default;
|
|
8415
8415
|
} });
|
|
@@ -8417,7 +8417,7 @@ var Ja = Wt.exports;
|
|
|
8417
8417
|
Object.defineProperty(e, "ko", { enumerable: !0, get: function() {
|
|
8418
8418
|
return n(ie).default;
|
|
8419
8419
|
} });
|
|
8420
|
-
var se =
|
|
8420
|
+
var se = er;
|
|
8421
8421
|
Object.defineProperty(e, "lt", { enumerable: !0, get: function() {
|
|
8422
8422
|
return n(se).default;
|
|
8423
8423
|
} });
|
|
@@ -8473,7 +8473,7 @@ var Ja = Wt.exports;
|
|
|
8473
8473
|
Object.defineProperty(e, "th", { enumerable: !0, get: function() {
|
|
8474
8474
|
return n(U).default;
|
|
8475
8475
|
} });
|
|
8476
|
-
var M =
|
|
8476
|
+
var M = tr;
|
|
8477
8477
|
Object.defineProperty(e, "tr", { enumerable: !0, get: function() {
|
|
8478
8478
|
return n(M).default;
|
|
8479
8479
|
} });
|
|
@@ -8481,7 +8481,7 @@ var Ja = Wt.exports;
|
|
|
8481
8481
|
Object.defineProperty(e, "ua", { enumerable: !0, get: function() {
|
|
8482
8482
|
return n(L).default;
|
|
8483
8483
|
} });
|
|
8484
|
-
var V =
|
|
8484
|
+
var V = nr;
|
|
8485
8485
|
Object.defineProperty(e, "uk", { enumerable: !0, get: function() {
|
|
8486
8486
|
return n(V).default;
|
|
8487
8487
|
} });
|
|
@@ -8509,10 +8509,10 @@ var Ja = Wt.exports;
|
|
|
8509
8509
|
var oe = {};
|
|
8510
8510
|
Object.defineProperty(oe, "__esModule", { value: !0 });
|
|
8511
8511
|
oe.globalRegistry = oe.$ZodRegistry = oe.$input = oe.$output = void 0;
|
|
8512
|
-
oe.registry =
|
|
8512
|
+
oe.registry = ir;
|
|
8513
8513
|
oe.$output = Symbol("ZodOutput");
|
|
8514
8514
|
oe.$input = Symbol("ZodInput");
|
|
8515
|
-
class
|
|
8515
|
+
class rr {
|
|
8516
8516
|
constructor() {
|
|
8517
8517
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
8518
8518
|
}
|
|
@@ -8546,11 +8546,11 @@ class nr {
|
|
|
8546
8546
|
return this._map.has(n);
|
|
8547
8547
|
}
|
|
8548
8548
|
}
|
|
8549
|
-
oe.$ZodRegistry =
|
|
8550
|
-
function
|
|
8551
|
-
return new
|
|
8549
|
+
oe.$ZodRegistry = rr;
|
|
8550
|
+
function ir() {
|
|
8551
|
+
return new rr();
|
|
8552
8552
|
}
|
|
8553
|
-
oe.globalRegistry =
|
|
8553
|
+
oe.globalRegistry = ir();
|
|
8554
8554
|
var E = {}, Wa = b && b.__createBinding || (Object.create ? function(e, n, d, g) {
|
|
8555
8555
|
g === void 0 && (g = d);
|
|
8556
8556
|
var l = Object.getOwnPropertyDescriptor(n, d);
|
|
@@ -8622,12 +8622,12 @@ E._void = Fo;
|
|
|
8622
8622
|
E._date = Vo;
|
|
8623
8623
|
E._coercedDate = Go;
|
|
8624
8624
|
E._nan = Jo;
|
|
8625
|
-
E._lt =
|
|
8625
|
+
E._lt = ar;
|
|
8626
8626
|
E._lte = Ue;
|
|
8627
8627
|
E._max = Ue;
|
|
8628
8628
|
E._lte = Ue;
|
|
8629
8629
|
E._max = Ue;
|
|
8630
|
-
E._gt =
|
|
8630
|
+
E._gt = or;
|
|
8631
8631
|
E._gte = Ae;
|
|
8632
8632
|
E._min = Ae;
|
|
8633
8633
|
E._gte = Ae;
|
|
@@ -8683,7 +8683,7 @@ E._promise = Cu;
|
|
|
8683
8683
|
E._custom = Ru;
|
|
8684
8684
|
E._refine = Lu;
|
|
8685
8685
|
E._superRefine = Bu;
|
|
8686
|
-
E._check =
|
|
8686
|
+
E._check = ur;
|
|
8687
8687
|
E._stringbool = Fu;
|
|
8688
8688
|
E._stringFormat = Vu;
|
|
8689
8689
|
const Y = en(He), Je = en(Yt), A = en(Z);
|
|
@@ -9107,7 +9107,7 @@ function Jo(e, n) {
|
|
|
9107
9107
|
...A.normalizeParams(n)
|
|
9108
9108
|
});
|
|
9109
9109
|
}
|
|
9110
|
-
function
|
|
9110
|
+
function ar(e, n) {
|
|
9111
9111
|
return new Y.$ZodCheckLessThan({
|
|
9112
9112
|
check: "less_than",
|
|
9113
9113
|
...A.normalizeParams(n),
|
|
@@ -9123,7 +9123,7 @@ function Ue(e, n) {
|
|
|
9123
9123
|
inclusive: !0
|
|
9124
9124
|
});
|
|
9125
9125
|
}
|
|
9126
|
-
function
|
|
9126
|
+
function or(e, n) {
|
|
9127
9127
|
return new Y.$ZodCheckGreaterThan({
|
|
9128
9128
|
check: "greater_than",
|
|
9129
9129
|
...A.normalizeParams(n),
|
|
@@ -9140,10 +9140,10 @@ function Ae(e, n) {
|
|
|
9140
9140
|
});
|
|
9141
9141
|
}
|
|
9142
9142
|
function Wo(e) {
|
|
9143
|
-
return
|
|
9143
|
+
return or(0, e);
|
|
9144
9144
|
}
|
|
9145
9145
|
function Ko(e) {
|
|
9146
|
-
return
|
|
9146
|
+
return ar(0, e);
|
|
9147
9147
|
}
|
|
9148
9148
|
function Xo(e) {
|
|
9149
9149
|
return Ue(0, e);
|
|
@@ -9468,7 +9468,7 @@ function Lu(e, n, d) {
|
|
|
9468
9468
|
});
|
|
9469
9469
|
}
|
|
9470
9470
|
function Bu(e) {
|
|
9471
|
-
const n =
|
|
9471
|
+
const n = ur((d) => (d.addIssue = (g) => {
|
|
9472
9472
|
if (typeof g == "string")
|
|
9473
9473
|
d.issues.push(A.issue(g, d.value, n._zod.def));
|
|
9474
9474
|
else {
|
|
@@ -9478,7 +9478,7 @@ function Bu(e) {
|
|
|
9478
9478
|
}, e(d.value, d)));
|
|
9479
9479
|
return n;
|
|
9480
9480
|
}
|
|
9481
|
-
function
|
|
9481
|
+
function ur(e, n) {
|
|
9482
9482
|
const d = new Y.$ZodCheck({
|
|
9483
9483
|
check: "custom",
|
|
9484
9484
|
...A.normalizeParams(n)
|
|
@@ -9524,10 +9524,10 @@ var ke = {};
|
|
|
9524
9524
|
Object.defineProperty(ke, "__esModule", { value: !0 });
|
|
9525
9525
|
ke.JSONSchemaGenerator = void 0;
|
|
9526
9526
|
ke.toJSONSchema = Ju;
|
|
9527
|
-
const
|
|
9527
|
+
const cr = oe, Gu = Z;
|
|
9528
9528
|
class Kt {
|
|
9529
9529
|
constructor(n) {
|
|
9530
|
-
this.counter = 0, this.metadataRegistry = (n == null ? void 0 : n.metadata) ??
|
|
9530
|
+
this.counter = 0, this.metadataRegistry = (n == null ? void 0 : n.metadata) ?? cr.globalRegistry, this.target = (n == null ? void 0 : n.target) ?? "draft-2020-12", this.unrepresentable = (n == null ? void 0 : n.unrepresentable) ?? "throw", this.override = (n == null ? void 0 : n.override) ?? (() => {
|
|
9531
9531
|
}), this.io = (n == null ? void 0 : n.io) ?? "output", this.seen = /* @__PURE__ */ new Map();
|
|
9532
9532
|
}
|
|
9533
9533
|
process(n, d = { path: [], schemaPath: [] }) {
|
|
@@ -9936,7 +9936,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9936
9936
|
}
|
|
9937
9937
|
ke.JSONSchemaGenerator = Kt;
|
|
9938
9938
|
function Ju(e, n) {
|
|
9939
|
-
if (e instanceof
|
|
9939
|
+
if (e instanceof cr.$ZodRegistry) {
|
|
9940
9940
|
const g = new Kt(n), l = {};
|
|
9941
9941
|
for (const y of e._idmap.entries()) {
|
|
9942
9942
|
const [i, r] = y;
|
|
@@ -10045,8 +10045,8 @@ function Q(e, n) {
|
|
|
10045
10045
|
}
|
|
10046
10046
|
throw new Error(`Unknown schema type: ${l.type}`);
|
|
10047
10047
|
}
|
|
10048
|
-
var
|
|
10049
|
-
Object.defineProperty(
|
|
10048
|
+
var lr = {};
|
|
10049
|
+
Object.defineProperty(lr, "__esModule", { value: !0 });
|
|
10050
10050
|
(function(e) {
|
|
10051
10051
|
var n = b && b.__createBinding || (Object.create ? function(s, h, y, i) {
|
|
10052
10052
|
i === void 0 && (i = y);
|
|
@@ -10068,7 +10068,7 @@ Object.defineProperty(cr, "__esModule", { value: !0 });
|
|
|
10068
10068
|
if (s != null) for (var y in s) y !== "default" && Object.prototype.hasOwnProperty.call(s, y) && n(h, s, y);
|
|
10069
10069
|
return d(h, s), h;
|
|
10070
10070
|
};
|
|
10071
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.JSONSchema = e.locales = e.regexes = e.util = void 0, g(Ze, e), g(qt, e), g(ue, e), g(Yt, e), g(He, e), g(Te, e), e.util = l(Z), e.regexes = l(qe), e.locales = l(Qt), g(oe, e), g(Ne, e), g(E, e), g(ke, e), e.JSONSchema = l(
|
|
10071
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.JSONSchema = e.locales = e.regexes = e.util = void 0, g(Ze, e), g(qt, e), g(ue, e), g(Yt, e), g(He, e), g(Te, e), e.util = l(Z), e.regexes = l(qe), e.locales = l(Qt), g(oe, e), g(Ne, e), g(E, e), g(ke, e), e.JSONSchema = l(lr);
|
|
10072
10072
|
})(te);
|
|
10073
10073
|
var tt = {}, tn = {};
|
|
10074
10074
|
(function(e) {
|
|
@@ -10132,9 +10132,9 @@ var tt = {}, tn = {};
|
|
|
10132
10132
|
return n._toUpperCase;
|
|
10133
10133
|
} });
|
|
10134
10134
|
})(tn);
|
|
10135
|
-
var nt = {},
|
|
10135
|
+
var nt = {}, On;
|
|
10136
10136
|
function Xt() {
|
|
10137
|
-
return
|
|
10137
|
+
return On || (On = 1, function(e) {
|
|
10138
10138
|
var n = b && b.__createBinding || (Object.create ? function(o, u, t, a) {
|
|
10139
10139
|
a === void 0 && (a = t);
|
|
10140
10140
|
var f = Object.getOwnPropertyDescriptor(u, t);
|
|
@@ -10193,7 +10193,7 @@ var K = {}, Pe = {}, Wu = b && b.__createBinding || (Object.create ? function(e,
|
|
|
10193
10193
|
Object.defineProperty(e, "default", { enumerable: !0, value: n });
|
|
10194
10194
|
} : function(e, n) {
|
|
10195
10195
|
e.default = n;
|
|
10196
|
-
}),
|
|
10196
|
+
}), dr = b && b.__importStar || function(e) {
|
|
10197
10197
|
if (e && e.__esModule) return e;
|
|
10198
10198
|
var n = {};
|
|
10199
10199
|
if (e != null) for (var d in e) d !== "default" && Object.prototype.hasOwnProperty.call(e, d) && Wu(n, e, d);
|
|
@@ -10201,7 +10201,7 @@ var K = {}, Pe = {}, Wu = b && b.__createBinding || (Object.create ? function(e,
|
|
|
10201
10201
|
};
|
|
10202
10202
|
Object.defineProperty(Pe, "__esModule", { value: !0 });
|
|
10203
10203
|
Pe.ZodRealError = Pe.ZodError = void 0;
|
|
10204
|
-
const We =
|
|
10204
|
+
const We = dr(te), Xu = te, jn = dr(Z), sr = (e, n) => {
|
|
10205
10205
|
Xu.$ZodError.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
|
|
10206
10206
|
format: {
|
|
10207
10207
|
value: (d) => We.formatError(e, d)
|
|
@@ -10213,13 +10213,13 @@ const We = lr(te), Xu = te, On = lr(Z), dr = (e, n) => {
|
|
|
10213
10213
|
},
|
|
10214
10214
|
addIssue: {
|
|
10215
10215
|
value: (d) => {
|
|
10216
|
-
e.issues.push(d), e.message = JSON.stringify(e.issues,
|
|
10216
|
+
e.issues.push(d), e.message = JSON.stringify(e.issues, jn.jsonStringifyReplacer, 2);
|
|
10217
10217
|
}
|
|
10218
10218
|
// enumerable: false,
|
|
10219
10219
|
},
|
|
10220
10220
|
addIssues: {
|
|
10221
10221
|
value: (d) => {
|
|
10222
|
-
e.issues.push(...d), e.message = JSON.stringify(e.issues,
|
|
10222
|
+
e.issues.push(...d), e.message = JSON.stringify(e.issues, jn.jsonStringifyReplacer, 2);
|
|
10223
10223
|
}
|
|
10224
10224
|
// enumerable: false,
|
|
10225
10225
|
},
|
|
@@ -10231,8 +10231,8 @@ const We = lr(te), Xu = te, On = lr(Z), dr = (e, n) => {
|
|
|
10231
10231
|
}
|
|
10232
10232
|
});
|
|
10233
10233
|
};
|
|
10234
|
-
Pe.ZodError = We.$constructor("ZodError",
|
|
10235
|
-
Pe.ZodRealError = We.$constructor("ZodError",
|
|
10234
|
+
Pe.ZodError = We.$constructor("ZodError", sr);
|
|
10235
|
+
Pe.ZodRealError = We.$constructor("ZodError", sr, {
|
|
10236
10236
|
Parent: Error
|
|
10237
10237
|
});
|
|
10238
10238
|
var Hu = b && b.__createBinding || (Object.create ? function(e, n, d, g) {
|
|
@@ -10268,9 +10268,9 @@ K.safeEncode = ce._safeEncode(le.ZodRealError);
|
|
|
10268
10268
|
K.safeDecode = ce._safeDecode(le.ZodRealError);
|
|
10269
10269
|
K.safeEncodeAsync = ce._safeEncodeAsync(le.ZodRealError);
|
|
10270
10270
|
K.safeDecodeAsync = ce._safeDecodeAsync(le.ZodRealError);
|
|
10271
|
-
var
|
|
10271
|
+
var Pn;
|
|
10272
10272
|
function nn() {
|
|
10273
|
-
return
|
|
10273
|
+
return Pn || (Pn = 1, function(e) {
|
|
10274
10274
|
var n = b && b.__createBinding || (Object.create ? function(c, p, S, P) {
|
|
10275
10275
|
P === void 0 && (P = S);
|
|
10276
10276
|
var F = Object.getOwnPropertyDescriptor(p, S);
|
|
@@ -10289,14 +10289,14 @@ function nn() {
|
|
|
10289
10289
|
if (c != null) for (var S in c) S !== "default" && Object.prototype.hasOwnProperty.call(c, S) && n(p, c, S);
|
|
10290
10290
|
return d(p, c), p;
|
|
10291
10291
|
};
|
|
10292
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.ZodTransform = e.ZodFile = e.ZodLiteral = e.ZodEnum = e.ZodSet = e.ZodMap = e.ZodRecord = e.ZodTuple = e.ZodIntersection = e.ZodDiscriminatedUnion = e.ZodUnion = e.ZodObject = e.ZodArray = e.ZodDate = e.ZodVoid = e.ZodNever = e.ZodUnknown = e.ZodAny = e.ZodNull = e.ZodUndefined = e.ZodSymbol = e.ZodBigIntFormat = e.ZodBigInt = e.ZodBoolean = e.ZodNumberFormat = e.ZodNumber = e.ZodCustomStringFormat = e.ZodJWT = e.ZodE164 = e.ZodBase64URL = e.ZodBase64 = e.ZodCIDRv6 = e.ZodCIDRv4 = e.ZodIPv6 = e.ZodIPv4 = e.ZodKSUID = e.ZodXID = e.ZodULID = e.ZodCUID2 = e.ZodCUID = e.ZodNanoID = e.ZodEmoji = e.ZodURL = e.ZodUUID = e.ZodGUID = e.ZodEmail = e.ZodStringFormat = e.ZodString = e._ZodString = e.ZodType = void 0, e.stringbool = e.ZodCustom = e.ZodFunction = e.ZodPromise = e.ZodLazy = e.ZodTemplateLiteral = e.ZodReadonly = e.ZodCodec = e.ZodPipe = e.ZodNaN = e.ZodCatch = e.ZodSuccess = e.ZodNonOptional = e.ZodPrefault = e.ZodDefault = e.ZodNullable = e.ZodOptional = void 0, e.string = r, e.email = o, e.guid = u, e.uuid = t, e.uuidv4 = a, e.uuidv6 = f, e.uuidv7 = I, e.url = w, e.httpUrl = j, e.emoji = R, e.nanoid = T, e.cuid = k, e.cuid2 = D, e.ulid = C, e.xid = B, e.ksuid = J, e.ipv4 = X, e.ipv6 = ie, e.cidrv4 = se, e.cidrv6 = ve, e.base64 = _e, e.base64url = be, e.e164 = ze, e.jwt = we, e.stringFormat = m, e.hostname = v, e.hex = _, e.hash = O, e.number = $, e.int = z, e.float32 = N, e.float64 = U, e.int32 = M, e.uint32 = L, e.boolean = V, e.bigint = G, e.int64 = W, e.uint64 = H, e.symbol = x, e.undefined = fe, e.null = me, e.any = Ye, e.unknown = he, e.never = ne, e.void = ae, e.date = Oe, e.array = Le, e.keyof = _r, e.object = br, e.strictObject = hr, e.looseObject = pr, e.union = Qe, e.discriminatedUnion = yr, e.intersection =
|
|
10292
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.ZodTransform = e.ZodFile = e.ZodLiteral = e.ZodEnum = e.ZodSet = e.ZodMap = e.ZodRecord = e.ZodTuple = e.ZodIntersection = e.ZodDiscriminatedUnion = e.ZodUnion = e.ZodObject = e.ZodArray = e.ZodDate = e.ZodVoid = e.ZodNever = e.ZodUnknown = e.ZodAny = e.ZodNull = e.ZodUndefined = e.ZodSymbol = e.ZodBigIntFormat = e.ZodBigInt = e.ZodBoolean = e.ZodNumberFormat = e.ZodNumber = e.ZodCustomStringFormat = e.ZodJWT = e.ZodE164 = e.ZodBase64URL = e.ZodBase64 = e.ZodCIDRv6 = e.ZodCIDRv4 = e.ZodIPv6 = e.ZodIPv4 = e.ZodKSUID = e.ZodXID = e.ZodULID = e.ZodCUID2 = e.ZodCUID = e.ZodNanoID = e.ZodEmoji = e.ZodURL = e.ZodUUID = e.ZodGUID = e.ZodEmail = e.ZodStringFormat = e.ZodString = e._ZodString = e.ZodType = void 0, e.stringbool = e.ZodCustom = e.ZodFunction = e.ZodPromise = e.ZodLazy = e.ZodTemplateLiteral = e.ZodReadonly = e.ZodCodec = e.ZodPipe = e.ZodNaN = e.ZodCatch = e.ZodSuccess = e.ZodNonOptional = e.ZodPrefault = e.ZodDefault = e.ZodNullable = e.ZodOptional = void 0, e.string = r, e.email = o, e.guid = u, e.uuid = t, e.uuidv4 = a, e.uuidv6 = f, e.uuidv7 = I, e.url = w, e.httpUrl = j, e.emoji = R, e.nanoid = T, e.cuid = k, e.cuid2 = D, e.ulid = C, e.xid = B, e.ksuid = J, e.ipv4 = X, e.ipv6 = ie, e.cidrv4 = se, e.cidrv6 = ve, e.base64 = _e, e.base64url = be, e.e164 = ze, e.jwt = we, e.stringFormat = m, e.hostname = v, e.hex = _, e.hash = O, e.number = $, e.int = z, e.float32 = N, e.float64 = U, e.int32 = M, e.uint32 = L, e.boolean = V, e.bigint = G, e.int64 = W, e.uint64 = H, e.symbol = x, e.undefined = fe, e.null = me, e.any = Ye, e.unknown = he, e.never = ne, e.void = ae, e.date = Oe, e.array = Le, e.keyof = _r, e.object = br, e.strictObject = hr, e.looseObject = pr, e.union = Qe, e.discriminatedUnion = yr, e.intersection = un, e.tuple = cn, e.record = ln, e.partialRecord = $r, e.map = Sr, e.set = Or, e.enum = xe, e.nativeEnum = jr, e.literal = Pr, e.file = Ir, e.transform = et, e.optional = Be, e.nullable = Fe, e.nullish = zr, e._default = dn, e.prefault = sn, e.nonoptional = fn, e.success = wr, e.catch = mn, e.nan = Zr, e.pipe = Ve, e.codec = Dr, e.readonly = gn, e.templateLiteral = Er, e.lazy = vn, e.promise = Nr, e._function = Ge, e.function = Ge, e._function = Ge, e.function = Ge, e.check = Tr, e.custom = Ur, e.refine = _n, e.superRefine = bn, e.instanceof = Ar, e.json = kr, e.preprocess = Cr;
|
|
10293
10293
|
const l = g(te), s = te, h = g(tn), y = g(Xt()), i = g(K);
|
|
10294
10294
|
e.ZodType = l.$constructor("ZodType", (c, p) => (l.$ZodType.init(c, p), c.def = p, c.type = p.type, Object.defineProperty(c, "_def", { value: p }), c.check = (...S) => c.clone(s.util.mergeDefs(p, {
|
|
10295
10295
|
checks: [
|
|
10296
10296
|
...p.checks ?? [],
|
|
10297
10297
|
...S.map((P) => typeof P == "function" ? { _zod: { check: P, def: { check: "custom" }, onattach: [] } } : P)
|
|
10298
10298
|
]
|
|
10299
|
-
})), c.clone = (S, P) => l.clone(c, S, P), c.brand = () => c, c.register = (S, P) => (S.add(c, P), c), c.parse = (S, P) => i.parse(c, S, P, { callee: c.parse }), c.safeParse = (S, P) => i.safeParse(c, S, P), c.parseAsync = async (S, P) => i.parseAsync(c, S, P, { callee: c.parseAsync }), c.safeParseAsync = async (S, P) => i.safeParseAsync(c, S, P), c.spa = c.safeParseAsync, c.encode = (S, P) => i.encode(c, S, P), c.decode = (S, P) => i.decode(c, S, P), c.encodeAsync = async (S, P) => i.encodeAsync(c, S, P), c.decodeAsync = async (S, P) => i.decodeAsync(c, S, P), c.safeEncode = (S, P) => i.safeEncode(c, S, P), c.safeDecode = (S, P) => i.safeDecode(c, S, P), c.safeEncodeAsync = async (S, P) => i.safeEncodeAsync(c, S, P), c.safeDecodeAsync = async (S, P) => i.safeDecodeAsync(c, S, P), c.refine = (S, P) => c.check(
|
|
10299
|
+
})), c.clone = (S, P) => l.clone(c, S, P), c.brand = () => c, c.register = (S, P) => (S.add(c, P), c), c.parse = (S, P) => i.parse(c, S, P, { callee: c.parse }), c.safeParse = (S, P) => i.safeParse(c, S, P), c.parseAsync = async (S, P) => i.parseAsync(c, S, P, { callee: c.parseAsync }), c.safeParseAsync = async (S, P) => i.safeParseAsync(c, S, P), c.spa = c.safeParseAsync, c.encode = (S, P) => i.encode(c, S, P), c.decode = (S, P) => i.decode(c, S, P), c.encodeAsync = async (S, P) => i.encodeAsync(c, S, P), c.decodeAsync = async (S, P) => i.decodeAsync(c, S, P), c.safeEncode = (S, P) => i.safeEncode(c, S, P), c.safeDecode = (S, P) => i.safeDecode(c, S, P), c.safeEncodeAsync = async (S, P) => i.safeEncodeAsync(c, S, P), c.safeDecodeAsync = async (S, P) => i.safeDecodeAsync(c, S, P), c.refine = (S, P) => c.check(_n(S, P)), c.superRefine = (S) => c.check(bn(S)), c.overwrite = (S) => c.check(h.overwrite(S)), c.optional = () => Be(c), c.nullable = () => Fe(c), c.nullish = () => Be(Fe(c)), c.nonoptional = (S) => fn(c, S), c.array = () => Le(c), c.or = (S) => Qe([c, S]), c.and = (S) => un(c, S), c.transform = (S) => Ve(c, et(S)), c.default = (S) => dn(c, S), c.prefault = (S) => sn(c, S), c.catch = (S) => mn(c, S), c.pipe = (S) => Ve(c, S), c.readonly = () => gn(c), c.describe = (S) => {
|
|
10300
10300
|
const P = c.clone();
|
|
10301
10301
|
return l.globalRegistry.add(P, { description: S }), P;
|
|
10302
10302
|
}, Object.defineProperty(c, "description", {
|
|
@@ -10630,7 +10630,7 @@ function nn() {
|
|
|
10630
10630
|
e.ZodIntersection = l.$constructor("ZodIntersection", (c, p) => {
|
|
10631
10631
|
l.$ZodIntersection.init(c, p), e.ZodType.init(c, p);
|
|
10632
10632
|
});
|
|
10633
|
-
function
|
|
10633
|
+
function un(c, p) {
|
|
10634
10634
|
return new e.ZodIntersection({
|
|
10635
10635
|
type: "intersection",
|
|
10636
10636
|
left: c,
|
|
@@ -10643,7 +10643,7 @@ function nn() {
|
|
|
10643
10643
|
rest: S
|
|
10644
10644
|
});
|
|
10645
10645
|
});
|
|
10646
|
-
function
|
|
10646
|
+
function cn(c, p, S) {
|
|
10647
10647
|
const P = p instanceof l.$ZodType, F = P ? S : p, re = P ? p : null;
|
|
10648
10648
|
return new e.ZodTuple({
|
|
10649
10649
|
type: "tuple",
|
|
@@ -10655,7 +10655,7 @@ function nn() {
|
|
|
10655
10655
|
e.ZodRecord = l.$constructor("ZodRecord", (c, p) => {
|
|
10656
10656
|
l.$ZodRecord.init(c, p), e.ZodType.init(c, p), c.keyType = p.keyType, c.valueType = p.valueType;
|
|
10657
10657
|
});
|
|
10658
|
-
function
|
|
10658
|
+
function ln(c, p, S) {
|
|
10659
10659
|
return new e.ZodRecord({
|
|
10660
10660
|
type: "record",
|
|
10661
10661
|
keyType: c,
|
|
@@ -10807,7 +10807,7 @@ function nn() {
|
|
|
10807
10807
|
e.ZodDefault = l.$constructor("ZodDefault", (c, p) => {
|
|
10808
10808
|
l.$ZodDefault.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.innerType, c.removeDefault = c.unwrap;
|
|
10809
10809
|
});
|
|
10810
|
-
function
|
|
10810
|
+
function dn(c, p) {
|
|
10811
10811
|
return new e.ZodDefault({
|
|
10812
10812
|
type: "default",
|
|
10813
10813
|
innerType: c,
|
|
@@ -10819,7 +10819,7 @@ function nn() {
|
|
|
10819
10819
|
e.ZodPrefault = l.$constructor("ZodPrefault", (c, p) => {
|
|
10820
10820
|
l.$ZodPrefault.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.innerType;
|
|
10821
10821
|
});
|
|
10822
|
-
function
|
|
10822
|
+
function sn(c, p) {
|
|
10823
10823
|
return new e.ZodPrefault({
|
|
10824
10824
|
type: "prefault",
|
|
10825
10825
|
innerType: c,
|
|
@@ -10831,7 +10831,7 @@ function nn() {
|
|
|
10831
10831
|
e.ZodNonOptional = l.$constructor("ZodNonOptional", (c, p) => {
|
|
10832
10832
|
l.$ZodNonOptional.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.innerType;
|
|
10833
10833
|
});
|
|
10834
|
-
function
|
|
10834
|
+
function fn(c, p) {
|
|
10835
10835
|
return new e.ZodNonOptional({
|
|
10836
10836
|
type: "nonoptional",
|
|
10837
10837
|
innerType: c,
|
|
@@ -10850,7 +10850,7 @@ function nn() {
|
|
|
10850
10850
|
e.ZodCatch = l.$constructor("ZodCatch", (c, p) => {
|
|
10851
10851
|
l.$ZodCatch.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.innerType, c.removeCatch = c.unwrap;
|
|
10852
10852
|
});
|
|
10853
|
-
function
|
|
10853
|
+
function mn(c, p) {
|
|
10854
10854
|
return new e.ZodCatch({
|
|
10855
10855
|
type: "catch",
|
|
10856
10856
|
innerType: c,
|
|
@@ -10889,7 +10889,7 @@ function nn() {
|
|
|
10889
10889
|
e.ZodReadonly = l.$constructor("ZodReadonly", (c, p) => {
|
|
10890
10890
|
l.$ZodReadonly.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.innerType;
|
|
10891
10891
|
});
|
|
10892
|
-
function
|
|
10892
|
+
function gn(c) {
|
|
10893
10893
|
return new e.ZodReadonly({
|
|
10894
10894
|
type: "readonly",
|
|
10895
10895
|
innerType: c
|
|
@@ -10908,7 +10908,7 @@ function nn() {
|
|
|
10908
10908
|
e.ZodLazy = l.$constructor("ZodLazy", (c, p) => {
|
|
10909
10909
|
l.$ZodLazy.init(c, p), e.ZodType.init(c, p), c.unwrap = () => c._zod.def.getter();
|
|
10910
10910
|
});
|
|
10911
|
-
function
|
|
10911
|
+
function vn(c) {
|
|
10912
10912
|
return new e.ZodLazy({
|
|
10913
10913
|
type: "lazy",
|
|
10914
10914
|
getter: c
|
|
@@ -10929,7 +10929,7 @@ function nn() {
|
|
|
10929
10929
|
function Ge(c) {
|
|
10930
10930
|
return new e.ZodFunction({
|
|
10931
10931
|
type: "function",
|
|
10932
|
-
input: Array.isArray(c == null ? void 0 : c.input) ?
|
|
10932
|
+
input: Array.isArray(c == null ? void 0 : c.input) ? cn(c == null ? void 0 : c.input) : (c == null ? void 0 : c.input) ?? Le(he()),
|
|
10933
10933
|
output: (c == null ? void 0 : c.output) ?? he()
|
|
10934
10934
|
});
|
|
10935
10935
|
}
|
|
@@ -10946,10 +10946,10 @@ function nn() {
|
|
|
10946
10946
|
function Ur(c, p) {
|
|
10947
10947
|
return l._custom(e.ZodCustom, c ?? (() => !0), p);
|
|
10948
10948
|
}
|
|
10949
|
-
function
|
|
10949
|
+
function _n(c, p = {}) {
|
|
10950
10950
|
return l._refine(e.ZodCustom, c, p);
|
|
10951
10951
|
}
|
|
10952
|
-
function
|
|
10952
|
+
function bn(c) {
|
|
10953
10953
|
return l._superRefine(c);
|
|
10954
10954
|
}
|
|
10955
10955
|
function Ar(c, p = {
|
|
@@ -10971,7 +10971,7 @@ function nn() {
|
|
|
10971
10971
|
}, ...c);
|
|
10972
10972
|
e.stringbool = Mr;
|
|
10973
10973
|
function kr(c) {
|
|
10974
|
-
const p =
|
|
10974
|
+
const p = vn(() => Qe([r(c), $(), V(), me(), Le(p), ln(r(), p)]));
|
|
10975
10975
|
return p;
|
|
10976
10976
|
}
|
|
10977
10977
|
function Cr(c, p) {
|
|
@@ -10979,7 +10979,7 @@ function nn() {
|
|
|
10979
10979
|
}
|
|
10980
10980
|
}(tt)), tt;
|
|
10981
10981
|
}
|
|
10982
|
-
var
|
|
10982
|
+
var fr = {};
|
|
10983
10983
|
(function(e) {
|
|
10984
10984
|
var n = b && b.__createBinding || (Object.create ? function(r, o, u, t) {
|
|
10985
10985
|
t === void 0 && (t = u);
|
|
@@ -11030,7 +11030,7 @@ var sr = {};
|
|
|
11030
11030
|
}
|
|
11031
11031
|
var i;
|
|
11032
11032
|
i || (e.ZodFirstPartyTypeKind = i = {});
|
|
11033
|
-
})(
|
|
11033
|
+
})(fr);
|
|
11034
11034
|
var Ie = {}, Qu = b && b.__createBinding || (Object.create ? function(e, n, d, g) {
|
|
11035
11035
|
g === void 0 && (g = d);
|
|
11036
11036
|
var l = Object.getOwnPropertyDescriptor(n, d);
|
|
@@ -11043,7 +11043,7 @@ var Ie = {}, Qu = b && b.__createBinding || (Object.create ? function(e, n, d, g
|
|
|
11043
11043
|
Object.defineProperty(e, "default", { enumerable: !0, value: n });
|
|
11044
11044
|
} : function(e, n) {
|
|
11045
11045
|
e.default = n;
|
|
11046
|
-
}),
|
|
11046
|
+
}), mr = b && b.__importStar || function(e) {
|
|
11047
11047
|
if (e && e.__esModule) return e;
|
|
11048
11048
|
var n = {};
|
|
11049
11049
|
if (e != null) for (var d in e) d !== "default" && Object.prototype.hasOwnProperty.call(e, d) && Qu(n, e, d);
|
|
@@ -11055,7 +11055,7 @@ Ie.number = tc;
|
|
|
11055
11055
|
Ie.boolean = nc;
|
|
11056
11056
|
Ie.bigint = rc;
|
|
11057
11057
|
Ie.date = ic;
|
|
11058
|
-
const Ce =
|
|
11058
|
+
const Ce = mr(te), Re = mr(nn());
|
|
11059
11059
|
function ec(e) {
|
|
11060
11060
|
return Ce._coercedString(Re.ZodString, e);
|
|
11061
11061
|
}
|
|
@@ -11094,7 +11094,7 @@ function ic(e) {
|
|
|
11094
11094
|
}, s = b && b.__importDefault || function(o) {
|
|
11095
11095
|
return o && o.__esModule ? o : { default: o };
|
|
11096
11096
|
};
|
|
11097
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.coerce = e.iso = e.ZodISODuration = e.ZodISOTime = e.ZodISODate = e.ZodISODateTime = e.locales = e.NEVER = e.util = e.TimePrecision = e.toJSONSchema = e.flattenError = e.formatError = e.prettifyError = e.treeifyError = e.regexes = e.clone = e.$brand = e.$input = e.$output = e.config = e.registry = e.globalRegistry = e.core = void 0, e.core = g(te), l(nn(), e), l(tn, e), l(Pe, e), l(K, e), l(
|
|
11097
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.coerce = e.iso = e.ZodISODuration = e.ZodISOTime = e.ZodISODate = e.ZodISODateTime = e.locales = e.NEVER = e.util = e.TimePrecision = e.toJSONSchema = e.flattenError = e.formatError = e.prettifyError = e.treeifyError = e.regexes = e.clone = e.$brand = e.$input = e.$output = e.config = e.registry = e.globalRegistry = e.core = void 0, e.core = g(te), l(nn(), e), l(tn, e), l(Pe, e), l(K, e), l(fr, e);
|
|
11098
11098
|
const h = te, y = s(xt);
|
|
11099
11099
|
(0, h.config)((0, y.default)());
|
|
11100
11100
|
var i = te;
|
|
@@ -11166,10 +11166,10 @@ function ic(e) {
|
|
|
11166
11166
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.z = void 0;
|
|
11167
11167
|
const s = g(at);
|
|
11168
11168
|
e.z = s, l(at, e), e.default = s;
|
|
11169
|
-
})(
|
|
11169
|
+
})(Bn);
|
|
11170
11170
|
(function(e) {
|
|
11171
11171
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.QuoteMessageSchema = e.ExchangeMessageSchema = e.RevertMessageSchema = e.CancelMessageSchema = e.RejectMessageSchema = e.SettleMessageSchema = e.ConnectMessageSchema = e.AuthorizeMessageSchema = e.PaymentMessageSchema = e.TransferMessageSchema = e.CaptureSchema = e.EscrowSchema = e.QuoteSchema = e.ExchangeSchema = e.RevertSchema = e.CancelSchema = e.RejectSchema = e.SettleSchema = e.ConnectSchema = e.TransactionConstraintsSchema = e.AuthorizeSchema = e.PaymentSchema = e.TransferSchema = e.DIDCommReplySchema = e.DIDCommMessageSchema = e.AgentSchema = e.PartySchema = e.OrganizationSchema = e.PersonSchema = e.ParticipantSchema = e.TapMessageObjectSchema = e.JsonLdObjectSchema = e.SupportedAssetPricingSchema = e.AssetSchema = e.DTISchema = e.CategoryPurposeCodeSchema = e.PurposeCodeSchema = e.CurrencyCodeSchema = e.AmountSchema = e.SettlementAddressSchema = e.PayToURISchema = e.CAIP19Schema = e.CAIP10Schema = e.CAIP2Schema = e.UUIDSchema = e.ISO8601DateTimeSchema = e.TAPTypeSchema = e.TAPContextSchema = e.IRISchema = e.DIDSchema = void 0, e.validateTransactionConstraints = e.validateCaptureMessage = e.validateEscrowMessage = e.validateQuoteMessage = e.validateExchangeMessage = e.validateRevertMessage = e.validateCancelMessage = e.validateRejectMessage = e.validateSettleMessage = e.validateConnectMessage = e.validateAuthorizeMessage = e.validatePaymentMessage = e.validateTransferMessage = e.TAPMessageSchema = e.CaptureMessageSchema = e.EscrowMessageSchema = void 0, e.validateTAPMessage = s, e.parseTAPMessage = h, e.isTAPMessage = y;
|
|
11172
|
-
const n =
|
|
11172
|
+
const n = Bn;
|
|
11173
11173
|
e.DIDSchema = n.z.string().regex(/^did:[a-z0-9]+:[a-zA-Z0-9._%-]+$/), e.IRISchema = n.z.string().regex(/^[a-zA-Z][a-zA-Z0-9+.-]*:.+$/), e.TAPContextSchema = n.z.literal("https://tap.rsvp/schema/1.0"), e.TAPTypeSchema = n.z.string().regex(/^https:\/\/tap\.rsvp\/schema\/1\.0#[A-Za-z]+$/), e.ISO8601DateTimeSchema = n.z.string().datetime(), e.UUIDSchema = n.z.string().uuid(), e.CAIP2Schema = n.z.string().regex(/^[a-z0-9]+:[a-zA-Z0-9._%-]+$/), e.CAIP10Schema = n.z.string().regex(/^[a-z0-9]+:[a-zA-Z0-9._%-]+:[a-zA-Z0-9._%-]+$/), e.CAIP19Schema = n.z.string().regex(/^[a-z0-9]+:[a-zA-Z0-9._%-]+\/[a-z0-9]+:[a-zA-Z0-9._%-]+$/), e.PayToURISchema = n.z.string().regex(/^payto:\/\/[a-zA-Z0-9._%-]+\/[a-zA-Z0-9._%-]+/), e.SettlementAddressSchema = n.z.union([e.CAIP10Schema, e.PayToURISchema]), e.AmountSchema = n.z.string().regex(/^\d+(\.\d+)?$/);
|
|
11174
11174
|
const d = [
|
|
11175
11175
|
"AED",
|
|
@@ -11940,7 +11940,7 @@ function ic(e) {
|
|
|
11940
11940
|
e.validateCaptureMessage = T;
|
|
11941
11941
|
const k = (D) => e.TransactionConstraintsSchema.safeParse(D);
|
|
11942
11942
|
e.validateTransactionConstraints = k;
|
|
11943
|
-
})(
|
|
11943
|
+
})(Ln);
|
|
11944
11944
|
(function(e) {
|
|
11945
11945
|
var n = b && b.__createBinding || (Object.create ? function(g, l, s, h) {
|
|
11946
11946
|
h === void 0 && (h = s);
|
|
@@ -11953,15 +11953,15 @@ function ic(e) {
|
|
|
11953
11953
|
}), d = b && b.__exportStar || function(g, l) {
|
|
11954
11954
|
for (var s in g) s !== "default" && !Object.prototype.hasOwnProperty.call(l, s) && n(l, g, s);
|
|
11955
11955
|
};
|
|
11956
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), d(
|
|
11957
|
-
})(
|
|
11956
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), d(Un, e), d(ge, e), d(An, e), d(Mn, e), d(Ke, e), d(Ln, e);
|
|
11957
|
+
})(Tn);
|
|
11958
11958
|
function rn(e) {
|
|
11959
11959
|
return e.source !== void 0;
|
|
11960
11960
|
}
|
|
11961
11961
|
function je(e) {
|
|
11962
11962
|
return !rn(e);
|
|
11963
11963
|
}
|
|
11964
|
-
function
|
|
11964
|
+
function In(e) {
|
|
11965
11965
|
if (e != null && e.email)
|
|
11966
11966
|
return `mailto:${e.email}`;
|
|
11967
11967
|
}
|
|
@@ -11975,7 +11975,7 @@ function ac(e) {
|
|
|
11975
11975
|
}))
|
|
11976
11976
|
};
|
|
11977
11977
|
}
|
|
11978
|
-
function
|
|
11978
|
+
function zn(e, n) {
|
|
11979
11979
|
return {
|
|
11980
11980
|
naturalPerson: e.naturalPerson ? {
|
|
11981
11981
|
...e.naturalPerson,
|
|
@@ -11986,14 +11986,14 @@ function In(e, n) {
|
|
|
11986
11986
|
};
|
|
11987
11987
|
}
|
|
11988
11988
|
function oc(e) {
|
|
11989
|
-
if (!
|
|
11989
|
+
if (!Tn.CAIP10Schema.safeParse(e).success)
|
|
11990
11990
|
throw new Error(
|
|
11991
11991
|
`Invalid CAIP-10 format: "${e}". Expected format: {namespace}:{chainId}:{address}`
|
|
11992
11992
|
);
|
|
11993
11993
|
const d = e.lastIndexOf(":");
|
|
11994
11994
|
return e.slice(0, d);
|
|
11995
11995
|
}
|
|
11996
|
-
function
|
|
11996
|
+
function gr(e, n, d) {
|
|
11997
11997
|
var y, i;
|
|
11998
11998
|
const g = d.originatorId, l = d.beneficiaryId, s = (d == null ? void 0 : d.referenceId) || n.transactionId || Math.random().toString(36).substring(2, 15), h = [];
|
|
11999
11999
|
if (n.originatorVASPdid && h.push({
|
|
@@ -12034,7 +12034,7 @@ function mr(e, n, d) {
|
|
|
12034
12034
|
ref: s
|
|
12035
12035
|
};
|
|
12036
12036
|
}
|
|
12037
|
-
function
|
|
12037
|
+
function vr(e, n, d) {
|
|
12038
12038
|
var h, y, i, r, o, u;
|
|
12039
12039
|
if (je(e)) {
|
|
12040
12040
|
const t = e.destination, a = (
|
|
@@ -12042,7 +12042,7 @@ function gr(e, n, d) {
|
|
|
12042
12042
|
((h = e.counterparty) == null ? void 0 : h.type) === Ee.SELF && d.originator ? d.originator.originatorPerson : (
|
|
12043
12043
|
// Convert all beneficiary persons from V1 to V2 format
|
|
12044
12044
|
((i = (y = n.beneficiary) == null ? void 0 : y.beneficiaryPersons) == null ? void 0 : i.map(
|
|
12045
|
-
(f) =>
|
|
12045
|
+
(f) => zn(f, t)
|
|
12046
12046
|
)) || []
|
|
12047
12047
|
)
|
|
12048
12048
|
);
|
|
@@ -12062,7 +12062,7 @@ function gr(e, n, d) {
|
|
|
12062
12062
|
originatorPerson: ((r = e.counterparty) == null ? void 0 : r.type) === Ee.SELF && d.beneficiary ? d.beneficiary.beneficiaryPerson : (
|
|
12063
12063
|
// Convert all originator persons from V1 to V2 format
|
|
12064
12064
|
((u = (o = n.originator) == null ? void 0 : o.originatorPersons) == null ? void 0 : u.map(
|
|
12065
|
-
(t) =>
|
|
12065
|
+
(t) => zn(t, l)
|
|
12066
12066
|
)) || []
|
|
12067
12067
|
)
|
|
12068
12068
|
},
|
|
@@ -12070,7 +12070,7 @@ function gr(e, n, d) {
|
|
|
12070
12070
|
}
|
|
12071
12071
|
};
|
|
12072
12072
|
}
|
|
12073
|
-
function
|
|
12073
|
+
function wn() {
|
|
12074
12074
|
if (typeof crypto > "u")
|
|
12075
12075
|
throw new Error(
|
|
12076
12076
|
"[Notabene/SDK] Web Crypto API is not available. A secure environment with crypto support is required (Node.js 16+ or a modern browser)."
|
|
@@ -12091,17 +12091,17 @@ function an(e, n, d) {
|
|
|
12091
12091
|
}
|
|
12092
12092
|
if (je(d) ? (!g.originatorId && l && (g.originatorId = l), g.beneficiaryId || (((s = d.counterparty) == null ? void 0 : s.type) === Ee.SELF ? g.beneficiaryId = g.originatorId : d.destination)) : rn(d) && (!g.beneficiaryId && l && (g.beneficiaryId = l), g.originatorId || (((h = d.counterparty) == null ? void 0 : h.type) === Ee.SELF ? g.originatorId = g.beneficiaryId : d.source)), !g.originatorId) {
|
|
12093
12093
|
const y = je(d) ? d.customer : d.counterparty;
|
|
12094
|
-
g.originatorId =
|
|
12094
|
+
g.originatorId = In(y);
|
|
12095
12095
|
}
|
|
12096
12096
|
if (!g.beneficiaryId) {
|
|
12097
12097
|
const y = je(d) ? d.counterparty : d.customer;
|
|
12098
|
-
g.beneficiaryId =
|
|
12098
|
+
g.beneficiaryId = In(y);
|
|
12099
12099
|
}
|
|
12100
12100
|
return g.beneficiaryId || (console.warn(
|
|
12101
12101
|
"[Notabene/SDK] beneficiaryId not provided; falling back to a generated random identifier."
|
|
12102
|
-
), g.beneficiaryId = `urn:uuid:${
|
|
12102
|
+
), g.beneficiaryId = `urn:uuid:${wn()}`), g.originatorId || (console.warn(
|
|
12103
12103
|
"[Notabene/SDK] originatorId not provided; falling back to a generated random identifier."
|
|
12104
|
-
), g.originatorId = `urn:uuid:${
|
|
12104
|
+
), g.originatorId = `urn:uuid:${wn()}`), g;
|
|
12105
12105
|
}
|
|
12106
12106
|
function lc(e, n, d = {}) {
|
|
12107
12107
|
const { value: g, txCreate: l, txUpdate: s, ivms101: h, proof: y } = e, i = je(g) ? l : s;
|
|
@@ -12111,8 +12111,8 @@ function lc(e, n, d = {}) {
|
|
|
12111
12111
|
);
|
|
12112
12112
|
const r = an(d, n, g);
|
|
12113
12113
|
return {
|
|
12114
|
-
createTx:
|
|
12115
|
-
ivms101:
|
|
12114
|
+
createTx: gr(g, i, r),
|
|
12115
|
+
ivms101: vr(g, h, r),
|
|
12116
12116
|
...y && { confirmRelationship: { proof: y } }
|
|
12117
12117
|
};
|
|
12118
12118
|
}
|
|
@@ -12123,15 +12123,15 @@ function dc(e, n, d = {}) {
|
|
|
12123
12123
|
"Invalid response: missing required txCreate/txUpdate or ivms101 data"
|
|
12124
12124
|
);
|
|
12125
12125
|
const y = an(d, n, g);
|
|
12126
|
-
return
|
|
12126
|
+
return gr(g, h, y);
|
|
12127
12127
|
}
|
|
12128
12128
|
function sc(e, n, d = {}) {
|
|
12129
12129
|
if (!e.ivms101)
|
|
12130
12130
|
throw new Error("Invalid response: missing required ivms101 data");
|
|
12131
12131
|
const { value: g, ivms101: l } = e, s = an(d, n, g);
|
|
12132
|
-
return
|
|
12132
|
+
return vr(g, l, s);
|
|
12133
12133
|
}
|
|
12134
|
-
async function
|
|
12134
|
+
async function Zn(e, n) {
|
|
12135
12135
|
const d = JSON.stringify(e), g = new TextEncoder(), l = n ? Ht(n) : crypto.getRandomValues(new Uint8Array(32)), s = await crypto.subtle.importKey(
|
|
12136
12136
|
"raw",
|
|
12137
12137
|
l,
|
|
@@ -12148,7 +12148,7 @@ async function wn(e, n) {
|
|
|
12148
12148
|
key: rt(l)
|
|
12149
12149
|
};
|
|
12150
12150
|
}
|
|
12151
|
-
async function
|
|
12151
|
+
async function on({ ciphertext: e, key: n }) {
|
|
12152
12152
|
const [d, g] = e.split("-"), l = new Uint8Array(
|
|
12153
12153
|
atob(n).split("").map((o) => o.charCodeAt(0))
|
|
12154
12154
|
), s = Ht(d), h = Ht(g), y = await crypto.subtle.importKey(
|
|
@@ -12193,7 +12193,7 @@ async function fc(e) {
|
|
|
12193
12193
|
};
|
|
12194
12194
|
if (d.status === "closed")
|
|
12195
12195
|
return g;
|
|
12196
|
-
const l = d.sealed[d.sealed.length - 1], s = await
|
|
12196
|
+
const l = d.sealed[d.sealed.length - 1], s = await on({
|
|
12197
12197
|
ciphertext: l,
|
|
12198
12198
|
key: e.key
|
|
12199
12199
|
});
|
|
@@ -12205,7 +12205,13 @@ async function fc(e) {
|
|
|
12205
12205
|
tx: s.tx
|
|
12206
12206
|
};
|
|
12207
12207
|
}
|
|
12208
|
-
|
|
12208
|
+
async function mc({
|
|
12209
|
+
sealed: e,
|
|
12210
|
+
key: n
|
|
12211
|
+
}) {
|
|
12212
|
+
return on({ ciphertext: e, key: n });
|
|
12213
|
+
}
|
|
12214
|
+
class gc {
|
|
12209
12215
|
constructor(n) {
|
|
12210
12216
|
q(this, "endpoint");
|
|
12211
12217
|
this.endpoint = n;
|
|
@@ -12218,7 +12224,7 @@ class mc {
|
|
|
12218
12224
|
* @returns Promise resolving to connection details including ID, version, and encryption key
|
|
12219
12225
|
*/
|
|
12220
12226
|
async create(n, d) {
|
|
12221
|
-
const g = await
|
|
12227
|
+
const g = await Zn(n), l = {
|
|
12222
12228
|
metadata: d,
|
|
12223
12229
|
sealed: g.ciphertext
|
|
12224
12230
|
}, s = await fetch(this.endpoint, {
|
|
@@ -12251,7 +12257,7 @@ class mc {
|
|
|
12251
12257
|
* @returns Promise resolving to updated connection details including new encryption key
|
|
12252
12258
|
*/
|
|
12253
12259
|
async update(n, d, g, l, s) {
|
|
12254
|
-
const h = await
|
|
12260
|
+
const h = await Zn(d, s), y = {
|
|
12255
12261
|
sealed: h.ciphertext,
|
|
12256
12262
|
version: g,
|
|
12257
12263
|
status: l
|
|
@@ -12287,7 +12293,7 @@ class mc {
|
|
|
12287
12293
|
});
|
|
12288
12294
|
if (!g.ok)
|
|
12289
12295
|
throw new Error(`Failed to get connection: ${await g.text()}`);
|
|
12290
|
-
const l = await g.json(), s = l.sealed[l.sealed.length - 1], h = await
|
|
12296
|
+
const l = await g.json(), s = l.sealed[l.sealed.length - 1], h = await on({
|
|
12291
12297
|
ciphertext: s,
|
|
12292
12298
|
key: d
|
|
12293
12299
|
});
|
|
@@ -12313,7 +12319,7 @@ class mc {
|
|
|
12313
12319
|
throw new Error(`Failed to close connection: ${await d.text()}`);
|
|
12314
12320
|
}
|
|
12315
12321
|
}
|
|
12316
|
-
function
|
|
12322
|
+
function Dn(e, n) {
|
|
12317
12323
|
const d = e.trim().replace(/\/+$/, "");
|
|
12318
12324
|
let g;
|
|
12319
12325
|
try {
|
|
@@ -12327,7 +12333,7 @@ function Zn(e, n) {
|
|
|
12327
12333
|
);
|
|
12328
12334
|
return d;
|
|
12329
12335
|
}
|
|
12330
|
-
class
|
|
12336
|
+
class vc {
|
|
12331
12337
|
/**
|
|
12332
12338
|
* Creates a new instance of the Notabene SDK
|
|
12333
12339
|
*
|
|
@@ -12339,10 +12345,10 @@ class gc {
|
|
|
12339
12345
|
q(this, "uxUrl");
|
|
12340
12346
|
q(this, "theme");
|
|
12341
12347
|
q(this, "locale");
|
|
12342
|
-
this.uxUrl =
|
|
12348
|
+
this.uxUrl = Dn(
|
|
12343
12349
|
n.uxUrl || "https://connect.notabene.id",
|
|
12344
12350
|
"uxUrl"
|
|
12345
|
-
), this.nodeUrl = n.nodeUrl ?
|
|
12351
|
+
), this.nodeUrl = n.nodeUrl ? Dn(n.nodeUrl, "nodeUrl") : void 0, this.authToken = n.authToken, this.theme = n.theme, this.locale = n.locale;
|
|
12346
12352
|
}
|
|
12347
12353
|
/**
|
|
12348
12354
|
* Generates a URL for a Notabene component
|
|
@@ -12469,10 +12475,10 @@ export {
|
|
|
12469
12475
|
Br as AgentType,
|
|
12470
12476
|
de as CMType,
|
|
12471
12477
|
Jr as CodeVerificationStatus,
|
|
12472
|
-
|
|
12478
|
+
gc as ConnectionManager,
|
|
12473
12479
|
xr as EmbeddedComponent,
|
|
12474
12480
|
Kr as ErrorIdentifierCode,
|
|
12475
|
-
|
|
12481
|
+
En as HMType,
|
|
12476
12482
|
Gr as IdentityVerificationMethod,
|
|
12477
12483
|
Hr as InfoIdentifierCode,
|
|
12478
12484
|
Ee as PersonType,
|
|
@@ -12486,6 +12492,7 @@ export {
|
|
|
12486
12492
|
dc as componentResponseToTxCreateRequest,
|
|
12487
12493
|
lc as componentResponseToTxRequests,
|
|
12488
12494
|
cc as decodeFragmentToObject,
|
|
12489
|
-
|
|
12495
|
+
mc as decryptCounterpartyAssistPayload,
|
|
12496
|
+
vc as default,
|
|
12490
12497
|
fc as getRefreshResult
|
|
12491
12498
|
};
|