zudoku 0.0.0-z6bcd96da → 0.0.0-z6e949a6d
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/config/loader.js +3 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +170 -120
- package/dist/config/validators/InputNavigationSchema.js +17 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +10 -2
- package/dist/config/validators/NavigationSchema.js +6 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +7 -7
- package/dist/flat-config.d.ts +35 -24
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -1
- package/dist/lib/components/TopNavigation.js +7 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +8 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -0
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +18 -74
- package/dist/lib/components/index.js +19 -36
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.js +4 -3
- package/dist/lib/components/navigation/Navigation.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +8 -0
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
- package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.js +11 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +2 -1
- package/dist/lib/components/navigation/utils.js +22 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +11 -1
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/transform-config.d.ts +2 -0
- package/dist/lib/core/transform-config.js +22 -0
- package/dist/lib/core/transform-config.js.map +1 -0
- package/dist/lib/hooks/index.d.ts +7 -30
- package/dist/lib/hooks/index.js +7 -15
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +1 -1
- package/dist/lib/oas/graphql/circular.js +18 -35
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/circular.test.js +33 -2
- package/dist/lib/oas/graphql/circular.test.js.map +1 -1
- package/dist/lib/oas/parser/index.js +14 -5
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/InputGroup.d.ts +16 -0
- package/dist/lib/ui/InputGroup.js +65 -0
- package/dist/lib/ui/InputGroup.js.map +1 -0
- package/dist/lib/util/flattenAllOf.d.ts +0 -2
- package/dist/lib/util/flattenAllOf.js +0 -46
- package/dist/lib/util/flattenAllOf.js.map +1 -1
- package/dist/lib/util/flattenAllOf.test.js +2 -1
- package/dist/lib/util/flattenAllOf.test.js.map +1 -1
- package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
- package/dist/lib/util/flattenAllOfProcessor.js +48 -0
- package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
- package/dist/lib/util/readFrontmatter.js +2 -1
- package/dist/lib/util/readFrontmatter.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +1 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +1 -1
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/build.js +91 -73
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.js +5 -1
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js +3 -2
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
- package/dist/vite/plugin-docs.js +9 -7
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +4 -2
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{ClaudeLogo-DJ9bU-sO.js → ClaudeLogo-OpUSMQJe.js} +26 -22
- package/lib/{ClaudeLogo-DJ9bU-sO.js.map → ClaudeLogo-OpUSMQJe.js.map} +1 -1
- package/lib/{MdxPage-stpAoBtx.js → MdxPage-dzCPGdvD.js} +8 -8
- package/lib/{MdxPage-stpAoBtx.js.map → MdxPage-dzCPGdvD.js.map} +1 -1
- package/lib/{Mermaid-Koc3z8mU.js → Mermaid-JEnWyK0s.js} +3 -2
- package/lib/{Mermaid-Koc3z8mU.js.map → Mermaid-JEnWyK0s.js.map} +1 -1
- package/lib/{OAuthErrorPage-DJ811Bn_.js → OAuthErrorPage-D7n-_cqN.js} +20 -18
- package/lib/{OAuthErrorPage-DJ811Bn_.js.map → OAuthErrorPage-D7n-_cqN.js.map} +1 -1
- package/lib/{OasProvider-CS_ASmBB.js → OasProvider-DPPdikt_.js} +3 -3
- package/lib/{OasProvider-CS_ASmBB.js.map → OasProvider-DPPdikt_.js.map} +1 -1
- package/lib/{OperationList-Dq_AB4W9.js → OperationList-cEveQ_l5.js} +948 -946
- package/lib/OperationList-cEveQ_l5.js.map +1 -0
- package/lib/{RouteGuard--A04ESy8.js → RouteGuard-BMbu_Yb7.js} +5 -5
- package/lib/{RouteGuard--A04ESy8.js.map → RouteGuard-BMbu_Yb7.js.map} +1 -1
- package/lib/{SchemaList-BJZJv1gD.js → SchemaList-CRC8n5co.js} +7 -7
- package/lib/{SchemaList-BJZJv1gD.js.map → SchemaList-CRC8n5co.js.map} +1 -1
- package/lib/{SchemaView-U4JMYB3N.js → SchemaView-BR6dtnPg.js} +3 -3
- package/lib/{SchemaView-U4JMYB3N.js.map → SchemaView-BR6dtnPg.js.map} +1 -1
- package/lib/{SignUp-DCBViNUi.js → SignUp-ChqXj9vd.js} +31 -26
- package/lib/{SignUp-DCBViNUi.js.map → SignUp-ChqXj9vd.js.map} +1 -1
- package/lib/{SyntaxHighlight-Dshjn3Zf.js → SyntaxHighlight-O-IZOPLg.js} +3 -3
- package/lib/{SyntaxHighlight-Dshjn3Zf.js.map → SyntaxHighlight-O-IZOPLg.js.map} +1 -1
- package/lib/{Toc-Cgz6CPiE.js → Toc-DQF7trHT.js} +2 -2
- package/lib/{Toc-Cgz6CPiE.js.map → Toc-DQF7trHT.js.map} +1 -1
- package/lib/{index-CL8eDnQW.js → Zudoku-DA1yA-te.js} +2609 -2452
- package/lib/Zudoku-DA1yA-te.js.map +1 -0
- package/lib/{ZudokuContext-BZB1TWdT.js → ZudokuContext-C6wlLMUH.js} +137 -135
- package/lib/{ZudokuContext-BZB1TWdT.js.map → ZudokuContext-C6wlLMUH.js.map} +1 -1
- package/lib/{circular-BmMJjG1v.js → circular-C4l1Kj1N.js} +1327 -1346
- package/lib/{circular-BmMJjG1v.js.map → circular-C4l1Kj1N.js.map} +1 -1
- package/lib/createServer-DoRZ6tMa.js +13036 -0
- package/lib/createServer-DoRZ6tMa.js.map +1 -0
- package/lib/{errors-b9I-fAOY.js → errors-CYLN8SNc.js} +3 -3
- package/lib/{errors-b9I-fAOY.js.map → errors-CYLN8SNc.js.map} +1 -1
- package/lib/{firebase-BCXX7Qv5.js → firebase-DF-VVKB7.js} +14 -14
- package/lib/firebase-DF-VVKB7.js.map +1 -0
- package/lib/{hook-BGlHBdET.js → hook-C35h0YhF.js} +2 -2
- package/lib/{hook-BGlHBdET.js.map → hook-C35h0YhF.js.map} +1 -1
- package/lib/{index-O9RHI87z.js → index-Ck4TmzTO.js} +574 -538
- package/lib/index-Ck4TmzTO.js.map +1 -0
- package/lib/index-DAWHN3cH.js +86 -0
- package/lib/index-DAWHN3cH.js.map +1 -0
- package/lib/{index-UOLtazB8.js → index-DrAVvbXa.js} +2 -2
- package/lib/{index-UOLtazB8.js.map → index-DrAVvbXa.js.map} +1 -1
- package/lib/{index.esm-C5CBsVzN.js → index.esm-B2cLXwjS.js} +2 -2
- package/lib/index.esm-B2cLXwjS.js.map +1 -0
- package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
- package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
- package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
- package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
- package/lib/ui/InputGroup.js +155 -0
- package/lib/ui/InputGroup.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/useExposedProps-CzTDfXfq.js +30 -0
- package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
- package/lib/zudoku.__internal.js +1493 -1031
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +5 -5
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +31 -29
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +24 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +4 -3
- package/lib/zudoku.mermaid.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +36 -32
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +131 -130
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +6 -4
- package/src/lib/components/MobileTopNavigation.tsx +13 -8
- package/src/lib/components/TopNavigation.tsx +25 -7
- package/src/lib/components/context/ZudokuContext.ts +1 -0
- package/src/lib/components/index.ts +19 -39
- package/src/lib/components/navigation/Navigation.tsx +4 -3
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
- package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
- package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
- package/src/lib/components/navigation/NavigationItem.tsx +17 -1
- package/src/lib/components/navigation/utils.ts +32 -1
- package/src/lib/core/plugins.ts +21 -1
- package/src/lib/core/transform-config.ts +29 -0
- package/src/lib/hooks/index.ts +7 -16
- package/src/lib/oas/graphql/circular.test.ts +37 -2
- package/src/lib/oas/graphql/circular.ts +25 -51
- package/src/lib/oas/parser/index.ts +17 -6
- package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
- package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
- package/src/lib/ui/InputGroup.tsx +168 -0
- package/src/lib/util/flattenAllOf.test.ts +2 -1
- package/src/lib/util/flattenAllOf.ts +0 -57
- package/src/lib/util/flattenAllOfProcessor.ts +58 -0
- package/src/lib/util/readFrontmatter.ts +2 -1
- package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
- package/src/zuplo/enrich-with-zuplo.ts +254 -0
- package/src/zuplo/policy-types.ts +46 -0
- package/src/zuplo/with-zuplo-processors.ts +35 -0
- package/src/zuplo/with-zuplo.ts +14 -0
- package/lib/OperationList-Dq_AB4W9.js.map +0 -1
- package/lib/Separator-BXt1LYnm.js +0 -27
- package/lib/Separator-BXt1LYnm.js.map +0 -1
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
- package/lib/createServer-CLSZ7hWJ.js +0 -16693
- package/lib/createServer-CLSZ7hWJ.js.map +0 -1
- package/lib/firebase-BCXX7Qv5.js.map +0 -1
- package/lib/index-CL8eDnQW.js.map +0 -1
- package/lib/index-DBjOT2H1.js +0 -133
- package/lib/index-DBjOT2H1.js.map +0 -1
- package/lib/index-O9RHI87z.js.map +0 -1
- package/lib/index.esm-C5CBsVzN.js.map +0 -1
package/lib/zudoku.__internal.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { a as Ae, H as
|
|
2
|
-
import { j as
|
|
3
|
-
import { b as
|
|
4
|
-
import { M as
|
|
5
|
-
import * as
|
|
6
|
-
import { StrictMode as
|
|
7
|
-
import { n as
|
|
8
|
-
import * as
|
|
9
|
-
import { f as
|
|
10
|
-
import { B as
|
|
11
|
-
import { CircleFadingArrowUpIcon as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { c as
|
|
14
|
-
import { a as
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
1
|
+
import { a as Ae, H as De } from "./index.esm-Ca5zvoff.js";
|
|
2
|
+
import { j as c } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
+
import { b as xt, H as Zt } from "./HydrationBoundary-CNF2ZV3E.js";
|
|
4
|
+
import { M as Ce, e as Ot } from "./useSuspenseQuery-CSB_rVek.js";
|
|
5
|
+
import * as q from "react";
|
|
6
|
+
import { StrictMode as Ue, useEffect as te, useRef as Fe, useState as St, Suspense as Pt } from "react";
|
|
7
|
+
import { n as Tt, S as Et, a as Je, b3 as Nt, O as It, d as Rt, L as At, h as Dt, w as Ct } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
8
|
+
import * as Ut from "react-dom";
|
|
9
|
+
import { f as Ft, a as N, A as Jt, s as Lt, P as Mt, N as Bt, g as ge, h as qt, i as Vt, j as Wt, T as Le, H as Me, D as Kt, k as Be } from "./Zudoku-DA1yA-te.js";
|
|
10
|
+
import { B as qe, R as Ht } from "./RouteGuard-BMbu_Yb7.js";
|
|
11
|
+
import { CircleFadingArrowUpIcon as Gt, LoaderCircleIcon as Yt, ExternalLink as Qt, PanelLeftIcon as Xt, UnlinkIcon as en } from "lucide-react";
|
|
12
|
+
import { Button as tn } from "./ui/Button.js";
|
|
13
|
+
import { c as S } from "./cn-5-Gd1Dss.js";
|
|
14
|
+
import { a as V, e as nn, j as rn } from "./ZudokuContext-C6wlLMUH.js";
|
|
15
|
+
import "./index-DAWHN3cH.js";
|
|
16
|
+
import { D as T, a as on, b as sn } from "./Drawer-Ch7927PF.js";
|
|
17
|
+
import { VisuallyHidden as an } from "@radix-ui/react-visually-hidden";
|
|
18
|
+
import { S as cn } from "./Spinner-CI6bRyZw.js";
|
|
19
|
+
import { C as Ve } from "./CategoryHeading-DhmodDcq.js";
|
|
19
20
|
/**
|
|
20
21
|
* react-router v7.12.0
|
|
21
22
|
*
|
|
@@ -26,74 +27,81 @@ import { C as Be } from "./CategoryHeading-DhmodDcq.js";
|
|
|
26
27
|
*
|
|
27
28
|
* @license MIT
|
|
28
29
|
*/
|
|
29
|
-
function
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
function un(e) {
|
|
31
|
+
return /* @__PURE__ */ q.createElement(Tt, { flushSync: Ut.flushSync, ...e });
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
+
const ln = new xt({
|
|
33
34
|
defaultOptions: {
|
|
34
35
|
queries: {
|
|
35
36
|
staleTime: 1e3 * 60 * 5
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
|
-
}),
|
|
39
|
+
}), dn = ({
|
|
39
40
|
router: e,
|
|
40
41
|
hydrate: t = !1
|
|
41
|
-
}) => /* @__PURE__ */
|
|
42
|
+
}) => /* @__PURE__ */ c.jsx(Ue, { children: /* @__PURE__ */ c.jsx(Ce, { client: ln, children: /* @__PURE__ */ c.jsx(Zt, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ c.jsx(qe, { value: !1, children: /* @__PURE__ */ c.jsx(Ae, { children: /* @__PURE__ */ c.jsx(Ft.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ c.jsx(un, { router: e }) }) }) }) }) }) }), fn = ({
|
|
42
43
|
router: e,
|
|
43
44
|
context: t,
|
|
44
45
|
queryClient: n,
|
|
45
46
|
helmetContext: r,
|
|
46
47
|
bypassProtection: o = !1
|
|
47
|
-
}) => /* @__PURE__ */
|
|
48
|
-
function
|
|
49
|
-
function r(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
}) => /* @__PURE__ */ c.jsx(Ue, { children: /* @__PURE__ */ c.jsx(Ce, { client: n, children: /* @__PURE__ */ c.jsx(Ae, { context: r, children: /* @__PURE__ */ c.jsx(qe, { value: o, children: /* @__PURE__ */ c.jsx(Et, { router: e, context: t }) }) }) }) });
|
|
49
|
+
function u(e, t, n) {
|
|
50
|
+
function r(a, l) {
|
|
51
|
+
if (a._zod || Object.defineProperty(a, "_zod", {
|
|
52
|
+
value: {
|
|
53
|
+
def: l,
|
|
54
|
+
constr: s,
|
|
55
|
+
traits: /* @__PURE__ */ new Set()
|
|
56
|
+
},
|
|
53
57
|
enumerable: !1
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
}), a._zod.traits.has(e))
|
|
59
|
+
return;
|
|
60
|
+
a._zod.traits.add(e), t(a, l);
|
|
61
|
+
const d = s.prototype, f = Object.keys(d);
|
|
62
|
+
for (let g = 0; g < f.length; g++) {
|
|
63
|
+
const h = f[g];
|
|
64
|
+
h in a || (a[h] = d[h].bind(a));
|
|
65
|
+
}
|
|
58
66
|
}
|
|
59
67
|
const o = n?.Parent ?? Object;
|
|
60
|
-
class
|
|
68
|
+
class i extends o {
|
|
61
69
|
}
|
|
62
|
-
Object.defineProperty(
|
|
63
|
-
function
|
|
70
|
+
Object.defineProperty(i, "name", { value: e });
|
|
71
|
+
function s(a) {
|
|
64
72
|
var l;
|
|
65
|
-
const d = n?.Parent ? new
|
|
66
|
-
r(d,
|
|
67
|
-
for (const
|
|
68
|
-
|
|
73
|
+
const d = n?.Parent ? new i() : this;
|
|
74
|
+
r(d, a), (l = d._zod).deferred ?? (l.deferred = []);
|
|
75
|
+
for (const f of d._zod.deferred)
|
|
76
|
+
f();
|
|
69
77
|
return d;
|
|
70
78
|
}
|
|
71
|
-
return Object.defineProperty(
|
|
72
|
-
value: (
|
|
73
|
-
}), Object.defineProperty(
|
|
79
|
+
return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
|
|
80
|
+
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
|
|
81
|
+
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
74
82
|
}
|
|
75
|
-
class
|
|
83
|
+
class F extends Error {
|
|
76
84
|
constructor() {
|
|
77
85
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
|
-
class
|
|
88
|
+
class We extends Error {
|
|
81
89
|
constructor(t) {
|
|
82
90
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
|
-
const
|
|
86
|
-
function
|
|
87
|
-
return
|
|
93
|
+
const Ke = {};
|
|
94
|
+
function A(e) {
|
|
95
|
+
return Ke;
|
|
88
96
|
}
|
|
89
|
-
function
|
|
97
|
+
function He(e) {
|
|
90
98
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
91
99
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
92
100
|
}
|
|
93
|
-
function
|
|
101
|
+
function ie(e, t) {
|
|
94
102
|
return typeof t == "bigint" ? t.toString() : t;
|
|
95
103
|
}
|
|
96
|
-
function
|
|
104
|
+
function ue(e) {
|
|
97
105
|
return {
|
|
98
106
|
get value() {
|
|
99
107
|
{
|
|
@@ -103,20 +111,20 @@ function se(e) {
|
|
|
103
111
|
}
|
|
104
112
|
};
|
|
105
113
|
}
|
|
106
|
-
function
|
|
114
|
+
function le(e) {
|
|
107
115
|
return e == null;
|
|
108
116
|
}
|
|
109
|
-
function
|
|
117
|
+
function de(e) {
|
|
110
118
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
111
119
|
return e.slice(t, n);
|
|
112
120
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
121
|
+
const _e = Symbol("evaluating");
|
|
122
|
+
function _(e, t, n) {
|
|
115
123
|
let r;
|
|
116
124
|
Object.defineProperty(e, t, {
|
|
117
125
|
get() {
|
|
118
|
-
if (r !==
|
|
119
|
-
return r === void 0 && (r =
|
|
126
|
+
if (r !== _e)
|
|
127
|
+
return r === void 0 && (r = _e, r = n()), r;
|
|
120
128
|
},
|
|
121
129
|
set(o) {
|
|
122
130
|
Object.defineProperty(e, t, {
|
|
@@ -127,7 +135,7 @@ function h(e, t, n) {
|
|
|
127
135
|
configurable: !0
|
|
128
136
|
});
|
|
129
137
|
}
|
|
130
|
-
function
|
|
138
|
+
function C(e, t, n) {
|
|
131
139
|
Object.defineProperty(e, t, {
|
|
132
140
|
value: n,
|
|
133
141
|
writable: !0,
|
|
@@ -135,7 +143,7 @@ function O(e, t, n) {
|
|
|
135
143
|
configurable: !0
|
|
136
144
|
});
|
|
137
145
|
}
|
|
138
|
-
function
|
|
146
|
+
function I(...e) {
|
|
139
147
|
const t = {};
|
|
140
148
|
for (const n of e) {
|
|
141
149
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -143,15 +151,18 @@ function S(...e) {
|
|
|
143
151
|
}
|
|
144
152
|
return Object.defineProperties({}, t);
|
|
145
153
|
}
|
|
146
|
-
function
|
|
154
|
+
function ve(e) {
|
|
147
155
|
return JSON.stringify(e);
|
|
148
156
|
}
|
|
149
|
-
|
|
157
|
+
function pn(e) {
|
|
158
|
+
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
159
|
+
}
|
|
160
|
+
const Ge = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
150
161
|
};
|
|
151
|
-
function
|
|
162
|
+
function Y(e) {
|
|
152
163
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
153
164
|
}
|
|
154
|
-
const
|
|
165
|
+
const hn = ue(() => {
|
|
155
166
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
156
167
|
return !1;
|
|
157
168
|
try {
|
|
@@ -161,27 +172,27 @@ const nn = se(() => {
|
|
|
161
172
|
return !1;
|
|
162
173
|
}
|
|
163
174
|
});
|
|
164
|
-
function
|
|
165
|
-
if (
|
|
175
|
+
function M(e) {
|
|
176
|
+
if (Y(e) === !1)
|
|
166
177
|
return !1;
|
|
167
178
|
const t = e.constructor;
|
|
168
|
-
if (t === void 0)
|
|
179
|
+
if (t === void 0 || typeof t != "function")
|
|
169
180
|
return !0;
|
|
170
181
|
const n = t.prototype;
|
|
171
|
-
return !(
|
|
182
|
+
return !(Y(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
172
183
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
184
|
+
function Ye(e) {
|
|
185
|
+
return M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
175
186
|
}
|
|
176
|
-
const
|
|
177
|
-
function
|
|
187
|
+
const mn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
188
|
+
function ne(e) {
|
|
178
189
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
179
190
|
}
|
|
180
|
-
function
|
|
191
|
+
function R(e, t, n) {
|
|
181
192
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
182
193
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
183
194
|
}
|
|
184
|
-
function
|
|
195
|
+
function p(e) {
|
|
185
196
|
const t = e;
|
|
186
197
|
if (!t)
|
|
187
198
|
return {};
|
|
@@ -194,72 +205,79 @@ function f(e) {
|
|
|
194
205
|
}
|
|
195
206
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
196
207
|
}
|
|
197
|
-
function
|
|
208
|
+
function gn(e) {
|
|
198
209
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
199
210
|
}
|
|
200
|
-
function
|
|
201
|
-
const n = e._zod.def, r =
|
|
211
|
+
function _n(e, t) {
|
|
212
|
+
const n = e._zod.def, r = n.checks;
|
|
213
|
+
if (r && r.length > 0)
|
|
214
|
+
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
215
|
+
const i = I(e._zod.def, {
|
|
202
216
|
get shape() {
|
|
203
|
-
const
|
|
204
|
-
for (const
|
|
205
|
-
if (!(
|
|
206
|
-
throw new Error(`Unrecognized key: "${
|
|
207
|
-
t[
|
|
217
|
+
const s = {};
|
|
218
|
+
for (const a in t) {
|
|
219
|
+
if (!(a in n.shape))
|
|
220
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
221
|
+
t[a] && (s[a] = n.shape[a]);
|
|
208
222
|
}
|
|
209
|
-
return
|
|
223
|
+
return C(this, "shape", s), s;
|
|
210
224
|
},
|
|
211
225
|
checks: []
|
|
212
226
|
});
|
|
213
|
-
return
|
|
227
|
+
return R(e, i);
|
|
214
228
|
}
|
|
215
|
-
function
|
|
216
|
-
const n = e._zod.def, r =
|
|
229
|
+
function vn(e, t) {
|
|
230
|
+
const n = e._zod.def, r = n.checks;
|
|
231
|
+
if (r && r.length > 0)
|
|
232
|
+
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
233
|
+
const i = I(e._zod.def, {
|
|
217
234
|
get shape() {
|
|
218
|
-
const
|
|
219
|
-
for (const
|
|
220
|
-
if (!(
|
|
221
|
-
throw new Error(`Unrecognized key: "${
|
|
222
|
-
t[
|
|
235
|
+
const s = { ...e._zod.def.shape };
|
|
236
|
+
for (const a in t) {
|
|
237
|
+
if (!(a in n.shape))
|
|
238
|
+
throw new Error(`Unrecognized key: "${a}"`);
|
|
239
|
+
t[a] && delete s[a];
|
|
223
240
|
}
|
|
224
|
-
return
|
|
241
|
+
return C(this, "shape", s), s;
|
|
225
242
|
},
|
|
226
243
|
checks: []
|
|
227
244
|
});
|
|
228
|
-
return
|
|
245
|
+
return R(e, i);
|
|
229
246
|
}
|
|
230
|
-
function
|
|
231
|
-
if (!
|
|
247
|
+
function yn(e, t) {
|
|
248
|
+
if (!M(t))
|
|
232
249
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
233
250
|
const n = e._zod.def.checks;
|
|
234
|
-
if (n && n.length > 0)
|
|
235
|
-
|
|
236
|
-
|
|
251
|
+
if (n && n.length > 0) {
|
|
252
|
+
const i = e._zod.def.shape;
|
|
253
|
+
for (const s in t)
|
|
254
|
+
if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
|
|
255
|
+
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
256
|
+
}
|
|
257
|
+
const o = I(e._zod.def, {
|
|
237
258
|
get shape() {
|
|
238
|
-
const
|
|
239
|
-
return
|
|
240
|
-
}
|
|
241
|
-
checks: []
|
|
259
|
+
const i = { ...e._zod.def.shape, ...t };
|
|
260
|
+
return C(this, "shape", i), i;
|
|
261
|
+
}
|
|
242
262
|
});
|
|
243
|
-
return
|
|
263
|
+
return R(e, o);
|
|
244
264
|
}
|
|
245
|
-
function
|
|
246
|
-
if (!
|
|
265
|
+
function wn(e, t) {
|
|
266
|
+
if (!M(t))
|
|
247
267
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
248
|
-
const n = {
|
|
249
|
-
...e._zod.def,
|
|
268
|
+
const n = I(e._zod.def, {
|
|
250
269
|
get shape() {
|
|
251
270
|
const r = { ...e._zod.def.shape, ...t };
|
|
252
|
-
return
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
return T(e, n);
|
|
271
|
+
return C(this, "shape", r), r;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
return R(e, n);
|
|
257
275
|
}
|
|
258
|
-
function
|
|
259
|
-
const n =
|
|
276
|
+
function zn(e, t) {
|
|
277
|
+
const n = I(e._zod.def, {
|
|
260
278
|
get shape() {
|
|
261
279
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
262
|
-
return
|
|
280
|
+
return C(this, "shape", r), r;
|
|
263
281
|
},
|
|
264
282
|
get catchall() {
|
|
265
283
|
return t._zod.def.catchall;
|
|
@@ -267,59 +285,61 @@ function ln(e, t) {
|
|
|
267
285
|
checks: []
|
|
268
286
|
// delete existing checks
|
|
269
287
|
});
|
|
270
|
-
return
|
|
288
|
+
return R(e, n);
|
|
271
289
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
290
|
+
function bn(e, t, n) {
|
|
291
|
+
const o = t._zod.def.checks;
|
|
292
|
+
if (o && o.length > 0)
|
|
293
|
+
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
294
|
+
const s = I(t._zod.def, {
|
|
274
295
|
get shape() {
|
|
275
|
-
const
|
|
296
|
+
const a = t._zod.def.shape, l = { ...a };
|
|
276
297
|
if (n)
|
|
277
|
-
for (const
|
|
278
|
-
if (!(
|
|
279
|
-
throw new Error(`Unrecognized key: "${
|
|
280
|
-
n[
|
|
298
|
+
for (const d in n) {
|
|
299
|
+
if (!(d in a))
|
|
300
|
+
throw new Error(`Unrecognized key: "${d}"`);
|
|
301
|
+
n[d] && (l[d] = e ? new e({
|
|
281
302
|
type: "optional",
|
|
282
|
-
innerType:
|
|
283
|
-
}) :
|
|
303
|
+
innerType: a[d]
|
|
304
|
+
}) : a[d]);
|
|
284
305
|
}
|
|
285
306
|
else
|
|
286
|
-
for (const
|
|
287
|
-
|
|
307
|
+
for (const d in a)
|
|
308
|
+
l[d] = e ? new e({
|
|
288
309
|
type: "optional",
|
|
289
|
-
innerType:
|
|
290
|
-
}) :
|
|
291
|
-
return
|
|
310
|
+
innerType: a[d]
|
|
311
|
+
}) : a[d];
|
|
312
|
+
return C(this, "shape", l), l;
|
|
292
313
|
},
|
|
293
314
|
checks: []
|
|
294
315
|
});
|
|
295
|
-
return
|
|
316
|
+
return R(t, s);
|
|
296
317
|
}
|
|
297
|
-
function
|
|
298
|
-
const r =
|
|
318
|
+
function kn(e, t, n) {
|
|
319
|
+
const r = I(t._zod.def, {
|
|
299
320
|
get shape() {
|
|
300
|
-
const o = t._zod.def.shape,
|
|
321
|
+
const o = t._zod.def.shape, i = { ...o };
|
|
301
322
|
if (n)
|
|
302
|
-
for (const
|
|
303
|
-
if (!(
|
|
304
|
-
throw new Error(`Unrecognized key: "${
|
|
305
|
-
n[
|
|
323
|
+
for (const s in n) {
|
|
324
|
+
if (!(s in i))
|
|
325
|
+
throw new Error(`Unrecognized key: "${s}"`);
|
|
326
|
+
n[s] && (i[s] = new e({
|
|
306
327
|
type: "nonoptional",
|
|
307
|
-
innerType: o[
|
|
328
|
+
innerType: o[s]
|
|
308
329
|
}));
|
|
309
330
|
}
|
|
310
331
|
else
|
|
311
|
-
for (const
|
|
312
|
-
s
|
|
332
|
+
for (const s in o)
|
|
333
|
+
i[s] = new e({
|
|
313
334
|
type: "nonoptional",
|
|
314
|
-
innerType: o[
|
|
335
|
+
innerType: o[s]
|
|
315
336
|
});
|
|
316
|
-
return
|
|
317
|
-
}
|
|
318
|
-
checks: []
|
|
337
|
+
return C(this, "shape", i), i;
|
|
338
|
+
}
|
|
319
339
|
});
|
|
320
|
-
return
|
|
340
|
+
return R(t, r);
|
|
321
341
|
}
|
|
322
|
-
function
|
|
342
|
+
function U(e, t = 0) {
|
|
323
343
|
if (e.aborted === !0)
|
|
324
344
|
return !0;
|
|
325
345
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -327,27 +347,27 @@ function N(e, t = 0) {
|
|
|
327
347
|
return !0;
|
|
328
348
|
return !1;
|
|
329
349
|
}
|
|
330
|
-
function
|
|
350
|
+
function Qe(e, t) {
|
|
331
351
|
return t.map((n) => {
|
|
332
352
|
var r;
|
|
333
353
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
334
354
|
});
|
|
335
355
|
}
|
|
336
|
-
function
|
|
356
|
+
function K(e) {
|
|
337
357
|
return typeof e == "string" ? e : e?.message;
|
|
338
358
|
}
|
|
339
|
-
function
|
|
359
|
+
function D(e, t, n) {
|
|
340
360
|
const r = { ...e, path: e.path ?? [] };
|
|
341
361
|
if (!e.message) {
|
|
342
|
-
const o =
|
|
362
|
+
const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
|
|
343
363
|
r.message = o;
|
|
344
364
|
}
|
|
345
365
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
346
366
|
}
|
|
347
|
-
function
|
|
367
|
+
function fe(e) {
|
|
348
368
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
349
369
|
}
|
|
350
|
-
function
|
|
370
|
+
function B(...e) {
|
|
351
371
|
const [t, n, r] = e;
|
|
352
372
|
return typeof t == "string" ? {
|
|
353
373
|
message: t,
|
|
@@ -356,118 +376,118 @@ function U(...e) {
|
|
|
356
376
|
inst: r
|
|
357
377
|
} : { ...t };
|
|
358
378
|
}
|
|
359
|
-
const
|
|
379
|
+
const Xe = (e, t) => {
|
|
360
380
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
361
381
|
value: e._zod,
|
|
362
382
|
enumerable: !1
|
|
363
383
|
}), Object.defineProperty(e, "issues", {
|
|
364
384
|
value: t,
|
|
365
385
|
enumerable: !1
|
|
366
|
-
}), e.message = JSON.stringify(t,
|
|
386
|
+
}), e.message = JSON.stringify(t, ie, 2), Object.defineProperty(e, "toString", {
|
|
367
387
|
value: () => e.message,
|
|
368
388
|
enumerable: !1
|
|
369
389
|
});
|
|
370
|
-
},
|
|
371
|
-
function
|
|
390
|
+
}, et = u("$ZodError", Xe), tt = u("$ZodError", Xe, { Parent: Error });
|
|
391
|
+
function $n(e, t = (n) => n.message) {
|
|
372
392
|
const n = {}, r = [];
|
|
373
393
|
for (const o of e.issues)
|
|
374
394
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
375
395
|
return { formErrors: r, fieldErrors: n };
|
|
376
396
|
}
|
|
377
|
-
function
|
|
397
|
+
function jn(e, t = (n) => n.message) {
|
|
378
398
|
const n = { _errors: [] }, r = (o) => {
|
|
379
|
-
for (const
|
|
380
|
-
if (
|
|
381
|
-
|
|
382
|
-
else if (
|
|
383
|
-
r({ issues:
|
|
384
|
-
else if (
|
|
385
|
-
r({ issues:
|
|
386
|
-
else if (
|
|
387
|
-
n._errors.push(t(
|
|
399
|
+
for (const i of o.issues)
|
|
400
|
+
if (i.code === "invalid_union" && i.errors.length)
|
|
401
|
+
i.errors.map((s) => r({ issues: s }));
|
|
402
|
+
else if (i.code === "invalid_key")
|
|
403
|
+
r({ issues: i.issues });
|
|
404
|
+
else if (i.code === "invalid_element")
|
|
405
|
+
r({ issues: i.issues });
|
|
406
|
+
else if (i.path.length === 0)
|
|
407
|
+
n._errors.push(t(i));
|
|
388
408
|
else {
|
|
389
|
-
let
|
|
390
|
-
for (;
|
|
391
|
-
const l =
|
|
392
|
-
|
|
409
|
+
let s = n, a = 0;
|
|
410
|
+
for (; a < i.path.length; ) {
|
|
411
|
+
const l = i.path[a];
|
|
412
|
+
a === i.path.length - 1 ? (s[l] = s[l] || { _errors: [] }, s[l]._errors.push(t(i))) : s[l] = s[l] || { _errors: [] }, s = s[l], a++;
|
|
393
413
|
}
|
|
394
414
|
}
|
|
395
415
|
};
|
|
396
416
|
return r(e), n;
|
|
397
417
|
}
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
401
|
-
throw new
|
|
402
|
-
if (
|
|
403
|
-
const
|
|
404
|
-
throw
|
|
418
|
+
const pe = (e) => (t, n, r, o) => {
|
|
419
|
+
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
420
|
+
if (s instanceof Promise)
|
|
421
|
+
throw new F();
|
|
422
|
+
if (s.issues.length) {
|
|
423
|
+
const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, A())));
|
|
424
|
+
throw Ge(a, o?.callee), a;
|
|
405
425
|
}
|
|
406
|
-
return
|
|
407
|
-
},
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
if (
|
|
411
|
-
const
|
|
412
|
-
throw
|
|
426
|
+
return s.value;
|
|
427
|
+
}, he = (e) => async (t, n, r, o) => {
|
|
428
|
+
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
429
|
+
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
430
|
+
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
431
|
+
const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, A())));
|
|
432
|
+
throw Ge(a, o?.callee), a;
|
|
413
433
|
}
|
|
414
|
-
return
|
|
415
|
-
},
|
|
416
|
-
const o = r ? { ...r, async: !1 } : { async: !1 },
|
|
417
|
-
if (
|
|
418
|
-
throw new
|
|
419
|
-
return
|
|
434
|
+
return s.value;
|
|
435
|
+
}, re = (e) => (t, n, r) => {
|
|
436
|
+
const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
437
|
+
if (i instanceof Promise)
|
|
438
|
+
throw new F();
|
|
439
|
+
return i.issues.length ? {
|
|
420
440
|
success: !1,
|
|
421
|
-
error: new (e ??
|
|
422
|
-
} : { success: !0, data:
|
|
423
|
-
},
|
|
441
|
+
error: new (e ?? et)(i.issues.map((s) => D(s, o, A())))
|
|
442
|
+
} : { success: !0, data: i.value };
|
|
443
|
+
}, xn = /* @__PURE__ */ re(tt), oe = (e) => async (t, n, r) => {
|
|
424
444
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
425
|
-
let
|
|
426
|
-
return
|
|
445
|
+
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
446
|
+
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
427
447
|
success: !1,
|
|
428
|
-
error: new e(
|
|
429
|
-
} : { success: !0, data:
|
|
430
|
-
},
|
|
448
|
+
error: new e(i.issues.map((s) => D(s, o, A())))
|
|
449
|
+
} : { success: !0, data: i.value };
|
|
450
|
+
}, Zn = /* @__PURE__ */ oe(tt), On = (e) => (t, n, r) => {
|
|
431
451
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
432
|
-
return
|
|
433
|
-
},
|
|
452
|
+
return pe(e)(t, n, o);
|
|
453
|
+
}, Sn = (e) => (t, n, r) => pe(e)(t, n, r), Pn = (e) => async (t, n, r) => {
|
|
434
454
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
435
|
-
return
|
|
436
|
-
},
|
|
455
|
+
return he(e)(t, n, o);
|
|
456
|
+
}, Tn = (e) => async (t, n, r) => he(e)(t, n, r), En = (e) => (t, n, r) => {
|
|
437
457
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
438
|
-
return
|
|
439
|
-
},
|
|
458
|
+
return re(e)(t, n, o);
|
|
459
|
+
}, Nn = (e) => (t, n, r) => re(e)(t, n, r), In = (e) => async (t, n, r) => {
|
|
440
460
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
441
|
-
return
|
|
442
|
-
},
|
|
443
|
-
function
|
|
444
|
-
return new RegExp(
|
|
461
|
+
return oe(e)(t, n, o);
|
|
462
|
+
}, Rn = (e) => async (t, n, r) => oe(e)(t, n, r), An = /^[cC][^\s-]{8,}$/, Dn = /^[0-9a-z]+$/, Cn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Un = /^[0-9a-vA-V]{20}$/, Fn = /^[A-Za-z0-9]{27}$/, Jn = /^[a-zA-Z0-9_-]{21}$/, Ln = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Mn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ye = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Bn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, qn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
463
|
+
function Vn() {
|
|
464
|
+
return new RegExp(qn, "u");
|
|
445
465
|
}
|
|
446
|
-
const
|
|
447
|
-
function
|
|
466
|
+
const Wn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Kn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Hn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Gn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Yn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, nt = /^[A-Za-z0-9_-]*$/, Qn = /^\+[1-9]\d{6,14}$/, rt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Xn = /* @__PURE__ */ new RegExp(`^${rt}$`);
|
|
467
|
+
function ot(e) {
|
|
448
468
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
449
469
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
450
470
|
}
|
|
451
|
-
function
|
|
452
|
-
return new RegExp(`^${
|
|
471
|
+
function er(e) {
|
|
472
|
+
return new RegExp(`^${ot(e)}$`);
|
|
453
473
|
}
|
|
454
|
-
function
|
|
455
|
-
const t =
|
|
474
|
+
function tr(e) {
|
|
475
|
+
const t = ot({ precision: e.precision }), n = ["Z"];
|
|
456
476
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
457
477
|
const r = `${t}(?:${n.join("|")})`;
|
|
458
|
-
return new RegExp(`^${
|
|
478
|
+
return new RegExp(`^${rt}T(?:${r})$`);
|
|
459
479
|
}
|
|
460
|
-
const
|
|
480
|
+
const nr = (e) => {
|
|
461
481
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
462
482
|
return new RegExp(`^${t}$`);
|
|
463
|
-
},
|
|
483
|
+
}, rr = /^[^A-Z]*$/, or = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
464
484
|
var n;
|
|
465
485
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
466
|
-
}),
|
|
486
|
+
}), sr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
467
487
|
var n;
|
|
468
|
-
|
|
488
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
469
489
|
const o = r.value;
|
|
470
|
-
return !
|
|
490
|
+
return !le(o) && o.length !== void 0;
|
|
471
491
|
}), e._zod.onattach.push((r) => {
|
|
472
492
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
473
493
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -475,9 +495,9 @@ const Vn = (e) => {
|
|
|
475
495
|
const o = r.value;
|
|
476
496
|
if (o.length <= t.maximum)
|
|
477
497
|
return;
|
|
478
|
-
const
|
|
498
|
+
const s = fe(o);
|
|
479
499
|
r.issues.push({
|
|
480
|
-
origin:
|
|
500
|
+
origin: s,
|
|
481
501
|
code: "too_big",
|
|
482
502
|
maximum: t.maximum,
|
|
483
503
|
inclusive: !0,
|
|
@@ -486,11 +506,11 @@ const Vn = (e) => {
|
|
|
486
506
|
continue: !t.abort
|
|
487
507
|
});
|
|
488
508
|
};
|
|
489
|
-
}),
|
|
509
|
+
}), ir = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
490
510
|
var n;
|
|
491
|
-
|
|
511
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
492
512
|
const o = r.value;
|
|
493
|
-
return !
|
|
513
|
+
return !le(o) && o.length !== void 0;
|
|
494
514
|
}), e._zod.onattach.push((r) => {
|
|
495
515
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
496
516
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -498,9 +518,9 @@ const Vn = (e) => {
|
|
|
498
518
|
const o = r.value;
|
|
499
519
|
if (o.length >= t.minimum)
|
|
500
520
|
return;
|
|
501
|
-
const
|
|
521
|
+
const s = fe(o);
|
|
502
522
|
r.issues.push({
|
|
503
|
-
origin:
|
|
523
|
+
origin: s,
|
|
504
524
|
code: "too_small",
|
|
505
525
|
minimum: t.minimum,
|
|
506
526
|
inclusive: !0,
|
|
@@ -509,22 +529,22 @@ const Vn = (e) => {
|
|
|
509
529
|
continue: !t.abort
|
|
510
530
|
});
|
|
511
531
|
};
|
|
512
|
-
}),
|
|
532
|
+
}), ar = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
513
533
|
var n;
|
|
514
|
-
|
|
534
|
+
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
515
535
|
const o = r.value;
|
|
516
|
-
return !
|
|
536
|
+
return !le(o) && o.length !== void 0;
|
|
517
537
|
}), e._zod.onattach.push((r) => {
|
|
518
538
|
const o = r._zod.bag;
|
|
519
539
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
520
540
|
}), e._zod.check = (r) => {
|
|
521
|
-
const o = r.value,
|
|
522
|
-
if (
|
|
541
|
+
const o = r.value, i = o.length;
|
|
542
|
+
if (i === t.length)
|
|
523
543
|
return;
|
|
524
|
-
const
|
|
544
|
+
const s = fe(o), a = i > t.length;
|
|
525
545
|
r.issues.push({
|
|
526
|
-
origin:
|
|
527
|
-
...
|
|
546
|
+
origin: s,
|
|
547
|
+
...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
528
548
|
inclusive: !0,
|
|
529
549
|
exact: !0,
|
|
530
550
|
input: r.value,
|
|
@@ -532,11 +552,11 @@ const Vn = (e) => {
|
|
|
532
552
|
continue: !t.abort
|
|
533
553
|
});
|
|
534
554
|
};
|
|
535
|
-
}),
|
|
555
|
+
}), se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
|
|
536
556
|
var n, r;
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
|
|
557
|
+
E.init(e, t), e._zod.onattach.push((o) => {
|
|
558
|
+
const i = o._zod.bag;
|
|
559
|
+
i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
|
|
540
560
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
541
561
|
t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
|
|
542
562
|
origin: "string",
|
|
@@ -549,8 +569,8 @@ const Vn = (e) => {
|
|
|
549
569
|
});
|
|
550
570
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
551
571
|
});
|
|
552
|
-
}),
|
|
553
|
-
|
|
572
|
+
}), cr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
573
|
+
se.init(e, t), e._zod.check = (n) => {
|
|
554
574
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
555
575
|
origin: "string",
|
|
556
576
|
code: "invalid_format",
|
|
@@ -561,16 +581,16 @@ const Vn = (e) => {
|
|
|
561
581
|
continue: !t.abort
|
|
562
582
|
});
|
|
563
583
|
};
|
|
564
|
-
}),
|
|
565
|
-
t.pattern ?? (t.pattern =
|
|
566
|
-
}),
|
|
567
|
-
t.pattern ?? (t.pattern =
|
|
568
|
-
}),
|
|
569
|
-
|
|
570
|
-
const n =
|
|
584
|
+
}), ur = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
585
|
+
t.pattern ?? (t.pattern = rr), se.init(e, t);
|
|
586
|
+
}), lr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
587
|
+
t.pattern ?? (t.pattern = or), se.init(e, t);
|
|
588
|
+
}), dr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
589
|
+
E.init(e, t);
|
|
590
|
+
const n = ne(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
571
591
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
572
|
-
const
|
|
573
|
-
|
|
592
|
+
const i = o._zod.bag;
|
|
593
|
+
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
574
594
|
}), e._zod.check = (o) => {
|
|
575
595
|
o.value.includes(t.includes, t.position) || o.issues.push({
|
|
576
596
|
origin: "string",
|
|
@@ -582,9 +602,9 @@ const Vn = (e) => {
|
|
|
582
602
|
continue: !t.abort
|
|
583
603
|
});
|
|
584
604
|
};
|
|
585
|
-
}),
|
|
586
|
-
|
|
587
|
-
const n = new RegExp(`^${
|
|
605
|
+
}), fr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
606
|
+
E.init(e, t);
|
|
607
|
+
const n = new RegExp(`^${ne(t.prefix)}.*`);
|
|
588
608
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
589
609
|
const o = r._zod.bag;
|
|
590
610
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -599,9 +619,9 @@ const Vn = (e) => {
|
|
|
599
619
|
continue: !t.abort
|
|
600
620
|
});
|
|
601
621
|
};
|
|
602
|
-
}),
|
|
603
|
-
|
|
604
|
-
const n = new RegExp(`.*${
|
|
622
|
+
}), pr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
623
|
+
E.init(e, t);
|
|
624
|
+
const n = new RegExp(`.*${ne(t.suffix)}$`);
|
|
605
625
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
606
626
|
const o = r._zod.bag;
|
|
607
627
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -616,12 +636,12 @@ const Vn = (e) => {
|
|
|
616
636
|
continue: !t.abort
|
|
617
637
|
});
|
|
618
638
|
};
|
|
619
|
-
}),
|
|
620
|
-
|
|
639
|
+
}), hr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
640
|
+
E.init(e, t), e._zod.check = (n) => {
|
|
621
641
|
n.value = t.tx(n.value);
|
|
622
642
|
};
|
|
623
643
|
});
|
|
624
|
-
class
|
|
644
|
+
class mr {
|
|
625
645
|
constructor(t = []) {
|
|
626
646
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
627
647
|
}
|
|
@@ -634,96 +654,96 @@ class sr {
|
|
|
634
654
|
return;
|
|
635
655
|
}
|
|
636
656
|
const r = t.split(`
|
|
637
|
-
`).filter((
|
|
638
|
-
for (const
|
|
639
|
-
this.content.push(
|
|
657
|
+
`).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
|
|
658
|
+
for (const s of i)
|
|
659
|
+
this.content.push(s);
|
|
640
660
|
}
|
|
641
661
|
compile() {
|
|
642
|
-
const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((
|
|
662
|
+
const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
|
|
643
663
|
return new t(...n, o.join(`
|
|
644
664
|
`));
|
|
645
665
|
}
|
|
646
666
|
}
|
|
647
|
-
const
|
|
667
|
+
const gr = {
|
|
648
668
|
major: 4,
|
|
649
|
-
minor:
|
|
650
|
-
patch:
|
|
651
|
-
},
|
|
669
|
+
minor: 3,
|
|
670
|
+
patch: 6
|
|
671
|
+
}, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
|
|
652
672
|
var n;
|
|
653
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
673
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = gr;
|
|
654
674
|
const r = [...e._zod.def.checks ?? []];
|
|
655
675
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
656
676
|
for (const o of r)
|
|
657
|
-
for (const
|
|
658
|
-
|
|
677
|
+
for (const i of o._zod.onattach)
|
|
678
|
+
i(e);
|
|
659
679
|
if (r.length === 0)
|
|
660
680
|
(n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
661
681
|
e._zod.run = e._zod.parse;
|
|
662
682
|
});
|
|
663
683
|
else {
|
|
664
|
-
const o = (
|
|
665
|
-
let d =
|
|
666
|
-
for (const
|
|
667
|
-
if (
|
|
668
|
-
if (!
|
|
684
|
+
const o = (s, a, l) => {
|
|
685
|
+
let d = U(s), f;
|
|
686
|
+
for (const g of a) {
|
|
687
|
+
if (g._zod.def.when) {
|
|
688
|
+
if (!g._zod.def.when(s))
|
|
669
689
|
continue;
|
|
670
690
|
} else if (d)
|
|
671
691
|
continue;
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
throw new
|
|
675
|
-
if (
|
|
676
|
-
|
|
677
|
-
await
|
|
692
|
+
const h = s.issues.length, m = g._zod.check(s);
|
|
693
|
+
if (m instanceof Promise && l?.async === !1)
|
|
694
|
+
throw new F();
|
|
695
|
+
if (f || m instanceof Promise)
|
|
696
|
+
f = (f ?? Promise.resolve()).then(async () => {
|
|
697
|
+
await m, s.issues.length !== h && (d || (d = U(s, h)));
|
|
678
698
|
});
|
|
679
699
|
else {
|
|
680
|
-
if (
|
|
700
|
+
if (s.issues.length === h)
|
|
681
701
|
continue;
|
|
682
|
-
d || (d =
|
|
702
|
+
d || (d = U(s, h));
|
|
683
703
|
}
|
|
684
704
|
}
|
|
685
|
-
return
|
|
686
|
-
},
|
|
687
|
-
if (
|
|
688
|
-
return
|
|
689
|
-
const d = o(
|
|
705
|
+
return f ? f.then(() => s) : s;
|
|
706
|
+
}, i = (s, a, l) => {
|
|
707
|
+
if (U(s))
|
|
708
|
+
return s.aborted = !0, s;
|
|
709
|
+
const d = o(a, r, l);
|
|
690
710
|
if (d instanceof Promise) {
|
|
691
711
|
if (l.async === !1)
|
|
692
|
-
throw new
|
|
693
|
-
return d.then((
|
|
712
|
+
throw new F();
|
|
713
|
+
return d.then((f) => e._zod.parse(f, l));
|
|
694
714
|
}
|
|
695
715
|
return e._zod.parse(d, l);
|
|
696
716
|
};
|
|
697
|
-
e._zod.run = (
|
|
698
|
-
if (
|
|
699
|
-
return e._zod.parse(
|
|
700
|
-
if (
|
|
701
|
-
const d = e._zod.parse({ value:
|
|
702
|
-
return d instanceof Promise ? d.then((
|
|
717
|
+
e._zod.run = (s, a) => {
|
|
718
|
+
if (a.skipChecks)
|
|
719
|
+
return e._zod.parse(s, a);
|
|
720
|
+
if (a.direction === "backward") {
|
|
721
|
+
const d = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
|
|
722
|
+
return d instanceof Promise ? d.then((f) => i(f, s, a)) : i(d, s, a);
|
|
703
723
|
}
|
|
704
|
-
const l = e._zod.parse(
|
|
724
|
+
const l = e._zod.parse(s, a);
|
|
705
725
|
if (l instanceof Promise) {
|
|
706
|
-
if (
|
|
707
|
-
throw new
|
|
708
|
-
return l.then((d) => o(d, r,
|
|
726
|
+
if (a.async === !1)
|
|
727
|
+
throw new F();
|
|
728
|
+
return l.then((d) => o(d, r, a));
|
|
709
729
|
}
|
|
710
|
-
return o(l, r,
|
|
730
|
+
return o(l, r, a);
|
|
711
731
|
};
|
|
712
732
|
}
|
|
713
|
-
e
|
|
733
|
+
_(e, "~standard", () => ({
|
|
714
734
|
validate: (o) => {
|
|
715
735
|
try {
|
|
716
|
-
const
|
|
717
|
-
return
|
|
736
|
+
const i = xn(e, o);
|
|
737
|
+
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
718
738
|
} catch {
|
|
719
|
-
return
|
|
739
|
+
return Zn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
720
740
|
}
|
|
721
741
|
},
|
|
722
742
|
vendor: "zod",
|
|
723
743
|
version: 1
|
|
724
|
-
};
|
|
725
|
-
}),
|
|
726
|
-
|
|
744
|
+
}));
|
|
745
|
+
}), me = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
746
|
+
w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? nr(e._zod.bag), e._zod.parse = (n, r) => {
|
|
727
747
|
if (t.coerce)
|
|
728
748
|
try {
|
|
729
749
|
n.value = String(n.value);
|
|
@@ -736,11 +756,11 @@ const ir = {
|
|
|
736
756
|
inst: e
|
|
737
757
|
}), n;
|
|
738
758
|
};
|
|
739
|
-
}),
|
|
740
|
-
|
|
741
|
-
}),
|
|
742
|
-
t.pattern ?? (t.pattern =
|
|
743
|
-
}),
|
|
759
|
+
}), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
760
|
+
se.init(e, t), me.init(e, t);
|
|
761
|
+
}), _r = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
762
|
+
t.pattern ?? (t.pattern = Mn), v.init(e, t);
|
|
763
|
+
}), vr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
744
764
|
if (t.version) {
|
|
745
765
|
const r = {
|
|
746
766
|
v1: 1,
|
|
@@ -754,21 +774,21 @@ const ir = {
|
|
|
754
774
|
}[t.version];
|
|
755
775
|
if (r === void 0)
|
|
756
776
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
757
|
-
t.pattern ?? (t.pattern =
|
|
777
|
+
t.pattern ?? (t.pattern = ye(r));
|
|
758
778
|
} else
|
|
759
|
-
t.pattern ?? (t.pattern =
|
|
760
|
-
|
|
761
|
-
}),
|
|
762
|
-
t.pattern ?? (t.pattern =
|
|
763
|
-
}),
|
|
764
|
-
|
|
779
|
+
t.pattern ?? (t.pattern = ye());
|
|
780
|
+
v.init(e, t);
|
|
781
|
+
}), yr = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
782
|
+
t.pattern ?? (t.pattern = Bn), v.init(e, t);
|
|
783
|
+
}), wr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
|
|
784
|
+
v.init(e, t), e._zod.check = (n) => {
|
|
765
785
|
try {
|
|
766
786
|
const r = n.value.trim(), o = new URL(r);
|
|
767
787
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
768
788
|
code: "invalid_format",
|
|
769
789
|
format: "url",
|
|
770
790
|
note: "Invalid hostname",
|
|
771
|
-
pattern:
|
|
791
|
+
pattern: t.hostname.source,
|
|
772
792
|
input: n.value,
|
|
773
793
|
inst: e,
|
|
774
794
|
continue: !t.abort
|
|
@@ -792,38 +812,32 @@ const ir = {
|
|
|
792
812
|
});
|
|
793
813
|
}
|
|
794
814
|
};
|
|
795
|
-
}),
|
|
796
|
-
t.pattern ?? (t.pattern =
|
|
797
|
-
}),
|
|
798
|
-
t.pattern ?? (t.pattern =
|
|
799
|
-
}),
|
|
800
|
-
t.pattern ?? (t.pattern =
|
|
801
|
-
}),
|
|
802
|
-
t.pattern ?? (t.pattern =
|
|
803
|
-
}),
|
|
804
|
-
t.pattern ?? (t.pattern =
|
|
805
|
-
}),
|
|
806
|
-
t.pattern ?? (t.pattern =
|
|
807
|
-
}),
|
|
808
|
-
t.pattern ?? (t.pattern =
|
|
809
|
-
}),
|
|
810
|
-
t.pattern ?? (t.pattern =
|
|
811
|
-
}),
|
|
812
|
-
t.pattern ?? (t.pattern =
|
|
813
|
-
}),
|
|
814
|
-
t.pattern ?? (t.pattern =
|
|
815
|
-
}),
|
|
816
|
-
t.pattern ?? (t.pattern =
|
|
817
|
-
}),
|
|
818
|
-
t.pattern ?? (t.pattern =
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
});
|
|
822
|
-
}), kr = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
|
|
823
|
-
t.pattern ?? (t.pattern = Rn), m.init(e, t), e._zod.onattach.push((n) => {
|
|
824
|
-
const r = n._zod.bag;
|
|
825
|
-
r.format = "ipv6";
|
|
826
|
-
}), e._zod.check = (n) => {
|
|
815
|
+
}), zr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
|
|
816
|
+
t.pattern ?? (t.pattern = Vn()), v.init(e, t);
|
|
817
|
+
}), br = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
|
|
818
|
+
t.pattern ?? (t.pattern = Jn), v.init(e, t);
|
|
819
|
+
}), kr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
|
|
820
|
+
t.pattern ?? (t.pattern = An), v.init(e, t);
|
|
821
|
+
}), $r = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
822
|
+
t.pattern ?? (t.pattern = Dn), v.init(e, t);
|
|
823
|
+
}), jr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
824
|
+
t.pattern ?? (t.pattern = Cn), v.init(e, t);
|
|
825
|
+
}), xr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
826
|
+
t.pattern ?? (t.pattern = Un), v.init(e, t);
|
|
827
|
+
}), Zr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
828
|
+
t.pattern ?? (t.pattern = Fn), v.init(e, t);
|
|
829
|
+
}), Or = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
830
|
+
t.pattern ?? (t.pattern = tr(t)), v.init(e, t);
|
|
831
|
+
}), Sr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
832
|
+
t.pattern ?? (t.pattern = Xn), v.init(e, t);
|
|
833
|
+
}), Pr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
834
|
+
t.pattern ?? (t.pattern = er(t)), v.init(e, t);
|
|
835
|
+
}), Tr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
836
|
+
t.pattern ?? (t.pattern = Ln), v.init(e, t);
|
|
837
|
+
}), Er = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
838
|
+
t.pattern ?? (t.pattern = Wn), v.init(e, t), e._zod.bag.format = "ipv4";
|
|
839
|
+
}), Nr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
|
|
840
|
+
t.pattern ?? (t.pattern = Kn), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
827
841
|
try {
|
|
828
842
|
new URL(`http://[${n.value}]`);
|
|
829
843
|
} catch {
|
|
@@ -836,21 +850,21 @@ const ir = {
|
|
|
836
850
|
});
|
|
837
851
|
}
|
|
838
852
|
};
|
|
839
|
-
}),
|
|
840
|
-
t.pattern ?? (t.pattern =
|
|
841
|
-
}),
|
|
842
|
-
t.pattern ?? (t.pattern =
|
|
853
|
+
}), Ir = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
|
|
854
|
+
t.pattern ?? (t.pattern = Hn), v.init(e, t);
|
|
855
|
+
}), Rr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
|
|
856
|
+
t.pattern ?? (t.pattern = Gn), v.init(e, t), e._zod.check = (n) => {
|
|
843
857
|
const r = n.value.split("/");
|
|
844
858
|
try {
|
|
845
859
|
if (r.length !== 2)
|
|
846
860
|
throw new Error();
|
|
847
|
-
const [o,
|
|
848
|
-
if (!
|
|
861
|
+
const [o, i] = r;
|
|
862
|
+
if (!i)
|
|
849
863
|
throw new Error();
|
|
850
|
-
const
|
|
851
|
-
if (`${
|
|
864
|
+
const s = Number(i);
|
|
865
|
+
if (`${s}` !== i)
|
|
852
866
|
throw new Error();
|
|
853
|
-
if (
|
|
867
|
+
if (s < 0 || s > 128)
|
|
854
868
|
throw new Error();
|
|
855
869
|
new URL(`http://[${o}]`);
|
|
856
870
|
} catch {
|
|
@@ -864,7 +878,7 @@ const ir = {
|
|
|
864
878
|
}
|
|
865
879
|
};
|
|
866
880
|
});
|
|
867
|
-
function
|
|
881
|
+
function st(e) {
|
|
868
882
|
if (e === "")
|
|
869
883
|
return !0;
|
|
870
884
|
if (e.length % 4 !== 0)
|
|
@@ -875,11 +889,9 @@ function et(e) {
|
|
|
875
889
|
return !1;
|
|
876
890
|
}
|
|
877
891
|
}
|
|
878
|
-
const
|
|
879
|
-
t.pattern ?? (t.pattern =
|
|
880
|
-
n.
|
|
881
|
-
}), e._zod.check = (n) => {
|
|
882
|
-
et(n.value) || n.issues.push({
|
|
892
|
+
const Ar = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
893
|
+
t.pattern ?? (t.pattern = Yn), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
894
|
+
st(n.value) || n.issues.push({
|
|
883
895
|
code: "invalid_format",
|
|
884
896
|
format: "base64",
|
|
885
897
|
input: n.value,
|
|
@@ -888,17 +900,15 @@ const $r = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
|
|
|
888
900
|
});
|
|
889
901
|
};
|
|
890
902
|
});
|
|
891
|
-
function
|
|
892
|
-
if (!
|
|
903
|
+
function Dr(e) {
|
|
904
|
+
if (!nt.test(e))
|
|
893
905
|
return !1;
|
|
894
906
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
895
|
-
return
|
|
907
|
+
return st(n);
|
|
896
908
|
}
|
|
897
|
-
const
|
|
898
|
-
t.pattern ?? (t.pattern =
|
|
899
|
-
n.
|
|
900
|
-
}), e._zod.check = (n) => {
|
|
901
|
-
jr(n.value) || n.issues.push({
|
|
909
|
+
const Cr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
910
|
+
t.pattern ?? (t.pattern = nt), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
911
|
+
Dr(n.value) || n.issues.push({
|
|
902
912
|
code: "invalid_format",
|
|
903
913
|
format: "base64url",
|
|
904
914
|
input: n.value,
|
|
@@ -906,10 +916,10 @@ const Er = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
|
|
|
906
916
|
continue: !t.abort
|
|
907
917
|
});
|
|
908
918
|
};
|
|
909
|
-
}),
|
|
910
|
-
t.pattern ?? (t.pattern =
|
|
919
|
+
}), Ur = /* @__PURE__ */ u("$ZodE164", (e, t) => {
|
|
920
|
+
t.pattern ?? (t.pattern = Qn), v.init(e, t);
|
|
911
921
|
});
|
|
912
|
-
function
|
|
922
|
+
function Fr(e, t = null) {
|
|
913
923
|
try {
|
|
914
924
|
const n = e.split(".");
|
|
915
925
|
if (n.length !== 3)
|
|
@@ -923,9 +933,9 @@ function Tr(e, t = null) {
|
|
|
923
933
|
return !1;
|
|
924
934
|
}
|
|
925
935
|
}
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
|
|
936
|
+
const Jr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
937
|
+
v.init(e, t), e._zod.check = (n) => {
|
|
938
|
+
Fr(n.value, t.alg) || n.issues.push({
|
|
929
939
|
code: "invalid_format",
|
|
930
940
|
format: "jwt",
|
|
931
941
|
input: n.value,
|
|
@@ -933,21 +943,21 @@ const Ir = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
|
|
|
933
943
|
continue: !t.abort
|
|
934
944
|
});
|
|
935
945
|
};
|
|
936
|
-
}),
|
|
937
|
-
|
|
938
|
-
}),
|
|
939
|
-
|
|
946
|
+
}), Lr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
|
|
947
|
+
w.init(e, t), e._zod.parse = (n) => n;
|
|
948
|
+
}), Mr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
|
|
949
|
+
w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
940
950
|
expected: "never",
|
|
941
951
|
code: "invalid_type",
|
|
942
952
|
input: n.value,
|
|
943
953
|
inst: e
|
|
944
954
|
}), n);
|
|
945
955
|
});
|
|
946
|
-
function
|
|
947
|
-
e.issues.length && t.issues.push(...
|
|
956
|
+
function we(e, t, n) {
|
|
957
|
+
e.issues.length && t.issues.push(...Qe(n, e.issues)), t.value[n] = e.value;
|
|
948
958
|
}
|
|
949
|
-
const
|
|
950
|
-
|
|
959
|
+
const Br = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
960
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
951
961
|
const o = n.value;
|
|
952
962
|
if (!Array.isArray(o))
|
|
953
963
|
return n.issues.push({
|
|
@@ -957,26 +967,31 @@ const Sr = /* @__PURE__ */ c("$ZodArray", (e, t) => {
|
|
|
957
967
|
inst: e
|
|
958
968
|
}), n;
|
|
959
969
|
n.value = Array(o.length);
|
|
960
|
-
const
|
|
961
|
-
for (let
|
|
962
|
-
const
|
|
963
|
-
value:
|
|
970
|
+
const i = [];
|
|
971
|
+
for (let s = 0; s < o.length; s++) {
|
|
972
|
+
const a = o[s], l = t.element._zod.run({
|
|
973
|
+
value: a,
|
|
964
974
|
issues: []
|
|
965
975
|
}, r);
|
|
966
|
-
l instanceof Promise ?
|
|
976
|
+
l instanceof Promise ? i.push(l.then((d) => we(d, n, s))) : we(l, n, s);
|
|
967
977
|
}
|
|
968
|
-
return
|
|
978
|
+
return i.length ? Promise.all(i).then(() => n) : n;
|
|
969
979
|
};
|
|
970
980
|
});
|
|
971
|
-
function
|
|
972
|
-
|
|
981
|
+
function Q(e, t, n, r, o) {
|
|
982
|
+
if (e.issues.length) {
|
|
983
|
+
if (o && !(n in r))
|
|
984
|
+
return;
|
|
985
|
+
t.issues.push(...Qe(n, e.issues));
|
|
986
|
+
}
|
|
987
|
+
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
973
988
|
}
|
|
974
|
-
function
|
|
989
|
+
function it(e) {
|
|
975
990
|
const t = Object.keys(e.shape);
|
|
976
991
|
for (const r of t)
|
|
977
992
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
978
993
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
979
|
-
const n =
|
|
994
|
+
const n = gn(e.shape);
|
|
980
995
|
return {
|
|
981
996
|
...e,
|
|
982
997
|
keys: t,
|
|
@@ -985,186 +1000,203 @@ function tt(e) {
|
|
|
985
1000
|
optionalKeys: new Set(n)
|
|
986
1001
|
};
|
|
987
1002
|
}
|
|
988
|
-
function
|
|
989
|
-
const
|
|
990
|
-
for (const
|
|
991
|
-
if (
|
|
1003
|
+
function at(e, t, n, r, o, i) {
|
|
1004
|
+
const s = [], a = o.keySet, l = o.catchall._zod, d = l.def.type, f = l.optout === "optional";
|
|
1005
|
+
for (const g in t) {
|
|
1006
|
+
if (a.has(g))
|
|
992
1007
|
continue;
|
|
993
1008
|
if (d === "never") {
|
|
994
|
-
|
|
1009
|
+
s.push(g);
|
|
995
1010
|
continue;
|
|
996
1011
|
}
|
|
997
|
-
const
|
|
998
|
-
|
|
1012
|
+
const h = l.run({ value: t[g], issues: [] }, r);
|
|
1013
|
+
h instanceof Promise ? e.push(h.then((m) => Q(m, n, g, t, f))) : Q(h, n, g, t, f);
|
|
999
1014
|
}
|
|
1000
|
-
return
|
|
1015
|
+
return s.length && n.issues.push({
|
|
1001
1016
|
code: "unrecognized_keys",
|
|
1002
|
-
keys:
|
|
1017
|
+
keys: s,
|
|
1003
1018
|
input: t,
|
|
1004
|
-
inst:
|
|
1019
|
+
inst: i
|
|
1005
1020
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1006
1021
|
}
|
|
1007
|
-
const
|
|
1008
|
-
if (
|
|
1009
|
-
const
|
|
1022
|
+
const qr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
1023
|
+
if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1024
|
+
const a = t.shape;
|
|
1010
1025
|
Object.defineProperty(t, "shape", {
|
|
1011
1026
|
get: () => {
|
|
1012
|
-
const l = { ...
|
|
1027
|
+
const l = { ...a };
|
|
1013
1028
|
return Object.defineProperty(t, "shape", {
|
|
1014
1029
|
value: l
|
|
1015
1030
|
}), l;
|
|
1016
1031
|
}
|
|
1017
1032
|
});
|
|
1018
1033
|
}
|
|
1019
|
-
const r =
|
|
1020
|
-
|
|
1021
|
-
const
|
|
1022
|
-
for (const d in
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1034
|
+
const r = ue(() => it(t));
|
|
1035
|
+
_(e._zod, "propValues", () => {
|
|
1036
|
+
const a = t.shape, l = {};
|
|
1037
|
+
for (const d in a) {
|
|
1038
|
+
const f = a[d]._zod;
|
|
1039
|
+
if (f.values) {
|
|
1025
1040
|
l[d] ?? (l[d] = /* @__PURE__ */ new Set());
|
|
1026
|
-
for (const
|
|
1027
|
-
l[d].add(
|
|
1041
|
+
for (const g of f.values)
|
|
1042
|
+
l[d].add(g);
|
|
1028
1043
|
}
|
|
1029
1044
|
}
|
|
1030
1045
|
return l;
|
|
1031
1046
|
});
|
|
1032
|
-
const o =
|
|
1033
|
-
let
|
|
1034
|
-
e._zod.parse = (
|
|
1035
|
-
|
|
1036
|
-
const d =
|
|
1047
|
+
const o = Y, i = t.catchall;
|
|
1048
|
+
let s;
|
|
1049
|
+
e._zod.parse = (a, l) => {
|
|
1050
|
+
s ?? (s = r.value);
|
|
1051
|
+
const d = a.value;
|
|
1037
1052
|
if (!o(d))
|
|
1038
|
-
return
|
|
1053
|
+
return a.issues.push({
|
|
1039
1054
|
expected: "object",
|
|
1040
1055
|
code: "invalid_type",
|
|
1041
1056
|
input: d,
|
|
1042
1057
|
inst: e
|
|
1043
|
-
}),
|
|
1044
|
-
|
|
1045
|
-
const
|
|
1046
|
-
for (const
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1058
|
+
}), a;
|
|
1059
|
+
a.value = {};
|
|
1060
|
+
const f = [], g = s.shape;
|
|
1061
|
+
for (const h of s.keys) {
|
|
1062
|
+
const m = g[h], $ = m._zod.optout === "optional", b = m._zod.run({ value: d[h], issues: [] }, l);
|
|
1063
|
+
b instanceof Promise ? f.push(b.then((W) => Q(W, a, h, d, $))) : Q(b, a, h, d, $);
|
|
1049
1064
|
}
|
|
1050
|
-
return
|
|
1065
|
+
return i ? at(f, d, a, l, r.value, e) : f.length ? Promise.all(f).then(() => a) : a;
|
|
1051
1066
|
};
|
|
1052
|
-
}),
|
|
1053
|
-
|
|
1054
|
-
const n = e._zod.parse, r =
|
|
1055
|
-
const
|
|
1056
|
-
const
|
|
1057
|
-
return `shape[${
|
|
1067
|
+
}), Vr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1068
|
+
qr.init(e, t);
|
|
1069
|
+
const n = e._zod.parse, r = ue(() => it(t)), o = (h) => {
|
|
1070
|
+
const m = new mr(["shape", "payload", "ctx"]), $ = r.value, b = (P) => {
|
|
1071
|
+
const x = ve(P);
|
|
1072
|
+
return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
|
|
1058
1073
|
};
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
let
|
|
1062
|
-
for (const
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
for (const
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
if (${
|
|
1069
|
-
|
|
1074
|
+
m.write("const input = payload.value;");
|
|
1075
|
+
const W = /* @__PURE__ */ Object.create(null);
|
|
1076
|
+
let kt = 0;
|
|
1077
|
+
for (const P of $.keys)
|
|
1078
|
+
W[P] = `key_${kt++}`;
|
|
1079
|
+
m.write("const newResult = {};");
|
|
1080
|
+
for (const P of $.keys) {
|
|
1081
|
+
const x = W[P], O = ve(P), jt = h[P]?._zod?.optout === "optional";
|
|
1082
|
+
m.write(`const ${x} = ${b(P)};`), jt ? m.write(`
|
|
1083
|
+
if (${x}.issues.length) {
|
|
1084
|
+
if (${O} in input) {
|
|
1085
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1086
|
+
...iss,
|
|
1087
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
1088
|
+
})));
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
if (${x}.value === undefined) {
|
|
1093
|
+
if (${O} in input) {
|
|
1094
|
+
newResult[${O}] = undefined;
|
|
1095
|
+
}
|
|
1096
|
+
} else {
|
|
1097
|
+
newResult[${O}] = ${x}.value;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
`) : m.write(`
|
|
1101
|
+
if (${x}.issues.length) {
|
|
1102
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1070
1103
|
...iss,
|
|
1071
|
-
path: iss.path ? [${
|
|
1104
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
1072
1105
|
})));
|
|
1073
1106
|
}
|
|
1074
1107
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
newResult[${R}] = undefined;
|
|
1108
|
+
if (${x}.value === undefined) {
|
|
1109
|
+
if (${O} in input) {
|
|
1110
|
+
newResult[${O}] = undefined;
|
|
1079
1111
|
}
|
|
1080
1112
|
} else {
|
|
1081
|
-
newResult[${
|
|
1113
|
+
newResult[${O}] = ${x}.value;
|
|
1082
1114
|
}
|
|
1083
1115
|
|
|
1084
1116
|
`);
|
|
1085
1117
|
}
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
return (
|
|
1118
|
+
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1119
|
+
const $t = m.compile();
|
|
1120
|
+
return (P, x) => $t(h, P, x);
|
|
1089
1121
|
};
|
|
1090
|
-
let
|
|
1091
|
-
const
|
|
1092
|
-
let
|
|
1093
|
-
e._zod.parse = (
|
|
1094
|
-
|
|
1095
|
-
const
|
|
1096
|
-
return
|
|
1122
|
+
let i;
|
|
1123
|
+
const s = Y, a = !Ke.jitless, d = a && hn.value, f = t.catchall;
|
|
1124
|
+
let g;
|
|
1125
|
+
e._zod.parse = (h, m) => {
|
|
1126
|
+
g ?? (g = r.value);
|
|
1127
|
+
const $ = h.value;
|
|
1128
|
+
return s($) ? a && d && m?.async === !1 && m.jitless !== !0 ? (i || (i = o(t.shape)), h = i(h, m), f ? at([], $, h, m, g, e) : h) : n(h, m) : (h.issues.push({
|
|
1097
1129
|
expected: "object",
|
|
1098
1130
|
code: "invalid_type",
|
|
1099
|
-
input:
|
|
1131
|
+
input: $,
|
|
1100
1132
|
inst: e
|
|
1101
|
-
}),
|
|
1133
|
+
}), h);
|
|
1102
1134
|
};
|
|
1103
1135
|
});
|
|
1104
|
-
function
|
|
1105
|
-
for (const
|
|
1106
|
-
if (
|
|
1107
|
-
return t.value =
|
|
1108
|
-
const o = e.filter((
|
|
1136
|
+
function ze(e, t, n, r) {
|
|
1137
|
+
for (const i of e)
|
|
1138
|
+
if (i.issues.length === 0)
|
|
1139
|
+
return t.value = i.value, t;
|
|
1140
|
+
const o = e.filter((i) => !U(i));
|
|
1109
1141
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
1110
1142
|
code: "invalid_union",
|
|
1111
1143
|
input: t.value,
|
|
1112
1144
|
inst: n,
|
|
1113
|
-
errors: e.map((
|
|
1145
|
+
errors: e.map((i) => i.issues.map((s) => D(s, r, A())))
|
|
1114
1146
|
}), t);
|
|
1115
1147
|
}
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1148
|
+
const Wr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1149
|
+
w.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
|
|
1118
1150
|
if (t.options.every((o) => o._zod.values))
|
|
1119
1151
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1120
|
-
}),
|
|
1152
|
+
}), _(e._zod, "pattern", () => {
|
|
1121
1153
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
1122
|
-
const o = t.options.map((
|
|
1123
|
-
return new RegExp(`^(${o.map((
|
|
1154
|
+
const o = t.options.map((i) => i._zod.pattern);
|
|
1155
|
+
return new RegExp(`^(${o.map((i) => de(i.source)).join("|")})$`);
|
|
1124
1156
|
}
|
|
1125
1157
|
});
|
|
1126
1158
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
1127
|
-
e._zod.parse = (o,
|
|
1159
|
+
e._zod.parse = (o, i) => {
|
|
1128
1160
|
if (n)
|
|
1129
|
-
return r(o,
|
|
1130
|
-
let
|
|
1131
|
-
const
|
|
1161
|
+
return r(o, i);
|
|
1162
|
+
let s = !1;
|
|
1163
|
+
const a = [];
|
|
1132
1164
|
for (const l of t.options) {
|
|
1133
1165
|
const d = l._zod.run({
|
|
1134
1166
|
value: o.value,
|
|
1135
1167
|
issues: []
|
|
1136
|
-
},
|
|
1168
|
+
}, i);
|
|
1137
1169
|
if (d instanceof Promise)
|
|
1138
|
-
|
|
1170
|
+
a.push(d), s = !0;
|
|
1139
1171
|
else {
|
|
1140
1172
|
if (d.issues.length === 0)
|
|
1141
1173
|
return d;
|
|
1142
|
-
|
|
1174
|
+
a.push(d);
|
|
1143
1175
|
}
|
|
1144
1176
|
}
|
|
1145
|
-
return
|
|
1177
|
+
return s ? Promise.all(a).then((l) => ze(l, o, e, i)) : ze(a, o, e, i);
|
|
1146
1178
|
};
|
|
1147
|
-
}),
|
|
1148
|
-
|
|
1149
|
-
const o = n.value,
|
|
1150
|
-
return
|
|
1179
|
+
}), Kr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1180
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1181
|
+
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1182
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([l, d]) => be(n, l, d)) : be(n, i, s);
|
|
1151
1183
|
};
|
|
1152
1184
|
});
|
|
1153
|
-
function
|
|
1185
|
+
function ae(e, t) {
|
|
1154
1186
|
if (e === t)
|
|
1155
1187
|
return { valid: !0, data: e };
|
|
1156
1188
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1157
1189
|
return { valid: !0, data: e };
|
|
1158
|
-
if (
|
|
1159
|
-
const n = Object.keys(t), r = Object.keys(e).filter((
|
|
1160
|
-
for (const
|
|
1161
|
-
const
|
|
1162
|
-
if (!
|
|
1190
|
+
if (M(e) && M(t)) {
|
|
1191
|
+
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
1192
|
+
for (const i of r) {
|
|
1193
|
+
const s = ae(e[i], t[i]);
|
|
1194
|
+
if (!s.valid)
|
|
1163
1195
|
return {
|
|
1164
1196
|
valid: !1,
|
|
1165
|
-
mergeErrorPath: [
|
|
1197
|
+
mergeErrorPath: [i, ...s.mergeErrorPath]
|
|
1166
1198
|
};
|
|
1167
|
-
o[
|
|
1199
|
+
o[i] = s.data;
|
|
1168
1200
|
}
|
|
1169
1201
|
return { valid: !0, data: o };
|
|
1170
1202
|
}
|
|
@@ -1173,94 +1205,112 @@ function re(e, t) {
|
|
|
1173
1205
|
return { valid: !1, mergeErrorPath: [] };
|
|
1174
1206
|
const n = [];
|
|
1175
1207
|
for (let r = 0; r < e.length; r++) {
|
|
1176
|
-
const o = e[r],
|
|
1177
|
-
if (!
|
|
1208
|
+
const o = e[r], i = t[r], s = ae(o, i);
|
|
1209
|
+
if (!s.valid)
|
|
1178
1210
|
return {
|
|
1179
1211
|
valid: !1,
|
|
1180
|
-
mergeErrorPath: [r, ...
|
|
1212
|
+
mergeErrorPath: [r, ...s.mergeErrorPath]
|
|
1181
1213
|
};
|
|
1182
|
-
n.push(
|
|
1214
|
+
n.push(s.data);
|
|
1183
1215
|
}
|
|
1184
1216
|
return { valid: !0, data: n };
|
|
1185
1217
|
}
|
|
1186
1218
|
return { valid: !1, mergeErrorPath: [] };
|
|
1187
1219
|
}
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1220
|
+
function be(e, t, n) {
|
|
1221
|
+
const r = /* @__PURE__ */ new Map();
|
|
1222
|
+
let o;
|
|
1223
|
+
for (const a of t.issues)
|
|
1224
|
+
if (a.code === "unrecognized_keys") {
|
|
1225
|
+
o ?? (o = a);
|
|
1226
|
+
for (const l of a.keys)
|
|
1227
|
+
r.has(l) || r.set(l, {}), r.get(l).l = !0;
|
|
1228
|
+
} else
|
|
1229
|
+
e.issues.push(a);
|
|
1230
|
+
for (const a of n.issues)
|
|
1231
|
+
if (a.code === "unrecognized_keys")
|
|
1232
|
+
for (const l of a.keys)
|
|
1233
|
+
r.has(l) || r.set(l, {}), r.get(l).r = !0;
|
|
1234
|
+
else
|
|
1235
|
+
e.issues.push(a);
|
|
1236
|
+
const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
1237
|
+
if (i.length && o && e.issues.push({ ...o, keys: i }), U(e))
|
|
1190
1238
|
return e;
|
|
1191
|
-
const
|
|
1192
|
-
if (!
|
|
1193
|
-
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(
|
|
1194
|
-
return e.value =
|
|
1195
|
-
}
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
const n =
|
|
1199
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
1200
|
-
const
|
|
1201
|
-
return r.has(
|
|
1239
|
+
const s = ae(t.value, n.value);
|
|
1240
|
+
if (!s.valid)
|
|
1241
|
+
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
1242
|
+
return e.value = s.data, e;
|
|
1243
|
+
}
|
|
1244
|
+
const Hr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1245
|
+
w.init(e, t);
|
|
1246
|
+
const n = He(t.entries), r = new Set(n);
|
|
1247
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => mn.has(typeof o)).map((o) => typeof o == "string" ? ne(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
1248
|
+
const s = o.value;
|
|
1249
|
+
return r.has(s) || o.issues.push({
|
|
1202
1250
|
code: "invalid_value",
|
|
1203
1251
|
values: n,
|
|
1204
|
-
input:
|
|
1252
|
+
input: s,
|
|
1205
1253
|
inst: e
|
|
1206
1254
|
}), o;
|
|
1207
1255
|
};
|
|
1208
|
-
}),
|
|
1209
|
-
|
|
1256
|
+
}), Gr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
1257
|
+
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1210
1258
|
if (r.direction === "backward")
|
|
1211
|
-
throw new
|
|
1259
|
+
throw new We(e.constructor.name);
|
|
1212
1260
|
const o = t.transform(n.value, n);
|
|
1213
1261
|
if (r.async)
|
|
1214
|
-
return (o instanceof Promise ? o : Promise.resolve(o)).then((
|
|
1262
|
+
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
1215
1263
|
if (o instanceof Promise)
|
|
1216
|
-
throw new
|
|
1264
|
+
throw new F();
|
|
1217
1265
|
return n.value = o, n;
|
|
1218
1266
|
};
|
|
1219
1267
|
});
|
|
1220
|
-
function
|
|
1268
|
+
function ke(e, t) {
|
|
1221
1269
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
1222
1270
|
}
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1271
|
+
const ct = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
1272
|
+
w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
|
|
1225
1273
|
const n = t.innerType._zod.pattern;
|
|
1226
|
-
return n ? new RegExp(`^(${
|
|
1274
|
+
return n ? new RegExp(`^(${de(n.source)})?$`) : void 0;
|
|
1227
1275
|
}), e._zod.parse = (n, r) => {
|
|
1228
1276
|
if (t.innerType._zod.optin === "optional") {
|
|
1229
1277
|
const o = t.innerType._zod.run(n, r);
|
|
1230
|
-
return o instanceof Promise ? o.then((
|
|
1278
|
+
return o instanceof Promise ? o.then((i) => ke(i, n.value)) : ke(o, n.value);
|
|
1231
1279
|
}
|
|
1232
1280
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1233
1281
|
};
|
|
1234
|
-
}),
|
|
1235
|
-
|
|
1282
|
+
}), Yr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
|
|
1283
|
+
ct.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
1284
|
+
}), Qr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1285
|
+
w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
|
|
1236
1286
|
const n = t.innerType._zod.pattern;
|
|
1237
|
-
return n ? new RegExp(`^(${
|
|
1238
|
-
}),
|
|
1239
|
-
}),
|
|
1240
|
-
|
|
1287
|
+
return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
|
|
1288
|
+
}), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
1289
|
+
}), Xr = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
1290
|
+
w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1241
1291
|
if (r.direction === "backward")
|
|
1242
1292
|
return t.innerType._zod.run(n, r);
|
|
1243
1293
|
if (n.value === void 0)
|
|
1244
1294
|
return n.value = t.defaultValue, n;
|
|
1245
1295
|
const o = t.innerType._zod.run(n, r);
|
|
1246
|
-
return o instanceof Promise ? o.then((
|
|
1296
|
+
return o instanceof Promise ? o.then((i) => $e(i, t)) : $e(o, t);
|
|
1247
1297
|
};
|
|
1248
1298
|
});
|
|
1249
|
-
function
|
|
1299
|
+
function $e(e, t) {
|
|
1250
1300
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1251
1301
|
}
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1254
|
-
}),
|
|
1255
|
-
|
|
1302
|
+
const eo = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1303
|
+
w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
1304
|
+
}), to = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1305
|
+
w.init(e, t), _(e._zod, "values", () => {
|
|
1256
1306
|
const n = t.innerType._zod.values;
|
|
1257
1307
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
1258
1308
|
}), e._zod.parse = (n, r) => {
|
|
1259
1309
|
const o = t.innerType._zod.run(n, r);
|
|
1260
|
-
return o instanceof Promise ? o.then((
|
|
1310
|
+
return o instanceof Promise ? o.then((i) => je(i, e)) : je(o, e);
|
|
1261
1311
|
};
|
|
1262
1312
|
});
|
|
1263
|
-
function
|
|
1313
|
+
function je(e, t) {
|
|
1264
1314
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1265
1315
|
code: "invalid_type",
|
|
1266
1316
|
expected: "nonoptional",
|
|
@@ -1268,58 +1318,58 @@ function ye(e, t) {
|
|
|
1268
1318
|
inst: t
|
|
1269
1319
|
}), e;
|
|
1270
1320
|
}
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1321
|
+
const no = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1322
|
+
w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1273
1323
|
if (r.direction === "backward")
|
|
1274
1324
|
return t.innerType._zod.run(n, r);
|
|
1275
1325
|
const o = t.innerType._zod.run(n, r);
|
|
1276
|
-
return o instanceof Promise ? o.then((
|
|
1326
|
+
return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
|
|
1277
1327
|
...n,
|
|
1278
1328
|
error: {
|
|
1279
|
-
issues:
|
|
1329
|
+
issues: i.issues.map((s) => D(s, r, A()))
|
|
1280
1330
|
},
|
|
1281
1331
|
input: n.value
|
|
1282
1332
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
1283
1333
|
...n,
|
|
1284
1334
|
error: {
|
|
1285
|
-
issues: o.issues.map((
|
|
1335
|
+
issues: o.issues.map((i) => D(i, r, A()))
|
|
1286
1336
|
},
|
|
1287
1337
|
input: n.value
|
|
1288
1338
|
}), n.issues = []), n);
|
|
1289
1339
|
};
|
|
1290
|
-
}),
|
|
1291
|
-
|
|
1340
|
+
}), ro = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1341
|
+
w.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
1292
1342
|
if (r.direction === "backward") {
|
|
1293
|
-
const
|
|
1294
|
-
return
|
|
1343
|
+
const i = t.out._zod.run(n, r);
|
|
1344
|
+
return i instanceof Promise ? i.then((s) => H(s, t.in, r)) : H(i, t.in, r);
|
|
1295
1345
|
}
|
|
1296
1346
|
const o = t.in._zod.run(n, r);
|
|
1297
|
-
return o instanceof Promise ? o.then((
|
|
1347
|
+
return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
|
|
1298
1348
|
};
|
|
1299
1349
|
});
|
|
1300
|
-
function
|
|
1350
|
+
function H(e, t, n) {
|
|
1301
1351
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1302
1352
|
}
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1353
|
+
const oo = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1354
|
+
w.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
1305
1355
|
if (r.direction === "backward")
|
|
1306
1356
|
return t.innerType._zod.run(n, r);
|
|
1307
1357
|
const o = t.innerType._zod.run(n, r);
|
|
1308
|
-
return o instanceof Promise ? o.then(
|
|
1358
|
+
return o instanceof Promise ? o.then(xe) : xe(o);
|
|
1309
1359
|
};
|
|
1310
1360
|
});
|
|
1311
|
-
function
|
|
1361
|
+
function xe(e) {
|
|
1312
1362
|
return e.value = Object.freeze(e.value), e;
|
|
1313
1363
|
}
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1364
|
+
const so = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1365
|
+
E.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1316
1366
|
const r = n.value, o = t.fn(r);
|
|
1317
1367
|
if (o instanceof Promise)
|
|
1318
|
-
return o.then((
|
|
1319
|
-
|
|
1368
|
+
return o.then((i) => Ze(i, n, r, e));
|
|
1369
|
+
Ze(o, n, r, e);
|
|
1320
1370
|
};
|
|
1321
1371
|
});
|
|
1322
|
-
function
|
|
1372
|
+
function Ze(e, t, n, r) {
|
|
1323
1373
|
if (!e) {
|
|
1324
1374
|
const o = {
|
|
1325
1375
|
code: "custom",
|
|
@@ -1331,21 +1381,17 @@ function xe(e, t, n, r) {
|
|
|
1331
1381
|
continue: !r._zod.def.abort
|
|
1332
1382
|
// params: inst._zod.def.params,
|
|
1333
1383
|
};
|
|
1334
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
1384
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(B(o));
|
|
1335
1385
|
}
|
|
1336
1386
|
}
|
|
1337
|
-
|
|
1387
|
+
var Oe;
|
|
1388
|
+
class io {
|
|
1338
1389
|
constructor() {
|
|
1339
1390
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1340
1391
|
}
|
|
1341
1392
|
add(t, ...n) {
|
|
1342
1393
|
const r = n[0];
|
|
1343
|
-
|
|
1344
|
-
if (this._idmap.has(r.id))
|
|
1345
|
-
throw new Error(`ID ${r.id} already exists in the registry`);
|
|
1346
|
-
this._idmap.set(r.id, t);
|
|
1347
|
-
}
|
|
1348
|
-
return this;
|
|
1394
|
+
return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
|
|
1349
1395
|
}
|
|
1350
1396
|
clear() {
|
|
1351
1397
|
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
@@ -1368,218 +1414,243 @@ class Gr {
|
|
|
1368
1414
|
return this._map.has(t);
|
|
1369
1415
|
}
|
|
1370
1416
|
}
|
|
1371
|
-
function
|
|
1372
|
-
return new
|
|
1417
|
+
function ao() {
|
|
1418
|
+
return new io();
|
|
1373
1419
|
}
|
|
1374
|
-
|
|
1375
|
-
|
|
1420
|
+
(Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = ao());
|
|
1421
|
+
const L = globalThis.__zod_globalRegistry;
|
|
1422
|
+
// @__NO_SIDE_EFFECTS__
|
|
1423
|
+
function co(e, t) {
|
|
1376
1424
|
return new e({
|
|
1377
1425
|
type: "string",
|
|
1378
|
-
...
|
|
1426
|
+
...p(t)
|
|
1379
1427
|
});
|
|
1380
1428
|
}
|
|
1381
|
-
|
|
1429
|
+
// @__NO_SIDE_EFFECTS__
|
|
1430
|
+
function uo(e, t) {
|
|
1382
1431
|
return new e({
|
|
1383
1432
|
type: "string",
|
|
1384
1433
|
format: "email",
|
|
1385
1434
|
check: "string_format",
|
|
1386
1435
|
abort: !1,
|
|
1387
|
-
...
|
|
1436
|
+
...p(t)
|
|
1388
1437
|
});
|
|
1389
1438
|
}
|
|
1390
|
-
|
|
1439
|
+
// @__NO_SIDE_EFFECTS__
|
|
1440
|
+
function Se(e, t) {
|
|
1391
1441
|
return new e({
|
|
1392
1442
|
type: "string",
|
|
1393
1443
|
format: "guid",
|
|
1394
1444
|
check: "string_format",
|
|
1395
1445
|
abort: !1,
|
|
1396
|
-
...
|
|
1446
|
+
...p(t)
|
|
1397
1447
|
});
|
|
1398
1448
|
}
|
|
1399
|
-
|
|
1449
|
+
// @__NO_SIDE_EFFECTS__
|
|
1450
|
+
function lo(e, t) {
|
|
1400
1451
|
return new e({
|
|
1401
1452
|
type: "string",
|
|
1402
1453
|
format: "uuid",
|
|
1403
1454
|
check: "string_format",
|
|
1404
1455
|
abort: !1,
|
|
1405
|
-
...
|
|
1456
|
+
...p(t)
|
|
1406
1457
|
});
|
|
1407
1458
|
}
|
|
1408
|
-
|
|
1459
|
+
// @__NO_SIDE_EFFECTS__
|
|
1460
|
+
function fo(e, t) {
|
|
1409
1461
|
return new e({
|
|
1410
1462
|
type: "string",
|
|
1411
1463
|
format: "uuid",
|
|
1412
1464
|
check: "string_format",
|
|
1413
1465
|
abort: !1,
|
|
1414
1466
|
version: "v4",
|
|
1415
|
-
...
|
|
1467
|
+
...p(t)
|
|
1416
1468
|
});
|
|
1417
1469
|
}
|
|
1418
|
-
|
|
1470
|
+
// @__NO_SIDE_EFFECTS__
|
|
1471
|
+
function po(e, t) {
|
|
1419
1472
|
return new e({
|
|
1420
1473
|
type: "string",
|
|
1421
1474
|
format: "uuid",
|
|
1422
1475
|
check: "string_format",
|
|
1423
1476
|
abort: !1,
|
|
1424
1477
|
version: "v6",
|
|
1425
|
-
...
|
|
1478
|
+
...p(t)
|
|
1426
1479
|
});
|
|
1427
1480
|
}
|
|
1428
|
-
|
|
1481
|
+
// @__NO_SIDE_EFFECTS__
|
|
1482
|
+
function ho(e, t) {
|
|
1429
1483
|
return new e({
|
|
1430
1484
|
type: "string",
|
|
1431
1485
|
format: "uuid",
|
|
1432
1486
|
check: "string_format",
|
|
1433
1487
|
abort: !1,
|
|
1434
1488
|
version: "v7",
|
|
1435
|
-
...
|
|
1489
|
+
...p(t)
|
|
1436
1490
|
});
|
|
1437
1491
|
}
|
|
1438
|
-
|
|
1492
|
+
// @__NO_SIDE_EFFECTS__
|
|
1493
|
+
function mo(e, t) {
|
|
1439
1494
|
return new e({
|
|
1440
1495
|
type: "string",
|
|
1441
1496
|
format: "url",
|
|
1442
1497
|
check: "string_format",
|
|
1443
1498
|
abort: !1,
|
|
1444
|
-
...
|
|
1499
|
+
...p(t)
|
|
1445
1500
|
});
|
|
1446
1501
|
}
|
|
1447
|
-
|
|
1502
|
+
// @__NO_SIDE_EFFECTS__
|
|
1503
|
+
function go(e, t) {
|
|
1448
1504
|
return new e({
|
|
1449
1505
|
type: "string",
|
|
1450
1506
|
format: "emoji",
|
|
1451
1507
|
check: "string_format",
|
|
1452
1508
|
abort: !1,
|
|
1453
|
-
...
|
|
1509
|
+
...p(t)
|
|
1454
1510
|
});
|
|
1455
1511
|
}
|
|
1456
|
-
|
|
1512
|
+
// @__NO_SIDE_EFFECTS__
|
|
1513
|
+
function _o(e, t) {
|
|
1457
1514
|
return new e({
|
|
1458
1515
|
type: "string",
|
|
1459
1516
|
format: "nanoid",
|
|
1460
1517
|
check: "string_format",
|
|
1461
1518
|
abort: !1,
|
|
1462
|
-
...
|
|
1519
|
+
...p(t)
|
|
1463
1520
|
});
|
|
1464
1521
|
}
|
|
1465
|
-
|
|
1522
|
+
// @__NO_SIDE_EFFECTS__
|
|
1523
|
+
function vo(e, t) {
|
|
1466
1524
|
return new e({
|
|
1467
1525
|
type: "string",
|
|
1468
1526
|
format: "cuid",
|
|
1469
1527
|
check: "string_format",
|
|
1470
1528
|
abort: !1,
|
|
1471
|
-
...
|
|
1529
|
+
...p(t)
|
|
1472
1530
|
});
|
|
1473
1531
|
}
|
|
1474
|
-
|
|
1532
|
+
// @__NO_SIDE_EFFECTS__
|
|
1533
|
+
function yo(e, t) {
|
|
1475
1534
|
return new e({
|
|
1476
1535
|
type: "string",
|
|
1477
1536
|
format: "cuid2",
|
|
1478
1537
|
check: "string_format",
|
|
1479
1538
|
abort: !1,
|
|
1480
|
-
...
|
|
1539
|
+
...p(t)
|
|
1481
1540
|
});
|
|
1482
1541
|
}
|
|
1483
|
-
|
|
1542
|
+
// @__NO_SIDE_EFFECTS__
|
|
1543
|
+
function wo(e, t) {
|
|
1484
1544
|
return new e({
|
|
1485
1545
|
type: "string",
|
|
1486
1546
|
format: "ulid",
|
|
1487
1547
|
check: "string_format",
|
|
1488
1548
|
abort: !1,
|
|
1489
|
-
...
|
|
1549
|
+
...p(t)
|
|
1490
1550
|
});
|
|
1491
1551
|
}
|
|
1492
|
-
|
|
1552
|
+
// @__NO_SIDE_EFFECTS__
|
|
1553
|
+
function zo(e, t) {
|
|
1493
1554
|
return new e({
|
|
1494
1555
|
type: "string",
|
|
1495
1556
|
format: "xid",
|
|
1496
1557
|
check: "string_format",
|
|
1497
1558
|
abort: !1,
|
|
1498
|
-
...
|
|
1559
|
+
...p(t)
|
|
1499
1560
|
});
|
|
1500
1561
|
}
|
|
1501
|
-
|
|
1562
|
+
// @__NO_SIDE_EFFECTS__
|
|
1563
|
+
function bo(e, t) {
|
|
1502
1564
|
return new e({
|
|
1503
1565
|
type: "string",
|
|
1504
1566
|
format: "ksuid",
|
|
1505
1567
|
check: "string_format",
|
|
1506
1568
|
abort: !1,
|
|
1507
|
-
...
|
|
1569
|
+
...p(t)
|
|
1508
1570
|
});
|
|
1509
1571
|
}
|
|
1510
|
-
|
|
1572
|
+
// @__NO_SIDE_EFFECTS__
|
|
1573
|
+
function ko(e, t) {
|
|
1511
1574
|
return new e({
|
|
1512
1575
|
type: "string",
|
|
1513
1576
|
format: "ipv4",
|
|
1514
1577
|
check: "string_format",
|
|
1515
1578
|
abort: !1,
|
|
1516
|
-
...
|
|
1579
|
+
...p(t)
|
|
1517
1580
|
});
|
|
1518
1581
|
}
|
|
1519
|
-
|
|
1582
|
+
// @__NO_SIDE_EFFECTS__
|
|
1583
|
+
function $o(e, t) {
|
|
1520
1584
|
return new e({
|
|
1521
1585
|
type: "string",
|
|
1522
1586
|
format: "ipv6",
|
|
1523
1587
|
check: "string_format",
|
|
1524
1588
|
abort: !1,
|
|
1525
|
-
...
|
|
1589
|
+
...p(t)
|
|
1526
1590
|
});
|
|
1527
1591
|
}
|
|
1528
|
-
|
|
1592
|
+
// @__NO_SIDE_EFFECTS__
|
|
1593
|
+
function jo(e, t) {
|
|
1529
1594
|
return new e({
|
|
1530
1595
|
type: "string",
|
|
1531
1596
|
format: "cidrv4",
|
|
1532
1597
|
check: "string_format",
|
|
1533
1598
|
abort: !1,
|
|
1534
|
-
...
|
|
1599
|
+
...p(t)
|
|
1535
1600
|
});
|
|
1536
1601
|
}
|
|
1537
|
-
|
|
1602
|
+
// @__NO_SIDE_EFFECTS__
|
|
1603
|
+
function xo(e, t) {
|
|
1538
1604
|
return new e({
|
|
1539
1605
|
type: "string",
|
|
1540
1606
|
format: "cidrv6",
|
|
1541
1607
|
check: "string_format",
|
|
1542
1608
|
abort: !1,
|
|
1543
|
-
...
|
|
1609
|
+
...p(t)
|
|
1544
1610
|
});
|
|
1545
1611
|
}
|
|
1546
|
-
|
|
1612
|
+
// @__NO_SIDE_EFFECTS__
|
|
1613
|
+
function Zo(e, t) {
|
|
1547
1614
|
return new e({
|
|
1548
1615
|
type: "string",
|
|
1549
1616
|
format: "base64",
|
|
1550
1617
|
check: "string_format",
|
|
1551
1618
|
abort: !1,
|
|
1552
|
-
...
|
|
1619
|
+
...p(t)
|
|
1553
1620
|
});
|
|
1554
1621
|
}
|
|
1555
|
-
|
|
1622
|
+
// @__NO_SIDE_EFFECTS__
|
|
1623
|
+
function Oo(e, t) {
|
|
1556
1624
|
return new e({
|
|
1557
1625
|
type: "string",
|
|
1558
1626
|
format: "base64url",
|
|
1559
1627
|
check: "string_format",
|
|
1560
1628
|
abort: !1,
|
|
1561
|
-
...
|
|
1629
|
+
...p(t)
|
|
1562
1630
|
});
|
|
1563
1631
|
}
|
|
1564
|
-
|
|
1632
|
+
// @__NO_SIDE_EFFECTS__
|
|
1633
|
+
function So(e, t) {
|
|
1565
1634
|
return new e({
|
|
1566
1635
|
type: "string",
|
|
1567
1636
|
format: "e164",
|
|
1568
1637
|
check: "string_format",
|
|
1569
1638
|
abort: !1,
|
|
1570
|
-
...
|
|
1639
|
+
...p(t)
|
|
1571
1640
|
});
|
|
1572
1641
|
}
|
|
1573
|
-
|
|
1642
|
+
// @__NO_SIDE_EFFECTS__
|
|
1643
|
+
function Po(e, t) {
|
|
1574
1644
|
return new e({
|
|
1575
1645
|
type: "string",
|
|
1576
1646
|
format: "jwt",
|
|
1577
1647
|
check: "string_format",
|
|
1578
1648
|
abort: !1,
|
|
1579
|
-
...
|
|
1649
|
+
...p(t)
|
|
1580
1650
|
});
|
|
1581
1651
|
}
|
|
1582
|
-
|
|
1652
|
+
// @__NO_SIDE_EFFECTS__
|
|
1653
|
+
function To(e, t) {
|
|
1583
1654
|
return new e({
|
|
1584
1655
|
type: "string",
|
|
1585
1656
|
format: "datetime",
|
|
@@ -1587,209 +1658,584 @@ function bo(e, t) {
|
|
|
1587
1658
|
offset: !1,
|
|
1588
1659
|
local: !1,
|
|
1589
1660
|
precision: null,
|
|
1590
|
-
...
|
|
1661
|
+
...p(t)
|
|
1591
1662
|
});
|
|
1592
1663
|
}
|
|
1593
|
-
|
|
1664
|
+
// @__NO_SIDE_EFFECTS__
|
|
1665
|
+
function Eo(e, t) {
|
|
1594
1666
|
return new e({
|
|
1595
1667
|
type: "string",
|
|
1596
1668
|
format: "date",
|
|
1597
1669
|
check: "string_format",
|
|
1598
|
-
...
|
|
1670
|
+
...p(t)
|
|
1599
1671
|
});
|
|
1600
1672
|
}
|
|
1601
|
-
|
|
1673
|
+
// @__NO_SIDE_EFFECTS__
|
|
1674
|
+
function No(e, t) {
|
|
1602
1675
|
return new e({
|
|
1603
1676
|
type: "string",
|
|
1604
1677
|
format: "time",
|
|
1605
1678
|
check: "string_format",
|
|
1606
1679
|
precision: null,
|
|
1607
|
-
...
|
|
1680
|
+
...p(t)
|
|
1608
1681
|
});
|
|
1609
1682
|
}
|
|
1610
|
-
|
|
1683
|
+
// @__NO_SIDE_EFFECTS__
|
|
1684
|
+
function Io(e, t) {
|
|
1611
1685
|
return new e({
|
|
1612
1686
|
type: "string",
|
|
1613
1687
|
format: "duration",
|
|
1614
1688
|
check: "string_format",
|
|
1615
|
-
...
|
|
1689
|
+
...p(t)
|
|
1616
1690
|
});
|
|
1617
1691
|
}
|
|
1618
|
-
|
|
1692
|
+
// @__NO_SIDE_EFFECTS__
|
|
1693
|
+
function Ro(e) {
|
|
1619
1694
|
return new e({
|
|
1620
1695
|
type: "unknown"
|
|
1621
1696
|
});
|
|
1622
1697
|
}
|
|
1623
|
-
|
|
1698
|
+
// @__NO_SIDE_EFFECTS__
|
|
1699
|
+
function Ao(e, t) {
|
|
1624
1700
|
return new e({
|
|
1625
1701
|
type: "never",
|
|
1626
|
-
...
|
|
1702
|
+
...p(t)
|
|
1627
1703
|
});
|
|
1628
1704
|
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1705
|
+
// @__NO_SIDE_EFFECTS__
|
|
1706
|
+
function ut(e, t) {
|
|
1707
|
+
return new sr({
|
|
1631
1708
|
check: "max_length",
|
|
1632
|
-
...
|
|
1709
|
+
...p(t),
|
|
1633
1710
|
maximum: e
|
|
1634
1711
|
});
|
|
1635
1712
|
}
|
|
1636
|
-
|
|
1637
|
-
|
|
1713
|
+
// @__NO_SIDE_EFFECTS__
|
|
1714
|
+
function X(e, t) {
|
|
1715
|
+
return new ir({
|
|
1638
1716
|
check: "min_length",
|
|
1639
|
-
...
|
|
1717
|
+
...p(t),
|
|
1640
1718
|
minimum: e
|
|
1641
1719
|
});
|
|
1642
1720
|
}
|
|
1643
|
-
|
|
1644
|
-
|
|
1721
|
+
// @__NO_SIDE_EFFECTS__
|
|
1722
|
+
function lt(e, t) {
|
|
1723
|
+
return new ar({
|
|
1645
1724
|
check: "length_equals",
|
|
1646
|
-
...
|
|
1725
|
+
...p(t),
|
|
1647
1726
|
length: e
|
|
1648
1727
|
});
|
|
1649
1728
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1729
|
+
// @__NO_SIDE_EFFECTS__
|
|
1730
|
+
function Do(e, t) {
|
|
1731
|
+
return new cr({
|
|
1652
1732
|
check: "string_format",
|
|
1653
1733
|
format: "regex",
|
|
1654
|
-
...
|
|
1734
|
+
...p(t),
|
|
1655
1735
|
pattern: e
|
|
1656
1736
|
});
|
|
1657
1737
|
}
|
|
1658
|
-
|
|
1659
|
-
|
|
1738
|
+
// @__NO_SIDE_EFFECTS__
|
|
1739
|
+
function Co(e) {
|
|
1740
|
+
return new ur({
|
|
1660
1741
|
check: "string_format",
|
|
1661
1742
|
format: "lowercase",
|
|
1662
|
-
...
|
|
1743
|
+
...p(e)
|
|
1663
1744
|
});
|
|
1664
1745
|
}
|
|
1665
|
-
|
|
1666
|
-
|
|
1746
|
+
// @__NO_SIDE_EFFECTS__
|
|
1747
|
+
function Uo(e) {
|
|
1748
|
+
return new lr({
|
|
1667
1749
|
check: "string_format",
|
|
1668
1750
|
format: "uppercase",
|
|
1669
|
-
...
|
|
1751
|
+
...p(e)
|
|
1670
1752
|
});
|
|
1671
1753
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1754
|
+
// @__NO_SIDE_EFFECTS__
|
|
1755
|
+
function Fo(e, t) {
|
|
1756
|
+
return new dr({
|
|
1674
1757
|
check: "string_format",
|
|
1675
1758
|
format: "includes",
|
|
1676
|
-
...
|
|
1759
|
+
...p(t),
|
|
1677
1760
|
includes: e
|
|
1678
1761
|
});
|
|
1679
1762
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1763
|
+
// @__NO_SIDE_EFFECTS__
|
|
1764
|
+
function Jo(e, t) {
|
|
1765
|
+
return new fr({
|
|
1682
1766
|
check: "string_format",
|
|
1683
1767
|
format: "starts_with",
|
|
1684
|
-
...
|
|
1768
|
+
...p(t),
|
|
1685
1769
|
prefix: e
|
|
1686
1770
|
});
|
|
1687
1771
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1772
|
+
// @__NO_SIDE_EFFECTS__
|
|
1773
|
+
function Lo(e, t) {
|
|
1774
|
+
return new pr({
|
|
1690
1775
|
check: "string_format",
|
|
1691
1776
|
format: "ends_with",
|
|
1692
|
-
...
|
|
1777
|
+
...p(t),
|
|
1693
1778
|
suffix: e
|
|
1694
1779
|
});
|
|
1695
1780
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1781
|
+
// @__NO_SIDE_EFFECTS__
|
|
1782
|
+
function J(e) {
|
|
1783
|
+
return new hr({
|
|
1698
1784
|
check: "overwrite",
|
|
1699
1785
|
tx: e
|
|
1700
1786
|
});
|
|
1701
1787
|
}
|
|
1702
|
-
|
|
1703
|
-
|
|
1788
|
+
// @__NO_SIDE_EFFECTS__
|
|
1789
|
+
function Mo(e) {
|
|
1790
|
+
return /* @__PURE__ */ J((t) => t.normalize(e));
|
|
1791
|
+
}
|
|
1792
|
+
// @__NO_SIDE_EFFECTS__
|
|
1793
|
+
function Bo() {
|
|
1794
|
+
return /* @__PURE__ */ J((e) => e.trim());
|
|
1704
1795
|
}
|
|
1705
|
-
|
|
1706
|
-
|
|
1796
|
+
// @__NO_SIDE_EFFECTS__
|
|
1797
|
+
function qo() {
|
|
1798
|
+
return /* @__PURE__ */ J((e) => e.toLowerCase());
|
|
1707
1799
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1800
|
+
// @__NO_SIDE_EFFECTS__
|
|
1801
|
+
function Vo() {
|
|
1802
|
+
return /* @__PURE__ */ J((e) => e.toUpperCase());
|
|
1710
1803
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1804
|
+
// @__NO_SIDE_EFFECTS__
|
|
1805
|
+
function Wo() {
|
|
1806
|
+
return /* @__PURE__ */ J((e) => pn(e));
|
|
1713
1807
|
}
|
|
1714
|
-
|
|
1808
|
+
// @__NO_SIDE_EFFECTS__
|
|
1809
|
+
function Ko(e, t, n) {
|
|
1715
1810
|
return new e({
|
|
1716
1811
|
type: "array",
|
|
1717
1812
|
element: t,
|
|
1718
1813
|
// get element() {
|
|
1719
1814
|
// return element;
|
|
1720
1815
|
// },
|
|
1721
|
-
...
|
|
1816
|
+
...p(n)
|
|
1722
1817
|
});
|
|
1723
1818
|
}
|
|
1724
|
-
|
|
1819
|
+
// @__NO_SIDE_EFFECTS__
|
|
1820
|
+
function Ho(e, t, n) {
|
|
1725
1821
|
return new e({
|
|
1726
1822
|
type: "custom",
|
|
1727
1823
|
check: "custom",
|
|
1728
1824
|
fn: t,
|
|
1729
|
-
...
|
|
1825
|
+
...p(n)
|
|
1730
1826
|
});
|
|
1731
1827
|
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1828
|
+
// @__NO_SIDE_EFFECTS__
|
|
1829
|
+
function Go(e) {
|
|
1830
|
+
const t = /* @__PURE__ */ Yo((n) => (n.addIssue = (r) => {
|
|
1734
1831
|
if (typeof r == "string")
|
|
1735
|
-
n.issues.push(
|
|
1832
|
+
n.issues.push(B(r, n.value, t._zod.def));
|
|
1736
1833
|
else {
|
|
1737
1834
|
const o = r;
|
|
1738
|
-
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(
|
|
1835
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(B(o));
|
|
1739
1836
|
}
|
|
1740
1837
|
}, e(n.value, n)));
|
|
1741
1838
|
return t;
|
|
1742
1839
|
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1840
|
+
// @__NO_SIDE_EFFECTS__
|
|
1841
|
+
function Yo(e, t) {
|
|
1842
|
+
const n = new E({
|
|
1745
1843
|
check: "custom",
|
|
1746
|
-
...
|
|
1844
|
+
...p(t)
|
|
1747
1845
|
});
|
|
1748
1846
|
return n._zod.check = e, n;
|
|
1749
1847
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1848
|
+
function dt(e) {
|
|
1849
|
+
let t = e?.target ?? "draft-2020-12";
|
|
1850
|
+
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
1851
|
+
processors: e.processors ?? {},
|
|
1852
|
+
metadataRegistry: e?.metadata ?? L,
|
|
1853
|
+
target: t,
|
|
1854
|
+
unrepresentable: e?.unrepresentable ?? "throw",
|
|
1855
|
+
override: e?.override ?? (() => {
|
|
1856
|
+
}),
|
|
1857
|
+
io: e?.io ?? "output",
|
|
1858
|
+
counter: 0,
|
|
1859
|
+
seen: /* @__PURE__ */ new Map(),
|
|
1860
|
+
cycles: e?.cycles ?? "ref",
|
|
1861
|
+
reused: e?.reused ?? "inline",
|
|
1862
|
+
external: e?.external ?? void 0
|
|
1863
|
+
};
|
|
1864
|
+
}
|
|
1865
|
+
function k(e, t, n = { path: [], schemaPath: [] }) {
|
|
1866
|
+
var r;
|
|
1867
|
+
const o = e._zod.def, i = t.seen.get(e);
|
|
1868
|
+
if (i)
|
|
1869
|
+
return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
|
|
1870
|
+
const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
|
|
1871
|
+
t.seen.set(e, s);
|
|
1872
|
+
const a = e._zod.toJSONSchema?.();
|
|
1873
|
+
if (a)
|
|
1874
|
+
s.schema = a;
|
|
1875
|
+
else {
|
|
1876
|
+
const f = {
|
|
1877
|
+
...n,
|
|
1878
|
+
schemaPath: [...n.schemaPath, e],
|
|
1879
|
+
path: n.path
|
|
1880
|
+
};
|
|
1881
|
+
if (e._zod.processJSONSchema)
|
|
1882
|
+
e._zod.processJSONSchema(t, s.schema, f);
|
|
1883
|
+
else {
|
|
1884
|
+
const h = s.schema, m = t.processors[o.type];
|
|
1885
|
+
if (!m)
|
|
1886
|
+
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
|
|
1887
|
+
m(e, t, h, f);
|
|
1888
|
+
}
|
|
1889
|
+
const g = e._zod.parent;
|
|
1890
|
+
g && (s.ref || (s.ref = g), k(g, t, f), t.seen.get(g).isParent = !0);
|
|
1891
|
+
}
|
|
1892
|
+
const l = t.metadataRegistry.get(e);
|
|
1893
|
+
return l && Object.assign(s.schema, l), t.io === "input" && j(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
1894
|
+
}
|
|
1895
|
+
function ft(e, t) {
|
|
1896
|
+
const n = e.seen.get(t);
|
|
1897
|
+
if (!n)
|
|
1898
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
1899
|
+
const r = /* @__PURE__ */ new Map();
|
|
1900
|
+
for (const s of e.seen.entries()) {
|
|
1901
|
+
const a = e.metadataRegistry.get(s[0])?.id;
|
|
1902
|
+
if (a) {
|
|
1903
|
+
const l = r.get(a);
|
|
1904
|
+
if (l && l !== s[0])
|
|
1905
|
+
throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
1906
|
+
r.set(a, s[0]);
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
const o = (s) => {
|
|
1910
|
+
const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
1911
|
+
if (e.external) {
|
|
1912
|
+
const g = e.external.registry.get(s[0])?.id, h = e.external.uri ?? (($) => $);
|
|
1913
|
+
if (g)
|
|
1914
|
+
return { ref: h(g) };
|
|
1915
|
+
const m = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
|
|
1916
|
+
return s[1].defId = m, { defId: m, ref: `${h("__shared")}#/${a}/${m}` };
|
|
1917
|
+
}
|
|
1918
|
+
if (s[1] === n)
|
|
1919
|
+
return { ref: "#" };
|
|
1920
|
+
const d = `#/${a}/`, f = s[1].schema.id ?? `__schema${e.counter++}`;
|
|
1921
|
+
return { defId: f, ref: d + f };
|
|
1922
|
+
}, i = (s) => {
|
|
1923
|
+
if (s[1].schema.$ref)
|
|
1924
|
+
return;
|
|
1925
|
+
const a = s[1], { ref: l, defId: d } = o(s);
|
|
1926
|
+
a.def = { ...a.schema }, d && (a.defId = d);
|
|
1927
|
+
const f = a.schema;
|
|
1928
|
+
for (const g in f)
|
|
1929
|
+
delete f[g];
|
|
1930
|
+
f.$ref = l;
|
|
1931
|
+
};
|
|
1932
|
+
if (e.cycles === "throw")
|
|
1933
|
+
for (const s of e.seen.entries()) {
|
|
1934
|
+
const a = s[1];
|
|
1935
|
+
if (a.cycle)
|
|
1936
|
+
throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
1937
|
+
|
|
1938
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
1939
|
+
}
|
|
1940
|
+
for (const s of e.seen.entries()) {
|
|
1941
|
+
const a = s[1];
|
|
1942
|
+
if (t === s[0]) {
|
|
1943
|
+
i(s);
|
|
1944
|
+
continue;
|
|
1945
|
+
}
|
|
1946
|
+
if (e.external) {
|
|
1947
|
+
const d = e.external.registry.get(s[0])?.id;
|
|
1948
|
+
if (t !== s[0] && d) {
|
|
1949
|
+
i(s);
|
|
1950
|
+
continue;
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
if (e.metadataRegistry.get(s[0])?.id) {
|
|
1954
|
+
i(s);
|
|
1955
|
+
continue;
|
|
1956
|
+
}
|
|
1957
|
+
if (a.cycle) {
|
|
1958
|
+
i(s);
|
|
1959
|
+
continue;
|
|
1960
|
+
}
|
|
1961
|
+
if (a.count > 1 && e.reused === "ref") {
|
|
1962
|
+
i(s);
|
|
1963
|
+
continue;
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
function pt(e, t) {
|
|
1968
|
+
const n = e.seen.get(t);
|
|
1969
|
+
if (!n)
|
|
1970
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
1971
|
+
const r = (s) => {
|
|
1972
|
+
const a = e.seen.get(s);
|
|
1973
|
+
if (a.ref === null)
|
|
1974
|
+
return;
|
|
1975
|
+
const l = a.def ?? a.schema, d = { ...l }, f = a.ref;
|
|
1976
|
+
if (a.ref = null, f) {
|
|
1977
|
+
r(f);
|
|
1978
|
+
const h = e.seen.get(f), m = h.schema;
|
|
1979
|
+
if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(m)) : Object.assign(l, m), Object.assign(l, d), s._zod.parent === f)
|
|
1980
|
+
for (const b in l)
|
|
1981
|
+
b === "$ref" || b === "allOf" || b in d || delete l[b];
|
|
1982
|
+
if (m.$ref && h.def)
|
|
1983
|
+
for (const b in l)
|
|
1984
|
+
b === "$ref" || b === "allOf" || b in h.def && JSON.stringify(l[b]) === JSON.stringify(h.def[b]) && delete l[b];
|
|
1985
|
+
}
|
|
1986
|
+
const g = s._zod.parent;
|
|
1987
|
+
if (g && g !== f) {
|
|
1988
|
+
r(g);
|
|
1989
|
+
const h = e.seen.get(g);
|
|
1990
|
+
if (h?.schema.$ref && (l.$ref = h.schema.$ref, h.def))
|
|
1991
|
+
for (const m in l)
|
|
1992
|
+
m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(l[m]) === JSON.stringify(h.def[m]) && delete l[m];
|
|
1993
|
+
}
|
|
1994
|
+
e.override({
|
|
1995
|
+
zodSchema: s,
|
|
1996
|
+
jsonSchema: l,
|
|
1997
|
+
path: a.path ?? []
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
for (const s of [...e.seen.entries()].reverse())
|
|
2001
|
+
r(s[0]);
|
|
2002
|
+
const o = {};
|
|
2003
|
+
if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
2004
|
+
const s = e.external.registry.get(t)?.id;
|
|
2005
|
+
if (!s)
|
|
2006
|
+
throw new Error("Schema is missing an `id` property");
|
|
2007
|
+
o.$id = e.external.uri(s);
|
|
2008
|
+
}
|
|
2009
|
+
Object.assign(o, n.def ?? n.schema);
|
|
2010
|
+
const i = e.external?.defs ?? {};
|
|
2011
|
+
for (const s of e.seen.entries()) {
|
|
2012
|
+
const a = s[1];
|
|
2013
|
+
a.def && a.defId && (i[a.defId] = a.def);
|
|
2014
|
+
}
|
|
2015
|
+
e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
|
|
2016
|
+
try {
|
|
2017
|
+
const s = JSON.parse(JSON.stringify(o));
|
|
2018
|
+
return Object.defineProperty(s, "~standard", {
|
|
2019
|
+
value: {
|
|
2020
|
+
...t["~standard"],
|
|
2021
|
+
jsonSchema: {
|
|
2022
|
+
input: ee(t, "input", e.processors),
|
|
2023
|
+
output: ee(t, "output", e.processors)
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
enumerable: !1,
|
|
2027
|
+
writable: !1
|
|
2028
|
+
}), s;
|
|
2029
|
+
} catch {
|
|
2030
|
+
throw new Error("Error converting schema to JSON.");
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
function j(e, t) {
|
|
2034
|
+
const n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
2035
|
+
if (n.seen.has(e))
|
|
2036
|
+
return !1;
|
|
2037
|
+
n.seen.add(e);
|
|
2038
|
+
const r = e._zod.def;
|
|
2039
|
+
if (r.type === "transform")
|
|
2040
|
+
return !0;
|
|
2041
|
+
if (r.type === "array")
|
|
2042
|
+
return j(r.element, n);
|
|
2043
|
+
if (r.type === "set")
|
|
2044
|
+
return j(r.valueType, n);
|
|
2045
|
+
if (r.type === "lazy")
|
|
2046
|
+
return j(r.getter(), n);
|
|
2047
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
2048
|
+
return j(r.innerType, n);
|
|
2049
|
+
if (r.type === "intersection")
|
|
2050
|
+
return j(r.left, n) || j(r.right, n);
|
|
2051
|
+
if (r.type === "record" || r.type === "map")
|
|
2052
|
+
return j(r.keyType, n) || j(r.valueType, n);
|
|
2053
|
+
if (r.type === "pipe")
|
|
2054
|
+
return j(r.in, n) || j(r.out, n);
|
|
2055
|
+
if (r.type === "object") {
|
|
2056
|
+
for (const o in r.shape)
|
|
2057
|
+
if (j(r.shape[o], n))
|
|
2058
|
+
return !0;
|
|
2059
|
+
return !1;
|
|
2060
|
+
}
|
|
2061
|
+
if (r.type === "union") {
|
|
2062
|
+
for (const o of r.options)
|
|
2063
|
+
if (j(o, n))
|
|
2064
|
+
return !0;
|
|
2065
|
+
return !1;
|
|
2066
|
+
}
|
|
2067
|
+
if (r.type === "tuple") {
|
|
2068
|
+
for (const o of r.items)
|
|
2069
|
+
if (j(o, n))
|
|
2070
|
+
return !0;
|
|
2071
|
+
return !!(r.rest && j(r.rest, n));
|
|
2072
|
+
}
|
|
2073
|
+
return !1;
|
|
2074
|
+
}
|
|
2075
|
+
const Qo = (e, t = {}) => (n) => {
|
|
2076
|
+
const r = dt({ ...n, processors: t });
|
|
2077
|
+
return k(e, r), ft(r, e), pt(r, e);
|
|
2078
|
+
}, ee = (e, t, n = {}) => (r) => {
|
|
2079
|
+
const { libraryOptions: o, target: i } = r ?? {}, s = dt({ ...o ?? {}, target: i, io: t, processors: n });
|
|
2080
|
+
return k(e, s), ft(s, e), pt(s, e);
|
|
2081
|
+
}, Xo = {
|
|
2082
|
+
guid: "uuid",
|
|
2083
|
+
url: "uri",
|
|
2084
|
+
datetime: "date-time",
|
|
2085
|
+
json_string: "json-string",
|
|
2086
|
+
regex: ""
|
|
2087
|
+
// do not set
|
|
2088
|
+
}, es = (e, t, n, r) => {
|
|
2089
|
+
const o = n;
|
|
2090
|
+
o.type = "string";
|
|
2091
|
+
const { minimum: i, maximum: s, format: a, patterns: l, contentEncoding: d } = e._zod.bag;
|
|
2092
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = Xo[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), d && (o.contentEncoding = d), l && l.size > 0) {
|
|
2093
|
+
const f = [...l];
|
|
2094
|
+
f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
|
|
2095
|
+
...f.map((g) => ({
|
|
2096
|
+
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2097
|
+
pattern: g.source
|
|
2098
|
+
}))
|
|
2099
|
+
]);
|
|
2100
|
+
}
|
|
2101
|
+
}, ts = (e, t, n, r) => {
|
|
2102
|
+
n.not = {};
|
|
2103
|
+
}, ns = (e, t, n, r) => {
|
|
2104
|
+
}, rs = (e, t, n, r) => {
|
|
2105
|
+
const o = e._zod.def, i = He(o.entries);
|
|
2106
|
+
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
2107
|
+
}, os = (e, t, n, r) => {
|
|
2108
|
+
if (t.unrepresentable === "throw")
|
|
2109
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
2110
|
+
}, ss = (e, t, n, r) => {
|
|
2111
|
+
if (t.unrepresentable === "throw")
|
|
2112
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
2113
|
+
}, is = (e, t, n, r) => {
|
|
2114
|
+
const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
|
|
2115
|
+
typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
|
|
2116
|
+
}, as = (e, t, n, r) => {
|
|
2117
|
+
const o = n, i = e._zod.def;
|
|
2118
|
+
o.type = "object", o.properties = {};
|
|
2119
|
+
const s = i.shape;
|
|
2120
|
+
for (const d in s)
|
|
2121
|
+
o.properties[d] = k(s[d], t, {
|
|
2122
|
+
...r,
|
|
2123
|
+
path: [...r.path, "properties", d]
|
|
2124
|
+
});
|
|
2125
|
+
const a = new Set(Object.keys(s)), l = new Set([...a].filter((d) => {
|
|
2126
|
+
const f = i.shape[d]._zod;
|
|
2127
|
+
return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
|
|
2128
|
+
}));
|
|
2129
|
+
l.size > 0 && (o.required = Array.from(l)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
|
|
2130
|
+
...r,
|
|
2131
|
+
path: [...r.path, "additionalProperties"]
|
|
2132
|
+
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
2133
|
+
}, cs = (e, t, n, r) => {
|
|
2134
|
+
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, l) => k(a, t, {
|
|
2135
|
+
...r,
|
|
2136
|
+
path: [...r.path, i ? "oneOf" : "anyOf", l]
|
|
2137
|
+
}));
|
|
2138
|
+
i ? n.oneOf = s : n.anyOf = s;
|
|
2139
|
+
}, us = (e, t, n, r) => {
|
|
2140
|
+
const o = e._zod.def, i = k(o.left, t, {
|
|
2141
|
+
...r,
|
|
2142
|
+
path: [...r.path, "allOf", 0]
|
|
2143
|
+
}), s = k(o.right, t, {
|
|
2144
|
+
...r,
|
|
2145
|
+
path: [...r.path, "allOf", 1]
|
|
2146
|
+
}), a = (d) => "allOf" in d && Object.keys(d).length === 1, l = [
|
|
2147
|
+
...a(i) ? i.allOf : [i],
|
|
2148
|
+
...a(s) ? s.allOf : [s]
|
|
2149
|
+
];
|
|
2150
|
+
n.allOf = l;
|
|
2151
|
+
}, ls = (e, t, n, r) => {
|
|
2152
|
+
const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
|
|
2153
|
+
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
2154
|
+
}, ds = (e, t, n, r) => {
|
|
2155
|
+
const o = e._zod.def;
|
|
2156
|
+
k(o.innerType, t, r);
|
|
2157
|
+
const i = t.seen.get(e);
|
|
2158
|
+
i.ref = o.innerType;
|
|
2159
|
+
}, fs = (e, t, n, r) => {
|
|
2160
|
+
const o = e._zod.def;
|
|
2161
|
+
k(o.innerType, t, r);
|
|
2162
|
+
const i = t.seen.get(e);
|
|
2163
|
+
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
2164
|
+
}, ps = (e, t, n, r) => {
|
|
2165
|
+
const o = e._zod.def;
|
|
2166
|
+
k(o.innerType, t, r);
|
|
2167
|
+
const i = t.seen.get(e);
|
|
2168
|
+
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
2169
|
+
}, hs = (e, t, n, r) => {
|
|
2170
|
+
const o = e._zod.def;
|
|
2171
|
+
k(o.innerType, t, r);
|
|
2172
|
+
const i = t.seen.get(e);
|
|
2173
|
+
i.ref = o.innerType;
|
|
2174
|
+
let s;
|
|
2175
|
+
try {
|
|
2176
|
+
s = o.catchValue(void 0);
|
|
2177
|
+
} catch {
|
|
2178
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
2179
|
+
}
|
|
2180
|
+
n.default = s;
|
|
2181
|
+
}, ms = (e, t, n, r) => {
|
|
2182
|
+
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
2183
|
+
k(i, t, r);
|
|
2184
|
+
const s = t.seen.get(e);
|
|
2185
|
+
s.ref = i;
|
|
2186
|
+
}, gs = (e, t, n, r) => {
|
|
2187
|
+
const o = e._zod.def;
|
|
2188
|
+
k(o.innerType, t, r);
|
|
2189
|
+
const i = t.seen.get(e);
|
|
2190
|
+
i.ref = o.innerType, n.readOnly = !0;
|
|
2191
|
+
}, ht = (e, t, n, r) => {
|
|
2192
|
+
const o = e._zod.def;
|
|
2193
|
+
k(o.innerType, t, r);
|
|
2194
|
+
const i = t.seen.get(e);
|
|
2195
|
+
i.ref = o.innerType;
|
|
2196
|
+
}, _s = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
|
|
2197
|
+
Or.init(e, t), y.init(e, t);
|
|
1752
2198
|
});
|
|
1753
|
-
function
|
|
1754
|
-
return
|
|
2199
|
+
function vs(e) {
|
|
2200
|
+
return /* @__PURE__ */ To(_s, e);
|
|
1755
2201
|
}
|
|
1756
|
-
const
|
|
1757
|
-
|
|
2202
|
+
const ys = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
2203
|
+
Sr.init(e, t), y.init(e, t);
|
|
1758
2204
|
});
|
|
1759
|
-
function
|
|
1760
|
-
return
|
|
2205
|
+
function ws(e) {
|
|
2206
|
+
return /* @__PURE__ */ Eo(ys, e);
|
|
1761
2207
|
}
|
|
1762
|
-
const
|
|
1763
|
-
|
|
2208
|
+
const zs = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
|
|
2209
|
+
Pr.init(e, t), y.init(e, t);
|
|
1764
2210
|
});
|
|
1765
|
-
function
|
|
1766
|
-
return
|
|
2211
|
+
function bs(e) {
|
|
2212
|
+
return /* @__PURE__ */ No(zs, e);
|
|
1767
2213
|
}
|
|
1768
|
-
const
|
|
1769
|
-
|
|
2214
|
+
const ks = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
|
|
2215
|
+
Tr.init(e, t), y.init(e, t);
|
|
1770
2216
|
});
|
|
1771
|
-
function
|
|
1772
|
-
return
|
|
2217
|
+
function $s(e) {
|
|
2218
|
+
return /* @__PURE__ */ Io(ks, e);
|
|
1773
2219
|
}
|
|
1774
|
-
const
|
|
1775
|
-
|
|
2220
|
+
const js = (e, t) => {
|
|
2221
|
+
et.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
1776
2222
|
format: {
|
|
1777
|
-
value: (n) =>
|
|
2223
|
+
value: (n) => jn(e, n)
|
|
1778
2224
|
// enumerable: false,
|
|
1779
2225
|
},
|
|
1780
2226
|
flatten: {
|
|
1781
|
-
value: (n) =>
|
|
2227
|
+
value: (n) => $n(e, n)
|
|
1782
2228
|
// enumerable: false,
|
|
1783
2229
|
},
|
|
1784
2230
|
addIssue: {
|
|
1785
2231
|
value: (n) => {
|
|
1786
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
2232
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, ie, 2);
|
|
1787
2233
|
}
|
|
1788
2234
|
// enumerable: false,
|
|
1789
2235
|
},
|
|
1790
2236
|
addIssues: {
|
|
1791
2237
|
value: (n) => {
|
|
1792
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
2238
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, ie, 2);
|
|
1793
2239
|
}
|
|
1794
2240
|
// enumerable: false,
|
|
1795
2241
|
},
|
|
@@ -1800,312 +2246,328 @@ const Ko = (e, t) => {
|
|
|
1800
2246
|
// enumerable: false,
|
|
1801
2247
|
}
|
|
1802
2248
|
});
|
|
1803
|
-
},
|
|
2249
|
+
}, Z = u("ZodError", js, {
|
|
1804
2250
|
Parent: Error
|
|
1805
|
-
}),
|
|
2251
|
+
}), xs = /* @__PURE__ */ pe(Z), Zs = /* @__PURE__ */ he(Z), Os = /* @__PURE__ */ re(Z), Ss = /* @__PURE__ */ oe(Z), Ps = /* @__PURE__ */ On(Z), Ts = /* @__PURE__ */ Sn(Z), Es = /* @__PURE__ */ Pn(Z), Ns = /* @__PURE__ */ Tn(Z), Is = /* @__PURE__ */ En(Z), Rs = /* @__PURE__ */ Nn(Z), As = /* @__PURE__ */ In(Z), Ds = /* @__PURE__ */ Rn(Z), z = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
|
|
2252
|
+
jsonSchema: {
|
|
2253
|
+
input: ee(e, "input"),
|
|
2254
|
+
output: ee(e, "output")
|
|
2255
|
+
}
|
|
2256
|
+
}), e.toJSONSchema = Qo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(I(t, {
|
|
1806
2257
|
checks: [
|
|
1807
2258
|
...t.checks ?? [],
|
|
1808
2259
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
1809
2260
|
]
|
|
1810
|
-
})
|
|
2261
|
+
}), {
|
|
2262
|
+
parent: !0
|
|
2263
|
+
}), e.with = e.check, e.clone = (n, r) => R(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => xs(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Os(e, n, r), e.parseAsync = async (n, r) => Zs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Ss(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Ps(e, n, r), e.decode = (n, r) => Ts(e, n, r), e.encodeAsync = async (n, r) => Es(e, n, r), e.decodeAsync = async (n, r) => Ns(e, n, r), e.safeEncode = (n, r) => Is(e, n, r), e.safeDecode = (n, r) => Rs(e, n, r), e.safeEncodeAsync = async (n, r) => As(e, n, r), e.safeDecodeAsync = async (n, r) => Ds(e, n, r), e.refine = (n, r) => e.check(Si(n, r)), e.superRefine = (n) => e.check(Pi(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ J(n)), e.optional = () => Ne(e), e.exactOptional = () => gi(e), e.nullable = () => Ie(e), e.nullish = () => Ne(Ie(e)), e.nonoptional = (n) => bi(e, n), e.array = () => ii(e), e.or = (n) => li([e, n]), e.and = (n) => fi(e, n), e.transform = (n) => Re(e, hi(n)), e.default = (n) => yi(e, n), e.prefault = (n) => zi(e, n), e.catch = (n) => $i(e, n), e.pipe = (n) => Re(e, n), e.readonly = () => Zi(e), e.describe = (n) => {
|
|
1811
2264
|
const r = e.clone();
|
|
1812
|
-
return
|
|
2265
|
+
return L.add(r, { description: n }), r;
|
|
1813
2266
|
}, Object.defineProperty(e, "description", {
|
|
1814
2267
|
get() {
|
|
1815
|
-
return
|
|
2268
|
+
return L.get(e)?.description;
|
|
1816
2269
|
},
|
|
1817
2270
|
configurable: !0
|
|
1818
2271
|
}), e.meta = (...n) => {
|
|
1819
2272
|
if (n.length === 0)
|
|
1820
|
-
return
|
|
2273
|
+
return L.get(e);
|
|
1821
2274
|
const r = e.clone();
|
|
1822
|
-
return
|
|
1823
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
1824
|
-
|
|
2275
|
+
return L.add(r, n[0]), r;
|
|
2276
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), mt = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2277
|
+
me.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => es(e, r, o);
|
|
1825
2278
|
const n = e._zod.bag;
|
|
1826
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(
|
|
1827
|
-
}),
|
|
1828
|
-
|
|
2279
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Do(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Fo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Jo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Lo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ X(...r)), e.max = (...r) => e.check(/* @__PURE__ */ ut(...r)), e.length = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ X(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Co(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Uo(r)), e.trim = () => e.check(/* @__PURE__ */ Bo()), e.normalize = (...r) => e.check(/* @__PURE__ */ Mo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ qo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Vo()), e.slugify = () => e.check(/* @__PURE__ */ Wo());
|
|
2280
|
+
}), Cs = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2281
|
+
me.init(e, t), mt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ uo(Us, n)), e.url = (n) => e.check(/* @__PURE__ */ mo(Fs, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Po(ti, n)), e.emoji = (n) => e.check(/* @__PURE__ */ go(Js, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.uuid = (n) => e.check(/* @__PURE__ */ lo(G, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ fo(G, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ po(G, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ ho(G, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ _o(Ls, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.cuid = (n) => e.check(/* @__PURE__ */ vo(Ms, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ yo(Bs, n)), e.ulid = (n) => e.check(/* @__PURE__ */ wo(qs, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Zo(Qs, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Oo(Xs, n)), e.xid = (n) => e.check(/* @__PURE__ */ zo(Vs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ bo(Ws, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ ko(Ks, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ $o(Hs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ jo(Gs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ xo(Ys, n)), e.e164 = (n) => e.check(/* @__PURE__ */ So(ei, n)), e.datetime = (n) => e.check(vs(n)), e.date = (n) => e.check(ws(n)), e.time = (n) => e.check(bs(n)), e.duration = (n) => e.check($s(n));
|
|
1829
2282
|
});
|
|
1830
|
-
function
|
|
1831
|
-
return
|
|
1832
|
-
}
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
}),
|
|
1836
|
-
|
|
1837
|
-
}),
|
|
1838
|
-
|
|
1839
|
-
}),
|
|
1840
|
-
|
|
1841
|
-
}),
|
|
1842
|
-
|
|
1843
|
-
}),
|
|
1844
|
-
|
|
1845
|
-
}),
|
|
1846
|
-
|
|
1847
|
-
}),
|
|
1848
|
-
|
|
1849
|
-
}),
|
|
1850
|
-
|
|
1851
|
-
}),
|
|
1852
|
-
|
|
1853
|
-
}),
|
|
1854
|
-
|
|
1855
|
-
}),
|
|
1856
|
-
|
|
1857
|
-
}),
|
|
1858
|
-
|
|
1859
|
-
}),
|
|
1860
|
-
|
|
1861
|
-
}),
|
|
1862
|
-
|
|
1863
|
-
}),
|
|
1864
|
-
|
|
1865
|
-
}),
|
|
1866
|
-
|
|
1867
|
-
}),
|
|
1868
|
-
|
|
1869
|
-
}),
|
|
1870
|
-
|
|
1871
|
-
}),
|
|
1872
|
-
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
2283
|
+
function Pe(e) {
|
|
2284
|
+
return /* @__PURE__ */ co(Cs, e);
|
|
2285
|
+
}
|
|
2286
|
+
const y = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
2287
|
+
v.init(e, t), mt.init(e, t);
|
|
2288
|
+
}), Us = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
2289
|
+
yr.init(e, t), y.init(e, t);
|
|
2290
|
+
}), Te = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
2291
|
+
_r.init(e, t), y.init(e, t);
|
|
2292
|
+
}), G = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2293
|
+
vr.init(e, t), y.init(e, t);
|
|
2294
|
+
}), Fs = /* @__PURE__ */ u("ZodURL", (e, t) => {
|
|
2295
|
+
wr.init(e, t), y.init(e, t);
|
|
2296
|
+
}), Js = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
2297
|
+
zr.init(e, t), y.init(e, t);
|
|
2298
|
+
}), Ls = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
|
|
2299
|
+
br.init(e, t), y.init(e, t);
|
|
2300
|
+
}), Ms = /* @__PURE__ */ u("ZodCUID", (e, t) => {
|
|
2301
|
+
kr.init(e, t), y.init(e, t);
|
|
2302
|
+
}), Bs = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
2303
|
+
$r.init(e, t), y.init(e, t);
|
|
2304
|
+
}), qs = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
2305
|
+
jr.init(e, t), y.init(e, t);
|
|
2306
|
+
}), Vs = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
2307
|
+
xr.init(e, t), y.init(e, t);
|
|
2308
|
+
}), Ws = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
2309
|
+
Zr.init(e, t), y.init(e, t);
|
|
2310
|
+
}), Ks = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
2311
|
+
Er.init(e, t), y.init(e, t);
|
|
2312
|
+
}), Hs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2313
|
+
Nr.init(e, t), y.init(e, t);
|
|
2314
|
+
}), Gs = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2315
|
+
Ir.init(e, t), y.init(e, t);
|
|
2316
|
+
}), Ys = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2317
|
+
Rr.init(e, t), y.init(e, t);
|
|
2318
|
+
}), Qs = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
2319
|
+
Ar.init(e, t), y.init(e, t);
|
|
2320
|
+
}), Xs = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
2321
|
+
Cr.init(e, t), y.init(e, t);
|
|
2322
|
+
}), ei = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2323
|
+
Ur.init(e, t), y.init(e, t);
|
|
2324
|
+
}), ti = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2325
|
+
Jr.init(e, t), y.init(e, t);
|
|
2326
|
+
}), ni = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
2327
|
+
Lr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ns();
|
|
1875
2328
|
});
|
|
1876
2329
|
function Ee() {
|
|
1877
|
-
return
|
|
2330
|
+
return /* @__PURE__ */ Ro(ni);
|
|
1878
2331
|
}
|
|
1879
|
-
const
|
|
1880
|
-
|
|
2332
|
+
const ri = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
2333
|
+
Mr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ts(e, n, r);
|
|
1881
2334
|
});
|
|
1882
|
-
function
|
|
1883
|
-
return
|
|
2335
|
+
function oi(e) {
|
|
2336
|
+
return /* @__PURE__ */ Ao(ri, e);
|
|
1884
2337
|
}
|
|
1885
|
-
const
|
|
1886
|
-
|
|
2338
|
+
const si = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
2339
|
+
Br.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => is(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ X(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ X(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ ut(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.unwrap = () => e.element;
|
|
1887
2340
|
});
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
2341
|
+
function ii(e, t) {
|
|
2342
|
+
return /* @__PURE__ */ Ko(si, e, t);
|
|
1890
2343
|
}
|
|
1891
|
-
const
|
|
1892
|
-
|
|
2344
|
+
const ai = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2345
|
+
Vr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => as(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => gt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.strict = () => e.clone({ ...e._zod.def, catchall: oi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => yn(e, n), e.safeExtend = (n) => wn(e, n), e.merge = (n) => zn(e, n), e.pick = (n) => _n(e, n), e.omit = (n) => vn(e, n), e.partial = (...n) => bn(_t, e, n[0]), e.required = (...n) => kn(vt, e, n[0]);
|
|
1893
2346
|
});
|
|
1894
|
-
function
|
|
2347
|
+
function ci(e, t) {
|
|
1895
2348
|
const n = {
|
|
1896
2349
|
type: "object",
|
|
1897
2350
|
shape: e ?? {},
|
|
1898
|
-
...
|
|
2351
|
+
...p(t)
|
|
1899
2352
|
};
|
|
1900
|
-
return new
|
|
2353
|
+
return new ai(n);
|
|
1901
2354
|
}
|
|
1902
|
-
const
|
|
1903
|
-
|
|
2355
|
+
const ui = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
2356
|
+
Wr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n, r, o), e.options = t.options;
|
|
1904
2357
|
});
|
|
1905
|
-
function
|
|
1906
|
-
return new
|
|
2358
|
+
function li(e, t) {
|
|
2359
|
+
return new ui({
|
|
1907
2360
|
type: "union",
|
|
1908
2361
|
options: e,
|
|
1909
|
-
...
|
|
2362
|
+
...p(t)
|
|
1910
2363
|
});
|
|
1911
2364
|
}
|
|
1912
|
-
const
|
|
1913
|
-
|
|
2365
|
+
const di = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
|
|
2366
|
+
Kr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => us(e, n, r, o);
|
|
1914
2367
|
});
|
|
1915
|
-
function
|
|
1916
|
-
return new
|
|
2368
|
+
function fi(e, t) {
|
|
2369
|
+
return new di({
|
|
1917
2370
|
type: "intersection",
|
|
1918
2371
|
left: e,
|
|
1919
2372
|
right: t
|
|
1920
2373
|
});
|
|
1921
2374
|
}
|
|
1922
|
-
const
|
|
1923
|
-
|
|
2375
|
+
const ce = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
2376
|
+
Hr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => rs(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
1924
2377
|
const n = new Set(Object.keys(t.entries));
|
|
1925
2378
|
e.extract = (r, o) => {
|
|
1926
|
-
const
|
|
1927
|
-
for (const
|
|
1928
|
-
if (n.has(
|
|
1929
|
-
s
|
|
2379
|
+
const i = {};
|
|
2380
|
+
for (const s of r)
|
|
2381
|
+
if (n.has(s))
|
|
2382
|
+
i[s] = t.entries[s];
|
|
1930
2383
|
else
|
|
1931
|
-
throw new Error(`Key ${
|
|
1932
|
-
return new
|
|
2384
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
2385
|
+
return new ce({
|
|
1933
2386
|
...t,
|
|
1934
2387
|
checks: [],
|
|
1935
|
-
...
|
|
1936
|
-
entries:
|
|
2388
|
+
...p(o),
|
|
2389
|
+
entries: i
|
|
1937
2390
|
});
|
|
1938
2391
|
}, e.exclude = (r, o) => {
|
|
1939
|
-
const
|
|
1940
|
-
for (const
|
|
1941
|
-
if (n.has(
|
|
1942
|
-
delete s
|
|
2392
|
+
const i = { ...t.entries };
|
|
2393
|
+
for (const s of r)
|
|
2394
|
+
if (n.has(s))
|
|
2395
|
+
delete i[s];
|
|
1943
2396
|
else
|
|
1944
|
-
throw new Error(`Key ${
|
|
1945
|
-
return new
|
|
2397
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
2398
|
+
return new ce({
|
|
1946
2399
|
...t,
|
|
1947
2400
|
checks: [],
|
|
1948
|
-
...
|
|
1949
|
-
entries:
|
|
2401
|
+
...p(o),
|
|
2402
|
+
entries: i
|
|
1950
2403
|
});
|
|
1951
2404
|
};
|
|
1952
2405
|
});
|
|
1953
|
-
function
|
|
2406
|
+
function gt(e, t) {
|
|
1954
2407
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
1955
|
-
return new
|
|
2408
|
+
return new ce({
|
|
1956
2409
|
type: "enum",
|
|
1957
2410
|
entries: n,
|
|
1958
|
-
...
|
|
2411
|
+
...p(t)
|
|
1959
2412
|
});
|
|
1960
2413
|
}
|
|
1961
|
-
const
|
|
1962
|
-
|
|
2414
|
+
const pi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
2415
|
+
Gr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ss(e, n), e._zod.parse = (n, r) => {
|
|
1963
2416
|
if (r.direction === "backward")
|
|
1964
|
-
throw new
|
|
1965
|
-
n.addIssue = (
|
|
1966
|
-
if (typeof
|
|
1967
|
-
n.issues.push(
|
|
2417
|
+
throw new We(e.constructor.name);
|
|
2418
|
+
n.addIssue = (i) => {
|
|
2419
|
+
if (typeof i == "string")
|
|
2420
|
+
n.issues.push(B(i, n.value, t));
|
|
1968
2421
|
else {
|
|
1969
|
-
const
|
|
1970
|
-
|
|
2422
|
+
const s = i;
|
|
2423
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(B(s));
|
|
1971
2424
|
}
|
|
1972
2425
|
};
|
|
1973
2426
|
const o = t.transform(n.value, n);
|
|
1974
|
-
return o instanceof Promise ? o.then((
|
|
2427
|
+
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
1975
2428
|
};
|
|
1976
2429
|
});
|
|
1977
|
-
function
|
|
1978
|
-
return new
|
|
2430
|
+
function hi(e) {
|
|
2431
|
+
return new pi({
|
|
1979
2432
|
type: "transform",
|
|
1980
2433
|
transform: e
|
|
1981
2434
|
});
|
|
1982
2435
|
}
|
|
1983
|
-
const
|
|
1984
|
-
|
|
2436
|
+
const _t = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
2437
|
+
ct.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ht(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
1985
2438
|
});
|
|
1986
|
-
function
|
|
1987
|
-
return new
|
|
2439
|
+
function Ne(e) {
|
|
2440
|
+
return new _t({
|
|
2441
|
+
type: "optional",
|
|
2442
|
+
innerType: e
|
|
2443
|
+
});
|
|
2444
|
+
}
|
|
2445
|
+
const mi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
|
|
2446
|
+
Yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ht(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2447
|
+
});
|
|
2448
|
+
function gi(e) {
|
|
2449
|
+
return new mi({
|
|
1988
2450
|
type: "optional",
|
|
1989
2451
|
innerType: e
|
|
1990
2452
|
});
|
|
1991
2453
|
}
|
|
1992
|
-
const
|
|
1993
|
-
|
|
2454
|
+
const _i = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
2455
|
+
Qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ls(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
1994
2456
|
});
|
|
1995
|
-
function
|
|
1996
|
-
return new
|
|
2457
|
+
function Ie(e) {
|
|
2458
|
+
return new _i({
|
|
1997
2459
|
type: "nullable",
|
|
1998
2460
|
innerType: e
|
|
1999
2461
|
});
|
|
2000
2462
|
}
|
|
2001
|
-
const
|
|
2002
|
-
|
|
2463
|
+
const vi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
|
|
2464
|
+
Xr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2003
2465
|
});
|
|
2004
|
-
function
|
|
2005
|
-
return new
|
|
2466
|
+
function yi(e, t) {
|
|
2467
|
+
return new vi({
|
|
2006
2468
|
type: "default",
|
|
2007
2469
|
innerType: e,
|
|
2008
2470
|
get defaultValue() {
|
|
2009
|
-
return typeof t == "function" ? t() :
|
|
2471
|
+
return typeof t == "function" ? t() : Ye(t);
|
|
2010
2472
|
}
|
|
2011
2473
|
});
|
|
2012
2474
|
}
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2475
|
+
const wi = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
|
|
2476
|
+
eo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2015
2477
|
});
|
|
2016
|
-
function
|
|
2017
|
-
return new
|
|
2478
|
+
function zi(e, t) {
|
|
2479
|
+
return new wi({
|
|
2018
2480
|
type: "prefault",
|
|
2019
2481
|
innerType: e,
|
|
2020
2482
|
get defaultValue() {
|
|
2021
|
-
return typeof t == "function" ? t() :
|
|
2483
|
+
return typeof t == "function" ? t() : Ye(t);
|
|
2022
2484
|
}
|
|
2023
2485
|
});
|
|
2024
2486
|
}
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2487
|
+
const vt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
2488
|
+
to.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2027
2489
|
});
|
|
2028
|
-
function
|
|
2029
|
-
return new
|
|
2490
|
+
function bi(e, t) {
|
|
2491
|
+
return new vt({
|
|
2030
2492
|
type: "nonoptional",
|
|
2031
2493
|
innerType: e,
|
|
2032
|
-
...
|
|
2494
|
+
...p(t)
|
|
2033
2495
|
});
|
|
2034
2496
|
}
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2497
|
+
const ki = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
2498
|
+
no.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2037
2499
|
});
|
|
2038
|
-
function
|
|
2039
|
-
return new
|
|
2500
|
+
function $i(e, t) {
|
|
2501
|
+
return new ki({
|
|
2040
2502
|
type: "catch",
|
|
2041
2503
|
innerType: e,
|
|
2042
2504
|
catchValue: typeof t == "function" ? t : () => t
|
|
2043
2505
|
});
|
|
2044
2506
|
}
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2507
|
+
const ji = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
2508
|
+
ro.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
2047
2509
|
});
|
|
2048
|
-
function
|
|
2049
|
-
return new
|
|
2510
|
+
function Re(e, t) {
|
|
2511
|
+
return new ji({
|
|
2050
2512
|
type: "pipe",
|
|
2051
2513
|
in: e,
|
|
2052
2514
|
out: t
|
|
2053
2515
|
// ...util.normalizeParams(params),
|
|
2054
2516
|
});
|
|
2055
2517
|
}
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2518
|
+
const xi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
2519
|
+
oo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2058
2520
|
});
|
|
2059
|
-
function
|
|
2060
|
-
return new
|
|
2521
|
+
function Zi(e) {
|
|
2522
|
+
return new xi({
|
|
2061
2523
|
type: "readonly",
|
|
2062
2524
|
innerType: e
|
|
2063
2525
|
});
|
|
2064
2526
|
}
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2527
|
+
const Oi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
2528
|
+
so.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => os(e, n);
|
|
2067
2529
|
});
|
|
2068
|
-
function
|
|
2069
|
-
return
|
|
2530
|
+
function Si(e, t = {}) {
|
|
2531
|
+
return /* @__PURE__ */ Ho(Oi, e, t);
|
|
2070
2532
|
}
|
|
2071
|
-
function
|
|
2072
|
-
return
|
|
2533
|
+
function Pi(e) {
|
|
2534
|
+
return /* @__PURE__ */ Go(e);
|
|
2073
2535
|
}
|
|
2074
|
-
const
|
|
2075
|
-
buildId:
|
|
2076
|
-
timestamp:
|
|
2077
|
-
status:
|
|
2078
|
-
}),
|
|
2536
|
+
const Ti = ci({
|
|
2537
|
+
buildId: Pe(),
|
|
2538
|
+
timestamp: Pe(),
|
|
2539
|
+
status: gt(["in-progress", "success", "failed"])
|
|
2540
|
+
}), Ei = ({
|
|
2079
2541
|
buildId: e,
|
|
2080
2542
|
environmentType: t,
|
|
2081
2543
|
endpoint: n = "/__zuplo/docs"
|
|
2082
2544
|
}) => {
|
|
2083
|
-
const r =
|
|
2545
|
+
const r = Ot({
|
|
2084
2546
|
queryKey: ["zuplo-build-check", e, n],
|
|
2085
2547
|
refetchInterval: 3e3,
|
|
2086
2548
|
enabled: e !== void 0 && t === "WORKING_COPY",
|
|
2087
2549
|
retry: !1,
|
|
2088
|
-
queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((
|
|
2089
|
-
if (!
|
|
2090
|
-
return
|
|
2091
|
-
}).then((
|
|
2550
|
+
queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((i) => {
|
|
2551
|
+
if (!i.ok) throw new Error("Failed to fetch build status");
|
|
2552
|
+
return i.json();
|
|
2553
|
+
}).then((i) => Ti.parse(i))
|
|
2092
2554
|
});
|
|
2093
|
-
if (
|
|
2555
|
+
if (te(() => {
|
|
2094
2556
|
r.data?.status === "success" && r.data.buildId && (document.cookie = `zuplo-build=${r.data.buildId}; path=/; max-age=300; secure; SameSite=None`);
|
|
2095
2557
|
}, [r.data]), r.isError || !r.data || r.data.buildId === e)
|
|
2096
2558
|
return null;
|
|
2097
2559
|
const o = r.data.status === "success";
|
|
2098
|
-
return /* @__PURE__ */
|
|
2099
|
-
o ? /* @__PURE__ */
|
|
2100
|
-
/* @__PURE__ */
|
|
2101
|
-
/* @__PURE__ */
|
|
2102
|
-
] }) : /* @__PURE__ */
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
/* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ c.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
|
|
2561
|
+
o ? /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
2562
|
+
/* @__PURE__ */ c.jsx(Gt, { size: 16 }),
|
|
2563
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "New version available" })
|
|
2564
|
+
] }) : /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
2565
|
+
/* @__PURE__ */ c.jsx(Yt, { size: 16, className: "animate-spin" }),
|
|
2566
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Building new version..." })
|
|
2105
2567
|
] }),
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
o && /* @__PURE__ */
|
|
2108
|
-
|
|
2568
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
|
|
2569
|
+
o && /* @__PURE__ */ c.jsx(
|
|
2570
|
+
tn,
|
|
2109
2571
|
{
|
|
2110
2572
|
variant: "outline",
|
|
2111
2573
|
size: "sm",
|
|
@@ -2117,52 +2579,52 @@ const Xs = As({
|
|
|
2117
2579
|
}
|
|
2118
2580
|
)
|
|
2119
2581
|
] });
|
|
2120
|
-
},
|
|
2121
|
-
const e =
|
|
2122
|
-
|
|
2582
|
+
}, Ni = () => {
|
|
2583
|
+
const e = Je(), t = Fe(e.pathname);
|
|
2584
|
+
te(() => {
|
|
2123
2585
|
const n = t.current !== e.pathname, r = e.hash !== "";
|
|
2124
2586
|
n && !r && window.scrollTo(0, 0), t.current = e.pathname;
|
|
2125
2587
|
}, [e.pathname, e.hash]);
|
|
2126
|
-
},
|
|
2588
|
+
}, Ii = ({
|
|
2127
2589
|
icon: e
|
|
2128
|
-
}) => typeof e == "string" ? /* @__PURE__ */
|
|
2590
|
+
}) => typeof e == "string" ? /* @__PURE__ */ c.jsx(
|
|
2129
2591
|
"img",
|
|
2130
2592
|
{
|
|
2131
2593
|
src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
|
|
2132
2594
|
className: "size-5",
|
|
2133
2595
|
alt: e
|
|
2134
2596
|
}
|
|
2135
|
-
) : e,
|
|
2136
|
-
const { site: e } =
|
|
2137
|
-
return t ? /* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
2597
|
+
) : e, Ri = (e) => /^https?:/.test(e), Ai = () => {
|
|
2598
|
+
const { site: e } = V(), t = e?.footer;
|
|
2599
|
+
return t ? /* @__PURE__ */ c.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ c.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
|
|
2600
|
+
/* @__PURE__ */ c.jsxs(
|
|
2139
2601
|
"div",
|
|
2140
2602
|
{
|
|
2141
|
-
className:
|
|
2603
|
+
className: S("flex flex-row gap-8", {
|
|
2142
2604
|
"justify-center": !t.position || t.position === "center",
|
|
2143
2605
|
"justify-start": t.position === "start",
|
|
2144
2606
|
"justify-end": t.position === "end"
|
|
2145
2607
|
}),
|
|
2146
2608
|
children: [
|
|
2147
|
-
/* @__PURE__ */
|
|
2148
|
-
t.columns && /* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "footer-before" }),
|
|
2610
|
+
t.columns && /* @__PURE__ */ c.jsx(
|
|
2149
2611
|
"div",
|
|
2150
2612
|
{
|
|
2151
2613
|
className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
|
|
2152
2614
|
style: { "--columns": t.columns.length },
|
|
2153
|
-
children: t.columns.map((n) => /* @__PURE__ */
|
|
2615
|
+
children: t.columns.map((n) => /* @__PURE__ */ c.jsxs(
|
|
2154
2616
|
"div",
|
|
2155
2617
|
{
|
|
2156
|
-
className:
|
|
2618
|
+
className: S({
|
|
2157
2619
|
"justify-self-center": !n.position || n.position === "center",
|
|
2158
2620
|
"justify-self-start": n.position === "start",
|
|
2159
2621
|
"justify-self-end": n.position === "end"
|
|
2160
2622
|
}),
|
|
2161
2623
|
children: [
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2624
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm font-semibold", children: n.title }),
|
|
2625
|
+
/* @__PURE__ */ c.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
|
|
2164
2626
|
const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
|
|
2165
|
-
return /* @__PURE__ */
|
|
2627
|
+
return /* @__PURE__ */ c.jsx("li", { children: Ri(r.href) ? /* @__PURE__ */ c.jsxs(
|
|
2166
2628
|
"a",
|
|
2167
2629
|
{
|
|
2168
2630
|
href: r.href,
|
|
@@ -2170,11 +2632,11 @@ const Xs = As({
|
|
|
2170
2632
|
rel: "noopener noreferrer",
|
|
2171
2633
|
className: o,
|
|
2172
2634
|
children: [
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ c.jsx("span", { children: r.label }),
|
|
2636
|
+
/* @__PURE__ */ c.jsx(Qt, { size: 12 })
|
|
2175
2637
|
]
|
|
2176
2638
|
}
|
|
2177
|
-
) : /* @__PURE__ */
|
|
2639
|
+
) : /* @__PURE__ */ c.jsx(Jt, { to: r.href, className: o, children: /* @__PURE__ */ c.jsx("span", { children: r.label }) }) }, r.href + r.label);
|
|
2178
2640
|
}) })
|
|
2179
2641
|
]
|
|
2180
2642
|
},
|
|
@@ -2182,20 +2644,20 @@ const Xs = As({
|
|
|
2182
2644
|
))
|
|
2183
2645
|
}
|
|
2184
2646
|
),
|
|
2185
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "footer-after" })
|
|
2186
2648
|
]
|
|
2187
2649
|
}
|
|
2188
2650
|
),
|
|
2189
|
-
/* @__PURE__ */
|
|
2651
|
+
/* @__PURE__ */ c.jsxs(
|
|
2190
2652
|
"div",
|
|
2191
2653
|
{
|
|
2192
|
-
className:
|
|
2654
|
+
className: S(
|
|
2193
2655
|
"flex items-center justify-between",
|
|
2194
2656
|
t.columns && "border-t mt-8 pt-8"
|
|
2195
2657
|
),
|
|
2196
2658
|
children: [
|
|
2197
|
-
t.logo && /* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2659
|
+
t.logo && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2660
|
+
/* @__PURE__ */ c.jsx(
|
|
2199
2661
|
"img",
|
|
2200
2662
|
{
|
|
2201
2663
|
src: t.logo.src.light,
|
|
@@ -2204,7 +2666,7 @@ const Xs = As({
|
|
|
2204
2666
|
style: { width: t.logo.width }
|
|
2205
2667
|
}
|
|
2206
2668
|
),
|
|
2207
|
-
/* @__PURE__ */
|
|
2669
|
+
/* @__PURE__ */ c.jsx(
|
|
2208
2670
|
"img",
|
|
2209
2671
|
{
|
|
2210
2672
|
src: t.logo.src.dark,
|
|
@@ -2214,8 +2676,8 @@ const Xs = As({
|
|
|
2214
2676
|
}
|
|
2215
2677
|
)
|
|
2216
2678
|
] }),
|
|
2217
|
-
t.copyright && /* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2679
|
+
t.copyright && /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
|
|
2680
|
+
/* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ c.jsxs(
|
|
2219
2681
|
"a",
|
|
2220
2682
|
{
|
|
2221
2683
|
href: n.href,
|
|
@@ -2223,7 +2685,7 @@ const Xs = As({
|
|
|
2223
2685
|
rel: "noopener noreferrer",
|
|
2224
2686
|
className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
|
|
2225
2687
|
children: [
|
|
2226
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ c.jsx(Ii, { icon: n.icon }),
|
|
2227
2689
|
n.label
|
|
2228
2690
|
]
|
|
2229
2691
|
},
|
|
@@ -2233,87 +2695,87 @@ const Xs = As({
|
|
|
2233
2695
|
}
|
|
2234
2696
|
)
|
|
2235
2697
|
] }) }) : null;
|
|
2236
|
-
},
|
|
2698
|
+
}, yt = ({
|
|
2237
2699
|
shouldScaleBackground: e = !0,
|
|
2238
2700
|
...t
|
|
2239
|
-
}) => /* @__PURE__ */
|
|
2240
|
-
|
|
2701
|
+
}) => /* @__PURE__ */ c.jsx(
|
|
2702
|
+
T.Root,
|
|
2241
2703
|
{
|
|
2242
2704
|
shouldScaleBackground: e,
|
|
2243
2705
|
...t
|
|
2244
2706
|
}
|
|
2245
2707
|
);
|
|
2246
|
-
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2708
|
+
yt.displayName = "Drawer";
|
|
2709
|
+
const Di = T.Trigger, Ci = T.Portal, wt = q.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2710
|
+
T.Overlay,
|
|
2249
2711
|
{
|
|
2250
2712
|
ref: n,
|
|
2251
|
-
className:
|
|
2713
|
+
className: S("fixed inset-0 z-50 bg-black/80", e),
|
|
2252
2714
|
...t
|
|
2253
2715
|
}
|
|
2254
2716
|
));
|
|
2255
|
-
|
|
2256
|
-
const
|
|
2257
|
-
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
/* @__PURE__ */
|
|
2260
|
-
|
|
2717
|
+
wt.displayName = T.Overlay.displayName;
|
|
2718
|
+
const Ui = q.forwardRef(
|
|
2719
|
+
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ c.jsxs(Ci, { children: [
|
|
2720
|
+
/* @__PURE__ */ c.jsx(wt, {}),
|
|
2721
|
+
/* @__PURE__ */ c.jsxs(
|
|
2722
|
+
T.Content,
|
|
2261
2723
|
{
|
|
2262
2724
|
ref: o,
|
|
2263
|
-
className:
|
|
2725
|
+
className: S(
|
|
2264
2726
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2265
2727
|
e
|
|
2266
2728
|
),
|
|
2267
2729
|
...r,
|
|
2268
2730
|
children: [
|
|
2269
|
-
!n && /* @__PURE__ */
|
|
2731
|
+
!n && /* @__PURE__ */ c.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2270
2732
|
t
|
|
2271
2733
|
]
|
|
2272
2734
|
}
|
|
2273
2735
|
)
|
|
2274
2736
|
] })
|
|
2275
2737
|
);
|
|
2276
|
-
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2738
|
+
Ui.displayName = "DrawerContent";
|
|
2739
|
+
const Fi = q.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2740
|
+
T.Title,
|
|
2279
2741
|
{
|
|
2280
2742
|
ref: n,
|
|
2281
|
-
className:
|
|
2743
|
+
className: S(
|
|
2282
2744
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2283
2745
|
e
|
|
2284
2746
|
),
|
|
2285
2747
|
...t
|
|
2286
2748
|
}
|
|
2287
2749
|
));
|
|
2288
|
-
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2750
|
+
Fi.displayName = T.Title.displayName;
|
|
2751
|
+
const Ji = q.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
|
|
2752
|
+
T.Description,
|
|
2291
2753
|
{
|
|
2292
2754
|
ref: n,
|
|
2293
|
-
className:
|
|
2755
|
+
className: S("text-sm text-muted-foreground", e),
|
|
2294
2756
|
...t
|
|
2295
2757
|
}
|
|
2296
2758
|
));
|
|
2297
|
-
|
|
2298
|
-
const
|
|
2759
|
+
Ji.displayName = T.Description.displayName;
|
|
2760
|
+
const zt = ({
|
|
2299
2761
|
children: e,
|
|
2300
2762
|
className: t
|
|
2301
2763
|
}) => {
|
|
2302
|
-
const { options: n } =
|
|
2303
|
-
return
|
|
2764
|
+
const { options: n } = V(), r = Fe(null);
|
|
2765
|
+
return te(() => {
|
|
2304
2766
|
const o = r.current?.querySelector('[aria-current="page"]');
|
|
2305
|
-
|
|
2306
|
-
}, []), /* @__PURE__ */
|
|
2767
|
+
Lt(o ?? null);
|
|
2768
|
+
}, []), /* @__PURE__ */ c.jsxs(
|
|
2307
2769
|
"div",
|
|
2308
2770
|
{
|
|
2309
2771
|
className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r",
|
|
2310
2772
|
"data-pagefind-ignore": "all",
|
|
2311
2773
|
children: [
|
|
2312
|
-
/* @__PURE__ */
|
|
2774
|
+
/* @__PURE__ */ c.jsx(
|
|
2313
2775
|
"nav",
|
|
2314
2776
|
{
|
|
2315
2777
|
ref: r,
|
|
2316
|
-
className:
|
|
2778
|
+
className: S(
|
|
2317
2779
|
"hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
|
|
2318
2780
|
"-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
|
|
2319
2781
|
// Revert the padding/margin on the first child
|
|
@@ -2326,36 +2788,36 @@ const dt = ({
|
|
|
2326
2788
|
children: e
|
|
2327
2789
|
}
|
|
2328
2790
|
),
|
|
2329
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ c.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ c.jsx(Mt, {}) })
|
|
2330
2792
|
]
|
|
2331
2793
|
}
|
|
2332
2794
|
);
|
|
2333
2795
|
};
|
|
2334
|
-
|
|
2335
|
-
const
|
|
2796
|
+
zt.displayName = "NavigationWrapper";
|
|
2797
|
+
const Li = ({
|
|
2336
2798
|
onRequestClose: e,
|
|
2337
2799
|
navigation: t
|
|
2338
|
-
}) => /* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
t.map((n) => /* @__PURE__ */
|
|
2342
|
-
|
|
2800
|
+
}) => /* @__PURE__ */ c.jsxs(Bt, { children: [
|
|
2801
|
+
/* @__PURE__ */ c.jsxs(zt, { children: [
|
|
2802
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "navigation-before" }),
|
|
2803
|
+
t.map((n) => /* @__PURE__ */ c.jsx(
|
|
2804
|
+
ge,
|
|
2343
2805
|
{
|
|
2344
2806
|
item: n
|
|
2345
2807
|
},
|
|
2346
2808
|
n.type + (n.label ?? "") + ("path" in n ? n.path : "") + ("file" in n ? n.file : "") + ("to" in n ? n.to : "")
|
|
2347
2809
|
)),
|
|
2348
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "navigation-after" })
|
|
2349
2811
|
] }),
|
|
2350
|
-
/* @__PURE__ */
|
|
2351
|
-
|
|
2812
|
+
/* @__PURE__ */ c.jsx(
|
|
2813
|
+
on,
|
|
2352
2814
|
{
|
|
2353
|
-
className: "lg:hidden h-
|
|
2815
|
+
className: "lg:hidden h-dvh start-0 w-[320px] rounded-none",
|
|
2354
2816
|
"aria-describedby": void 0,
|
|
2355
|
-
children: /* @__PURE__ */
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
t.map((n) => /* @__PURE__ */
|
|
2358
|
-
|
|
2817
|
+
children: /* @__PURE__ */ c.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
2818
|
+
/* @__PURE__ */ c.jsx(an, { children: /* @__PURE__ */ c.jsx(sn, { children: "Navigation" }) }),
|
|
2819
|
+
t.map((n) => /* @__PURE__ */ c.jsx(
|
|
2820
|
+
ge,
|
|
2359
2821
|
{
|
|
2360
2822
|
item: n,
|
|
2361
2823
|
onRequestClose: e
|
|
@@ -2365,113 +2827,113 @@ const li = ({
|
|
|
2365
2827
|
] })
|
|
2366
2828
|
}
|
|
2367
2829
|
)
|
|
2368
|
-
] }),
|
|
2369
|
-
const [t, n] =
|
|
2370
|
-
return /* @__PURE__ */
|
|
2371
|
-
|
|
2830
|
+
] }), Mi = ({ children: e }) => {
|
|
2831
|
+
const [t, n] = St(!1), { navigation: r } = nn(), o = r.length > 0, i = Nt().state === "loading", { options: s } = V();
|
|
2832
|
+
return /* @__PURE__ */ c.jsxs(
|
|
2833
|
+
yt,
|
|
2372
2834
|
{
|
|
2373
|
-
direction:
|
|
2835
|
+
direction: s.site?.dir === "rtl" ? "right" : "left",
|
|
2374
2836
|
open: t,
|
|
2375
|
-
onOpenChange: (
|
|
2837
|
+
onOpenChange: (a) => n(a),
|
|
2376
2838
|
children: [
|
|
2377
|
-
o && /* @__PURE__ */
|
|
2378
|
-
|
|
2839
|
+
o && /* @__PURE__ */ c.jsx(
|
|
2840
|
+
Li,
|
|
2379
2841
|
{
|
|
2380
2842
|
onRequestClose: () => n(!1),
|
|
2381
2843
|
navigation: r
|
|
2382
2844
|
}
|
|
2383
2845
|
),
|
|
2384
|
-
o && /* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */
|
|
2846
|
+
o && /* @__PURE__ */ c.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ c.jsxs(Di, { className: "flex items-center gap-2 px-4", children: [
|
|
2847
|
+
/* @__PURE__ */ c.jsx(Xt, { size: 16, strokeWidth: 1.5 }),
|
|
2848
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Menu" })
|
|
2387
2849
|
] }) }),
|
|
2388
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ c.jsxs(
|
|
2389
2851
|
"main",
|
|
2390
2852
|
{
|
|
2391
2853
|
"data-pagefind-body": !0,
|
|
2392
|
-
className:
|
|
2854
|
+
className: S(
|
|
2393
2855
|
"px-4 lg:pe-8 lg:px-8",
|
|
2394
2856
|
!o && "col-span-full",
|
|
2395
|
-
|
|
2857
|
+
i && "animate-pulse"
|
|
2396
2858
|
),
|
|
2397
2859
|
children: [
|
|
2398
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "content-before" }),
|
|
2399
2861
|
e,
|
|
2400
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "content-after" })
|
|
2401
2863
|
]
|
|
2402
2864
|
}
|
|
2403
2865
|
)
|
|
2404
2866
|
]
|
|
2405
2867
|
}
|
|
2406
2868
|
);
|
|
2407
|
-
},
|
|
2408
|
-
const { authentication: t } =
|
|
2409
|
-
return
|
|
2869
|
+
}, Bi = () => /* @__PURE__ */ c.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ c.jsx(cn, {}) }), qi = ({ children: e }) => {
|
|
2870
|
+
const { authentication: t } = V();
|
|
2871
|
+
return qt(), Ni(), te(() => {
|
|
2410
2872
|
t?.onPageLoad?.();
|
|
2411
|
-
}, [t]), /* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2873
|
+
}, [t]), /* @__PURE__ */ c.jsxs(Vt, { children: [
|
|
2874
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "layout-before-head" }),
|
|
2875
|
+
/* @__PURE__ */ c.jsx(Wt, {}),
|
|
2876
|
+
/* @__PURE__ */ c.jsx(N.Target, { name: "layout-after-head" }),
|
|
2877
|
+
/* @__PURE__ */ c.jsx(
|
|
2416
2878
|
"div",
|
|
2417
2879
|
{
|
|
2418
|
-
className:
|
|
2880
|
+
className: S(
|
|
2419
2881
|
"grid max-w-screen-2xl w-full lg:mx-auto",
|
|
2420
2882
|
"[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
|
|
2421
2883
|
"grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
|
|
2422
2884
|
),
|
|
2423
|
-
children: /* @__PURE__ */
|
|
2885
|
+
children: /* @__PURE__ */ c.jsx(Pt, { fallback: /* @__PURE__ */ c.jsx(Bi, {}), children: /* @__PURE__ */ c.jsx(Mi, { children: e ?? /* @__PURE__ */ c.jsx(It, {}) }) })
|
|
2424
2886
|
}
|
|
2425
2887
|
),
|
|
2426
|
-
/* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ c.jsx(Ai, {})
|
|
2427
2889
|
] });
|
|
2428
|
-
},
|
|
2429
|
-
const { meta: t, options: n } =
|
|
2430
|
-
return /* @__PURE__ */
|
|
2431
|
-
/* @__PURE__ */
|
|
2432
|
-
n.canonicalUrlOrigin && /* @__PURE__ */
|
|
2890
|
+
}, Vi = ({ children: e }) => {
|
|
2891
|
+
const { meta: t, options: n } = V(), r = Je();
|
|
2892
|
+
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2893
|
+
/* @__PURE__ */ c.jsxs(De, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
|
|
2894
|
+
n.canonicalUrlOrigin && /* @__PURE__ */ c.jsx(
|
|
2433
2895
|
"link",
|
|
2434
2896
|
{
|
|
2435
2897
|
rel: "canonical",
|
|
2436
|
-
href:
|
|
2898
|
+
href: rn(
|
|
2437
2899
|
n.canonicalUrlOrigin,
|
|
2438
2900
|
n.basePath,
|
|
2439
2901
|
r.pathname
|
|
2440
2902
|
)
|
|
2441
2903
|
}
|
|
2442
2904
|
),
|
|
2443
|
-
t?.description && /* @__PURE__ */
|
|
2444
|
-
t?.favicon && /* @__PURE__ */
|
|
2445
|
-
t?.generator && /* @__PURE__ */
|
|
2446
|
-
t?.applicationName && /* @__PURE__ */
|
|
2447
|
-
t?.referrer && /* @__PURE__ */
|
|
2448
|
-
t?.keywords && t.keywords.length > 0 && /* @__PURE__ */
|
|
2449
|
-
t?.authors?.map((o) => /* @__PURE__ */
|
|
2450
|
-
t?.creator && /* @__PURE__ */
|
|
2451
|
-
t?.publisher && /* @__PURE__ */
|
|
2905
|
+
t?.description && /* @__PURE__ */ c.jsx("meta", { name: "description", content: t.description }),
|
|
2906
|
+
t?.favicon && /* @__PURE__ */ c.jsx("link", { rel: "icon", href: t.favicon }),
|
|
2907
|
+
t?.generator && /* @__PURE__ */ c.jsx("meta", { name: "generator", content: t.generator }),
|
|
2908
|
+
t?.applicationName && /* @__PURE__ */ c.jsx("meta", { name: "application-name", content: t.applicationName }),
|
|
2909
|
+
t?.referrer && /* @__PURE__ */ c.jsx("meta", { name: "referrer", content: t.referrer }),
|
|
2910
|
+
t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ c.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
|
|
2911
|
+
t?.authors?.map((o) => /* @__PURE__ */ c.jsx("meta", { name: "author", content: o }, o)),
|
|
2912
|
+
t?.creator && /* @__PURE__ */ c.jsx("meta", { name: "creator", content: t.creator }),
|
|
2913
|
+
t?.publisher && /* @__PURE__ */ c.jsx("meta", { name: "publisher", content: t.publisher })
|
|
2452
2914
|
] }),
|
|
2453
2915
|
e
|
|
2454
2916
|
] });
|
|
2455
|
-
},
|
|
2917
|
+
}, Wi = ({
|
|
2456
2918
|
title: e = "An error occurred",
|
|
2457
2919
|
message: t,
|
|
2458
2920
|
category: n
|
|
2459
|
-
}) => /* @__PURE__ */
|
|
2460
|
-
n && /* @__PURE__ */
|
|
2461
|
-
e && /* @__PURE__ */
|
|
2462
|
-
/* @__PURE__ */
|
|
2463
|
-
] }),
|
|
2464
|
-
const e =
|
|
2465
|
-
return /* @__PURE__ */
|
|
2466
|
-
/* @__PURE__ */
|
|
2467
|
-
/* @__PURE__ */
|
|
2921
|
+
}) => /* @__PURE__ */ c.jsxs(Le, { className: "h-full pt-(--padding-content-top)", children: [
|
|
2922
|
+
n && /* @__PURE__ */ c.jsx(Ve, { children: n }),
|
|
2923
|
+
e && /* @__PURE__ */ c.jsx(Me, { level: 1, className: "flex gap-3.5 items-center", children: e }),
|
|
2924
|
+
/* @__PURE__ */ c.jsx("p", { children: t })
|
|
2925
|
+
] }), bt = () => {
|
|
2926
|
+
const e = Rt();
|
|
2927
|
+
return /* @__PURE__ */ c.jsxs(Le, { className: "h-full pt-(--padding-content-top)", children: [
|
|
2928
|
+
/* @__PURE__ */ c.jsx(Ve, { children: "404" }),
|
|
2929
|
+
/* @__PURE__ */ c.jsxs(Me, { level: 1, className: "flex gap-3.5 items-center", children: [
|
|
2468
2930
|
"Page not found",
|
|
2469
|
-
/* @__PURE__ */
|
|
2931
|
+
/* @__PURE__ */ c.jsx(en, { size: 24 })
|
|
2470
2932
|
] }),
|
|
2471
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ c.jsxs(Kt, { children: [
|
|
2472
2934
|
"Start by adding a file at",
|
|
2473
2935
|
" ",
|
|
2474
|
-
/* @__PURE__ */
|
|
2936
|
+
/* @__PURE__ */ c.jsxs("code", { children: [
|
|
2475
2937
|
"{DOCUMENT_ROOT}",
|
|
2476
2938
|
"/",
|
|
2477
2939
|
e["*"],
|
|
@@ -2480,13 +2942,13 @@ const li = ({
|
|
|
2480
2942
|
" ",
|
|
2481
2943
|
"and add some content to make this error go away. By default",
|
|
2482
2944
|
" ",
|
|
2483
|
-
/* @__PURE__ */
|
|
2945
|
+
/* @__PURE__ */ c.jsx("code", { children: "DOCUMENT_ROOT" }),
|
|
2484
2946
|
" is the `pages` directory."
|
|
2485
2947
|
] }),
|
|
2486
|
-
/* @__PURE__ */
|
|
2487
|
-
/* @__PURE__ */
|
|
2948
|
+
/* @__PURE__ */ c.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
|
|
2949
|
+
/* @__PURE__ */ c.jsx(At, { to: "/", children: "Go back home" })
|
|
2488
2950
|
] });
|
|
2489
|
-
},
|
|
2951
|
+
}, Ki = (e) => {
|
|
2490
2952
|
switch (e) {
|
|
2491
2953
|
case 400:
|
|
2492
2954
|
return {
|
|
@@ -2549,12 +3011,12 @@ const li = ({
|
|
|
2549
3011
|
message: "Something went wrong while processing your request."
|
|
2550
3012
|
};
|
|
2551
3013
|
}
|
|
2552
|
-
},
|
|
3014
|
+
}, Hi = ({ statusCode: e, message: t }) => {
|
|
2553
3015
|
if (e === 404)
|
|
2554
|
-
return /* @__PURE__ */
|
|
2555
|
-
const n =
|
|
2556
|
-
return /* @__PURE__ */
|
|
2557
|
-
|
|
3016
|
+
return /* @__PURE__ */ c.jsx(bt, {});
|
|
3017
|
+
const n = Ki(e);
|
|
3018
|
+
return /* @__PURE__ */ c.jsx(
|
|
3019
|
+
Wi,
|
|
2558
3020
|
{
|
|
2559
3021
|
title: n.title,
|
|
2560
3022
|
message: t ?? n.message,
|
|
@@ -2562,24 +3024,24 @@ const li = ({
|
|
|
2562
3024
|
}
|
|
2563
3025
|
);
|
|
2564
3026
|
};
|
|
2565
|
-
function
|
|
2566
|
-
const t =
|
|
2567
|
-
return
|
|
3027
|
+
function Gi({ className: e }) {
|
|
3028
|
+
const t = Dt();
|
|
3029
|
+
return Ct(t) && t.status === 404 ? /* @__PURE__ */ c.jsx(bt, {}) : /* @__PURE__ */ c.jsx("div", { className: S("mx-4 max-w-2xl", e), children: /* @__PURE__ */ c.jsx(Be, { error: t }) });
|
|
2568
3030
|
}
|
|
2569
|
-
function
|
|
2570
|
-
return /* @__PURE__ */
|
|
3031
|
+
function Yi({ error: e }) {
|
|
3032
|
+
return /* @__PURE__ */ c.jsx(Be, { error: e });
|
|
2571
3033
|
}
|
|
2572
|
-
const
|
|
3034
|
+
const ga = qi, _a = Gi, va = Yi, ya = dn, wa = fn, za = Ht, ba = De, ka = Hi, $a = Ei, ja = Vi;
|
|
2573
3035
|
export {
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
3036
|
+
ya as Bootstrap,
|
|
3037
|
+
wa as BootstrapStatic,
|
|
3038
|
+
$a as BuildCheck,
|
|
3039
|
+
ba as Head,
|
|
3040
|
+
ga as Layout,
|
|
3041
|
+
ja as Meta,
|
|
3042
|
+
za as RouteGuard,
|
|
3043
|
+
_a as RouterError,
|
|
3044
|
+
va as ServerError,
|
|
3045
|
+
ka as StatusPage
|
|
2584
3046
|
};
|
|
2585
3047
|
//# sourceMappingURL=zudoku.__internal.js.map
|