zudoku 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +8 -0
- package/dist/app/entry.server.js +14 -1
- package/dist/app/entry.server.js.map +1 -1
- package/dist/config/config.d.ts +3 -1
- package/dist/config/validators/BuildSchema.d.ts +5 -4
- package/dist/config/validators/BuildSchema.js +5 -2
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +20 -20
- package/dist/config/validators/validate.d.ts +10 -12
- package/dist/config/validators/validate.js +8 -8
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +6 -1
- package/dist/lib/authentication/authentication.d.ts +17 -9
- package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +6 -5
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +6 -6
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +5 -5
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +3 -2
- package/dist/lib/authentication/hook.js +12 -8
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +4 -4
- package/dist/lib/authentication/providers/azureb2c.js +3 -3
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +2 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -7
- package/dist/lib/authentication/providers/openid.js +5 -3
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +35 -31
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +1 -5
- package/dist/lib/authentication/state.js +2 -14
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +6 -14
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -0
- package/dist/lib/core/ZudokuContext.js +2 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +2 -2
- package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -0
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +4 -9
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +12 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -21
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +13 -2
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +5 -5
- package/dist/lib/ui/Callout.js +5 -5
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +1 -1
- package/dist/lib/ui/ReactComponentDoc.js +2 -2
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -1
- package/dist/lib/util/MdxComponents.js +3 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/syncZustandState.d.ts +5 -0
- package/dist/lib/util/syncZustandState.js +14 -0
- package/dist/lib/util/syncZustandState.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +3 -1
- package/dist/vite/api/SchemaManager.js +22 -3
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +2 -2
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/plugin-api.js +14 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-docs.js +1 -1
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +4 -2
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/dist/vite/plugin-mdx.js +36 -30
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{ErrorAlert-VBJ8aHH7.js → ErrorAlert-DE3Sf66a.js} +1711 -1772
- package/lib/ErrorAlert-DE3Sf66a.js.map +1 -0
- package/lib/{MdxPage-DFRNwSsc.js → MdxPage-DZfeC0QY.js} +81 -80
- package/lib/MdxPage-DZfeC0QY.js.map +1 -0
- package/lib/{OAuthErrorPage-DJUOdr6Q.js → OAuthErrorPage-BycMozgn.js} +8 -8
- package/lib/{OAuthErrorPage-DJUOdr6Q.js.map → OAuthErrorPage-BycMozgn.js.map} +1 -1
- package/lib/{OasProvider-D2NYAaBN.js → OasProvider-Bf5zBDBY.js} +3 -3
- package/lib/{OasProvider-D2NYAaBN.js.map → OasProvider-Bf5zBDBY.js.map} +1 -1
- package/lib/{OperationList-DmXCI4NU.js → OperationList-Cmiw1xm2.js} +10 -10
- package/lib/{OperationList-DmXCI4NU.js.map → OperationList-Cmiw1xm2.js.map} +1 -1
- package/lib/{Pagination-CT4VUR6u.js → Pagination-CJszmeSA.js} +3 -3
- package/lib/{Pagination-CT4VUR6u.js.map → Pagination-CJszmeSA.js.map} +1 -1
- package/lib/RouteGuard-DhU3LRr1.js +81 -0
- package/lib/RouteGuard-DhU3LRr1.js.map +1 -0
- package/lib/{RouterError-fm21cqlj.js → RouterError-VDLnrFqF.js} +5 -5
- package/lib/{RouterError-fm21cqlj.js.map → RouterError-VDLnrFqF.js.map} +1 -1
- package/lib/{SchemaList-uElsscMN.js → SchemaList-xZSf3IMh.js} +7 -7
- package/lib/{SchemaList-uElsscMN.js.map → SchemaList-xZSf3IMh.js.map} +1 -1
- package/lib/{SchemaView-CNQ3VAbI.js → SchemaView-tHXTm5oM.js} +3 -3
- package/lib/{SchemaView-CNQ3VAbI.js.map → SchemaView-tHXTm5oM.js.map} +1 -1
- package/lib/{Select-CPoGZU_V.js → Select-C1DeCqKv.js} +3 -3
- package/lib/{Select-CPoGZU_V.js.map → Select-C1DeCqKv.js.map} +1 -1
- package/lib/SignUp-6SGx9Yyq.js +50 -0
- package/lib/SignUp-6SGx9Yyq.js.map +1 -0
- package/lib/{SyntaxHighlight-B0laqAqK.js → SyntaxHighlight-zvlnSnHB.js} +789 -778
- package/lib/{SyntaxHighlight-B0laqAqK.js.map → SyntaxHighlight-zvlnSnHB.js.map} +1 -1
- package/lib/{Toc-KzXCRqrX.js → Toc-Da9yp7lo.js} +5 -5
- package/lib/Toc-Da9yp7lo.js.map +1 -0
- package/lib/{ZudokuContext-BXTZApgy.js → ZudokuContext-BUZ5hkWB.js} +33 -31
- package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js → chunk-PVWAREVJ-BMhpCH5D.js} +7 -7
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js.map → chunk-PVWAREVJ-BMhpCH5D.js.map} +1 -1
- package/lib/{circular-BWT7_Ahq.js → circular-DvuimBGQ.js} +2 -2
- package/lib/{circular-BWT7_Ahq.js.map → circular-DvuimBGQ.js.map} +1 -1
- package/lib/{createServer-zhJZSgor.js → createServer-D9UvCoDf.js} +4 -4
- package/lib/{createServer-zhJZSgor.js.map → createServer-D9UvCoDf.js.map} +1 -1
- package/lib/{errors-XqO6MsfU.js → errors-CuGgh3hf.js} +2 -2
- package/lib/{errors-XqO6MsfU.js.map → errors-CuGgh3hf.js.map} +1 -1
- package/lib/hook-CMeoxziF.js +40 -0
- package/lib/hook-CMeoxziF.js.map +1 -0
- package/lib/{index-BPSpOxTK.js → index-B1rmok4X.js} +148 -147
- package/lib/index-B1rmok4X.js.map +1 -0
- package/lib/{index-D8Btv4uT.js → index-Cr9_YzOZ.js} +826 -780
- package/lib/index-Cr9_YzOZ.js.map +1 -0
- package/lib/{index-C5L4favO.js → index-rYHsvtTo.js} +2 -2
- package/lib/{index-C5L4favO.js.map → index-rYHsvtTo.js.map} +1 -1
- package/lib/{mutation-CdGPxHNX.js → mutation-BSU0xu4m.js} +2 -2
- package/lib/{mutation-CdGPxHNX.js.map → mutation-BSU0xu4m.js.map} +1 -1
- package/lib/ui/Callout.js +18 -18
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/CodeBlock.js +217 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +22 -19
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/ReactComponentDoc.js +13 -13
- package/lib/ui/ReactComponentDoc.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-Cd7Yg_uG.js → useExposedProps-U3pmsHaG.js} +2 -2
- package/lib/{useExposedProps-Cd7Yg_uG.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
- package/lib/zudoku.__internal.js +7 -7
- package/lib/zudoku.auth-auth0.js +13 -13
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +28 -28
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +40 -40
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +53 -56
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +111 -52
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +4 -4
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +99 -99
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +10 -9
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +38 -38
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +18 -10
- package/src/app/entry.server.tsx +16 -6
- package/src/app/main.css +61 -9
- package/src/lib/authentication/authentication.ts +22 -4
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +7 -5
- package/src/lib/authentication/components/SignOut.tsx +7 -6
- package/src/lib/authentication/components/SignUp.tsx +5 -8
- package/src/lib/authentication/hook.ts +21 -10
- package/src/lib/authentication/providers/auth0.tsx +2 -1
- package/src/lib/authentication/providers/azureb2c.tsx +10 -3
- package/src/lib/authentication/providers/clerk.tsx +9 -2
- package/src/lib/authentication/providers/openid.tsx +20 -15
- package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
- package/src/lib/authentication/providers/supabase.tsx +59 -43
- package/src/lib/authentication/state.ts +3 -23
- package/src/lib/components/Zudoku.tsx +3 -3
- package/src/lib/components/navigation/Toc.tsx +3 -3
- package/src/lib/core/RouteGuard.tsx +33 -13
- package/src/lib/core/ZudokuContext.ts +3 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +4 -1
- package/src/lib/plugins/markdown/index.tsx +2 -0
- package/src/lib/plugins/openapi/index.tsx +9 -29
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +13 -2
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +102 -58
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
- package/src/lib/shiki.ts +16 -2
- package/src/lib/ui/Callout.tsx +10 -5
- package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -3
- package/src/lib/ui/ReactComponentDoc.tsx +17 -17
- package/src/lib/ui/SyntaxHighlight.tsx +6 -1
- package/src/lib/util/MdxComponents.tsx +3 -5
- package/src/lib/util/syncZustandState.ts +22 -0
- package/lib/CodeBlock-CanTUJLl.js +0 -221
- package/lib/CodeBlock-CanTUJLl.js.map +0 -1
- package/lib/ErrorAlert-VBJ8aHH7.js.map +0 -1
- package/lib/MdxPage-DFRNwSsc.js.map +0 -1
- package/lib/RouteGuard-Bg0Lu0OU.js +0 -56
- package/lib/RouteGuard-Bg0Lu0OU.js.map +0 -1
- package/lib/SignUp-BraHuRN_.js +0 -56
- package/lib/SignUp-BraHuRN_.js.map +0 -1
- package/lib/Toc-KzXCRqrX.js.map +0 -1
- package/lib/ZudokuContext-BXTZApgy.js.map +0 -1
- package/lib/hook-CAebs2rv.js +0 -31
- package/lib/hook-CAebs2rv.js.map +0 -1
- package/lib/index-BPSpOxTK.js.map +0 -1
- package/lib/index-D8Btv4uT.js.map +0 -1
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { ChevronUpIcon as
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { S as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { g as rt, h as at, i as ot, j as cs } from "./ErrorAlert-VBJ8aHH7.js";
|
|
2
|
+
import { ChevronUpIcon as xn, PlusCircleIcon as ne, FileInput as gn, Check as yn, TableOfContentsIcon as vn, LockIcon as bn, CircleAlertIcon as jn, XIcon as yt, Circle as Cn, Unlink2Icon as Nn, CornerDownRightIcon as wn, MinusCircleIcon as at, CornerDownLeftIcon as Sn, SquareCodeIcon as Tn, DownloadIcon as An, EyeOffIcon as On, EyeIcon as Pn, UnplugIcon as Ln, SendIcon as $n, CheckIcon as Rn, CopyIcon as En, IdCardLanyardIcon as kn, ShapesIcon as In, CirclePlayIcon as Dn } from "lucide-react";
|
|
3
|
+
import { r as zn, b as Fn, d as qn, N as Vn, aL as _n, m as ot } from "./chunk-PVWAREVJ-BMhpCH5D.js";
|
|
4
|
+
import { Button as he } from "./ui/Button.js";
|
|
5
|
+
import { J as ke, K as Ie, L as vt, l as Bn, M as Un, O as Mn, j as k, b as Gn } from "./ZudokuContext-BUZ5hkWB.js";
|
|
6
|
+
import { Z as Hn } from "./invariant-Bm-FVUQE.js";
|
|
7
|
+
import * as _ from "react";
|
|
8
|
+
import { createContext as bt, use as Qn, useRef as O, useEffect as F, useMemo as jt, useState as A, useCallback as Ct, Fragment as Z, useLayoutEffect as Jn, useTransition as Wn, useContext as Xn } from "react";
|
|
9
|
+
import { VisuallyHidden as Zn } from "@radix-ui/react-visually-hidden";
|
|
10
|
+
import { useAuth as Yn } from "./zudoku.hooks.js";
|
|
11
|
+
import { D as De, a as ze, c as Fe, d as Nt, e as wt, g as Kn } from "./Dialog-BQciPiHN.js";
|
|
12
|
+
import { S as es, b as ts } from "./index-B1rmok4X.js";
|
|
13
|
+
import { S as St, c as Tt, d as At, e as Ot, g as pe, i as ns, A as ss, a as rs, b as as, u as os } from "./Select-C1DeCqKv.js";
|
|
14
|
+
import { u as ae, b as qe, C as q, a as is, F as cs } from "./index.esm-BYObtETB.js";
|
|
15
|
+
import { B as R } from "./Button-DmS4u8Lj.js";
|
|
16
|
+
import * as Ve from "@radix-ui/react-collapsible";
|
|
17
|
+
import { g as it, h as ct, i as lt, j as ls, k as ds } from "./ErrorAlert-DE3Sf66a.js";
|
|
19
18
|
import { c as C } from "./cn-dYga0KKN.js";
|
|
20
|
-
import { u as
|
|
21
|
-
import { u as
|
|
22
|
-
import { D as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import { PopoverAnchor as
|
|
26
|
-
import { P as
|
|
27
|
-
import { f as
|
|
28
|
-
import { Input as
|
|
29
|
-
import { Slot as
|
|
30
|
-
import { C as
|
|
31
|
-
import * as
|
|
32
|
-
import { c as
|
|
33
|
-
import * as
|
|
34
|
-
import { z as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const Ps = (e) => {
|
|
19
|
+
import { u as us } from "./useCopyToClipboard-B_085nfO.js";
|
|
20
|
+
import { u as ms } from "./useLatest-hmRS46UF.js";
|
|
21
|
+
import { D as ps, a as hs, b as fs, d as xs, e as gs, f as ys, c as vs } from "./DropdownMenu-BZ2NKQ3K.js";
|
|
22
|
+
import * as $e from "@radix-ui/react-checkbox";
|
|
23
|
+
import * as fe from "@radix-ui/react-popover";
|
|
24
|
+
import { PopoverAnchor as bs } from "@radix-ui/react-popover";
|
|
25
|
+
import { P as js } from "./index-CrcNWbel.js";
|
|
26
|
+
import { f as Cs, g as Ns, C as ws, b as Ss } from "./Command-CUcrW3qs.js";
|
|
27
|
+
import { Input as xe } from "./ui/Input.js";
|
|
28
|
+
import { Slot as Ts } from "@radix-ui/react-slot";
|
|
29
|
+
import { C as As } from "./Card-KFniaZn5.js";
|
|
30
|
+
import * as Pt from "@radix-ui/react-label";
|
|
31
|
+
import { c as Os } from "./index-DI5SPFK9.js";
|
|
32
|
+
import * as se from "@radix-ui/react-radio-group";
|
|
33
|
+
import { z as Ps } from "./useExposedProps-U3pmsHaG.js";
|
|
34
|
+
let Se;
|
|
35
|
+
const Ls = (e) => {
|
|
38
36
|
if (e.errors?.[0])
|
|
39
|
-
throw new
|
|
37
|
+
throw new Hn(e.errors[0].message, {
|
|
40
38
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
41
39
|
});
|
|
42
40
|
};
|
|
43
|
-
class
|
|
41
|
+
class $s {
|
|
44
42
|
constructor(t) {
|
|
45
43
|
this.config = t;
|
|
46
44
|
}
|
|
47
|
-
#e = async () => (
|
|
45
|
+
#e = async () => (Se || (Se = import("./createServer-D9UvCoDf.js").then(
|
|
48
46
|
(t) => t.createServer(this.config)
|
|
49
|
-
)),
|
|
47
|
+
)), Se);
|
|
50
48
|
#t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
|
|
51
49
|
fetch = async (t, s) => {
|
|
52
50
|
const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
|
|
@@ -57,14 +55,14 @@ class Ls {
|
|
|
57
55
|
if (!r.ok)
|
|
58
56
|
throw new Error("Network response was not ok");
|
|
59
57
|
const o = await r.json();
|
|
60
|
-
return
|
|
58
|
+
return Ls(o), o.data;
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
|
-
function
|
|
61
|
+
function Te(e, t) {
|
|
64
62
|
if (!!!e)
|
|
65
63
|
throw new Error(t);
|
|
66
64
|
}
|
|
67
|
-
function
|
|
65
|
+
function Rs(e) {
|
|
68
66
|
return typeof e == "object" && e !== null;
|
|
69
67
|
}
|
|
70
68
|
function Es(e, t) {
|
|
@@ -73,10 +71,10 @@ function Es(e, t) {
|
|
|
73
71
|
t ?? "Unexpected invariant triggered."
|
|
74
72
|
);
|
|
75
73
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
74
|
+
const ks = /\r\n|[\n\r]/g;
|
|
75
|
+
function Re(e, t) {
|
|
78
76
|
let s = 0, a = 1;
|
|
79
|
-
for (const r of e.body.matchAll(
|
|
77
|
+
for (const r of e.body.matchAll(ks)) {
|
|
80
78
|
if (typeof r.index == "number" || Es(!1), r.index >= t)
|
|
81
79
|
break;
|
|
82
80
|
s = r.index + r[0].length, a += 1;
|
|
@@ -86,27 +84,27 @@ function Pe(e, t) {
|
|
|
86
84
|
column: t + 1 - s
|
|
87
85
|
};
|
|
88
86
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
87
|
+
function Is(e) {
|
|
88
|
+
return Lt(
|
|
91
89
|
e.source,
|
|
92
|
-
|
|
90
|
+
Re(e.source, e.start)
|
|
93
91
|
);
|
|
94
92
|
}
|
|
95
|
-
function
|
|
93
|
+
function Lt(e, t) {
|
|
96
94
|
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, l = t.line === 1 ? s : 0, c = t.column + l, u = `${e.name}:${i}:${c}
|
|
97
95
|
`, d = a.split(/\r\n|[\n\r]/g), h = d[r];
|
|
98
96
|
if (h.length > 120) {
|
|
99
|
-
const
|
|
97
|
+
const x = Math.floor(c / 80), m = c % 80, v = [];
|
|
100
98
|
for (let y = 0; y < h.length; y += 80)
|
|
101
99
|
v.push(h.slice(y, y + 80));
|
|
102
|
-
return u +
|
|
100
|
+
return u + dt([
|
|
103
101
|
[`${i} |`, v[0]],
|
|
104
|
-
...v.slice(1,
|
|
102
|
+
...v.slice(1, x + 1).map((y) => ["|", y]),
|
|
105
103
|
["|", "^".padStart(m)],
|
|
106
|
-
["|", v[
|
|
104
|
+
["|", v[x + 1]]
|
|
107
105
|
]);
|
|
108
106
|
}
|
|
109
|
-
return u +
|
|
107
|
+
return u + dt([
|
|
110
108
|
// Lines specified like this: ["prefix", "string"],
|
|
111
109
|
[`${i - 1} |`, d[r - 1]],
|
|
112
110
|
[`${i} |`, h],
|
|
@@ -114,12 +112,12 @@ function At(e, t) {
|
|
|
114
112
|
[`${i + 1} |`, d[r + 1]]
|
|
115
113
|
]);
|
|
116
114
|
}
|
|
117
|
-
function
|
|
115
|
+
function dt(e) {
|
|
118
116
|
const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
|
|
119
117
|
return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
120
118
|
`);
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function Ds(e) {
|
|
123
121
|
const t = e[0];
|
|
124
122
|
return t == null || "kind" in t || "length" in t ? {
|
|
125
123
|
nodes: t,
|
|
@@ -130,7 +128,7 @@ function Is(e) {
|
|
|
130
128
|
extensions: e[5]
|
|
131
129
|
} : t;
|
|
132
130
|
}
|
|
133
|
-
class
|
|
131
|
+
class _e extends Error {
|
|
134
132
|
/**
|
|
135
133
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
136
134
|
* which correspond to this error.
|
|
@@ -171,15 +169,15 @@ class Fe extends Error {
|
|
|
171
169
|
*/
|
|
172
170
|
constructor(t, ...s) {
|
|
173
171
|
var a, r, o;
|
|
174
|
-
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: h } =
|
|
175
|
-
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes =
|
|
172
|
+
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: h } = Ds(s);
|
|
173
|
+
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes = ut(
|
|
176
174
|
Array.isArray(i) ? i : i ? [i] : void 0
|
|
177
175
|
);
|
|
178
|
-
const
|
|
176
|
+
const x = ut(
|
|
179
177
|
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((v) => v.loc).filter((v) => v != null)
|
|
180
178
|
);
|
|
181
|
-
this.source = l ?? (
|
|
182
|
-
const m =
|
|
179
|
+
this.source = l ?? (x == null || (r = x[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? x?.map((v) => v.start), this.locations = c && l ? c.map((v) => Re(l, v)) : x?.map((v) => Re(v.source, v.start));
|
|
180
|
+
const m = Rs(
|
|
183
181
|
d?.extensions
|
|
184
182
|
) ? d?.extensions : void 0;
|
|
185
183
|
this.extensions = (o = h ?? m) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
@@ -206,7 +204,7 @@ class Fe extends Error {
|
|
|
206
204
|
value: d.stack,
|
|
207
205
|
writable: !0,
|
|
208
206
|
configurable: !0
|
|
209
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
207
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, _e) : Object.defineProperty(this, "stack", {
|
|
210
208
|
value: Error().stack,
|
|
211
209
|
writable: !0,
|
|
212
210
|
configurable: !0
|
|
@@ -221,12 +219,12 @@ class Fe extends Error {
|
|
|
221
219
|
for (const s of this.nodes)
|
|
222
220
|
s.loc && (t += `
|
|
223
221
|
|
|
224
|
-
` +
|
|
222
|
+
` + Is(s.loc));
|
|
225
223
|
else if (this.source && this.locations)
|
|
226
224
|
for (const s of this.locations)
|
|
227
225
|
t += `
|
|
228
226
|
|
|
229
|
-
` +
|
|
227
|
+
` + Lt(this.source, s);
|
|
230
228
|
return t;
|
|
231
229
|
}
|
|
232
230
|
toJSON() {
|
|
@@ -236,16 +234,16 @@ class Fe extends Error {
|
|
|
236
234
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
237
235
|
}
|
|
238
236
|
}
|
|
239
|
-
function
|
|
237
|
+
function ut(e) {
|
|
240
238
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
241
239
|
}
|
|
242
240
|
function P(e, t, s) {
|
|
243
|
-
return new
|
|
241
|
+
return new _e(`Syntax Error: ${s}`, {
|
|
244
242
|
source: e,
|
|
245
243
|
positions: [t]
|
|
246
244
|
});
|
|
247
245
|
}
|
|
248
|
-
class
|
|
246
|
+
class Fa {
|
|
249
247
|
/**
|
|
250
248
|
* The character offset at which this Node begins.
|
|
251
249
|
*/
|
|
@@ -274,7 +272,7 @@ class Va {
|
|
|
274
272
|
};
|
|
275
273
|
}
|
|
276
274
|
}
|
|
277
|
-
class
|
|
275
|
+
class $t {
|
|
278
276
|
/**
|
|
279
277
|
* The kind of Token.
|
|
280
278
|
*/
|
|
@@ -316,7 +314,7 @@ class Ot {
|
|
|
316
314
|
};
|
|
317
315
|
}
|
|
318
316
|
}
|
|
319
|
-
const
|
|
317
|
+
const zs = {
|
|
320
318
|
Name: [],
|
|
321
319
|
Document: ["definitions"],
|
|
322
320
|
OperationDefinition: [
|
|
@@ -390,37 +388,37 @@ const Ds = {
|
|
|
390
388
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
391
389
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
392
390
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
393
|
-
},
|
|
394
|
-
function
|
|
391
|
+
}, Fs = new Set(Object.keys(zs));
|
|
392
|
+
function qa(e) {
|
|
395
393
|
const t = e?.kind;
|
|
396
|
-
return typeof t == "string" &&
|
|
394
|
+
return typeof t == "string" && Fs.has(t);
|
|
397
395
|
}
|
|
398
|
-
var
|
|
396
|
+
var mt;
|
|
399
397
|
(function(e) {
|
|
400
398
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
401
|
-
})(
|
|
402
|
-
function
|
|
399
|
+
})(mt || (mt = {}));
|
|
400
|
+
function Ee(e) {
|
|
403
401
|
return e === 9 || e === 32;
|
|
404
402
|
}
|
|
405
|
-
function
|
|
403
|
+
function re(e) {
|
|
406
404
|
return e >= 48 && e <= 57;
|
|
407
405
|
}
|
|
408
|
-
function
|
|
406
|
+
function Rt(e) {
|
|
409
407
|
return e >= 97 && e <= 122 || // A-Z
|
|
410
408
|
e >= 65 && e <= 90;
|
|
411
409
|
}
|
|
412
|
-
function
|
|
413
|
-
return
|
|
414
|
-
}
|
|
415
|
-
function Fs(e) {
|
|
416
|
-
return Pt(e) || ne(e) || e === 95;
|
|
410
|
+
function Et(e) {
|
|
411
|
+
return Rt(e) || e === 95;
|
|
417
412
|
}
|
|
418
413
|
function qs(e) {
|
|
414
|
+
return Rt(e) || re(e) || e === 95;
|
|
415
|
+
}
|
|
416
|
+
function Vs(e) {
|
|
419
417
|
var t;
|
|
420
418
|
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
421
419
|
for (let i = 0; i < e.length; ++i) {
|
|
422
420
|
var o;
|
|
423
|
-
const l = e[i], c =
|
|
421
|
+
const l = e[i], c = _s(l);
|
|
424
422
|
c !== l.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && c < s && (s = c));
|
|
425
423
|
}
|
|
426
424
|
return e.map((i, l) => l === 0 ? i : i.slice(s)).slice(
|
|
@@ -428,26 +426,26 @@ function qs(e) {
|
|
|
428
426
|
r + 1
|
|
429
427
|
);
|
|
430
428
|
}
|
|
431
|
-
function
|
|
429
|
+
function _s(e) {
|
|
432
430
|
let t = 0;
|
|
433
|
-
for (; t < e.length &&
|
|
431
|
+
for (; t < e.length && Ee(e.charCodeAt(t)); )
|
|
434
432
|
++t;
|
|
435
433
|
return t;
|
|
436
434
|
}
|
|
437
435
|
function Bs(e, t) {
|
|
438
|
-
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 ||
|
|
436
|
+
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 || Ee(m.charCodeAt(0))), i = s.endsWith('\\"""'), l = e.endsWith('"') && !i, c = e.endsWith("\\"), u = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
439
437
|
(!r || e.length > 70 || u || o || i);
|
|
440
438
|
let h = "";
|
|
441
|
-
const
|
|
442
|
-
return (d && !
|
|
439
|
+
const x = r && Ee(e.charCodeAt(0));
|
|
440
|
+
return (d && !x || o) && (h += `
|
|
443
441
|
`), h += s, (d || u) && (h += `
|
|
444
442
|
`), '"""' + h + '"""';
|
|
445
443
|
}
|
|
446
|
-
var
|
|
444
|
+
var g;
|
|
447
445
|
(function(e) {
|
|
448
446
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
449
|
-
})(
|
|
450
|
-
class
|
|
447
|
+
})(g || (g = {}));
|
|
448
|
+
class Us {
|
|
451
449
|
/**
|
|
452
450
|
* The previously focused non-ignored token.
|
|
453
451
|
*/
|
|
@@ -461,7 +459,7 @@ class _s {
|
|
|
461
459
|
* The character offset at which the current line begins.
|
|
462
460
|
*/
|
|
463
461
|
constructor(t) {
|
|
464
|
-
const s = new
|
|
462
|
+
const s = new $t(g.SOF, 0, 0, 0, 0);
|
|
465
463
|
this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
466
464
|
}
|
|
467
465
|
get [Symbol.toStringTag]() {
|
|
@@ -479,37 +477,37 @@ class _s {
|
|
|
479
477
|
*/
|
|
480
478
|
lookahead() {
|
|
481
479
|
let t = this.token;
|
|
482
|
-
if (t.kind !==
|
|
480
|
+
if (t.kind !== g.EOF)
|
|
483
481
|
do
|
|
484
482
|
if (t.next)
|
|
485
483
|
t = t.next;
|
|
486
484
|
else {
|
|
487
|
-
const s =
|
|
485
|
+
const s = Gs(this, t.end);
|
|
488
486
|
t.next = s, s.prev = t, t = s;
|
|
489
487
|
}
|
|
490
|
-
while (t.kind ===
|
|
488
|
+
while (t.kind === g.COMMENT);
|
|
491
489
|
return t;
|
|
492
490
|
}
|
|
493
491
|
}
|
|
494
|
-
function
|
|
495
|
-
return e ===
|
|
492
|
+
function Ms(e) {
|
|
493
|
+
return e === g.BANG || e === g.DOLLAR || e === g.AMP || e === g.PAREN_L || e === g.PAREN_R || e === g.SPREAD || e === g.COLON || e === g.EQUALS || e === g.AT || e === g.BRACKET_L || e === g.BRACKET_R || e === g.BRACE_L || e === g.PIPE || e === g.BRACE_R;
|
|
496
494
|
}
|
|
497
|
-
function
|
|
495
|
+
function X(e) {
|
|
498
496
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
499
497
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
498
|
+
function ve(e, t) {
|
|
499
|
+
return kt(e.charCodeAt(t)) && It(e.charCodeAt(t + 1));
|
|
502
500
|
}
|
|
503
|
-
function
|
|
501
|
+
function kt(e) {
|
|
504
502
|
return e >= 55296 && e <= 56319;
|
|
505
503
|
}
|
|
506
|
-
function
|
|
504
|
+
function It(e) {
|
|
507
505
|
return e >= 56320 && e <= 57343;
|
|
508
506
|
}
|
|
509
|
-
function
|
|
507
|
+
function M(e, t) {
|
|
510
508
|
const s = e.source.body.codePointAt(t);
|
|
511
509
|
if (s === void 0)
|
|
512
|
-
return
|
|
510
|
+
return g.EOF;
|
|
513
511
|
if (s >= 32 && s <= 126) {
|
|
514
512
|
const a = String.fromCodePoint(s);
|
|
515
513
|
return a === '"' ? `'"'` : `"${a}"`;
|
|
@@ -518,9 +516,9 @@ function _(e, t) {
|
|
|
518
516
|
}
|
|
519
517
|
function N(e, t, s, a, r) {
|
|
520
518
|
const o = e.line, i = 1 + s - e.lineStart;
|
|
521
|
-
return new
|
|
519
|
+
return new $t(t, s, a, o, i, r);
|
|
522
520
|
}
|
|
523
|
-
function
|
|
521
|
+
function Gs(e, t) {
|
|
524
522
|
const s = e.source.body, a = s.length;
|
|
525
523
|
let r = t;
|
|
526
524
|
for (; r < a; ) {
|
|
@@ -561,7 +559,7 @@ function Ms(e, t) {
|
|
|
561
559
|
continue;
|
|
562
560
|
// Comment
|
|
563
561
|
case 35:
|
|
564
|
-
return
|
|
562
|
+
return Hs(e, r);
|
|
565
563
|
// Token ::
|
|
566
564
|
// - Punctuator
|
|
567
565
|
// - Name
|
|
@@ -571,145 +569,145 @@ function Ms(e, t) {
|
|
|
571
569
|
//
|
|
572
570
|
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
573
571
|
case 33:
|
|
574
|
-
return N(e,
|
|
572
|
+
return N(e, g.BANG, r, r + 1);
|
|
575
573
|
case 36:
|
|
576
|
-
return N(e,
|
|
574
|
+
return N(e, g.DOLLAR, r, r + 1);
|
|
577
575
|
case 38:
|
|
578
|
-
return N(e,
|
|
576
|
+
return N(e, g.AMP, r, r + 1);
|
|
579
577
|
case 40:
|
|
580
|
-
return N(e,
|
|
578
|
+
return N(e, g.PAREN_L, r, r + 1);
|
|
581
579
|
case 41:
|
|
582
|
-
return N(e,
|
|
580
|
+
return N(e, g.PAREN_R, r, r + 1);
|
|
583
581
|
case 46:
|
|
584
582
|
if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
|
|
585
|
-
return N(e,
|
|
583
|
+
return N(e, g.SPREAD, r, r + 3);
|
|
586
584
|
break;
|
|
587
585
|
case 58:
|
|
588
|
-
return N(e,
|
|
586
|
+
return N(e, g.COLON, r, r + 1);
|
|
589
587
|
case 61:
|
|
590
|
-
return N(e,
|
|
588
|
+
return N(e, g.EQUALS, r, r + 1);
|
|
591
589
|
case 64:
|
|
592
|
-
return N(e,
|
|
590
|
+
return N(e, g.AT, r, r + 1);
|
|
593
591
|
case 91:
|
|
594
|
-
return N(e,
|
|
592
|
+
return N(e, g.BRACKET_L, r, r + 1);
|
|
595
593
|
case 93:
|
|
596
|
-
return N(e,
|
|
594
|
+
return N(e, g.BRACKET_R, r, r + 1);
|
|
597
595
|
case 123:
|
|
598
|
-
return N(e,
|
|
596
|
+
return N(e, g.BRACE_L, r, r + 1);
|
|
599
597
|
case 124:
|
|
600
|
-
return N(e,
|
|
598
|
+
return N(e, g.PIPE, r, r + 1);
|
|
601
599
|
case 125:
|
|
602
|
-
return N(e,
|
|
600
|
+
return N(e, g.BRACE_R, r, r + 1);
|
|
603
601
|
// StringValue
|
|
604
602
|
case 34:
|
|
605
|
-
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ?
|
|
603
|
+
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? Ys(e, r) : Js(e, r);
|
|
606
604
|
}
|
|
607
|
-
if (
|
|
608
|
-
return
|
|
609
|
-
if (
|
|
610
|
-
return
|
|
605
|
+
if (re(o) || o === 45)
|
|
606
|
+
return Qs(e, r, o);
|
|
607
|
+
if (Et(o))
|
|
608
|
+
return Ks(e, r);
|
|
611
609
|
throw P(
|
|
612
610
|
e.source,
|
|
613
611
|
r,
|
|
614
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
612
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : X(o) || ve(s, r) ? `Unexpected character: ${M(e, r)}.` : `Invalid character: ${M(e, r)}.`
|
|
615
613
|
);
|
|
616
614
|
}
|
|
617
|
-
return N(e,
|
|
615
|
+
return N(e, g.EOF, a, a);
|
|
618
616
|
}
|
|
619
|
-
function
|
|
617
|
+
function Hs(e, t) {
|
|
620
618
|
const s = e.source.body, a = s.length;
|
|
621
619
|
let r = t + 1;
|
|
622
620
|
for (; r < a; ) {
|
|
623
621
|
const o = s.charCodeAt(r);
|
|
624
622
|
if (o === 10 || o === 13)
|
|
625
623
|
break;
|
|
626
|
-
if (
|
|
624
|
+
if (X(o))
|
|
627
625
|
++r;
|
|
628
|
-
else if (
|
|
626
|
+
else if (ve(s, r))
|
|
629
627
|
r += 2;
|
|
630
628
|
else
|
|
631
629
|
break;
|
|
632
630
|
}
|
|
633
631
|
return N(
|
|
634
632
|
e,
|
|
635
|
-
|
|
633
|
+
g.COMMENT,
|
|
636
634
|
t,
|
|
637
635
|
r,
|
|
638
636
|
s.slice(t + 1, r)
|
|
639
637
|
);
|
|
640
638
|
}
|
|
641
|
-
function
|
|
639
|
+
function Qs(e, t, s) {
|
|
642
640
|
const a = e.source.body;
|
|
643
641
|
let r = t, o = s, i = !1;
|
|
644
642
|
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
645
|
-
if (o = a.charCodeAt(++r),
|
|
643
|
+
if (o = a.charCodeAt(++r), re(o))
|
|
646
644
|
throw P(
|
|
647
645
|
e.source,
|
|
648
646
|
r,
|
|
649
|
-
`Invalid number, unexpected digit after 0: ${
|
|
647
|
+
`Invalid number, unexpected digit after 0: ${M(
|
|
650
648
|
e,
|
|
651
649
|
r
|
|
652
650
|
)}.`
|
|
653
651
|
);
|
|
654
652
|
} else
|
|
655
|
-
r =
|
|
656
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r =
|
|
653
|
+
r = Ae(e, r, o), o = a.charCodeAt(r);
|
|
654
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Ae(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = Ae(e, r, o), o = a.charCodeAt(r)), o === 46 || Et(o))
|
|
657
655
|
throw P(
|
|
658
656
|
e.source,
|
|
659
657
|
r,
|
|
660
|
-
`Invalid number, expected digit but got: ${
|
|
658
|
+
`Invalid number, expected digit but got: ${M(
|
|
661
659
|
e,
|
|
662
660
|
r
|
|
663
661
|
)}.`
|
|
664
662
|
);
|
|
665
663
|
return N(
|
|
666
664
|
e,
|
|
667
|
-
i ?
|
|
665
|
+
i ? g.FLOAT : g.INT,
|
|
668
666
|
t,
|
|
669
667
|
r,
|
|
670
668
|
a.slice(t, r)
|
|
671
669
|
);
|
|
672
670
|
}
|
|
673
|
-
function
|
|
674
|
-
if (!
|
|
671
|
+
function Ae(e, t, s) {
|
|
672
|
+
if (!re(s))
|
|
675
673
|
throw P(
|
|
676
674
|
e.source,
|
|
677
675
|
t,
|
|
678
|
-
`Invalid number, expected digit but got: ${
|
|
676
|
+
`Invalid number, expected digit but got: ${M(
|
|
679
677
|
e,
|
|
680
678
|
t
|
|
681
679
|
)}.`
|
|
682
680
|
);
|
|
683
681
|
const a = e.source.body;
|
|
684
682
|
let r = t + 1;
|
|
685
|
-
for (;
|
|
683
|
+
for (; re(a.charCodeAt(r)); )
|
|
686
684
|
++r;
|
|
687
685
|
return r;
|
|
688
686
|
}
|
|
689
|
-
function
|
|
687
|
+
function Js(e, t) {
|
|
690
688
|
const s = e.source.body, a = s.length;
|
|
691
689
|
let r = t + 1, o = r, i = "";
|
|
692
690
|
for (; r < a; ) {
|
|
693
691
|
const l = s.charCodeAt(r);
|
|
694
692
|
if (l === 34)
|
|
695
|
-
return i += s.slice(o, r), N(e,
|
|
693
|
+
return i += s.slice(o, r), N(e, g.STRING, t, r + 1, i);
|
|
696
694
|
if (l === 92) {
|
|
697
695
|
i += s.slice(o, r);
|
|
698
|
-
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ?
|
|
696
|
+
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Ws(e, r) : Xs(e, r) : Zs(e, r);
|
|
699
697
|
i += c.value, r += c.size, o = r;
|
|
700
698
|
continue;
|
|
701
699
|
}
|
|
702
700
|
if (l === 10 || l === 13)
|
|
703
701
|
break;
|
|
704
|
-
if (
|
|
702
|
+
if (X(l))
|
|
705
703
|
++r;
|
|
706
|
-
else if (
|
|
704
|
+
else if (ve(s, r))
|
|
707
705
|
r += 2;
|
|
708
706
|
else
|
|
709
707
|
throw P(
|
|
710
708
|
e.source,
|
|
711
709
|
r,
|
|
712
|
-
`Invalid character within String: ${
|
|
710
|
+
`Invalid character within String: ${M(
|
|
713
711
|
e,
|
|
714
712
|
r
|
|
715
713
|
)}.`
|
|
@@ -717,13 +715,13 @@ function Qs(e, t) {
|
|
|
717
715
|
}
|
|
718
716
|
throw P(e.source, r, "Unterminated string.");
|
|
719
717
|
}
|
|
720
|
-
function
|
|
718
|
+
function Ws(e, t) {
|
|
721
719
|
const s = e.source.body;
|
|
722
720
|
let a = 0, r = 3;
|
|
723
721
|
for (; r < 12; ) {
|
|
724
722
|
const o = s.charCodeAt(t + r++);
|
|
725
723
|
if (o === 125) {
|
|
726
|
-
if (r < 5 || !
|
|
724
|
+
if (r < 5 || !X(a))
|
|
727
725
|
break;
|
|
728
726
|
return {
|
|
729
727
|
value: String.fromCodePoint(a),
|
|
@@ -742,16 +740,16 @@ function Js(e, t) {
|
|
|
742
740
|
)}".`
|
|
743
741
|
);
|
|
744
742
|
}
|
|
745
|
-
function
|
|
746
|
-
const s = e.source.body, a =
|
|
747
|
-
if (
|
|
743
|
+
function Xs(e, t) {
|
|
744
|
+
const s = e.source.body, a = pt(s, t + 2);
|
|
745
|
+
if (X(a))
|
|
748
746
|
return {
|
|
749
747
|
value: String.fromCodePoint(a),
|
|
750
748
|
size: 6
|
|
751
749
|
};
|
|
752
|
-
if (
|
|
753
|
-
const r =
|
|
754
|
-
if (
|
|
750
|
+
if (kt(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
|
|
751
|
+
const r = pt(s, t + 8);
|
|
752
|
+
if (It(r))
|
|
755
753
|
return {
|
|
756
754
|
value: String.fromCodePoint(a, r),
|
|
757
755
|
size: 12
|
|
@@ -763,13 +761,13 @@ function Ws(e, t) {
|
|
|
763
761
|
`Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
|
|
764
762
|
);
|
|
765
763
|
}
|
|
766
|
-
function
|
|
764
|
+
function pt(e, t) {
|
|
767
765
|
return Y(e.charCodeAt(t)) << 12 | Y(e.charCodeAt(t + 1)) << 8 | Y(e.charCodeAt(t + 2)) << 4 | Y(e.charCodeAt(t + 3));
|
|
768
766
|
}
|
|
769
767
|
function Y(e) {
|
|
770
768
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
771
769
|
}
|
|
772
|
-
function
|
|
770
|
+
function Zs(e, t) {
|
|
773
771
|
const s = e.source.body;
|
|
774
772
|
switch (s.charCodeAt(t + 1)) {
|
|
775
773
|
case 34:
|
|
@@ -823,7 +821,7 @@ function Xs(e, t) {
|
|
|
823
821
|
)}".`
|
|
824
822
|
);
|
|
825
823
|
}
|
|
826
|
-
function
|
|
824
|
+
function Ys(e, t) {
|
|
827
825
|
const s = e.source.body, a = s.length;
|
|
828
826
|
let r = e.lineStart, o = t + 3, i = o, l = "";
|
|
829
827
|
const c = [];
|
|
@@ -833,11 +831,11 @@ function Zs(e, t) {
|
|
|
833
831
|
l += s.slice(i, o), c.push(l);
|
|
834
832
|
const d = N(
|
|
835
833
|
e,
|
|
836
|
-
|
|
834
|
+
g.BLOCK_STRING,
|
|
837
835
|
t,
|
|
838
836
|
o + 3,
|
|
839
837
|
// Return a string of the lines joined with U+000A.
|
|
840
|
-
|
|
838
|
+
Vs(c).join(`
|
|
841
839
|
`)
|
|
842
840
|
);
|
|
843
841
|
return e.line += c.length - 1, e.lineStart = r, d;
|
|
@@ -850,15 +848,15 @@ function Zs(e, t) {
|
|
|
850
848
|
l += s.slice(i, o), c.push(l), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, l = "", i = o, r = o;
|
|
851
849
|
continue;
|
|
852
850
|
}
|
|
853
|
-
if (
|
|
851
|
+
if (X(u))
|
|
854
852
|
++o;
|
|
855
|
-
else if (
|
|
853
|
+
else if (ve(s, o))
|
|
856
854
|
o += 2;
|
|
857
855
|
else
|
|
858
856
|
throw P(
|
|
859
857
|
e.source,
|
|
860
858
|
o,
|
|
861
|
-
`Invalid character within String: ${
|
|
859
|
+
`Invalid character within String: ${M(
|
|
862
860
|
e,
|
|
863
861
|
o
|
|
864
862
|
)}.`
|
|
@@ -866,74 +864,74 @@ function Zs(e, t) {
|
|
|
866
864
|
}
|
|
867
865
|
throw P(e.source, o, "Unterminated string.");
|
|
868
866
|
}
|
|
869
|
-
function
|
|
867
|
+
function Ks(e, t) {
|
|
870
868
|
const s = e.source.body, a = s.length;
|
|
871
869
|
let r = t + 1;
|
|
872
870
|
for (; r < a; ) {
|
|
873
871
|
const o = s.charCodeAt(r);
|
|
874
|
-
if (
|
|
872
|
+
if (qs(o))
|
|
875
873
|
++r;
|
|
876
874
|
else
|
|
877
875
|
break;
|
|
878
876
|
}
|
|
879
877
|
return N(
|
|
880
878
|
e,
|
|
881
|
-
|
|
879
|
+
g.NAME,
|
|
882
880
|
t,
|
|
883
881
|
r,
|
|
884
882
|
s.slice(t, r)
|
|
885
883
|
);
|
|
886
884
|
}
|
|
887
|
-
const
|
|
888
|
-
function
|
|
889
|
-
return
|
|
885
|
+
const er = 10, Dt = 2;
|
|
886
|
+
function zt(e) {
|
|
887
|
+
return be(e, []);
|
|
890
888
|
}
|
|
891
|
-
function
|
|
889
|
+
function be(e, t) {
|
|
892
890
|
switch (typeof e) {
|
|
893
891
|
case "string":
|
|
894
892
|
return JSON.stringify(e);
|
|
895
893
|
case "function":
|
|
896
894
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
897
895
|
case "object":
|
|
898
|
-
return
|
|
896
|
+
return tr(e, t);
|
|
899
897
|
default:
|
|
900
898
|
return String(e);
|
|
901
899
|
}
|
|
902
900
|
}
|
|
903
|
-
function
|
|
901
|
+
function tr(e, t) {
|
|
904
902
|
if (e === null)
|
|
905
903
|
return "null";
|
|
906
904
|
if (t.includes(e))
|
|
907
905
|
return "[Circular]";
|
|
908
906
|
const s = [...t, e];
|
|
909
|
-
if (
|
|
907
|
+
if (nr(e)) {
|
|
910
908
|
const a = e.toJSON();
|
|
911
909
|
if (a !== e)
|
|
912
|
-
return typeof a == "string" ? a :
|
|
910
|
+
return typeof a == "string" ? a : be(a, s);
|
|
913
911
|
} else if (Array.isArray(e))
|
|
914
|
-
return
|
|
915
|
-
return
|
|
912
|
+
return rr(e, s);
|
|
913
|
+
return sr(e, s);
|
|
916
914
|
}
|
|
917
|
-
function
|
|
915
|
+
function nr(e) {
|
|
918
916
|
return typeof e.toJSON == "function";
|
|
919
917
|
}
|
|
920
|
-
function
|
|
918
|
+
function sr(e, t) {
|
|
921
919
|
const s = Object.entries(e);
|
|
922
|
-
return s.length === 0 ? "{}" : t.length >
|
|
923
|
-
([r, o]) => r + ": " +
|
|
920
|
+
return s.length === 0 ? "{}" : t.length > Dt ? "[" + ar(e) + "]" : "{ " + s.map(
|
|
921
|
+
([r, o]) => r + ": " + be(o, t)
|
|
924
922
|
).join(", ") + " }";
|
|
925
923
|
}
|
|
926
|
-
function
|
|
924
|
+
function rr(e, t) {
|
|
927
925
|
if (e.length === 0)
|
|
928
926
|
return "[]";
|
|
929
|
-
if (t.length >
|
|
927
|
+
if (t.length > Dt)
|
|
930
928
|
return "[Array]";
|
|
931
|
-
const s = Math.min(
|
|
929
|
+
const s = Math.min(er, e.length), a = e.length - s, r = [];
|
|
932
930
|
for (let o = 0; o < s; ++o)
|
|
933
|
-
r.push(
|
|
931
|
+
r.push(be(e[o], t));
|
|
934
932
|
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
935
933
|
}
|
|
936
|
-
function
|
|
934
|
+
function ar(e) {
|
|
937
935
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
938
936
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
939
937
|
const s = e.constructor.name;
|
|
@@ -942,11 +940,11 @@ function rr(e) {
|
|
|
942
940
|
}
|
|
943
941
|
return t;
|
|
944
942
|
}
|
|
945
|
-
const
|
|
946
|
-
process.env.NODE_ENV === "production",
|
|
943
|
+
const or = globalThis.process && // eslint-disable-next-line no-undef
|
|
944
|
+
process.env.NODE_ENV === "production", ir = (
|
|
947
945
|
/* c8 ignore next 6 */
|
|
948
946
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
949
|
-
|
|
947
|
+
or ? function(t, s) {
|
|
950
948
|
return t instanceof s;
|
|
951
949
|
} : function(t, s) {
|
|
952
950
|
if (t instanceof s)
|
|
@@ -958,7 +956,7 @@ process.env.NODE_ENV === "production", or = (
|
|
|
958
956
|
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
|
|
959
957
|
);
|
|
960
958
|
if (r === o) {
|
|
961
|
-
const i =
|
|
959
|
+
const i = zt(t);
|
|
962
960
|
throw new Error(`Cannot use ${r} "${i}" from another module or realm.
|
|
963
961
|
|
|
964
962
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
@@ -976,15 +974,15 @@ spurious results.`);
|
|
|
976
974
|
return !1;
|
|
977
975
|
}
|
|
978
976
|
);
|
|
979
|
-
class
|
|
977
|
+
class Ft {
|
|
980
978
|
constructor(t, s = "GraphQL request", a = {
|
|
981
979
|
line: 1,
|
|
982
980
|
column: 1
|
|
983
981
|
}) {
|
|
984
|
-
typeof t == "string" ||
|
|
982
|
+
typeof t == "string" || Te(!1, `Body must be a string. Received: ${zt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || Te(
|
|
985
983
|
!1,
|
|
986
984
|
"line in locationOffset is 1-indexed and must be positive."
|
|
987
|
-
), this.locationOffset.column > 0 ||
|
|
985
|
+
), this.locationOffset.column > 0 || Te(
|
|
988
986
|
!1,
|
|
989
987
|
"column in locationOffset is 1-indexed and must be positive."
|
|
990
988
|
);
|
|
@@ -993,37 +991,37 @@ class It {
|
|
|
993
991
|
return "Source";
|
|
994
992
|
}
|
|
995
993
|
}
|
|
996
|
-
function ir(e) {
|
|
997
|
-
return or(e, It);
|
|
998
|
-
}
|
|
999
994
|
function cr(e) {
|
|
1000
|
-
|
|
995
|
+
return ir(e, Ft);
|
|
996
|
+
}
|
|
997
|
+
function lr(e) {
|
|
998
|
+
const t = cr(e) ? e : new Ft(e), s = t.body, a = new Us(t);
|
|
1001
999
|
let r = "", o = !1;
|
|
1002
|
-
for (; a.advance().kind !==
|
|
1003
|
-
const i = a.token, l = i.kind, c = !
|
|
1004
|
-
o && (c || i.kind ===
|
|
1000
|
+
for (; a.advance().kind !== g.EOF; ) {
|
|
1001
|
+
const i = a.token, l = i.kind, c = !Ms(i.kind);
|
|
1002
|
+
o && (c || i.kind === g.SPREAD) && (r += " ");
|
|
1005
1003
|
const u = s.slice(i.start, i.end);
|
|
1006
|
-
l ===
|
|
1004
|
+
l === g.BLOCK_STRING ? r += Bs(i.value, {
|
|
1007
1005
|
minimize: !0
|
|
1008
1006
|
}) : r += u, o = c;
|
|
1009
1007
|
}
|
|
1010
1008
|
return r;
|
|
1011
1009
|
}
|
|
1012
|
-
const
|
|
1010
|
+
const qt = bt(
|
|
1013
1011
|
void 0
|
|
1014
|
-
),
|
|
1012
|
+
), Va = ({
|
|
1015
1013
|
children: e,
|
|
1016
1014
|
client: t
|
|
1017
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
1015
|
+
}) => /* @__PURE__ */ n.jsx(qt.Provider, { value: t, children: e }), Vt = (e, t, ...[s]) => ({
|
|
1018
1016
|
queryFn: () => e.fetch(t, s),
|
|
1019
|
-
queryKey: [
|
|
1020
|
-
}),
|
|
1021
|
-
const s =
|
|
1017
|
+
queryKey: [lr(t.toString()), s]
|
|
1018
|
+
}), dr = (e, ...[t]) => {
|
|
1019
|
+
const s = Qn(qt);
|
|
1022
1020
|
if (s === void 0)
|
|
1023
1021
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1024
|
-
return
|
|
1022
|
+
return Vt(s, e, ...t === void 0 ? [] : [t]);
|
|
1025
1023
|
};
|
|
1026
|
-
class
|
|
1024
|
+
class H extends String {
|
|
1027
1025
|
__apiType;
|
|
1028
1026
|
value;
|
|
1029
1027
|
__meta__;
|
|
@@ -1034,7 +1032,7 @@ class G extends String {
|
|
|
1034
1032
|
return this.value;
|
|
1035
1033
|
}
|
|
1036
1034
|
}
|
|
1037
|
-
const
|
|
1035
|
+
const ur = new H(
|
|
1038
1036
|
`
|
|
1039
1037
|
fragment OperationsFragment on OperationItem {
|
|
1040
1038
|
slug
|
|
@@ -1106,7 +1104,7 @@ const dr = new G(
|
|
|
1106
1104
|
}
|
|
1107
1105
|
`,
|
|
1108
1106
|
{ fragmentName: "OperationsFragment" }
|
|
1109
|
-
),
|
|
1107
|
+
), mr = new H(`
|
|
1110
1108
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1111
1109
|
schema(input: $input, type: $type) {
|
|
1112
1110
|
url
|
|
@@ -1115,13 +1113,13 @@ const dr = new G(
|
|
|
1115
1113
|
}
|
|
1116
1114
|
}
|
|
1117
1115
|
}
|
|
1118
|
-
`),
|
|
1116
|
+
`), pr = new H(`
|
|
1119
1117
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1120
1118
|
schema(input: $input, type: $type) {
|
|
1121
1119
|
openapi
|
|
1122
1120
|
}
|
|
1123
1121
|
}
|
|
1124
|
-
`),
|
|
1122
|
+
`), hr = new H(`
|
|
1125
1123
|
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1126
1124
|
schema(input: $input, type: $type) {
|
|
1127
1125
|
servers {
|
|
@@ -1220,7 +1218,7 @@ const dr = new G(
|
|
|
1220
1218
|
schema
|
|
1221
1219
|
}
|
|
1222
1220
|
}
|
|
1223
|
-
}`),
|
|
1221
|
+
}`), fr = new H(`
|
|
1224
1222
|
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1225
1223
|
schema(input: $input, type: $type) {
|
|
1226
1224
|
title
|
|
@@ -1235,7 +1233,7 @@ const dr = new G(
|
|
|
1235
1233
|
}
|
|
1236
1234
|
}
|
|
1237
1235
|
}
|
|
1238
|
-
`),
|
|
1236
|
+
`), xr = new H(`
|
|
1239
1237
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1240
1238
|
schema(input: $input, type: $type) {
|
|
1241
1239
|
url
|
|
@@ -1244,7 +1242,7 @@ const dr = new G(
|
|
|
1244
1242
|
}
|
|
1245
1243
|
}
|
|
1246
1244
|
}
|
|
1247
|
-
`), gr = new
|
|
1245
|
+
`), gr = new H(`
|
|
1248
1246
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1249
1247
|
schema(input: $input, type: $type) {
|
|
1250
1248
|
extensions
|
|
@@ -1267,20 +1265,20 @@ const dr = new G(
|
|
|
1267
1265
|
}
|
|
1268
1266
|
}
|
|
1269
1267
|
}
|
|
1270
|
-
`),
|
|
1271
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1272
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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":
|
|
1273
|
-
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n":
|
|
1274
|
-
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n":
|
|
1275
|
-
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n":
|
|
1276
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1268
|
+
`), yr = {
|
|
1269
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": mr,
|
|
1270
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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": ur,
|
|
1271
|
+
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": pr,
|
|
1272
|
+
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n": hr,
|
|
1273
|
+
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": fr,
|
|
1274
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": xr,
|
|
1277
1275
|
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": gr
|
|
1278
1276
|
};
|
|
1279
|
-
function
|
|
1280
|
-
return
|
|
1277
|
+
function vr(e) {
|
|
1278
|
+
return yr[e] ?? {};
|
|
1281
1279
|
}
|
|
1282
|
-
const
|
|
1283
|
-
function
|
|
1280
|
+
const I = Ve.Root, K = Ve.CollapsibleTrigger, D = Ve.CollapsibleContent;
|
|
1281
|
+
function br() {
|
|
1284
1282
|
const t = navigator.userAgent.toLowerCase();
|
|
1285
1283
|
if (t.indexOf("win") !== -1)
|
|
1286
1284
|
return "windows";
|
|
@@ -1291,10 +1289,10 @@ function vr() {
|
|
|
1291
1289
|
if (t.indexOf("x11") !== -1)
|
|
1292
1290
|
return "unix";
|
|
1293
1291
|
}
|
|
1294
|
-
function
|
|
1295
|
-
return
|
|
1292
|
+
function jr() {
|
|
1293
|
+
return br() === "apple";
|
|
1296
1294
|
}
|
|
1297
|
-
const
|
|
1295
|
+
const Cr = {
|
|
1298
1296
|
other: {
|
|
1299
1297
|
alt: "Alt",
|
|
1300
1298
|
meta: "Ctrl",
|
|
@@ -1309,11 +1307,11 @@ const jr = {
|
|
|
1309
1307
|
shift: "⇧",
|
|
1310
1308
|
option: "⌥"
|
|
1311
1309
|
}
|
|
1312
|
-
},
|
|
1310
|
+
}, Nr = (e, t) => {
|
|
1313
1311
|
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c = O(t);
|
|
1314
|
-
return
|
|
1312
|
+
return F(() => {
|
|
1315
1313
|
c.current = t;
|
|
1316
|
-
}, [t]),
|
|
1314
|
+
}, [t]), F(() => {
|
|
1317
1315
|
const u = (d) => {
|
|
1318
1316
|
(d.code === `Key${l?.toUpperCase()}` || d.code.toLowerCase() === l?.toLowerCase()) && d.metaKey === a && d.shiftKey === r && d.altKey === o && d.ctrlKey === i && (d.preventDefault(), c.current());
|
|
1319
1317
|
};
|
|
@@ -1323,24 +1321,24 @@ const jr = {
|
|
|
1323
1321
|
}, [l, a, r, o, i]), {
|
|
1324
1322
|
trigger: () => c.current(),
|
|
1325
1323
|
label: s.map(
|
|
1326
|
-
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? jr
|
|
1324
|
+
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? Cr[jr() ? "apple" : "other"][u] : u
|
|
1327
1325
|
)
|
|
1328
1326
|
};
|
|
1329
|
-
},
|
|
1330
|
-
|
|
1327
|
+
}, wr = ke()(
|
|
1328
|
+
Ie(
|
|
1331
1329
|
(e) => ({
|
|
1332
1330
|
selectedServer: void 0,
|
|
1333
1331
|
setSelectedServer: (t) => e({ selectedServer: t })
|
|
1334
1332
|
}),
|
|
1335
1333
|
{ name: "zudoku-selected-server" }
|
|
1336
1334
|
)
|
|
1337
|
-
),
|
|
1338
|
-
const { selectedServer: t, setSelectedServer: s } =
|
|
1339
|
-
return { selectedServer:
|
|
1335
|
+
), Sr = (e) => {
|
|
1336
|
+
const { selectedServer: t, setSelectedServer: s } = wr();
|
|
1337
|
+
return { selectedServer: jt(
|
|
1340
1338
|
() => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
|
|
1341
1339
|
[t, e]
|
|
1342
1340
|
), setSelectedServer: s };
|
|
1343
|
-
},
|
|
1341
|
+
}, _t = _.forwardRef(
|
|
1344
1342
|
({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1345
1343
|
"textarea",
|
|
1346
1344
|
{
|
|
@@ -1353,30 +1351,30 @@ const jr = {
|
|
|
1353
1351
|
}
|
|
1354
1352
|
)
|
|
1355
1353
|
);
|
|
1356
|
-
|
|
1357
|
-
const
|
|
1354
|
+
_t.displayName = "Textarea";
|
|
1355
|
+
const G = ({
|
|
1358
1356
|
children: e,
|
|
1359
1357
|
className: t
|
|
1360
1358
|
}) => /* @__PURE__ */ n.jsxs(
|
|
1361
1359
|
"div",
|
|
1362
1360
|
{
|
|
1363
1361
|
className: C(
|
|
1364
|
-
"grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-
|
|
1362
|
+
"grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-2 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
1365
1363
|
t
|
|
1366
1364
|
),
|
|
1367
1365
|
children: [
|
|
1368
1366
|
e,
|
|
1369
1367
|
/* @__PURE__ */ n.jsx(
|
|
1370
|
-
|
|
1368
|
+
K,
|
|
1371
1369
|
{
|
|
1372
1370
|
className: C(
|
|
1373
1371
|
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
|
|
1374
1372
|
t
|
|
1375
1373
|
),
|
|
1376
1374
|
children: /* @__PURE__ */ n.jsx(
|
|
1377
|
-
|
|
1375
|
+
xn,
|
|
1378
1376
|
{
|
|
1379
|
-
className: "group-data-[state=open]:rotate-180 transition-transform
|
|
1377
|
+
className: "group-data-[state=open]:rotate-180 transition-transform shrink-0",
|
|
1380
1378
|
size: 16
|
|
1381
1379
|
}
|
|
1382
1380
|
)
|
|
@@ -1384,30 +1382,30 @@ const U = ({
|
|
|
1384
1382
|
)
|
|
1385
1383
|
]
|
|
1386
1384
|
}
|
|
1387
|
-
),
|
|
1385
|
+
), V = ({
|
|
1388
1386
|
children: e,
|
|
1389
1387
|
className: t
|
|
1390
|
-
}) => /* @__PURE__ */ n.jsx("span", { className: C("font-semibold w-full text-start", t), children: e }),
|
|
1388
|
+
}) => /* @__PURE__ */ n.jsx("span", { className: C("font-semibold w-full text-start", t), children: e }), Tr = ({
|
|
1391
1389
|
examples: e,
|
|
1392
1390
|
onSelect: t
|
|
1393
|
-
}) => /* @__PURE__ */ n.jsxs(
|
|
1394
|
-
/* @__PURE__ */ n.jsx(
|
|
1395
|
-
|
|
1391
|
+
}) => /* @__PURE__ */ n.jsxs(ps, { children: [
|
|
1392
|
+
/* @__PURE__ */ n.jsx(hs, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1393
|
+
R,
|
|
1396
1394
|
{
|
|
1397
1395
|
variant: "ghost",
|
|
1398
1396
|
size: "sm",
|
|
1399
1397
|
className: "hover:bg-accent hover:brightness-95",
|
|
1400
1398
|
children: [
|
|
1401
1399
|
"Use Example ",
|
|
1402
|
-
/* @__PURE__ */ n.jsx(
|
|
1400
|
+
/* @__PURE__ */ n.jsx(ne, { size: 16, className: "ml-2" })
|
|
1403
1401
|
]
|
|
1404
1402
|
}
|
|
1405
1403
|
) }),
|
|
1406
|
-
/* @__PURE__ */ n.jsx(
|
|
1407
|
-
/* @__PURE__ */ n.jsx(
|
|
1408
|
-
/* @__PURE__ */ n.jsx(
|
|
1409
|
-
/* @__PURE__ */ n.jsx(
|
|
1410
|
-
|
|
1404
|
+
/* @__PURE__ */ n.jsx(fs, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
1405
|
+
/* @__PURE__ */ n.jsx(xs, { children: s.mediaType }),
|
|
1406
|
+
/* @__PURE__ */ n.jsx(gs, {}),
|
|
1407
|
+
/* @__PURE__ */ n.jsx(ys, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
|
|
1408
|
+
vs,
|
|
1411
1409
|
{
|
|
1412
1410
|
onSelect: () => t(a, s.mediaType),
|
|
1413
1411
|
children: /* @__PURE__ */ n.jsx(
|
|
@@ -1422,14 +1420,14 @@ const U = ({
|
|
|
1422
1420
|
a.name
|
|
1423
1421
|
)) })
|
|
1424
1422
|
] }, s.mediaType)) })
|
|
1425
|
-
] }),
|
|
1426
|
-
const { register: t, setValue: s, watch: a } =
|
|
1427
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1428
|
-
/* @__PURE__ */ n.jsxs(
|
|
1429
|
-
/* @__PURE__ */ n.jsx(
|
|
1430
|
-
/* @__PURE__ */ n.jsx(
|
|
1423
|
+
] }), Ar = ({ content: e }) => {
|
|
1424
|
+
const { register: t, setValue: s, watch: a } = ae(), r = (e ?? []).flatMap((i) => i.examples), o = a("headers");
|
|
1425
|
+
return /* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
1426
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
1427
|
+
/* @__PURE__ */ n.jsx(gn, { size: 16 }),
|
|
1428
|
+
/* @__PURE__ */ n.jsx(V, { children: "Body" }),
|
|
1431
1429
|
e && r.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1432
|
-
|
|
1430
|
+
Tr,
|
|
1433
1431
|
{
|
|
1434
1432
|
examples: e,
|
|
1435
1433
|
onSelect: (i, l) => {
|
|
@@ -1445,8 +1443,8 @@ const U = ({
|
|
|
1445
1443
|
}
|
|
1446
1444
|
) : /* @__PURE__ */ n.jsx("div", {})
|
|
1447
1445
|
] }),
|
|
1448
|
-
/* @__PURE__ */ n.jsx(
|
|
1449
|
-
|
|
1446
|
+
/* @__PURE__ */ n.jsx(D, { className: "flex flex-col gap-2 ", children: /* @__PURE__ */ n.jsx(
|
|
1447
|
+
_t,
|
|
1450
1448
|
{
|
|
1451
1449
|
...t("body"),
|
|
1452
1450
|
className: C(
|
|
@@ -1456,7 +1454,7 @@ const U = ({
|
|
|
1456
1454
|
}
|
|
1457
1455
|
) })
|
|
1458
1456
|
] });
|
|
1459
|
-
},
|
|
1457
|
+
}, ht = (e, t, s) => {
|
|
1460
1458
|
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1461
1459
|
const i = o.replace(/[:{}]/g, "");
|
|
1462
1460
|
return s.pathParams.find((c) => c.name === i)?.value ?? o;
|
|
@@ -1468,12 +1466,12 @@ const U = ({
|
|
|
1468
1466
|
r.searchParams.set(o.name, o.value);
|
|
1469
1467
|
}), r;
|
|
1470
1468
|
};
|
|
1471
|
-
function
|
|
1469
|
+
function Or(e) {
|
|
1472
1470
|
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1473
1471
|
e
|
|
1474
1472
|
);
|
|
1475
1473
|
}
|
|
1476
|
-
const
|
|
1474
|
+
const Pr = (e, t) => {
|
|
1477
1475
|
const s = e.find(
|
|
1478
1476
|
([a]) => a.toLowerCase() === "content-disposition"
|
|
1479
1477
|
)?.[1];
|
|
@@ -1490,8 +1488,8 @@ const Or = (e, t) => {
|
|
|
1490
1488
|
} catch {
|
|
1491
1489
|
return "download";
|
|
1492
1490
|
}
|
|
1493
|
-
},
|
|
1494
|
-
|
|
1491
|
+
}, oe = _.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1492
|
+
$e.Root,
|
|
1495
1493
|
{
|
|
1496
1494
|
ref: s,
|
|
1497
1495
|
className: C(
|
|
@@ -1501,17 +1499,17 @@ const Or = (e, t) => {
|
|
|
1501
1499
|
),
|
|
1502
1500
|
...t,
|
|
1503
1501
|
children: /* @__PURE__ */ n.jsx(
|
|
1504
|
-
|
|
1502
|
+
$e.Indicator,
|
|
1505
1503
|
{
|
|
1506
1504
|
className: C("flex items-center justify-center text-current"),
|
|
1507
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1505
|
+
children: /* @__PURE__ */ n.jsx(yn, { className: "h-4 w-4" })
|
|
1508
1506
|
}
|
|
1509
1507
|
)
|
|
1510
1508
|
}
|
|
1511
1509
|
));
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1510
|
+
oe.displayName = $e.Root.displayName;
|
|
1511
|
+
const Lr = fe.Root, Bt = _.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(fe.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1512
|
+
fe.Content,
|
|
1515
1513
|
{
|
|
1516
1514
|
ref: r,
|
|
1517
1515
|
align: t,
|
|
@@ -1523,8 +1521,8 @@ const Pr = le.Root, Vt = q.forwardRef(({ className: e, align: t = "center", side
|
|
|
1523
1521
|
...a
|
|
1524
1522
|
}
|
|
1525
1523
|
) }));
|
|
1526
|
-
|
|
1527
|
-
const
|
|
1524
|
+
Bt.displayName = fe.Content.displayName;
|
|
1525
|
+
const $r = ({
|
|
1528
1526
|
value: e,
|
|
1529
1527
|
options: t,
|
|
1530
1528
|
onChange: s,
|
|
@@ -1533,14 +1531,14 @@ const Lr = ({
|
|
|
1533
1531
|
onEnterPress: o,
|
|
1534
1532
|
ref: i
|
|
1535
1533
|
}) => {
|
|
1536
|
-
const [l, c] =
|
|
1537
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1538
|
-
/* @__PURE__ */ n.jsx(
|
|
1539
|
-
|
|
1534
|
+
const [l, c] = A(!1), [u, d] = A(!1), h = js((m) => m.filtered.count), x = O(null);
|
|
1535
|
+
return /* @__PURE__ */ n.jsxs(Lr, { open: l, children: [
|
|
1536
|
+
/* @__PURE__ */ n.jsx(bs, { children: /* @__PURE__ */ n.jsx(
|
|
1537
|
+
Ns,
|
|
1540
1538
|
{
|
|
1541
1539
|
autoComplete: "off",
|
|
1542
1540
|
ref: (m) => {
|
|
1543
|
-
|
|
1541
|
+
x.current = m, typeof i == "function" ? i(m) : i && (i.current = m);
|
|
1544
1542
|
},
|
|
1545
1543
|
value: e,
|
|
1546
1544
|
placeholder: r,
|
|
@@ -1550,13 +1548,13 @@ const Lr = ({
|
|
|
1550
1548
|
u || c(!1);
|
|
1551
1549
|
},
|
|
1552
1550
|
onKeyDown: (m) => {
|
|
1553
|
-
m.key === "Enter" && (c(!1),
|
|
1551
|
+
m.key === "Enter" && (c(!1), x.current?.blur(), o?.(m));
|
|
1554
1552
|
},
|
|
1555
1553
|
onValueChange: (m) => s(m)
|
|
1556
1554
|
}
|
|
1557
1555
|
) }),
|
|
1558
1556
|
/* @__PURE__ */ n.jsx(
|
|
1559
|
-
|
|
1557
|
+
Bt,
|
|
1560
1558
|
{
|
|
1561
1559
|
onMouseEnter: () => d(!0),
|
|
1562
1560
|
onMouseLeave: () => d(!1),
|
|
@@ -1572,8 +1570,8 @@ const Lr = ({
|
|
|
1572
1570
|
onTouchMove: (m) => {
|
|
1573
1571
|
m.stopPropagation();
|
|
1574
1572
|
},
|
|
1575
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1576
|
-
|
|
1573
|
+
children: /* @__PURE__ */ n.jsx(ws, { className: "max-h-[140px]", children: t.map((m) => /* @__PURE__ */ n.jsx(
|
|
1574
|
+
Ss,
|
|
1577
1575
|
{
|
|
1578
1576
|
value: m,
|
|
1579
1577
|
onSelect: (v) => {
|
|
@@ -1587,23 +1585,23 @@ const Lr = ({
|
|
|
1587
1585
|
}
|
|
1588
1586
|
)
|
|
1589
1587
|
] });
|
|
1590
|
-
},
|
|
1591
|
-
const s =
|
|
1592
|
-
const l = r ?
|
|
1593
|
-
return
|
|
1588
|
+
}, ge = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(Cs, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx($r, { ...t }) }), ie = (e, t) => {
|
|
1589
|
+
const s = _.forwardRef(({ className: a, asChild: r, ...o }, i) => {
|
|
1590
|
+
const l = r ? Ts : e;
|
|
1591
|
+
return _.createElement(l, {
|
|
1594
1592
|
...o,
|
|
1595
1593
|
ref: i,
|
|
1596
1594
|
className: typeof t == "function" ? t({ className: a }) : C(t, a)
|
|
1597
1595
|
});
|
|
1598
1596
|
});
|
|
1599
1597
|
return s.displayName = `VariantComponent(${e})`, s;
|
|
1600
|
-
},
|
|
1598
|
+
}, Be = ie(
|
|
1601
1599
|
"div",
|
|
1602
1600
|
"grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5"
|
|
1603
|
-
),
|
|
1601
|
+
), ye = ie(
|
|
1604
1602
|
"div",
|
|
1605
1603
|
"group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
|
|
1606
|
-
),
|
|
1604
|
+
), Rr = Object.freeze([
|
|
1607
1605
|
"Accept",
|
|
1608
1606
|
"Accept-Encoding",
|
|
1609
1607
|
"Accept-Language",
|
|
@@ -1635,22 +1633,22 @@ const Lr = ({
|
|
|
1635
1633
|
schemaHeaders: t,
|
|
1636
1634
|
lockedHeaders: s
|
|
1637
1635
|
}) => {
|
|
1638
|
-
const { fields: a, append: r, remove: o } =
|
|
1636
|
+
const { fields: a, append: r, remove: o } = qe({
|
|
1639
1637
|
control: e,
|
|
1640
1638
|
name: "headers"
|
|
1641
|
-
}), { setValue: i, watch: l, formState: c } =
|
|
1639
|
+
}), { setValue: i, watch: l, formState: c } = ae(), u = O([]), d = O([]), h = l("headers"), x = Ct(
|
|
1642
1640
|
(f) => {
|
|
1643
1641
|
f?.stopPropagation(), r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
1644
1642
|
},
|
|
1645
1643
|
[r]
|
|
1646
1644
|
);
|
|
1647
|
-
|
|
1648
|
-
h.length === 0 &&
|
|
1649
|
-
}, [h,
|
|
1645
|
+
F(() => {
|
|
1646
|
+
h.length === 0 && x();
|
|
1647
|
+
}, [h, x]);
|
|
1650
1648
|
const m = (f) => {
|
|
1651
1649
|
u.current[f]?.focus();
|
|
1652
1650
|
}, v = (f) => {
|
|
1653
|
-
|
|
1651
|
+
x(), requestAnimationFrame(() => d.current[f + 1]?.focus());
|
|
1654
1652
|
}, y = t.filter((f) => !h.some((j) => j.name === f.name)).map(({ name: f }) => f), b = a.flatMap((f, j) => !s?.map((w) => w.toLowerCase()).includes(f.name.toLowerCase()) ? [] : [j]), T = s?.map((f) => ({
|
|
1655
1653
|
name: f,
|
|
1656
1654
|
id: `locked-${f}`,
|
|
@@ -1658,35 +1656,35 @@ const Lr = ({
|
|
|
1658
1656
|
active: !0,
|
|
1659
1657
|
locked: !0
|
|
1660
1658
|
})) ?? [];
|
|
1661
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1662
|
-
/* @__PURE__ */ n.jsxs(
|
|
1663
|
-
/* @__PURE__ */ n.jsx(
|
|
1664
|
-
/* @__PURE__ */ n.jsx(
|
|
1659
|
+
return /* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
1660
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
1661
|
+
/* @__PURE__ */ n.jsx(vn, { size: 16 }),
|
|
1662
|
+
/* @__PURE__ */ n.jsx(V, { children: "Headers" }),
|
|
1665
1663
|
/* @__PURE__ */ n.jsxs(
|
|
1666
|
-
|
|
1664
|
+
he,
|
|
1667
1665
|
{
|
|
1668
|
-
onClick:
|
|
1666
|
+
onClick: x,
|
|
1669
1667
|
type: "button",
|
|
1670
1668
|
size: "sm",
|
|
1671
1669
|
variant: "ghost",
|
|
1672
1670
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
1673
1671
|
children: [
|
|
1674
1672
|
"Add header ",
|
|
1675
|
-
/* @__PURE__ */ n.jsx(
|
|
1673
|
+
/* @__PURE__ */ n.jsx(ne, { size: 16 })
|
|
1676
1674
|
]
|
|
1677
1675
|
}
|
|
1678
1676
|
)
|
|
1679
1677
|
] }),
|
|
1680
|
-
/* @__PURE__ */ n.jsx(
|
|
1681
|
-
T.map((f) => /* @__PURE__ */ n.jsxs(
|
|
1682
|
-
/* @__PURE__ */ n.jsx(
|
|
1683
|
-
|
|
1678
|
+
/* @__PURE__ */ n.jsx(D, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(Be, { children: [
|
|
1679
|
+
T.map((f) => /* @__PURE__ */ n.jsxs(it, { children: [
|
|
1680
|
+
/* @__PURE__ */ n.jsx(ct, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1681
|
+
ye,
|
|
1684
1682
|
{
|
|
1685
1683
|
className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
|
|
1686
1684
|
children: [
|
|
1687
|
-
/* @__PURE__ */ n.jsx(
|
|
1685
|
+
/* @__PURE__ */ n.jsx(bn, { size: 16 }),
|
|
1688
1686
|
/* @__PURE__ */ n.jsx(
|
|
1689
|
-
|
|
1687
|
+
xe,
|
|
1690
1688
|
{
|
|
1691
1689
|
value: f.name,
|
|
1692
1690
|
disabled: !0,
|
|
@@ -1699,7 +1697,7 @@ const Lr = ({
|
|
|
1699
1697
|
f.id
|
|
1700
1698
|
) }),
|
|
1701
1699
|
/* @__PURE__ */ n.jsx(
|
|
1702
|
-
|
|
1700
|
+
lt,
|
|
1703
1701
|
{
|
|
1704
1702
|
alignOffset: 10,
|
|
1705
1703
|
side: "bottom",
|
|
@@ -1713,7 +1711,7 @@ const Lr = ({
|
|
|
1713
1711
|
(w) => w.name === h.at(j)?.name
|
|
1714
1712
|
);
|
|
1715
1713
|
return /* @__PURE__ */ n.jsxs(
|
|
1716
|
-
|
|
1714
|
+
ye,
|
|
1717
1715
|
{
|
|
1718
1716
|
className: C(
|
|
1719
1717
|
b.includes(j) && "text-amber-600",
|
|
@@ -1721,27 +1719,27 @@ const Lr = ({
|
|
|
1721
1719
|
),
|
|
1722
1720
|
children: [
|
|
1723
1721
|
/* @__PURE__ */ n.jsx(
|
|
1724
|
-
|
|
1722
|
+
q,
|
|
1725
1723
|
{
|
|
1726
1724
|
control: e,
|
|
1727
1725
|
name: `headers.${j}.active`,
|
|
1728
1726
|
render: ({ field: w }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1729
1727
|
/* @__PURE__ */ n.jsx(
|
|
1730
|
-
|
|
1728
|
+
oe,
|
|
1731
1729
|
{
|
|
1732
1730
|
id: `headers.${j}.active`,
|
|
1733
1731
|
className: C(
|
|
1734
1732
|
b.includes(j) && "hidden"
|
|
1735
1733
|
),
|
|
1736
1734
|
checked: w.value,
|
|
1737
|
-
onCheckedChange: (
|
|
1738
|
-
w.onChange(
|
|
1735
|
+
onCheckedChange: (z) => {
|
|
1736
|
+
w.onChange(z);
|
|
1739
1737
|
}
|
|
1740
1738
|
}
|
|
1741
1739
|
),
|
|
1742
|
-
/* @__PURE__ */ n.jsxs(
|
|
1743
|
-
/* @__PURE__ */ n.jsx(
|
|
1744
|
-
|
|
1740
|
+
/* @__PURE__ */ n.jsxs(it, { children: [
|
|
1741
|
+
/* @__PURE__ */ n.jsx(ct, { asChild: !0, children: /* @__PURE__ */ n.jsx(
|
|
1742
|
+
jn,
|
|
1745
1743
|
{
|
|
1746
1744
|
className: C(
|
|
1747
1745
|
"text-amber-600",
|
|
@@ -1751,7 +1749,7 @@ const Lr = ({
|
|
|
1751
1749
|
}
|
|
1752
1750
|
) }),
|
|
1753
1751
|
/* @__PURE__ */ n.jsx(
|
|
1754
|
-
|
|
1752
|
+
lt,
|
|
1755
1753
|
{
|
|
1756
1754
|
alignOffset: 10,
|
|
1757
1755
|
side: "bottom",
|
|
@@ -1764,23 +1762,23 @@ const Lr = ({
|
|
|
1764
1762
|
}
|
|
1765
1763
|
),
|
|
1766
1764
|
/* @__PURE__ */ n.jsx(
|
|
1767
|
-
|
|
1765
|
+
q,
|
|
1768
1766
|
{
|
|
1769
1767
|
control: e,
|
|
1770
1768
|
name: `headers.${j}.name`,
|
|
1771
1769
|
render: ({ field: w }) => /* @__PURE__ */ n.jsx(
|
|
1772
|
-
|
|
1770
|
+
ge,
|
|
1773
1771
|
{
|
|
1774
1772
|
...w,
|
|
1775
1773
|
placeholder: "Name",
|
|
1776
1774
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
|
|
1777
|
-
options: [...y,
|
|
1775
|
+
options: [...y, ...Rr],
|
|
1778
1776
|
onEnterPress: () => m(j),
|
|
1779
|
-
onChange: (
|
|
1780
|
-
w.onChange(
|
|
1777
|
+
onChange: (z) => {
|
|
1778
|
+
w.onChange(z), i(`headers.${j}.active`, !0);
|
|
1781
1779
|
},
|
|
1782
|
-
ref: (
|
|
1783
|
-
d.current[j] =
|
|
1780
|
+
ref: (z) => {
|
|
1781
|
+
d.current[j] = z;
|
|
1784
1782
|
}
|
|
1785
1783
|
}
|
|
1786
1784
|
)
|
|
@@ -1788,47 +1786,47 @@ const Lr = ({
|
|
|
1788
1786
|
),
|
|
1789
1787
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1790
1788
|
/* @__PURE__ */ n.jsx(
|
|
1791
|
-
|
|
1789
|
+
q,
|
|
1792
1790
|
{
|
|
1793
1791
|
control: e,
|
|
1794
1792
|
name: `headers.${j}.value`,
|
|
1795
1793
|
render: ({ field: w }) => L?.enum && L.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1796
|
-
|
|
1794
|
+
ge,
|
|
1797
1795
|
{
|
|
1798
1796
|
shouldFilter: !1,
|
|
1799
1797
|
value: w.value,
|
|
1800
1798
|
options: L.enum ?? [],
|
|
1801
|
-
onChange: (
|
|
1802
|
-
w.onChange(
|
|
1799
|
+
onChange: (E) => {
|
|
1800
|
+
w.onChange(E), i(`headers.${j}.active`, !0);
|
|
1803
1801
|
},
|
|
1804
1802
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
1805
1803
|
}
|
|
1806
1804
|
) : /* @__PURE__ */ n.jsx(
|
|
1807
|
-
|
|
1805
|
+
xe,
|
|
1808
1806
|
{
|
|
1809
1807
|
placeholder: "Value",
|
|
1810
1808
|
className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono",
|
|
1811
1809
|
autoComplete: "off",
|
|
1812
1810
|
...w,
|
|
1813
|
-
ref: (
|
|
1814
|
-
u.current[j] =
|
|
1811
|
+
ref: (E) => {
|
|
1812
|
+
u.current[j] = E;
|
|
1815
1813
|
},
|
|
1816
|
-
onKeyDown: (
|
|
1817
|
-
|
|
1814
|
+
onKeyDown: (E) => {
|
|
1815
|
+
E.key === "Enter" && E.currentTarget.value.trim() && v(j);
|
|
1818
1816
|
}
|
|
1819
1817
|
}
|
|
1820
1818
|
)
|
|
1821
1819
|
}
|
|
1822
1820
|
),
|
|
1823
1821
|
/* @__PURE__ */ n.jsx(
|
|
1824
|
-
|
|
1822
|
+
he,
|
|
1825
1823
|
{
|
|
1826
1824
|
size: "icon-xs",
|
|
1827
1825
|
variant: "ghost",
|
|
1828
1826
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
1829
1827
|
onClick: () => o(j),
|
|
1830
1828
|
type: "button",
|
|
1831
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1829
|
+
children: /* @__PURE__ */ n.jsx(yt, { size: 16 })
|
|
1832
1830
|
}
|
|
1833
1831
|
)
|
|
1834
1832
|
] })
|
|
@@ -1839,28 +1837,28 @@ const Lr = ({
|
|
|
1839
1837
|
})
|
|
1840
1838
|
] }) }) }) })
|
|
1841
1839
|
] });
|
|
1842
|
-
},
|
|
1840
|
+
}, kr = Os(
|
|
1843
1841
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1844
|
-
),
|
|
1845
|
-
|
|
1842
|
+
), je = _.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1843
|
+
Pt.Root,
|
|
1846
1844
|
{
|
|
1847
1845
|
ref: s,
|
|
1848
|
-
className: C(
|
|
1846
|
+
className: C(kr(), e),
|
|
1849
1847
|
...t
|
|
1850
1848
|
}
|
|
1851
1849
|
));
|
|
1852
|
-
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1850
|
+
je.displayName = Pt.Root.displayName;
|
|
1851
|
+
const Ut = _.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1852
|
+
se.Root,
|
|
1855
1853
|
{
|
|
1856
1854
|
className: C("grid gap-2", e),
|
|
1857
1855
|
...t,
|
|
1858
1856
|
ref: s
|
|
1859
1857
|
}
|
|
1860
1858
|
));
|
|
1861
|
-
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1859
|
+
Ut.displayName = se.Root.displayName;
|
|
1860
|
+
const Mt = _.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1861
|
+
se.Item,
|
|
1864
1862
|
{
|
|
1865
1863
|
ref: s,
|
|
1866
1864
|
className: C(
|
|
@@ -1868,29 +1866,29 @@ const _t = q.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
|
1868
1866
|
e
|
|
1869
1867
|
),
|
|
1870
1868
|
...t,
|
|
1871
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1869
|
+
children: /* @__PURE__ */ n.jsx(se.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(Cn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1872
1870
|
}
|
|
1873
1871
|
));
|
|
1874
|
-
|
|
1875
|
-
const
|
|
1872
|
+
Mt.displayName = se.Item.displayName;
|
|
1873
|
+
const Gt = ({
|
|
1876
1874
|
identities: e,
|
|
1877
1875
|
setValue: t,
|
|
1878
1876
|
value: s
|
|
1879
1877
|
}) => /* @__PURE__ */ n.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
1880
|
-
|
|
1878
|
+
Ut,
|
|
1881
1879
|
{
|
|
1882
1880
|
onValueChange: (a) => t(a),
|
|
1883
1881
|
value: s,
|
|
1884
|
-
defaultValue:
|
|
1882
|
+
defaultValue: te,
|
|
1885
1883
|
className: "gap-0",
|
|
1886
1884
|
disabled: e?.length === 0,
|
|
1887
|
-
children: [{ id:
|
|
1885
|
+
children: [{ id: te, label: "None" }, ...e ?? []].map(
|
|
1888
1886
|
(a) => /* @__PURE__ */ n.jsxs(
|
|
1889
|
-
|
|
1887
|
+
je,
|
|
1890
1888
|
{
|
|
1891
1889
|
className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
|
|
1892
1890
|
children: [
|
|
1893
|
-
/* @__PURE__ */ n.jsx(
|
|
1891
|
+
/* @__PURE__ */ n.jsx(Mt, { value: a.id, id: a.id }),
|
|
1894
1892
|
/* @__PURE__ */ n.jsx("span", { children: a.label })
|
|
1895
1893
|
]
|
|
1896
1894
|
},
|
|
@@ -1898,28 +1896,28 @@ const Ut = ({
|
|
|
1898
1896
|
)
|
|
1899
1897
|
)
|
|
1900
1898
|
}
|
|
1901
|
-
) }),
|
|
1899
|
+
) }), Ir = ({
|
|
1902
1900
|
onSubmit: e,
|
|
1903
1901
|
identities: t,
|
|
1904
1902
|
open: s,
|
|
1905
1903
|
onOpenChange: a
|
|
1906
1904
|
}) => {
|
|
1907
|
-
const [r, o] =
|
|
1908
|
-
return /* @__PURE__ */ n.jsx(
|
|
1909
|
-
/* @__PURE__ */ n.jsx(
|
|
1910
|
-
/* @__PURE__ */ n.jsx(
|
|
1911
|
-
/* @__PURE__ */ n.jsx(
|
|
1912
|
-
|
|
1905
|
+
const [r, o] = A(void 0), [i, l] = A(!1);
|
|
1906
|
+
return /* @__PURE__ */ n.jsx(De, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(ze, { children: [
|
|
1907
|
+
/* @__PURE__ */ n.jsx(Fe, { children: "Select an auth identity" }),
|
|
1908
|
+
/* @__PURE__ */ n.jsx(Nt, { children: "Please select an identity for this request." }),
|
|
1909
|
+
/* @__PURE__ */ n.jsx(As, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
|
|
1910
|
+
Gt,
|
|
1913
1911
|
{
|
|
1914
1912
|
identities: t,
|
|
1915
1913
|
setValue: o,
|
|
1916
1914
|
value: r
|
|
1917
1915
|
}
|
|
1918
1916
|
) }),
|
|
1919
|
-
/* @__PURE__ */ n.jsxs(
|
|
1917
|
+
/* @__PURE__ */ n.jsxs(wt, { className: "flex flex-col gap-2", children: [
|
|
1920
1918
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1921
1919
|
/* @__PURE__ */ n.jsx(
|
|
1922
|
-
|
|
1920
|
+
oe,
|
|
1923
1921
|
{
|
|
1924
1922
|
id: "remember",
|
|
1925
1923
|
checked: i,
|
|
@@ -1928,10 +1926,10 @@ const Ut = ({
|
|
|
1928
1926
|
)
|
|
1929
1927
|
}
|
|
1930
1928
|
),
|
|
1931
|
-
/* @__PURE__ */ n.jsx(
|
|
1929
|
+
/* @__PURE__ */ n.jsx(je, { htmlFor: "remember", children: "Remember my choice" })
|
|
1932
1930
|
] }),
|
|
1933
1931
|
/* @__PURE__ */ n.jsx(
|
|
1934
|
-
|
|
1932
|
+
R,
|
|
1935
1933
|
{
|
|
1936
1934
|
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
1937
1935
|
children: "Send"
|
|
@@ -1939,24 +1937,24 @@ const Ut = ({
|
|
|
1939
1937
|
)
|
|
1940
1938
|
] })
|
|
1941
1939
|
] }) });
|
|
1942
|
-
},
|
|
1940
|
+
}, Oe = (e) => Math.abs(
|
|
1943
1941
|
Number.isNaN(Number(e)) ? e.toLowerCase().charCodeAt(0) - 96 : Number.isNaN(Number(e)) ? 0 : Number(e)
|
|
1944
|
-
),
|
|
1945
|
-
const s = (3 *
|
|
1942
|
+
), Pe = (e) => e.length > 1 ? Number(e.split("").reduce((t, s) => `${Oe(t) + Oe(s)}`)) : Oe(e), ft = (e, t = {}) => {
|
|
1943
|
+
const s = (3 * Pe(e) + 2 * Pe(e) + Pe(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
|
|
1946
1944
|
return `${s}deg ${a}% ${r}%`;
|
|
1947
|
-
},
|
|
1948
|
-
const { resolvedTheme: t } =
|
|
1945
|
+
}, Le = "data-linked-param", Dr = (e) => {
|
|
1946
|
+
const { resolvedTheme: t } = Ps();
|
|
1949
1947
|
return {
|
|
1950
|
-
text:
|
|
1948
|
+
text: ft(
|
|
1951
1949
|
e,
|
|
1952
1950
|
t === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
1953
1951
|
),
|
|
1954
|
-
background:
|
|
1952
|
+
background: ft(
|
|
1955
1953
|
e,
|
|
1956
1954
|
t === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
1957
1955
|
)
|
|
1958
1956
|
};
|
|
1959
|
-
},
|
|
1957
|
+
}, Ht = ({
|
|
1960
1958
|
name: e,
|
|
1961
1959
|
className: t,
|
|
1962
1960
|
slug: s,
|
|
@@ -1964,15 +1962,15 @@ const Ut = ({
|
|
|
1964
1962
|
children: r,
|
|
1965
1963
|
onClick: o
|
|
1966
1964
|
}) => {
|
|
1967
|
-
const i = O(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } =
|
|
1968
|
-
return
|
|
1965
|
+
const i = O(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } = Dr(c), h = `hsl(${u} / 100%)`, x = `hsl(${d} / 10%)`, m = `hsl(${d} / 50%)`;
|
|
1966
|
+
return F(() => {
|
|
1969
1967
|
if (!l || !i.current) return;
|
|
1970
1968
|
const v = () => {
|
|
1971
|
-
document.querySelectorAll(`[${
|
|
1969
|
+
document.querySelectorAll(`[${Le}="${l}"]`).forEach((T) => {
|
|
1972
1970
|
T instanceof HTMLElement && (T.dataset.active = "true");
|
|
1973
1971
|
});
|
|
1974
1972
|
}, y = () => {
|
|
1975
|
-
document.querySelectorAll(`[${
|
|
1973
|
+
document.querySelectorAll(`[${Le}="${l}"]`).forEach((T) => {
|
|
1976
1974
|
T instanceof HTMLElement && (T.dataset.active = "false");
|
|
1977
1975
|
});
|
|
1978
1976
|
}, b = i.current;
|
|
@@ -1984,7 +1982,7 @@ const Ut = ({
|
|
|
1984
1982
|
/* @__PURE__ */ n.jsx(
|
|
1985
1983
|
"span",
|
|
1986
1984
|
{
|
|
1987
|
-
[
|
|
1985
|
+
[Le]: l,
|
|
1988
1986
|
className: C(
|
|
1989
1987
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
1990
1988
|
"relative transition-all duration-100 rounded-lg",
|
|
@@ -1999,29 +1997,29 @@ const Ut = ({
|
|
|
1999
1997
|
style: {
|
|
2000
1998
|
"--param-color": h,
|
|
2001
1999
|
"--border-color": m,
|
|
2002
|
-
"--background-color":
|
|
2000
|
+
"--background-color": x
|
|
2003
2001
|
},
|
|
2004
2002
|
children: r ?? e
|
|
2005
2003
|
}
|
|
2006
2004
|
);
|
|
2007
|
-
},
|
|
2005
|
+
}, zr = ({
|
|
2008
2006
|
control: e,
|
|
2009
2007
|
url: t
|
|
2010
2008
|
}) => {
|
|
2011
|
-
const { fields: s } =
|
|
2009
|
+
const { fields: s } = qe({
|
|
2012
2010
|
control: e,
|
|
2013
2011
|
name: "pathParams"
|
|
2014
2012
|
}), a = [...s].sort(
|
|
2015
2013
|
(r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
|
|
2016
2014
|
);
|
|
2017
|
-
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
2015
|
+
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(Be, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(ye, { children: [
|
|
2018
2016
|
/* @__PURE__ */ n.jsx(
|
|
2019
|
-
|
|
2017
|
+
q,
|
|
2020
2018
|
{
|
|
2021
2019
|
control: e,
|
|
2022
2020
|
name: `pathParams.${o}.name`,
|
|
2023
2021
|
render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
|
|
2024
|
-
|
|
2022
|
+
Ht,
|
|
2025
2023
|
{
|
|
2026
2024
|
slug: r.name,
|
|
2027
2025
|
name: r.name,
|
|
@@ -2031,12 +2029,12 @@ const Ut = ({
|
|
|
2031
2029
|
}
|
|
2032
2030
|
),
|
|
2033
2031
|
/* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center col-span-2", children: /* @__PURE__ */ n.jsx(
|
|
2034
|
-
|
|
2032
|
+
q,
|
|
2035
2033
|
{
|
|
2036
2034
|
control: e,
|
|
2037
2035
|
name: `pathParams.${o}.value`,
|
|
2038
2036
|
render: ({ field: i }) => /* @__PURE__ */ n.jsx(
|
|
2039
|
-
|
|
2037
|
+
xe,
|
|
2040
2038
|
{
|
|
2041
2039
|
...i,
|
|
2042
2040
|
required: !0,
|
|
@@ -2047,29 +2045,29 @@ const Ut = ({
|
|
|
2047
2045
|
}
|
|
2048
2046
|
) })
|
|
2049
2047
|
] }, r.id)) }) });
|
|
2050
|
-
},
|
|
2048
|
+
}, Fr = ie(
|
|
2051
2049
|
"input",
|
|
2052
2050
|
"bg-transparent h-9 font-mono text-xs"
|
|
2053
|
-
),
|
|
2051
|
+
), qr = ({
|
|
2054
2052
|
control: e,
|
|
2055
2053
|
schemaQueryParams: t
|
|
2056
2054
|
}) => {
|
|
2057
|
-
const { fields: s, remove: a, append: r } =
|
|
2055
|
+
const { fields: s, remove: a, append: r } = qe({
|
|
2058
2056
|
control: e,
|
|
2059
2057
|
name: "queryParams"
|
|
2060
|
-
}), { setValue: o, getValues: i, watch: l } =
|
|
2061
|
-
|
|
2058
|
+
}), { setValue: o, getValues: i, watch: l } = ae(), c = l("queryParams");
|
|
2059
|
+
F(() => {
|
|
2062
2060
|
c.length === 0 && r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
2063
2061
|
}, [c, r]);
|
|
2064
2062
|
const u = t.map(
|
|
2065
2063
|
(d) => !!d.isRequired
|
|
2066
2064
|
);
|
|
2067
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2068
|
-
/* @__PURE__ */ n.jsxs(
|
|
2069
|
-
/* @__PURE__ */ n.jsx(
|
|
2070
|
-
/* @__PURE__ */ n.jsx(
|
|
2065
|
+
return /* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
2066
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
2067
|
+
/* @__PURE__ */ n.jsx(Nn, { size: 16 }),
|
|
2068
|
+
/* @__PURE__ */ n.jsx(V, { children: "Query Parameters" }),
|
|
2071
2069
|
/* @__PURE__ */ n.jsxs(
|
|
2072
|
-
|
|
2070
|
+
R,
|
|
2073
2071
|
{
|
|
2074
2072
|
onClick: () => {
|
|
2075
2073
|
o("queryParams", [
|
|
@@ -2083,23 +2081,23 @@ const Ut = ({
|
|
|
2083
2081
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
2084
2082
|
children: [
|
|
2085
2083
|
"Add parameter ",
|
|
2086
|
-
/* @__PURE__ */ n.jsx(
|
|
2084
|
+
/* @__PURE__ */ n.jsx(ne, { size: 16 })
|
|
2087
2085
|
]
|
|
2088
2086
|
}
|
|
2089
2087
|
)
|
|
2090
2088
|
] }),
|
|
2091
|
-
/* @__PURE__ */ n.jsx(
|
|
2092
|
-
const
|
|
2089
|
+
/* @__PURE__ */ n.jsx(D, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((d, h) => {
|
|
2090
|
+
const x = t.find(
|
|
2093
2091
|
(m) => m.name === c.at(h)?.name
|
|
2094
2092
|
);
|
|
2095
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2093
|
+
return /* @__PURE__ */ n.jsxs(ye, { children: [
|
|
2096
2094
|
/* @__PURE__ */ n.jsx(
|
|
2097
|
-
|
|
2095
|
+
q,
|
|
2098
2096
|
{
|
|
2099
2097
|
control: e,
|
|
2100
2098
|
name: `queryParams.${h}.active`,
|
|
2101
2099
|
render: ({ field: m }) => /* @__PURE__ */ n.jsx(
|
|
2102
|
-
|
|
2100
|
+
oe,
|
|
2103
2101
|
{
|
|
2104
2102
|
id: `queryParams.${h}.active`,
|
|
2105
2103
|
checked: m.value,
|
|
@@ -2109,10 +2107,10 @@ const Ut = ({
|
|
|
2109
2107
|
}
|
|
2110
2108
|
),
|
|
2111
2109
|
/* @__PURE__ */ n.jsx(
|
|
2112
|
-
|
|
2110
|
+
q,
|
|
2113
2111
|
{
|
|
2114
2112
|
control: e,
|
|
2115
|
-
render: ({ field: m }) => u[h] ? /* @__PURE__ */ n.jsx(
|
|
2113
|
+
render: ({ field: m }) => u[h] ? /* @__PURE__ */ n.jsx(Fr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
2116
2114
|
"label",
|
|
2117
2115
|
{
|
|
2118
2116
|
className: "flex items-center cursor-pointer gap-1",
|
|
@@ -2124,7 +2122,7 @@ const Ut = ({
|
|
|
2124
2122
|
]
|
|
2125
2123
|
}
|
|
2126
2124
|
) }) : /* @__PURE__ */ n.jsx(
|
|
2127
|
-
|
|
2125
|
+
ge,
|
|
2128
2126
|
{
|
|
2129
2127
|
placeholder: "Name",
|
|
2130
2128
|
value: m.value,
|
|
@@ -2140,21 +2138,21 @@ const Ut = ({
|
|
|
2140
2138
|
),
|
|
2141
2139
|
/* @__PURE__ */ n.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
2142
2140
|
/* @__PURE__ */ n.jsx(
|
|
2143
|
-
|
|
2141
|
+
q,
|
|
2144
2142
|
{
|
|
2145
2143
|
control: e,
|
|
2146
|
-
render: ({ field: m }) =>
|
|
2147
|
-
|
|
2144
|
+
render: ({ field: m }) => x?.enum && x.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
2145
|
+
ge,
|
|
2148
2146
|
{
|
|
2149
2147
|
value: m.value,
|
|
2150
|
-
options:
|
|
2148
|
+
options: x.enum ?? [],
|
|
2151
2149
|
onChange: (y) => {
|
|
2152
2150
|
m.onChange(y), o(`queryParams.${h}.active`, !0);
|
|
2153
2151
|
},
|
|
2154
2152
|
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2155
2153
|
}
|
|
2156
2154
|
) : /* @__PURE__ */ n.jsx(
|
|
2157
|
-
|
|
2155
|
+
xe,
|
|
2158
2156
|
{
|
|
2159
2157
|
...m,
|
|
2160
2158
|
onChange: (y) => {
|
|
@@ -2169,37 +2167,53 @@ const Ut = ({
|
|
|
2169
2167
|
}
|
|
2170
2168
|
),
|
|
2171
2169
|
/* @__PURE__ */ n.jsx(
|
|
2172
|
-
|
|
2170
|
+
R,
|
|
2173
2171
|
{
|
|
2174
2172
|
size: "icon-xs",
|
|
2175
2173
|
variant: "ghost",
|
|
2176
2174
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
2177
2175
|
onClick: () => a(h),
|
|
2178
2176
|
type: "button",
|
|
2179
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2177
|
+
children: /* @__PURE__ */ n.jsx(yt, { size: 16 })
|
|
2180
2178
|
}
|
|
2181
2179
|
)
|
|
2182
2180
|
] })
|
|
2183
2181
|
] }, d.id);
|
|
2184
2182
|
}) }) }) })
|
|
2185
2183
|
] });
|
|
2186
|
-
},
|
|
2184
|
+
}, Vr = ({
|
|
2187
2185
|
open: e,
|
|
2188
2186
|
setOpen: t,
|
|
2189
2187
|
onSignUp: s,
|
|
2190
|
-
onLogin: a
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2188
|
+
onLogin: a,
|
|
2189
|
+
onSkip: r
|
|
2190
|
+
}) => {
|
|
2191
|
+
const [o, i] = A(!1), l = () => {
|
|
2192
|
+
r?.(o), t(!1);
|
|
2193
|
+
};
|
|
2194
|
+
return /* @__PURE__ */ n.jsx(De, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(ze, { children: [
|
|
2195
|
+
/* @__PURE__ */ n.jsx(Fe, { children: "Welcome to the Playground!" }),
|
|
2196
|
+
/* @__PURE__ */ n.jsx(Nt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2197
|
+
/* @__PURE__ */ n.jsxs(je, { className: "flex items-center gap-2 font-normal", children: [
|
|
2198
|
+
/* @__PURE__ */ n.jsx(
|
|
2199
|
+
oe,
|
|
2200
|
+
{
|
|
2201
|
+
checked: o,
|
|
2202
|
+
onCheckedChange: (c) => i(c === !0)
|
|
2203
|
+
}
|
|
2204
|
+
),
|
|
2205
|
+
"Don't show this again"
|
|
2206
|
+
] }),
|
|
2207
|
+
/* @__PURE__ */ n.jsxs(wt, { className: "flex gap-2 sm:justify-between", children: [
|
|
2208
|
+
/* @__PURE__ */ n.jsx(R, { type: "button", variant: "outline", onClick: l, children: "Skip" }),
|
|
2209
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2210
|
+
s && /* @__PURE__ */ n.jsx(R, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2211
|
+
a && /* @__PURE__ */ n.jsx(R, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2212
|
+
] })
|
|
2199
2213
|
] })
|
|
2200
|
-
] })
|
|
2201
|
-
|
|
2202
|
-
|
|
2214
|
+
] }) });
|
|
2215
|
+
}, _r = ke()(
|
|
2216
|
+
Ie(
|
|
2203
2217
|
(e, t) => ({
|
|
2204
2218
|
rememberedIdentity: null,
|
|
2205
2219
|
setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
|
|
@@ -2209,7 +2223,7 @@ const Ut = ({
|
|
|
2209
2223
|
}),
|
|
2210
2224
|
{
|
|
2211
2225
|
name: "identity-storage",
|
|
2212
|
-
storage:
|
|
2226
|
+
storage: vt(() => sessionStorage)
|
|
2213
2227
|
}
|
|
2214
2228
|
)
|
|
2215
2229
|
), Br = ({
|
|
@@ -2223,12 +2237,12 @@ const Ut = ({
|
|
|
2223
2237
|
return i.forEach((u) => {
|
|
2224
2238
|
const [d, h] = u;
|
|
2225
2239
|
if (!h) return;
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
/* @__PURE__ */ n.jsx(Z, { children: a.slice(c,
|
|
2240
|
+
const x = u.index;
|
|
2241
|
+
x > c && l.push(
|
|
2242
|
+
/* @__PURE__ */ n.jsx(Z, { children: a.slice(c, x) }, `text-${c}-${x}`)
|
|
2229
2243
|
), l.push(
|
|
2230
2244
|
/* @__PURE__ */ n.jsx(Z, { children: t({ name: h, originalValue: d, index: s++ }) }, `param-${h}`)
|
|
2231
|
-
), c =
|
|
2245
|
+
), c = x + d.length;
|
|
2232
2246
|
}), c < a.length && l.push(
|
|
2233
2247
|
/* @__PURE__ */ n.jsx(Z, { children: a.slice(c) }, `text-${c}-${a.length}`)
|
|
2234
2248
|
), // biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
|
|
@@ -2238,8 +2252,8 @@ const Ut = ({
|
|
|
2238
2252
|
/* @__PURE__ */ n.jsx("wbr", {})
|
|
2239
2253
|
] }, `${a}-${r}`);
|
|
2240
2254
|
});
|
|
2241
|
-
},
|
|
2242
|
-
const { watch: t, setFocus: s } =
|
|
2255
|
+
}, Ur = ({ url: e }) => {
|
|
2256
|
+
const { watch: t, setFocus: s } = ae(), [a] = t(["pathParams"]);
|
|
2243
2257
|
return /* @__PURE__ */ n.jsx(
|
|
2244
2258
|
Br,
|
|
2245
2259
|
{
|
|
@@ -2249,7 +2263,7 @@ const Ut = ({
|
|
|
2249
2263
|
(c) => c.name === r
|
|
2250
2264
|
)?.value;
|
|
2251
2265
|
return /* @__PURE__ */ n.jsx(
|
|
2252
|
-
|
|
2266
|
+
Ht,
|
|
2253
2267
|
{
|
|
2254
2268
|
name: r,
|
|
2255
2269
|
backgroundOpacity: "0",
|
|
@@ -2261,8 +2275,8 @@ const Ut = ({
|
|
|
2261
2275
|
}
|
|
2262
2276
|
}
|
|
2263
2277
|
);
|
|
2264
|
-
},
|
|
2265
|
-
const { watch: e } =
|
|
2278
|
+
}, Mr = () => {
|
|
2279
|
+
const { watch: e } = ae(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ n.jsxs(Z, { children: [
|
|
2266
2280
|
a.name,
|
|
2267
2281
|
"=",
|
|
2268
2282
|
encodeURIComponent(a.value).replaceAll("%20", "+"),
|
|
@@ -2273,12 +2287,12 @@ const Ut = ({
|
|
|
2273
2287
|
s.length > 0 ? "?" : "",
|
|
2274
2288
|
s
|
|
2275
2289
|
] });
|
|
2276
|
-
},
|
|
2290
|
+
}, Qt = (e = 0) => {
|
|
2277
2291
|
if (e === 0)
|
|
2278
2292
|
return "0 B";
|
|
2279
2293
|
const t = Math.floor(Math.log(e) / Math.log(1e3));
|
|
2280
2294
|
return `${(e / 1e3 ** t).toFixed(t ? 2 : 0)} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
|
|
2281
|
-
},
|
|
2295
|
+
}, Gr = ({ status: e }) => {
|
|
2282
2296
|
if (!e) return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2283
2297
|
switch (Number(e.toString().slice(0, 1))) {
|
|
2284
2298
|
case 2:
|
|
@@ -2290,15 +2304,15 @@ const Ut = ({
|
|
|
2290
2304
|
default:
|
|
2291
2305
|
return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2292
2306
|
}
|
|
2293
|
-
},
|
|
2294
|
-
const e = O(null), t = O(null), s = O(Date.now()), a = O(null), r =
|
|
2307
|
+
}, Hr = () => {
|
|
2308
|
+
const e = O(null), t = O(null), s = O(Date.now()), a = O(null), r = Ct(() => {
|
|
2295
2309
|
if (t.current) {
|
|
2296
2310
|
const o = Date.now() - s.current;
|
|
2297
2311
|
t.current.nodeValue = o.toFixed();
|
|
2298
2312
|
}
|
|
2299
2313
|
a.current = requestAnimationFrame(r);
|
|
2300
2314
|
}, []);
|
|
2301
|
-
return
|
|
2315
|
+
return Jn(() => {
|
|
2302
2316
|
const o = e.current;
|
|
2303
2317
|
if (!o) return;
|
|
2304
2318
|
const i = document.createTextNode("0");
|
|
@@ -2306,7 +2320,7 @@ const Ut = ({
|
|
|
2306
2320
|
a.current && cancelAnimationFrame(a.current), t.current && o.contains(i) && o.removeChild(i);
|
|
2307
2321
|
};
|
|
2308
2322
|
}, [r]), /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
|
|
2309
|
-
},
|
|
2323
|
+
}, Qr = ({
|
|
2310
2324
|
status: e,
|
|
2311
2325
|
time: t,
|
|
2312
2326
|
size: s,
|
|
@@ -2325,9 +2339,9 @@ const Ut = ({
|
|
|
2325
2339
|
405: "Method Not Allowed",
|
|
2326
2340
|
500: "Internal Server Error"
|
|
2327
2341
|
};
|
|
2328
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "relative flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2342
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "relative shrink-0 flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2329
2343
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2330
|
-
/* @__PURE__ */ n.jsx(
|
|
2344
|
+
/* @__PURE__ */ n.jsx(Gr, { status: e }),
|
|
2331
2345
|
" ",
|
|
2332
2346
|
e ?? "Sending Request...",
|
|
2333
2347
|
e ? ` ${o[e]}` : ""
|
|
@@ -2336,19 +2350,19 @@ const Ut = ({
|
|
|
2336
2350
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2337
2351
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2338
2352
|
" ",
|
|
2339
|
-
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ?
|
|
2353
|
+
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? Qt(s) : "- B" })
|
|
2340
2354
|
] }),
|
|
2341
2355
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2342
2356
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2343
2357
|
" ",
|
|
2344
|
-
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(
|
|
2358
|
+
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(Hr, {}),
|
|
2345
2359
|
"ms"
|
|
2346
2360
|
] })
|
|
2347
2361
|
] }),
|
|
2348
2362
|
/* @__PURE__ */ n.jsx(
|
|
2349
2363
|
"div",
|
|
2350
2364
|
{
|
|
2351
|
-
className: "h-full bg-neutral-500/10 absolute left-0
|
|
2365
|
+
className: "h-full bg-neutral-500/10 absolute left-0 bottom-0 z-10 transition-all duration-200 ease-in-out",
|
|
2352
2366
|
style: {
|
|
2353
2367
|
opacity: a ? 0 : 1,
|
|
2354
2368
|
width: a ? 0 : `${r * 100}%`
|
|
@@ -2357,42 +2371,28 @@ const Ut = ({
|
|
|
2357
2371
|
)
|
|
2358
2372
|
] });
|
|
2359
2373
|
};
|
|
2360
|
-
function
|
|
2374
|
+
function Ue(e) {
|
|
2361
2375
|
if (e === null) return "null";
|
|
2362
2376
|
if (Array.isArray(e)) {
|
|
2363
2377
|
if (e.length === 0) return "any[]";
|
|
2364
2378
|
const t = e[0];
|
|
2365
|
-
return t === void 0 ? "any[]" : `${
|
|
2379
|
+
return t === void 0 ? "any[]" : `${Ue(t)}[]`;
|
|
2366
2380
|
}
|
|
2367
|
-
return typeof e == "object" ?
|
|
2381
|
+
return typeof e == "object" ? Jr(e) : typeof e;
|
|
2368
2382
|
}
|
|
2369
|
-
function
|
|
2383
|
+
function Jr(e, t = "") {
|
|
2370
2384
|
const s = ["{"];
|
|
2371
2385
|
for (const [a, r] of Object.entries(e)) {
|
|
2372
|
-
const o =
|
|
2386
|
+
const o = Ue(r);
|
|
2373
2387
|
s.push(` ${a}: ${o};`);
|
|
2374
2388
|
}
|
|
2375
2389
|
return s.push("}"), s.join(`
|
|
2376
2390
|
`);
|
|
2377
2391
|
}
|
|
2378
|
-
function
|
|
2379
|
-
return { lines: [`type GeneratedType = ${
|
|
2392
|
+
function Wr(e) {
|
|
2393
|
+
return { lines: [`type GeneratedType = ${Ue(e)};`] };
|
|
2380
2394
|
}
|
|
2381
|
-
const
|
|
2382
|
-
code: e,
|
|
2383
|
-
language: t,
|
|
2384
|
-
children: s
|
|
2385
|
-
}) => {
|
|
2386
|
-
const { syntaxHighlighting: a } = Vn().options;
|
|
2387
|
-
return Gn(a?.highlighter, "Highlighter not found"), Os(
|
|
2388
|
-
a.highlighter,
|
|
2389
|
-
e ?? s ?? "",
|
|
2390
|
-
t,
|
|
2391
|
-
a.themes
|
|
2392
|
-
);
|
|
2393
|
-
};
|
|
2394
|
-
Ht.displayName = "Highlight";
|
|
2395
|
-
const Wr = (e) => Object.entries({
|
|
2395
|
+
const Xr = (e) => Object.entries({
|
|
2396
2396
|
"application/json": "json",
|
|
2397
2397
|
"text/json": "json",
|
|
2398
2398
|
"text/html": "html",
|
|
@@ -2402,16 +2402,16 @@ const Wr = (e) => Object.entries({
|
|
|
2402
2402
|
"application/xhtml+xml": "xhtml"
|
|
2403
2403
|
}).find(
|
|
2404
2404
|
([s]) => e.includes(s)
|
|
2405
|
-
)?.[1],
|
|
2405
|
+
)?.[1], Zr = (e) => {
|
|
2406
2406
|
const t = e.find(([s]) => s.toLowerCase() === "content-type")?.[1] || "";
|
|
2407
|
-
return
|
|
2408
|
-
},
|
|
2407
|
+
return Xr(t);
|
|
2408
|
+
}, Yr = (e) => {
|
|
2409
2409
|
try {
|
|
2410
2410
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2411
2411
|
} catch {
|
|
2412
2412
|
return null;
|
|
2413
2413
|
}
|
|
2414
|
-
},
|
|
2414
|
+
}, Kr = (e) => {
|
|
2415
2415
|
const t = [
|
|
2416
2416
|
"Content-Type",
|
|
2417
2417
|
"Content-Length",
|
|
@@ -2425,25 +2425,28 @@ const Wr = (e) => Object.entries({
|
|
|
2425
2425
|
const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
|
|
2426
2426
|
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
2427
2427
|
});
|
|
2428
|
-
},
|
|
2428
|
+
}, $ = 3, ue = ie(
|
|
2429
2429
|
"div",
|
|
2430
2430
|
"grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
|
|
2431
|
-
),
|
|
2432
|
-
const a = ["authorization", "key", "secret", "token"].includes(t.toLowerCase()), [r, o] =
|
|
2433
|
-
return /* @__PURE__ */ n.
|
|
2434
|
-
|
|
2431
|
+
), ee = ie("div", "py-1 break-words"), me = ({ value: e, header: t }) => {
|
|
2432
|
+
const a = ["authorization", "key", "secret", "token"].includes(t.toLowerCase()), [r, o] = A(!a);
|
|
2433
|
+
return /* @__PURE__ */ n.jsx(
|
|
2434
|
+
ee,
|
|
2435
2435
|
{
|
|
2436
|
-
className: C(
|
|
2436
|
+
className: C(
|
|
2437
|
+
"max-h-28 overflow-auto",
|
|
2438
|
+
a && "cursor-pointer flex group"
|
|
2439
|
+
),
|
|
2437
2440
|
onClick: () => {
|
|
2438
2441
|
a && o((i) => !i);
|
|
2439
2442
|
},
|
|
2440
|
-
children: [
|
|
2441
|
-
/* @__PURE__ */ n.jsx(
|
|
2442
|
-
|
|
2443
|
-
]
|
|
2443
|
+
children: a ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2444
|
+
/* @__PURE__ */ n.jsx(ns, { secret: e, previewChars: 0, revealed: r }),
|
|
2445
|
+
r ? /* @__PURE__ */ n.jsx(On, { size: 14, className: C("hidden group-hover:block") }) : /* @__PURE__ */ n.jsx(Pn, { size: 14, className: C("hidden group-hover:block") })
|
|
2446
|
+
] }) : e
|
|
2444
2447
|
}
|
|
2445
2448
|
);
|
|
2446
|
-
},
|
|
2449
|
+
}, ea = ({
|
|
2447
2450
|
body: e = "",
|
|
2448
2451
|
headers: t,
|
|
2449
2452
|
request: s,
|
|
@@ -2452,108 +2455,157 @@ const Wr = (e) => Object.entries({
|
|
|
2452
2455
|
fileName: o,
|
|
2453
2456
|
blob: i
|
|
2454
2457
|
}) => {
|
|
2455
|
-
const l =
|
|
2458
|
+
const l = Zr(t), c = Yr(e), u = c || e, [d, h] = A(
|
|
2456
2459
|
c ? "formatted" : "raw"
|
|
2457
|
-
),
|
|
2460
|
+
), x = Bn({
|
|
2458
2461
|
queryKey: ["types", u],
|
|
2459
|
-
queryFn: async () =>
|
|
2462
|
+
queryFn: async () => Wr(JSON.parse(u)),
|
|
2460
2463
|
enabled: d === "types" && !r
|
|
2461
2464
|
}), m = () => {
|
|
2462
2465
|
if (i && o) {
|
|
2463
2466
|
const y = URL.createObjectURL(i), b = document.createElement("a");
|
|
2464
2467
|
b.href = y, b.download = o, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(y);
|
|
2465
2468
|
}
|
|
2466
|
-
}, v =
|
|
2469
|
+
}, v = Kr([...t]);
|
|
2467
2470
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2468
|
-
/* @__PURE__ */ n.jsxs(
|
|
2469
|
-
/* @__PURE__ */ n.jsxs(
|
|
2470
|
-
/* @__PURE__ */ n.jsx(
|
|
2471
|
-
/* @__PURE__ */ n.jsx(
|
|
2471
|
+
/* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
2472
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
2473
|
+
/* @__PURE__ */ n.jsx(wn, { size: 14 }),
|
|
2474
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-2", children: "Request Headers" })
|
|
2472
2475
|
] }),
|
|
2473
|
-
/* @__PURE__ */ n.jsx(
|
|
2474
|
-
/* @__PURE__ */ n.
|
|
2475
|
-
|
|
2476
|
-
|
|
2476
|
+
/* @__PURE__ */ n.jsx(D, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2477
|
+
s.headers.slice(0, $).map(([y, b]) => /* @__PURE__ */ n.jsxs(ue, { children: [
|
|
2478
|
+
/* @__PURE__ */ n.jsx(ee, { children: y }),
|
|
2479
|
+
/* @__PURE__ */ n.jsx(me, { value: b, header: y })
|
|
2480
|
+
] }, y)),
|
|
2481
|
+
s.headers.length > $ && /* @__PURE__ */ n.jsxs(I, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2482
|
+
/* @__PURE__ */ n.jsxs(K, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2483
|
+
"Show ",
|
|
2484
|
+
s.headers.length - $,
|
|
2485
|
+
" more headers",
|
|
2486
|
+
/* @__PURE__ */ n.jsx(ne, { size: 12, className: "text-muted-foreground" })
|
|
2487
|
+
] }),
|
|
2488
|
+
/* @__PURE__ */ n.jsxs(D, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2489
|
+
s.headers.slice($).map(([y, b]) => /* @__PURE__ */ n.jsxs(ue, { children: [
|
|
2490
|
+
/* @__PURE__ */ n.jsx(ee, { children: y }),
|
|
2491
|
+
/* @__PURE__ */ n.jsx(me, { value: b, header: y })
|
|
2492
|
+
] }, y)),
|
|
2493
|
+
/* @__PURE__ */ n.jsxs(K, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2494
|
+
"Hide ",
|
|
2495
|
+
s.headers.length - $,
|
|
2496
|
+
" headers",
|
|
2497
|
+
/* @__PURE__ */ n.jsx(
|
|
2498
|
+
at,
|
|
2499
|
+
{
|
|
2500
|
+
size: 12,
|
|
2501
|
+
className: "text-muted-foreground"
|
|
2502
|
+
}
|
|
2503
|
+
)
|
|
2504
|
+
] })
|
|
2505
|
+
] })
|
|
2506
|
+
] })
|
|
2507
|
+
] }) })
|
|
2477
2508
|
] }),
|
|
2478
|
-
/* @__PURE__ */ n.jsxs(
|
|
2479
|
-
/* @__PURE__ */ n.jsxs(
|
|
2480
|
-
/* @__PURE__ */ n.jsx(
|
|
2481
|
-
/* @__PURE__ */ n.jsx(
|
|
2509
|
+
/* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
2510
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
2511
|
+
/* @__PURE__ */ n.jsx(Sn, { size: 14 }),
|
|
2512
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-2", children: "Response Headers" })
|
|
2482
2513
|
] }),
|
|
2483
|
-
/* @__PURE__ */ n.jsx(
|
|
2484
|
-
v.slice(0,
|
|
2485
|
-
/* @__PURE__ */ n.jsx(
|
|
2486
|
-
/* @__PURE__ */ n.jsx(
|
|
2514
|
+
/* @__PURE__ */ n.jsx(D, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2515
|
+
v.slice(0, $).map(([y, b]) => /* @__PURE__ */ n.jsxs(ue, { children: [
|
|
2516
|
+
/* @__PURE__ */ n.jsx(ee, { children: y }),
|
|
2517
|
+
/* @__PURE__ */ n.jsx(me, { value: b, header: y })
|
|
2487
2518
|
] }, y)),
|
|
2488
|
-
v.length >
|
|
2489
|
-
/* @__PURE__ */ n.jsxs(
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
] }),
|
|
2495
|
-
/* @__PURE__ */ n.jsx(pe, { size: 12, className: "text-muted-foreground" })
|
|
2519
|
+
v.length > $ && /* @__PURE__ */ n.jsxs(I, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2520
|
+
/* @__PURE__ */ n.jsxs(K, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2521
|
+
"Show ",
|
|
2522
|
+
v.length - $,
|
|
2523
|
+
" more headers",
|
|
2524
|
+
/* @__PURE__ */ n.jsx(ne, { size: 12, className: "text-muted-foreground" })
|
|
2496
2525
|
] }),
|
|
2497
|
-
/* @__PURE__ */ n.
|
|
2498
|
-
/* @__PURE__ */ n.
|
|
2499
|
-
|
|
2500
|
-
|
|
2526
|
+
/* @__PURE__ */ n.jsxs(D, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2527
|
+
v.slice($).map(([y, b]) => /* @__PURE__ */ n.jsxs(ue, { children: [
|
|
2528
|
+
/* @__PURE__ */ n.jsx(ee, { children: y }),
|
|
2529
|
+
/* @__PURE__ */ n.jsx(me, { value: b, header: y })
|
|
2530
|
+
] }, y)),
|
|
2531
|
+
/* @__PURE__ */ n.jsxs(K, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2532
|
+
"Hide ",
|
|
2533
|
+
v.length - $,
|
|
2534
|
+
" headers",
|
|
2535
|
+
/* @__PURE__ */ n.jsx(
|
|
2536
|
+
at,
|
|
2537
|
+
{
|
|
2538
|
+
size: 12,
|
|
2539
|
+
className: "text-muted-foreground"
|
|
2540
|
+
}
|
|
2541
|
+
)
|
|
2542
|
+
] })
|
|
2543
|
+
] })
|
|
2501
2544
|
] })
|
|
2502
2545
|
] }) })
|
|
2503
2546
|
] }),
|
|
2504
|
-
/* @__PURE__ */ n.
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2547
|
+
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 justify-between items-center border-b px-2 flex-0", children: [
|
|
2548
|
+
/* @__PURE__ */ n.jsxs(V, { className: "flex items-center gap-2", children: [
|
|
2549
|
+
/* @__PURE__ */ n.jsx(Tn, { size: 14 }),
|
|
2550
|
+
"Response body"
|
|
2551
|
+
] }),
|
|
2552
|
+
c && !r && /* @__PURE__ */ n.jsxs(
|
|
2553
|
+
St,
|
|
2554
|
+
{
|
|
2555
|
+
value: d,
|
|
2556
|
+
onValueChange: (y) => h(y),
|
|
2557
|
+
children: [
|
|
2558
|
+
/* @__PURE__ */ n.jsx(Tt, { className: "max-w-32 border-0 bg-transparent", children: /* @__PURE__ */ n.jsx(At, { placeholder: "View" }) }),
|
|
2559
|
+
/* @__PURE__ */ n.jsxs(Ot, { children: [
|
|
2560
|
+
/* @__PURE__ */ n.jsx(pe, { value: "formatted", children: "Formatted" }),
|
|
2561
|
+
/* @__PURE__ */ n.jsx(pe, { value: "raw", children: "Raw" }),
|
|
2562
|
+
/* @__PURE__ */ n.jsx(pe, { value: "types", children: "Types" })
|
|
2563
|
+
] })
|
|
2564
|
+
]
|
|
2565
|
+
}
|
|
2566
|
+
)
|
|
2567
|
+
] }),
|
|
2568
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex-1", children: r ? /* @__PURE__ */ n.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2520
2569
|
/* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2521
2570
|
/* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2522
2571
|
/* @__PURE__ */ n.jsxs(
|
|
2523
|
-
|
|
2572
|
+
R,
|
|
2524
2573
|
{
|
|
2525
2574
|
onClick: m,
|
|
2526
2575
|
className: "flex items-center gap-2",
|
|
2527
2576
|
disabled: !i,
|
|
2528
2577
|
children: [
|
|
2529
|
-
/* @__PURE__ */ n.jsx(
|
|
2578
|
+
/* @__PURE__ */ n.jsx(An, { className: "h-4 w-4" }),
|
|
2530
2579
|
"Download ",
|
|
2531
2580
|
o || "file",
|
|
2532
2581
|
" (",
|
|
2533
|
-
|
|
2582
|
+
Qt(a),
|
|
2534
2583
|
")"
|
|
2535
2584
|
]
|
|
2536
2585
|
}
|
|
2537
2586
|
)
|
|
2538
|
-
] }) }) : /* @__PURE__ */ n.jsx(
|
|
2539
|
-
|
|
2587
|
+
] }) }) : /* @__PURE__ */ n.jsx(
|
|
2588
|
+
ls,
|
|
2540
2589
|
{
|
|
2590
|
+
className: "text-xs flex-1",
|
|
2591
|
+
embedded: !0,
|
|
2592
|
+
fullHeight: !0,
|
|
2541
2593
|
language: d === "types" ? "typescript" : d === "raw" ? c ? "plain" : l : "json",
|
|
2542
|
-
code: (d === "raw" ? e : d === "types" ?
|
|
2594
|
+
code: (d === "raw" ? e : d === "types" ? x.data?.lines.join(`
|
|
2543
2595
|
`) : u) ?? ""
|
|
2544
2596
|
}
|
|
2545
|
-
) })
|
|
2597
|
+
) })
|
|
2546
2598
|
] });
|
|
2547
|
-
},
|
|
2599
|
+
}, ta = ({
|
|
2548
2600
|
queryMutation: e,
|
|
2549
2601
|
showLongRunningWarning: t,
|
|
2550
2602
|
onCancel: s,
|
|
2551
2603
|
tip: a,
|
|
2552
2604
|
isFinished: r,
|
|
2553
2605
|
progress: o
|
|
2554
|
-
}) => /* @__PURE__ */ n.jsxs("div", { className: "overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2606
|
+
}) => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2555
2607
|
(e.isPending || e.data) && /* @__PURE__ */ n.jsx(
|
|
2556
|
-
|
|
2608
|
+
Qr,
|
|
2557
2609
|
{
|
|
2558
2610
|
status: e.data?.status,
|
|
2559
2611
|
time: e.data?.time,
|
|
@@ -2562,12 +2614,12 @@ const Wr = (e) => Object.entries({
|
|
|
2562
2614
|
progress: o
|
|
2563
2615
|
}
|
|
2564
2616
|
),
|
|
2565
|
-
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(
|
|
2566
|
-
/* @__PURE__ */ n.jsx(
|
|
2567
|
-
/* @__PURE__ */ n.jsx(
|
|
2568
|
-
/* @__PURE__ */ n.jsx(
|
|
2617
|
+
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(ss, { children: [
|
|
2618
|
+
/* @__PURE__ */ n.jsx(Ln, { size: 24, strokeWidth: 1.5, className: "me-5" }),
|
|
2619
|
+
/* @__PURE__ */ n.jsx(rs, { children: "Request failed" }),
|
|
2620
|
+
/* @__PURE__ */ n.jsx(as, { children: e.error.message || String(e.error) || "Unexpected error" })
|
|
2569
2621
|
] }) }) : e.data ? /* @__PURE__ */ n.jsx(
|
|
2570
|
-
|
|
2622
|
+
ea,
|
|
2571
2623
|
{
|
|
2572
2624
|
request: e.data.request,
|
|
2573
2625
|
size: e.data.size,
|
|
@@ -2578,7 +2630,7 @@ const Wr = (e) => Object.entries({
|
|
|
2578
2630
|
blob: e.data.blob
|
|
2579
2631
|
}
|
|
2580
2632
|
) : e.isPending ? /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2581
|
-
/* @__PURE__ */ n.jsx(
|
|
2633
|
+
/* @__PURE__ */ n.jsx(es, {}),
|
|
2582
2634
|
/* @__PURE__ */ n.jsxs(
|
|
2583
2635
|
"div",
|
|
2584
2636
|
{
|
|
@@ -2589,7 +2641,7 @@ const Wr = (e) => Object.entries({
|
|
|
2589
2641
|
children: [
|
|
2590
2642
|
"Looks like the request is taking longer than expected.",
|
|
2591
2643
|
/* @__PURE__ */ n.jsx(
|
|
2592
|
-
|
|
2644
|
+
he,
|
|
2593
2645
|
{
|
|
2594
2646
|
type: "button",
|
|
2595
2647
|
onClick: s,
|
|
@@ -2604,7 +2656,7 @@ const Wr = (e) => Object.entries({
|
|
|
2604
2656
|
)
|
|
2605
2657
|
] }) }) : /* @__PURE__ */ n.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
|
|
2606
2658
|
/* @__PURE__ */ n.jsx(
|
|
2607
|
-
|
|
2659
|
+
$n,
|
|
2608
2660
|
{
|
|
2609
2661
|
size: 64,
|
|
2610
2662
|
className: "text-muted-foreground",
|
|
@@ -2614,18 +2666,20 @@ const Wr = (e) => Object.entries({
|
|
|
2614
2666
|
/* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
|
|
2615
2667
|
a
|
|
2616
2668
|
] }) })
|
|
2617
|
-
] }),
|
|
2618
|
-
|
|
2669
|
+
] }), Jt = ke()(
|
|
2670
|
+
Ie(
|
|
2619
2671
|
(e) => ({
|
|
2620
2672
|
skipLogin: !1,
|
|
2621
2673
|
setSkipLogin: (t) => e({ skipLogin: t })
|
|
2622
2674
|
}),
|
|
2623
2675
|
{
|
|
2624
2676
|
name: "remember-skip-login",
|
|
2625
|
-
storage:
|
|
2677
|
+
storage: vt(() => sessionStorage)
|
|
2626
2678
|
}
|
|
2627
2679
|
)
|
|
2628
|
-
)
|
|
2680
|
+
);
|
|
2681
|
+
Un(Jt);
|
|
2682
|
+
const te = "__none", na = ({
|
|
2629
2683
|
server: e,
|
|
2630
2684
|
servers: t = [],
|
|
2631
2685
|
url: s,
|
|
@@ -2639,13 +2693,13 @@ const Wr = (e) => Object.entries({
|
|
|
2639
2693
|
onLogin: d,
|
|
2640
2694
|
onSignUp: h
|
|
2641
2695
|
}) => {
|
|
2642
|
-
const { selectedServer:
|
|
2696
|
+
const { selectedServer: x, setSelectedServer: m } = Sr(
|
|
2643
2697
|
t.map((p) => ({ url: p }))
|
|
2644
|
-
), [v, y] =
|
|
2645
|
-
|
|
2646
|
-
}),
|
|
2647
|
-
(p,
|
|
2648
|
-
), { register:
|
|
2698
|
+
), [v, y] = A(!1), b = Mn(), { setRememberedIdentity: T, getRememberedIdentity: f } = _r(), [, j] = Wn(), { skipLogin: L, setSkipLogin: w } = Jt(), [z, E] = A(!1), [en, ce] = A(!1), Q = O(void 0), Ge = ms(T), He = O(null), { label: tn } = Nr("meta+enter", () => {
|
|
2699
|
+
He.current?.requestSubmit();
|
|
2700
|
+
}), Qe = s.match(/\{([^}]+)\}/g)?.map((p) => p.slice(1, -1)) ?? [], Je = [...i].sort(
|
|
2701
|
+
(p, W) => Qe.indexOf(p.name) - Qe.indexOf(W.name)
|
|
2702
|
+
), { register: nn, control: le, handleSubmit: We, watch: Xe, setValue: Ce, ...Ne } = is({
|
|
2649
2703
|
defaultValues: {
|
|
2650
2704
|
body: l,
|
|
2651
2705
|
queryParams: o.length > 0 ? o.map((p) => ({
|
|
@@ -2661,7 +2715,7 @@ const Wr = (e) => Object.entries({
|
|
|
2661
2715
|
enum: []
|
|
2662
2716
|
}
|
|
2663
2717
|
],
|
|
2664
|
-
pathParams:
|
|
2718
|
+
pathParams: Je.map((p) => ({
|
|
2665
2719
|
name: p.name,
|
|
2666
2720
|
value: p.defaultValue ?? ""
|
|
2667
2721
|
})),
|
|
@@ -2677,133 +2731,138 @@ const Wr = (e) => Object.entries({
|
|
|
2677
2731
|
}
|
|
2678
2732
|
],
|
|
2679
2733
|
identity: f([
|
|
2680
|
-
|
|
2734
|
+
te,
|
|
2681
2735
|
...b.data?.map((p) => p.id) ?? []
|
|
2682
2736
|
])
|
|
2683
2737
|
}
|
|
2684
|
-
}),
|
|
2685
|
-
() => b.data?.find((p) => p.id ===
|
|
2686
|
-
[b.data,
|
|
2738
|
+
}), J = Xe("identity"), sn = jt(
|
|
2739
|
+
() => b.data?.find((p) => p.id === J)?.authorizationFields,
|
|
2740
|
+
[b.data, J]
|
|
2687
2741
|
);
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
}, [
|
|
2691
|
-
const
|
|
2742
|
+
F(() => {
|
|
2743
|
+
J && Ge.current(J);
|
|
2744
|
+
}, [Ge, J]);
|
|
2745
|
+
const B = os({
|
|
2692
2746
|
gcTime: 0,
|
|
2693
2747
|
mutationFn: async (p) => {
|
|
2694
|
-
const
|
|
2748
|
+
const W = performance.now(), pn = Object.fromEntries([
|
|
2695
2749
|
...p.headers.filter((S) => S.name && S.active).map((S) => [S.name, S.value])
|
|
2696
|
-
]),
|
|
2697
|
-
|
|
2750
|
+
]), U = new Request(
|
|
2751
|
+
ht(e ?? x, s, p),
|
|
2698
2752
|
{
|
|
2699
2753
|
method: a.toUpperCase(),
|
|
2700
|
-
headers:
|
|
2754
|
+
headers: pn,
|
|
2701
2755
|
body: p.body ? p.body : void 0
|
|
2702
2756
|
}
|
|
2703
2757
|
);
|
|
2704
|
-
p.identity !==
|
|
2705
|
-
const
|
|
2706
|
-
() =>
|
|
2758
|
+
p.identity !== te && await b.data?.find((S) => S.id === p.identity)?.authorizeRequest(U);
|
|
2759
|
+
const we = setTimeout(
|
|
2760
|
+
() => ce(!0),
|
|
2707
2761
|
3210
|
|
2708
2762
|
);
|
|
2709
|
-
|
|
2710
|
-
clearTimeout(
|
|
2763
|
+
Q.current = new AbortController(), Q.current.signal.addEventListener("abort", () => {
|
|
2764
|
+
clearTimeout(we);
|
|
2711
2765
|
});
|
|
2712
2766
|
try {
|
|
2713
|
-
const S = await fetch(
|
|
2767
|
+
const S = await fetch(U, {
|
|
2714
2768
|
cache: "no-store",
|
|
2715
|
-
signal:
|
|
2769
|
+
signal: Q.current.signal
|
|
2716
2770
|
});
|
|
2717
|
-
clearTimeout(
|
|
2718
|
-
const
|
|
2719
|
-
let
|
|
2720
|
-
|
|
2721
|
-
const
|
|
2771
|
+
clearTimeout(we), ce(!1);
|
|
2772
|
+
const hn = performance.now() - W, fn = new URL(U.url), Ke = Array.from(S.headers.entries()), et = S.headers.get("content-type") || "", tt = Or(et);
|
|
2773
|
+
let de = "", nt, st;
|
|
2774
|
+
tt ? (nt = await S.blob(), st = Pr(Ke, U.url), de = `Binary content (${et})`) : de = await S.text();
|
|
2775
|
+
const rt = S.headers.get("content-length");
|
|
2722
2776
|
return {
|
|
2723
2777
|
status: S.status,
|
|
2724
|
-
headers:
|
|
2725
|
-
size:
|
|
2726
|
-
body:
|
|
2727
|
-
time:
|
|
2728
|
-
isBinary:
|
|
2729
|
-
fileName:
|
|
2730
|
-
blob:
|
|
2778
|
+
headers: Ke,
|
|
2779
|
+
size: rt ? Number(rt) : de.length,
|
|
2780
|
+
body: de,
|
|
2781
|
+
time: hn,
|
|
2782
|
+
isBinary: tt,
|
|
2783
|
+
fileName: st,
|
|
2784
|
+
blob: nt,
|
|
2731
2785
|
request: {
|
|
2732
|
-
method:
|
|
2733
|
-
url:
|
|
2786
|
+
method: U.method.toUpperCase(),
|
|
2787
|
+
url: U.url,
|
|
2734
2788
|
headers: [
|
|
2735
|
-
["Host",
|
|
2789
|
+
["Host", fn.host],
|
|
2736
2790
|
["User-Agent", "Zudoku Playground"],
|
|
2737
|
-
...Array.from(
|
|
2791
|
+
...Array.from(U.headers.entries())
|
|
2738
2792
|
],
|
|
2739
2793
|
body: p.body ? p.body : void 0
|
|
2740
2794
|
}
|
|
2741
2795
|
};
|
|
2742
2796
|
} catch (S) {
|
|
2743
|
-
throw clearTimeout(
|
|
2797
|
+
throw clearTimeout(we), ce(!1), S instanceof TypeError ? new Error(
|
|
2744
2798
|
"The request failed, possibly due to network issues or CORS policy."
|
|
2745
2799
|
) : S;
|
|
2746
2800
|
}
|
|
2747
2801
|
}
|
|
2748
|
-
}),
|
|
2749
|
-
|
|
2750
|
-
const p = setTimeout(() =>
|
|
2802
|
+
}), Ze = B.isPending, [rn, an] = A(!1);
|
|
2803
|
+
F(() => {
|
|
2804
|
+
const p = setTimeout(() => an(Ze), 100);
|
|
2751
2805
|
return () => clearTimeout(p);
|
|
2752
|
-
}, [
|
|
2753
|
-
const { isFinished:
|
|
2754
|
-
|
|
2755
|
-
|
|
2806
|
+
}, [Ze]);
|
|
2807
|
+
const { isFinished: on, progress: cn } = ts({ isAnimating: rn });
|
|
2808
|
+
F(() => () => {
|
|
2809
|
+
Q.current?.abort();
|
|
2756
2810
|
}, []);
|
|
2757
|
-
const
|
|
2758
|
-
|
|
2811
|
+
const ln = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
|
|
2812
|
+
St,
|
|
2759
2813
|
{
|
|
2760
2814
|
onValueChange: (p) => {
|
|
2761
2815
|
j(() => m(p));
|
|
2762
2816
|
},
|
|
2763
|
-
value:
|
|
2764
|
-
defaultValue:
|
|
2817
|
+
value: x,
|
|
2818
|
+
defaultValue: x,
|
|
2765
2819
|
children: [
|
|
2766
|
-
/* @__PURE__ */ n.jsx(
|
|
2767
|
-
/* @__PURE__ */ n.jsx(
|
|
2820
|
+
/* @__PURE__ */ n.jsx(Tt, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(At, {}) }),
|
|
2821
|
+
/* @__PURE__ */ n.jsx(Ot, { children: t.map((p) => /* @__PURE__ */ n.jsx(pe, { value: p, children: p.replace(/^https?:\/\//, "").replace(/\/$/, "") }, p)) })
|
|
2768
2822
|
]
|
|
2769
2823
|
}
|
|
2770
|
-
) }),
|
|
2824
|
+
) }), dn = u && !L && !z, un = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2771
2825
|
a.toUpperCase()
|
|
2772
|
-
), [
|
|
2826
|
+
), [Ye, mn] = us();
|
|
2773
2827
|
return /* @__PURE__ */ n.jsx(
|
|
2774
|
-
|
|
2828
|
+
cs,
|
|
2775
2829
|
{
|
|
2776
|
-
register:
|
|
2777
|
-
control:
|
|
2778
|
-
handleSubmit:
|
|
2779
|
-
watch:
|
|
2780
|
-
setValue:
|
|
2781
|
-
...
|
|
2782
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2830
|
+
register: nn,
|
|
2831
|
+
control: le,
|
|
2832
|
+
handleSubmit: We,
|
|
2833
|
+
watch: Xe,
|
|
2834
|
+
setValue: Ce,
|
|
2835
|
+
...Ne,
|
|
2836
|
+
children: /* @__PURE__ */ n.jsx(ds, { delayDuration: 150, children: /* @__PURE__ */ n.jsxs(
|
|
2783
2837
|
"form",
|
|
2784
2838
|
{
|
|
2785
|
-
ref:
|
|
2786
|
-
onSubmit:
|
|
2787
|
-
b.data?.length === 0 || p.identity ?
|
|
2839
|
+
ref: He,
|
|
2840
|
+
onSubmit: We((p) => {
|
|
2841
|
+
b.data?.length === 0 || p.identity ? B.mutate(p) : y(!0);
|
|
2788
2842
|
}),
|
|
2789
2843
|
className: "relative",
|
|
2790
2844
|
children: [
|
|
2791
2845
|
/* @__PURE__ */ n.jsx(
|
|
2792
|
-
|
|
2846
|
+
Ir,
|
|
2793
2847
|
{
|
|
2794
2848
|
identities: b.data ?? [],
|
|
2795
2849
|
open: v,
|
|
2796
2850
|
onOpenChange: y,
|
|
2797
|
-
onSubmit: ({ rememberedIdentity: p, identity:
|
|
2798
|
-
p &&
|
|
2851
|
+
onSubmit: ({ rememberedIdentity: p, identity: W }) => {
|
|
2852
|
+
p && Ce("identity", W ?? te), y(!1), B.mutate({ ...Ne.getValues(), identity: W });
|
|
2799
2853
|
}
|
|
2800
2854
|
}
|
|
2801
2855
|
),
|
|
2802
2856
|
/* @__PURE__ */ n.jsx(
|
|
2803
|
-
|
|
2857
|
+
Vr,
|
|
2804
2858
|
{
|
|
2805
|
-
open:
|
|
2806
|
-
setOpen: (p) =>
|
|
2859
|
+
open: dn,
|
|
2860
|
+
setOpen: (p) => {
|
|
2861
|
+
p || E(!0);
|
|
2862
|
+
},
|
|
2863
|
+
onSkip: (p) => {
|
|
2864
|
+
E(!0), p && w(!0);
|
|
2865
|
+
},
|
|
2807
2866
|
onSignUp: h,
|
|
2808
2867
|
onLogin: d
|
|
2809
2868
|
}
|
|
@@ -2813,20 +2872,20 @@ const Wr = (e) => Object.entries({
|
|
|
2813
2872
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
2814
2873
|
/* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
2815
2874
|
/* @__PURE__ */ n.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
|
|
2816
|
-
|
|
2817
|
-
/* @__PURE__ */ n.jsx(
|
|
2818
|
-
/* @__PURE__ */ n.jsx(
|
|
2875
|
+
ln,
|
|
2876
|
+
/* @__PURE__ */ n.jsx(Ur, { url: s }),
|
|
2877
|
+
/* @__PURE__ */ n.jsx(Mr, {})
|
|
2819
2878
|
] }) }),
|
|
2820
2879
|
/* @__PURE__ */ n.jsx("div", { className: "px-1", children: /* @__PURE__ */ n.jsx(
|
|
2821
|
-
|
|
2880
|
+
R,
|
|
2822
2881
|
{
|
|
2823
2882
|
type: "button",
|
|
2824
2883
|
onClick: () => {
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
e ??
|
|
2884
|
+
mn(
|
|
2885
|
+
ht(
|
|
2886
|
+
e ?? x,
|
|
2828
2887
|
s,
|
|
2829
|
-
|
|
2888
|
+
Ne.getValues()
|
|
2830
2889
|
).toString()
|
|
2831
2890
|
);
|
|
2832
2891
|
},
|
|
@@ -2834,79 +2893,79 @@ const Wr = (e) => Object.entries({
|
|
|
2834
2893
|
size: "icon-xs",
|
|
2835
2894
|
className: C(
|
|
2836
2895
|
"hover:opacity-100 transition",
|
|
2837
|
-
|
|
2896
|
+
Ye ? "text-emerald-600 opacity-100" : "opacity-50"
|
|
2838
2897
|
),
|
|
2839
|
-
children:
|
|
2898
|
+
children: Ye ? /* @__PURE__ */ n.jsx(Rn, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ n.jsx(En, { size: 14 })
|
|
2840
2899
|
}
|
|
2841
2900
|
) })
|
|
2842
2901
|
] }),
|
|
2843
2902
|
/* @__PURE__ */ n.jsx(
|
|
2844
|
-
|
|
2903
|
+
R,
|
|
2845
2904
|
{
|
|
2846
2905
|
type: "submit",
|
|
2847
|
-
variant:
|
|
2906
|
+
variant: B.isPending ? "destructive" : "default",
|
|
2848
2907
|
onClick: (p) => {
|
|
2849
|
-
|
|
2908
|
+
B.isPending && (Q.current?.abort(
|
|
2850
2909
|
"Request cancelled by user"
|
|
2851
2910
|
), p.preventDefault());
|
|
2852
2911
|
},
|
|
2853
2912
|
className: "w-18",
|
|
2854
|
-
children:
|
|
2913
|
+
children: B.isPending ? "Cancel" : "Send"
|
|
2855
2914
|
}
|
|
2856
2915
|
)
|
|
2857
2916
|
] }),
|
|
2858
2917
|
/* @__PURE__ */ n.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
|
|
2859
|
-
b.data?.length !== 0 && /* @__PURE__ */ n.jsxs(
|
|
2860
|
-
/* @__PURE__ */ n.jsxs(
|
|
2861
|
-
/* @__PURE__ */ n.jsx(
|
|
2862
|
-
/* @__PURE__ */ n.jsx(
|
|
2918
|
+
b.data?.length !== 0 && /* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
2919
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
2920
|
+
/* @__PURE__ */ n.jsx(kn, { size: 16 }),
|
|
2921
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-2", children: "Authentication" })
|
|
2863
2922
|
] }),
|
|
2864
|
-
/* @__PURE__ */ n.jsx(
|
|
2865
|
-
|
|
2923
|
+
/* @__PURE__ */ n.jsx(D, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
|
|
2924
|
+
Gt,
|
|
2866
2925
|
{
|
|
2867
|
-
value:
|
|
2926
|
+
value: J,
|
|
2868
2927
|
identities: b.data ?? [],
|
|
2869
|
-
setValue: (p) =>
|
|
2928
|
+
setValue: (p) => Ce("identity", p)
|
|
2870
2929
|
}
|
|
2871
2930
|
) })
|
|
2872
2931
|
] }),
|
|
2873
|
-
|
|
2874
|
-
/* @__PURE__ */ n.jsxs(
|
|
2875
|
-
/* @__PURE__ */ n.jsx(
|
|
2876
|
-
/* @__PURE__ */ n.jsx(
|
|
2932
|
+
Je.length > 0 && /* @__PURE__ */ n.jsxs(I, { defaultOpen: !0, children: [
|
|
2933
|
+
/* @__PURE__ */ n.jsxs(G, { children: [
|
|
2934
|
+
/* @__PURE__ */ n.jsx(In, { size: 16 }),
|
|
2935
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-2", children: "Path Parameters" })
|
|
2877
2936
|
] }),
|
|
2878
|
-
/* @__PURE__ */ n.jsx(
|
|
2937
|
+
/* @__PURE__ */ n.jsx(D, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(zr, { url: s, control: le }) })
|
|
2879
2938
|
] }),
|
|
2880
|
-
/* @__PURE__ */ n.jsx(
|
|
2939
|
+
/* @__PURE__ */ n.jsx(qr, { control: le, schemaQueryParams: o }),
|
|
2881
2940
|
/* @__PURE__ */ n.jsx(
|
|
2882
2941
|
Er,
|
|
2883
2942
|
{
|
|
2884
|
-
control:
|
|
2943
|
+
control: le,
|
|
2885
2944
|
schemaHeaders: r,
|
|
2886
|
-
lockedHeaders:
|
|
2945
|
+
lockedHeaders: sn?.headers
|
|
2887
2946
|
}
|
|
2888
2947
|
),
|
|
2889
|
-
|
|
2948
|
+
un && /* @__PURE__ */ n.jsx(Ar, { content: c })
|
|
2890
2949
|
] }),
|
|
2891
2950
|
/* @__PURE__ */ n.jsx("div", { className: "w-full bg-muted-foreground/20" }),
|
|
2892
2951
|
/* @__PURE__ */ n.jsx(
|
|
2893
|
-
|
|
2952
|
+
ta,
|
|
2894
2953
|
{
|
|
2895
|
-
queryMutation:
|
|
2896
|
-
showLongRunningWarning:
|
|
2897
|
-
isFinished:
|
|
2898
|
-
progress:
|
|
2954
|
+
queryMutation: B,
|
|
2955
|
+
showLongRunningWarning: en,
|
|
2956
|
+
isFinished: on,
|
|
2957
|
+
progress: cn,
|
|
2899
2958
|
tip: /* @__PURE__ */ n.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ n.jsxs("span", { className: "text-muted-foreground", children: [
|
|
2900
2959
|
"Press",
|
|
2901
2960
|
" ",
|
|
2902
|
-
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children:
|
|
2961
|
+
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children: tn.join(" + ") }),
|
|
2903
2962
|
" ",
|
|
2904
2963
|
"to send a request"
|
|
2905
2964
|
] }) }),
|
|
2906
2965
|
onCancel: () => {
|
|
2907
|
-
|
|
2966
|
+
Q.current?.abort(
|
|
2908
2967
|
"Request cancelled by the user"
|
|
2909
|
-
),
|
|
2968
|
+
), ce(!1);
|
|
2910
2969
|
}
|
|
2911
2970
|
}
|
|
2912
2971
|
)
|
|
@@ -2938,9 +2997,9 @@ const Wr = (e) => Object.entries({
|
|
|
2938
2997
|
)
|
|
2939
2998
|
}
|
|
2940
2999
|
), ra = (e) => {
|
|
2941
|
-
const [t, s] =
|
|
2942
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2943
|
-
/* @__PURE__ */ n.jsx(
|
|
3000
|
+
const [t, s] = A(!1), { isAuthEnabled: a, login: r, signup: o, isPending: i, isAuthenticated: l } = Yn();
|
|
3001
|
+
return /* @__PURE__ */ n.jsxs(De, { onOpenChange: (c) => s(c), children: [
|
|
3002
|
+
/* @__PURE__ */ n.jsx(Kn, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
|
|
2944
3003
|
"button",
|
|
2945
3004
|
{
|
|
2946
3005
|
type: "button",
|
|
@@ -2952,13 +3011,13 @@ const Wr = (e) => Object.entries({
|
|
|
2952
3011
|
}
|
|
2953
3012
|
) }),
|
|
2954
3013
|
/* @__PURE__ */ n.jsxs(
|
|
2955
|
-
|
|
3014
|
+
ze,
|
|
2956
3015
|
{
|
|
2957
3016
|
className: "max-w-screen-xl! w-full overflow-hidden p-0",
|
|
2958
3017
|
"aria-describedby": void 0,
|
|
2959
3018
|
showCloseButton: !0,
|
|
2960
3019
|
children: [
|
|
2961
|
-
/* @__PURE__ */ n.jsx(
|
|
3020
|
+
/* @__PURE__ */ n.jsx(Zn, { children: /* @__PURE__ */ n.jsx(Fe, { children: "Playground" }) }),
|
|
2962
3021
|
t && /* @__PURE__ */ n.jsx(
|
|
2963
3022
|
na,
|
|
2964
3023
|
{
|
|
@@ -2980,7 +3039,7 @@ const Wr = (e) => Object.entries({
|
|
|
2980
3039
|
patch: "purple",
|
|
2981
3040
|
options: "gray",
|
|
2982
3041
|
head: "gray"
|
|
2983
|
-
},
|
|
3042
|
+
}, xt = ({
|
|
2984
3043
|
label: e,
|
|
2985
3044
|
path: t,
|
|
2986
3045
|
operations: s,
|
|
@@ -3008,17 +3067,17 @@ const Wr = (e) => Object.entries({
|
|
|
3008
3067
|
invert: !0
|
|
3009
3068
|
}
|
|
3010
3069
|
}))
|
|
3011
|
-
}),
|
|
3070
|
+
}), Wt = bt(
|
|
3012
3071
|
void 0
|
|
3013
|
-
),
|
|
3014
|
-
const e =
|
|
3072
|
+
), _a = Wt.Provider, oa = () => {
|
|
3073
|
+
const e = Xn(Wt);
|
|
3015
3074
|
if (!e)
|
|
3016
3075
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
3017
3076
|
return e.config;
|
|
3018
|
-
},
|
|
3077
|
+
}, gt = (e) => ({
|
|
3019
3078
|
path: e.routePath,
|
|
3020
3079
|
async lazy() {
|
|
3021
|
-
const { OasProvider: t } = await import("./OasProvider-
|
|
3080
|
+
const { OasProvider: t } = await import("./OasProvider-Bf5zBDBY.js");
|
|
3022
3081
|
return {
|
|
3023
3082
|
element: /* @__PURE__ */ n.jsx(
|
|
3024
3083
|
t,
|
|
@@ -3032,28 +3091,28 @@ const Wr = (e) => Object.entries({
|
|
|
3032
3091
|
};
|
|
3033
3092
|
},
|
|
3034
3093
|
children: e.routes
|
|
3035
|
-
}),
|
|
3094
|
+
}), Xt = ({
|
|
3036
3095
|
path: e,
|
|
3037
3096
|
tag: t,
|
|
3038
3097
|
untagged: s
|
|
3039
3098
|
}) => ({
|
|
3040
3099
|
path: e,
|
|
3041
3100
|
async lazy() {
|
|
3042
|
-
const { OperationList: a } = await import("./OperationList-
|
|
3101
|
+
const { OperationList: a } = await import("./OperationList-Cmiw1xm2.js");
|
|
3043
3102
|
return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
|
|
3044
3103
|
}
|
|
3045
3104
|
}), ia = ({
|
|
3046
3105
|
render: e,
|
|
3047
3106
|
path: t
|
|
3048
3107
|
}) => {
|
|
3049
|
-
const { type: s, input: a } = oa(), { tag: r } =
|
|
3108
|
+
const { type: s, input: a } = oa(), { tag: r } = Fn(), o = qn(), i = dr(Kt, { type: s, input: a }), {
|
|
3050
3109
|
data: { schema: l }
|
|
3051
|
-
} =
|
|
3110
|
+
} = Gn(i), c = l.tags.at(0);
|
|
3052
3111
|
return !r && c?.slug ? /* @__PURE__ */ n.jsx(
|
|
3053
|
-
|
|
3112
|
+
Vn,
|
|
3054
3113
|
{
|
|
3055
3114
|
to: {
|
|
3056
|
-
pathname:
|
|
3115
|
+
pathname: _n(t, { tag: c.slug }),
|
|
3057
3116
|
search: o.search
|
|
3058
3117
|
}
|
|
3059
3118
|
}
|
|
@@ -3061,7 +3120,7 @@ const Wr = (e) => Object.entries({
|
|
|
3061
3120
|
}, ca = ({ path: e }) => ({
|
|
3062
3121
|
path: e,
|
|
3063
3122
|
async lazy() {
|
|
3064
|
-
const { OperationList: t } = await import("./OperationList-
|
|
3123
|
+
const { OperationList: t } = await import("./OperationList-Cmiw1xm2.js");
|
|
3065
3124
|
return {
|
|
3066
3125
|
element: /* @__PURE__ */ n.jsx(
|
|
3067
3126
|
ia,
|
|
@@ -3072,35 +3131,35 @@ const Wr = (e) => Object.entries({
|
|
|
3072
3131
|
)
|
|
3073
3132
|
};
|
|
3074
3133
|
}
|
|
3075
|
-
}),
|
|
3134
|
+
}), Zt = (e) => [
|
|
3076
3135
|
// Category without tagged operations
|
|
3077
|
-
|
|
3078
|
-
path:
|
|
3136
|
+
Xt({
|
|
3137
|
+
path: k(e, Me),
|
|
3079
3138
|
untagged: !0
|
|
3080
3139
|
}),
|
|
3081
3140
|
// Schema list route
|
|
3082
3141
|
{
|
|
3083
|
-
path:
|
|
3142
|
+
path: k(e, "~schemas"),
|
|
3084
3143
|
lazy: async () => {
|
|
3085
|
-
const { SchemaList: t } = await import("./SchemaList-
|
|
3144
|
+
const { SchemaList: t } = await import("./SchemaList-xZSf3IMh.js");
|
|
3086
3145
|
return { element: /* @__PURE__ */ n.jsx(t, {}) };
|
|
3087
3146
|
}
|
|
3088
3147
|
}
|
|
3089
3148
|
], la = (e, t) => {
|
|
3090
|
-
const s =
|
|
3149
|
+
const s = k(e, t.at(0) ?? Me);
|
|
3091
3150
|
return [
|
|
3092
3151
|
// Redirect to first tag on the index route
|
|
3093
|
-
{ index: !0, loader: () =>
|
|
3152
|
+
{ index: !0, loader: () => zn(s) },
|
|
3094
3153
|
// Create routes for each tag
|
|
3095
3154
|
...t.map(
|
|
3096
|
-
(a) =>
|
|
3097
|
-
path:
|
|
3155
|
+
(a) => Xt({
|
|
3156
|
+
path: k(e, a),
|
|
3098
3157
|
tag: a
|
|
3099
3158
|
})
|
|
3100
3159
|
),
|
|
3101
|
-
...
|
|
3160
|
+
...Zt(e)
|
|
3102
3161
|
];
|
|
3103
|
-
},
|
|
3162
|
+
}, Yt = (e) => e.type === "file" ? Object.keys(e.input) : [], da = ({
|
|
3104
3163
|
basePath: e,
|
|
3105
3164
|
config: t,
|
|
3106
3165
|
client: s
|
|
@@ -3108,21 +3167,21 @@ const Wr = (e) => Object.entries({
|
|
|
3108
3167
|
const a = t.tagPages;
|
|
3109
3168
|
if (!a)
|
|
3110
3169
|
return [
|
|
3111
|
-
|
|
3170
|
+
gt({
|
|
3112
3171
|
basePath: e,
|
|
3113
3172
|
routePath: e,
|
|
3114
3173
|
routes: [
|
|
3115
3174
|
ca({ path: `${e}/:tag?` }),
|
|
3116
|
-
...
|
|
3175
|
+
...Zt(e)
|
|
3117
3176
|
],
|
|
3118
3177
|
client: s,
|
|
3119
3178
|
config: t
|
|
3120
3179
|
})
|
|
3121
3180
|
];
|
|
3122
|
-
const r =
|
|
3181
|
+
const r = Yt(t);
|
|
3123
3182
|
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3124
|
-
const l =
|
|
3125
|
-
return
|
|
3183
|
+
const l = k(e, i);
|
|
3184
|
+
return gt({
|
|
3126
3185
|
basePath: e,
|
|
3127
3186
|
version: i,
|
|
3128
3187
|
routePath: l,
|
|
@@ -3131,7 +3190,7 @@ const Wr = (e) => Object.entries({
|
|
|
3131
3190
|
config: t
|
|
3132
3191
|
});
|
|
3133
3192
|
});
|
|
3134
|
-
},
|
|
3193
|
+
}, Kt = vr(`
|
|
3135
3194
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3136
3195
|
schema(input: $input, type: $type) {
|
|
3137
3196
|
extensions
|
|
@@ -3154,8 +3213,8 @@ const Wr = (e) => Object.entries({
|
|
|
3154
3213
|
}
|
|
3155
3214
|
}
|
|
3156
3215
|
}
|
|
3157
|
-
`),
|
|
3158
|
-
const t =
|
|
3216
|
+
`), Me = "~endpoints", Ba = (e) => {
|
|
3217
|
+
const t = k(e.path), s = new $s(e);
|
|
3159
3218
|
return {
|
|
3160
3219
|
getHead: () => {
|
|
3161
3220
|
if (e.type === "url" && !e.skipPreload)
|
|
@@ -3173,61 +3232,48 @@ const Wr = (e) => Object.entries({
|
|
|
3173
3232
|
},
|
|
3174
3233
|
getMdxComponents: () => ({
|
|
3175
3234
|
OpenPlaygroundButton: ({
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
...c
|
|
3235
|
+
server: a,
|
|
3236
|
+
method: r = "get",
|
|
3237
|
+
url: o = "/",
|
|
3238
|
+
children: i,
|
|
3239
|
+
...l
|
|
3182
3240
|
}) => {
|
|
3183
|
-
|
|
3184
|
-
if (!r)
|
|
3241
|
+
if (!a)
|
|
3185
3242
|
throw new Error("Server is required");
|
|
3186
|
-
return
|
|
3187
|
-
ee,
|
|
3188
|
-
{
|
|
3189
|
-
className: "gap-2 items-center",
|
|
3190
|
-
variant: "outline",
|
|
3191
|
-
onClick: u.login,
|
|
3192
|
-
children: [
|
|
3193
|
-
"Login to open in Playground ",
|
|
3194
|
-
/* @__PURE__ */ n.jsx(En, { size: 16 })
|
|
3195
|
-
]
|
|
3196
|
-
}
|
|
3197
|
-
) : /* @__PURE__ */ n.jsx(
|
|
3243
|
+
return /* @__PURE__ */ n.jsx(
|
|
3198
3244
|
ra,
|
|
3199
3245
|
{
|
|
3200
|
-
url:
|
|
3201
|
-
method:
|
|
3202
|
-
server:
|
|
3203
|
-
...
|
|
3204
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3205
|
-
"Open in Playground
|
|
3206
|
-
/* @__PURE__ */ n.jsx(
|
|
3246
|
+
url: o,
|
|
3247
|
+
method: r,
|
|
3248
|
+
server: a,
|
|
3249
|
+
...l,
|
|
3250
|
+
children: /* @__PURE__ */ n.jsx(he, { className: "gap-2 items-center", variant: "outline", children: i ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3251
|
+
"Open in Playground",
|
|
3252
|
+
/* @__PURE__ */ n.jsx(Dn, { size: 16 })
|
|
3207
3253
|
] }) })
|
|
3208
3254
|
}
|
|
3209
3255
|
);
|
|
3210
3256
|
}
|
|
3211
3257
|
}),
|
|
3212
3258
|
getNavigation: async (a, r) => {
|
|
3213
|
-
if (!
|
|
3259
|
+
if (!ot({ path: t, end: !1 }, a))
|
|
3214
3260
|
return [];
|
|
3215
|
-
const o =
|
|
3261
|
+
const o = ot(
|
|
3216
3262
|
{ path: `${t}/:version?/:tag`, end: !0 },
|
|
3217
3263
|
a
|
|
3218
3264
|
);
|
|
3219
3265
|
try {
|
|
3220
|
-
const i = o?.params.version, l = i ??
|
|
3266
|
+
const i = o?.params.version, l = i ?? Yt(e).at(0), { type: c } = e, u = c === "file" ? e.input[l] : e.input, d = Vt(s, Kt, {
|
|
3221
3267
|
type: c,
|
|
3222
3268
|
input: u
|
|
3223
|
-
}), h = await r.queryClient.ensureQueryData(d),
|
|
3269
|
+
}), h = await r.queryClient.ensureQueryData(d), x = new Map(
|
|
3224
3270
|
h.schema.tags.filter((f) => f.name && f.operations.length > 0).map((f) => {
|
|
3225
3271
|
if (!f.name)
|
|
3226
3272
|
throw new Error(`Tag ${f.slug} has no name`);
|
|
3227
|
-
const j =
|
|
3273
|
+
const j = k(t, i, f.slug), L = f.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, w = f.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3228
3274
|
return [
|
|
3229
3275
|
f.name,
|
|
3230
|
-
|
|
3276
|
+
xt({
|
|
3231
3277
|
label: f.extensions?.["x-displayName"] ?? f.name,
|
|
3232
3278
|
path: j,
|
|
3233
3279
|
operations: f.operations,
|
|
@@ -3238,12 +3284,12 @@ const Wr = (e) => Object.entries({
|
|
|
3238
3284
|
})
|
|
3239
3285
|
), m = h.schema.extensions?.["x-tagGroups"] ?? [], v = new Set(
|
|
3240
3286
|
m.flatMap(
|
|
3241
|
-
(f) => f.tags.filter((j) =>
|
|
3287
|
+
(f) => f.tags.filter((j) => x.has(j))
|
|
3242
3288
|
)
|
|
3243
3289
|
), b = [
|
|
3244
3290
|
...m.flatMap(
|
|
3245
3291
|
(f) => {
|
|
3246
|
-
const j = f.tags.map((L) =>
|
|
3292
|
+
const j = f.tags.map((L) => x.get(L)).filter(Boolean);
|
|
3247
3293
|
return j.length === 0 ? [] : [
|
|
3248
3294
|
{
|
|
3249
3295
|
type: "category",
|
|
@@ -3255,21 +3301,21 @@ const Wr = (e) => Object.entries({
|
|
|
3255
3301
|
];
|
|
3256
3302
|
}
|
|
3257
3303
|
),
|
|
3258
|
-
...Array.from(
|
|
3304
|
+
...Array.from(x.entries()).filter(([f]) => !v.has(f)).map(([, f]) => f)
|
|
3259
3305
|
], T = h.schema.tags.find(
|
|
3260
3306
|
(f) => !f.name
|
|
3261
3307
|
)?.operations;
|
|
3262
3308
|
return T && T.length > 0 && b.push(
|
|
3263
|
-
|
|
3309
|
+
xt({
|
|
3264
3310
|
label: b.length === 0 ? "Endpoints" : "Other endpoints",
|
|
3265
|
-
path:
|
|
3311
|
+
path: k(t, i, Me),
|
|
3266
3312
|
operations: T,
|
|
3267
3313
|
collapsed: !e.options?.expandAllTags
|
|
3268
3314
|
})
|
|
3269
3315
|
), h.schema.components?.schemas?.length && b.push({
|
|
3270
3316
|
type: "link",
|
|
3271
3317
|
label: "Schemas",
|
|
3272
|
-
to:
|
|
3318
|
+
to: k(t, i, "~schemas")
|
|
3273
3319
|
}), b;
|
|
3274
3320
|
} catch {
|
|
3275
3321
|
return [];
|
|
@@ -3279,40 +3325,40 @@ const Wr = (e) => Object.entries({
|
|
|
3279
3325
|
};
|
|
3280
3326
|
};
|
|
3281
3327
|
export {
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3328
|
+
I as C,
|
|
3329
|
+
Va as G,
|
|
3330
|
+
Us as L,
|
|
3331
|
+
_a as O,
|
|
3286
3332
|
ra as P,
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3333
|
+
zs as Q,
|
|
3334
|
+
Ft as S,
|
|
3335
|
+
g as T,
|
|
3336
|
+
Me as U,
|
|
3337
|
+
dr as a,
|
|
3338
|
+
K as b,
|
|
3339
|
+
D as c,
|
|
3340
|
+
Yt as d,
|
|
3341
|
+
Sr as e,
|
|
3342
|
+
Ht as f,
|
|
3343
|
+
vr as g,
|
|
3298
3344
|
Br as h,
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3345
|
+
cr as i,
|
|
3346
|
+
mt as j,
|
|
3347
|
+
Fa as k,
|
|
3348
|
+
Ms as l,
|
|
3349
|
+
_e as m,
|
|
3350
|
+
zt as n,
|
|
3351
|
+
Rs as o,
|
|
3352
|
+
ir as p,
|
|
3353
|
+
Te as q,
|
|
3308
3354
|
Es as r,
|
|
3309
3355
|
P as s,
|
|
3310
|
-
|
|
3356
|
+
qa as t,
|
|
3311
3357
|
oa as u,
|
|
3312
3358
|
Bs as v,
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3359
|
+
qs as w,
|
|
3360
|
+
Et as x,
|
|
3361
|
+
Kt as y,
|
|
3362
|
+
Ba as z
|
|
3317
3363
|
};
|
|
3318
|
-
//# sourceMappingURL=index-
|
|
3364
|
+
//# sourceMappingURL=index-Cr9_YzOZ.js.map
|