zudoku 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +1 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +25 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +4 -4
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +4 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +17 -15
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +17 -6
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +1 -0
- package/dist/lib/oas/graphql/index.js +41 -23
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +2 -2
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/{Route.d.ts → OpenApiRoute.d.ts} +2 -1
- package/dist/lib/plugins/openapi/{Route.js → OpenApiRoute.js} +3 -4
- package/dist/lib/plugins/openapi/OpenApiRoute.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +4 -1
- package/dist/lib/plugins/openapi/OperationList.js +20 -14
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +6 -11
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +17 -14
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +47 -26
- package/dist/lib/plugins/openapi/graphql/graphql.js +20 -16
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +97 -54
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +7 -15
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/util/joinUrl.js +1 -1
- package/dist/lib/util/joinUrl.js.map +1 -1
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/vite/plugin-api.js +9 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/prerender.js +0 -1
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{AuthenticationPlugin-CO_YCd2x.js → AuthenticationPlugin-Du8cLBSr.js} +2 -2
- package/lib/{AuthenticationPlugin-CO_YCd2x.js.map → AuthenticationPlugin-Du8cLBSr.js.map} +1 -1
- package/lib/{Markdown-B8o9Qz4q.js → Markdown-Cyrx_JrO.js} +8 -9
- package/lib/{Markdown-B8o9Qz4q.js.map → Markdown-Cyrx_JrO.js.map} +1 -1
- package/lib/{MdxPage-BxRt3Ly7.js → MdxPage-BuG8Tuwc.js} +5 -5
- package/lib/{MdxPage-BxRt3Ly7.js.map → MdxPage-BuG8Tuwc.js.map} +1 -1
- package/lib/OpenApiRoute-UrC_t0e5.js +36 -0
- package/lib/OpenApiRoute-UrC_t0e5.js.map +1 -0
- package/lib/{OperationList-DH-zIgtq.js → OperationList-CDt1xdc4.js} +1312 -1303
- package/lib/OperationList-CDt1xdc4.js.map +1 -0
- package/lib/{Select-B7UXR0SB.js → Select-CnCZ4WhS.js} +3 -3
- package/lib/{Select-B7UXR0SB.js.map → Select-CnCZ4WhS.js.map} +1 -1
- package/lib/{SlotletProvider-CtIp8rP3.js → SlotletProvider-mQiPDQIH.js} +2 -2
- package/lib/{SlotletProvider-CtIp8rP3.js.map → SlotletProvider-mQiPDQIH.js.map} +1 -1
- package/lib/{SyntaxHighlight-C1w1QPdY.js → SyntaxHighlight-B0L4SC_N.js} +11 -5
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +1 -0
- package/lib/{ZudokuContext-8jts0fF3.js → ZudokuContext-BTUJPpQl.js} +21 -21
- package/lib/{ZudokuContext-8jts0fF3.js.map → ZudokuContext-BTUJPpQl.js.map} +1 -1
- package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
- package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
- package/lib/{createServer-BV0tHzLK.js → createServer-CjNktZzL.js} +821 -808
- package/lib/{createServer-BV0tHzLK.js.map → createServer-CjNktZzL.js.map} +1 -1
- package/lib/{hook-BG02esyv.js → hook-FT3SJLe_.js} +2 -2
- package/lib/{hook-BG02esyv.js.map → hook-FT3SJLe_.js.map} +1 -1
- package/lib/{index-LNp6rxyU.js → index-CjJS0l4l.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-CjJS0l4l.js.map} +1 -1
- package/lib/{index-DmqsUPcm.js → index-Eb1oiHbM.js} +881 -799
- package/lib/index-Eb1oiHbM.js.map +1 -0
- package/lib/{joinUrl-BTy9bvoK.js → joinUrl-nLx9pD-Z.js} +2 -2
- package/lib/joinUrl-nLx9pD-Z.js.map +1 -0
- package/lib/{useScrollToAnchor-Bl6mz9_x.js → useScrollToAnchor-BZsGmBng.js} +86 -90
- package/lib/useScrollToAnchor-BZsGmBng.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +364 -348
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -5
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +1 -1
- package/src/app/main.tsx +1 -2
- package/src/lib/components/PathRenderer.tsx +59 -0
- package/src/lib/components/ThemeSwitch.tsx +15 -14
- package/src/lib/components/index.ts +7 -5
- package/src/lib/components/navigation/SidebarCategory.tsx +44 -41
- package/src/lib/oas/graphql/circular.ts +27 -6
- package/src/lib/oas/graphql/index.ts +63 -35
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/{Route.tsx → OpenApiRoute.tsx} +3 -3
- package/src/lib/plugins/openapi/OperationList.tsx +34 -12
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +18 -27
- package/src/lib/plugins/openapi/SidecarExamples.tsx +24 -24
- package/src/lib/plugins/openapi/graphql/gql.ts +12 -4
- package/src/lib/plugins/openapi/graphql/graphql.ts +66 -43
- package/src/lib/plugins/openapi/index.tsx +125 -67
- package/src/lib/plugins/openapi/interfaces.ts +1 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +23 -33
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/lib/OperationList-DH-zIgtq.js.map +0 -1
- package/lib/Route-DJ0ZlVq1.js +0 -35
- package/lib/Route-DJ0ZlVq1.js.map +0 -1
- package/lib/StaggeredRender-DgsamH_G.js +0 -17
- package/lib/StaggeredRender-DgsamH_G.js.map +0 -1
- package/lib/SyntaxHighlight-C1w1QPdY.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-DmqsUPcm.js.map +0 -1
- package/lib/joinUrl-BTy9bvoK.js.map +0 -1
- package/lib/useScrollToAnchor-Bl6mz9_x.js.map +0 -1
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,52 +1,85 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
2
|
var Ie = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var pt = (t, a, s) => a in t ? ut(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
|
|
6
|
+
var X = (t, a, s) => pt(t, typeof a != "symbol" ? a + "" : a, s), ht = (t, a, s) => a.has(t) || Ie("Cannot " + s);
|
|
7
|
+
var Y = (t, a, s) => (ht(t, a, "read from private field"), s ? s.call(t) : a.get(t)), ee = (t, a, s) => a.has(t) ? Ie("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
|
|
8
8
|
import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
9
|
-
import {
|
|
10
|
-
import { Circle as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { s as te } from "./index-CjJS0l4l.js";
|
|
10
|
+
import { Circle as xt, ChevronRightIcon as z, CheckIcon as ft, DotIcon as gt, Check as yt, Search as vt, XIcon as jt, ChevronDownIcon as bt, InfoIcon as Ee, LogInIcon as Nt, CirclePlayIcon as wt } from "lucide-react";
|
|
11
|
+
import { m as Ct, r as $t } from "./chunk-SYFQ2XB5-BPvC-soB.js";
|
|
12
|
+
import { u as St } from "./hook-FT3SJLe_.js";
|
|
13
|
+
import { Button as _ } from "./ui/Button.js";
|
|
14
|
+
import { j as I } from "./joinUrl-nLx9pD-Z.js";
|
|
14
15
|
import { Z as Tt } from "./invariant-Caa8-XvF.js";
|
|
15
|
-
import { VisuallyHidden as
|
|
16
|
-
import * as
|
|
17
|
-
import {
|
|
18
|
-
import { V as
|
|
19
|
-
import { S as
|
|
20
|
-
import { b as ue, u as pe, C as
|
|
16
|
+
import { VisuallyHidden as Pt } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import * as x from "react";
|
|
18
|
+
import { Fragment as k, useRef as q, useEffect as He, useState as H, useTransition as kt } from "react";
|
|
19
|
+
import { V as b, T as Rt, D as Ot, b as It, a as Et, c as At } from "./index-B7mqiOei.js";
|
|
20
|
+
import { S as Be, a as Ge, b as Ue, c as Me, e as U, u as qt } from "./Select-CnCZ4WhS.js";
|
|
21
|
+
import { b as ue, u as pe, C as R, a as Dt, F as Lt } from "./index.esm-CrSoEshU.js";
|
|
21
22
|
import { c as he } from "./index-Djenk2Hj.js";
|
|
22
|
-
import { c } from "./cn-qaFjX9_3.js";
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
23
|
+
import { c as u } from "./cn-qaFjX9_3.js";
|
|
24
|
+
import * as _e from "@radix-ui/react-label";
|
|
25
|
+
import * as B from "@radix-ui/react-radio-group";
|
|
26
|
+
import { a as Vt } from "./state-mM7uaXTW.js";
|
|
27
|
+
import { k as Ft, l as zt } from "./ZudokuContext-BTUJPpQl.js";
|
|
28
|
+
import { Card as xe, CardHeader as Ht, CardTitle as Bt, CardContent as Gt } from "./ui/Card.js";
|
|
29
|
+
import { Tabs as Je, TabsList as Qe, TabsTrigger as E, TabsContent as A } from "./ui/Tabs.js";
|
|
30
|
+
import { z as Ut, S as Mt } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
31
|
+
import { B as M, S as _t } from "./Spinner-BlzrEEk1.js";
|
|
30
32
|
import * as g from "@radix-ui/react-dropdown-menu";
|
|
31
|
-
import * as
|
|
33
|
+
import * as ie from "@radix-ui/react-checkbox";
|
|
32
34
|
import * as J from "@radix-ui/react-popover";
|
|
33
|
-
import { PopoverAnchor as
|
|
35
|
+
import { PopoverAnchor as Jt } from "@radix-ui/react-popover";
|
|
34
36
|
import { Input as fe } from "./ui/Input.js";
|
|
35
|
-
import { Slot as
|
|
36
|
-
import { Callout as
|
|
37
|
-
import { Collapsible as Ae, CollapsibleTrigger as qe, CollapsibleContent as
|
|
37
|
+
import { Slot as Qt } from "@radix-ui/react-slot";
|
|
38
|
+
import { Callout as Wt } from "./ui/Callout.js";
|
|
39
|
+
import { Collapsible as Ae, CollapsibleTrigger as qe, CollapsibleContent as De } from "./ui/Collapsible.js";
|
|
38
40
|
import * as ge from "@radix-ui/react-collapsible";
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
let ae;
|
|
42
|
+
const Zt = (t) => {
|
|
43
|
+
var a;
|
|
44
|
+
if ((a = t.errors) != null && a[0])
|
|
45
|
+
throw new Tt(t.errors[0].message, {
|
|
46
|
+
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var W, Z;
|
|
50
|
+
class Kt {
|
|
51
|
+
constructor(a) {
|
|
52
|
+
ee(this, W, async () => (ae || (ae = import("./createServer-CjNktZzL.js").then(
|
|
53
|
+
(a) => a.createServer(this.config)
|
|
54
|
+
)), ae));
|
|
55
|
+
ee(this, Z, async (a) => this.config.server ? fetch(this.config.server, a) : (await Y(this, W).call(this)).fetch("http://localhost/graphql", a));
|
|
56
|
+
X(this, "fetch", async (a, ...[s]) => {
|
|
57
|
+
var r;
|
|
58
|
+
const n = (r = a.match(/query (\w+)/)) == null ? void 0 : r[1], i = await Y(this, Z).call(this, {
|
|
59
|
+
method: "POST",
|
|
60
|
+
body: JSON.stringify({ query: a, variables: s, operationName: n }),
|
|
61
|
+
headers: { "Content-Type": "application/json" }
|
|
62
|
+
});
|
|
63
|
+
if (!i.ok)
|
|
64
|
+
throw new Error("Network response was not ok");
|
|
65
|
+
const d = await i.json();
|
|
66
|
+
return Zt(d), d.data;
|
|
67
|
+
});
|
|
68
|
+
this.config = a;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
W = new WeakMap(), Z = new WeakMap();
|
|
72
|
+
class D extends String {
|
|
73
|
+
constructor(s, n) {
|
|
74
|
+
super(s);
|
|
75
|
+
X(this, "__apiType");
|
|
76
|
+
this.value = s, this.__meta__ = n;
|
|
44
77
|
}
|
|
45
78
|
toString() {
|
|
46
79
|
return this.value;
|
|
47
80
|
}
|
|
48
81
|
}
|
|
49
|
-
const
|
|
82
|
+
const Xt = new D(
|
|
50
83
|
`
|
|
51
84
|
fragment OperationsFragment on OperationItem {
|
|
52
85
|
slug
|
|
@@ -111,7 +144,7 @@ const Gt = new H(
|
|
|
111
144
|
}
|
|
112
145
|
`,
|
|
113
146
|
{ fragmentName: "OperationsFragment" }
|
|
114
|
-
),
|
|
147
|
+
), Yt = new D(`
|
|
115
148
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
116
149
|
schema(input: $input, type: $type) {
|
|
117
150
|
url
|
|
@@ -120,21 +153,21 @@ const Gt = new H(
|
|
|
120
153
|
}
|
|
121
154
|
}
|
|
122
155
|
}
|
|
123
|
-
`),
|
|
124
|
-
query AllOperations($input: JSON!, $type: SchemaType
|
|
156
|
+
`), ea = new D(`
|
|
157
|
+
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
125
158
|
schema(input: $input, type: $type) {
|
|
126
159
|
description
|
|
127
160
|
summary
|
|
128
161
|
title
|
|
129
162
|
url
|
|
130
163
|
version
|
|
131
|
-
tags {
|
|
164
|
+
tags(name: $tag) {
|
|
132
165
|
name
|
|
133
166
|
description
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
167
|
+
}
|
|
168
|
+
operations(tag: $tag, untagged: $untagged) {
|
|
169
|
+
slug
|
|
170
|
+
...OperationsFragment
|
|
138
171
|
}
|
|
139
172
|
}
|
|
140
173
|
}
|
|
@@ -198,7 +231,7 @@ const Gt = new H(
|
|
|
198
231
|
schema
|
|
199
232
|
}
|
|
200
233
|
}
|
|
201
|
-
}`),
|
|
234
|
+
}`), ta = new D(`
|
|
202
235
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
203
236
|
schema(input: $input, type: $type) {
|
|
204
237
|
url
|
|
@@ -207,67 +240,40 @@ const Gt = new H(
|
|
|
207
240
|
}
|
|
208
241
|
}
|
|
209
242
|
}
|
|
210
|
-
`),
|
|
243
|
+
`), aa = new D(`
|
|
211
244
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
212
245
|
schema(input: $input, type: $type) {
|
|
213
246
|
url
|
|
214
247
|
tags {
|
|
215
|
-
__typename
|
|
216
248
|
name
|
|
217
|
-
operations {
|
|
218
|
-
__typename
|
|
219
|
-
slug
|
|
220
|
-
deprecated
|
|
221
|
-
method
|
|
222
|
-
summary
|
|
223
|
-
operationId
|
|
224
|
-
path
|
|
225
|
-
}
|
|
226
249
|
}
|
|
227
250
|
}
|
|
228
251
|
}
|
|
229
|
-
`),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
252
|
+
`), sa = new D(`
|
|
253
|
+
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
254
|
+
schema(input: $input, type: $type) {
|
|
255
|
+
operations(tag: $tag, untagged: $untagged) {
|
|
256
|
+
slug
|
|
257
|
+
deprecated
|
|
258
|
+
method
|
|
259
|
+
summary
|
|
260
|
+
operationId
|
|
261
|
+
path
|
|
262
|
+
}
|
|
263
|
+
}
|
|
238
264
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
265
|
+
`), na = {
|
|
266
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Yt,
|
|
267
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Xt,
|
|
268
|
+
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": ea,
|
|
269
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ta,
|
|
270
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": aa,
|
|
271
|
+
"\n query GetOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n operations(tag: $tag, untagged: $untagged) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": sa
|
|
246
272
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
constructor(s) {
|
|
250
|
-
se(this, W, async () => (ae || (ae = import("./createServer-BV0tHzLK.js").then(
|
|
251
|
-
(s) => s.createServer(this.config)
|
|
252
|
-
)), ae));
|
|
253
|
-
se(this, Z, async (s) => this.config.server ? fetch(this.config.server, s) : (await te(this, W).call(this)).fetch("http://localhost/graphql", s));
|
|
254
|
-
ee(this, "fetch", async (s, ...[a]) => {
|
|
255
|
-
var l;
|
|
256
|
-
const n = (l = s.match(/query (\w+)/)) == null ? void 0 : l[1], o = await te(this, Z).call(this, {
|
|
257
|
-
method: "POST",
|
|
258
|
-
body: JSON.stringify({ query: s, variables: a, operationName: n }),
|
|
259
|
-
headers: { "Content-Type": "application/json" }
|
|
260
|
-
});
|
|
261
|
-
if (!o.ok)
|
|
262
|
-
throw new Error("Network response was not ok");
|
|
263
|
-
const i = await o.json();
|
|
264
|
-
return Yt(i), i.data;
|
|
265
|
-
});
|
|
266
|
-
this.config = s;
|
|
267
|
-
}
|
|
273
|
+
function We(t) {
|
|
274
|
+
return na[t] ?? {};
|
|
268
275
|
}
|
|
269
|
-
|
|
270
|
-
const ts = he(
|
|
276
|
+
const ra = he(
|
|
271
277
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
272
278
|
{
|
|
273
279
|
variants: {
|
|
@@ -280,339 +286,362 @@ const ts = he(
|
|
|
280
286
|
variant: "default"
|
|
281
287
|
}
|
|
282
288
|
}
|
|
283
|
-
),
|
|
289
|
+
), le = x.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
284
290
|
"div",
|
|
285
291
|
{
|
|
286
292
|
ref: n,
|
|
287
293
|
role: "alert",
|
|
288
|
-
className:
|
|
289
|
-
...
|
|
294
|
+
className: u(ra({ variant: a }), t),
|
|
295
|
+
...s
|
|
290
296
|
}
|
|
291
297
|
));
|
|
292
|
-
|
|
293
|
-
const de =
|
|
298
|
+
le.displayName = "Alert";
|
|
299
|
+
const de = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
294
300
|
"h5",
|
|
295
301
|
{
|
|
296
|
-
ref:
|
|
297
|
-
className:
|
|
298
|
-
...
|
|
302
|
+
ref: s,
|
|
303
|
+
className: u("mb-1 font-medium leading-none tracking-tight", t),
|
|
304
|
+
...a
|
|
299
305
|
}
|
|
300
306
|
));
|
|
301
307
|
de.displayName = "AlertTitle";
|
|
302
|
-
const ce =
|
|
308
|
+
const ce = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
303
309
|
"div",
|
|
304
310
|
{
|
|
305
|
-
ref:
|
|
306
|
-
className:
|
|
307
|
-
...
|
|
311
|
+
ref: s,
|
|
312
|
+
className: u("text-sm [&_p]:leading-relaxed", t),
|
|
313
|
+
...a
|
|
308
314
|
}
|
|
309
315
|
));
|
|
310
316
|
ce.displayName = "AlertDescription";
|
|
311
|
-
const
|
|
317
|
+
const oa = ({
|
|
318
|
+
path: t,
|
|
319
|
+
renderParam: a
|
|
320
|
+
}) => t.split("/").map((s, n, i) => {
|
|
321
|
+
const d = Array.from(s.matchAll(/{([^}]+)}/g)), r = [];
|
|
322
|
+
let m = 0;
|
|
323
|
+
return d.forEach((c, h) => {
|
|
324
|
+
const [y, v] = c;
|
|
325
|
+
if (!v) return;
|
|
326
|
+
const p = c.index;
|
|
327
|
+
p > m && r.push(
|
|
328
|
+
/* @__PURE__ */ e.jsx(k, { children: s.slice(m, p) }, `text-${m}-${p}`)
|
|
329
|
+
), r.push(
|
|
330
|
+
/* @__PURE__ */ e.jsx(k, { children: a({ name: v, originalValue: y, index: h }) }, `param-${v}`)
|
|
331
|
+
), m = p + y.length;
|
|
332
|
+
}), m < s.length && r.push(
|
|
333
|
+
/* @__PURE__ */ e.jsx(k, { children: s.slice(m) }, `text-${m}-${s.length}`)
|
|
334
|
+
), // eslint-disable-next-line react/no-array-index-key
|
|
335
|
+
/* @__PURE__ */ e.jsxs(k, { children: [
|
|
336
|
+
r,
|
|
337
|
+
n < i.length - 1 && "/",
|
|
338
|
+
/* @__PURE__ */ e.jsx("wbr", {})
|
|
339
|
+
] }, `${s}-${n}`);
|
|
340
|
+
}), ia = he(
|
|
312
341
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
313
|
-
),
|
|
314
|
-
|
|
342
|
+
), V = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
343
|
+
_e.Root,
|
|
315
344
|
{
|
|
316
|
-
ref:
|
|
317
|
-
className:
|
|
318
|
-
...
|
|
345
|
+
ref: s,
|
|
346
|
+
className: u(ia(), t),
|
|
347
|
+
...a
|
|
319
348
|
}
|
|
320
349
|
));
|
|
321
|
-
|
|
322
|
-
const ye =
|
|
323
|
-
|
|
350
|
+
V.displayName = _e.Root.displayName;
|
|
351
|
+
const ye = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
352
|
+
B.Root,
|
|
324
353
|
{
|
|
325
|
-
className:
|
|
326
|
-
...
|
|
327
|
-
ref:
|
|
354
|
+
className: u("grid gap-2", t),
|
|
355
|
+
...a,
|
|
356
|
+
ref: s
|
|
328
357
|
}
|
|
329
358
|
));
|
|
330
|
-
ye.displayName =
|
|
331
|
-
const Q =
|
|
332
|
-
|
|
359
|
+
ye.displayName = B.Root.displayName;
|
|
360
|
+
const Q = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
361
|
+
B.Item,
|
|
333
362
|
{
|
|
334
|
-
ref:
|
|
335
|
-
className:
|
|
363
|
+
ref: s,
|
|
364
|
+
className: u(
|
|
336
365
|
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
337
366
|
t
|
|
338
367
|
),
|
|
339
|
-
...
|
|
340
|
-
children: /* @__PURE__ */ e.jsx(
|
|
368
|
+
...a,
|
|
369
|
+
children: /* @__PURE__ */ e.jsx(B.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(xt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
341
370
|
}
|
|
342
371
|
));
|
|
343
|
-
Q.displayName =
|
|
344
|
-
const
|
|
345
|
-
({ className: t, ...
|
|
372
|
+
Q.displayName = B.Item.displayName;
|
|
373
|
+
const Ze = x.forwardRef(
|
|
374
|
+
({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
346
375
|
"textarea",
|
|
347
376
|
{
|
|
348
|
-
className:
|
|
377
|
+
className: u(
|
|
349
378
|
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
350
379
|
t
|
|
351
380
|
),
|
|
352
|
-
ref:
|
|
353
|
-
...
|
|
381
|
+
ref: s,
|
|
382
|
+
...a
|
|
354
383
|
}
|
|
355
384
|
)
|
|
356
385
|
);
|
|
357
|
-
|
|
358
|
-
const
|
|
386
|
+
Ze.displayName = "Textarea";
|
|
387
|
+
const se = (t) => Math.abs(
|
|
359
388
|
isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
|
|
360
|
-
),
|
|
361
|
-
const
|
|
362
|
-
return `${
|
|
363
|
-
},
|
|
364
|
-
const { resolvedTheme:
|
|
389
|
+
), ne = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${se(a) + se(s)}`)) : se(t), Le = (t, a = {}) => {
|
|
390
|
+
const s = (3 * ne(t) + 2 * ne(t) + ne(t)) % 360, { saturation: n = 75, lightness: i = 60 } = a;
|
|
391
|
+
return `${s}deg ${n}% ${i}%`;
|
|
392
|
+
}, re = "data-linked-param", la = (t) => {
|
|
393
|
+
const { resolvedTheme: a } = Ut();
|
|
365
394
|
return {
|
|
366
|
-
text:
|
|
395
|
+
text: Le(
|
|
367
396
|
t,
|
|
368
|
-
|
|
397
|
+
a === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
369
398
|
),
|
|
370
|
-
background:
|
|
399
|
+
background: Le(
|
|
371
400
|
t,
|
|
372
|
-
|
|
401
|
+
a === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
373
402
|
)
|
|
374
403
|
};
|
|
375
|
-
},
|
|
404
|
+
}, Ke = ({
|
|
376
405
|
name: t,
|
|
377
|
-
className:
|
|
378
|
-
slug:
|
|
406
|
+
className: a,
|
|
407
|
+
slug: s,
|
|
379
408
|
title: n,
|
|
380
|
-
children:
|
|
381
|
-
onClick:
|
|
409
|
+
children: i,
|
|
410
|
+
onClick: d
|
|
382
411
|
}) => {
|
|
383
|
-
const
|
|
384
|
-
return
|
|
385
|
-
if (!
|
|
412
|
+
const r = q(null), m = s == null ? void 0 : s.replace(/[{}]/g, ""), c = t.replace(/[{}]/g, ""), { text: h, background: y } = la(c), v = `hsl(${h} / 100%)`, p = `hsl(${y} / 10%)`, l = `hsl(${y} / 50%)`;
|
|
413
|
+
return He(() => {
|
|
414
|
+
if (!m || !r.current) return;
|
|
386
415
|
const f = () => {
|
|
387
|
-
document.querySelectorAll(`[${
|
|
416
|
+
document.querySelectorAll(`[${re}="${m}"]`).forEach(($) => {
|
|
388
417
|
$ instanceof HTMLElement && ($.dataset.active = "true");
|
|
389
418
|
});
|
|
390
419
|
}, C = () => {
|
|
391
|
-
document.querySelectorAll(`[${
|
|
420
|
+
document.querySelectorAll(`[${re}="${m}"]`).forEach(($) => {
|
|
392
421
|
$ instanceof HTMLElement && ($.dataset.active = "false");
|
|
393
422
|
});
|
|
394
|
-
}, N =
|
|
423
|
+
}, N = r.current;
|
|
395
424
|
return N.addEventListener("mouseenter", f), N.addEventListener("mouseleave", C), () => {
|
|
396
425
|
N.removeEventListener("mouseenter", f), N.removeEventListener("mouseleave", C);
|
|
397
426
|
};
|
|
398
|
-
}, [
|
|
427
|
+
}, [m]), /* @__PURE__ */ e.jsx(
|
|
399
428
|
"span",
|
|
400
429
|
{
|
|
401
|
-
[
|
|
402
|
-
className:
|
|
403
|
-
|
|
404
|
-
"rounded-lg",
|
|
430
|
+
[re]: m,
|
|
431
|
+
className: u(
|
|
432
|
+
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
433
|
+
"relative rounded transition-all duration-100 rounded-lg",
|
|
405
434
|
"border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
|
|
406
|
-
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]
|
|
407
|
-
|
|
435
|
+
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
|
|
436
|
+
a
|
|
408
437
|
),
|
|
409
438
|
title: n,
|
|
410
439
|
suppressHydrationWarning: !0,
|
|
411
|
-
ref:
|
|
412
|
-
onClick:
|
|
440
|
+
ref: r,
|
|
441
|
+
onClick: d,
|
|
413
442
|
style: {
|
|
414
|
-
"--param-color":
|
|
415
|
-
"--border-color":
|
|
416
|
-
"--background-color":
|
|
443
|
+
"--param-color": v,
|
|
444
|
+
"--border-color": l,
|
|
445
|
+
"--background-color": p
|
|
417
446
|
},
|
|
418
|
-
children:
|
|
447
|
+
children: i ?? t
|
|
419
448
|
}
|
|
420
449
|
);
|
|
421
|
-
},
|
|
422
|
-
const n =
|
|
423
|
-
var
|
|
424
|
-
const
|
|
425
|
-
return ((
|
|
426
|
-
}),
|
|
450
|
+
}, da = (t, a, s) => {
|
|
451
|
+
const n = a.replace(/(:\w+|\{\w+})/g, (d) => {
|
|
452
|
+
var c;
|
|
453
|
+
const r = d.replace(/[:{}]/g, "");
|
|
454
|
+
return ((c = s.pathParams.find((h) => h.name === r)) == null ? void 0 : c.value) ?? d;
|
|
455
|
+
}), i = new URL(
|
|
427
456
|
n.replace(/^\//, ""),
|
|
428
457
|
t.endsWith("/") ? t : `${t}/`
|
|
429
458
|
);
|
|
430
|
-
return
|
|
431
|
-
|
|
432
|
-
}),
|
|
433
|
-
},
|
|
459
|
+
return s.queryParams.filter((d) => d.active).forEach((d) => {
|
|
460
|
+
i.searchParams.set(d.name, d.value);
|
|
461
|
+
}), i;
|
|
462
|
+
}, Xe = g.Root, Ye = g.Trigger, ca = g.Group, ma = x.forwardRef(({ className: t, inset: a, children: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
|
|
434
463
|
g.SubTrigger,
|
|
435
464
|
{
|
|
436
|
-
ref:
|
|
437
|
-
className:
|
|
465
|
+
ref: i,
|
|
466
|
+
className: u(
|
|
438
467
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
439
|
-
|
|
468
|
+
a && "pl-8",
|
|
440
469
|
t
|
|
441
470
|
),
|
|
442
471
|
...n,
|
|
443
472
|
children: [
|
|
444
|
-
|
|
445
|
-
/* @__PURE__ */ e.jsx(
|
|
473
|
+
s,
|
|
474
|
+
/* @__PURE__ */ e.jsx(z, { className: "ml-auto h-4 w-4" })
|
|
446
475
|
]
|
|
447
476
|
}
|
|
448
477
|
));
|
|
449
|
-
|
|
450
|
-
const
|
|
478
|
+
ma.displayName = g.SubTrigger.displayName;
|
|
479
|
+
const ua = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
451
480
|
g.SubContent,
|
|
452
481
|
{
|
|
453
|
-
ref:
|
|
454
|
-
className:
|
|
482
|
+
ref: s,
|
|
483
|
+
className: u(
|
|
455
484
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
456
485
|
t
|
|
457
486
|
),
|
|
458
|
-
...
|
|
487
|
+
...a
|
|
459
488
|
}
|
|
460
489
|
));
|
|
461
|
-
|
|
462
|
-
const ve =
|
|
490
|
+
ua.displayName = g.SubContent.displayName;
|
|
491
|
+
const ve = x.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(g.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
463
492
|
g.Content,
|
|
464
493
|
{
|
|
465
494
|
ref: n,
|
|
466
|
-
sideOffset:
|
|
467
|
-
className:
|
|
495
|
+
sideOffset: a,
|
|
496
|
+
className: u(
|
|
468
497
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
469
498
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
470
499
|
t
|
|
471
500
|
),
|
|
472
|
-
...
|
|
501
|
+
...s
|
|
473
502
|
}
|
|
474
503
|
) }));
|
|
475
504
|
ve.displayName = g.Content.displayName;
|
|
476
|
-
const je =
|
|
505
|
+
const je = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
477
506
|
g.Item,
|
|
478
507
|
{
|
|
479
508
|
ref: n,
|
|
480
|
-
className:
|
|
509
|
+
className: u(
|
|
481
510
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
482
|
-
|
|
511
|
+
a && "pl-8",
|
|
483
512
|
t
|
|
484
513
|
),
|
|
485
|
-
...
|
|
514
|
+
...s
|
|
486
515
|
}
|
|
487
516
|
));
|
|
488
517
|
je.displayName = g.Item.displayName;
|
|
489
|
-
const
|
|
518
|
+
const pa = x.forwardRef(({ className: t, children: a, checked: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
|
|
490
519
|
g.CheckboxItem,
|
|
491
520
|
{
|
|
492
|
-
ref:
|
|
493
|
-
className:
|
|
521
|
+
ref: i,
|
|
522
|
+
className: u(
|
|
494
523
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
495
524
|
t
|
|
496
525
|
),
|
|
497
|
-
checked:
|
|
526
|
+
checked: s,
|
|
498
527
|
...n,
|
|
499
528
|
children: [
|
|
500
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(
|
|
501
|
-
|
|
529
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(ft, { className: "h-4 w-4" }) }) }),
|
|
530
|
+
a
|
|
502
531
|
]
|
|
503
532
|
}
|
|
504
533
|
));
|
|
505
|
-
|
|
506
|
-
const
|
|
534
|
+
pa.displayName = g.CheckboxItem.displayName;
|
|
535
|
+
const ha = x.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
|
|
507
536
|
g.RadioItem,
|
|
508
537
|
{
|
|
509
538
|
ref: n,
|
|
510
|
-
className:
|
|
539
|
+
className: u(
|
|
511
540
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
512
541
|
t
|
|
513
542
|
),
|
|
514
|
-
...
|
|
543
|
+
...s,
|
|
515
544
|
children: [
|
|
516
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(
|
|
517
|
-
|
|
545
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(gt, { className: "h-4 w-4 fill-current" }) }) }),
|
|
546
|
+
a
|
|
518
547
|
]
|
|
519
548
|
}
|
|
520
549
|
));
|
|
521
|
-
|
|
522
|
-
const
|
|
550
|
+
ha.displayName = g.RadioItem.displayName;
|
|
551
|
+
const et = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
523
552
|
g.Label,
|
|
524
553
|
{
|
|
525
554
|
ref: n,
|
|
526
|
-
className:
|
|
555
|
+
className: u(
|
|
527
556
|
"px-2 py-1.5 text-sm font-semibold",
|
|
528
|
-
|
|
557
|
+
a && "pl-8",
|
|
529
558
|
t
|
|
530
559
|
),
|
|
531
|
-
...
|
|
560
|
+
...s
|
|
532
561
|
}
|
|
533
562
|
));
|
|
534
|
-
|
|
535
|
-
const
|
|
563
|
+
et.displayName = g.Label.displayName;
|
|
564
|
+
const tt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
536
565
|
g.Separator,
|
|
537
566
|
{
|
|
538
|
-
ref:
|
|
539
|
-
className:
|
|
540
|
-
...
|
|
567
|
+
ref: s,
|
|
568
|
+
className: u("-mx-1 my-1 h-px bg-muted", t),
|
|
569
|
+
...a
|
|
541
570
|
}
|
|
542
571
|
));
|
|
543
|
-
|
|
544
|
-
const
|
|
572
|
+
tt.displayName = g.Separator.displayName;
|
|
573
|
+
const xa = ({
|
|
545
574
|
examples: t,
|
|
546
|
-
onSelect:
|
|
547
|
-
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(
|
|
548
|
-
/* @__PURE__ */ e.jsx(
|
|
549
|
-
/* @__PURE__ */ e.jsx(ve, { className: "w-56", children: t.map((
|
|
575
|
+
onSelect: a
|
|
576
|
+
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(Xe, { children: [
|
|
577
|
+
/* @__PURE__ */ e.jsx(Ye, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "outline", children: "Use Example" }) }),
|
|
578
|
+
/* @__PURE__ */ e.jsx(ve, { className: "w-56", children: t.map((s) => {
|
|
550
579
|
var n;
|
|
551
580
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
552
|
-
/* @__PURE__ */ e.jsx(
|
|
553
|
-
/* @__PURE__ */ e.jsx(
|
|
554
|
-
/* @__PURE__ */ e.jsx(
|
|
581
|
+
/* @__PURE__ */ e.jsx(et, { children: s.mediaType }),
|
|
582
|
+
/* @__PURE__ */ e.jsx(tt, {}),
|
|
583
|
+
/* @__PURE__ */ e.jsx(ca, { children: (n = s.examples) == null ? void 0 : n.map((i) => /* @__PURE__ */ e.jsx(
|
|
555
584
|
je,
|
|
556
585
|
{
|
|
557
|
-
onSelect: () =>
|
|
586
|
+
onSelect: () => a(i),
|
|
558
587
|
className: "line-clamp-1",
|
|
559
|
-
children:
|
|
588
|
+
children: i.summary ?? i.name
|
|
560
589
|
},
|
|
561
|
-
|
|
590
|
+
i.name
|
|
562
591
|
)) })
|
|
563
|
-
] },
|
|
592
|
+
] }, s.mediaType);
|
|
564
593
|
}) })
|
|
565
|
-
] }) }), K =
|
|
594
|
+
] }) }), K = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
566
595
|
"div",
|
|
567
596
|
{
|
|
568
|
-
ref:
|
|
569
|
-
className:
|
|
597
|
+
ref: s,
|
|
598
|
+
className: u(
|
|
570
599
|
"rounded-xl border bg-card text-card-foreground shadow-sm",
|
|
571
600
|
t
|
|
572
601
|
),
|
|
573
|
-
...
|
|
602
|
+
...a
|
|
574
603
|
}
|
|
575
604
|
));
|
|
576
605
|
K.displayName = "Card";
|
|
577
|
-
const
|
|
606
|
+
const fa = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
578
607
|
"div",
|
|
579
608
|
{
|
|
580
|
-
ref:
|
|
581
|
-
className:
|
|
582
|
-
...
|
|
609
|
+
ref: s,
|
|
610
|
+
className: u("flex flex-col space-y-1.5 p-6", t),
|
|
611
|
+
...a
|
|
583
612
|
}
|
|
584
613
|
));
|
|
585
|
-
|
|
586
|
-
const
|
|
614
|
+
fa.displayName = "CardHeader";
|
|
615
|
+
const ga = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
587
616
|
"h3",
|
|
588
617
|
{
|
|
589
|
-
ref:
|
|
590
|
-
className:
|
|
591
|
-
...
|
|
618
|
+
ref: s,
|
|
619
|
+
className: u("font-semibold leading-none tracking-tight", t),
|
|
620
|
+
...a
|
|
592
621
|
}
|
|
593
622
|
));
|
|
594
|
-
|
|
595
|
-
const
|
|
623
|
+
ga.displayName = "CardTitle";
|
|
624
|
+
const ya = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
596
625
|
"p",
|
|
597
626
|
{
|
|
598
|
-
ref:
|
|
599
|
-
className:
|
|
600
|
-
...
|
|
627
|
+
ref: s,
|
|
628
|
+
className: u("text-sm text-muted-foreground", t),
|
|
629
|
+
...a
|
|
601
630
|
}
|
|
602
631
|
));
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
const
|
|
632
|
+
ya.displayName = "CardDescription";
|
|
633
|
+
const va = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: u("p-6 pt-0", t), ...a }));
|
|
634
|
+
va.displayName = "CardContent";
|
|
635
|
+
const ja = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
607
636
|
"div",
|
|
608
637
|
{
|
|
609
|
-
ref:
|
|
610
|
-
className:
|
|
611
|
-
...
|
|
638
|
+
ref: s,
|
|
639
|
+
className: u("flex items-center p-6 pt-0", t),
|
|
640
|
+
...a
|
|
612
641
|
}
|
|
613
642
|
));
|
|
614
|
-
|
|
615
|
-
const
|
|
643
|
+
ja.displayName = "CardFooter";
|
|
644
|
+
const ba = he(
|
|
616
645
|
"peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
617
646
|
{
|
|
618
647
|
variants: {
|
|
@@ -625,210 +654,210 @@ const fs = he(
|
|
|
625
654
|
variant: "default"
|
|
626
655
|
}
|
|
627
656
|
}
|
|
628
|
-
), be =
|
|
629
|
-
|
|
657
|
+
), be = x.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
658
|
+
ie.Root,
|
|
630
659
|
{
|
|
631
660
|
ref: n,
|
|
632
|
-
className:
|
|
633
|
-
...
|
|
661
|
+
className: u(ba({ variant: a, className: t })),
|
|
662
|
+
...s,
|
|
634
663
|
children: /* @__PURE__ */ e.jsx(
|
|
635
|
-
|
|
664
|
+
ie.Indicator,
|
|
636
665
|
{
|
|
637
|
-
className:
|
|
638
|
-
children: /* @__PURE__ */ e.jsx(
|
|
666
|
+
className: u("flex items-center justify-center text-current"),
|
|
667
|
+
children: /* @__PURE__ */ e.jsx(yt, { className: "h-4 w-4" })
|
|
639
668
|
}
|
|
640
669
|
)
|
|
641
670
|
}
|
|
642
671
|
));
|
|
643
|
-
be.displayName =
|
|
644
|
-
const
|
|
645
|
-
|
|
672
|
+
be.displayName = ie.Root.displayName;
|
|
673
|
+
const at = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
674
|
+
b,
|
|
646
675
|
{
|
|
647
|
-
ref:
|
|
648
|
-
className:
|
|
676
|
+
ref: s,
|
|
677
|
+
className: u(
|
|
649
678
|
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
650
679
|
t
|
|
651
680
|
),
|
|
652
|
-
...
|
|
681
|
+
...a
|
|
653
682
|
}
|
|
654
683
|
));
|
|
655
|
-
|
|
656
|
-
const
|
|
684
|
+
at.displayName = b.displayName;
|
|
685
|
+
const Na = x.forwardRef(({ className: t, ...a }, s) => (
|
|
657
686
|
// eslint-disable-next-line react/no-unknown-property
|
|
658
687
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
659
|
-
/* @__PURE__ */ e.jsx(
|
|
688
|
+
/* @__PURE__ */ e.jsx(vt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
660
689
|
/* @__PURE__ */ e.jsx(
|
|
661
|
-
|
|
690
|
+
b.Input,
|
|
662
691
|
{
|
|
663
|
-
ref:
|
|
664
|
-
className:
|
|
692
|
+
ref: s,
|
|
693
|
+
className: u(
|
|
665
694
|
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
666
695
|
t
|
|
667
696
|
),
|
|
668
|
-
...
|
|
697
|
+
...a
|
|
669
698
|
}
|
|
670
699
|
)
|
|
671
700
|
] })
|
|
672
701
|
));
|
|
673
|
-
|
|
674
|
-
const st =
|
|
702
|
+
Na.displayName = b.Input.displayName;
|
|
703
|
+
const st = x.forwardRef(({ className: t, ...a }, s) => (
|
|
675
704
|
// eslint-disable-next-line react/no-unknown-property
|
|
676
705
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
|
|
677
|
-
|
|
706
|
+
b.Input,
|
|
678
707
|
{
|
|
679
|
-
ref:
|
|
680
|
-
className:
|
|
708
|
+
ref: s,
|
|
709
|
+
className: u(
|
|
681
710
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
682
711
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
683
712
|
t
|
|
684
713
|
),
|
|
685
|
-
...
|
|
714
|
+
...a
|
|
686
715
|
}
|
|
687
716
|
) })
|
|
688
717
|
));
|
|
689
|
-
st.displayName =
|
|
690
|
-
const
|
|
691
|
-
|
|
718
|
+
st.displayName = b.Input.displayName;
|
|
719
|
+
const nt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
720
|
+
b.List,
|
|
692
721
|
{
|
|
693
|
-
ref:
|
|
694
|
-
className:
|
|
695
|
-
...
|
|
722
|
+
ref: s,
|
|
723
|
+
className: u("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
|
|
724
|
+
...a
|
|
696
725
|
}
|
|
697
726
|
));
|
|
698
|
-
|
|
699
|
-
const
|
|
700
|
-
|
|
727
|
+
nt.displayName = b.List.displayName;
|
|
728
|
+
const wa = x.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
|
|
729
|
+
b.Empty,
|
|
701
730
|
{
|
|
702
|
-
ref:
|
|
731
|
+
ref: a,
|
|
703
732
|
className: "py-6 text-center text-sm",
|
|
704
733
|
...t
|
|
705
734
|
}
|
|
706
735
|
));
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
|
|
736
|
+
wa.displayName = b.Empty.displayName;
|
|
737
|
+
const Ca = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
738
|
+
b.Group,
|
|
710
739
|
{
|
|
711
|
-
ref:
|
|
712
|
-
className:
|
|
740
|
+
ref: s,
|
|
741
|
+
className: u(
|
|
713
742
|
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
714
743
|
t
|
|
715
744
|
),
|
|
716
|
-
...
|
|
745
|
+
...a
|
|
717
746
|
}
|
|
718
747
|
));
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
748
|
+
Ca.displayName = b.Group.displayName;
|
|
749
|
+
const $a = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
750
|
+
b.Separator,
|
|
722
751
|
{
|
|
723
|
-
ref:
|
|
724
|
-
className:
|
|
725
|
-
...
|
|
752
|
+
ref: s,
|
|
753
|
+
className: u("-mx-1 h-px bg-border", t),
|
|
754
|
+
...a
|
|
726
755
|
}
|
|
727
756
|
));
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
|
|
757
|
+
$a.displayName = b.Separator.displayName;
|
|
758
|
+
const rt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
759
|
+
b.Item,
|
|
731
760
|
{
|
|
732
|
-
ref:
|
|
733
|
-
className:
|
|
761
|
+
ref: s,
|
|
762
|
+
className: u(
|
|
734
763
|
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
735
764
|
t
|
|
736
765
|
),
|
|
737
|
-
...
|
|
766
|
+
...a
|
|
738
767
|
}
|
|
739
768
|
));
|
|
740
|
-
|
|
741
|
-
const
|
|
769
|
+
rt.displayName = b.Item.displayName;
|
|
770
|
+
const Sa = J.Root, ot = x.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, i) => /* @__PURE__ */ e.jsx(J.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
742
771
|
J.Content,
|
|
743
772
|
{
|
|
744
|
-
ref:
|
|
745
|
-
align:
|
|
746
|
-
sideOffset:
|
|
747
|
-
className:
|
|
773
|
+
ref: i,
|
|
774
|
+
align: a,
|
|
775
|
+
sideOffset: s,
|
|
776
|
+
className: u(
|
|
748
777
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
749
778
|
t
|
|
750
779
|
),
|
|
751
780
|
...n
|
|
752
781
|
}
|
|
753
782
|
) }));
|
|
754
|
-
|
|
755
|
-
const
|
|
783
|
+
ot.displayName = J.Content.displayName;
|
|
784
|
+
const Ta = ({
|
|
756
785
|
value: t,
|
|
757
|
-
options:
|
|
758
|
-
onChange:
|
|
786
|
+
options: a,
|
|
787
|
+
onChange: s,
|
|
759
788
|
className: n,
|
|
760
|
-
placeholder:
|
|
761
|
-
onEnterPress:
|
|
762
|
-
ref:
|
|
789
|
+
placeholder: i = "Enter value",
|
|
790
|
+
onEnterPress: d,
|
|
791
|
+
ref: r
|
|
763
792
|
}) => {
|
|
764
|
-
const [
|
|
765
|
-
return /* @__PURE__ */ e.jsxs(
|
|
766
|
-
/* @__PURE__ */ e.jsx(
|
|
793
|
+
const [m, c] = H(!1), [h, y] = H(!1), v = Rt((l) => l.filtered.count), p = q(null);
|
|
794
|
+
return /* @__PURE__ */ e.jsxs(Sa, { open: m, children: [
|
|
795
|
+
/* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(
|
|
767
796
|
st,
|
|
768
797
|
{
|
|
769
|
-
ref: (
|
|
770
|
-
|
|
798
|
+
ref: (l) => {
|
|
799
|
+
p.current = l, typeof r == "function" ? r(l) : r && (r.current = l);
|
|
771
800
|
},
|
|
772
801
|
value: t,
|
|
773
|
-
placeholder:
|
|
774
|
-
className:
|
|
775
|
-
onFocus: () =>
|
|
802
|
+
placeholder: i,
|
|
803
|
+
className: u("h-9 bg-transparent", n),
|
|
804
|
+
onFocus: () => c(!0),
|
|
776
805
|
onBlur: () => {
|
|
777
|
-
h ||
|
|
806
|
+
h || c(!1);
|
|
778
807
|
},
|
|
779
|
-
onKeyDown: (
|
|
808
|
+
onKeyDown: (l) => {
|
|
780
809
|
var f;
|
|
781
|
-
|
|
810
|
+
l.key === "Enter" && (c(!1), (f = p.current) == null || f.blur(), d == null || d(l));
|
|
782
811
|
},
|
|
783
|
-
onValueChange: (
|
|
812
|
+
onValueChange: (l) => s(l)
|
|
784
813
|
}
|
|
785
814
|
) }),
|
|
786
815
|
/* @__PURE__ */ e.jsx(
|
|
787
|
-
|
|
816
|
+
ot,
|
|
788
817
|
{
|
|
789
|
-
onMouseEnter: () =>
|
|
790
|
-
onMouseLeave: () =>
|
|
791
|
-
onOpenAutoFocus: (
|
|
792
|
-
className:
|
|
793
|
-
"border-0":
|
|
818
|
+
onMouseEnter: () => y(!0),
|
|
819
|
+
onMouseLeave: () => y(!1),
|
|
820
|
+
onOpenAutoFocus: (l) => l.preventDefault(),
|
|
821
|
+
className: u("p-0 w-[--radix-popover-trigger-width]", {
|
|
822
|
+
"border-0": v === 0
|
|
794
823
|
}),
|
|
795
824
|
align: "start",
|
|
796
825
|
side: "bottom",
|
|
797
|
-
onWheel: (
|
|
798
|
-
|
|
826
|
+
onWheel: (l) => {
|
|
827
|
+
l.stopPropagation();
|
|
799
828
|
},
|
|
800
|
-
onTouchMove: (
|
|
801
|
-
|
|
829
|
+
onTouchMove: (l) => {
|
|
830
|
+
l.stopPropagation();
|
|
802
831
|
},
|
|
803
|
-
children: /* @__PURE__ */ e.jsx(
|
|
804
|
-
|
|
832
|
+
children: /* @__PURE__ */ e.jsx(nt, { className: "max-h-[140px]", children: a.map((l) => /* @__PURE__ */ e.jsx(
|
|
833
|
+
rt,
|
|
805
834
|
{
|
|
806
|
-
value:
|
|
835
|
+
value: l,
|
|
807
836
|
onSelect: (f) => {
|
|
808
|
-
|
|
837
|
+
s(f), c(!1);
|
|
809
838
|
},
|
|
810
839
|
className: "cursor-pointer",
|
|
811
|
-
children:
|
|
840
|
+
children: l
|
|
812
841
|
},
|
|
813
|
-
|
|
842
|
+
l
|
|
814
843
|
)) })
|
|
815
844
|
}
|
|
816
845
|
)
|
|
817
846
|
] });
|
|
818
|
-
}, me = (t) => /* @__PURE__ */ e.jsx(
|
|
819
|
-
const
|
|
820
|
-
const
|
|
821
|
-
return
|
|
822
|
-
...
|
|
823
|
-
ref:
|
|
824
|
-
className: typeof
|
|
847
|
+
}, me = (t) => /* @__PURE__ */ e.jsx(at, { className: "bg-transparent", children: /* @__PURE__ */ e.jsx(Ta, { ...t }) }), it = (t, a) => {
|
|
848
|
+
const s = x.forwardRef(({ className: n, asChild: i, ...d }, r) => {
|
|
849
|
+
const m = i ? Qt : t;
|
|
850
|
+
return x.createElement(m, {
|
|
851
|
+
...d,
|
|
852
|
+
ref: r,
|
|
853
|
+
className: typeof a == "function" ? a({ className: n }) : u(a, n)
|
|
825
854
|
});
|
|
826
855
|
});
|
|
827
|
-
return
|
|
828
|
-
}, Ne =
|
|
856
|
+
return s.displayName = `VariantComponent(${t})`, s;
|
|
857
|
+
}, Ne = it(
|
|
829
858
|
"div",
|
|
830
859
|
"hover:bg-accent/40 grid grid-cols-[2fr_3fr] gap-2 items-center px-3"
|
|
831
|
-
),
|
|
860
|
+
), Pa = Object.freeze([
|
|
832
861
|
"Accept",
|
|
833
862
|
"Accept-Encoding",
|
|
834
863
|
"Accept-Language",
|
|
@@ -855,67 +884,67 @@ const Ns = ({
|
|
|
855
884
|
"Set-Cookie",
|
|
856
885
|
"User-Agent",
|
|
857
886
|
"X-Requested-With"
|
|
858
|
-
]),
|
|
887
|
+
]), ka = ({
|
|
859
888
|
control: t,
|
|
860
|
-
register:
|
|
889
|
+
register: a
|
|
861
890
|
}) => {
|
|
862
|
-
const { fields:
|
|
891
|
+
const { fields: s, append: n, remove: i } = ue({
|
|
863
892
|
control: t,
|
|
864
893
|
name: "headers"
|
|
865
|
-
}), { setValue:
|
|
894
|
+
}), { setValue: d } = pe(), r = q([]), m = q([]), c = () => {
|
|
866
895
|
n({
|
|
867
896
|
name: "",
|
|
868
897
|
value: "",
|
|
869
898
|
active: !1
|
|
870
899
|
});
|
|
871
|
-
}, h = (
|
|
872
|
-
var
|
|
873
|
-
(
|
|
874
|
-
},
|
|
875
|
-
|
|
876
|
-
var
|
|
877
|
-
return (
|
|
900
|
+
}, h = (v) => {
|
|
901
|
+
var p;
|
|
902
|
+
(p = r.current[v]) == null || p.focus();
|
|
903
|
+
}, y = (v) => {
|
|
904
|
+
c(), requestAnimationFrame(() => {
|
|
905
|
+
var p;
|
|
906
|
+
return (p = m.current[v + 1]) == null ? void 0 : p.focus();
|
|
878
907
|
});
|
|
879
908
|
};
|
|
880
909
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
881
|
-
/* @__PURE__ */ e.jsx(K, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ne, { children:
|
|
910
|
+
/* @__PURE__ */ e.jsx(K, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ne, { children: s.map((v, p) => /* @__PURE__ */ e.jsxs("div", { className: "group grid col-span-full grid-cols-subgrid", children: [
|
|
882
911
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
883
912
|
/* @__PURE__ */ e.jsx(
|
|
884
|
-
|
|
913
|
+
R,
|
|
885
914
|
{
|
|
886
915
|
control: t,
|
|
887
|
-
name: `headers.${
|
|
888
|
-
render: ({ field:
|
|
916
|
+
name: `headers.${p}.active`,
|
|
917
|
+
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
889
918
|
be,
|
|
890
919
|
{
|
|
891
920
|
variant: "outline",
|
|
892
|
-
id: `headers.${
|
|
893
|
-
checked:
|
|
921
|
+
id: `headers.${p}.active`,
|
|
922
|
+
checked: l.value,
|
|
894
923
|
onCheckedChange: (f) => {
|
|
895
|
-
|
|
924
|
+
l.onChange(f);
|
|
896
925
|
}
|
|
897
926
|
}
|
|
898
927
|
)
|
|
899
928
|
}
|
|
900
929
|
),
|
|
901
930
|
/* @__PURE__ */ e.jsx(
|
|
902
|
-
|
|
931
|
+
R,
|
|
903
932
|
{
|
|
904
933
|
control: t,
|
|
905
|
-
name: `headers.${
|
|
906
|
-
render: ({ field:
|
|
934
|
+
name: `headers.${p}.name`,
|
|
935
|
+
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
907
936
|
me,
|
|
908
937
|
{
|
|
909
|
-
...
|
|
938
|
+
...l,
|
|
910
939
|
placeholder: "Name",
|
|
911
940
|
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
912
|
-
options:
|
|
913
|
-
onEnterPress: () => h(
|
|
941
|
+
options: Pa,
|
|
942
|
+
onEnterPress: () => h(p),
|
|
914
943
|
onChange: (f) => {
|
|
915
|
-
|
|
944
|
+
l.onChange(f), d(`headers.${p}.active`, !0);
|
|
916
945
|
},
|
|
917
946
|
ref: (f) => {
|
|
918
|
-
|
|
947
|
+
m.current[p] = f;
|
|
919
948
|
}
|
|
920
949
|
}
|
|
921
950
|
)
|
|
@@ -924,21 +953,21 @@ const Ns = ({
|
|
|
924
953
|
] }),
|
|
925
954
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
926
955
|
/* @__PURE__ */ e.jsx(
|
|
927
|
-
|
|
956
|
+
R,
|
|
928
957
|
{
|
|
929
958
|
control: t,
|
|
930
|
-
name: `headers.${
|
|
931
|
-
render: ({ field:
|
|
959
|
+
name: `headers.${p}.value`,
|
|
960
|
+
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
932
961
|
fe,
|
|
933
962
|
{
|
|
934
963
|
placeholder: "Value",
|
|
935
964
|
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
936
|
-
...
|
|
965
|
+
...l,
|
|
937
966
|
ref: (f) => {
|
|
938
|
-
|
|
967
|
+
r.current[p] = f;
|
|
939
968
|
},
|
|
940
969
|
onKeyDown: (f) => {
|
|
941
|
-
f.key === "Enter" && f.currentTarget.value.trim() &&
|
|
970
|
+
f.key === "Enter" && f.currentTarget.value.trim() && y(p);
|
|
942
971
|
},
|
|
943
972
|
autoComplete: "off"
|
|
944
973
|
}
|
|
@@ -946,63 +975,63 @@ const Ns = ({
|
|
|
946
975
|
}
|
|
947
976
|
),
|
|
948
977
|
/* @__PURE__ */ e.jsx(
|
|
949
|
-
|
|
978
|
+
_,
|
|
950
979
|
{
|
|
951
980
|
size: "icon",
|
|
952
981
|
variant: "ghost",
|
|
953
982
|
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
954
983
|
onClick: () => {
|
|
955
|
-
|
|
984
|
+
i(p);
|
|
956
985
|
},
|
|
957
986
|
type: "button",
|
|
958
|
-
children: /* @__PURE__ */ e.jsx(
|
|
987
|
+
children: /* @__PURE__ */ e.jsx(jt, { size: 16 })
|
|
959
988
|
}
|
|
960
989
|
)
|
|
961
990
|
] })
|
|
962
|
-
] },
|
|
991
|
+
] }, p)) }) }),
|
|
963
992
|
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
964
|
-
|
|
993
|
+
_,
|
|
965
994
|
{
|
|
966
995
|
className: "",
|
|
967
|
-
onClick:
|
|
996
|
+
onClick: c,
|
|
968
997
|
type: "button",
|
|
969
998
|
variant: "secondary",
|
|
970
999
|
children: "Add header"
|
|
971
1000
|
}
|
|
972
1001
|
) })
|
|
973
1002
|
] });
|
|
974
|
-
},
|
|
1003
|
+
}, Ra = ({
|
|
975
1004
|
control: t
|
|
976
1005
|
}) => {
|
|
977
|
-
const { fields:
|
|
1006
|
+
const { fields: a } = ue({
|
|
978
1007
|
control: t,
|
|
979
1008
|
name: "pathParams"
|
|
980
1009
|
});
|
|
981
|
-
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ne, { children:
|
|
1010
|
+
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ne, { children: a.map((s, n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
982
1011
|
/* @__PURE__ */ e.jsx(
|
|
983
|
-
|
|
1012
|
+
R,
|
|
984
1013
|
{
|
|
985
1014
|
control: t,
|
|
986
|
-
name: `pathParams.${n}.
|
|
1015
|
+
name: `pathParams.${n}.name`,
|
|
987
1016
|
render: () => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
988
|
-
|
|
1017
|
+
Ke,
|
|
989
1018
|
{
|
|
990
|
-
slug:
|
|
991
|
-
name:
|
|
1019
|
+
slug: s.name,
|
|
1020
|
+
name: s.name,
|
|
992
1021
|
className: "font-mono text-xs px-2"
|
|
993
1022
|
}
|
|
994
1023
|
) })
|
|
995
1024
|
}
|
|
996
1025
|
),
|
|
997
1026
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
998
|
-
|
|
1027
|
+
R,
|
|
999
1028
|
{
|
|
1000
1029
|
control: t,
|
|
1001
1030
|
name: `pathParams.${n}.value`,
|
|
1002
|
-
render: ({ field:
|
|
1031
|
+
render: ({ field: i }) => /* @__PURE__ */ e.jsx(
|
|
1003
1032
|
fe,
|
|
1004
1033
|
{
|
|
1005
|
-
...
|
|
1034
|
+
...i,
|
|
1006
1035
|
required: !0,
|
|
1007
1036
|
placeholder: "Enter value",
|
|
1008
1037
|
className: "w-full border-0 shadow-none text-xs font-mono hover:bg-accent"
|
|
@@ -1011,101 +1040,101 @@ const Ns = ({
|
|
|
1011
1040
|
}
|
|
1012
1041
|
) })
|
|
1013
1042
|
] })) }) });
|
|
1014
|
-
},
|
|
1043
|
+
}, Oa = it(
|
|
1015
1044
|
"input",
|
|
1016
1045
|
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
1017
|
-
),
|
|
1046
|
+
), Ia = ({
|
|
1018
1047
|
control: t,
|
|
1019
|
-
queryParams:
|
|
1048
|
+
queryParams: a
|
|
1020
1049
|
}) => {
|
|
1021
|
-
const { fields:
|
|
1050
|
+
const { fields: s } = ue({
|
|
1022
1051
|
control: t,
|
|
1023
1052
|
name: "queryParams"
|
|
1024
|
-
}), n = pe(),
|
|
1025
|
-
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children:
|
|
1026
|
-
const
|
|
1027
|
-
(
|
|
1053
|
+
}), n = pe(), i = a.map((d) => !!d.isRequired);
|
|
1054
|
+
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: s.map((d, r) => {
|
|
1055
|
+
const m = a.find(
|
|
1056
|
+
(c) => c.name === d.name
|
|
1028
1057
|
);
|
|
1029
1058
|
return /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
1030
1059
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1031
1060
|
/* @__PURE__ */ e.jsx(
|
|
1032
|
-
|
|
1061
|
+
R,
|
|
1033
1062
|
{
|
|
1034
1063
|
control: t,
|
|
1035
|
-
name: `queryParams.${
|
|
1036
|
-
render: ({ field:
|
|
1064
|
+
name: `queryParams.${r}.active`,
|
|
1065
|
+
render: ({ field: c }) => /* @__PURE__ */ e.jsx(
|
|
1037
1066
|
be,
|
|
1038
1067
|
{
|
|
1039
1068
|
variant: "outline",
|
|
1040
|
-
id: `queryParams.${
|
|
1069
|
+
id: `queryParams.${r}.active`,
|
|
1041
1070
|
className: "mr-2",
|
|
1042
|
-
checked:
|
|
1043
|
-
onCheckedChange:
|
|
1071
|
+
checked: c.value,
|
|
1072
|
+
onCheckedChange: c.onChange
|
|
1044
1073
|
}
|
|
1045
1074
|
)
|
|
1046
1075
|
}
|
|
1047
1076
|
),
|
|
1048
1077
|
/* @__PURE__ */ e.jsx(
|
|
1049
|
-
|
|
1078
|
+
R,
|
|
1050
1079
|
{
|
|
1051
1080
|
control: t,
|
|
1052
|
-
render: ({ field:
|
|
1081
|
+
render: ({ field: c }) => i[r] ? /* @__PURE__ */ e.jsx(Oa, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1053
1082
|
"label",
|
|
1054
1083
|
{
|
|
1055
1084
|
className: "flex items-center cursor-pointer gap-1",
|
|
1056
|
-
htmlFor: `queryParams.${
|
|
1057
|
-
title:
|
|
1085
|
+
htmlFor: `queryParams.${r}.active`,
|
|
1086
|
+
title: i[r] ? "Required field" : void 0,
|
|
1058
1087
|
children: [
|
|
1059
|
-
|
|
1060
|
-
|
|
1088
|
+
c.value,
|
|
1089
|
+
i[r] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
|
|
1061
1090
|
]
|
|
1062
1091
|
}
|
|
1063
1092
|
) }) : /* @__PURE__ */ e.jsx(
|
|
1064
1093
|
me,
|
|
1065
1094
|
{
|
|
1066
|
-
value:
|
|
1067
|
-
options:
|
|
1095
|
+
value: c.value,
|
|
1096
|
+
options: a.map((h) => h.name),
|
|
1068
1097
|
onChange: (h) => {
|
|
1069
|
-
|
|
1098
|
+
c.onChange(h);
|
|
1070
1099
|
},
|
|
1071
1100
|
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
1072
1101
|
}
|
|
1073
1102
|
),
|
|
1074
|
-
name: `queryParams.${
|
|
1103
|
+
name: `queryParams.${r}.name`
|
|
1075
1104
|
}
|
|
1076
1105
|
)
|
|
1077
1106
|
] }),
|
|
1078
1107
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
1079
|
-
|
|
1108
|
+
R,
|
|
1080
1109
|
{
|
|
1081
1110
|
control: t,
|
|
1082
|
-
render: ({ field:
|
|
1111
|
+
render: ({ field: c }) => (m == null ? void 0 : m.enum) && m.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1083
1112
|
me,
|
|
1084
1113
|
{
|
|
1085
|
-
value:
|
|
1086
|
-
options:
|
|
1087
|
-
onChange: (
|
|
1088
|
-
|
|
1114
|
+
value: c.value,
|
|
1115
|
+
options: m.enum ?? [],
|
|
1116
|
+
onChange: (y) => {
|
|
1117
|
+
c.onChange(y), n.setValue(`queryParams.${r}.active`, !0);
|
|
1089
1118
|
},
|
|
1090
1119
|
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
1091
1120
|
}
|
|
1092
1121
|
) : /* @__PURE__ */ e.jsx(
|
|
1093
1122
|
fe,
|
|
1094
1123
|
{
|
|
1095
|
-
...
|
|
1096
|
-
onChange: (
|
|
1097
|
-
|
|
1124
|
+
...c,
|
|
1125
|
+
onChange: (y) => {
|
|
1126
|
+
c.onChange(y.target.value), y.target.value.length > 0 && n.setValue(`queryParams.${r}.active`, !0);
|
|
1098
1127
|
},
|
|
1099
1128
|
placeholder: "Enter value",
|
|
1100
1129
|
className: "w-full border-0 shadow-none text-xs font-mono"
|
|
1101
1130
|
}
|
|
1102
1131
|
),
|
|
1103
|
-
name: `queryParams.${
|
|
1132
|
+
name: `queryParams.${r}.value`
|
|
1104
1133
|
}
|
|
1105
1134
|
) })
|
|
1106
|
-
] },
|
|
1135
|
+
] }, d.id);
|
|
1107
1136
|
}) }) });
|
|
1108
|
-
},
|
|
1137
|
+
}, T = {
|
|
1109
1138
|
green: "text-green-600",
|
|
1110
1139
|
blue: "text-sky-600",
|
|
1111
1140
|
yellow: "text-yellow-600",
|
|
@@ -1113,48 +1142,48 @@ const Ns = ({
|
|
|
1113
1142
|
purple: "text-purple-600",
|
|
1114
1143
|
indigo: "text-indigo-600",
|
|
1115
1144
|
gray: "text-gray-600"
|
|
1116
|
-
},
|
|
1117
|
-
get:
|
|
1118
|
-
post:
|
|
1119
|
-
put:
|
|
1120
|
-
delete:
|
|
1121
|
-
patch:
|
|
1122
|
-
options:
|
|
1123
|
-
head:
|
|
1124
|
-
trace:
|
|
1125
|
-
},
|
|
1145
|
+
}, Ea = {
|
|
1146
|
+
get: T.green,
|
|
1147
|
+
post: T.blue,
|
|
1148
|
+
put: T.yellow,
|
|
1149
|
+
delete: T.red,
|
|
1150
|
+
patch: T.purple,
|
|
1151
|
+
options: T.indigo,
|
|
1152
|
+
head: T.gray,
|
|
1153
|
+
trace: T.gray
|
|
1154
|
+
}, Aa = (t) => Ea[t.toLocaleLowerCase()] ?? T.gray, qa = ({
|
|
1126
1155
|
method: t,
|
|
1127
|
-
url:
|
|
1128
|
-
headers:
|
|
1156
|
+
url: a,
|
|
1157
|
+
headers: s,
|
|
1129
1158
|
body: n
|
|
1130
1159
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
1131
1160
|
/* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
1132
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
1161
|
+
/* @__PURE__ */ e.jsx("span", { className: u(Aa(t), "font-semibold"), children: t }),
|
|
1133
1162
|
" ",
|
|
1134
|
-
/* @__PURE__ */ e.jsx("span", { className: "break-all", children:
|
|
1163
|
+
/* @__PURE__ */ e.jsx("span", { className: "break-all", children: a }),
|
|
1135
1164
|
" ",
|
|
1136
1165
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
1137
1166
|
] }),
|
|
1138
1167
|
/* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
1139
1168
|
/* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
|
|
1140
1169
|
/* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1141
|
-
/* @__PURE__ */ e.jsx(
|
|
1170
|
+
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1142
1171
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1143
1172
|
] }),
|
|
1144
|
-
/* @__PURE__ */ e.jsx(
|
|
1145
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children:
|
|
1146
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-words", children:
|
|
1147
|
-
] },
|
|
1173
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([i, d]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1174
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children: i }),
|
|
1175
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-words", children: d })
|
|
1176
|
+
] }, i)) }) })
|
|
1148
1177
|
] }),
|
|
1149
1178
|
/* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
|
|
1150
1179
|
/* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1151
|
-
/* @__PURE__ */ e.jsx(
|
|
1180
|
+
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1152
1181
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
|
|
1153
1182
|
] }),
|
|
1154
|
-
/* @__PURE__ */ e.jsx(
|
|
1183
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
|
|
1155
1184
|
"div",
|
|
1156
1185
|
{
|
|
1157
|
-
className:
|
|
1186
|
+
className: u(
|
|
1158
1187
|
"whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
|
|
1159
1188
|
!n && "text-muted-foreground"
|
|
1160
1189
|
),
|
|
@@ -1168,24 +1197,24 @@ function we(t) {
|
|
|
1168
1197
|
if (t === null) return "null";
|
|
1169
1198
|
if (Array.isArray(t)) {
|
|
1170
1199
|
if (t.length === 0) return "any[]";
|
|
1171
|
-
const
|
|
1172
|
-
return
|
|
1200
|
+
const a = t[0];
|
|
1201
|
+
return a === void 0 ? "any[]" : `${we(a)}[]`;
|
|
1173
1202
|
}
|
|
1174
|
-
return typeof t == "object" ?
|
|
1203
|
+
return typeof t == "object" ? Da(t) : typeof t;
|
|
1175
1204
|
}
|
|
1176
|
-
function
|
|
1177
|
-
const
|
|
1178
|
-
for (const [n,
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1205
|
+
function Da(t, a = "") {
|
|
1206
|
+
const s = ["{"];
|
|
1207
|
+
for (const [n, i] of Object.entries(t)) {
|
|
1208
|
+
const d = we(i);
|
|
1209
|
+
s.push(` ${n}: ${d};`);
|
|
1181
1210
|
}
|
|
1182
|
-
return
|
|
1211
|
+
return s.push("}"), s.join(`
|
|
1183
1212
|
`);
|
|
1184
1213
|
}
|
|
1185
|
-
function
|
|
1214
|
+
function La(t) {
|
|
1186
1215
|
return { lines: [`type GeneratedType = ${we(t)};`] };
|
|
1187
1216
|
}
|
|
1188
|
-
const
|
|
1217
|
+
const Va = {
|
|
1189
1218
|
200: "OK",
|
|
1190
1219
|
201: "Created",
|
|
1191
1220
|
202: "Accepted",
|
|
@@ -1196,9 +1225,9 @@ const Es = {
|
|
|
1196
1225
|
404: "Not Found",
|
|
1197
1226
|
405: "Method Not Allowed",
|
|
1198
1227
|
500: "Internal Server Error"
|
|
1199
|
-
},
|
|
1200
|
-
var
|
|
1201
|
-
return (
|
|
1228
|
+
}, Fa = (t) => {
|
|
1229
|
+
var s;
|
|
1230
|
+
return (s = Object.entries({
|
|
1202
1231
|
"application/json": "json",
|
|
1203
1232
|
"text/json": "json",
|
|
1204
1233
|
"text/html": "html",
|
|
@@ -1208,19 +1237,19 @@ const Es = {
|
|
|
1208
1237
|
"application/xhtml+xml": "xhtml"
|
|
1209
1238
|
}).find(
|
|
1210
1239
|
([n]) => t.includes(n)
|
|
1211
|
-
)) == null ? void 0 :
|
|
1212
|
-
},
|
|
1213
|
-
var
|
|
1214
|
-
const
|
|
1215
|
-
return
|
|
1216
|
-
},
|
|
1240
|
+
)) == null ? void 0 : s[1];
|
|
1241
|
+
}, za = (t) => {
|
|
1242
|
+
var s;
|
|
1243
|
+
const a = ((s = t.find(([n, i]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
1244
|
+
return Fa(a);
|
|
1245
|
+
}, Ha = (t) => {
|
|
1217
1246
|
try {
|
|
1218
1247
|
return JSON.stringify(JSON.parse(t), null, 2);
|
|
1219
1248
|
} catch {
|
|
1220
1249
|
return null;
|
|
1221
1250
|
}
|
|
1222
|
-
},
|
|
1223
|
-
const
|
|
1251
|
+
}, Ba = (t) => {
|
|
1252
|
+
const a = [
|
|
1224
1253
|
"Content-Type",
|
|
1225
1254
|
"Content-Length",
|
|
1226
1255
|
"Authorization",
|
|
@@ -1228,46 +1257,46 @@ const Es = {
|
|
|
1228
1257
|
"X-RateLimit-Limit",
|
|
1229
1258
|
"Cache-Control",
|
|
1230
1259
|
"ETag"
|
|
1231
|
-
].map((
|
|
1232
|
-
return [...t].sort(([
|
|
1233
|
-
const
|
|
1234
|
-
return
|
|
1260
|
+
].map((s) => s.toLowerCase());
|
|
1261
|
+
return [...t].sort(([s], [n]) => {
|
|
1262
|
+
const i = a.indexOf(s.toLowerCase()), d = a.indexOf(n.toLowerCase());
|
|
1263
|
+
return i === d ? 0 : i === -1 ? 1 : d === -1 ? -1 : i - d;
|
|
1235
1264
|
});
|
|
1236
|
-
},
|
|
1265
|
+
}, Ga = ({
|
|
1237
1266
|
body: t = "",
|
|
1238
|
-
headers:
|
|
1239
|
-
status:
|
|
1267
|
+
headers: a,
|
|
1268
|
+
status: s,
|
|
1240
1269
|
time: n,
|
|
1241
|
-
size:
|
|
1242
|
-
url:
|
|
1270
|
+
size: i,
|
|
1271
|
+
url: d
|
|
1243
1272
|
}) => {
|
|
1244
|
-
var
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
),
|
|
1248
|
-
queryKey: ["types",
|
|
1249
|
-
queryFn: async () =>
|
|
1273
|
+
var l;
|
|
1274
|
+
const r = za(a), m = Ha(t), c = m || t, [h, y] = H(
|
|
1275
|
+
m ? "formatted" : "raw"
|
|
1276
|
+
), v = Ft({
|
|
1277
|
+
queryKey: ["types", c],
|
|
1278
|
+
queryFn: async () => La(JSON.parse(c)),
|
|
1250
1279
|
enabled: h === "types"
|
|
1251
|
-
}),
|
|
1280
|
+
}), p = Ba([...a]);
|
|
1252
1281
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
|
|
1253
1282
|
/* @__PURE__ */ e.jsxs(Ve, { defaultOpen: !0, children: [
|
|
1254
1283
|
/* @__PURE__ */ e.jsxs(Fe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1255
|
-
/* @__PURE__ */ e.jsx(
|
|
1284
|
+
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1256
1285
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1257
1286
|
] }),
|
|
1258
1287
|
/* @__PURE__ */ e.jsx(ze, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
|
|
1259
|
-
|
|
1288
|
+
p.slice(0, 5).map(([f, C]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1260
1289
|
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
|
|
1261
1290
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
|
|
1262
1291
|
] }, f)),
|
|
1263
|
-
|
|
1292
|
+
p.length > 5 && /* @__PURE__ */ e.jsxs(Ve, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1264
1293
|
/* @__PURE__ */ e.jsxs(Fe, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
1265
|
-
/* @__PURE__ */ e.jsx(
|
|
1294
|
+
/* @__PURE__ */ e.jsx(z, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1266
1295
|
"Show ",
|
|
1267
|
-
|
|
1296
|
+
p.length - 5,
|
|
1268
1297
|
" more headers"
|
|
1269
1298
|
] }),
|
|
1270
|
-
/* @__PURE__ */ e.jsx(ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children:
|
|
1299
|
+
/* @__PURE__ */ e.jsx(ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: p.slice(5).map(([f, C]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1271
1300
|
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
|
|
1272
1301
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
|
|
1273
1302
|
] }, f)) })
|
|
@@ -1275,13 +1304,13 @@ const Es = {
|
|
|
1275
1304
|
] }) })
|
|
1276
1305
|
] }),
|
|
1277
1306
|
/* @__PURE__ */ e.jsx(xe, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
|
|
1278
|
-
|
|
1307
|
+
Mt,
|
|
1279
1308
|
{
|
|
1280
|
-
language: h === "types" ? "typescript" : h === "raw" ?
|
|
1309
|
+
language: h === "types" ? "typescript" : h === "raw" ? m ? "plain" : r : "json",
|
|
1281
1310
|
noBackground: !0,
|
|
1282
1311
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1283
|
-
code: (h === "raw" ? t : h === "types" ? (
|
|
1284
|
-
`) :
|
|
1312
|
+
code: (h === "raw" ? t : h === "types" ? (l = v.data) == null ? void 0 : l.lines.join(`
|
|
1313
|
+
`) : c) ?? ""
|
|
1285
1314
|
}
|
|
1286
1315
|
) }),
|
|
1287
1316
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
|
|
@@ -1289,9 +1318,9 @@ const Es = {
|
|
|
1289
1318
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1290
1319
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Status" }),
|
|
1291
1320
|
" ",
|
|
1292
|
-
|
|
1321
|
+
s,
|
|
1293
1322
|
" ",
|
|
1294
|
-
|
|
1323
|
+
Va[s] ?? ""
|
|
1295
1324
|
] }),
|
|
1296
1325
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1297
1326
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
@@ -1302,38 +1331,38 @@ const Es = {
|
|
|
1302
1331
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1303
1332
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
1304
1333
|
" ",
|
|
1305
|
-
|
|
1334
|
+
i,
|
|
1306
1335
|
"B"
|
|
1307
1336
|
] })
|
|
1308
1337
|
] }),
|
|
1309
|
-
|
|
1310
|
-
|
|
1338
|
+
m && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1339
|
+
Be,
|
|
1311
1340
|
{
|
|
1312
1341
|
value: h,
|
|
1313
|
-
onValueChange: (f) =>
|
|
1342
|
+
onValueChange: (f) => y(f),
|
|
1314
1343
|
children: [
|
|
1315
|
-
/* @__PURE__ */ e.jsx(
|
|
1316
|
-
/* @__PURE__ */ e.jsxs(
|
|
1317
|
-
/* @__PURE__ */ e.jsx(
|
|
1318
|
-
/* @__PURE__ */ e.jsx(
|
|
1319
|
-
/* @__PURE__ */ e.jsx(
|
|
1344
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(Ue, { placeholder: "View" }) }),
|
|
1345
|
+
/* @__PURE__ */ e.jsxs(Me, { children: [
|
|
1346
|
+
/* @__PURE__ */ e.jsx(U, { value: "formatted", children: "Formatted" }),
|
|
1347
|
+
/* @__PURE__ */ e.jsx(U, { value: "raw", children: "Raw" }),
|
|
1348
|
+
/* @__PURE__ */ e.jsx(U, { value: "types", children: "Types" })
|
|
1320
1349
|
] })
|
|
1321
1350
|
]
|
|
1322
1351
|
}
|
|
1323
1352
|
) })
|
|
1324
1353
|
] })
|
|
1325
1354
|
] });
|
|
1326
|
-
},
|
|
1355
|
+
}, Ua = ({
|
|
1327
1356
|
queryMutation: t,
|
|
1328
|
-
showPathParamsWarning:
|
|
1357
|
+
showPathParamsWarning: a
|
|
1329
1358
|
}) => {
|
|
1330
1359
|
var n;
|
|
1331
|
-
const
|
|
1360
|
+
const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
|
|
1332
1361
|
return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1333
|
-
|
|
1362
|
+
a && /* @__PURE__ */ e.jsx(Wt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1334
1363
|
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1335
|
-
/* @__PURE__ */ e.jsx(
|
|
1336
|
-
/* @__PURE__ */ e.jsxs(
|
|
1364
|
+
/* @__PURE__ */ e.jsx(Ht, { children: /* @__PURE__ */ e.jsx(Bt, { children: "Request failed" }) }),
|
|
1365
|
+
/* @__PURE__ */ e.jsxs(Gt, { children: [
|
|
1337
1366
|
"Error:",
|
|
1338
1367
|
" ",
|
|
1339
1368
|
t.error.message || String(t.error) || "Unexpected error"
|
|
@@ -1341,18 +1370,18 @@ const Es = {
|
|
|
1341
1370
|
] })
|
|
1342
1371
|
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(Je, { defaultValue: "response", children: [
|
|
1343
1372
|
/* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
1344
|
-
/* @__PURE__ */ e.jsx(
|
|
1345
|
-
/* @__PURE__ */ e.jsxs(
|
|
1373
|
+
/* @__PURE__ */ e.jsx(E, { value: "request", children: "Request" }),
|
|
1374
|
+
/* @__PURE__ */ e.jsxs(E, { value: "response", children: [
|
|
1346
1375
|
"Response",
|
|
1347
1376
|
/* @__PURE__ */ e.jsxs(
|
|
1348
1377
|
"span",
|
|
1349
1378
|
{
|
|
1350
|
-
className:
|
|
1379
|
+
className: u(
|
|
1351
1380
|
"text-xs font-mono ml-1",
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1381
|
+
s === "2" && "text-green-500",
|
|
1382
|
+
s === "3" && "text-blue-500",
|
|
1383
|
+
s === "4" && "text-yellow-500",
|
|
1384
|
+
s === "5" && "text-red-500"
|
|
1356
1385
|
),
|
|
1357
1386
|
children: [
|
|
1358
1387
|
"(",
|
|
@@ -1363,9 +1392,9 @@ const Es = {
|
|
|
1363
1392
|
)
|
|
1364
1393
|
] })
|
|
1365
1394
|
] }),
|
|
1366
|
-
/* @__PURE__ */ e.jsx(
|
|
1367
|
-
/* @__PURE__ */ e.jsx(
|
|
1368
|
-
|
|
1395
|
+
/* @__PURE__ */ e.jsx(A, { value: "request", children: /* @__PURE__ */ e.jsx(qa, { ...t.data.request }) }),
|
|
1396
|
+
/* @__PURE__ */ e.jsx(A, { value: "response", children: /* @__PURE__ */ e.jsx(
|
|
1397
|
+
Ga,
|
|
1369
1398
|
{
|
|
1370
1399
|
status: t.data.status,
|
|
1371
1400
|
time: t.data.time,
|
|
@@ -1375,76 +1404,76 @@ const Es = {
|
|
|
1375
1404
|
url: t.data.request.url
|
|
1376
1405
|
}
|
|
1377
1406
|
) })
|
|
1378
|
-
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(
|
|
1379
|
-
},
|
|
1407
|
+
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(_t, {}) : "Send a request first to see the response here" }) }) });
|
|
1408
|
+
}, Ma = ({
|
|
1380
1409
|
identities: t,
|
|
1381
|
-
formRef:
|
|
1382
|
-
disabled:
|
|
1410
|
+
formRef: a,
|
|
1411
|
+
disabled: s
|
|
1383
1412
|
}) => {
|
|
1384
|
-
const { setValue: n } = pe(), [
|
|
1385
|
-
return t.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
1413
|
+
const { setValue: n } = pe(), [i, d] = H();
|
|
1414
|
+
return t.length === 0 ? /* @__PURE__ */ e.jsx(M, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
|
|
1386
1415
|
/* @__PURE__ */ e.jsx(
|
|
1387
|
-
|
|
1416
|
+
M,
|
|
1388
1417
|
{
|
|
1389
1418
|
className: "rounded-r-none inset-shadow-sm",
|
|
1390
|
-
disabled:
|
|
1419
|
+
disabled: s,
|
|
1391
1420
|
onClick: () => {
|
|
1392
|
-
var
|
|
1393
|
-
return (
|
|
1421
|
+
var r;
|
|
1422
|
+
return (r = a == null ? void 0 : a.current) == null ? void 0 : r.requestSubmit();
|
|
1394
1423
|
},
|
|
1395
1424
|
children: "Send"
|
|
1396
1425
|
}
|
|
1397
1426
|
),
|
|
1398
|
-
/* @__PURE__ */ e.jsxs(
|
|
1399
|
-
/* @__PURE__ */ e.jsx(
|
|
1400
|
-
|
|
1427
|
+
/* @__PURE__ */ e.jsxs(Xe, { children: [
|
|
1428
|
+
/* @__PURE__ */ e.jsx(Ye, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1429
|
+
M,
|
|
1401
1430
|
{
|
|
1402
|
-
disabled:
|
|
1431
|
+
disabled: s,
|
|
1403
1432
|
className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
|
|
1404
1433
|
size: "icon",
|
|
1405
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1434
|
+
children: /* @__PURE__ */ e.jsx(bt, { className: "w-4 h-4" })
|
|
1406
1435
|
}
|
|
1407
1436
|
) }),
|
|
1408
|
-
/* @__PURE__ */ e.jsx(ye, { value:
|
|
1409
|
-
(
|
|
1437
|
+
/* @__PURE__ */ e.jsx(ye, { value: i, children: /* @__PURE__ */ e.jsx(ve, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: F, label: "None" }, ...t].map(
|
|
1438
|
+
(r) => /* @__PURE__ */ e.jsxs(
|
|
1410
1439
|
je,
|
|
1411
1440
|
{
|
|
1412
1441
|
onClick: () => {
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1442
|
+
var m;
|
|
1443
|
+
d(r.id), n("identity", r.id), (m = a == null ? void 0 : a.current) == null || m.requestSubmit();
|
|
1415
1444
|
},
|
|
1416
|
-
onMouseEnter: () =>
|
|
1417
|
-
onMouseLeave: () =>
|
|
1445
|
+
onMouseEnter: () => d(r.id),
|
|
1446
|
+
onMouseLeave: () => d(void 0),
|
|
1418
1447
|
children: [
|
|
1419
|
-
/* @__PURE__ */ e.jsx(Q, { value:
|
|
1420
|
-
|
|
1448
|
+
/* @__PURE__ */ e.jsx(Q, { value: r.id, className: "mr-2" }),
|
|
1449
|
+
r.label
|
|
1421
1450
|
]
|
|
1422
1451
|
},
|
|
1423
|
-
|
|
1452
|
+
r.id
|
|
1424
1453
|
)
|
|
1425
1454
|
) }) })
|
|
1426
1455
|
] })
|
|
1427
1456
|
] });
|
|
1428
|
-
},
|
|
1457
|
+
}, F = "__none", _a = ({
|
|
1429
1458
|
server: t,
|
|
1430
|
-
servers:
|
|
1431
|
-
url:
|
|
1459
|
+
servers: a,
|
|
1460
|
+
url: s,
|
|
1432
1461
|
method: n,
|
|
1433
|
-
headers:
|
|
1434
|
-
queryParams:
|
|
1435
|
-
pathParams:
|
|
1436
|
-
defaultBody:
|
|
1437
|
-
examples:
|
|
1462
|
+
headers: i = [],
|
|
1463
|
+
queryParams: d = [],
|
|
1464
|
+
pathParams: r = [],
|
|
1465
|
+
defaultBody: m = "",
|
|
1466
|
+
examples: c
|
|
1438
1467
|
}) => {
|
|
1439
|
-
var
|
|
1440
|
-
const { selectedServer: h, setSelectedServer:
|
|
1468
|
+
var Pe, ke, Re;
|
|
1469
|
+
const { selectedServer: h, setSelectedServer: y } = Vt(), [, v] = kt(), { register: p, control: l, handleSubmit: f, watch: C, setValue: N, ...$ } = Dt({
|
|
1441
1470
|
defaultValues: {
|
|
1442
|
-
body:
|
|
1443
|
-
queryParams:
|
|
1444
|
-
name:
|
|
1445
|
-
value:
|
|
1446
|
-
active:
|
|
1447
|
-
enum:
|
|
1471
|
+
body: m,
|
|
1472
|
+
queryParams: d.map((o) => ({
|
|
1473
|
+
name: o.name,
|
|
1474
|
+
value: o.defaultValue ?? "",
|
|
1475
|
+
active: o.defaultActive ?? !1,
|
|
1476
|
+
enum: o.enum ?? []
|
|
1448
1477
|
})).concat([
|
|
1449
1478
|
{
|
|
1450
1479
|
name: "",
|
|
@@ -1453,14 +1482,14 @@ const Es = {
|
|
|
1453
1482
|
enum: []
|
|
1454
1483
|
}
|
|
1455
1484
|
]),
|
|
1456
|
-
pathParams:
|
|
1457
|
-
name:
|
|
1458
|
-
value:
|
|
1485
|
+
pathParams: r.map((o) => ({
|
|
1486
|
+
name: o.name,
|
|
1487
|
+
value: o.defaultValue ?? ""
|
|
1459
1488
|
})),
|
|
1460
|
-
headers:
|
|
1461
|
-
name:
|
|
1462
|
-
value:
|
|
1463
|
-
active:
|
|
1489
|
+
headers: i.map((o) => ({
|
|
1490
|
+
name: o.name,
|
|
1491
|
+
value: o.defaultValue ?? "",
|
|
1492
|
+
active: o.defaultActive ?? !1
|
|
1464
1493
|
})).concat([
|
|
1465
1494
|
{
|
|
1466
1495
|
name: "",
|
|
@@ -1468,103 +1497,102 @@ const Es = {
|
|
|
1468
1497
|
active: !1
|
|
1469
1498
|
}
|
|
1470
1499
|
]),
|
|
1471
|
-
identity:
|
|
1500
|
+
identity: F
|
|
1472
1501
|
}
|
|
1473
|
-
}),
|
|
1474
|
-
|
|
1475
|
-
var
|
|
1502
|
+
}), S = C(), O = zt(), Ce = q(!1);
|
|
1503
|
+
He(() => {
|
|
1504
|
+
var P;
|
|
1476
1505
|
if (Ce.current) return;
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
-
}, [N,
|
|
1480
|
-
const
|
|
1481
|
-
mutationFn: async (
|
|
1482
|
-
var
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1506
|
+
const o = (P = O.data) == null ? void 0 : P.at(0);
|
|
1507
|
+
o && (N("identity", o.id), Ce.current = !0);
|
|
1508
|
+
}, [N, O.data]);
|
|
1509
|
+
const $e = q(null), Se = qt({
|
|
1510
|
+
mutationFn: async (o) => {
|
|
1511
|
+
var G, L;
|
|
1512
|
+
const P = performance.now(), w = new Request(
|
|
1513
|
+
da(h ?? t, s, o),
|
|
1485
1514
|
{
|
|
1486
1515
|
method: n.toUpperCase(),
|
|
1487
1516
|
headers: Object.fromEntries(
|
|
1488
|
-
|
|
1517
|
+
o.headers.filter((j) => j.name && j.active).map((j) => [j.name, j.value])
|
|
1489
1518
|
),
|
|
1490
|
-
body:
|
|
1519
|
+
body: o.body ? o.body : void 0
|
|
1491
1520
|
}
|
|
1492
1521
|
);
|
|
1493
|
-
|
|
1522
|
+
o.identity !== F && ((L = (G = O.data) == null ? void 0 : G.find((j) => j.id === o.identity)) == null || L.authorizeRequest(w));
|
|
1494
1523
|
try {
|
|
1495
|
-
const
|
|
1524
|
+
const j = await fetch(w, {
|
|
1496
1525
|
signal: AbortSignal.timeout(5e3)
|
|
1497
|
-
}),
|
|
1526
|
+
}), ct = performance.now() - P, Oe = await j.text(), mt = new URL(w.url);
|
|
1498
1527
|
return {
|
|
1499
|
-
status:
|
|
1500
|
-
headers: Array.from(
|
|
1501
|
-
size:
|
|
1502
|
-
body:
|
|
1503
|
-
time:
|
|
1528
|
+
status: j.status,
|
|
1529
|
+
headers: Array.from(j.headers.entries()),
|
|
1530
|
+
size: Oe.length,
|
|
1531
|
+
body: Oe,
|
|
1532
|
+
time: ct,
|
|
1504
1533
|
request: {
|
|
1505
1534
|
method: w.method.toUpperCase(),
|
|
1506
1535
|
url: w.url,
|
|
1507
1536
|
headers: [
|
|
1508
|
-
["Host",
|
|
1537
|
+
["Host", mt.host],
|
|
1509
1538
|
["User-Agent", "Zudoku Playground"],
|
|
1510
1539
|
...Array.from(w.headers.entries())
|
|
1511
1540
|
],
|
|
1512
|
-
body:
|
|
1541
|
+
body: o.body ? o.body : void 0
|
|
1513
1542
|
}
|
|
1514
1543
|
};
|
|
1515
|
-
} catch (
|
|
1516
|
-
throw
|
|
1544
|
+
} catch (j) {
|
|
1545
|
+
throw j instanceof TypeError ? new Error(
|
|
1517
1546
|
"The request failed, possibly due to network issues or CORS policy."
|
|
1518
|
-
) :
|
|
1547
|
+
) : j;
|
|
1519
1548
|
}
|
|
1520
1549
|
}
|
|
1521
|
-
}), lt =
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
{
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1550
|
+
}), lt = /* @__PURE__ */ e.jsx(
|
|
1551
|
+
oa,
|
|
1552
|
+
{
|
|
1553
|
+
path: s,
|
|
1554
|
+
renderParam: ({ name: o, originalValue: P, index: w }) => {
|
|
1555
|
+
var L;
|
|
1556
|
+
const G = (L = S.pathParams.find(
|
|
1557
|
+
(j) => j.name === o
|
|
1558
|
+
)) == null ? void 0 : L.value;
|
|
1559
|
+
return /* @__PURE__ */ e.jsx(
|
|
1560
|
+
Ke,
|
|
1561
|
+
{
|
|
1562
|
+
name: o,
|
|
1563
|
+
backgroundOpacity: "0",
|
|
1564
|
+
slug: o,
|
|
1565
|
+
onClick: () => $.setFocus(`pathParams.${w}.value`),
|
|
1566
|
+
children: G || P
|
|
1567
|
+
}
|
|
1568
|
+
);
|
|
1531
1569
|
}
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
/* @__PURE__ */ e.jsxs(z, { children: [
|
|
1536
|
-
M ? X : r,
|
|
1537
|
-
S < w.length - 1 && "/",
|
|
1538
|
-
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1539
|
-
] }, r + S)
|
|
1540
|
-
);
|
|
1541
|
-
}), Pe = T.queryParams.filter((r) => r.active).map((r, S, w) => /* @__PURE__ */ e.jsxs(z, { children: [
|
|
1542
|
-
r.name,
|
|
1570
|
+
}
|
|
1571
|
+
), Te = S.queryParams.filter((o) => o.active).map((o, P, w) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1572
|
+
o.name,
|
|
1543
1573
|
"=",
|
|
1544
|
-
encodeURIComponent(
|
|
1545
|
-
|
|
1574
|
+
encodeURIComponent(o.value).replaceAll("%20", "+"),
|
|
1575
|
+
P < w.length - 1 && "&",
|
|
1546
1576
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1547
|
-
] },
|
|
1548
|
-
|
|
1577
|
+
] }, o.name)), dt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: a && a.length > 1 ? /* @__PURE__ */ e.jsxs(
|
|
1578
|
+
Be,
|
|
1549
1579
|
{
|
|
1550
|
-
onValueChange: (
|
|
1551
|
-
|
|
1552
|
-
v(r);
|
|
1553
|
-
});
|
|
1580
|
+
onValueChange: (o) => {
|
|
1581
|
+
v(() => y(o));
|
|
1554
1582
|
},
|
|
1555
1583
|
value: h,
|
|
1556
1584
|
defaultValue: h,
|
|
1557
1585
|
children: [
|
|
1558
|
-
/* @__PURE__ */ e.jsx(
|
|
1559
|
-
/* @__PURE__ */ e.jsx(
|
|
1586
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(Ue, {}) }),
|
|
1587
|
+
/* @__PURE__ */ e.jsx(Me, { children: a.map((o) => /* @__PURE__ */ e.jsx(U, { value: o, children: o.replace(/^https?:\/\//, "") }, o)) })
|
|
1560
1588
|
]
|
|
1561
1589
|
}
|
|
1562
1590
|
) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
|
|
1563
1591
|
return /* @__PURE__ */ e.jsx(
|
|
1564
|
-
|
|
1592
|
+
Lt,
|
|
1565
1593
|
{
|
|
1566
|
-
register:
|
|
1567
|
-
control:
|
|
1594
|
+
register: p,
|
|
1595
|
+
control: l,
|
|
1568
1596
|
handleSubmit: f,
|
|
1569
1597
|
watch: C,
|
|
1570
1598
|
setValue: N,
|
|
@@ -1572,69 +1600,69 @@ const Es = {
|
|
|
1572
1600
|
children: /* @__PURE__ */ e.jsx(
|
|
1573
1601
|
"form",
|
|
1574
1602
|
{
|
|
1575
|
-
onSubmit: f((
|
|
1576
|
-
ref:
|
|
1603
|
+
onSubmit: f((o) => Se.mutateAsync(o)),
|
|
1604
|
+
ref: $e,
|
|
1577
1605
|
children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
1578
1606
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
1579
1607
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1580
1608
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1581
1609
|
/* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
|
|
1582
|
-
/* @__PURE__ */ e.jsxs("div", { className: "
|
|
1583
|
-
|
|
1610
|
+
/* @__PURE__ */ e.jsxs("div", { className: "items-center p-2 font-mono text-xs break-words", children: [
|
|
1611
|
+
dt,
|
|
1584
1612
|
lt,
|
|
1585
|
-
|
|
1586
|
-
|
|
1613
|
+
Te.length > 0 ? "?" : "",
|
|
1614
|
+
Te
|
|
1587
1615
|
] })
|
|
1588
1616
|
] }),
|
|
1589
1617
|
/* @__PURE__ */ e.jsx(
|
|
1590
|
-
|
|
1618
|
+
Ma,
|
|
1591
1619
|
{
|
|
1592
|
-
identities:
|
|
1593
|
-
formRef:
|
|
1620
|
+
identities: O.data ?? [],
|
|
1621
|
+
formRef: $e,
|
|
1594
1622
|
disabled: $.formState.isSubmitting
|
|
1595
1623
|
}
|
|
1596
1624
|
)
|
|
1597
1625
|
] }),
|
|
1598
1626
|
/* @__PURE__ */ e.jsxs(Je, { defaultValue: "parameters", children: [
|
|
1599
1627
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
1600
|
-
/* @__PURE__ */ e.jsxs(
|
|
1628
|
+
/* @__PURE__ */ e.jsxs(E, { value: "parameters", children: [
|
|
1601
1629
|
"Parameters",
|
|
1602
|
-
(
|
|
1630
|
+
(S.pathParams.some((o) => o.value !== "") || S.queryParams.some((o) => o.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1603
1631
|
] }),
|
|
1604
|
-
/* @__PURE__ */ e.jsxs(
|
|
1632
|
+
/* @__PURE__ */ e.jsxs(E, { value: "headers", children: [
|
|
1605
1633
|
"Headers",
|
|
1606
|
-
|
|
1634
|
+
S.headers.filter((o) => o.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1607
1635
|
] }),
|
|
1608
|
-
/* @__PURE__ */ e.jsxs(
|
|
1636
|
+
/* @__PURE__ */ e.jsxs(E, { value: "auth", children: [
|
|
1609
1637
|
"Auth",
|
|
1610
|
-
|
|
1638
|
+
S.identity !== F && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1611
1639
|
] }),
|
|
1612
|
-
/* @__PURE__ */ e.jsx(
|
|
1640
|
+
/* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
|
|
1613
1641
|
] }) }),
|
|
1614
|
-
/* @__PURE__ */ e.jsx(
|
|
1615
|
-
/* @__PURE__ */ e.jsxs(
|
|
1616
|
-
|
|
1642
|
+
/* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(ka, { control: l, register: p }) }),
|
|
1643
|
+
/* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
|
|
1644
|
+
r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1617
1645
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1618
|
-
/* @__PURE__ */ e.jsx(
|
|
1646
|
+
/* @__PURE__ */ e.jsx(Ra, { control: l })
|
|
1619
1647
|
] }),
|
|
1620
1648
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1621
1649
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1622
|
-
/* @__PURE__ */ e.jsx(
|
|
1650
|
+
/* @__PURE__ */ e.jsx(Ia, { control: l, queryParams: d })
|
|
1623
1651
|
] })
|
|
1624
1652
|
] }),
|
|
1625
|
-
/* @__PURE__ */ e.jsxs(
|
|
1653
|
+
/* @__PURE__ */ e.jsxs(A, { value: "body", children: [
|
|
1626
1654
|
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1627
1655
|
n.toUpperCase()
|
|
1628
|
-
) && /* @__PURE__ */ e.jsxs(
|
|
1629
|
-
/* @__PURE__ */ e.jsx(
|
|
1656
|
+
) && /* @__PURE__ */ e.jsxs(le, { className: "mb-2", children: [
|
|
1657
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "w-4 h-4" }),
|
|
1630
1658
|
/* @__PURE__ */ e.jsx(de, { children: "Body" }),
|
|
1631
1659
|
/* @__PURE__ */ e.jsx(ce, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
1632
1660
|
] }),
|
|
1633
1661
|
/* @__PURE__ */ e.jsx(
|
|
1634
|
-
|
|
1662
|
+
Ze,
|
|
1635
1663
|
{
|
|
1636
|
-
...
|
|
1637
|
-
className:
|
|
1664
|
+
...p("body"),
|
|
1665
|
+
className: u(
|
|
1638
1666
|
"border w-full rounded-lg p-2 bg-muted h-40 font-mono",
|
|
1639
1667
|
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1640
1668
|
n.toUpperCase()
|
|
@@ -1648,57 +1676,57 @@ const Es = {
|
|
|
1648
1676
|
)
|
|
1649
1677
|
}
|
|
1650
1678
|
),
|
|
1651
|
-
|
|
1652
|
-
|
|
1679
|
+
c && /* @__PURE__ */ e.jsx(
|
|
1680
|
+
xa,
|
|
1653
1681
|
{
|
|
1654
|
-
examples:
|
|
1655
|
-
onSelect: (
|
|
1682
|
+
examples: c,
|
|
1683
|
+
onSelect: (o) => N("body", JSON.stringify(o.value, null, 2))
|
|
1656
1684
|
}
|
|
1657
1685
|
)
|
|
1658
1686
|
] }),
|
|
1659
|
-
/* @__PURE__ */ e.jsx(
|
|
1660
|
-
((
|
|
1661
|
-
/* @__PURE__ */ e.jsx(
|
|
1687
|
+
/* @__PURE__ */ e.jsx(A, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1688
|
+
((Pe = O.data) == null ? void 0 : Pe.length) === 0 && /* @__PURE__ */ e.jsxs(le, { children: [
|
|
1689
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "w-4 h-4" }),
|
|
1662
1690
|
/* @__PURE__ */ e.jsx(de, { children: "Authentication" }),
|
|
1663
1691
|
/* @__PURE__ */ e.jsx(ce, { children: "No identities found. Please create an identity first." })
|
|
1664
1692
|
] }),
|
|
1665
1693
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(xe, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
|
|
1666
1694
|
ye,
|
|
1667
1695
|
{
|
|
1668
|
-
onValueChange: (
|
|
1669
|
-
value:
|
|
1670
|
-
defaultValue:
|
|
1696
|
+
onValueChange: (o) => N("identity", o),
|
|
1697
|
+
value: S.identity,
|
|
1698
|
+
defaultValue: S.identity,
|
|
1671
1699
|
className: "gap-0",
|
|
1672
|
-
disabled: ((ke =
|
|
1700
|
+
disabled: ((ke = O.data) == null ? void 0 : ke.length) === 0,
|
|
1673
1701
|
children: [
|
|
1674
1702
|
/* @__PURE__ */ e.jsxs(
|
|
1675
|
-
|
|
1703
|
+
V,
|
|
1676
1704
|
{
|
|
1677
1705
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1678
1706
|
htmlFor: "none",
|
|
1679
1707
|
children: [
|
|
1680
|
-
/* @__PURE__ */ e.jsx(Q, { value:
|
|
1681
|
-
/* @__PURE__ */ e.jsx(
|
|
1708
|
+
/* @__PURE__ */ e.jsx(Q, { value: F, id: "none", children: "None" }),
|
|
1709
|
+
/* @__PURE__ */ e.jsx(V, { htmlFor: "none", className: "ml-2", children: "None" })
|
|
1682
1710
|
]
|
|
1683
1711
|
}
|
|
1684
1712
|
),
|
|
1685
|
-
(Re =
|
|
1686
|
-
|
|
1713
|
+
(Re = O.data) == null ? void 0 : Re.map((o) => /* @__PURE__ */ e.jsxs(
|
|
1714
|
+
V,
|
|
1687
1715
|
{
|
|
1688
1716
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1689
1717
|
children: [
|
|
1690
1718
|
/* @__PURE__ */ e.jsx(
|
|
1691
1719
|
Q,
|
|
1692
1720
|
{
|
|
1693
|
-
value:
|
|
1694
|
-
id:
|
|
1695
|
-
children:
|
|
1721
|
+
value: o.id,
|
|
1722
|
+
id: o.id,
|
|
1723
|
+
children: o.label
|
|
1696
1724
|
}
|
|
1697
1725
|
),
|
|
1698
|
-
/* @__PURE__ */ e.jsx(
|
|
1726
|
+
/* @__PURE__ */ e.jsx(V, { htmlFor: o.id, className: "ml-2", children: o.label })
|
|
1699
1727
|
]
|
|
1700
1728
|
},
|
|
1701
|
-
|
|
1729
|
+
o.id
|
|
1702
1730
|
))
|
|
1703
1731
|
]
|
|
1704
1732
|
}
|
|
@@ -1707,11 +1735,11 @@ const Es = {
|
|
|
1707
1735
|
] })
|
|
1708
1736
|
] }),
|
|
1709
1737
|
/* @__PURE__ */ e.jsx(
|
|
1710
|
-
|
|
1738
|
+
Ua,
|
|
1711
1739
|
{
|
|
1712
1740
|
queryMutation: Se,
|
|
1713
|
-
showPathParamsWarning:
|
|
1714
|
-
(
|
|
1741
|
+
showPathParamsWarning: S.pathParams.some(
|
|
1742
|
+
(o) => o.value === ""
|
|
1715
1743
|
)
|
|
1716
1744
|
}
|
|
1717
1745
|
)
|
|
@@ -1720,9 +1748,9 @@ const Es = {
|
|
|
1720
1748
|
)
|
|
1721
1749
|
}
|
|
1722
1750
|
);
|
|
1723
|
-
},
|
|
1751
|
+
}, Ja = ({
|
|
1724
1752
|
className: t,
|
|
1725
|
-
size:
|
|
1753
|
+
size: a = 16
|
|
1726
1754
|
}) => /* @__PURE__ */ e.jsx(
|
|
1727
1755
|
"svg",
|
|
1728
1756
|
{
|
|
@@ -1730,8 +1758,8 @@ const Es = {
|
|
|
1730
1758
|
viewBox: "0 0 24 24",
|
|
1731
1759
|
fill: "currentColor",
|
|
1732
1760
|
className: t,
|
|
1733
|
-
width:
|
|
1734
|
-
height:
|
|
1761
|
+
width: a,
|
|
1762
|
+
height: a,
|
|
1735
1763
|
children: /* @__PURE__ */ e.jsx(
|
|
1736
1764
|
"path",
|
|
1737
1765
|
{
|
|
@@ -1741,45 +1769,53 @@ const Es = {
|
|
|
1741
1769
|
}
|
|
1742
1770
|
)
|
|
1743
1771
|
}
|
|
1744
|
-
),
|
|
1745
|
-
const [
|
|
1746
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1747
|
-
/* @__PURE__ */ e.jsx(
|
|
1772
|
+
), Qa = (t) => {
|
|
1773
|
+
const [a, s] = H(!1);
|
|
1774
|
+
return /* @__PURE__ */ e.jsxs(Ot, { onOpenChange: (n) => s(n), children: [
|
|
1775
|
+
/* @__PURE__ */ e.jsx(It, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80", children: [
|
|
1748
1776
|
"Test",
|
|
1749
|
-
/* @__PURE__ */ e.jsx(
|
|
1777
|
+
/* @__PURE__ */ e.jsx(Ja, { className: "", size: 14 })
|
|
1750
1778
|
] }) }),
|
|
1751
1779
|
/* @__PURE__ */ e.jsxs(
|
|
1752
|
-
|
|
1780
|
+
Et,
|
|
1753
1781
|
{
|
|
1754
1782
|
className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
|
|
1755
1783
|
"aria-describedby": void 0,
|
|
1756
1784
|
children: [
|
|
1757
|
-
/* @__PURE__ */ e.jsx(
|
|
1758
|
-
|
|
1785
|
+
/* @__PURE__ */ e.jsx(Pt, { children: /* @__PURE__ */ e.jsx(At, { children: "Playground" }) }),
|
|
1786
|
+
a && /* @__PURE__ */ e.jsx(_a, { ...t })
|
|
1759
1787
|
]
|
|
1760
1788
|
}
|
|
1761
1789
|
)
|
|
1762
1790
|
] });
|
|
1763
|
-
},
|
|
1791
|
+
}, Wa = We(`
|
|
1764
1792
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
1765
1793
|
schema(input: $input, type: $type) {
|
|
1766
1794
|
url
|
|
1767
1795
|
tags {
|
|
1768
|
-
__typename
|
|
1769
1796
|
name
|
|
1770
|
-
operations {
|
|
1771
|
-
__typename
|
|
1772
|
-
slug
|
|
1773
|
-
deprecated
|
|
1774
|
-
method
|
|
1775
|
-
summary
|
|
1776
|
-
operationId
|
|
1777
|
-
path
|
|
1778
|
-
}
|
|
1779
1797
|
}
|
|
1780
1798
|
}
|
|
1781
1799
|
}
|
|
1782
|
-
`),
|
|
1800
|
+
`), Za = We(`
|
|
1801
|
+
query GetOperations(
|
|
1802
|
+
$input: JSON!
|
|
1803
|
+
$type: SchemaType!
|
|
1804
|
+
$tag: String
|
|
1805
|
+
$untagged: Boolean
|
|
1806
|
+
) {
|
|
1807
|
+
schema(input: $input, type: $type) {
|
|
1808
|
+
operations(tag: $tag, untagged: $untagged) {
|
|
1809
|
+
slug
|
|
1810
|
+
deprecated
|
|
1811
|
+
method
|
|
1812
|
+
summary
|
|
1813
|
+
operationId
|
|
1814
|
+
path
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
`), Ka = {
|
|
1783
1819
|
get: "green",
|
|
1784
1820
|
post: "blue",
|
|
1785
1821
|
put: "yellow",
|
|
@@ -1787,8 +1823,8 @@ const Es = {
|
|
|
1787
1823
|
patch: "purple",
|
|
1788
1824
|
options: "gray",
|
|
1789
1825
|
head: "gray"
|
|
1790
|
-
},
|
|
1791
|
-
const
|
|
1826
|
+
}, oe = "~endpoints", $s = (t) => {
|
|
1827
|
+
const a = I(t.navigationId ?? "/reference"), s = t.type === "file" ? Object.keys(t.input) : [], n = new Kt(t);
|
|
1792
1828
|
return {
|
|
1793
1829
|
getHead: () => {
|
|
1794
1830
|
if (t.type === "url" && !t.skipPreload)
|
|
@@ -1806,110 +1842,156 @@ const Es = {
|
|
|
1806
1842
|
},
|
|
1807
1843
|
getMdxComponents: () => ({
|
|
1808
1844
|
OpenPlaygroundButton: ({
|
|
1809
|
-
requireAuth:
|
|
1810
|
-
server:
|
|
1811
|
-
method:
|
|
1812
|
-
url:
|
|
1813
|
-
...
|
|
1845
|
+
requireAuth: i,
|
|
1846
|
+
server: d,
|
|
1847
|
+
method: r,
|
|
1848
|
+
url: m,
|
|
1849
|
+
...c
|
|
1814
1850
|
}) => {
|
|
1815
|
-
const h =
|
|
1816
|
-
if (!
|
|
1851
|
+
const h = St();
|
|
1852
|
+
if (!d)
|
|
1817
1853
|
throw new Error("Server is required");
|
|
1818
|
-
return
|
|
1819
|
-
|
|
1854
|
+
return i && !h.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
1855
|
+
_,
|
|
1820
1856
|
{
|
|
1821
1857
|
className: "gap-2 items-center",
|
|
1822
1858
|
variant: "outline",
|
|
1823
1859
|
onClick: h.login,
|
|
1824
1860
|
children: [
|
|
1825
1861
|
"Login to open in Playground ",
|
|
1826
|
-
/* @__PURE__ */ e.jsx(
|
|
1862
|
+
/* @__PURE__ */ e.jsx(Nt, { size: 16 })
|
|
1827
1863
|
]
|
|
1828
1864
|
}
|
|
1829
1865
|
) : /* @__PURE__ */ e.jsx(
|
|
1830
|
-
|
|
1866
|
+
Qa,
|
|
1831
1867
|
{
|
|
1832
|
-
url:
|
|
1833
|
-
method:
|
|
1834
|
-
server:
|
|
1835
|
-
...
|
|
1836
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1868
|
+
url: m ?? "/",
|
|
1869
|
+
method: r ?? "get",
|
|
1870
|
+
server: d,
|
|
1871
|
+
...c,
|
|
1872
|
+
children: /* @__PURE__ */ e.jsxs(_, { className: "gap-2 items-center", variant: "outline", children: [
|
|
1837
1873
|
"Open in Playground ",
|
|
1838
|
-
/* @__PURE__ */ e.jsx(
|
|
1874
|
+
/* @__PURE__ */ e.jsx(wt, { size: 16 })
|
|
1839
1875
|
] })
|
|
1840
1876
|
}
|
|
1841
1877
|
);
|
|
1842
1878
|
}
|
|
1843
1879
|
}),
|
|
1844
|
-
getSidebar: async (
|
|
1845
|
-
|
|
1880
|
+
getSidebar: async (i) => {
|
|
1881
|
+
var d;
|
|
1882
|
+
if (!Ct({ path: a, end: !1 }, i))
|
|
1846
1883
|
return [];
|
|
1847
1884
|
try {
|
|
1848
|
-
const
|
|
1885
|
+
const r = s.find(
|
|
1886
|
+
(l) => i.startsWith(I(a, l))
|
|
1887
|
+
), m = r ?? Object.keys(t.input).at(0), c = await n.fetch(Wa, {
|
|
1849
1888
|
type: t.type,
|
|
1850
|
-
input: t.type === "file" ? t.input[
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
label: h.summary ?? h.path,
|
|
1860
|
-
href: `#${h.slug}`,
|
|
1861
|
-
badge: {
|
|
1862
|
-
label: h.method,
|
|
1863
|
-
color: Us[h.method.toLowerCase()],
|
|
1864
|
-
invert: !0
|
|
1865
|
-
}
|
|
1866
|
-
}))
|
|
1867
|
-
}));
|
|
1868
|
-
return u.unshift({
|
|
1889
|
+
input: t.type === "file" ? t.input[m] : t.input
|
|
1890
|
+
}), h = (d = t.tagPages) == null ? void 0 : d.find(
|
|
1891
|
+
(l) => i.split("/").at(-1) === te(l)
|
|
1892
|
+
), v = (await n.fetch(Za, {
|
|
1893
|
+
type: t.type,
|
|
1894
|
+
input: t.type === "file" ? t.input[m] : t.input,
|
|
1895
|
+
tag: h,
|
|
1896
|
+
untagged: h === void 0
|
|
1897
|
+
})).schema.operations.map((l) => ({
|
|
1869
1898
|
type: "link",
|
|
1870
|
-
label:
|
|
1871
|
-
href:
|
|
1872
|
-
|
|
1899
|
+
label: l.summary ?? l.path,
|
|
1900
|
+
href: `#${l.slug}`,
|
|
1901
|
+
badge: {
|
|
1902
|
+
label: l.method,
|
|
1903
|
+
color: Ka[l.method.toLowerCase()],
|
|
1904
|
+
invert: !0
|
|
1905
|
+
}
|
|
1906
|
+
}));
|
|
1907
|
+
return c.schema.tags.map((l) => {
|
|
1908
|
+
const f = I(
|
|
1909
|
+
a,
|
|
1910
|
+
r,
|
|
1911
|
+
l.name ? te(l.name) : oe
|
|
1912
|
+
);
|
|
1913
|
+
return {
|
|
1914
|
+
type: "category",
|
|
1915
|
+
label: l.name || "Other endpoints",
|
|
1916
|
+
link: {
|
|
1917
|
+
type: "doc",
|
|
1918
|
+
id: f,
|
|
1919
|
+
label: l.name
|
|
1920
|
+
},
|
|
1921
|
+
collapsible: !1,
|
|
1922
|
+
collapsed: !0,
|
|
1923
|
+
items: i === f ? v : []
|
|
1924
|
+
};
|
|
1925
|
+
});
|
|
1873
1926
|
} catch {
|
|
1874
1927
|
return [];
|
|
1875
1928
|
}
|
|
1876
1929
|
},
|
|
1877
|
-
getRoutes: () =>
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1930
|
+
getRoutes: () => {
|
|
1931
|
+
const i = [null, ...s], d = (t.tagPages ?? []).map((r) => ({
|
|
1932
|
+
tag: r,
|
|
1933
|
+
path: te(r)
|
|
1934
|
+
}));
|
|
1935
|
+
return i.map((r) => {
|
|
1936
|
+
const m = I(a, r ? `/${r}` : "");
|
|
1881
1937
|
return {
|
|
1882
|
-
|
|
1883
|
-
|
|
1938
|
+
path: m,
|
|
1939
|
+
async lazy() {
|
|
1940
|
+
const { OpenApiRoute: c } = await import("./OpenApiRoute-UrC_t0e5.js");
|
|
1941
|
+
return {
|
|
1942
|
+
element: /* @__PURE__ */ e.jsx(
|
|
1943
|
+
c,
|
|
1944
|
+
{
|
|
1945
|
+
version: r ?? void 0,
|
|
1946
|
+
basePath: a,
|
|
1947
|
+
versions: s,
|
|
1948
|
+
client: n,
|
|
1949
|
+
config: t
|
|
1950
|
+
}
|
|
1951
|
+
)
|
|
1952
|
+
};
|
|
1953
|
+
},
|
|
1954
|
+
children: [
|
|
1884
1955
|
{
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1956
|
+
index: !0,
|
|
1957
|
+
loader: () => {
|
|
1958
|
+
var c;
|
|
1959
|
+
return $t(
|
|
1960
|
+
I(m, ((c = d.at(0)) == null ? void 0 : c.path) ?? oe)
|
|
1961
|
+
);
|
|
1962
|
+
}
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
path: I(m, oe),
|
|
1966
|
+
async lazy() {
|
|
1967
|
+
const { OperationList: c } = await import("./OperationList-CDt1xdc4.js");
|
|
1968
|
+
return { element: /* @__PURE__ */ e.jsx(c, { untagged: !0 }) };
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
...d.map((c) => ({
|
|
1972
|
+
path: I(m, c.path),
|
|
1973
|
+
async lazy() {
|
|
1974
|
+
const { OperationList: h } = await import("./OperationList-CDt1xdc4.js");
|
|
1975
|
+
return {
|
|
1976
|
+
element: /* @__PURE__ */ e.jsx(h, { tag: c.tag })
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
}))
|
|
1980
|
+
]
|
|
1891
1981
|
};
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
{
|
|
1895
|
-
index: !0,
|
|
1896
|
-
async lazy() {
|
|
1897
|
-
const { OperationList: l } = await import("./OperationList-DH-zIgtq.js");
|
|
1898
|
-
return { element: /* @__PURE__ */ e.jsx(l, {}) };
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
]
|
|
1902
|
-
}))
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1903
1984
|
};
|
|
1904
1985
|
};
|
|
1905
1986
|
export {
|
|
1906
|
-
|
|
1907
|
-
|
|
1987
|
+
Ke as C,
|
|
1988
|
+
Qa as P,
|
|
1908
1989
|
Ve as a,
|
|
1909
1990
|
ze as b,
|
|
1910
1991
|
Fe as c,
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1992
|
+
oa as d,
|
|
1993
|
+
We as g,
|
|
1994
|
+
Aa as m,
|
|
1995
|
+
$s as o
|
|
1914
1996
|
};
|
|
1915
|
-
//# sourceMappingURL=index-
|
|
1997
|
+
//# sourceMappingURL=index-Eb1oiHbM.js.map
|