zudoku 0.33.2-local.4 → 0.34.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/README.md +121 -0
- package/dist/config/validators/common.d.ts +346 -346
- package/dist/config/validators/validate.d.ts +165 -165
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +4 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +6 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +4 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +75 -24
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +6 -6
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +19 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/lib/{AuthenticationPlugin-BCYuduZ9.js → AuthenticationPlugin-4ip08maU.js} +3 -3
- package/lib/{AuthenticationPlugin-BCYuduZ9.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
- package/lib/Callout-B_sEhkYd.js +211 -0
- package/lib/Callout-B_sEhkYd.js.map +1 -0
- package/lib/{Dialog-mi6BrnrM.js → Dialog-sbgekbjb.js} +48 -33
- package/lib/{Dialog-mi6BrnrM.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/{Markdown-DofXBcqg.js → Markdown-DZXjQjpH.js} +4099 -3848
- package/lib/Markdown-DZXjQjpH.js.map +1 -0
- package/lib/{MdxPage-KJcNWIgt.js → MdxPage-52vRwa_7.js} +13 -13
- package/lib/{MdxPage-KJcNWIgt.js.map → MdxPage-52vRwa_7.js.map} +1 -1
- package/lib/{OasProvider-HcqBeC4H.js → OasProvider-CR2nG1Eg.js} +4 -4
- package/lib/{OasProvider-HcqBeC4H.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
- package/lib/{OperationList-C3wnbFxp.js → OperationList-DndcCJUG.js} +1097 -1052
- package/lib/{OperationList-C3wnbFxp.js.map → OperationList-DndcCJUG.js.map} +1 -1
- package/lib/{Select-Co6MuS4j.js → Select-FAYHOYTy.js} +35 -35
- package/lib/{Select-Co6MuS4j.js.map → Select-FAYHOYTy.js.map} +1 -1
- package/lib/{SlotletProvider-CYFNHuok.js → SlotletProvider-TydSHROc.js} +4 -4
- package/lib/{SlotletProvider-CYFNHuok.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-CRDBmIgK.js → chunk-HA7DTUK3-ZGg2W6yV.js} +276 -276
- package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
- package/lib/{hook-LTe5qHSc.js → hook-CfCFKZ-2.js} +10 -7
- package/lib/{hook-LTe5qHSc.js.map → hook-CfCFKZ-2.js.map} +1 -1
- package/lib/index-DK7IuUyR.js +2201 -0
- package/lib/index-DK7IuUyR.js.map +1 -0
- package/lib/index.esm-CltAN0Tf.js +711 -0
- package/lib/index.esm-CltAN0Tf.js.map +1 -0
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +483 -502
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-D76yras4.js → useExposedProps-BslIn-FE.js} +2 -2
- package/lib/{useExposedProps-D76yras4.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +1390 -32
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +84 -154
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/AnchorLink.tsx +7 -7
- package/src/lib/components/navigation/SidebarItem.tsx +8 -23
- package/src/lib/core/ZudokuContext.ts +4 -0
- package/src/lib/plugins/openapi/OperationList.tsx +73 -33
- package/src/lib/plugins/openapi/OperationListItem.tsx +105 -92
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +164 -133
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +94 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/lib/Command-CrTA1FX0.js +0 -140
- package/lib/Command-CrTA1FX0.js.map +0 -1
- package/lib/Markdown-DofXBcqg.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-CRDBmIgK.js.map +0 -1
- package/lib/index-CtkRMvMw.js +0 -2052
- package/lib/index-CtkRMvMw.js.map +0 -1
- package/lib/index-vn5bsvmU.js +0 -1399
- package/lib/index-vn5bsvmU.js.map +0 -1
- package/lib/useScrollToAnchor-DKyrbZoy.js +0 -977
- package/lib/useScrollToAnchor-DKyrbZoy.js.map +0 -1
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { b as
|
|
3
|
-
import { H as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { a as
|
|
14
|
-
import { VisuallyHidden as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { g as
|
|
19
|
-
import { SyntaxHighlight as
|
|
1
|
+
import { j as h } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
|
+
import { b as xr, k as $r, l as Eo } from "./hook-CfCFKZ-2.js";
|
|
3
|
+
import { H as Ao } from "./index.esm-CltAN0Tf.js";
|
|
4
|
+
import { ChevronsUpDownIcon as to, CheckIcon as Io, CopyIcon as Lo, UnfoldVerticalIcon as Uo, FoldVerticalIcon as Fo, ChevronDownIcon as _o, CircleIcon as Bo, CircleDotIcon as Ho, CircleFadingPlusIcon as Mo, SquareMinusIcon as zo, SquarePlusIcon as Go, ListPlusIcon as Wo, RefreshCcwDotIcon as Jo, ChevronsDownUpIcon as Vo } from "lucide-react";
|
|
5
|
+
import { b as Do, a as Qo } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
|
|
6
|
+
import { a as rt, C as ro, b as no, c as oo, d as yr, P as Ko, m as ao, e as Yo } from "./index-DK7IuUyR.js";
|
|
7
|
+
import { S as Xo, a as Zo, b as ea, c as ta, e as ra } from "./Select-FAYHOYTy.js";
|
|
8
|
+
import { C as na } from "./CategoryHeading-DpB47wvk.js";
|
|
9
|
+
import { I as oa, M as Ne, H as Be, P as Le } from "./Markdown-DZXjQjpH.js";
|
|
10
|
+
import { c as se } from "./cn-qaFjX9_3.js";
|
|
11
|
+
import { useContext as aa, useTransition as io, useState as ge, useRef as jr, useEffect as wr, useLayoutEffect as ia, useMemo as so, useCallback as sa } from "react";
|
|
12
|
+
import { Button as lo } from "./ui/Button.js";
|
|
13
|
+
import { a as la, u as Sr } from "./context-DLCwaMXN.js";
|
|
14
|
+
import { VisuallyHidden as mr } from "@radix-ui/react-visually-hidden";
|
|
15
|
+
import { c as ca } from "./index-CPNSgwSb.js";
|
|
16
|
+
import { Tabs as ua, TabsList as fa, TabsTrigger as pa, TabsContent as da } from "./ui/Tabs.js";
|
|
17
|
+
import { Card as be, CardHeader as ha, CardTitle as ya, CardContent as ma } from "./ui/Card.js";
|
|
18
|
+
import { g as ga, c as Ze, a as va } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
19
|
+
import { SyntaxHighlight as co } from "./ui/SyntaxHighlight.js";
|
|
20
20
|
import { B as Hr } from "./Spinner-1KrEmx1V.js";
|
|
21
|
-
import {
|
|
21
|
+
import { useAuth as ba } from "./zudoku.components.js";
|
|
22
22
|
import * as Ye from "@radix-ui/react-tabs";
|
|
23
23
|
import * as xe from "@radix-ui/react-collapsible";
|
|
24
|
-
import {
|
|
25
|
-
|
|
24
|
+
import { o as xa } from "./objectEntries-BS7aAgOm.js";
|
|
25
|
+
import { C as $a } from "./circular-v7K6lDDh.js";
|
|
26
|
+
function ja(e, r) {
|
|
26
27
|
return r;
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
const t =
|
|
29
|
+
const Or = (e, ...r) => {
|
|
30
|
+
const t = aa(la);
|
|
30
31
|
if (t === void 0)
|
|
31
32
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
32
33
|
return {
|
|
@@ -39,31 +40,31 @@ const Sr = (e, ...r) => {
|
|
|
39
40
|
className: t,
|
|
40
41
|
options: o,
|
|
41
42
|
showChevrons: i = !0
|
|
42
|
-
}) => /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
}) => /* @__PURE__ */ h.jsxs("div", { className: "grid", children: [
|
|
44
|
+
/* @__PURE__ */ h.jsx(
|
|
44
45
|
"select",
|
|
45
46
|
{
|
|
46
|
-
className:
|
|
47
|
+
className: se(
|
|
47
48
|
"row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
|
|
48
49
|
"rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
|
|
49
50
|
t
|
|
50
51
|
),
|
|
51
52
|
value: e,
|
|
52
53
|
onChange: r,
|
|
53
|
-
children: o.map((l) => /* @__PURE__ */
|
|
54
|
+
children: o.map((l) => /* @__PURE__ */ h.jsx("option", { value: l.value, children: l.label }, l.value))
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ h.jsx(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
|
-
className:
|
|
60
|
+
className: se(
|
|
60
61
|
!i && "hidden",
|
|
61
62
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
62
63
|
),
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ h.jsx(to, { size: 14 })
|
|
64
65
|
}
|
|
65
66
|
)
|
|
66
|
-
] }),
|
|
67
|
+
] }), wa = rt(
|
|
67
68
|
/* GraphQL */
|
|
68
69
|
`
|
|
69
70
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -77,8 +78,8 @@ const Sr = (e, ...r) => {
|
|
|
77
78
|
`
|
|
78
79
|
), Mr = ({ url: e }) => {
|
|
79
80
|
const [r, t] = ge(!1);
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
81
|
+
return /* @__PURE__ */ h.jsx(
|
|
82
|
+
lo,
|
|
82
83
|
{
|
|
83
84
|
onClick: () => {
|
|
84
85
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -87,22 +88,22 @@ const Sr = (e, ...r) => {
|
|
|
87
88
|
},
|
|
88
89
|
variant: "ghost",
|
|
89
90
|
size: "icon",
|
|
90
|
-
children: r ? /* @__PURE__ */
|
|
91
|
+
children: r ? /* @__PURE__ */ h.jsx(Io, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ h.jsx(Lo, { size: 14, strokeWidth: 1.3 })
|
|
91
92
|
}
|
|
92
93
|
);
|
|
93
|
-
},
|
|
94
|
-
const { input: e, type: r } =
|
|
94
|
+
}, Sa = () => {
|
|
95
|
+
const { input: e, type: r } = Sr(), t = Or(wa, { input: e, type: r }), o = xr(t), [, i] = io(), { selectedServer: l, setSelectedServer: n } = $r(
|
|
95
96
|
o.data.schema.servers
|
|
96
97
|
), { servers: a } = o.data.schema;
|
|
97
98
|
if (a.length === 0) return null;
|
|
98
99
|
const s = a.at(0);
|
|
99
|
-
return a.length === 1 ? /* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
] }) : /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
100
|
+
return a.length === 1 ? /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
101
|
+
/* @__PURE__ */ h.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
102
|
+
/* @__PURE__ */ h.jsx(oa, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: s.url }),
|
|
103
|
+
/* @__PURE__ */ h.jsx(Mr, { url: s.url })
|
|
104
|
+
] }) : /* @__PURE__ */ h.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
105
|
+
/* @__PURE__ */ h.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
106
|
+
/* @__PURE__ */ h.jsx(
|
|
106
107
|
et,
|
|
107
108
|
{
|
|
108
109
|
className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
|
|
@@ -115,15 +116,9 @@ const Sr = (e, ...r) => {
|
|
|
115
116
|
}))
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ h.jsx(Mr, { url: l })
|
|
119
120
|
] });
|
|
120
|
-
},
|
|
121
|
-
(t, o) => {
|
|
122
|
-
const i = r(o);
|
|
123
|
-
return t[i] || (t[i] = []), t[i].push(o), t;
|
|
124
|
-
},
|
|
125
|
-
{}
|
|
126
|
-
), Sa = (e, r) => e ? r(e) : void 0, Oa = ya(
|
|
121
|
+
}, Oa = ca(
|
|
127
122
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
128
123
|
{
|
|
129
124
|
variants: {
|
|
@@ -140,21 +135,27 @@ const Sr = (e, ...r) => {
|
|
|
140
135
|
}
|
|
141
136
|
}
|
|
142
137
|
);
|
|
143
|
-
function
|
|
144
|
-
return /* @__PURE__ */
|
|
138
|
+
function we({ className: e, variant: r, ...t }) {
|
|
139
|
+
return /* @__PURE__ */ h.jsx("div", { className: se(Oa({ variant: r }), e), ...t });
|
|
145
140
|
}
|
|
146
|
-
const
|
|
141
|
+
const uo = (e, r) => e.reduce(
|
|
142
|
+
(t, o) => {
|
|
143
|
+
const i = r(o);
|
|
144
|
+
return t[i] || (t[i] = []), t[i].push(o), t;
|
|
145
|
+
},
|
|
146
|
+
{}
|
|
147
|
+
), Ta = (e, r) => e ? r(e) : void 0, Pa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
147
148
|
type: "string"
|
|
148
|
-
},
|
|
149
|
+
}, Ca = ({
|
|
149
150
|
parameter: e,
|
|
150
151
|
group: r,
|
|
151
152
|
id: t
|
|
152
153
|
}) => {
|
|
153
|
-
const o =
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
154
|
+
const o = Pa(e);
|
|
155
|
+
return /* @__PURE__ */ h.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
156
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
157
|
+
/* @__PURE__ */ h.jsx("code", { children: r === "path" ? /* @__PURE__ */ h.jsx(
|
|
158
|
+
ro,
|
|
158
159
|
{
|
|
159
160
|
name: e.name,
|
|
160
161
|
backgroundOpacity: "15%",
|
|
@@ -162,33 +163,33 @@ const Ta = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
162
163
|
slug: `${t}-${e.name}`
|
|
163
164
|
}
|
|
164
165
|
) : e.name }),
|
|
165
|
-
o.type && /* @__PURE__ */
|
|
166
|
-
e.required && /* @__PURE__ */
|
|
167
|
-
e.style === "form" && /* @__PURE__ */
|
|
166
|
+
o.type && /* @__PURE__ */ h.jsx(we, { variant: "muted", children: o.type === "array" ? `${o.items.type}[]` : o.type }),
|
|
167
|
+
e.required && /* @__PURE__ */ h.jsx(we, { variant: "outline", children: "required" }),
|
|
168
|
+
e.style === "form" && /* @__PURE__ */ h.jsx(we, { variant: "secondary", children: "form" })
|
|
168
169
|
] }),
|
|
169
|
-
e.description && /* @__PURE__ */
|
|
170
|
-
|
|
170
|
+
e.description && /* @__PURE__ */ h.jsx(
|
|
171
|
+
Ne,
|
|
171
172
|
{
|
|
172
173
|
content: e.description,
|
|
173
174
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
174
175
|
}
|
|
175
176
|
)
|
|
176
177
|
] });
|
|
177
|
-
},
|
|
178
|
+
}, Na = ({
|
|
178
179
|
summary: e,
|
|
179
180
|
group: r,
|
|
180
181
|
parameters: t,
|
|
181
182
|
id: o
|
|
182
|
-
}) => /* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
e && /* @__PURE__ */
|
|
183
|
+
}) => /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
184
|
+
/* @__PURE__ */ h.jsxs(Be, { level: 3, id: `${o}/${r}-parameters`, className: "capitalize", children: [
|
|
185
|
+
e && /* @__PURE__ */ h.jsxs(mr, { children: [
|
|
185
186
|
e,
|
|
186
187
|
" › "
|
|
187
188
|
] }),
|
|
188
189
|
r === "header" ? "Headers" : `${r} Parameters`
|
|
189
190
|
] }),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
191
|
+
/* @__PURE__ */ h.jsx(be, { children: /* @__PURE__ */ h.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((i, l) => i.required === l.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ h.jsx(
|
|
192
|
+
Ca,
|
|
192
193
|
{
|
|
193
194
|
parameter: i,
|
|
194
195
|
id: o,
|
|
@@ -236,38 +237,38 @@ function qa() {
|
|
|
236
237
|
}), mt;
|
|
237
238
|
}
|
|
238
239
|
var Ke = {}, Dr;
|
|
239
|
-
function
|
|
240
|
+
function ka() {
|
|
240
241
|
return Dr || (Dr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ke;
|
|
241
242
|
}
|
|
242
243
|
var gt, Qr;
|
|
243
|
-
function
|
|
244
|
+
function Ea() {
|
|
244
245
|
if (Qr) return gt;
|
|
245
246
|
Qr = 1;
|
|
246
|
-
const e = Ra(), r = qa(), t =
|
|
247
|
+
const e = Ra(), r = qa(), t = ka().default;
|
|
247
248
|
return gt = (o, i, l) => {
|
|
248
249
|
const n = [];
|
|
249
|
-
return function a(s, c,
|
|
250
|
-
c = c || {}, c.indent = c.indent || " ",
|
|
250
|
+
return function a(s, c, y) {
|
|
251
|
+
c = c || {}, c.indent = c.indent || " ", y = y || "";
|
|
251
252
|
let f;
|
|
252
253
|
c.inlineCharacterLimit === void 0 ? f = {
|
|
253
254
|
newLine: `
|
|
254
255
|
`,
|
|
255
256
|
newLineOrSpace: `
|
|
256
257
|
`,
|
|
257
|
-
pad:
|
|
258
|
-
indent:
|
|
258
|
+
pad: y,
|
|
259
|
+
indent: y + c.indent
|
|
259
260
|
} : f = {
|
|
260
261
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
261
262
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
262
263
|
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
263
264
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
264
265
|
};
|
|
265
|
-
const
|
|
266
|
+
const m = (g) => {
|
|
266
267
|
if (c.inlineCharacterLimit === void 0)
|
|
267
268
|
return g;
|
|
268
269
|
const $ = g.replace(new RegExp(f.newLine, "g"), "").replace(new RegExp(f.newLineOrSpace, "g"), " ").replace(new RegExp(f.pad + "|" + f.indent, "g"), "");
|
|
269
270
|
return $.length <= c.inlineCharacterLimit ? $ : g.replace(new RegExp(f.newLine + "|" + f.newLineOrSpace, "g"), `
|
|
270
|
-
`).replace(new RegExp(f.pad, "g"),
|
|
271
|
+
`).replace(new RegExp(f.pad, "g"), y).replace(new RegExp(f.indent, "g"), y + c.indent);
|
|
271
272
|
};
|
|
272
273
|
if (n.indexOf(s) !== -1)
|
|
273
274
|
return '"[Circular]"';
|
|
@@ -281,10 +282,10 @@ function ka() {
|
|
|
281
282
|
n.push(s);
|
|
282
283
|
const g = "[" + f.newLine + s.map(($, b) => {
|
|
283
284
|
const u = s.length - 1 === b ? f.newLine : "," + f.newLineOrSpace;
|
|
284
|
-
let d = a($, c,
|
|
285
|
+
let d = a($, c, y + c.indent);
|
|
285
286
|
return c.transform && (d = c.transform(s, b, d)), f.indent + d + u;
|
|
286
287
|
}).join("") + f.pad + "]";
|
|
287
|
-
return n.pop(),
|
|
288
|
+
return n.pop(), m(g);
|
|
288
289
|
}
|
|
289
290
|
if (r(s)) {
|
|
290
291
|
let g = Object.keys(s).concat(t(s));
|
|
@@ -293,24 +294,24 @@ function ka() {
|
|
|
293
294
|
n.push(s);
|
|
294
295
|
const $ = "{" + f.newLine + g.map((b, u) => {
|
|
295
296
|
const d = g.length - 1 === u ? f.newLine : "," + f.newLineOrSpace, v = typeof b == "symbol", O = !v && /^[a-z$_][a-z$_0-9]*$/i.test(b), T = v || O ? b : a(b, c);
|
|
296
|
-
let p = a(s[b], c,
|
|
297
|
+
let p = a(s[b], c, y + c.indent);
|
|
297
298
|
return c.transform && (p = c.transform(s, b, p)), f.indent + String(T) + ": " + p + d;
|
|
298
299
|
}).join("") + f.pad + "}";
|
|
299
|
-
return n.pop(),
|
|
300
|
+
return n.pop(), m($);
|
|
300
301
|
}
|
|
301
302
|
return s = String(s).replace(/[\r\n]/g, (g) => g === `
|
|
302
303
|
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (s = s.replace(/"/g, '\\"'), `"${s}"`) : (s = s.replace(/\\?'/g, "\\'"), `'${s}'`);
|
|
303
304
|
}(o, i, l);
|
|
304
305
|
}, gt;
|
|
305
306
|
}
|
|
306
|
-
var
|
|
307
|
-
const fe = /* @__PURE__ */
|
|
307
|
+
var Aa = Ea();
|
|
308
|
+
const fe = /* @__PURE__ */ ga(Aa);
|
|
308
309
|
function Me(e, r = {}) {
|
|
309
310
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: i = !0 } = r;
|
|
310
311
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
311
312
|
` ? i ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? i ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
312
313
|
}
|
|
313
|
-
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }),
|
|
314
|
+
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), Ia = {
|
|
314
315
|
info: {
|
|
315
316
|
key: "libcurl",
|
|
316
317
|
title: "Libcurl",
|
|
@@ -326,7 +327,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
326
327
|
l(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
327
328
|
}), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), i.text && (n(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(i.text)});`)), n(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
328
329
|
}
|
|
329
|
-
},
|
|
330
|
+
}, La = {
|
|
330
331
|
info: {
|
|
331
332
|
key: "c",
|
|
332
333
|
title: "C",
|
|
@@ -334,30 +335,30 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
334
335
|
cli: "c"
|
|
335
336
|
},
|
|
336
337
|
clientsById: {
|
|
337
|
-
libcurl:
|
|
338
|
+
libcurl: Ia
|
|
338
339
|
}
|
|
339
340
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
|
|
340
341
|
const t = pe(e, r);
|
|
341
342
|
if (t)
|
|
342
343
|
return e[t];
|
|
343
|
-
}, nt = (e, r) => !!pe(e, r),
|
|
344
|
+
}, nt = (e, r) => !!pe(e, r), Ua = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
344
345
|
(r) => e.indexOf(r) > -1
|
|
345
346
|
), Kr = class {
|
|
346
347
|
constructor(e) {
|
|
347
348
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
348
349
|
}
|
|
349
|
-
},
|
|
350
|
+
}, Fa = class {
|
|
350
351
|
constructor(e) {
|
|
351
352
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
352
353
|
}
|
|
353
|
-
},
|
|
354
|
+
}, fo = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), po = (e) => e === void 0 ? !0 : fo(e) === "object" ? Object.keys(e).length === 0 : !1, Yr = (e) => (Object.keys(e).filter((r) => po(e[r])).forEach((r) => {
|
|
354
355
|
delete e[r];
|
|
355
356
|
}), e), Xe = (e, r) => {
|
|
356
357
|
const t = " ".repeat(e);
|
|
357
358
|
return r.replace(/\n/g, `
|
|
358
359
|
${t}`);
|
|
359
|
-
},
|
|
360
|
-
switch (
|
|
360
|
+
}, gr = (e) => {
|
|
361
|
+
switch (fo(e)) {
|
|
361
362
|
case "string":
|
|
362
363
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
363
364
|
case "file":
|
|
@@ -370,20 +371,20 @@ ${t}`);
|
|
|
370
371
|
return `#"${e.source}"`;
|
|
371
372
|
case "object": {
|
|
372
373
|
const r = Object.keys(e).reduce((t, o) => {
|
|
373
|
-
const i = Xe(o.length + 2,
|
|
374
|
+
const i = Xe(o.length + 2, gr(e[o]));
|
|
374
375
|
return `${t}:${o} ${i}
|
|
375
376
|
`;
|
|
376
377
|
}, "").trim();
|
|
377
378
|
return `{${Xe(1, r)}}`;
|
|
378
379
|
}
|
|
379
380
|
case "array": {
|
|
380
|
-
const r = e.reduce((t, o) => `${t} ${
|
|
381
|
+
const r = e.reduce((t, o) => `${t} ${gr(o)}`, "").trim();
|
|
381
382
|
return `[${Xe(1, r)}]`;
|
|
382
383
|
}
|
|
383
384
|
default:
|
|
384
385
|
return e.toString();
|
|
385
386
|
}
|
|
386
|
-
},
|
|
387
|
+
}, _a = {
|
|
387
388
|
info: {
|
|
388
389
|
key: "clj_http",
|
|
389
390
|
title: "clj-http",
|
|
@@ -403,35 +404,35 @@ ${t}`);
|
|
|
403
404
|
case "application/json":
|
|
404
405
|
{
|
|
405
406
|
c["content-type"] = new Kr("json"), c["form-params"] = t.jsonObj;
|
|
406
|
-
const
|
|
407
|
-
|
|
407
|
+
const y = pe(c.headers, "content-type");
|
|
408
|
+
y && delete c.headers[y];
|
|
408
409
|
}
|
|
409
410
|
break;
|
|
410
411
|
case "application/x-www-form-urlencoded":
|
|
411
412
|
{
|
|
412
413
|
c["form-params"] = t.paramsObj;
|
|
413
|
-
const
|
|
414
|
-
|
|
414
|
+
const y = pe(c.headers, "content-type");
|
|
415
|
+
y && delete c.headers[y];
|
|
415
416
|
}
|
|
416
417
|
break;
|
|
417
418
|
case "text/plain":
|
|
418
419
|
{
|
|
419
420
|
c.body = t.text;
|
|
420
|
-
const
|
|
421
|
-
|
|
421
|
+
const y = pe(c.headers, "content-type");
|
|
422
|
+
y && delete c.headers[y];
|
|
422
423
|
}
|
|
423
424
|
break;
|
|
424
425
|
case "multipart/form-data": {
|
|
425
426
|
if (t.params) {
|
|
426
427
|
c.multipart = t.params.map((f) => f.fileName && !f.value ? {
|
|
427
428
|
name: f.name,
|
|
428
|
-
content: new
|
|
429
|
+
content: new Fa(f.fileName)
|
|
429
430
|
} : {
|
|
430
431
|
name: f.name,
|
|
431
432
|
content: f.value
|
|
432
433
|
});
|
|
433
|
-
const
|
|
434
|
-
|
|
434
|
+
const y = pe(c.headers, "content-type");
|
|
435
|
+
y && delete c.headers[y];
|
|
435
436
|
}
|
|
436
437
|
break;
|
|
437
438
|
}
|
|
@@ -440,30 +441,30 @@ ${t}`);
|
|
|
440
441
|
case "application/json":
|
|
441
442
|
{
|
|
442
443
|
c.accept = new Kr("json");
|
|
443
|
-
const
|
|
444
|
-
|
|
444
|
+
const y = pe(c.headers, "accept");
|
|
445
|
+
y && delete c.headers[y];
|
|
445
446
|
}
|
|
446
447
|
break;
|
|
447
448
|
}
|
|
448
449
|
if (n(`(require '[clj-http.client :as client])
|
|
449
|
-
`),
|
|
450
|
+
`), po(Yr(c)))
|
|
450
451
|
n(`(client/${r} "${o}")`);
|
|
451
452
|
else {
|
|
452
|
-
const
|
|
453
|
+
const y = 11 + r.length + o.length, f = Xe(y, gr(Yr(c)));
|
|
453
454
|
n(`(client/${r} "${o}" ${f})`);
|
|
454
455
|
}
|
|
455
456
|
return a();
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
+
}, Ba = {
|
|
458
459
|
info: {
|
|
459
460
|
key: "clojure",
|
|
460
461
|
title: "Clojure",
|
|
461
462
|
default: "clj_http"
|
|
462
463
|
},
|
|
463
464
|
clientsById: {
|
|
464
|
-
clj_http:
|
|
465
|
+
clj_http: _a
|
|
465
466
|
}
|
|
466
|
-
},
|
|
467
|
+
}, Ha = (e) => {
|
|
467
468
|
let r = ve(e, "accept-encoding");
|
|
468
469
|
if (!r)
|
|
469
470
|
return [];
|
|
@@ -480,7 +481,7 @@ ${t}`);
|
|
|
480
481
|
}
|
|
481
482
|
});
|
|
482
483
|
}), o;
|
|
483
|
-
},
|
|
484
|
+
}, Ma = {
|
|
484
485
|
info: {
|
|
485
486
|
key: "httpclient",
|
|
486
487
|
title: "HttpClient",
|
|
@@ -496,11 +497,11 @@ ${t}`);
|
|
|
496
497
|
}, { push: n, join: a } = new V({ indent: l.indent });
|
|
497
498
|
n("using System.Net.Http.Headers;");
|
|
498
499
|
let s = "";
|
|
499
|
-
const c = !!e.cookie,
|
|
500
|
-
(c ||
|
|
500
|
+
const c = !!e.cookie, y = Ha(e);
|
|
501
|
+
(c || y.length) && (s = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), y.length && n(`AutomaticDecompression = ${y.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${s});`), n("var request = new HttpRequestMessage"), n("{");
|
|
501
502
|
const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
502
503
|
t = t.toUpperCase(), t && f.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
|
|
503
|
-
const
|
|
504
|
+
const m = Object.keys(e).filter((b) => {
|
|
504
505
|
switch (b.toLowerCase()) {
|
|
505
506
|
case "content-type":
|
|
506
507
|
case "content-length":
|
|
@@ -510,7 +511,7 @@ ${t}`);
|
|
|
510
511
|
return !0;
|
|
511
512
|
}
|
|
512
513
|
});
|
|
513
|
-
if (
|
|
514
|
+
if (m.length && (n("Headers =", 1), n("{", 1), m.forEach((b) => {
|
|
514
515
|
n(`{ "${b}", "${ce(e[b])}" },`, 2);
|
|
515
516
|
}), n("},", 1)), r.text) {
|
|
516
517
|
const b = r.mimeType;
|
|
@@ -533,10 +534,10 @@ ${t}`);
|
|
|
533
534
|
return n("};"), n("using (var response = await client.SendAsync(request))"), n("{"), n("response.EnsureSuccessStatusCode();", 1), n("var body = await response.Content.ReadAsStringAsync();", 1), n("Console.WriteLine(body);", 1), n("}"), a();
|
|
534
535
|
}
|
|
535
536
|
};
|
|
536
|
-
function
|
|
537
|
+
function za(e) {
|
|
537
538
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
538
539
|
}
|
|
539
|
-
var
|
|
540
|
+
var Ga = {
|
|
540
541
|
info: {
|
|
541
542
|
key: "restsharp",
|
|
542
543
|
title: "RestSharp",
|
|
@@ -555,42 +556,42 @@ var za = {
|
|
|
555
556
|
|
|
556
557
|
`), n(`var options = new RestClientOptions("${r}");`), n("var client = new RestClient(options);"), n('var request = new RestRequest("");');
|
|
557
558
|
const c = i.mimeType && i.mimeType === "multipart/form-data";
|
|
558
|
-
switch (c && n("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((
|
|
559
|
-
if (i.mimeType &&
|
|
559
|
+
switch (c && n("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((y) => {
|
|
560
|
+
if (i.mimeType && y.toLowerCase() === "content-type" && i.text) {
|
|
560
561
|
c && i.boundary && n(`request.FormBoundary = "${i.boundary}";`);
|
|
561
562
|
return;
|
|
562
563
|
}
|
|
563
|
-
n(`request.AddHeader("${
|
|
564
|
-
}), o.forEach(({ name:
|
|
565
|
-
n(`request.AddCookie("${
|
|
564
|
+
n(`request.AddHeader("${y}", "${ce(t[y])}");`);
|
|
565
|
+
}), o.forEach(({ name: y, value: f }) => {
|
|
566
|
+
n(`request.AddCookie("${y}", "${ce(f)}", "${l.pathname}", "${l.host}");`);
|
|
566
567
|
}), i.mimeType) {
|
|
567
568
|
case "multipart/form-data":
|
|
568
569
|
if (!i.params) break;
|
|
569
|
-
i.params.forEach((
|
|
570
|
-
|
|
570
|
+
i.params.forEach((y) => {
|
|
571
|
+
y.fileName ? n(`request.AddFile("${y.name}", "${y.fileName}");`) : n(`request.AddParameter("${y.name}", "${y.value}");`);
|
|
571
572
|
});
|
|
572
573
|
break;
|
|
573
574
|
case "application/x-www-form-urlencoded":
|
|
574
575
|
if (!i.params) break;
|
|
575
|
-
i.params.forEach((
|
|
576
|
-
n(`request.AddParameter("${
|
|
576
|
+
i.params.forEach((y) => {
|
|
577
|
+
n(`request.AddParameter("${y.name}", "${y.value}");`);
|
|
577
578
|
});
|
|
578
579
|
break;
|
|
579
580
|
case "application/json": {
|
|
580
581
|
if (!i.text) break;
|
|
581
|
-
const
|
|
582
|
-
n(`request.AddJsonBody(${
|
|
582
|
+
const y = JSON.stringify(i.text);
|
|
583
|
+
n(`request.AddJsonBody(${y}, false);`);
|
|
583
584
|
break;
|
|
584
585
|
}
|
|
585
586
|
default:
|
|
586
587
|
if (!i.text) break;
|
|
587
588
|
n(`request.AddStringBody("${i.text}", "${i.mimeType}");`);
|
|
588
589
|
}
|
|
589
|
-
return n(`var response = await client.${
|
|
590
|
+
return n(`var response = await client.${za(e)}Async(request);
|
|
590
591
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
591
592
|
`), a();
|
|
592
593
|
}
|
|
593
|
-
},
|
|
594
|
+
}, Wa = {
|
|
594
595
|
info: {
|
|
595
596
|
key: "csharp",
|
|
596
597
|
title: "C#",
|
|
@@ -598,10 +599,10 @@ var za = {
|
|
|
598
599
|
cli: "dotnet"
|
|
599
600
|
},
|
|
600
601
|
clientsById: {
|
|
601
|
-
httpclient:
|
|
602
|
-
restsharp:
|
|
602
|
+
httpclient: Ma,
|
|
603
|
+
restsharp: Ga
|
|
603
604
|
}
|
|
604
|
-
},
|
|
605
|
+
}, Ja = {
|
|
605
606
|
info: {
|
|
606
607
|
key: "native",
|
|
607
608
|
title: "NewRequest",
|
|
@@ -610,16 +611,16 @@ var za = {
|
|
|
610
611
|
extname: ".go"
|
|
611
612
|
},
|
|
612
613
|
convert: ({ postData: e, method: r, allHeaders: t, fullUrl: o }, i = {}) => {
|
|
613
|
-
const { blank: l, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: s = !0, checkErrors: c = !1, printBody:
|
|
614
|
+
const { blank: l, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: s = !0, checkErrors: c = !1, printBody: y = !0, timeout: f = -1 } = i, m = c ? "err" : "_", g = s ? 1 : 0, $ = () => {
|
|
614
615
|
c && (n("if err != nil {", g), n("panic(err)", g + 1), n("}", g));
|
|
615
616
|
};
|
|
616
|
-
s && (n("package main"), l(), n("import ("), n('"fmt"', g), f > 0 && n('"time"', g), e.text && n('"strings"', g), n('"net/http"', g),
|
|
617
|
+
s && (n("package main"), l(), n("import ("), n('"fmt"', g), f > 0 && n('"time"', g), e.text && n('"strings"', g), n('"net/http"', g), y && n('"io"', g), n(")"), l(), n("func main() {"), l());
|
|
617
618
|
const b = f > 0, u = b, d = u ? "client" : "http.DefaultClient";
|
|
618
|
-
return u && (n("client := http.Client{", g), b && n(`Timeout: time.Duration(${f} * time.Second),`, g + 1), n("}", g), l()), n(`url := "${o}"`, g), l(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, g), l(), n(`req, ${
|
|
619
|
+
return u && (n("client := http.Client{", g), b && n(`Timeout: time.Duration(${f} * time.Second),`, g + 1), n("}", g), l()), n(`url := "${o}"`, g), l(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, g), l(), n(`req, ${m} := http.NewRequest("${r}", url, payload)`, g), l()) : (n(`req, ${m} := http.NewRequest("${r}", url, nil)`, g), l()), $(), Object.keys(t).length && (Object.keys(t).forEach((v) => {
|
|
619
620
|
n(`req.Header.Add("${v}", "${ce(t[v])}")`, g);
|
|
620
|
-
}), l()), n(`res, ${
|
|
621
|
+
}), l()), n(`res, ${m} := ${d}.Do(req)`, g), $(), y && (l(), n("defer res.Body.Close()", g), n(`body, ${m} := io.ReadAll(res.Body)`, g), $()), l(), y && n("fmt.Println(string(body))", g), s && (l(), n("}")), a();
|
|
621
622
|
}
|
|
622
|
-
},
|
|
623
|
+
}, Va = {
|
|
623
624
|
info: {
|
|
624
625
|
key: "go",
|
|
625
626
|
title: "Go",
|
|
@@ -627,10 +628,10 @@ var za = {
|
|
|
627
628
|
cli: "go"
|
|
628
629
|
},
|
|
629
630
|
clientsById: {
|
|
630
|
-
native:
|
|
631
|
+
native: Ja
|
|
631
632
|
}
|
|
632
633
|
}, Xr = `\r
|
|
633
|
-
`,
|
|
634
|
+
`, Da = {
|
|
634
635
|
info: {
|
|
635
636
|
key: "http1.1",
|
|
636
637
|
title: "HTTP/1.1",
|
|
@@ -644,30 +645,30 @@ var za = {
|
|
|
644
645
|
autoContentLength: !0,
|
|
645
646
|
autoHost: !0,
|
|
646
647
|
...n
|
|
647
|
-
}, { blank: s, push: c, join:
|
|
648
|
+
}, { blank: s, push: c, join: y } = new V({ indent: "", join: Xr }), f = a.absoluteURI ? r : t.path;
|
|
648
649
|
c(`${e} ${f} ${o}`);
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
650
|
+
const m = Object.keys(i);
|
|
651
|
+
if (m.forEach((b) => {
|
|
651
652
|
const u = b.toLowerCase().replace(/(^|-)(\w)/g, (d) => d.toUpperCase());
|
|
652
653
|
c(`${u}: ${i[b]}`);
|
|
653
|
-
}), a.autoHost && !
|
|
654
|
+
}), a.autoHost && !m.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !m.includes("content-length")) {
|
|
654
655
|
const u = new TextEncoder().encode(l.text).length.toString();
|
|
655
656
|
c(`Content-Length: ${u}`);
|
|
656
657
|
}
|
|
657
658
|
s();
|
|
658
|
-
const g =
|
|
659
|
+
const g = y(), $ = l.text || "";
|
|
659
660
|
return `${g}${Xr}${$}`;
|
|
660
661
|
}
|
|
661
|
-
},
|
|
662
|
+
}, Qa = {
|
|
662
663
|
info: {
|
|
663
664
|
key: "http",
|
|
664
665
|
title: "HTTP",
|
|
665
666
|
default: "http1.1"
|
|
666
667
|
},
|
|
667
668
|
clientsById: {
|
|
668
|
-
"http1.1":
|
|
669
|
+
"http1.1": Da
|
|
669
670
|
}
|
|
670
|
-
},
|
|
671
|
+
}, Ka = {
|
|
671
672
|
info: {
|
|
672
673
|
key: "asynchttp",
|
|
673
674
|
title: "AsyncHttp",
|
|
@@ -684,7 +685,7 @@ var za = {
|
|
|
684
685
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
685
686
|
}), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), s();
|
|
686
687
|
}
|
|
687
|
-
},
|
|
688
|
+
}, Ya = {
|
|
688
689
|
info: {
|
|
689
690
|
key: "nethttp",
|
|
690
691
|
title: "java.net.http",
|
|
@@ -706,7 +707,7 @@ var za = {
|
|
|
706
707
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
707
708
|
), n("System.out.println(response.body());"), a();
|
|
708
709
|
}
|
|
709
|
-
},
|
|
710
|
+
}, Xa = {
|
|
710
711
|
info: {
|
|
711
712
|
key: "okhttp",
|
|
712
713
|
title: "OkHttp",
|
|
@@ -718,12 +719,12 @@ var za = {
|
|
|
718
719
|
const l = {
|
|
719
720
|
indent: " ",
|
|
720
721
|
...i
|
|
721
|
-
}, { push: n, blank: a, join: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
722
|
-
return n("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? n(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : n(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), n(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), n("Request request = new Request.Builder()"), n(`.url("${t}")`, 1), c.includes(r.toUpperCase()) ?
|
|
722
|
+
}, { push: n, blank: a, join: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], y = ["POST", "PUT", "DELETE", "PATCH"];
|
|
723
|
+
return n("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? n(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : n(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), n(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), n("Request request = new Request.Builder()"), n(`.url("${t}")`, 1), c.includes(r.toUpperCase()) ? y.includes(r.toUpperCase()) ? e.text ? n(`.${r.toLowerCase()}(body)`, 1) : n(`.${r.toLowerCase()}(null)`, 1) : n(`.${r.toLowerCase()}()`, 1) : e.text ? n(`.method("${r.toUpperCase()}", body)`, 1) : n(`.method("${r.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
|
|
723
724
|
n(`.addHeader("${f}", "${ce(o[f])}")`, 1);
|
|
724
725
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), s();
|
|
725
726
|
}
|
|
726
|
-
},
|
|
727
|
+
}, Za = {
|
|
727
728
|
info: {
|
|
728
729
|
key: "unirest",
|
|
729
730
|
title: "Unirest",
|
|
@@ -740,19 +741,19 @@ var za = {
|
|
|
740
741
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
741
742
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
742
743
|
}
|
|
743
|
-
},
|
|
744
|
+
}, ei = {
|
|
744
745
|
info: {
|
|
745
746
|
key: "java",
|
|
746
747
|
title: "Java",
|
|
747
748
|
default: "unirest"
|
|
748
749
|
},
|
|
749
750
|
clientsById: {
|
|
750
|
-
asynchttp:
|
|
751
|
-
nethttp:
|
|
752
|
-
okhttp:
|
|
753
|
-
unirest:
|
|
751
|
+
asynchttp: Ka,
|
|
752
|
+
nethttp: Ya,
|
|
753
|
+
okhttp: Xa,
|
|
754
|
+
unirest: Za
|
|
754
755
|
}
|
|
755
|
-
},
|
|
756
|
+
}, ti = {
|
|
756
757
|
info: {
|
|
757
758
|
key: "axios",
|
|
758
759
|
title: "Axios",
|
|
@@ -765,7 +766,7 @@ var za = {
|
|
|
765
766
|
const n = {
|
|
766
767
|
indent: " ",
|
|
767
768
|
...l
|
|
768
|
-
}, { blank: a, push: s, join: c, addPostProcessor:
|
|
769
|
+
}, { blank: a, push: s, join: c, addPostProcessor: y } = new V({ indent: n.indent });
|
|
769
770
|
s("import axios from 'axios';"), a();
|
|
770
771
|
const f = {
|
|
771
772
|
method: r,
|
|
@@ -775,7 +776,7 @@ var za = {
|
|
|
775
776
|
case "application/x-www-form-urlencoded":
|
|
776
777
|
i.params && (s("const encodedParams = new URLSearchParams();"), i.params.forEach((g) => {
|
|
777
778
|
s(`encodedParams.set('${g.name}', '${g.value}');`);
|
|
778
|
-
}), a(), f.data = "encodedParams,",
|
|
779
|
+
}), a(), f.data = "encodedParams,", y((g) => g.replace(/'encodedParams,'/, "encodedParams,")));
|
|
779
780
|
break;
|
|
780
781
|
case "application/json":
|
|
781
782
|
i.jsonObj && (f.data = i.jsonObj);
|
|
@@ -790,13 +791,13 @@ var za = {
|
|
|
790
791
|
default:
|
|
791
792
|
i.text && (f.data = i.text);
|
|
792
793
|
}
|
|
793
|
-
const
|
|
794
|
+
const m = fe(f, {
|
|
794
795
|
indent: " ",
|
|
795
796
|
inlineCharacterLimit: 80
|
|
796
797
|
}).replace('"[form]"', "form");
|
|
797
|
-
return s(`const options = ${
|
|
798
|
+
return s(`const options = ${m};`), a(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), c();
|
|
798
799
|
}
|
|
799
|
-
},
|
|
800
|
+
}, ri = {
|
|
800
801
|
info: {
|
|
801
802
|
key: "fetch",
|
|
802
803
|
title: "fetch",
|
|
@@ -822,8 +823,8 @@ var za = {
|
|
|
822
823
|
case "multipart/form-data":
|
|
823
824
|
if (!t.params)
|
|
824
825
|
break;
|
|
825
|
-
const
|
|
826
|
-
|
|
826
|
+
const y = pe(r, "content-type");
|
|
827
|
+
y && delete r[y], s("const form = new FormData();"), t.params.forEach((f) => {
|
|
827
828
|
s(`form.append('${f.name}', '${f.value || f.fileName || ""}');`);
|
|
828
829
|
}), n();
|
|
829
830
|
break;
|
|
@@ -837,19 +838,19 @@ var za = {
|
|
|
837
838
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
838
839
|
// to read, so we keep the object as a literal and use this transform function to wrap the
|
|
839
840
|
// literal in a `JSON.stringify` call.
|
|
840
|
-
transform: (
|
|
841
|
+
transform: (y, f, m) => {
|
|
841
842
|
if (f === "body") {
|
|
842
843
|
if (t.mimeType === "application/x-www-form-urlencoded")
|
|
843
|
-
return `new URLSearchParams(${
|
|
844
|
+
return `new URLSearchParams(${m})`;
|
|
844
845
|
if (t.mimeType === "application/json")
|
|
845
|
-
return `JSON.stringify(${
|
|
846
|
+
return `JSON.stringify(${m})`;
|
|
846
847
|
}
|
|
847
|
-
return
|
|
848
|
+
return m;
|
|
848
849
|
}
|
|
849
850
|
})};`
|
|
850
851
|
), n(), t.params && t.mimeType === "multipart/form-data" && (s("options.body = form;"), n()), s(`fetch('${o}', options)`), s(".then(response => response.json())", 1), s(".then(response => console.log(response))", 1), s(".catch(err => console.error(err));", 1), a();
|
|
851
852
|
}
|
|
852
|
-
},
|
|
853
|
+
}, ni = {
|
|
853
854
|
info: {
|
|
854
855
|
key: "jquery",
|
|
855
856
|
title: "jQuery",
|
|
@@ -879,21 +880,21 @@ var za = {
|
|
|
879
880
|
case "multipart/form-data":
|
|
880
881
|
if (!o.params)
|
|
881
882
|
break;
|
|
882
|
-
if (a("const form = new FormData();"), o.params.forEach((
|
|
883
|
-
a(`form.append('${
|
|
883
|
+
if (a("const form = new FormData();"), o.params.forEach((m) => {
|
|
884
|
+
a(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
|
|
884
885
|
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", nt(t, "content-type") && (f = ve(t, "content-type")) != null && f.includes("boundary")) {
|
|
885
|
-
const
|
|
886
|
-
|
|
886
|
+
const m = pe(t, "content-type");
|
|
887
|
+
m && delete c.headers[m];
|
|
887
888
|
}
|
|
888
889
|
n();
|
|
889
890
|
break;
|
|
890
891
|
default:
|
|
891
892
|
o.text && (c.data = o.text);
|
|
892
893
|
}
|
|
893
|
-
const
|
|
894
|
-
return a(`const settings = ${
|
|
894
|
+
const y = fe(c, { indent: l.indent }).replace("'[form]'", "form");
|
|
895
|
+
return a(`const settings = ${y};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), s();
|
|
895
896
|
}
|
|
896
|
-
},
|
|
897
|
+
}, oi = {
|
|
897
898
|
info: {
|
|
898
899
|
key: "xhr",
|
|
899
900
|
title: "XMLHttpRequest",
|
|
@@ -919,34 +920,34 @@ var za = {
|
|
|
919
920
|
case "multipart/form-data":
|
|
920
921
|
if (!e.params)
|
|
921
922
|
break;
|
|
922
|
-
if (a("const data = new FormData();"), e.params.forEach((
|
|
923
|
-
a(`data.append('${
|
|
923
|
+
if (a("const data = new FormData();"), e.params.forEach((y) => {
|
|
924
|
+
a(`data.append('${y.name}', '${y.value || y.fileName || ""}');`);
|
|
924
925
|
}), nt(r, "content-type") && (c = ve(r, "content-type")) != null && c.includes("boundary")) {
|
|
925
|
-
const
|
|
926
|
-
|
|
926
|
+
const y = pe(r, "content-type");
|
|
927
|
+
y && delete r[y];
|
|
927
928
|
}
|
|
928
929
|
n();
|
|
929
930
|
break;
|
|
930
931
|
default:
|
|
931
932
|
a(`const data = ${e.text ? `'${e.text}'` : "null"};`), n();
|
|
932
933
|
}
|
|
933
|
-
return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((
|
|
934
|
-
a(`xhr.setRequestHeader('${
|
|
934
|
+
return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((y) => {
|
|
935
|
+
a(`xhr.setRequestHeader('${y}', '${ze(r[y])}');`);
|
|
935
936
|
}), n(), a("xhr.send(data);"), s();
|
|
936
937
|
}
|
|
937
|
-
},
|
|
938
|
+
}, ai = {
|
|
938
939
|
info: {
|
|
939
940
|
key: "javascript",
|
|
940
941
|
title: "JavaScript",
|
|
941
942
|
default: "xhr"
|
|
942
943
|
},
|
|
943
944
|
clientsById: {
|
|
944
|
-
xhr:
|
|
945
|
-
axios:
|
|
946
|
-
fetch:
|
|
947
|
-
jquery:
|
|
945
|
+
xhr: oi,
|
|
946
|
+
axios: ti,
|
|
947
|
+
fetch: ri,
|
|
948
|
+
jquery: ni
|
|
948
949
|
}
|
|
949
|
-
},
|
|
950
|
+
}, ii = {
|
|
950
951
|
info: {
|
|
951
952
|
key: "native",
|
|
952
953
|
title: "Native JSON",
|
|
@@ -980,16 +981,16 @@ var za = {
|
|
|
980
981
|
}
|
|
981
982
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
982
983
|
}
|
|
983
|
-
},
|
|
984
|
+
}, si = {
|
|
984
985
|
info: {
|
|
985
986
|
key: "json",
|
|
986
987
|
title: "JSON",
|
|
987
988
|
default: "native"
|
|
988
989
|
},
|
|
989
990
|
clientsById: {
|
|
990
|
-
native:
|
|
991
|
+
native: ii
|
|
991
992
|
}
|
|
992
|
-
},
|
|
993
|
+
}, li = {
|
|
993
994
|
info: {
|
|
994
995
|
key: "okhttp",
|
|
995
996
|
title: "OkHttp",
|
|
@@ -1001,21 +1002,21 @@ var za = {
|
|
|
1001
1002
|
const l = {
|
|
1002
1003
|
indent: " ",
|
|
1003
1004
|
...i
|
|
1004
|
-
}, { blank: n, join: a, push: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
1005
|
-
return s("val client = OkHttpClient()"), n(), e.text && (e.boundary ? s(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : s(`val mediaType = MediaType.parse("${e.mimeType}")`), s(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), s("val request = Request.Builder()"), s(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ?
|
|
1005
|
+
}, { blank: n, join: a, push: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], y = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1006
|
+
return s("val client = OkHttpClient()"), n(), e.text && (e.boundary ? s(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : s(`val mediaType = MediaType.parse("${e.mimeType}")`), s(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), s("val request = Request.Builder()"), s(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ? y.includes(t.toUpperCase()) ? e.text ? s(`.${t.toLowerCase()}(body)`, 1) : s(`.${t.toLowerCase()}(null)`, 1) : s(`.${t.toLowerCase()}()`, 1) : e.text ? s(`.method("${t.toUpperCase()}", body)`, 1) : s(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
|
|
1006
1007
|
s(`.addHeader("${f}", "${ce(o[f])}")`, 1);
|
|
1007
1008
|
}), s(".build()", 1), n(), s("val response = client.newCall(request).execute()"), a();
|
|
1008
1009
|
}
|
|
1009
|
-
},
|
|
1010
|
+
}, ci = {
|
|
1010
1011
|
info: {
|
|
1011
1012
|
key: "kotlin",
|
|
1012
1013
|
title: "Kotlin",
|
|
1013
1014
|
default: "okhttp"
|
|
1014
1015
|
},
|
|
1015
1016
|
clientsById: {
|
|
1016
|
-
okhttp:
|
|
1017
|
+
okhttp: li
|
|
1017
1018
|
}
|
|
1018
|
-
},
|
|
1019
|
+
}, ui = {
|
|
1019
1020
|
info: {
|
|
1020
1021
|
key: "axios",
|
|
1021
1022
|
title: "Axios",
|
|
@@ -1030,26 +1031,26 @@ var za = {
|
|
|
1030
1031
|
...i
|
|
1031
1032
|
}, { blank: n, join: a, push: s, addPostProcessor: c } = new V({ indent: l.indent });
|
|
1032
1033
|
s("const axios = require('axios');");
|
|
1033
|
-
const
|
|
1034
|
+
const y = {
|
|
1034
1035
|
method: e,
|
|
1035
1036
|
url: r
|
|
1036
1037
|
};
|
|
1037
|
-
switch (Object.keys(t).length && (
|
|
1038
|
+
switch (Object.keys(t).length && (y.headers = t), o.mimeType) {
|
|
1038
1039
|
case "application/x-www-form-urlencoded":
|
|
1039
|
-
o.params && (s("const { URLSearchParams } = require('url');"), n(), s("const encodedParams = new URLSearchParams();"), o.params.forEach((
|
|
1040
|
-
s(`encodedParams.set('${
|
|
1041
|
-
}), n(),
|
|
1040
|
+
o.params && (s("const { URLSearchParams } = require('url');"), n(), s("const encodedParams = new URLSearchParams();"), o.params.forEach((m) => {
|
|
1041
|
+
s(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
1042
|
+
}), n(), y.data = "encodedParams,", c((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1042
1043
|
break;
|
|
1043
1044
|
case "application/json":
|
|
1044
|
-
n(), o.jsonObj && (
|
|
1045
|
+
n(), o.jsonObj && (y.data = o.jsonObj);
|
|
1045
1046
|
break;
|
|
1046
1047
|
default:
|
|
1047
|
-
n(), o.text && (
|
|
1048
|
+
n(), o.text && (y.data = o.text);
|
|
1048
1049
|
}
|
|
1049
|
-
const f = fe(
|
|
1050
|
+
const f = fe(y, { indent: " ", inlineCharacterLimit: 80 });
|
|
1050
1051
|
return s(`const options = ${f};`), n(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), a();
|
|
1051
1052
|
}
|
|
1052
|
-
},
|
|
1053
|
+
}, fi = {
|
|
1053
1054
|
info: {
|
|
1054
1055
|
key: "fetch",
|
|
1055
1056
|
title: "Fetch",
|
|
@@ -1065,9 +1066,9 @@ var za = {
|
|
|
1065
1066
|
...l
|
|
1066
1067
|
};
|
|
1067
1068
|
let a = !1;
|
|
1068
|
-
const { blank: s, push: c, join:
|
|
1069
|
+
const { blank: s, push: c, join: y, unshift: f } = new V({ indent: n.indent });
|
|
1069
1070
|
c("const fetch = require('node-fetch');");
|
|
1070
|
-
const
|
|
1071
|
+
const m = r, g = {
|
|
1071
1072
|
method: e
|
|
1072
1073
|
};
|
|
1073
1074
|
switch (Object.keys(o).length && (g.headers = o), t.mimeType) {
|
|
@@ -1098,7 +1099,7 @@ var za = {
|
|
|
1098
1099
|
const u = i.map(({ name: d, value: v }) => `${encodeURIComponent(d)}=${encodeURIComponent(v)}`).join("; ");
|
|
1099
1100
|
g.headers || (g.headers = {}), g.headers.cookie = u;
|
|
1100
1101
|
}
|
|
1101
|
-
s(), c(`const url = '${
|
|
1102
|
+
s(), c(`const url = '${m}';`), g.headers && !Object.keys(g.headers).length && delete g.headers;
|
|
1102
1103
|
const $ = fe(g, {
|
|
1103
1104
|
indent: " ",
|
|
1104
1105
|
inlineCharacterLimit: 80,
|
|
@@ -1107,9 +1108,9 @@ var za = {
|
|
|
1107
1108
|
// in a `JSON.stringify` call.
|
|
1108
1109
|
transform: (u, d, v) => d === "body" && t.mimeType === "application/json" ? `JSON.stringify(${v})` : v
|
|
1109
1110
|
});
|
|
1110
|
-
return c(`const options = ${$};`), s(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), s()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1),
|
|
1111
|
+
return c(`const options = ${$};`), s(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), s()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), y().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1111
1112
|
}
|
|
1112
|
-
},
|
|
1113
|
+
}, pi = {
|
|
1113
1114
|
info: {
|
|
1114
1115
|
key: "native",
|
|
1115
1116
|
title: "HTTP",
|
|
@@ -1119,14 +1120,14 @@ var za = {
|
|
|
1119
1120
|
},
|
|
1120
1121
|
convert: ({ uriObj: e, method: r, allHeaders: t, postData: o }, i = {}) => {
|
|
1121
1122
|
var f;
|
|
1122
|
-
const { indent: l = " " } = i, { blank: n, join: a, push: s, unshift: c } = new V({ indent: l }),
|
|
1123
|
+
const { indent: l = " " } = i, { blank: n, join: a, push: s, unshift: c } = new V({ indent: l }), y = {
|
|
1123
1124
|
method: r,
|
|
1124
1125
|
hostname: e.hostname,
|
|
1125
1126
|
port: e.port,
|
|
1126
1127
|
path: e.path,
|
|
1127
1128
|
headers: t
|
|
1128
1129
|
};
|
|
1129
|
-
switch (s(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), n(), s(`const options = ${fe(
|
|
1130
|
+
switch (s(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), n(), s(`const options = ${fe(y, { indent: l })};`), n(), s("const req = http.request(options, function (res) {"), s("const chunks = [];", 1), n(), s("res.on('data', function (chunk) {", 1), s("chunks.push(chunk);", 2), s("});", 1), n(), s("res.on('end', function () {", 1), s("const body = Buffer.concat(chunks);", 2), s("console.log(body.toString());", 2), s("});", 1), s("});"), n(), o.mimeType) {
|
|
1130
1131
|
case "application/x-www-form-urlencoded":
|
|
1131
1132
|
o.paramsObj && (c("const qs = require('querystring');"), s(
|
|
1132
1133
|
`req.write(qs.stringify(${fe(o.paramsObj, {
|
|
@@ -1148,7 +1149,7 @@ var za = {
|
|
|
1148
1149
|
}
|
|
1149
1150
|
return s("req.end();"), a();
|
|
1150
1151
|
}
|
|
1151
|
-
},
|
|
1152
|
+
}, di = {
|
|
1152
1153
|
info: {
|
|
1153
1154
|
key: "request",
|
|
1154
1155
|
title: "Request",
|
|
@@ -1163,8 +1164,8 @@ var za = {
|
|
|
1163
1164
|
...n
|
|
1164
1165
|
};
|
|
1165
1166
|
let s = !1;
|
|
1166
|
-
const { push: c, blank:
|
|
1167
|
-
c("const request = require('request');"),
|
|
1167
|
+
const { push: c, blank: y, join: f, unshift: m, addPostProcessor: g } = new V({ indent: a.indent });
|
|
1168
|
+
c("const request = require('request');"), y();
|
|
1168
1169
|
const $ = {
|
|
1169
1170
|
method: e,
|
|
1170
1171
|
url: t
|
|
@@ -1199,9 +1200,9 @@ var za = {
|
|
|
1199
1200
|
}
|
|
1200
1201
|
return l.length && ($.jar = "JAR", c("const jar = request.jar();"), l.forEach(({ name: b, value: u }) => {
|
|
1201
1202
|
c(`jar.setCookie(request.cookie('${encodeURIComponent(b)}=${encodeURIComponent(u)}'), '${r}');`);
|
|
1202
|
-
}),
|
|
1203
|
+
}), y(), g((b) => b.replace(/'JAR'/, "jar"))), s && m("const fs = require('fs');"), c(`const options = ${fe($, { indent: " ", inlineCharacterLimit: 80 })};`), y(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), y(), c("console.log(body);", 1), c("});"), f();
|
|
1203
1204
|
}
|
|
1204
|
-
},
|
|
1205
|
+
}, hi = {
|
|
1205
1206
|
info: {
|
|
1206
1207
|
key: "unirest",
|
|
1207
1208
|
title: "Unirest",
|
|
@@ -1215,17 +1216,17 @@ var za = {
|
|
|
1215
1216
|
...n
|
|
1216
1217
|
};
|
|
1217
1218
|
let s = !1;
|
|
1218
|
-
const { addPostProcessor: c, blank:
|
|
1219
|
+
const { addPostProcessor: c, blank: y, join: f, push: m, unshift: g } = new V({
|
|
1219
1220
|
indent: a.indent
|
|
1220
1221
|
});
|
|
1221
|
-
switch (
|
|
1222
|
-
|
|
1223
|
-
}),
|
|
1222
|
+
switch (m("const unirest = require('unirest');"), y(), m(`const req = unirest('${e}', '${r}');`), y(), t.length && (m("const CookieJar = unirest.jar();"), t.forEach(($) => {
|
|
1223
|
+
m(`CookieJar.add('${encodeURIComponent($.name)}=${encodeURIComponent($.value)}', '${r}');`);
|
|
1224
|
+
}), m("req.jar(CookieJar);"), y()), Object.keys(o).length && (m(`req.query(${fe(o, { indent: a.indent })});`), y()), Object.keys(l).length && (m(`req.headers(${fe(l, { indent: a.indent })});`), y()), i.mimeType) {
|
|
1224
1225
|
case "application/x-www-form-urlencoded":
|
|
1225
|
-
i.paramsObj && (
|
|
1226
|
+
i.paramsObj && (m(`req.form(${fe(i.paramsObj, { indent: a.indent })});`), y());
|
|
1226
1227
|
break;
|
|
1227
1228
|
case "application/json":
|
|
1228
|
-
i.jsonObj && (
|
|
1229
|
+
i.jsonObj && (m("req.type('json');"), m(`req.send(${fe(i.jsonObj, { indent: a.indent })});`), y());
|
|
1229
1230
|
break;
|
|
1230
1231
|
case "multipart/form-data": {
|
|
1231
1232
|
if (!i.params)
|
|
@@ -1234,15 +1235,15 @@ var za = {
|
|
|
1234
1235
|
i.params.forEach((b) => {
|
|
1235
1236
|
const u = {};
|
|
1236
1237
|
b.fileName && !b.value ? (s = !0, u.body = `fs.createReadStream('${b.fileName}')`, c((d) => d.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : b.value && (u.body = b.value), u.body && (b.contentType && (u["content-type"] = b.contentType), $.push(u));
|
|
1237
|
-
}),
|
|
1238
|
+
}), m(`req.multipart(${fe($, { indent: a.indent })});`), y();
|
|
1238
1239
|
break;
|
|
1239
1240
|
}
|
|
1240
1241
|
default:
|
|
1241
|
-
i.text && (
|
|
1242
|
+
i.text && (m(`req.send(${fe(i.text, { indent: a.indent })});`), y());
|
|
1242
1243
|
}
|
|
1243
|
-
return s && g("const fs = require('fs');"),
|
|
1244
|
+
return s && g("const fs = require('fs');"), m("req.end(function (res) {"), m("if (res.error) throw new Error(res.error);", 1), y(), m("console.log(res.body);", 1), m("});"), f();
|
|
1244
1245
|
}
|
|
1245
|
-
},
|
|
1246
|
+
}, yi = {
|
|
1246
1247
|
info: {
|
|
1247
1248
|
key: "node",
|
|
1248
1249
|
title: "Node.js",
|
|
@@ -1250,27 +1251,27 @@ var za = {
|
|
|
1250
1251
|
cli: "node %s"
|
|
1251
1252
|
},
|
|
1252
1253
|
clientsById: {
|
|
1253
|
-
native:
|
|
1254
|
-
request:
|
|
1255
|
-
unirest:
|
|
1256
|
-
axios:
|
|
1257
|
-
fetch:
|
|
1254
|
+
native: pi,
|
|
1255
|
+
request: di,
|
|
1256
|
+
unirest: hi,
|
|
1257
|
+
axios: ui,
|
|
1258
|
+
fetch: fi
|
|
1258
1259
|
}
|
|
1259
1260
|
}, vt = (e, r, t, o) => {
|
|
1260
|
-
const i = `${e} *${r} = `, l =
|
|
1261
|
+
const i = `${e} *${r} = `, l = vr(t, o ? i.length : void 0);
|
|
1261
1262
|
return `${i}${l};`;
|
|
1262
|
-
},
|
|
1263
|
+
}, vr = (e, r) => {
|
|
1263
1264
|
const t = r === void 0 ? ", " : `,
|
|
1264
1265
|
${" ".repeat(r)}`;
|
|
1265
1266
|
switch (Object.prototype.toString.call(e)) {
|
|
1266
1267
|
case "[object Number]":
|
|
1267
1268
|
return `@${e}`;
|
|
1268
1269
|
case "[object Array]":
|
|
1269
|
-
return `@[ ${e.map((i) =>
|
|
1270
|
+
return `@[ ${e.map((i) => vr(i)).join(t)} ]`;
|
|
1270
1271
|
case "[object Object]": {
|
|
1271
1272
|
const o = [];
|
|
1272
1273
|
return Object.keys(e).forEach((i) => {
|
|
1273
|
-
o.push(`@"${i}": ${
|
|
1274
|
+
o.push(`@"${i}": ${vr(e[i])}`);
|
|
1274
1275
|
}), `@{ ${o.join(t)} }`;
|
|
1275
1276
|
}
|
|
1276
1277
|
case "[object Boolean]":
|
|
@@ -1278,7 +1279,7 @@ var za = {
|
|
|
1278
1279
|
default:
|
|
1279
1280
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1280
1281
|
}
|
|
1281
|
-
},
|
|
1282
|
+
}, mi = {
|
|
1282
1283
|
info: {
|
|
1283
1284
|
key: "nsurlsession",
|
|
1284
1285
|
title: "NSURLSession",
|
|
@@ -1287,7 +1288,7 @@ var za = {
|
|
|
1287
1288
|
extname: ".m"
|
|
1288
1289
|
},
|
|
1289
1290
|
convert: ({ allHeaders: e, postData: r, method: t, fullUrl: o }, i) => {
|
|
1290
|
-
var
|
|
1291
|
+
var y;
|
|
1291
1292
|
const l = {
|
|
1292
1293
|
indent: " ",
|
|
1293
1294
|
pretty: !0,
|
|
@@ -1300,12 +1301,12 @@ var za = {
|
|
|
1300
1301
|
if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, s(), n(vt("NSDictionary", "headers", e, l.pretty))), r.text || r.jsonObj || r.params)
|
|
1301
1302
|
switch (c.hasBody = !0, r.mimeType) {
|
|
1302
1303
|
case "application/x-www-form-urlencoded":
|
|
1303
|
-
if ((
|
|
1304
|
+
if ((y = r.params) != null && y.length) {
|
|
1304
1305
|
s();
|
|
1305
|
-
const [f, ...
|
|
1306
|
+
const [f, ...m] = r.params;
|
|
1306
1307
|
n(
|
|
1307
1308
|
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${f.name}=${f.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1308
|
-
),
|
|
1309
|
+
), m.forEach(({ name: g, value: $ }) => {
|
|
1309
1310
|
n(`[postData appendData:[@"&${g}=${$}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1310
1311
|
});
|
|
1311
1312
|
} else
|
|
@@ -1335,16 +1336,16 @@ var za = {
|
|
|
1335
1336
|
2
|
|
1336
1337
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1337
1338
|
}
|
|
1338
|
-
},
|
|
1339
|
+
}, gi = {
|
|
1339
1340
|
info: {
|
|
1340
1341
|
key: "objc",
|
|
1341
1342
|
title: "Objective-C",
|
|
1342
1343
|
default: "nsurlsession"
|
|
1343
1344
|
},
|
|
1344
1345
|
clientsById: {
|
|
1345
|
-
nsurlsession:
|
|
1346
|
+
nsurlsession: mi
|
|
1346
1347
|
}
|
|
1347
|
-
},
|
|
1348
|
+
}, vi = {
|
|
1348
1349
|
info: {
|
|
1349
1350
|
key: "cohttp",
|
|
1350
1351
|
title: "CoHTTP",
|
|
@@ -1359,25 +1360,25 @@ var za = {
|
|
|
1359
1360
|
...i
|
|
1360
1361
|
}, n = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: s, join: c } = new V({ indent: l.indent });
|
|
1361
1362
|
a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), s(), a(`let uri = Uri.of_string "${e}" in`);
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1364
|
-
`let headers = Header.add (Header.init ()) "${
|
|
1365
|
-
r[
|
|
1363
|
+
const y = Object.keys(r);
|
|
1364
|
+
y.length === 1 ? a(
|
|
1365
|
+
`let headers = Header.add (Header.init ()) "${y[0]}" "${ce(
|
|
1366
|
+
r[y[0]]
|
|
1366
1367
|
)}" in`
|
|
1367
|
-
) :
|
|
1368
|
+
) : y.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), y.forEach(($) => {
|
|
1368
1369
|
a(`("${$}", "${ce(r[$])}");`, 1);
|
|
1369
1370
|
}), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), s();
|
|
1370
|
-
const f =
|
|
1371
|
-
return a(`Client.call ${f}${
|
|
1371
|
+
const f = y.length ? "~headers " : "", m = t.text ? "~body " : "", g = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1372
|
+
return a(`Client.call ${f}${m}${g} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1372
1373
|
}
|
|
1373
|
-
},
|
|
1374
|
+
}, bi = {
|
|
1374
1375
|
info: {
|
|
1375
1376
|
key: "ocaml",
|
|
1376
1377
|
title: "OCaml",
|
|
1377
1378
|
default: "cohttp"
|
|
1378
1379
|
},
|
|
1379
1380
|
clientsById: {
|
|
1380
|
-
cohttp:
|
|
1381
|
+
cohttp: vi
|
|
1381
1382
|
}
|
|
1382
1383
|
}, te = (e, r, t) => {
|
|
1383
1384
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1438,7 +1439,7 @@ ${t}]`;
|
|
|
1438
1439
|
"UNLOCK",
|
|
1439
1440
|
"UPDATE",
|
|
1440
1441
|
"VERSION_CONTROL"
|
|
1441
|
-
],
|
|
1442
|
+
], xi = {
|
|
1442
1443
|
info: {
|
|
1443
1444
|
key: "curl",
|
|
1444
1445
|
title: "cURL",
|
|
@@ -1450,13 +1451,13 @@ ${t}]`;
|
|
|
1450
1451
|
const {
|
|
1451
1452
|
closingTag: s = !1,
|
|
1452
1453
|
indent: c = " ",
|
|
1453
|
-
maxRedirects:
|
|
1454
|
+
maxRedirects: y = 10,
|
|
1454
1455
|
namedErrors: f = !1,
|
|
1455
|
-
noTags:
|
|
1456
|
+
noTags: m = !1,
|
|
1456
1457
|
shortTags: g = !1,
|
|
1457
1458
|
timeout: $ = 30
|
|
1458
1459
|
} = a, { push: b, blank: u, join: d } = new V({ indent: c });
|
|
1459
|
-
|
|
1460
|
+
m || (b(g ? "<?" : "<?php"), u()), b("$curl = curl_init();"), u();
|
|
1460
1461
|
const v = [
|
|
1461
1462
|
{
|
|
1462
1463
|
escape: !0,
|
|
@@ -1481,7 +1482,7 @@ ${t}]`;
|
|
|
1481
1482
|
{
|
|
1482
1483
|
escape: !1,
|
|
1483
1484
|
name: "CURLOPT_MAXREDIRS",
|
|
1484
|
-
value:
|
|
1485
|
+
value: y
|
|
1485
1486
|
},
|
|
1486
1487
|
{
|
|
1487
1488
|
escape: !1,
|
|
@@ -1507,16 +1508,16 @@ ${t}]`;
|
|
|
1507
1508
|
b("curl_setopt_array($curl, [");
|
|
1508
1509
|
const O = new V({ indent: c, join: `
|
|
1509
1510
|
${c}` });
|
|
1510
|
-
v.forEach(({ value: S, name: x, escape:
|
|
1511
|
-
S != null && O.push(`${x} => ${
|
|
1511
|
+
v.forEach(({ value: S, name: x, escape: R }) => {
|
|
1512
|
+
S != null && O.push(`${x} => ${R ? JSON.stringify(S) : S},`);
|
|
1512
1513
|
});
|
|
1513
1514
|
const T = l.map((S) => `${encodeURIComponent(S.name)}=${encodeURIComponent(S.value)}`);
|
|
1514
1515
|
T.length && O.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1515
1516
|
const p = Object.keys(n).sort().map((S) => `"${S}: ${ce(n[S])}"`);
|
|
1516
1517
|
return p.length && (O.push("CURLOPT_HTTPHEADER => ["), O.push(p.join(`,
|
|
1517
|
-
${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = curl_exec($curl);"), b("$err = curl_error($curl);"), u(), b("curl_close($curl);"), u(), b("if ($err) {"), b(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), b("} else {"), b("echo $response;", 1), b("}"), !
|
|
1518
|
+
${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = curl_exec($curl);"), b("$err = curl_error($curl);"), u(), b("curl_close($curl);"), u(), b("if ($err) {"), b(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), b("} else {"), b("echo $response;", 1), b("}"), !m && s && (u(), b("?>")), d();
|
|
1518
1519
|
}
|
|
1519
|
-
},
|
|
1520
|
+
}, $i = {
|
|
1520
1521
|
info: {
|
|
1521
1522
|
key: "guzzle",
|
|
1522
1523
|
title: "Guzzle",
|
|
@@ -1533,7 +1534,7 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1533
1534
|
noTags: !1,
|
|
1534
1535
|
shortTags: !1,
|
|
1535
1536
|
...l
|
|
1536
|
-
}, { push: a, blank: s, join: c } = new V({ indent: n.indent }), { code:
|
|
1537
|
+
}, { push: a, blank: s, join: c } = new V({ indent: n.indent }), { code: y, push: f, join: m } = new V({ indent: n.indent });
|
|
1537
1538
|
switch (n.noTags || a(n.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), s(), e.mimeType) {
|
|
1538
1539
|
case "application/x-www-form-urlencoded":
|
|
1539
1540
|
f(`'form_params' => ${te(e.paramsObj, n.indent + n.indent, n.indent)},`, 1);
|
|
@@ -1565,9 +1566,9 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1565
1566
|
return `${n.indent}${n.indent}'${u}' => '${ze(i[u])}',`;
|
|
1566
1567
|
}), $ = o.map((u) => `${encodeURIComponent(u.name)}=${encodeURIComponent(u.value)}`).join("; ");
|
|
1567
1568
|
return $.length && g.push(`${n.indent}${n.indent}'cookie' => '${ze($)}',`), g.length && (f("'headers' => [", 1), f(g.join(`
|
|
1568
|
-
`)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), s(),
|
|
1569
|
+
`)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), s(), y.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(m()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), s(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (s(), a("?>")), c();
|
|
1569
1570
|
}
|
|
1570
|
-
},
|
|
1571
|
+
}, ji = {
|
|
1571
1572
|
info: {
|
|
1572
1573
|
key: "http1",
|
|
1573
1574
|
title: "HTTP v1",
|
|
@@ -1576,20 +1577,20 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1576
1577
|
extname: ".php"
|
|
1577
1578
|
},
|
|
1578
1579
|
convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: i, cookiesObj: l }, n = {}) => {
|
|
1579
|
-
const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags:
|
|
1580
|
-
switch (c || (f(
|
|
1580
|
+
const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags: y = !1 } = n, { push: f, blank: m, join: g } = new V({ indent: s });
|
|
1581
|
+
switch (c || (f(y ? "<?" : "<?php"), m()), Zr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(r)});`), Zr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), m(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, s)});`), m()), Object.keys(i).length && (f(`$request->setHeaders(${te(i, s)});`), m()), Object.keys(l).length && (f(`$request->setCookies(${te(l, s)});`), m()), t.mimeType) {
|
|
1581
1582
|
case "application/x-www-form-urlencoded":
|
|
1582
|
-
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, s)});`),
|
|
1583
|
+
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, s)});`), m();
|
|
1583
1584
|
break;
|
|
1584
1585
|
case "application/json":
|
|
1585
|
-
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setBody(json_encode(${te(t.jsonObj, s)}));`),
|
|
1586
|
+
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setBody(json_encode(${te(t.jsonObj, s)}));`), m();
|
|
1586
1587
|
break;
|
|
1587
1588
|
default:
|
|
1588
|
-
t.text && (f(`$request->setBody(${te(t.text)});`),
|
|
1589
|
+
t.text && (f(`$request->setBody(${te(t.text)});`), m());
|
|
1589
1590
|
}
|
|
1590
|
-
return f("try {"), f("$response = $request->send();", 1),
|
|
1591
|
+
return f("try {"), f("$response = $request->send();", 1), m(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !c && a && (m(), f("?>")), g();
|
|
1591
1592
|
}
|
|
1592
|
-
},
|
|
1593
|
+
}, wi = {
|
|
1593
1594
|
info: {
|
|
1594
1595
|
key: "http2",
|
|
1595
1596
|
title: "HTTP v2",
|
|
@@ -1599,11 +1600,11 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1599
1600
|
},
|
|
1600
1601
|
convert: ({ postData: e, headersObj: r, method: t, queryObj: o, cookiesObj: i, url: l }, n = {}) => {
|
|
1601
1602
|
var b;
|
|
1602
|
-
const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags:
|
|
1603
|
+
const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags: y = !1 } = n, { push: f, blank: m, join: g } = new V({ indent: s });
|
|
1603
1604
|
let $ = !1;
|
|
1604
|
-
switch (c || (f(
|
|
1605
|
+
switch (c || (f(y ? "<?" : "<?php"), m()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), m(), e.mimeType) {
|
|
1605
1606
|
case "application/x-www-form-urlencoded":
|
|
1606
|
-
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, s)}));`),
|
|
1607
|
+
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, s)}));`), m(), $ = !0;
|
|
1607
1608
|
break;
|
|
1608
1609
|
case "multipart/form-data": {
|
|
1609
1610
|
if (!e.params)
|
|
@@ -1626,18 +1627,18 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1626
1627
|
const T = pe(r, "content-type");
|
|
1627
1628
|
T && delete r[T];
|
|
1628
1629
|
}
|
|
1629
|
-
|
|
1630
|
+
m(), $ = !0;
|
|
1630
1631
|
break;
|
|
1631
1632
|
}
|
|
1632
1633
|
case "application/json":
|
|
1633
1634
|
f("$body = new http\\Message\\Body;"), f(`$body->append(json_encode(${te(e.jsonObj, s)}));`), $ = !0;
|
|
1634
1635
|
break;
|
|
1635
1636
|
default:
|
|
1636
|
-
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`),
|
|
1637
|
+
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`), m(), $ = !0);
|
|
1637
1638
|
}
|
|
1638
|
-
return f(`$request->setRequestUrl(${te(l)});`), f(`$request->setRequestMethod(${te(t)});`), $ && (f("$request->setBody($body);"),
|
|
1639
|
+
return f(`$request->setRequestUrl(${te(l)});`), f(`$request->setRequestMethod(${te(t)});`), $ && (f("$request->setBody($body);"), m()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, s)}));`), m()), Object.keys(r).length && (f(`$request->setHeaders(${te(r, s)});`), m()), Object.keys(i).length && (m(), f(`$client->setCookies(${te(i, s)});`), m()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), m(), f("echo $response->getBody();"), !c && a && (m(), f("?>")), g();
|
|
1639
1640
|
}
|
|
1640
|
-
},
|
|
1641
|
+
}, Si = {
|
|
1641
1642
|
info: {
|
|
1642
1643
|
key: "php",
|
|
1643
1644
|
title: "PHP",
|
|
@@ -1645,24 +1646,24 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1645
1646
|
cli: "php %s"
|
|
1646
1647
|
},
|
|
1647
1648
|
clientsById: {
|
|
1648
|
-
curl:
|
|
1649
|
-
guzzle:
|
|
1650
|
-
http1:
|
|
1651
|
-
http2:
|
|
1649
|
+
curl: xi,
|
|
1650
|
+
guzzle: $i,
|
|
1651
|
+
http1: ji,
|
|
1652
|
+
http2: wi
|
|
1652
1653
|
}
|
|
1653
|
-
},
|
|
1654
|
-
const { push: c, join:
|
|
1654
|
+
}, ho = (e) => ({ method: t, headersObj: o, cookies: i, uriObj: l, fullUrl: n, postData: a, allHeaders: s }) => {
|
|
1655
|
+
const { push: c, join: y } = new V();
|
|
1655
1656
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1656
1657
|
return "Method not supported";
|
|
1657
|
-
const
|
|
1658
|
+
const m = [], g = Object.keys(o);
|
|
1658
1659
|
return g.length && (c("$headers=@{}"), g.forEach(($) => {
|
|
1659
1660
|
$ !== "connection" && c(`$headers.Add("${$}", "${Me(o[$], { escapeChar: "`" })}")`);
|
|
1660
|
-
}),
|
|
1661
|
+
}), m.push("-Headers $headers")), i.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), i.forEach(($) => {
|
|
1661
1662
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${$.name}'`), c(`$cookie.Value = '${$.value}'`), c(`$cookie.Domain = '${l.host}'`), c("$session.Cookies.Add($cookie)");
|
|
1662
|
-
}),
|
|
1663
|
+
}), m.push("-WebSession $session")), a.text && (m.push(
|
|
1663
1664
|
`-ContentType '${Me(ve(s, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1664
|
-
),
|
|
1665
|
-
},
|
|
1665
|
+
), m.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${m.join(" ")}`.trim()), y();
|
|
1666
|
+
}, Oi = {
|
|
1666
1667
|
info: {
|
|
1667
1668
|
key: "restmethod",
|
|
1668
1669
|
title: "Invoke-RestMethod",
|
|
@@ -1670,8 +1671,8 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1670
1671
|
description: "Powershell Invoke-RestMethod client",
|
|
1671
1672
|
extname: ".ps1"
|
|
1672
1673
|
},
|
|
1673
|
-
convert:
|
|
1674
|
-
},
|
|
1674
|
+
convert: ho("Invoke-RestMethod")
|
|
1675
|
+
}, Ti = {
|
|
1675
1676
|
info: {
|
|
1676
1677
|
key: "webrequest",
|
|
1677
1678
|
title: "Invoke-WebRequest",
|
|
@@ -1679,16 +1680,16 @@ ${c}${c}`), 1), O.push("],")), b(O.join(), 1), b("]);"), u(), b("$response = cur
|
|
|
1679
1680
|
description: "Powershell Invoke-WebRequest client",
|
|
1680
1681
|
extname: ".ps1"
|
|
1681
1682
|
},
|
|
1682
|
-
convert:
|
|
1683
|
-
},
|
|
1683
|
+
convert: ho("Invoke-WebRequest")
|
|
1684
|
+
}, Pi = {
|
|
1684
1685
|
info: {
|
|
1685
1686
|
key: "powershell",
|
|
1686
1687
|
title: "Powershell",
|
|
1687
1688
|
default: "webrequest"
|
|
1688
1689
|
},
|
|
1689
1690
|
clientsById: {
|
|
1690
|
-
webrequest:
|
|
1691
|
-
restmethod:
|
|
1691
|
+
webrequest: Ti,
|
|
1692
|
+
restmethod: Oi
|
|
1692
1693
|
}
|
|
1693
1694
|
};
|
|
1694
1695
|
function en(e, r, t, o, i) {
|
|
@@ -1720,7 +1721,7 @@ var Ie = (e, r, t) => {
|
|
|
1720
1721
|
default:
|
|
1721
1722
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1722
1723
|
}
|
|
1723
|
-
},
|
|
1724
|
+
}, Ci = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Ni = {
|
|
1724
1725
|
info: {
|
|
1725
1726
|
key: "requests",
|
|
1726
1727
|
title: "Requests",
|
|
@@ -1736,9 +1737,9 @@ var Ie = (e, r, t) => {
|
|
|
1736
1737
|
...i
|
|
1737
1738
|
}, { push: n, blank: a, join: s, addPostProcessor: c } = new V({ indent: l.indent });
|
|
1738
1739
|
n("import requests"), a(), n(`url = "${e}"`), a();
|
|
1739
|
-
const
|
|
1740
|
+
const y = t;
|
|
1740
1741
|
let f = {};
|
|
1741
|
-
const
|
|
1742
|
+
const m = {};
|
|
1742
1743
|
let g = !1, $ = !1, b = !1;
|
|
1743
1744
|
switch (r.mimeType) {
|
|
1744
1745
|
case "application/json":
|
|
@@ -1748,11 +1749,11 @@ var Ie = (e, r, t) => {
|
|
|
1748
1749
|
if (!r.params)
|
|
1749
1750
|
break;
|
|
1750
1751
|
if (f = {}, r.params.forEach((v) => {
|
|
1751
|
-
v.fileName ? (v.contentType ?
|
|
1752
|
+
v.fileName ? (v.contentType ? m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, g = !0) : (f[v.name] = v.value, $ = !0);
|
|
1752
1753
|
}), g) {
|
|
1753
|
-
n(`files = ${Ie(
|
|
1754
|
-
const v = pe(
|
|
1755
|
-
v && delete
|
|
1754
|
+
n(`files = ${Ie(m, l)}`), $ && n(`payload = ${Ie(f, l)}`);
|
|
1755
|
+
const v = pe(y, "content-type");
|
|
1756
|
+
v && delete y[v];
|
|
1756
1757
|
} else {
|
|
1757
1758
|
const v = JSON.stringify(r.text);
|
|
1758
1759
|
v && (n(`payload = ${v}`), $ = !0);
|
|
@@ -1770,20 +1771,20 @@ var Ie = (e, r, t) => {
|
|
|
1770
1771
|
v && (n(`payload = ${v}`), $ = !0);
|
|
1771
1772
|
}
|
|
1772
1773
|
}
|
|
1773
|
-
const u = Object.keys(
|
|
1774
|
+
const u = Object.keys(y).length;
|
|
1774
1775
|
if (u === 0 && ($ || g))
|
|
1775
1776
|
a();
|
|
1776
1777
|
else if (u === 1)
|
|
1777
|
-
Object.keys(
|
|
1778
|
-
n(`headers = {"${v}": "${ce(
|
|
1778
|
+
Object.keys(y).forEach((v) => {
|
|
1779
|
+
n(`headers = {"${v}": "${ce(y[v])}"}`), a();
|
|
1779
1780
|
});
|
|
1780
1781
|
else if (u > 1) {
|
|
1781
1782
|
let v = 1;
|
|
1782
|
-
n("headers = {"), Object.keys(
|
|
1783
|
-
n(v !== u ? `"${O}": "${ce(
|
|
1783
|
+
n("headers = {"), Object.keys(y).forEach((O) => {
|
|
1784
|
+
n(v !== u ? `"${O}": "${ce(y[O])}",` : `"${O}": "${ce(y[O])}"`, 1), v += 1;
|
|
1784
1785
|
}), n("}"), a();
|
|
1785
1786
|
}
|
|
1786
|
-
let d =
|
|
1787
|
+
let d = Ci.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1787
1788
|
return $ && (b ? d += ", json=payload" : d += ", data=payload"), g && (d += ", files=files"), u > 0 && (d += ", headers=headers"), d += ")", n(d), a(), n("print(response.text)"), s();
|
|
1788
1789
|
}
|
|
1789
1790
|
}, Ri = {
|
|
@@ -1794,7 +1795,7 @@ var Ie = (e, r, t) => {
|
|
|
1794
1795
|
cli: "python3 %s"
|
|
1795
1796
|
},
|
|
1796
1797
|
clientsById: {
|
|
1797
|
-
requests:
|
|
1798
|
+
requests: Ni
|
|
1798
1799
|
}
|
|
1799
1800
|
}, qi = {
|
|
1800
1801
|
info: {
|
|
@@ -1809,9 +1810,9 @@ var Ie = (e, r, t) => {
|
|
|
1809
1810
|
n("library(httr)"), a(), n(`url <- "${e}"`), a();
|
|
1810
1811
|
const c = r;
|
|
1811
1812
|
delete r.key;
|
|
1812
|
-
const
|
|
1813
|
+
const y = Object.keys(c).length;
|
|
1813
1814
|
t.length === 1 ? (n(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (n("queryString <- list("), Object.keys(c).forEach((p, S) => {
|
|
1814
|
-
S !==
|
|
1815
|
+
S !== y - 1 ? n(` ${p} = "${c[p].toString()}",`) : n(` ${p} = "${c[p].toString()}"`);
|
|
1815
1816
|
}), n(")"), a());
|
|
1816
1817
|
const f = JSON.stringify(o.text);
|
|
1817
1818
|
if (f && (n(`payload <- ${f}`), a()), o.text || o.jsonObj || o.params)
|
|
@@ -1829,13 +1830,13 @@ var Ie = (e, r, t) => {
|
|
|
1829
1830
|
n('encode <- "raw"'), a();
|
|
1830
1831
|
break;
|
|
1831
1832
|
}
|
|
1832
|
-
const
|
|
1833
|
+
const m = ve(i, "cookie"), g = ve(i, "accept"), $ = m ? `set_cookies(\`${String(m).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, b = g ? `accept("${ce(g)}")` : void 0, u = `content_type("${ce(o.mimeType)}")`, d = Object.entries(i).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, S]) => `'${p}' = '${ze(S)}'`).join(", "), v = d ? `add_headers(${d})` : void 0;
|
|
1833
1834
|
let O = `response <- VERB("${l}", url`;
|
|
1834
1835
|
f && (O += ", body = payload"), t.length && (O += ", query = queryString");
|
|
1835
1836
|
const T = [v, u, b, $].filter((p) => !!p).join(", ");
|
|
1836
1837
|
return T && (O += `, ${T}`), (o.text || o.jsonObj || o.params) && (O += ", encode = encode"), O += ")", n(O), a(), n('content(response, "text")'), s();
|
|
1837
1838
|
}
|
|
1838
|
-
},
|
|
1839
|
+
}, ki = {
|
|
1839
1840
|
info: {
|
|
1840
1841
|
key: "r",
|
|
1841
1842
|
title: "R",
|
|
@@ -1844,7 +1845,7 @@ var Ie = (e, r, t) => {
|
|
|
1844
1845
|
clientsById: {
|
|
1845
1846
|
httr: qi
|
|
1846
1847
|
}
|
|
1847
|
-
},
|
|
1848
|
+
}, Ei = {
|
|
1848
1849
|
info: {
|
|
1849
1850
|
key: "native",
|
|
1850
1851
|
title: "net::http",
|
|
@@ -1868,23 +1869,23 @@ var Ie = (e, r, t) => {
|
|
|
1868
1869
|
"UNLOCK",
|
|
1869
1870
|
"MOVE",
|
|
1870
1871
|
"TRACE"
|
|
1871
|
-
],
|
|
1872
|
-
c.includes(s) || (l(`class Net::HTTP::${
|
|
1872
|
+
], y = s.charAt(0) + s.substring(1).toLowerCase();
|
|
1873
|
+
c.includes(s) || (l(`class Net::HTTP::${y} < Net::HTTPRequest`), l(` METHOD = '${s.toUpperCase()}'`), l(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), l(" RESPONSE_HAS_BODY = true"), l("end"), n()), l(`url = URI("${t}")`), n(), l("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && l("http.use_ssl = true"), n(), l(`request = Net::HTTP::${y}.new(url)`);
|
|
1873
1874
|
const f = Object.keys(i);
|
|
1874
|
-
return f.length && f.forEach((
|
|
1875
|
-
l(`request["${
|
|
1875
|
+
return f.length && f.forEach((m) => {
|
|
1876
|
+
l(`request["${m}"] = '${ze(i[m])}'`);
|
|
1876
1877
|
}), o.text && l(`request.body = ${JSON.stringify(o.text)}`), n(), l("response = http.request(request)"), l("puts response.read_body"), a();
|
|
1877
1878
|
}
|
|
1878
|
-
},
|
|
1879
|
+
}, Ai = {
|
|
1879
1880
|
info: {
|
|
1880
1881
|
key: "ruby",
|
|
1881
1882
|
title: "Ruby",
|
|
1882
1883
|
default: "native"
|
|
1883
1884
|
},
|
|
1884
1885
|
clientsById: {
|
|
1885
|
-
native:
|
|
1886
|
+
native: Ei
|
|
1886
1887
|
}
|
|
1887
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1888
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Ii = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Li = {
|
|
1888
1889
|
"http1.0": "0",
|
|
1889
1890
|
"url ": "",
|
|
1890
1891
|
cookie: "b",
|
|
@@ -1894,13 +1895,13 @@ var Ie = (e, r, t) => {
|
|
|
1894
1895
|
header: "H",
|
|
1895
1896
|
insecure: "k",
|
|
1896
1897
|
request: "X"
|
|
1897
|
-
},
|
|
1898
|
+
}, Ui = (e) => (r) => {
|
|
1898
1899
|
if (e) {
|
|
1899
|
-
const t =
|
|
1900
|
+
const t = Li[r];
|
|
1900
1901
|
return t ? `-${t}` : "";
|
|
1901
1902
|
}
|
|
1902
1903
|
return `--${r}`;
|
|
1903
|
-
},
|
|
1904
|
+
}, Fi = {
|
|
1904
1905
|
info: {
|
|
1905
1906
|
key: "curl",
|
|
1906
1907
|
title: "cURL",
|
|
@@ -1910,13 +1911,13 @@ var Ie = (e, r, t) => {
|
|
|
1910
1911
|
},
|
|
1911
1912
|
convert: ({ fullUrl: e, method: r, httpVersion: t, headersObj: o, allHeaders: i, postData: l }, n = {}) => {
|
|
1912
1913
|
var u;
|
|
1913
|
-
const { indent: a = " ", short: s = !1, binary: c = !1, globOff:
|
|
1914
|
+
const { indent: a = " ", short: s = !1, binary: c = !1, globOff: y = !1 } = n, f = " ", { push: m, join: g } = new V({
|
|
1914
1915
|
...typeof a == "string" ? { indent: a } : {},
|
|
1915
1916
|
join: a !== !1 ? ` \\
|
|
1916
1917
|
${a}` : " "
|
|
1917
|
-
}), $ =
|
|
1918
|
+
}), $ = Ui(s);
|
|
1918
1919
|
let b = ue(e);
|
|
1919
|
-
if (
|
|
1920
|
+
if (m(`curl ${$("request")} ${r}`), y && (b = unescape(b), m($("globoff"))), m(`${$("url ")}${b}`), t === "HTTP/1.0" && m($("http1.0")), ve(i, "accept-encoding") && m("--compressed"), l.mimeType === "multipart/form-data") {
|
|
1920
1921
|
const d = pe(o, "content-type");
|
|
1921
1922
|
if (d) {
|
|
1922
1923
|
const v = o[d];
|
|
@@ -1928,28 +1929,28 @@ ${a}` : " "
|
|
|
1928
1929
|
}
|
|
1929
1930
|
switch (Object.keys(o).sort().forEach((d) => {
|
|
1930
1931
|
const v = `${d}: ${o[d]}`;
|
|
1931
|
-
|
|
1932
|
-
}), i.cookie &&
|
|
1932
|
+
m(`${$("header")} ${ue(v)}`);
|
|
1933
|
+
}), i.cookie && m(`${$("cookie")} ${ue(i.cookie)}`), l.mimeType) {
|
|
1933
1934
|
case "multipart/form-data":
|
|
1934
1935
|
(u = l.params) == null || u.forEach((v) => {
|
|
1935
1936
|
let O = "";
|
|
1936
|
-
v.fileName ? O = `${v.name}='@${v.fileName}'` : O = ue(`${v.name}=${v.value}`),
|
|
1937
|
+
v.fileName ? O = `${v.name}='@${v.fileName}'` : O = ue(`${v.name}=${v.value}`), m(`${$("form")} ${O}`);
|
|
1937
1938
|
});
|
|
1938
1939
|
break;
|
|
1939
1940
|
case "application/x-www-form-urlencoded":
|
|
1940
1941
|
l.params ? l.params.forEach((v) => {
|
|
1941
1942
|
const O = v.name, T = encodeURIComponent(v.name), p = T !== O, S = p ? T : O, x = c ? "--data-binary" : p ? "--data-urlencode" : $("data");
|
|
1942
|
-
|
|
1943
|
-
}) :
|
|
1943
|
+
m(`${x} ${ue(`${S}=${v.value}`)}`);
|
|
1944
|
+
}) : m(`${c ? "--data-binary" : $("data")} ${ue(l.text)}`);
|
|
1944
1945
|
break;
|
|
1945
1946
|
default:
|
|
1946
1947
|
if (!l.text)
|
|
1947
1948
|
break;
|
|
1948
1949
|
let d = !1;
|
|
1949
|
-
if (
|
|
1950
|
+
if (Ua(l.mimeType) && l.text.length > 20)
|
|
1950
1951
|
try {
|
|
1951
1952
|
const v = JSON.parse(l.text);
|
|
1952
|
-
d = !0, l.text.indexOf("'") > 0 ?
|
|
1953
|
+
d = !0, l.text.indexOf("'") > 0 ? m(
|
|
1953
1954
|
`${c ? "--data-binary" : $("data")} @- <<EOF
|
|
1954
1955
|
${JSON.stringify(
|
|
1955
1956
|
v,
|
|
@@ -1957,18 +1958,18 @@ ${JSON.stringify(
|
|
|
1957
1958
|
f
|
|
1958
1959
|
)}
|
|
1959
1960
|
EOF`
|
|
1960
|
-
) :
|
|
1961
|
+
) : m(
|
|
1961
1962
|
`${c ? "--data-binary" : $("data")} '
|
|
1962
1963
|
${JSON.stringify(v, null, f)}
|
|
1963
1964
|
'`
|
|
1964
1965
|
);
|
|
1965
1966
|
} catch {
|
|
1966
1967
|
}
|
|
1967
|
-
d ||
|
|
1968
|
+
d || m(`${c ? "--data-binary" : $("data")} ${ue(l.text)}`);
|
|
1968
1969
|
}
|
|
1969
1970
|
return g();
|
|
1970
1971
|
}
|
|
1971
|
-
},
|
|
1972
|
+
}, _i = {
|
|
1972
1973
|
info: {
|
|
1973
1974
|
key: "httpie",
|
|
1974
1975
|
title: "HTTPie",
|
|
@@ -1992,32 +1993,32 @@ ${JSON.stringify(v, null, f)}
|
|
|
1992
1993
|
verbose: !1,
|
|
1993
1994
|
verify: !1,
|
|
1994
1995
|
...n
|
|
1995
|
-
}, { push: s, join: c, unshift:
|
|
1996
|
+
}, { push: s, join: c, unshift: y } = new V({
|
|
1996
1997
|
indent: a.indent,
|
|
1997
1998
|
// @ts-expect-error SEEMS LEGIT
|
|
1998
1999
|
join: a.indent !== !1 ? ` \\
|
|
1999
2000
|
${a.indent}` : " "
|
|
2000
2001
|
});
|
|
2001
2002
|
let f = !1;
|
|
2002
|
-
const
|
|
2003
|
-
a.headers &&
|
|
2003
|
+
const m = [];
|
|
2004
|
+
a.headers && m.push(a.short ? "-h" : "--headers"), a.body && m.push(a.short ? "-b" : "--body"), a.verbose && m.push(a.short ? "-v" : "--verbose"), a.print && m.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && m.push(`--verify=${a.verify}`), a.cert && m.push(`--cert=${a.cert}`), a.pretty && m.push(`--pretty=${a.pretty}`), a.style && m.push(`--style=${a.style}`), a.timeout && m.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach(($) => {
|
|
2004
2005
|
const b = t[$];
|
|
2005
2006
|
Array.isArray(b) ? b.forEach((u) => {
|
|
2006
2007
|
s(`${$}==${ue(u)}`);
|
|
2007
2008
|
}) : s(`${$}==${ue(b)}`);
|
|
2008
2009
|
}), Object.keys(e).sort().forEach(($) => {
|
|
2009
2010
|
s(`${$}:${ue(e[$])}`);
|
|
2010
|
-
}), r.mimeType === "application/x-www-form-urlencoded" ? r.params && r.params.length && (
|
|
2011
|
+
}), r.mimeType === "application/x-www-form-urlencoded" ? r.params && r.params.length && (m.push(a.short ? "-f" : "--form"), r.params.forEach(($) => {
|
|
2011
2012
|
s(`${$.name}=${ue($.value)}`);
|
|
2012
2013
|
})) : f = !0;
|
|
2013
|
-
const g =
|
|
2014
|
-
if (l = ue(a.queryParams ? l : o),
|
|
2014
|
+
const g = m.length ? `${m.join(" ")} ` : "";
|
|
2015
|
+
if (l = ue(a.queryParams ? l : o), y(`http ${g}${i} ${l}`), f && r.text) {
|
|
2015
2016
|
const $ = ue(r.text);
|
|
2016
|
-
|
|
2017
|
+
y(`echo ${$} | `);
|
|
2017
2018
|
}
|
|
2018
2019
|
return c();
|
|
2019
2020
|
}
|
|
2020
|
-
},
|
|
2021
|
+
}, Bi = {
|
|
2021
2022
|
info: {
|
|
2022
2023
|
key: "wget",
|
|
2023
2024
|
title: "Wget",
|
|
@@ -2039,9 +2040,9 @@ ${l.indent}` : " "
|
|
|
2039
2040
|
return l.verbose ? n(`wget ${l.short ? "-v" : "--verbose"}`) : n(`wget ${l.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((s) => {
|
|
2040
2041
|
const c = `${s}: ${t[s]}`;
|
|
2041
2042
|
n(`--header ${ue(c)}`);
|
|
2042
|
-
}), r.text && n(`--body-data ${
|
|
2043
|
+
}), r.text && n(`--body-data ${Ii(ue(r.text))}`), n(l.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2043
2044
|
}
|
|
2044
|
-
},
|
|
2045
|
+
}, Hi = {
|
|
2045
2046
|
info: {
|
|
2046
2047
|
key: "shell",
|
|
2047
2048
|
title: "Shell",
|
|
@@ -2049,9 +2050,9 @@ ${l.indent}` : " "
|
|
|
2049
2050
|
cli: "%s"
|
|
2050
2051
|
},
|
|
2051
2052
|
clientsById: {
|
|
2052
|
-
curl:
|
|
2053
|
-
httpie:
|
|
2054
|
-
wget:
|
|
2053
|
+
curl: Fi,
|
|
2054
|
+
httpie: _i,
|
|
2055
|
+
wget: Bi
|
|
2055
2056
|
}
|
|
2056
2057
|
}, tn = (e, r) => r.repeat(e), rn = (e, r, t, o) => {
|
|
2057
2058
|
const i = tn(o, t), l = tn(o - 1, t), n = r ? `,
|
|
@@ -2086,7 +2087,7 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2086
2087
|
default:
|
|
2087
2088
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2088
2089
|
}
|
|
2089
|
-
},
|
|
2090
|
+
}, Mi = {
|
|
2090
2091
|
info: {
|
|
2091
2092
|
key: "urlsession",
|
|
2092
2093
|
title: "URLSession",
|
|
@@ -2095,7 +2096,7 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2095
2096
|
extname: ".swift"
|
|
2096
2097
|
},
|
|
2097
2098
|
convert: ({ allHeaders: e, postData: r, uriObj: t, queryObj: o, method: i }, l) => {
|
|
2098
|
-
var
|
|
2099
|
+
var m;
|
|
2099
2100
|
const n = {
|
|
2100
2101
|
indent: " ",
|
|
2101
2102
|
pretty: !0,
|
|
@@ -2103,11 +2104,11 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2103
2104
|
...l
|
|
2104
2105
|
}, { push: a, blank: s, join: c } = new V({ indent: n.indent });
|
|
2105
2106
|
a("import Foundation"), s();
|
|
2106
|
-
const
|
|
2107
|
-
if (
|
|
2107
|
+
const y = r.text || r.jsonObj || r.params;
|
|
2108
|
+
if (y)
|
|
2108
2109
|
switch (r.mimeType) {
|
|
2109
2110
|
case "application/x-www-form-urlencoded":
|
|
2110
|
-
if ((
|
|
2111
|
+
if ((m = r.params) != null && m.length) {
|
|
2111
2112
|
const g = r.params.map(($) => `"${$.name}": "${$.value}"`);
|
|
2112
2113
|
n.pretty ? (a("let parameters = ["), g.forEach(($) => a(`${$},`, 1)), a("]")) : a(`let parameters = [${g.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), s();
|
|
2113
2114
|
}
|
|
@@ -2135,125 +2136,125 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2135
2136
|
});
|
|
2136
2137
|
break;
|
|
2137
2138
|
}
|
|
2138
|
-
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), s(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`),
|
|
2139
|
+
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), s(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`), y && a("request.httpBody = postData"), s(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2139
2140
|
}
|
|
2140
|
-
},
|
|
2141
|
+
}, zi = {
|
|
2141
2142
|
info: {
|
|
2142
2143
|
key: "swift",
|
|
2143
2144
|
title: "Swift",
|
|
2144
2145
|
default: "urlsession"
|
|
2145
2146
|
},
|
|
2146
2147
|
clientsById: {
|
|
2147
|
-
urlsession:
|
|
2148
|
+
urlsession: Mi
|
|
2148
2149
|
}
|
|
2149
|
-
},
|
|
2150
|
-
c:
|
|
2151
|
-
clojure:
|
|
2152
|
-
csharp:
|
|
2153
|
-
go:
|
|
2154
|
-
http:
|
|
2155
|
-
java:
|
|
2156
|
-
javascript:
|
|
2157
|
-
json:
|
|
2158
|
-
kotlin:
|
|
2159
|
-
node:
|
|
2160
|
-
objc:
|
|
2161
|
-
ocaml:
|
|
2162
|
-
php:
|
|
2163
|
-
powershell:
|
|
2150
|
+
}, Gi = {
|
|
2151
|
+
c: La,
|
|
2152
|
+
clojure: Ba,
|
|
2153
|
+
csharp: Wa,
|
|
2154
|
+
go: Va,
|
|
2155
|
+
http: Qa,
|
|
2156
|
+
java: ei,
|
|
2157
|
+
javascript: ai,
|
|
2158
|
+
json: si,
|
|
2159
|
+
kotlin: ci,
|
|
2160
|
+
node: yi,
|
|
2161
|
+
objc: gi,
|
|
2162
|
+
ocaml: bi,
|
|
2163
|
+
php: Si,
|
|
2164
|
+
powershell: Pi,
|
|
2164
2165
|
python: Ri,
|
|
2165
|
-
r:
|
|
2166
|
-
ruby:
|
|
2167
|
-
shell:
|
|
2168
|
-
swift:
|
|
2169
|
-
},
|
|
2166
|
+
r: ki,
|
|
2167
|
+
ruby: Ai,
|
|
2168
|
+
shell: Hi,
|
|
2169
|
+
swift: zi
|
|
2170
|
+
}, Ce = {}, _e = { exports: {} };
|
|
2170
2171
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2171
|
-
var
|
|
2172
|
-
function
|
|
2172
|
+
var Wi = _e.exports, on;
|
|
2173
|
+
function Ji() {
|
|
2173
2174
|
return on || (on = 1, function(e, r) {
|
|
2174
2175
|
(function(t) {
|
|
2175
2176
|
var o = r && !r.nodeType && r, i = e && !e.nodeType && e, l = typeof Ze == "object" && Ze;
|
|
2176
2177
|
(l.global === l || l.window === l || l.self === l) && (t = l);
|
|
2177
|
-
var n, a = 2147483647, s = 36, c = 1,
|
|
2178
|
+
var n, a = 2147483647, s = 36, c = 1, y = 26, f = 38, m = 700, g = 72, $ = 128, b = "-", u = /^xn--/, d = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, O = {
|
|
2178
2179
|
overflow: "Overflow: input needs wider integers to process",
|
|
2179
2180
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2180
2181
|
"invalid-input": "Invalid input"
|
|
2181
2182
|
}, T = s - c, p = Math.floor, S = String.fromCharCode, x;
|
|
2182
|
-
function
|
|
2183
|
-
throw new RangeError(O[
|
|
2183
|
+
function R(N) {
|
|
2184
|
+
throw new RangeError(O[N]);
|
|
2184
2185
|
}
|
|
2185
|
-
function L(
|
|
2186
|
-
for (var U =
|
|
2187
|
-
C[U] = N
|
|
2186
|
+
function L(N, q) {
|
|
2187
|
+
for (var U = N.length, C = []; U--; )
|
|
2188
|
+
C[U] = q(N[U]);
|
|
2188
2189
|
return C;
|
|
2189
2190
|
}
|
|
2190
|
-
function E(
|
|
2191
|
-
var U =
|
|
2192
|
-
U.length > 1 && (C = U[0] + "@",
|
|
2193
|
-
var I =
|
|
2191
|
+
function E(N, q) {
|
|
2192
|
+
var U = N.split("@"), C = "";
|
|
2193
|
+
U.length > 1 && (C = U[0] + "@", N = U[1]), N = N.replace(v, ".");
|
|
2194
|
+
var I = N.split("."), W = L(I, q).join(".");
|
|
2194
2195
|
return C + W;
|
|
2195
2196
|
}
|
|
2196
|
-
function B(
|
|
2197
|
-
for (var
|
|
2198
|
-
I =
|
|
2199
|
-
return
|
|
2197
|
+
function B(N) {
|
|
2198
|
+
for (var q = [], U = 0, C = N.length, I, W; U < C; )
|
|
2199
|
+
I = N.charCodeAt(U++), I >= 55296 && I <= 56319 && U < C ? (W = N.charCodeAt(U++), (W & 64512) == 56320 ? q.push(((I & 1023) << 10) + (W & 1023) + 65536) : (q.push(I), U--)) : q.push(I);
|
|
2200
|
+
return q;
|
|
2200
2201
|
}
|
|
2201
|
-
function P(
|
|
2202
|
-
return L(
|
|
2202
|
+
function P(N) {
|
|
2203
|
+
return L(N, function(q) {
|
|
2203
2204
|
var U = "";
|
|
2204
|
-
return
|
|
2205
|
+
return q > 65535 && (q -= 65536, U += S(q >>> 10 & 1023 | 55296), q = 56320 | q & 1023), U += S(q), U;
|
|
2205
2206
|
}).join("");
|
|
2206
2207
|
}
|
|
2207
|
-
function ae(
|
|
2208
|
-
return
|
|
2208
|
+
function ae(N) {
|
|
2209
|
+
return N - 48 < 10 ? N - 22 : N - 65 < 26 ? N - 65 : N - 97 < 26 ? N - 97 : s;
|
|
2209
2210
|
}
|
|
2210
|
-
function H(
|
|
2211
|
-
return
|
|
2211
|
+
function H(N, q) {
|
|
2212
|
+
return N + 22 + 75 * (N < 26) - ((q != 0) << 5);
|
|
2212
2213
|
}
|
|
2213
|
-
function D(
|
|
2214
|
+
function D(N, q, U) {
|
|
2214
2215
|
var C = 0;
|
|
2215
|
-
for (
|
|
2216
|
-
|
|
2217
|
-
return p(C + (T + 1) *
|
|
2216
|
+
for (N = U ? p(N / m) : N >> 1, N += p(N / q); N > T * y >> 1; C += s)
|
|
2217
|
+
N = p(N / T);
|
|
2218
|
+
return p(C + (T + 1) * N / (N + f));
|
|
2218
2219
|
}
|
|
2219
|
-
function
|
|
2220
|
-
var
|
|
2221
|
-
for (K =
|
|
2222
|
-
|
|
2220
|
+
function le(N) {
|
|
2221
|
+
var q = [], U = N.length, C, I = 0, W = $, z = g, K, ne, J, A, F, _, Q, G, Y;
|
|
2222
|
+
for (K = N.lastIndexOf(b), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
|
|
2223
|
+
N.charCodeAt(ne) >= 128 && R("not-basic"), q.push(N.charCodeAt(ne));
|
|
2223
2224
|
for (J = K > 0 ? K + 1 : 0; J < U; ) {
|
|
2224
|
-
for (A = I, F = 1, _ = s; J >= U &&
|
|
2225
|
-
Y = s - G, F > p(a / Y) &&
|
|
2226
|
-
C =
|
|
2225
|
+
for (A = I, F = 1, _ = s; J >= U && R("invalid-input"), Q = ae(N.charCodeAt(J++)), (Q >= s || Q > p((a - I) / F)) && R("overflow"), I += Q * F, G = _ <= z ? c : _ >= z + y ? y : _ - z, !(Q < G); _ += s)
|
|
2226
|
+
Y = s - G, F > p(a / Y) && R("overflow"), F *= Y;
|
|
2227
|
+
C = q.length + 1, z = D(I - A, C, A == 0), p(I / C) > a - W && R("overflow"), W += p(I / C), I %= C, q.splice(I++, 0, W);
|
|
2227
2228
|
}
|
|
2228
|
-
return P(
|
|
2229
|
+
return P(q);
|
|
2229
2230
|
}
|
|
2230
|
-
function Z(
|
|
2231
|
-
var
|
|
2232
|
-
for (
|
|
2233
|
-
F =
|
|
2231
|
+
function Z(N) {
|
|
2232
|
+
var q, U, C, I, W, z, K, ne, J, A, F, _ = [], Q, G, Y, oe;
|
|
2233
|
+
for (N = B(N), Q = N.length, q = $, U = 0, W = g, z = 0; z < Q; ++z)
|
|
2234
|
+
F = N[z], F < 128 && _.push(S(F));
|
|
2234
2235
|
for (C = I = _.length, I && _.push(b); C < Q; ) {
|
|
2235
2236
|
for (K = a, z = 0; z < Q; ++z)
|
|
2236
|
-
F =
|
|
2237
|
-
for (G = C + 1, K -
|
|
2238
|
-
if (F =
|
|
2239
|
-
for (ne = U, J = s; A = J <= W ? c : J >= W +
|
|
2237
|
+
F = N[z], F >= q && F < K && (K = F);
|
|
2238
|
+
for (G = C + 1, K - q > p((a - U) / G) && R("overflow"), U += (K - q) * G, q = K, z = 0; z < Q; ++z)
|
|
2239
|
+
if (F = N[z], F < q && ++U > a && R("overflow"), F == q) {
|
|
2240
|
+
for (ne = U, J = s; A = J <= W ? c : J >= W + y ? y : J - W, !(ne < A); J += s)
|
|
2240
2241
|
oe = ne - A, Y = s - A, _.push(
|
|
2241
2242
|
S(H(A + oe % Y, 0))
|
|
2242
2243
|
), ne = p(oe / Y);
|
|
2243
2244
|
_.push(S(H(ne, 0))), W = D(U, G, C == I), U = 0, ++C;
|
|
2244
2245
|
}
|
|
2245
|
-
++U, ++
|
|
2246
|
+
++U, ++q;
|
|
2246
2247
|
}
|
|
2247
2248
|
return _.join("");
|
|
2248
2249
|
}
|
|
2249
|
-
function k(
|
|
2250
|
-
return E(
|
|
2251
|
-
return u.test(
|
|
2250
|
+
function k(N) {
|
|
2251
|
+
return E(N, function(q) {
|
|
2252
|
+
return u.test(q) ? le(q.slice(4).toLowerCase()) : q;
|
|
2252
2253
|
});
|
|
2253
2254
|
}
|
|
2254
|
-
function re(
|
|
2255
|
-
return E(
|
|
2256
|
-
return d.test(
|
|
2255
|
+
function re(N) {
|
|
2256
|
+
return E(N, function(q) {
|
|
2257
|
+
return d.test(q) ? "xn--" + Z(q) : q;
|
|
2257
2258
|
});
|
|
2258
2259
|
}
|
|
2259
2260
|
if (n = {
|
|
@@ -2274,7 +2275,7 @@ function Wi() {
|
|
|
2274
2275
|
decode: B,
|
|
2275
2276
|
encode: P
|
|
2276
2277
|
},
|
|
2277
|
-
decode:
|
|
2278
|
+
decode: le,
|
|
2278
2279
|
encode: Z,
|
|
2279
2280
|
toASCII: re,
|
|
2280
2281
|
toUnicode: k
|
|
@@ -2286,31 +2287,31 @@ function Wi() {
|
|
|
2286
2287
|
n.hasOwnProperty(x) && (o[x] = n[x]);
|
|
2287
2288
|
else
|
|
2288
2289
|
t.punycode = n;
|
|
2289
|
-
})(
|
|
2290
|
+
})(Wi);
|
|
2290
2291
|
}(_e, _e.exports)), _e.exports;
|
|
2291
2292
|
}
|
|
2292
2293
|
var bt, an;
|
|
2293
|
-
function
|
|
2294
|
+
function yo() {
|
|
2294
2295
|
return an || (an = 1, bt = Object), bt;
|
|
2295
2296
|
}
|
|
2296
2297
|
var xt, sn;
|
|
2297
|
-
function
|
|
2298
|
+
function Vi() {
|
|
2298
2299
|
return sn || (sn = 1, xt = Error), xt;
|
|
2299
2300
|
}
|
|
2300
2301
|
var $t, ln;
|
|
2301
|
-
function
|
|
2302
|
+
function Di() {
|
|
2302
2303
|
return ln || (ln = 1, $t = EvalError), $t;
|
|
2303
2304
|
}
|
|
2304
2305
|
var jt, cn;
|
|
2305
|
-
function
|
|
2306
|
+
function Qi() {
|
|
2306
2307
|
return cn || (cn = 1, jt = RangeError), jt;
|
|
2307
2308
|
}
|
|
2308
2309
|
var wt, un;
|
|
2309
|
-
function
|
|
2310
|
+
function Ki() {
|
|
2310
2311
|
return un || (un = 1, wt = ReferenceError), wt;
|
|
2311
2312
|
}
|
|
2312
2313
|
var St, fn;
|
|
2313
|
-
function
|
|
2314
|
+
function mo() {
|
|
2314
2315
|
return fn || (fn = 1, St = SyntaxError), St;
|
|
2315
2316
|
}
|
|
2316
2317
|
var Ot, pn;
|
|
@@ -2318,57 +2319,57 @@ function We() {
|
|
|
2318
2319
|
return pn || (pn = 1, Ot = TypeError), Ot;
|
|
2319
2320
|
}
|
|
2320
2321
|
var Tt, dn;
|
|
2321
|
-
function
|
|
2322
|
+
function Yi() {
|
|
2322
2323
|
return dn || (dn = 1, Tt = URIError), Tt;
|
|
2323
2324
|
}
|
|
2324
2325
|
var Pt, hn;
|
|
2325
|
-
function
|
|
2326
|
+
function Xi() {
|
|
2326
2327
|
return hn || (hn = 1, Pt = Math.abs), Pt;
|
|
2327
2328
|
}
|
|
2328
2329
|
var Ct, yn;
|
|
2329
|
-
function Xi() {
|
|
2330
|
-
return yn || (yn = 1, Ct = Math.floor), Ct;
|
|
2331
|
-
}
|
|
2332
|
-
var Rt, mn;
|
|
2333
2330
|
function Zi() {
|
|
2334
|
-
return
|
|
2331
|
+
return yn || (yn = 1, Ct = Math.floor), Ct;
|
|
2335
2332
|
}
|
|
2336
|
-
var
|
|
2333
|
+
var Nt, mn;
|
|
2337
2334
|
function es() {
|
|
2338
|
-
return
|
|
2335
|
+
return mn || (mn = 1, Nt = Math.max), Nt;
|
|
2339
2336
|
}
|
|
2340
|
-
var
|
|
2337
|
+
var Rt, gn;
|
|
2341
2338
|
function ts() {
|
|
2342
|
-
return
|
|
2339
|
+
return gn || (gn = 1, Rt = Math.min), Rt;
|
|
2343
2340
|
}
|
|
2344
|
-
var
|
|
2341
|
+
var qt, vn;
|
|
2345
2342
|
function rs() {
|
|
2343
|
+
return vn || (vn = 1, qt = Math.pow), qt;
|
|
2344
|
+
}
|
|
2345
|
+
var kt, bn;
|
|
2346
|
+
function ns() {
|
|
2346
2347
|
return bn || (bn = 1, kt = Math.round), kt;
|
|
2347
2348
|
}
|
|
2348
2349
|
var Et, xn;
|
|
2349
|
-
function
|
|
2350
|
+
function os() {
|
|
2350
2351
|
return xn || (xn = 1, Et = Number.isNaN || function(r) {
|
|
2351
2352
|
return r !== r;
|
|
2352
2353
|
}), Et;
|
|
2353
2354
|
}
|
|
2354
2355
|
var At, $n;
|
|
2355
|
-
function
|
|
2356
|
+
function as() {
|
|
2356
2357
|
if ($n) return At;
|
|
2357
2358
|
$n = 1;
|
|
2358
|
-
var e = /* @__PURE__ */
|
|
2359
|
+
var e = /* @__PURE__ */ os();
|
|
2359
2360
|
return At = function(t) {
|
|
2360
2361
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2361
2362
|
}, At;
|
|
2362
2363
|
}
|
|
2363
2364
|
var It, jn;
|
|
2364
|
-
function
|
|
2365
|
+
function is() {
|
|
2365
2366
|
return jn || (jn = 1, It = Object.getOwnPropertyDescriptor), It;
|
|
2366
2367
|
}
|
|
2367
2368
|
var Lt, wn;
|
|
2368
2369
|
function ot() {
|
|
2369
2370
|
if (wn) return Lt;
|
|
2370
2371
|
wn = 1;
|
|
2371
|
-
var e = /* @__PURE__ */
|
|
2372
|
+
var e = /* @__PURE__ */ is();
|
|
2372
2373
|
if (e)
|
|
2373
2374
|
try {
|
|
2374
2375
|
e([], "length");
|
|
@@ -2391,7 +2392,7 @@ function at() {
|
|
|
2391
2392
|
return Ut = e, Ut;
|
|
2392
2393
|
}
|
|
2393
2394
|
var Ft, On;
|
|
2394
|
-
function
|
|
2395
|
+
function ss() {
|
|
2395
2396
|
return On || (On = 1, Ft = function() {
|
|
2396
2397
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2397
2398
|
return !1;
|
|
@@ -2421,63 +2422,63 @@ function is() {
|
|
|
2421
2422
|
}), Ft;
|
|
2422
2423
|
}
|
|
2423
2424
|
var _t, Tn;
|
|
2424
|
-
function
|
|
2425
|
+
function ls() {
|
|
2425
2426
|
if (Tn) return _t;
|
|
2426
2427
|
Tn = 1;
|
|
2427
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2428
|
+
var e = typeof Symbol < "u" && Symbol, r = ss();
|
|
2428
2429
|
return _t = function() {
|
|
2429
2430
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2430
2431
|
}, _t;
|
|
2431
2432
|
}
|
|
2432
2433
|
var Bt, Pn;
|
|
2433
|
-
function
|
|
2434
|
+
function go() {
|
|
2434
2435
|
return Pn || (Pn = 1, Bt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Bt;
|
|
2435
2436
|
}
|
|
2436
2437
|
var Ht, Cn;
|
|
2437
|
-
function
|
|
2438
|
+
function vo() {
|
|
2438
2439
|
if (Cn) return Ht;
|
|
2439
2440
|
Cn = 1;
|
|
2440
|
-
var e = /* @__PURE__ */
|
|
2441
|
+
var e = /* @__PURE__ */ yo();
|
|
2441
2442
|
return Ht = e.getPrototypeOf || null, Ht;
|
|
2442
2443
|
}
|
|
2443
|
-
var Mt,
|
|
2444
|
-
function
|
|
2445
|
-
if (
|
|
2446
|
-
|
|
2444
|
+
var Mt, Nn;
|
|
2445
|
+
function cs() {
|
|
2446
|
+
if (Nn) return Mt;
|
|
2447
|
+
Nn = 1;
|
|
2447
2448
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", i = function(s, c) {
|
|
2448
|
-
for (var
|
|
2449
|
-
|
|
2450
|
-
for (var
|
|
2451
|
-
|
|
2452
|
-
return
|
|
2449
|
+
for (var y = [], f = 0; f < s.length; f += 1)
|
|
2450
|
+
y[f] = s[f];
|
|
2451
|
+
for (var m = 0; m < c.length; m += 1)
|
|
2452
|
+
y[m + s.length] = c[m];
|
|
2453
|
+
return y;
|
|
2453
2454
|
}, l = function(s, c) {
|
|
2454
|
-
for (var
|
|
2455
|
-
|
|
2456
|
-
return
|
|
2455
|
+
for (var y = [], f = c, m = 0; f < s.length; f += 1, m += 1)
|
|
2456
|
+
y[m] = s[f];
|
|
2457
|
+
return y;
|
|
2457
2458
|
}, n = function(a, s) {
|
|
2458
|
-
for (var c = "",
|
|
2459
|
-
c += a[
|
|
2459
|
+
for (var c = "", y = 0; y < a.length; y += 1)
|
|
2460
|
+
c += a[y], y + 1 < a.length && (c += s);
|
|
2460
2461
|
return c;
|
|
2461
2462
|
};
|
|
2462
2463
|
return Mt = function(s) {
|
|
2463
2464
|
var c = this;
|
|
2464
2465
|
if (typeof c != "function" || r.apply(c) !== o)
|
|
2465
2466
|
throw new TypeError(e + c);
|
|
2466
|
-
for (var
|
|
2467
|
+
for (var y = l(arguments, 1), f, m = function() {
|
|
2467
2468
|
if (this instanceof f) {
|
|
2468
2469
|
var d = c.apply(
|
|
2469
2470
|
this,
|
|
2470
|
-
i(
|
|
2471
|
+
i(y, arguments)
|
|
2471
2472
|
);
|
|
2472
2473
|
return Object(d) === d ? d : this;
|
|
2473
2474
|
}
|
|
2474
2475
|
return c.apply(
|
|
2475
2476
|
s,
|
|
2476
|
-
i(
|
|
2477
|
+
i(y, arguments)
|
|
2477
2478
|
);
|
|
2478
|
-
}, g = t(0, c.length -
|
|
2479
|
+
}, g = t(0, c.length - y.length), $ = [], b = 0; b < g; b++)
|
|
2479
2480
|
$[b] = "$" + b;
|
|
2480
|
-
if (f = Function("binder", "return function (" + n($, ",") + "){ return binder.apply(this,arguments); }")(
|
|
2481
|
+
if (f = Function("binder", "return function (" + n($, ",") + "){ return binder.apply(this,arguments); }")(m), c.prototype) {
|
|
2481
2482
|
var u = function() {
|
|
2482
2483
|
};
|
|
2483
2484
|
u.prototype = c.prototype, f.prototype = new u(), u.prototype = null;
|
|
@@ -2485,37 +2486,37 @@ function ls() {
|
|
|
2485
2486
|
return f;
|
|
2486
2487
|
}, Mt;
|
|
2487
2488
|
}
|
|
2488
|
-
var zt,
|
|
2489
|
+
var zt, Rn;
|
|
2489
2490
|
function Je() {
|
|
2490
|
-
if (
|
|
2491
|
-
|
|
2492
|
-
var e =
|
|
2491
|
+
if (Rn) return zt;
|
|
2492
|
+
Rn = 1;
|
|
2493
|
+
var e = cs();
|
|
2493
2494
|
return zt = Function.prototype.bind || e, zt;
|
|
2494
2495
|
}
|
|
2495
|
-
var Gt,
|
|
2496
|
-
function
|
|
2497
|
-
return
|
|
2496
|
+
var Gt, qn;
|
|
2497
|
+
function Tr() {
|
|
2498
|
+
return qn || (qn = 1, Gt = Function.prototype.call), Gt;
|
|
2498
2499
|
}
|
|
2499
2500
|
var Wt, kn;
|
|
2500
|
-
function
|
|
2501
|
+
function Pr() {
|
|
2501
2502
|
return kn || (kn = 1, Wt = Function.prototype.apply), Wt;
|
|
2502
2503
|
}
|
|
2503
2504
|
var Jt, En;
|
|
2504
|
-
function
|
|
2505
|
+
function us() {
|
|
2505
2506
|
return En || (En = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
|
|
2506
2507
|
}
|
|
2507
2508
|
var Vt, An;
|
|
2508
|
-
function
|
|
2509
|
+
function bo() {
|
|
2509
2510
|
if (An) return Vt;
|
|
2510
2511
|
An = 1;
|
|
2511
|
-
var e = Je(), r =
|
|
2512
|
+
var e = Je(), r = Pr(), t = Tr(), o = us();
|
|
2512
2513
|
return Vt = o || e.call(t, r), Vt;
|
|
2513
2514
|
}
|
|
2514
2515
|
var Dt, In;
|
|
2515
|
-
function
|
|
2516
|
+
function xo() {
|
|
2516
2517
|
if (In) return Dt;
|
|
2517
2518
|
In = 1;
|
|
2518
|
-
var e = Je(), r = /* @__PURE__ */ We(), t =
|
|
2519
|
+
var e = Je(), r = /* @__PURE__ */ We(), t = Tr(), o = bo();
|
|
2519
2520
|
return Dt = function(l) {
|
|
2520
2521
|
if (l.length < 1 || typeof l[0] != "function")
|
|
2521
2522
|
throw new r("a function is required");
|
|
@@ -2523,10 +2524,10 @@ function go() {
|
|
|
2523
2524
|
}, Dt;
|
|
2524
2525
|
}
|
|
2525
2526
|
var Qt, Ln;
|
|
2526
|
-
function
|
|
2527
|
+
function fs() {
|
|
2527
2528
|
if (Ln) return Qt;
|
|
2528
2529
|
Ln = 1;
|
|
2529
|
-
var e =
|
|
2530
|
+
var e = xo(), r = /* @__PURE__ */ ot(), t;
|
|
2530
2531
|
try {
|
|
2531
2532
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2532
2533
|
[].__proto__ === Array.prototype;
|
|
@@ -2547,10 +2548,10 @@ function us() {
|
|
|
2547
2548
|
) : !1, Qt;
|
|
2548
2549
|
}
|
|
2549
2550
|
var Kt, Un;
|
|
2550
|
-
function
|
|
2551
|
+
function ps() {
|
|
2551
2552
|
if (Un) return Kt;
|
|
2552
2553
|
Un = 1;
|
|
2553
|
-
var e =
|
|
2554
|
+
var e = go(), r = vo(), t = /* @__PURE__ */ fs();
|
|
2554
2555
|
return Kt = e ? function(i) {
|
|
2555
2556
|
return e(i);
|
|
2556
2557
|
} : r ? function(i) {
|
|
@@ -2562,17 +2563,17 @@ function fs() {
|
|
|
2562
2563
|
} : null, Kt;
|
|
2563
2564
|
}
|
|
2564
2565
|
var Yt, Fn;
|
|
2565
|
-
function
|
|
2566
|
+
function ds() {
|
|
2566
2567
|
if (Fn) return Yt;
|
|
2567
2568
|
Fn = 1;
|
|
2568
2569
|
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
|
|
2569
2570
|
return Yt = t.call(e, r), Yt;
|
|
2570
2571
|
}
|
|
2571
2572
|
var Xt, _n;
|
|
2572
|
-
function
|
|
2573
|
+
function Cr() {
|
|
2573
2574
|
if (_n) return Xt;
|
|
2574
2575
|
_n = 1;
|
|
2575
|
-
var e, r = /* @__PURE__ */
|
|
2576
|
+
var e, r = /* @__PURE__ */ yo(), t = /* @__PURE__ */ Vi(), o = /* @__PURE__ */ Di(), i = /* @__PURE__ */ Qi(), l = /* @__PURE__ */ Ki(), n = /* @__PURE__ */ mo(), a = /* @__PURE__ */ We(), s = /* @__PURE__ */ Yi(), c = /* @__PURE__ */ Xi(), y = /* @__PURE__ */ Zi(), f = /* @__PURE__ */ es(), m = /* @__PURE__ */ ts(), g = /* @__PURE__ */ rs(), $ = /* @__PURE__ */ ns(), b = /* @__PURE__ */ as(), u = Function, d = function(J) {
|
|
2576
2577
|
try {
|
|
2577
2578
|
return u('"use strict"; return (' + J + ").constructor;")();
|
|
2578
2579
|
} catch {
|
|
@@ -2589,7 +2590,7 @@ function Pr() {
|
|
|
2589
2590
|
return T;
|
|
2590
2591
|
}
|
|
2591
2592
|
}
|
|
2592
|
-
}() : T, S =
|
|
2593
|
+
}() : T, S = ls()(), x = ps(), R = vo(), L = go(), E = Pr(), B = Tr(), P = {}, ae = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), H = {
|
|
2593
2594
|
__proto__: null,
|
|
2594
2595
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2595
2596
|
"%Array%": Array,
|
|
@@ -2662,11 +2663,11 @@ function Pr() {
|
|
|
2662
2663
|
"%Function.prototype.call%": B,
|
|
2663
2664
|
"%Function.prototype.apply%": E,
|
|
2664
2665
|
"%Object.defineProperty%": O,
|
|
2665
|
-
"%Object.getPrototypeOf%":
|
|
2666
|
+
"%Object.getPrototypeOf%": R,
|
|
2666
2667
|
"%Math.abs%": c,
|
|
2667
|
-
"%Math.floor%":
|
|
2668
|
+
"%Math.floor%": y,
|
|
2668
2669
|
"%Math.max%": f,
|
|
2669
|
-
"%Math.min%":
|
|
2670
|
+
"%Math.min%": m,
|
|
2670
2671
|
"%Math.pow%": g,
|
|
2671
2672
|
"%Math.round%": $,
|
|
2672
2673
|
"%Math.sign%": b,
|
|
@@ -2679,7 +2680,7 @@ function Pr() {
|
|
|
2679
2680
|
var D = x(x(J));
|
|
2680
2681
|
H["%Error.prototype%"] = D;
|
|
2681
2682
|
}
|
|
2682
|
-
var
|
|
2683
|
+
var le = function J(A) {
|
|
2683
2684
|
var F;
|
|
2684
2685
|
if (A === "%AsyncFunction%")
|
|
2685
2686
|
F = d("async function () {}");
|
|
@@ -2748,7 +2749,7 @@ function Pr() {
|
|
|
2748
2749
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2749
2750
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2750
2751
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2751
|
-
}, k = Je(), re = /* @__PURE__ */
|
|
2752
|
+
}, k = Je(), re = /* @__PURE__ */ ds(), N = k.call(B, Array.prototype.concat), q = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), I = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
|
|
2752
2753
|
var F = C(A, 0, 1), _ = C(A, -1);
|
|
2753
2754
|
if (F === "%" && _ !== "%")
|
|
2754
2755
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -2762,7 +2763,7 @@ function Pr() {
|
|
|
2762
2763
|
var _ = A, Q;
|
|
2763
2764
|
if (re(Z, _) && (Q = Z[_], _ = "%" + Q[0] + "%"), re(H, _)) {
|
|
2764
2765
|
var G = H[_];
|
|
2765
|
-
if (G === P && (G =
|
|
2766
|
+
if (G === P && (G = le(_)), typeof G > "u" && !F)
|
|
2766
2767
|
throw new a("intrinsic " + A + " exists, but is not available. Please file an issue!");
|
|
2767
2768
|
return {
|
|
2768
2769
|
alias: Q,
|
|
@@ -2779,13 +2780,13 @@ function Pr() {
|
|
|
2779
2780
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2780
2781
|
if (I(/^%?[^%]*%?$/, A) === null)
|
|
2781
2782
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2782
|
-
var _ = K(A), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1,
|
|
2783
|
-
|
|
2784
|
-
for (var
|
|
2785
|
-
var ye = _[
|
|
2786
|
-
if ((
|
|
2783
|
+
var _ = K(A), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, Se = G.alias;
|
|
2784
|
+
Se && (Q = Se[0], q(_, N([0, 1], Se)));
|
|
2785
|
+
for (var Re = 1, Oe = !0; Re < _.length; Re += 1) {
|
|
2786
|
+
var ye = _[Re], qe = C(ye, 0, 1), ke = C(ye, -1);
|
|
2787
|
+
if ((qe === '"' || qe === "'" || qe === "`" || ke === '"' || ke === "'" || ke === "`") && qe !== ke)
|
|
2787
2788
|
throw new n("property names with quotes must have matching quotes");
|
|
2788
|
-
if ((ye === "constructor" || !
|
|
2789
|
+
if ((ye === "constructor" || !Oe) && (he = !0), Q += "." + ye, Y = "%" + Q + "%", re(H, Y))
|
|
2789
2790
|
oe = H[Y];
|
|
2790
2791
|
else if (oe != null) {
|
|
2791
2792
|
if (!(ye in oe)) {
|
|
@@ -2793,22 +2794,22 @@ function Pr() {
|
|
|
2793
2794
|
throw new a("base intrinsic for " + A + " exists, but the property is not available.");
|
|
2794
2795
|
return;
|
|
2795
2796
|
}
|
|
2796
|
-
if (v &&
|
|
2797
|
-
var
|
|
2798
|
-
|
|
2797
|
+
if (v && Re + 1 >= _.length) {
|
|
2798
|
+
var Te = v(oe, ye);
|
|
2799
|
+
Oe = !!Te, Oe && "get" in Te && !("originalValue" in Te.get) ? oe = Te.get : oe = oe[ye];
|
|
2799
2800
|
} else
|
|
2800
|
-
|
|
2801
|
-
|
|
2801
|
+
Oe = re(oe, ye), oe = oe[ye];
|
|
2802
|
+
Oe && !he && (H[Y] = oe);
|
|
2802
2803
|
}
|
|
2803
2804
|
}
|
|
2804
2805
|
return oe;
|
|
2805
2806
|
}, Xt;
|
|
2806
2807
|
}
|
|
2807
2808
|
var Zt = { exports: {} }, er, Bn;
|
|
2808
|
-
function
|
|
2809
|
+
function hs() {
|
|
2809
2810
|
if (Bn) return er;
|
|
2810
2811
|
Bn = 1;
|
|
2811
|
-
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */
|
|
2812
|
+
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ mo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ ot();
|
|
2812
2813
|
return er = function(l, n, a) {
|
|
2813
2814
|
if (!l || typeof l != "object" && typeof l != "function")
|
|
2814
2815
|
throw new t("`obj` must be an object or a function`");
|
|
@@ -2822,22 +2823,22 @@ function ds() {
|
|
|
2822
2823
|
throw new t("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2823
2824
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2824
2825
|
throw new t("`loose`, if provided, must be a boolean");
|
|
2825
|
-
var s = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null,
|
|
2826
|
+
var s = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, y = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, m = !!o && o(l, n);
|
|
2826
2827
|
if (e)
|
|
2827
2828
|
e(l, n, {
|
|
2828
|
-
configurable:
|
|
2829
|
-
enumerable: s === null &&
|
|
2829
|
+
configurable: y === null && m ? m.configurable : !y,
|
|
2830
|
+
enumerable: s === null && m ? m.enumerable : !s,
|
|
2830
2831
|
value: a,
|
|
2831
|
-
writable: c === null &&
|
|
2832
|
+
writable: c === null && m ? m.writable : !c
|
|
2832
2833
|
});
|
|
2833
|
-
else if (f || !s && !c && !
|
|
2834
|
+
else if (f || !s && !c && !y)
|
|
2834
2835
|
l[n] = a;
|
|
2835
2836
|
else
|
|
2836
2837
|
throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2837
2838
|
}, er;
|
|
2838
2839
|
}
|
|
2839
2840
|
var tr, Hn;
|
|
2840
|
-
function
|
|
2841
|
+
function ys() {
|
|
2841
2842
|
if (Hn) return tr;
|
|
2842
2843
|
Hn = 1;
|
|
2843
2844
|
var e = /* @__PURE__ */ at(), r = function() {
|
|
@@ -2854,21 +2855,21 @@ function hs() {
|
|
|
2854
2855
|
}, tr = r, tr;
|
|
2855
2856
|
}
|
|
2856
2857
|
var rr, Mn;
|
|
2857
|
-
function
|
|
2858
|
+
function ms() {
|
|
2858
2859
|
if (Mn) return rr;
|
|
2859
2860
|
Mn = 1;
|
|
2860
|
-
var e = /* @__PURE__ */
|
|
2861
|
+
var e = /* @__PURE__ */ Cr(), r = /* @__PURE__ */ hs(), t = /* @__PURE__ */ ys()(), o = /* @__PURE__ */ ot(), i = /* @__PURE__ */ We(), l = e("%Math.floor%");
|
|
2861
2862
|
return rr = function(a, s) {
|
|
2862
2863
|
if (typeof a != "function")
|
|
2863
2864
|
throw new i("`fn` is not a function");
|
|
2864
2865
|
if (typeof s != "number" || s < 0 || s > 4294967295 || l(s) !== s)
|
|
2865
2866
|
throw new i("`length` must be a positive 32-bit integer");
|
|
2866
|
-
var c = arguments.length > 2 && !!arguments[2],
|
|
2867
|
+
var c = arguments.length > 2 && !!arguments[2], y = !0, f = !0;
|
|
2867
2868
|
if ("length" in a && o) {
|
|
2868
|
-
var
|
|
2869
|
-
|
|
2869
|
+
var m = o(a, "length");
|
|
2870
|
+
m && !m.configurable && (y = !1), m && !m.writable && (f = !1);
|
|
2870
2871
|
}
|
|
2871
|
-
return (
|
|
2872
|
+
return (y || f || !c) && (t ? r(
|
|
2872
2873
|
/** @type {Parameters<define>[0]} */
|
|
2873
2874
|
a,
|
|
2874
2875
|
"length",
|
|
@@ -2884,18 +2885,18 @@ function ys() {
|
|
|
2884
2885
|
}, rr;
|
|
2885
2886
|
}
|
|
2886
2887
|
var nr, zn;
|
|
2887
|
-
function
|
|
2888
|
+
function gs() {
|
|
2888
2889
|
if (zn) return nr;
|
|
2889
2890
|
zn = 1;
|
|
2890
|
-
var e = Je(), r =
|
|
2891
|
+
var e = Je(), r = Pr(), t = bo();
|
|
2891
2892
|
return nr = function() {
|
|
2892
2893
|
return t(e, r, arguments);
|
|
2893
2894
|
}, nr;
|
|
2894
2895
|
}
|
|
2895
2896
|
var Gn;
|
|
2896
|
-
function
|
|
2897
|
+
function vs() {
|
|
2897
2898
|
return Gn || (Gn = 1, function(e) {
|
|
2898
|
-
var r = /* @__PURE__ */
|
|
2899
|
+
var r = /* @__PURE__ */ ms(), t = /* @__PURE__ */ at(), o = xo(), i = gs();
|
|
2899
2900
|
e.exports = function(n) {
|
|
2900
2901
|
var a = o(arguments), s = n.length - (arguments.length - 1);
|
|
2901
2902
|
return r(
|
|
@@ -2907,24 +2908,24 @@ function gs() {
|
|
|
2907
2908
|
}(Zt)), Zt.exports;
|
|
2908
2909
|
}
|
|
2909
2910
|
var or, Wn;
|
|
2910
|
-
function
|
|
2911
|
+
function bs() {
|
|
2911
2912
|
if (Wn) return or;
|
|
2912
2913
|
Wn = 1;
|
|
2913
|
-
var e = /* @__PURE__ */
|
|
2914
|
+
var e = /* @__PURE__ */ Cr(), r = vs(), t = r(e("String.prototype.indexOf"));
|
|
2914
2915
|
return or = function(i, l) {
|
|
2915
2916
|
var n = e(i, !!l);
|
|
2916
2917
|
return typeof n == "function" && t(i, ".prototype.") > -1 ? r(n) : n;
|
|
2917
2918
|
}, or;
|
|
2918
2919
|
}
|
|
2919
|
-
const
|
|
2920
|
+
const xs = {}, $s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2920
2921
|
__proto__: null,
|
|
2921
|
-
default:
|
|
2922
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2922
|
+
default: xs
|
|
2923
|
+
}, Symbol.toStringTag, { value: "Module" })), js = /* @__PURE__ */ va($s);
|
|
2923
2924
|
var ar, Jn;
|
|
2924
|
-
function
|
|
2925
|
+
function ws() {
|
|
2925
2926
|
if (Jn) return ar;
|
|
2926
2927
|
Jn = 1;
|
|
2927
|
-
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && l && typeof l.get == "function" ? l.get : null, a = i && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, c = s ? WeakMap.prototype.has : null,
|
|
2928
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && l && typeof l.get == "function" ? l.get : null, a = i && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, c = s ? WeakMap.prototype.has : null, y = typeof WeakSet == "function" && WeakSet.prototype, f = y ? WeakSet.prototype.has : null, m = typeof WeakRef == "function" && WeakRef.prototype, g = m ? WeakRef.prototype.deref : null, $ = Boolean.prototype.valueOf, b = Object.prototype.toString, u = Function.prototype.toString, d = String.prototype.match, v = String.prototype.slice, O = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, S = RegExp.prototype.test, x = Array.prototype.concat, R = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, le = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
|
|
2928
2929
|
return j.__proto__;
|
|
2929
2930
|
} : null);
|
|
2930
2931
|
function k(j, w) {
|
|
@@ -2940,7 +2941,7 @@ function js() {
|
|
|
2940
2941
|
}
|
|
2941
2942
|
return O.call(w, X, "$&_");
|
|
2942
2943
|
}
|
|
2943
|
-
var re =
|
|
2944
|
+
var re = js, N = re.custom, q = F(N) ? N : null;
|
|
2944
2945
|
ar = function j(w, X, ee, ie) {
|
|
2945
2946
|
var M = X || {};
|
|
2946
2947
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
@@ -2954,7 +2955,7 @@ function js() {
|
|
|
2954
2955
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
2955
2956
|
if (G(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
|
|
2956
2957
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
2957
|
-
var
|
|
2958
|
+
var Pe = M.numericSeparator;
|
|
2958
2959
|
if (typeof w > "u")
|
|
2959
2960
|
return "undefined";
|
|
2960
2961
|
if (w === null)
|
|
@@ -2962,41 +2963,41 @@ function js() {
|
|
|
2962
2963
|
if (typeof w == "boolean")
|
|
2963
2964
|
return w ? "true" : "false";
|
|
2964
2965
|
if (typeof w == "string")
|
|
2965
|
-
return
|
|
2966
|
+
return Te(w, M);
|
|
2966
2967
|
if (typeof w == "number") {
|
|
2967
2968
|
if (w === 0)
|
|
2968
2969
|
return 1 / 0 / w > 0 ? "0" : "-0";
|
|
2969
2970
|
var de = String(w);
|
|
2970
|
-
return
|
|
2971
|
+
return Pe ? k(w, de) : de;
|
|
2971
2972
|
}
|
|
2972
2973
|
if (typeof w == "bigint") {
|
|
2973
2974
|
var je = String(w) + "n";
|
|
2974
|
-
return
|
|
2975
|
+
return Pe ? k(w, je) : je;
|
|
2975
2976
|
}
|
|
2976
2977
|
var lt = typeof M.depth > "u" ? 5 : M.depth;
|
|
2977
2978
|
if (typeof ee > "u" && (ee = 0), ee >= lt && lt > 0 && typeof w == "object")
|
|
2978
2979
|
return I(w) ? "[Array]" : "[Object]";
|
|
2979
|
-
var Ee =
|
|
2980
|
+
var Ee = Ro(M, ee);
|
|
2980
2981
|
if (typeof ie > "u")
|
|
2981
2982
|
ie = [];
|
|
2982
2983
|
else if (he(ie, w) >= 0)
|
|
2983
2984
|
return "[Circular]";
|
|
2984
|
-
function me(Ae, Qe,
|
|
2985
|
-
if (Qe && (ie = L.call(ie), ie.push(Qe)),
|
|
2986
|
-
var
|
|
2985
|
+
function me(Ae, Qe, ko) {
|
|
2986
|
+
if (Qe && (ie = L.call(ie), ie.push(Qe)), ko) {
|
|
2987
|
+
var Br = {
|
|
2987
2988
|
depth: M.depth
|
|
2988
2989
|
};
|
|
2989
|
-
return G(M, "quoteStyle") && (
|
|
2990
|
+
return G(M, "quoteStyle") && (Br.quoteStyle = M.quoteStyle), j(Ae, Br, ee + 1, ie);
|
|
2990
2991
|
}
|
|
2991
2992
|
return j(Ae, M, ee + 1, ie);
|
|
2992
2993
|
}
|
|
2993
2994
|
if (typeof w == "function" && !z(w)) {
|
|
2994
|
-
var
|
|
2995
|
-
return "[Function" + (
|
|
2995
|
+
var Er = oe(w), Ar = Ve(w, me);
|
|
2996
|
+
return "[Function" + (Er ? ": " + Er : " (anonymous)") + "]" + (Ar.length > 0 ? " { " + R.call(Ar, ", ") + " }" : "");
|
|
2996
2997
|
}
|
|
2997
2998
|
if (F(w)) {
|
|
2998
|
-
var
|
|
2999
|
-
return typeof w == "object" && !H ? Ue(
|
|
2999
|
+
var Ir = H ? O.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
|
|
3000
|
+
return typeof w == "object" && !H ? Ue(Ir) : Ir;
|
|
3000
3001
|
}
|
|
3001
3002
|
if (ke(w)) {
|
|
3002
3003
|
for (var Fe = "<" + p.call(String(w.nodeName)), ct = w.attributes || [], De = 0; De < ct.length; De++)
|
|
@@ -3007,35 +3008,35 @@ function js() {
|
|
|
3007
3008
|
if (w.length === 0)
|
|
3008
3009
|
return "[]";
|
|
3009
3010
|
var ut = Ve(w, me);
|
|
3010
|
-
return Ee && !
|
|
3011
|
+
return Ee && !No(ut) ? "[" + st(ut, Ee) + "]" : "[ " + R.call(ut, ", ") + " ]";
|
|
3011
3012
|
}
|
|
3012
3013
|
if (K(w)) {
|
|
3013
3014
|
var ft = Ve(w, me);
|
|
3014
|
-
return !("cause" in Error.prototype) && "cause" in w && !
|
|
3015
|
+
return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " + R.call(x.call("[cause]: " + me(w.cause), ft), ", ") + " }" : ft.length === 0 ? "[" + String(w) + "]" : "{ [" + String(w) + "] " + R.call(ft, ", ") + " }";
|
|
3015
3016
|
}
|
|
3016
3017
|
if (typeof w == "object" && $e) {
|
|
3017
|
-
if (
|
|
3018
|
+
if (q && typeof w[q] == "function" && re)
|
|
3018
3019
|
return re(w, { depth: lt - ee });
|
|
3019
3020
|
if ($e !== "symbol" && typeof w.inspect == "function")
|
|
3020
3021
|
return w.inspect();
|
|
3021
3022
|
}
|
|
3022
|
-
if (
|
|
3023
|
-
var
|
|
3023
|
+
if (Se(w)) {
|
|
3024
|
+
var Lr = [];
|
|
3024
3025
|
return o && o.call(w, function(Ae, Qe) {
|
|
3025
|
-
|
|
3026
|
-
}),
|
|
3026
|
+
Lr.push(me(Qe, w, !0) + " => " + me(Ae, w));
|
|
3027
|
+
}), kr("Map", t.call(w), Lr, Ee);
|
|
3027
3028
|
}
|
|
3028
3029
|
if (ye(w)) {
|
|
3029
|
-
var
|
|
3030
|
+
var Ur = [];
|
|
3030
3031
|
return a && a.call(w, function(Ae) {
|
|
3031
|
-
|
|
3032
|
-
}),
|
|
3032
|
+
Ur.push(me(Ae, w));
|
|
3033
|
+
}), kr("Set", n.call(w), Ur, Ee);
|
|
3033
3034
|
}
|
|
3034
|
-
if (
|
|
3035
|
+
if (Re(w))
|
|
3035
3036
|
return it("WeakMap");
|
|
3036
|
-
if (
|
|
3037
|
+
if (qe(w))
|
|
3037
3038
|
return it("WeakSet");
|
|
3038
|
-
if (
|
|
3039
|
+
if (Oe(w))
|
|
3039
3040
|
return it("WeakRef");
|
|
3040
3041
|
if (J(w))
|
|
3041
3042
|
return Ue(me(Number(w)));
|
|
@@ -3050,8 +3051,8 @@ function js() {
|
|
|
3050
3051
|
if (typeof globalThis < "u" && w === globalThis || typeof Ze < "u" && w === Ze)
|
|
3051
3052
|
return "{ [object globalThis] }";
|
|
3052
3053
|
if (!W(w) && !z(w)) {
|
|
3053
|
-
var pt = Ve(w, me),
|
|
3054
|
-
return pt.length === 0 ? ht + "{}" : Ee ? ht + "{" + st(pt, Ee) + "}" : ht + "{ " +
|
|
3054
|
+
var pt = Ve(w, me), Fr = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, dt = w instanceof Object ? "" : "null prototype", _r = !Fr && D && Object(w) === w && D in w ? v.call(Y(w), 8, -1) : dt ? "Object" : "", qo = Fr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", ht = qo + (_r || dt ? "[" + R.call(x.call([], _r || [], dt || []), ": ") + "] " : "");
|
|
3055
|
+
return pt.length === 0 ? ht + "{}" : Ee ? ht + "{" + st(pt, Ee) + "}" : ht + "{ " + R.call(pt, ", ") + " }";
|
|
3055
3056
|
}
|
|
3056
3057
|
return String(w);
|
|
3057
3058
|
};
|
|
@@ -3128,7 +3129,7 @@ function js() {
|
|
|
3128
3129
|
return X;
|
|
3129
3130
|
return -1;
|
|
3130
3131
|
}
|
|
3131
|
-
function
|
|
3132
|
+
function Se(j) {
|
|
3132
3133
|
if (!t || !j || typeof j != "object")
|
|
3133
3134
|
return !1;
|
|
3134
3135
|
try {
|
|
@@ -3143,7 +3144,7 @@ function js() {
|
|
|
3143
3144
|
}
|
|
3144
3145
|
return !1;
|
|
3145
3146
|
}
|
|
3146
|
-
function
|
|
3147
|
+
function Re(j) {
|
|
3147
3148
|
if (!c || !j || typeof j != "object")
|
|
3148
3149
|
return !1;
|
|
3149
3150
|
try {
|
|
@@ -3158,7 +3159,7 @@ function js() {
|
|
|
3158
3159
|
}
|
|
3159
3160
|
return !1;
|
|
3160
3161
|
}
|
|
3161
|
-
function
|
|
3162
|
+
function Oe(j) {
|
|
3162
3163
|
if (!g || !j || typeof j != "object")
|
|
3163
3164
|
return !1;
|
|
3164
3165
|
try {
|
|
@@ -3182,7 +3183,7 @@ function js() {
|
|
|
3182
3183
|
}
|
|
3183
3184
|
return !1;
|
|
3184
3185
|
}
|
|
3185
|
-
function
|
|
3186
|
+
function qe(j) {
|
|
3186
3187
|
if (!f || !j || typeof j != "object")
|
|
3187
3188
|
return !1;
|
|
3188
3189
|
try {
|
|
@@ -3200,15 +3201,15 @@ function js() {
|
|
|
3200
3201
|
function ke(j) {
|
|
3201
3202
|
return !j || typeof j != "object" ? !1 : typeof HTMLElement < "u" && j instanceof HTMLElement ? !0 : typeof j.nodeName == "string" && typeof j.getAttribute == "function";
|
|
3202
3203
|
}
|
|
3203
|
-
function
|
|
3204
|
+
function Te(j, w) {
|
|
3204
3205
|
if (j.length > w.maxStringLength) {
|
|
3205
3206
|
var X = j.length - w.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3206
|
-
return
|
|
3207
|
+
return Te(v.call(j, 0, w.maxStringLength), w) + ee;
|
|
3207
3208
|
}
|
|
3208
|
-
var ie = O.call(O.call(j, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
3209
|
+
var ie = O.call(O.call(j, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Co);
|
|
3209
3210
|
return U(ie, "single", w);
|
|
3210
3211
|
}
|
|
3211
|
-
function
|
|
3212
|
+
function Co(j) {
|
|
3212
3213
|
var w = j.charCodeAt(0), X = {
|
|
3213
3214
|
8: "b",
|
|
3214
3215
|
9: "t",
|
|
@@ -3224,28 +3225,28 @@ function js() {
|
|
|
3224
3225
|
function it(j) {
|
|
3225
3226
|
return j + " { ? }";
|
|
3226
3227
|
}
|
|
3227
|
-
function
|
|
3228
|
-
var ie = ee ? st(X, ee) :
|
|
3228
|
+
function kr(j, w, X, ee) {
|
|
3229
|
+
var ie = ee ? st(X, ee) : R.call(X, ", ");
|
|
3229
3230
|
return j + " (" + w + ") {" + ie + "}";
|
|
3230
3231
|
}
|
|
3231
|
-
function
|
|
3232
|
+
function No(j) {
|
|
3232
3233
|
for (var w = 0; w < j.length; w++)
|
|
3233
3234
|
if (he(j[w], `
|
|
3234
3235
|
`) >= 0)
|
|
3235
3236
|
return !1;
|
|
3236
3237
|
return !0;
|
|
3237
3238
|
}
|
|
3238
|
-
function
|
|
3239
|
+
function Ro(j, w) {
|
|
3239
3240
|
var X;
|
|
3240
3241
|
if (j.indent === " ")
|
|
3241
3242
|
X = " ";
|
|
3242
3243
|
else if (typeof j.indent == "number" && j.indent > 0)
|
|
3243
|
-
X =
|
|
3244
|
+
X = R.call(Array(j.indent + 1), " ");
|
|
3244
3245
|
else
|
|
3245
3246
|
return null;
|
|
3246
3247
|
return {
|
|
3247
3248
|
base: X,
|
|
3248
|
-
prev:
|
|
3249
|
+
prev: R.call(Array(w + 1), X)
|
|
3249
3250
|
};
|
|
3250
3251
|
}
|
|
3251
3252
|
function st(j, w) {
|
|
@@ -3253,7 +3254,7 @@ function js() {
|
|
|
3253
3254
|
return "";
|
|
3254
3255
|
var X = `
|
|
3255
3256
|
` + w.prev + w.base;
|
|
3256
|
-
return X +
|
|
3257
|
+
return X + R.call(j, "," + X) + `
|
|
3257
3258
|
` + w.prev;
|
|
3258
3259
|
}
|
|
3259
3260
|
function Ve(j, w) {
|
|
@@ -3266,32 +3267,32 @@ function js() {
|
|
|
3266
3267
|
var M = typeof P == "function" ? P(j) : [], $e;
|
|
3267
3268
|
if (H) {
|
|
3268
3269
|
$e = {};
|
|
3269
|
-
for (var
|
|
3270
|
-
$e["$" + M[
|
|
3270
|
+
for (var Pe = 0; Pe < M.length; Pe++)
|
|
3271
|
+
$e["$" + M[Pe]] = M[Pe];
|
|
3271
3272
|
}
|
|
3272
3273
|
for (var de in j)
|
|
3273
3274
|
G(j, de) && (X && String(Number(de)) === de && de < j.length || H && $e["$" + de] instanceof Symbol || (S.call(/[^\w$]/, de) ? ee.push(w(de, j) + ": " + w(j[de], j)) : ee.push(de + ": " + w(j[de], j))));
|
|
3274
3275
|
if (typeof P == "function")
|
|
3275
3276
|
for (var je = 0; je < M.length; je++)
|
|
3276
|
-
|
|
3277
|
+
le.call(j, M[je]) && ee.push("[" + w(M[je]) + "]: " + w(j[M[je]], j));
|
|
3277
3278
|
return ee;
|
|
3278
3279
|
}
|
|
3279
3280
|
return ar;
|
|
3280
3281
|
}
|
|
3281
3282
|
var ir, Vn;
|
|
3282
|
-
function
|
|
3283
|
+
function Ss() {
|
|
3283
3284
|
if (Vn) return ir;
|
|
3284
3285
|
Vn = 1;
|
|
3285
|
-
var e = /* @__PURE__ */
|
|
3286
|
+
var e = /* @__PURE__ */ Cr(), r = bs(), t = /* @__PURE__ */ ws(), o = /* @__PURE__ */ We(), i = e("%WeakMap%", !0), l = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), s = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), y = r("Map.prototype.set", !0), f = r("Map.prototype.has", !0), m = function(u, d) {
|
|
3286
3287
|
for (var v = u, O; (O = v.next) !== null; v = O)
|
|
3287
3288
|
if (O.key === d)
|
|
3288
3289
|
return v.next = O.next, O.next = /** @type {NonNullable<typeof list.next>} */
|
|
3289
3290
|
u.next, u.next = O, O;
|
|
3290
3291
|
}, g = function(u, d) {
|
|
3291
|
-
var v =
|
|
3292
|
+
var v = m(u, d);
|
|
3292
3293
|
return v && v.value;
|
|
3293
3294
|
}, $ = function(u, d, v) {
|
|
3294
|
-
var O =
|
|
3295
|
+
var O = m(u, d);
|
|
3295
3296
|
O ? O.value = v : u.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3296
3297
|
{
|
|
3297
3298
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
@@ -3300,7 +3301,7 @@ function ws() {
|
|
|
3300
3301
|
value: v
|
|
3301
3302
|
};
|
|
3302
3303
|
}, b = function(u, d) {
|
|
3303
|
-
return !!
|
|
3304
|
+
return !!m(u, d);
|
|
3304
3305
|
};
|
|
3305
3306
|
return ir = function() {
|
|
3306
3307
|
var d, v, O, T = {
|
|
@@ -3330,14 +3331,14 @@ function ws() {
|
|
|
3330
3331
|
return !1;
|
|
3331
3332
|
},
|
|
3332
3333
|
set: function(p, S) {
|
|
3333
|
-
i && p && (typeof p == "object" || typeof p == "function") ? (d || (d = new i()), a(d, p, S)) : l ? (v || (v = new l()),
|
|
3334
|
+
i && p && (typeof p == "object" || typeof p == "function") ? (d || (d = new i()), a(d, p, S)) : l ? (v || (v = new l()), y(v, p, S)) : (O || (O = { key: {}, next: null }), $(O, p, S));
|
|
3334
3335
|
}
|
|
3335
3336
|
};
|
|
3336
3337
|
return T;
|
|
3337
3338
|
}, ir;
|
|
3338
3339
|
}
|
|
3339
3340
|
var sr, Dn;
|
|
3340
|
-
function
|
|
3341
|
+
function Nr() {
|
|
3341
3342
|
if (Dn) return sr;
|
|
3342
3343
|
Dn = 1;
|
|
3343
3344
|
var e = String.prototype.replace, r = /%20/g, t = {
|
|
@@ -3359,10 +3360,10 @@ function Cr() {
|
|
|
3359
3360
|
}, sr;
|
|
3360
3361
|
}
|
|
3361
3362
|
var lr, Qn;
|
|
3362
|
-
function
|
|
3363
|
+
function $o() {
|
|
3363
3364
|
if (Qn) return lr;
|
|
3364
3365
|
Qn = 1;
|
|
3365
|
-
var e = /* @__PURE__ */
|
|
3366
|
+
var e = /* @__PURE__ */ Nr(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
|
|
3366
3367
|
for (var u = [], d = 0; d < 256; ++d)
|
|
3367
3368
|
u.push("%" + ((d < 16 ? "0" : "") + d.toString(16)).toUpperCase());
|
|
3368
3369
|
return u;
|
|
@@ -3417,7 +3418,7 @@ function vo() {
|
|
|
3417
3418
|
} catch {
|
|
3418
3419
|
return O;
|
|
3419
3420
|
}
|
|
3420
|
-
}, c = 1024,
|
|
3421
|
+
}, c = 1024, y = function(d, v, O, T, p) {
|
|
3421
3422
|
if (d.length === 0)
|
|
3422
3423
|
return d;
|
|
3423
3424
|
var S = d;
|
|
@@ -3425,8 +3426,8 @@ function vo() {
|
|
|
3425
3426
|
return escape(S).replace(/%u[0-9a-f]{4}/gi, function(ae) {
|
|
3426
3427
|
return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
|
|
3427
3428
|
});
|
|
3428
|
-
for (var x = "",
|
|
3429
|
-
for (var L = S.length >= c ? S.slice(
|
|
3429
|
+
for (var x = "", R = 0; R < S.length; R += c) {
|
|
3430
|
+
for (var L = S.length >= c ? S.slice(R, R + c) : S, E = [], B = 0; B < L.length; ++B) {
|
|
3430
3431
|
var P = L.charCodeAt(B);
|
|
3431
3432
|
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || p === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3432
3433
|
E[E.length] = L.charAt(B);
|
|
@@ -3451,12 +3452,12 @@ function vo() {
|
|
|
3451
3452
|
return x;
|
|
3452
3453
|
}, f = function(d) {
|
|
3453
3454
|
for (var v = [{ obj: { o: d }, prop: "o" }], O = [], T = 0; T < v.length; ++T)
|
|
3454
|
-
for (var p = v[T], S = p.obj[p.prop], x = Object.keys(S),
|
|
3455
|
-
var L = x[
|
|
3455
|
+
for (var p = v[T], S = p.obj[p.prop], x = Object.keys(S), R = 0; R < x.length; ++R) {
|
|
3456
|
+
var L = x[R], E = S[L];
|
|
3456
3457
|
typeof E == "object" && E !== null && O.indexOf(E) === -1 && (v.push({ obj: S, prop: L }), O.push(E));
|
|
3457
3458
|
}
|
|
3458
3459
|
return i(v), d;
|
|
3459
|
-
},
|
|
3460
|
+
}, m = function(d) {
|
|
3460
3461
|
return Object.prototype.toString.call(d) === "[object RegExp]";
|
|
3461
3462
|
}, g = function(d) {
|
|
3462
3463
|
return !d || typeof d != "object" ? !1 : !!(d.constructor && d.constructor.isBuffer && d.constructor.isBuffer(d));
|
|
@@ -3476,18 +3477,18 @@ function vo() {
|
|
|
3476
3477
|
combine: $,
|
|
3477
3478
|
compact: f,
|
|
3478
3479
|
decode: s,
|
|
3479
|
-
encode:
|
|
3480
|
+
encode: y,
|
|
3480
3481
|
isBuffer: g,
|
|
3481
|
-
isRegExp:
|
|
3482
|
+
isRegExp: m,
|
|
3482
3483
|
maybeMap: b,
|
|
3483
3484
|
merge: n
|
|
3484
3485
|
}, lr;
|
|
3485
3486
|
}
|
|
3486
3487
|
var cr, Kn;
|
|
3487
|
-
function
|
|
3488
|
+
function Os() {
|
|
3488
3489
|
if (Kn) return cr;
|
|
3489
3490
|
Kn = 1;
|
|
3490
|
-
var e =
|
|
3491
|
+
var e = Ss(), r = /* @__PURE__ */ $o(), t = /* @__PURE__ */ Nr(), o = Object.prototype.hasOwnProperty, i = {
|
|
3491
3492
|
brackets: function(u) {
|
|
3492
3493
|
return u + "[]";
|
|
3493
3494
|
},
|
|
@@ -3500,7 +3501,7 @@ function Ss() {
|
|
|
3500
3501
|
}
|
|
3501
3502
|
}, l = Array.isArray, n = Array.prototype.push, a = function(b, u) {
|
|
3502
3503
|
n.apply(b, l(u) ? u : [u]);
|
|
3503
|
-
}, s = Date.prototype.toISOString, c = t.default,
|
|
3504
|
+
}, s = Date.prototype.toISOString, c = t.default, y = {
|
|
3504
3505
|
addQueryPrefix: !1,
|
|
3505
3506
|
allowDots: !1,
|
|
3506
3507
|
allowEmptyArrays: !1,
|
|
@@ -3523,27 +3524,27 @@ function Ss() {
|
|
|
3523
3524
|
strictNullHandling: !1
|
|
3524
3525
|
}, f = function(u) {
|
|
3525
3526
|
return typeof u == "string" || typeof u == "number" || typeof u == "boolean" || typeof u == "symbol" || typeof u == "bigint";
|
|
3526
|
-
},
|
|
3527
|
-
for (var k = u, re = Z,
|
|
3527
|
+
}, m = {}, g = function b(u, d, v, O, T, p, S, x, R, L, E, B, P, ae, H, D, le, Z) {
|
|
3528
|
+
for (var k = u, re = Z, N = 0, q = !1; (re = re.get(m)) !== void 0 && !q; ) {
|
|
3528
3529
|
var U = re.get(u);
|
|
3529
|
-
if (
|
|
3530
|
-
if (U ===
|
|
3530
|
+
if (N += 1, typeof U < "u") {
|
|
3531
|
+
if (U === N)
|
|
3531
3532
|
throw new RangeError("Cyclic object value");
|
|
3532
|
-
|
|
3533
|
+
q = !0;
|
|
3533
3534
|
}
|
|
3534
|
-
typeof re.get(
|
|
3535
|
+
typeof re.get(m) > "u" && (N = 0);
|
|
3535
3536
|
}
|
|
3536
3537
|
if (typeof L == "function" ? k = L(d, k) : k instanceof Date ? k = P(k) : v === "comma" && l(k) && (k = r.maybeMap(k, function(Y) {
|
|
3537
3538
|
return Y instanceof Date ? P(Y) : Y;
|
|
3538
3539
|
})), k === null) {
|
|
3539
3540
|
if (p)
|
|
3540
|
-
return
|
|
3541
|
+
return R && !D ? R(d, y.encoder, le, "key", ae) : d;
|
|
3541
3542
|
k = "";
|
|
3542
3543
|
}
|
|
3543
3544
|
if (f(k) || r.isBuffer(k)) {
|
|
3544
|
-
if (
|
|
3545
|
-
var C = D ? d :
|
|
3546
|
-
return [H(C) + "=" + H(
|
|
3545
|
+
if (R) {
|
|
3546
|
+
var C = D ? d : R(d, y.encoder, le, "key", ae);
|
|
3547
|
+
return [H(C) + "=" + H(R(k, y.encoder, le, "value", ae))];
|
|
3547
3548
|
}
|
|
3548
3549
|
return [H(d) + "=" + H(String(k))];
|
|
3549
3550
|
}
|
|
@@ -3552,7 +3553,7 @@ function Ss() {
|
|
|
3552
3553
|
return I;
|
|
3553
3554
|
var W;
|
|
3554
3555
|
if (v === "comma" && l(k))
|
|
3555
|
-
D &&
|
|
3556
|
+
D && R && (k = r.maybeMap(k, R)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
|
|
3556
3557
|
else if (l(L))
|
|
3557
3558
|
W = L;
|
|
3558
3559
|
else {
|
|
@@ -3566,9 +3567,9 @@ function Ss() {
|
|
|
3566
3567
|
var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value : k[A];
|
|
3567
3568
|
if (!(S && F === null)) {
|
|
3568
3569
|
var _ = B && x ? A.replace(/\./g, "%2E") : A, Q = l(k) ? typeof v == "function" ? v(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
|
|
3569
|
-
Z.set(u,
|
|
3570
|
+
Z.set(u, N);
|
|
3570
3571
|
var G = e();
|
|
3571
|
-
G.set(
|
|
3572
|
+
G.set(m, Z), a(I, b(
|
|
3572
3573
|
F,
|
|
3573
3574
|
Q,
|
|
3574
3575
|
v,
|
|
@@ -3577,7 +3578,7 @@ function Ss() {
|
|
|
3577
3578
|
p,
|
|
3578
3579
|
S,
|
|
3579
3580
|
x,
|
|
3580
|
-
v === "comma" && D && l(k) ? null :
|
|
3581
|
+
v === "comma" && D && l(k) ? null : R,
|
|
3581
3582
|
L,
|
|
3582
3583
|
E,
|
|
3583
3584
|
B,
|
|
@@ -3585,7 +3586,7 @@ function Ss() {
|
|
|
3585
3586
|
ae,
|
|
3586
3587
|
H,
|
|
3587
3588
|
D,
|
|
3588
|
-
|
|
3589
|
+
le,
|
|
3589
3590
|
G
|
|
3590
3591
|
));
|
|
3591
3592
|
}
|
|
@@ -3593,14 +3594,14 @@ function Ss() {
|
|
|
3593
3594
|
return I;
|
|
3594
3595
|
}, $ = function(u) {
|
|
3595
3596
|
if (!u)
|
|
3596
|
-
return
|
|
3597
|
+
return y;
|
|
3597
3598
|
if (typeof u.allowEmptyArrays < "u" && typeof u.allowEmptyArrays != "boolean")
|
|
3598
3599
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3599
3600
|
if (typeof u.encodeDotInKeys < "u" && typeof u.encodeDotInKeys != "boolean")
|
|
3600
3601
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3601
3602
|
if (u.encoder !== null && typeof u.encoder < "u" && typeof u.encoder != "function")
|
|
3602
3603
|
throw new TypeError("Encoder has to be a function.");
|
|
3603
|
-
var d = u.charset ||
|
|
3604
|
+
var d = u.charset || y.charset;
|
|
3604
3605
|
if (typeof u.charset < "u" && u.charset !== "utf-8" && u.charset !== "iso-8859-1")
|
|
3605
3606
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3606
3607
|
var v = t.default;
|
|
@@ -3609,32 +3610,32 @@ function Ss() {
|
|
|
3609
3610
|
throw new TypeError("Unknown format option provided.");
|
|
3610
3611
|
v = u.format;
|
|
3611
3612
|
}
|
|
3612
|
-
var O = t.formatters[v], T =
|
|
3613
|
+
var O = t.formatters[v], T = y.filter;
|
|
3613
3614
|
(typeof u.filter == "function" || l(u.filter)) && (T = u.filter);
|
|
3614
3615
|
var p;
|
|
3615
|
-
if (u.arrayFormat in i ? p = u.arrayFormat : "indices" in u ? p = u.indices ? "indices" : "repeat" : p =
|
|
3616
|
+
if (u.arrayFormat in i ? p = u.arrayFormat : "indices" in u ? p = u.indices ? "indices" : "repeat" : p = y.arrayFormat, "commaRoundTrip" in u && typeof u.commaRoundTrip != "boolean")
|
|
3616
3617
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3617
|
-
var S = typeof u.allowDots > "u" ? u.encodeDotInKeys === !0 ? !0 :
|
|
3618
|
+
var S = typeof u.allowDots > "u" ? u.encodeDotInKeys === !0 ? !0 : y.allowDots : !!u.allowDots;
|
|
3618
3619
|
return {
|
|
3619
|
-
addQueryPrefix: typeof u.addQueryPrefix == "boolean" ? u.addQueryPrefix :
|
|
3620
|
+
addQueryPrefix: typeof u.addQueryPrefix == "boolean" ? u.addQueryPrefix : y.addQueryPrefix,
|
|
3620
3621
|
allowDots: S,
|
|
3621
|
-
allowEmptyArrays: typeof u.allowEmptyArrays == "boolean" ? !!u.allowEmptyArrays :
|
|
3622
|
+
allowEmptyArrays: typeof u.allowEmptyArrays == "boolean" ? !!u.allowEmptyArrays : y.allowEmptyArrays,
|
|
3622
3623
|
arrayFormat: p,
|
|
3623
3624
|
charset: d,
|
|
3624
|
-
charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel :
|
|
3625
|
+
charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel : y.charsetSentinel,
|
|
3625
3626
|
commaRoundTrip: u.commaRoundTrip,
|
|
3626
|
-
delimiter: typeof u.delimiter > "u" ?
|
|
3627
|
-
encode: typeof u.encode == "boolean" ? u.encode :
|
|
3628
|
-
encodeDotInKeys: typeof u.encodeDotInKeys == "boolean" ? u.encodeDotInKeys :
|
|
3629
|
-
encoder: typeof u.encoder == "function" ? u.encoder :
|
|
3630
|
-
encodeValuesOnly: typeof u.encodeValuesOnly == "boolean" ? u.encodeValuesOnly :
|
|
3627
|
+
delimiter: typeof u.delimiter > "u" ? y.delimiter : u.delimiter,
|
|
3628
|
+
encode: typeof u.encode == "boolean" ? u.encode : y.encode,
|
|
3629
|
+
encodeDotInKeys: typeof u.encodeDotInKeys == "boolean" ? u.encodeDotInKeys : y.encodeDotInKeys,
|
|
3630
|
+
encoder: typeof u.encoder == "function" ? u.encoder : y.encoder,
|
|
3631
|
+
encodeValuesOnly: typeof u.encodeValuesOnly == "boolean" ? u.encodeValuesOnly : y.encodeValuesOnly,
|
|
3631
3632
|
filter: T,
|
|
3632
3633
|
format: v,
|
|
3633
3634
|
formatter: O,
|
|
3634
|
-
serializeDate: typeof u.serializeDate == "function" ? u.serializeDate :
|
|
3635
|
-
skipNulls: typeof u.skipNulls == "boolean" ? u.skipNulls :
|
|
3635
|
+
serializeDate: typeof u.serializeDate == "function" ? u.serializeDate : y.serializeDate,
|
|
3636
|
+
skipNulls: typeof u.skipNulls == "boolean" ? u.skipNulls : y.skipNulls,
|
|
3636
3637
|
sort: typeof u.sort == "function" ? u.sort : null,
|
|
3637
|
-
strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling :
|
|
3638
|
+
strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling : y.strictNullHandling
|
|
3638
3639
|
};
|
|
3639
3640
|
};
|
|
3640
3641
|
return cr = function(b, u) {
|
|
@@ -3645,7 +3646,7 @@ function Ss() {
|
|
|
3645
3646
|
return "";
|
|
3646
3647
|
var S = i[v.arrayFormat], x = S === "comma" && v.commaRoundTrip;
|
|
3647
3648
|
O || (O = Object.keys(d)), v.sort && O.sort(v.sort);
|
|
3648
|
-
for (var
|
|
3649
|
+
for (var R = e(), L = 0; L < O.length; ++L) {
|
|
3649
3650
|
var E = O[L];
|
|
3650
3651
|
v.skipNulls && d[E] === null || a(p, g(
|
|
3651
3652
|
d[E],
|
|
@@ -3665,7 +3666,7 @@ function Ss() {
|
|
|
3665
3666
|
v.formatter,
|
|
3666
3667
|
v.encodeValuesOnly,
|
|
3667
3668
|
v.charset,
|
|
3668
|
-
|
|
3669
|
+
R
|
|
3669
3670
|
));
|
|
3670
3671
|
}
|
|
3671
3672
|
var B = p.join(v.delimiter), P = v.addQueryPrefix === !0 ? "?" : "";
|
|
@@ -3673,10 +3674,10 @@ function Ss() {
|
|
|
3673
3674
|
}, cr;
|
|
3674
3675
|
}
|
|
3675
3676
|
var ur, Yn;
|
|
3676
|
-
function
|
|
3677
|
+
function Ts() {
|
|
3677
3678
|
if (Yn) return ur;
|
|
3678
3679
|
Yn = 1;
|
|
3679
|
-
var e = /* @__PURE__ */
|
|
3680
|
+
var e = /* @__PURE__ */ $o(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
3680
3681
|
allowDots: !1,
|
|
3681
3682
|
allowEmptyArrays: !1,
|
|
3682
3683
|
allowPrototypes: !1,
|
|
@@ -3697,12 +3698,12 @@ function Os() {
|
|
|
3697
3698
|
plainObjects: !1,
|
|
3698
3699
|
strictDepth: !1,
|
|
3699
3700
|
strictNullHandling: !1
|
|
3700
|
-
}, i = function(
|
|
3701
|
-
return
|
|
3701
|
+
}, i = function(m) {
|
|
3702
|
+
return m.replace(/&#(\d+);/g, function(g, $) {
|
|
3702
3703
|
return String.fromCharCode(parseInt($, 10));
|
|
3703
3704
|
});
|
|
3704
|
-
}, l = function(
|
|
3705
|
-
return
|
|
3705
|
+
}, l = function(m, g) {
|
|
3706
|
+
return m && typeof m == "string" && g.comma && m.indexOf(",") > -1 ? m.split(",") : m;
|
|
3706
3707
|
}, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", s = function(g, $) {
|
|
3707
3708
|
var b = { __proto__: null }, u = $.ignoreQueryPrefix ? g.replace(/^\?/, "") : g;
|
|
3708
3709
|
u = u.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
@@ -3712,9 +3713,9 @@ function Os() {
|
|
|
3712
3713
|
v[T].indexOf("utf8=") === 0 && (v[T] === a ? p = "utf-8" : v[T] === n && (p = "iso-8859-1"), O = T, T = v.length);
|
|
3713
3714
|
for (T = 0; T < v.length; ++T)
|
|
3714
3715
|
if (T !== O) {
|
|
3715
|
-
var S = v[T], x = S.indexOf("]="),
|
|
3716
|
-
|
|
3717
|
-
l(S.slice(
|
|
3716
|
+
var S = v[T], x = S.indexOf("]="), R = x === -1 ? S.indexOf("=") : x + 1, L, E;
|
|
3717
|
+
R === -1 ? (L = $.decoder(S, o.decoder, p, "key"), E = $.strictNullHandling ? null : "") : (L = $.decoder(S.slice(0, R), o.decoder, p, "key"), E = e.maybeMap(
|
|
3718
|
+
l(S.slice(R + 1), $),
|
|
3718
3719
|
function(P) {
|
|
3719
3720
|
return $.decoder(P, o.decoder, p, "value");
|
|
3720
3721
|
}
|
|
@@ -3723,9 +3724,9 @@ function Os() {
|
|
|
3723
3724
|
B && $.duplicates === "combine" ? b[L] = e.combine(b[L], E) : (!B || $.duplicates === "last") && (b[L] = E);
|
|
3724
3725
|
}
|
|
3725
3726
|
return b;
|
|
3726
|
-
}, c = function(
|
|
3727
|
-
for (var u = b ? g : l(g, $), d =
|
|
3728
|
-
var v, O =
|
|
3727
|
+
}, c = function(m, g, $, b) {
|
|
3728
|
+
for (var u = b ? g : l(g, $), d = m.length - 1; d >= 0; --d) {
|
|
3729
|
+
var v, O = m[d];
|
|
3729
3730
|
if (O === "[]" && $.parseArrays)
|
|
3730
3731
|
v = $.allowEmptyArrays && (u === "" || $.strictNullHandling && u === null) ? [] : [].concat(u);
|
|
3731
3732
|
else {
|
|
@@ -3736,7 +3737,7 @@ function Os() {
|
|
|
3736
3737
|
u = v;
|
|
3737
3738
|
}
|
|
3738
3739
|
return u;
|
|
3739
|
-
},
|
|
3740
|
+
}, y = function(g, $, b, u) {
|
|
3740
3741
|
if (g) {
|
|
3741
3742
|
var d = b.allowDots ? g.replace(/\.([^.[]+)/g, "[$1]") : g, v = /(\[[^[\]]*])/, O = /(\[[^[\]]*])/g, T = b.depth > 0 && v.exec(d), p = T ? d.slice(0, T.index) : d, S = [];
|
|
3742
3743
|
if (p) {
|
|
@@ -3795,22 +3796,22 @@ function Os() {
|
|
|
3795
3796
|
strictNullHandling: typeof g.strictNullHandling == "boolean" ? g.strictNullHandling : o.strictNullHandling
|
|
3796
3797
|
};
|
|
3797
3798
|
};
|
|
3798
|
-
return ur = function(
|
|
3799
|
+
return ur = function(m, g) {
|
|
3799
3800
|
var $ = f(g);
|
|
3800
|
-
if (
|
|
3801
|
+
if (m === "" || m === null || typeof m > "u")
|
|
3801
3802
|
return $.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3802
|
-
for (var b = typeof
|
|
3803
|
-
var O = d[v], T =
|
|
3803
|
+
for (var b = typeof m == "string" ? s(m, $) : m, u = $.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, d = Object.keys(b), v = 0; v < d.length; ++v) {
|
|
3804
|
+
var O = d[v], T = y(O, b[O], $, typeof m == "string");
|
|
3804
3805
|
u = e.merge(u, T, $);
|
|
3805
3806
|
}
|
|
3806
3807
|
return $.allowSparse === !0 ? u : e.compact(u);
|
|
3807
3808
|
}, ur;
|
|
3808
3809
|
}
|
|
3809
3810
|
var fr, Xn;
|
|
3810
|
-
function
|
|
3811
|
+
function jo() {
|
|
3811
3812
|
if (Xn) return fr;
|
|
3812
3813
|
Xn = 1;
|
|
3813
|
-
var e = /* @__PURE__ */
|
|
3814
|
+
var e = /* @__PURE__ */ Os(), r = /* @__PURE__ */ Ts(), t = /* @__PURE__ */ Nr();
|
|
3814
3815
|
return fr = {
|
|
3815
3816
|
formats: t,
|
|
3816
3817
|
parse: r,
|
|
@@ -3818,10 +3819,10 @@ function bo() {
|
|
|
3818
3819
|
}, fr;
|
|
3819
3820
|
}
|
|
3820
3821
|
var Zn;
|
|
3821
|
-
function
|
|
3822
|
-
if (Zn) return
|
|
3822
|
+
function Ps() {
|
|
3823
|
+
if (Zn) return Ce;
|
|
3823
3824
|
Zn = 1;
|
|
3824
|
-
var e =
|
|
3825
|
+
var e = Ji();
|
|
3825
3826
|
function r() {
|
|
3826
3827
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
3827
3828
|
}
|
|
@@ -3852,7 +3853,7 @@ function Ts() {
|
|
|
3852
3853
|
"/",
|
|
3853
3854
|
"?",
|
|
3854
3855
|
"#"
|
|
3855
|
-
],
|
|
3856
|
+
], y = 255, f = /^[+a-z0-9A-Z_-]{0,63}$/, m = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = {
|
|
3856
3857
|
javascript: !0,
|
|
3857
3858
|
"javascript:": !0
|
|
3858
3859
|
}, $ = {
|
|
@@ -3869,17 +3870,17 @@ function Ts() {
|
|
|
3869
3870
|
"ftp:": !0,
|
|
3870
3871
|
"gopher:": !0,
|
|
3871
3872
|
"file:": !0
|
|
3872
|
-
}, u = /* @__PURE__ */
|
|
3873
|
+
}, u = /* @__PURE__ */ jo();
|
|
3873
3874
|
function d(p, S, x) {
|
|
3874
3875
|
if (p && typeof p == "object" && p instanceof r)
|
|
3875
3876
|
return p;
|
|
3876
|
-
var
|
|
3877
|
-
return
|
|
3877
|
+
var R = new r();
|
|
3878
|
+
return R.parse(p, S, x), R;
|
|
3878
3879
|
}
|
|
3879
3880
|
r.prototype.parse = function(p, S, x) {
|
|
3880
3881
|
if (typeof p != "string")
|
|
3881
3882
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof p);
|
|
3882
|
-
var
|
|
3883
|
+
var R = p.indexOf("?"), L = R !== -1 && R < p.indexOf("#") ? "?" : "#", E = p.split(L), B = /\\/g;
|
|
3883
3884
|
E[0] = E[0].replace(B, "/"), p = E.join(L);
|
|
3884
3885
|
var P = p;
|
|
3885
3886
|
if (P = P.trim(), !x && p.split("#").length === 1) {
|
|
@@ -3894,16 +3895,16 @@ function Ts() {
|
|
|
3894
3895
|
this.protocol = D, P = P.substr(H.length);
|
|
3895
3896
|
}
|
|
3896
3897
|
if (x || H || P.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
3897
|
-
var
|
|
3898
|
-
|
|
3898
|
+
var le = P.substr(0, 2) === "//";
|
|
3899
|
+
le && !(H && $[H]) && (P = P.substr(2), this.slashes = !0);
|
|
3899
3900
|
}
|
|
3900
|
-
if (!$[H] && (
|
|
3901
|
+
if (!$[H] && (le || H && !b[H])) {
|
|
3901
3902
|
for (var Z = -1, k = 0; k < c.length; k++) {
|
|
3902
3903
|
var re = P.indexOf(c[k]);
|
|
3903
3904
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3904
3905
|
}
|
|
3905
|
-
var
|
|
3906
|
-
Z === -1 ?
|
|
3906
|
+
var N, q;
|
|
3907
|
+
Z === -1 ? q = P.lastIndexOf("@") : q = P.lastIndexOf("@", Z), q !== -1 && (N = P.slice(0, q), P = P.slice(q + 1), this.auth = decodeURIComponent(N)), Z = -1;
|
|
3907
3908
|
for (var k = 0; k < s.length; k++) {
|
|
3908
3909
|
var re = P.indexOf(s[k]);
|
|
3909
3910
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
@@ -3917,13 +3918,13 @@ function Ts() {
|
|
|
3917
3918
|
for (var z = "", K = 0, ne = W.length; K < ne; K++)
|
|
3918
3919
|
W.charCodeAt(K) > 127 ? z += "x" : z += W[K];
|
|
3919
3920
|
if (!z.match(f)) {
|
|
3920
|
-
var J = C.slice(0, k), A = C.slice(k + 1), F = W.match(
|
|
3921
|
+
var J = C.slice(0, k), A = C.slice(k + 1), F = W.match(m);
|
|
3921
3922
|
F && (J.push(F[1]), A.unshift(F[2])), A.length && (P = "/" + A.join(".") + P), this.hostname = J.join(".");
|
|
3922
3923
|
break;
|
|
3923
3924
|
}
|
|
3924
3925
|
}
|
|
3925
3926
|
}
|
|
3926
|
-
this.hostname.length >
|
|
3927
|
+
this.hostname.length > y ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), U || (this.hostname = e.toASCII(this.hostname));
|
|
3927
3928
|
var _ = this.port ? ":" + this.port : "", Q = this.hostname || "";
|
|
3928
3929
|
this.host = Q + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
|
|
3929
3930
|
}
|
|
@@ -3939,8 +3940,8 @@ function Ts() {
|
|
|
3939
3940
|
oe !== -1 && (this.hash = P.substr(oe), P = P.slice(0, oe));
|
|
3940
3941
|
var he = P.indexOf("?");
|
|
3941
3942
|
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), S && (this.query = u.parse(this.query)), P = P.slice(0, he)) : S && (this.search = "", this.query = {}), P && (this.pathname = P), b[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3942
|
-
var _ = this.pathname || "",
|
|
3943
|
-
this.path = _ +
|
|
3943
|
+
var _ = this.pathname || "", Se = this.search || "";
|
|
3944
|
+
this.path = _ + Se;
|
|
3944
3945
|
}
|
|
3945
3946
|
return this.href = this.format(), this;
|
|
3946
3947
|
};
|
|
@@ -3950,15 +3951,15 @@ function Ts() {
|
|
|
3950
3951
|
r.prototype.format = function() {
|
|
3951
3952
|
var p = this.auth || "";
|
|
3952
3953
|
p && (p = encodeURIComponent(p), p = p.replace(/%3A/i, ":"), p += "@");
|
|
3953
|
-
var S = this.protocol || "", x = this.pathname || "",
|
|
3954
|
+
var S = this.protocol || "", x = this.pathname || "", R = this.hash || "", L = !1, E = "";
|
|
3954
3955
|
this.host ? L = p + this.host : this.hostname && (L = p + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (L += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (E = u.stringify(this.query, {
|
|
3955
3956
|
arrayFormat: "repeat",
|
|
3956
3957
|
addQueryPrefix: !1
|
|
3957
3958
|
}));
|
|
3958
3959
|
var B = this.search || E && "?" + E || "";
|
|
3959
|
-
return S && S.substr(-1) !== ":" && (S += ":"), this.slashes || (!S || b[S]) && L !== !1 ? (L = "//" + (L || ""), x && x.charAt(0) !== "/" && (x = "/" + x)) : L || (L = ""),
|
|
3960
|
+
return S && S.substr(-1) !== ":" && (S += ":"), this.slashes || (!S || b[S]) && L !== !1 ? (L = "//" + (L || ""), x && x.charAt(0) !== "/" && (x = "/" + x)) : L || (L = ""), R && R.charAt(0) !== "#" && (R = "#" + R), B && B.charAt(0) !== "?" && (B = "?" + B), x = x.replace(/[?#]/g, function(P) {
|
|
3960
3961
|
return encodeURIComponent(P);
|
|
3961
|
-
}), B = B.replace("#", "%23"), S + L + x + B +
|
|
3962
|
+
}), B = B.replace("#", "%23"), S + L + x + B + R;
|
|
3962
3963
|
};
|
|
3963
3964
|
function O(p, S) {
|
|
3964
3965
|
return d(p, !1, !0).resolve(S);
|
|
@@ -3974,8 +3975,8 @@ function Ts() {
|
|
|
3974
3975
|
var S = new r();
|
|
3975
3976
|
S.parse(p, !1, !0), p = S;
|
|
3976
3977
|
}
|
|
3977
|
-
for (var x = new r(),
|
|
3978
|
-
var E =
|
|
3978
|
+
for (var x = new r(), R = Object.keys(this), L = 0; L < R.length; L++) {
|
|
3979
|
+
var E = R[L];
|
|
3979
3980
|
x[E] = this[E];
|
|
3980
3981
|
}
|
|
3981
3982
|
if (x.hash = p.hash, p.href === "")
|
|
@@ -3990,8 +3991,8 @@ function Ts() {
|
|
|
3990
3991
|
if (p.protocol && p.protocol !== x.protocol) {
|
|
3991
3992
|
if (!b[p.protocol]) {
|
|
3992
3993
|
for (var H = Object.keys(p), D = 0; D < H.length; D++) {
|
|
3993
|
-
var
|
|
3994
|
-
x[
|
|
3994
|
+
var le = H[D];
|
|
3995
|
+
x[le] = p[le];
|
|
3995
3996
|
}
|
|
3996
3997
|
return x.href = x.format(), x;
|
|
3997
3998
|
}
|
|
@@ -4007,8 +4008,8 @@ function Ts() {
|
|
|
4007
4008
|
}
|
|
4008
4009
|
return x.slashes = x.slashes || p.slashes, x.href = x.format(), x;
|
|
4009
4010
|
}
|
|
4010
|
-
var re = x.pathname && x.pathname.charAt(0) === "/",
|
|
4011
|
-
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (I[0] === "" ? I[0] = p.host : I.unshift(p.host)), p.host = null),
|
|
4011
|
+
var re = x.pathname && x.pathname.charAt(0) === "/", N = p.host || p.pathname && p.pathname.charAt(0) === "/", q = N || re || x.host && p.pathname, U = q, C = x.pathname && x.pathname.split("/") || [], I = p.pathname && p.pathname.split("/") || [], W = x.protocol && !b[x.protocol];
|
|
4012
|
+
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (I[0] === "" ? I[0] = p.host : I.unshift(p.host)), p.host = null), q = q && (I[0] === "" || C[0] === "")), N)
|
|
4012
4013
|
x.host = p.host || p.host === "" ? p.host : x.host, x.hostname = p.hostname || p.hostname === "" ? p.hostname : x.hostname, x.search = p.search, x.query = p.query, C = I;
|
|
4013
4014
|
else if (I.length)
|
|
4014
4015
|
C || (C = []), C.pop(), C = C.concat(I), x.search = p.search, x.query = p.query;
|
|
@@ -4024,28 +4025,28 @@ function Ts() {
|
|
|
4024
4025
|
return x.pathname = null, x.search ? x.path = "/" + x.search : x.path = null, x.href = x.format(), x;
|
|
4025
4026
|
for (var K = C.slice(-1)[0], ne = (x.host || p.host || C.length > 1) && (K === "." || K === "..") || K === "", J = 0, A = C.length; A >= 0; A--)
|
|
4026
4027
|
K = C[A], K === "." ? C.splice(A, 1) : K === ".." ? (C.splice(A, 1), J++) : J && (C.splice(A, 1), J--);
|
|
4027
|
-
if (!
|
|
4028
|
+
if (!q && !U)
|
|
4028
4029
|
for (; J--; J)
|
|
4029
4030
|
C.unshift("..");
|
|
4030
|
-
|
|
4031
|
+
q && C[0] !== "" && (!C[0] || C[0].charAt(0) !== "/") && C.unshift(""), ne && C.join("/").substr(-1) !== "/" && C.push("");
|
|
4031
4032
|
var F = C[0] === "" || C[0] && C[0].charAt(0) === "/";
|
|
4032
4033
|
if (W) {
|
|
4033
4034
|
x.hostname = F ? "" : C.length ? C.shift() : "", x.host = x.hostname;
|
|
4034
4035
|
var z = x.host && x.host.indexOf("@") > 0 ? x.host.split("@") : !1;
|
|
4035
4036
|
z && (x.auth = z.shift(), x.hostname = z.shift(), x.host = x.hostname);
|
|
4036
4037
|
}
|
|
4037
|
-
return
|
|
4038
|
+
return q = q || x.host && C.length, q && !F && C.unshift(""), C.length > 0 ? x.pathname = C.join("/") : (x.pathname = null, x.path = null), (x.pathname !== null || x.search !== null) && (x.path = (x.pathname ? x.pathname : "") + (x.search ? x.search : "")), x.auth = p.auth || x.auth, x.slashes = x.slashes || p.slashes, x.href = x.format(), x;
|
|
4038
4039
|
}, r.prototype.parseHost = function() {
|
|
4039
4040
|
var p = this.host, S = o.exec(p);
|
|
4040
4041
|
S && (S = S[0], S !== ":" && (this.port = S.substr(1)), p = p.substr(0, p.length - S.length)), p && (this.hostname = p);
|
|
4041
|
-
},
|
|
4042
|
+
}, Ce.parse = d, Ce.resolve = O, Ce.resolveObject = T, Ce.format = v, Ce.Url = r, Ce;
|
|
4042
4043
|
}
|
|
4043
|
-
var pr =
|
|
4044
|
+
var pr = Ps(), dr = /* @__PURE__ */ jo(), Cs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Ns = class {
|
|
4044
4045
|
constructor(e, r = {}) {
|
|
4045
4046
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4046
4047
|
harIsAlreadyEncoded: !1,
|
|
4047
4048
|
...r
|
|
4048
|
-
}, this.requests = [],
|
|
4049
|
+
}, this.requests = [], Cs(e) ? this.entries = e.log.entries : this.entries = [
|
|
4049
4050
|
{
|
|
4050
4051
|
request: e
|
|
4051
4052
|
}
|
|
@@ -4070,7 +4071,7 @@ var pr = Ts(), dr = /* @__PURE__ */ bo(), Ps = (e) => typeof e == "object" && "l
|
|
|
4070
4071
|
}), this;
|
|
4071
4072
|
}
|
|
4072
4073
|
prepare(e, r) {
|
|
4073
|
-
var
|
|
4074
|
+
var y, f, m;
|
|
4074
4075
|
const t = {
|
|
4075
4076
|
...e,
|
|
4076
4077
|
fullUrl: "",
|
|
@@ -4097,7 +4098,7 @@ var pr = Ts(), dr = /* @__PURE__ */ bo(), Ps = (e) => typeof e == "object" && "l
|
|
|
4097
4098
|
}),
|
|
4098
4099
|
{}
|
|
4099
4100
|
));
|
|
4100
|
-
const o = (
|
|
4101
|
+
const o = (y = t.cookies) == null ? void 0 : y.map(({ name: g, value: $ }) => r.harIsAlreadyEncoded ? `${g}=${$}` : `${encodeURIComponent(g)}=${encodeURIComponent($)}`);
|
|
4101
4102
|
switch (o != null && o.length && (t.allHeaders.cookie = o.join("; ")), t.postData.mimeType) {
|
|
4102
4103
|
case "multipart/mixed":
|
|
4103
4104
|
case "multipart/related":
|
|
@@ -4107,10 +4108,10 @@ var pr = Ts(), dr = /* @__PURE__ */ bo(), Ps = (e) => typeof e == "object" && "l
|
|
|
4107
4108
|
const g = "---011000010111000001101001", $ = `${g}--`, b = `\r
|
|
4108
4109
|
`, u = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), d = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4109
4110
|
`), v = [`--${g}`];
|
|
4110
|
-
(
|
|
4111
|
-
const S = T.name, x = T.value || "",
|
|
4112
|
-
|
|
4113
|
-
`Content-Disposition: form-data; name="${u(d(S))}"; filename="${
|
|
4111
|
+
(m = t.postData) == null || m.params.forEach((T, p) => {
|
|
4112
|
+
const S = T.name, x = T.value || "", R = T.fileName || null, L = T.contentType || "application/octet-stream";
|
|
4113
|
+
R ? (v.push(
|
|
4114
|
+
`Content-Disposition: form-data; name="${u(d(S))}"; filename="${R}"`
|
|
4114
4115
|
), v.push(`Content-Type: ${L}`)) : v.push(`Content-Disposition: form-data; name="${u(d(S))}"`), v.push(""), v.push(d(x)), p !== t.postData.params.length - 1 && v.push(`--${g}`);
|
|
4115
4116
|
}), v.push(`--${$}`), t.postData.boundary = g, t.postData.text = v.join(b);
|
|
4116
4117
|
const O = pe(t.headersObj, "content-type") || "content-type";
|
|
@@ -4170,7 +4171,7 @@ var pr = Ts(), dr = /* @__PURE__ */ bo(), Ps = (e) => typeof e == "object" && "l
|
|
|
4170
4171
|
}
|
|
4171
4172
|
convert(e, r, t) {
|
|
4172
4173
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4173
|
-
const o =
|
|
4174
|
+
const o = Gi[e];
|
|
4174
4175
|
if (!o)
|
|
4175
4176
|
return !1;
|
|
4176
4177
|
const { convert: i } = o.clientsById[r || o.info.default];
|
|
@@ -4181,8 +4182,8 @@ const Rs = ({
|
|
|
4181
4182
|
rootMargin: e = "0px",
|
|
4182
4183
|
threshold: r
|
|
4183
4184
|
} = {}) => {
|
|
4184
|
-
const [t, o] = ge(!1), i =
|
|
4185
|
-
return
|
|
4185
|
+
const [t, o] = ge(!1), i = jr(null);
|
|
4186
|
+
return wr(() => {
|
|
4186
4187
|
const l = new IntersectionObserver(
|
|
4187
4188
|
([a]) => {
|
|
4188
4189
|
a && o(a.isIntersecting);
|
|
@@ -4192,11 +4193,11 @@ const Rs = ({
|
|
|
4192
4193
|
if (n)
|
|
4193
4194
|
return l.observe(n), () => l.unobserve(n);
|
|
4194
4195
|
}, [e, r]), [i, t];
|
|
4195
|
-
}, qs = typeof window < "u" ?
|
|
4196
|
+
}, qs = typeof window < "u" ? ia : wr, wo = ({
|
|
4196
4197
|
children: e,
|
|
4197
4198
|
maxHeight: r = 250
|
|
4198
4199
|
}) => {
|
|
4199
|
-
const t =
|
|
4200
|
+
const t = jr(null), [o, i] = ge(!1), [l, n] = ge(!1);
|
|
4200
4201
|
return qs(() => {
|
|
4201
4202
|
const a = t.current;
|
|
4202
4203
|
if (!a) return;
|
|
@@ -4205,32 +4206,32 @@ const Rs = ({
|
|
|
4205
4206
|
i(a.scrollHeight > r);
|
|
4206
4207
|
});
|
|
4207
4208
|
return s.observe(a), () => s.disconnect();
|
|
4208
|
-
}, [r]), /* @__PURE__ */
|
|
4209
|
-
|
|
4209
|
+
}, [r]), /* @__PURE__ */ h.jsxs(
|
|
4210
|
+
no,
|
|
4210
4211
|
{
|
|
4211
4212
|
className: "group",
|
|
4212
4213
|
open: l,
|
|
4213
4214
|
onOpenChange: n,
|
|
4214
4215
|
style: { "--max-height": `${r}px` },
|
|
4215
4216
|
children: [
|
|
4216
|
-
/* @__PURE__ */
|
|
4217
|
-
|
|
4217
|
+
/* @__PURE__ */ h.jsxs(
|
|
4218
|
+
oo,
|
|
4218
4219
|
{
|
|
4219
4220
|
forceMount: !0,
|
|
4220
|
-
className:
|
|
4221
|
+
className: se(
|
|
4221
4222
|
"relative overflow-hidden group",
|
|
4222
4223
|
!l && o && "max-h-[--max-height]"
|
|
4223
4224
|
),
|
|
4224
4225
|
children: [
|
|
4225
|
-
!l && o && /* @__PURE__ */
|
|
4226
|
-
/* @__PURE__ */
|
|
4227
|
-
!l && o && /* @__PURE__ */
|
|
4228
|
-
|
|
4226
|
+
!l && o && /* @__PURE__ */ h.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
|
|
4227
|
+
/* @__PURE__ */ h.jsx("div", { ref: t, children: e }),
|
|
4228
|
+
!l && o && /* @__PURE__ */ h.jsx(
|
|
4229
|
+
yr,
|
|
4229
4230
|
{
|
|
4230
4231
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4231
4232
|
asChild: !0,
|
|
4232
|
-
children: /* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4233
|
+
children: /* @__PURE__ */ h.jsx("div", { children: /* @__PURE__ */ h.jsxs(Hr, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4234
|
+
/* @__PURE__ */ h.jsx(Uo, { size: 14, className: "mr-1.5" }),
|
|
4234
4235
|
"Click to expand"
|
|
4235
4236
|
] }) })
|
|
4236
4237
|
}
|
|
@@ -4238,37 +4239,37 @@ const Rs = ({
|
|
|
4238
4239
|
]
|
|
4239
4240
|
}
|
|
4240
4241
|
),
|
|
4241
|
-
o && /* @__PURE__ */
|
|
4242
|
+
o && /* @__PURE__ */ h.jsx(
|
|
4242
4243
|
"div",
|
|
4243
4244
|
{
|
|
4244
|
-
className:
|
|
4245
|
-
children: /* @__PURE__ */
|
|
4245
|
+
className: se("flex justify-center w-full mb-2", !l && "hidden"),
|
|
4246
|
+
children: /* @__PURE__ */ h.jsx(yr, { asChild: !0, children: /* @__PURE__ */ h.jsxs(Hr, { variant: "outline", size: "sm", children: [
|
|
4246
4247
|
"Collapse",
|
|
4247
|
-
/* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ h.jsx(Fo, { size: 14, className: "ml-1.5" })
|
|
4248
4249
|
] }) })
|
|
4249
4250
|
}
|
|
4250
4251
|
)
|
|
4251
4252
|
]
|
|
4252
4253
|
}
|
|
4253
4254
|
);
|
|
4254
|
-
},
|
|
4255
|
+
}, ks = ({
|
|
4255
4256
|
server: e,
|
|
4256
4257
|
servers: r,
|
|
4257
4258
|
operation: t,
|
|
4258
4259
|
examples: o
|
|
4259
4260
|
}) => {
|
|
4260
|
-
var
|
|
4261
|
-
const { isAuthEnabled: i, login: l, signup: n, isPending: a, isAuthenticated: s } =
|
|
4261
|
+
var m, g, $;
|
|
4262
|
+
const { isAuthEnabled: i, login: l, signup: n, isPending: a, isAuthenticated: s } = ba(), c = (m = t.parameters) == null ? void 0 : m.filter((b) => b.in === "header").sort((b, u) => b.required && !u.required ? -1 : 1).map((b) => {
|
|
4262
4263
|
var u, d, v, O, T, p, S, x;
|
|
4263
4264
|
return {
|
|
4264
4265
|
name: b.name,
|
|
4265
|
-
defaultValue: ((u = b.schema) == null ? void 0 : u.default) ?? ((v = (d = b.examples) == null ? void 0 : d.find((
|
|
4266
|
+
defaultValue: ((u = b.schema) == null ? void 0 : u.default) ?? ((v = (d = b.examples) == null ? void 0 : d.find((R) => R.value)) == null ? void 0 : v.value) ?? "",
|
|
4266
4267
|
defaultActive: b.required ?? !1,
|
|
4267
4268
|
isRequired: b.required ?? !1,
|
|
4268
4269
|
enum: ((O = b.schema) == null ? void 0 : O.type) == "array" ? (p = (T = b.schema) == null ? void 0 : T.items) == null ? void 0 : p.enum : (S = b.schema) == null ? void 0 : S.enum,
|
|
4269
4270
|
type: ((x = b.schema) == null ? void 0 : x.type) ?? "string"
|
|
4270
4271
|
};
|
|
4271
|
-
}),
|
|
4272
|
+
}), y = (g = t.parameters) == null ? void 0 : g.filter((b) => b.in === "query").sort((b, u) => b.required && !u.required ? -1 : 1).map((b) => {
|
|
4272
4273
|
var u, d, v, O, T;
|
|
4273
4274
|
return {
|
|
4274
4275
|
name: b.name,
|
|
@@ -4278,15 +4279,15 @@ const Rs = ({
|
|
|
4278
4279
|
type: ((T = b.schema) == null ? void 0 : T.type) ?? "string"
|
|
4279
4280
|
};
|
|
4280
4281
|
}), f = ($ = t.parameters) == null ? void 0 : $.filter((b) => b.in === "path").map((b) => ({ name: b.name }));
|
|
4281
|
-
return /* @__PURE__ */
|
|
4282
|
-
|
|
4282
|
+
return /* @__PURE__ */ h.jsx(
|
|
4283
|
+
Ko,
|
|
4283
4284
|
{
|
|
4284
4285
|
server: e,
|
|
4285
4286
|
servers: r,
|
|
4286
4287
|
method: t.method,
|
|
4287
4288
|
url: t.path,
|
|
4288
4289
|
headers: c,
|
|
4289
|
-
queryParams:
|
|
4290
|
+
queryParams: y,
|
|
4290
4291
|
pathParams: f,
|
|
4291
4292
|
examples: o,
|
|
4292
4293
|
requiresLogin: i && !s && !a,
|
|
@@ -4294,22 +4295,22 @@ const Rs = ({
|
|
|
4294
4295
|
onSignUp: () => n()
|
|
4295
4296
|
}
|
|
4296
4297
|
);
|
|
4297
|
-
}, Rr = ({ children: e, className: r }) => /* @__PURE__ */
|
|
4298
|
+
}, Rr = ({ children: e, className: r }) => /* @__PURE__ */ h.jsx(
|
|
4298
4299
|
"div",
|
|
4299
4300
|
{
|
|
4300
|
-
className:
|
|
4301
|
+
className: se("rounded-xl overflow-hidden border border-border", r),
|
|
4301
4302
|
children: e
|
|
4302
4303
|
}
|
|
4303
|
-
), qr = ({ children: e, className: r }) => /* @__PURE__ */
|
|
4304
|
+
), qr = ({ children: e, className: r }) => /* @__PURE__ */ h.jsx(
|
|
4304
4305
|
"div",
|
|
4305
4306
|
{
|
|
4306
|
-
className:
|
|
4307
|
+
className: se(
|
|
4307
4308
|
"border-b bg-muted dark:bg-transparent text-card-foreground p-3 py-2.5",
|
|
4308
4309
|
r
|
|
4309
4310
|
),
|
|
4310
4311
|
children: e
|
|
4311
4312
|
}
|
|
4312
|
-
),
|
|
4313
|
+
), So = ({ children: e, className: r }) => /* @__PURE__ */ h.jsx("div", { className: se("bg-card overflow-auto p-2", r), children: e }), Oo = ({ children: e, className: r }) => /* @__PURE__ */ h.jsx("div", { className: se("border-t bg-muted dark:bg-transparent p-3", r), children: e }), He = (e, r) => {
|
|
4313
4314
|
if (e.example !== void 0)
|
|
4314
4315
|
return e.example;
|
|
4315
4316
|
if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
|
|
@@ -4345,32 +4346,32 @@ const Rs = ({
|
|
|
4345
4346
|
default:
|
|
4346
4347
|
return {};
|
|
4347
4348
|
}
|
|
4348
|
-
},
|
|
4349
|
+
}, Es = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), As = (e) => e ? {
|
|
4349
4350
|
"application/json": "json",
|
|
4350
4351
|
"application/xml": "xml",
|
|
4351
4352
|
"application/x-yaml": "yaml",
|
|
4352
4353
|
"text/csv": "csv",
|
|
4353
4354
|
"application/javascript": "javascript",
|
|
4354
4355
|
"application/graphql": "graphql"
|
|
4355
|
-
}[e] ?? "plain" : "plain",
|
|
4356
|
+
}[e] ?? "plain" : "plain", To = ({
|
|
4356
4357
|
content: e,
|
|
4357
4358
|
description: r,
|
|
4358
4359
|
onExampleChange: t
|
|
4359
4360
|
}) => {
|
|
4360
4361
|
var g;
|
|
4361
|
-
const [o, i] = ge(0), [l, n] = ge(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], s = (a == null ? void 0 : a.examples) ?? [], c = s[l],
|
|
4362
|
+
const [o, i] = ge(0), [l, n] = ge(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], s = (a == null ? void 0 : a.examples) ?? [], c = s[l], y = so(() => {
|
|
4362
4363
|
if (c)
|
|
4363
4364
|
return "value" in c ? c.value : c;
|
|
4364
4365
|
if (a != null && a.schema)
|
|
4365
4366
|
return He(a.schema);
|
|
4366
4367
|
}, [c, a == null ? void 0 : a.schema]);
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
}, [
|
|
4370
|
-
const f =
|
|
4371
|
-
return /* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4373
|
-
c != null && c.externalValue ? /* @__PURE__ */
|
|
4368
|
+
wr(() => {
|
|
4369
|
+
y && (t == null || t(y));
|
|
4370
|
+
}, [y, t]);
|
|
4371
|
+
const f = Es(y), m = As(a == null ? void 0 : a.mediaType);
|
|
4372
|
+
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
4373
|
+
/* @__PURE__ */ h.jsxs(So, { className: "p-0", children: [
|
|
4374
|
+
c != null && c.externalValue ? /* @__PURE__ */ h.jsx("div", { className: "p-2", children: /* @__PURE__ */ h.jsx(
|
|
4374
4375
|
"a",
|
|
4375
4376
|
{
|
|
4376
4377
|
href: c.externalValue,
|
|
@@ -4379,21 +4380,21 @@ const Rs = ({
|
|
|
4379
4380
|
className: "text-xs text-primary hover:underline",
|
|
4380
4381
|
children: "View External Example →"
|
|
4381
4382
|
}
|
|
4382
|
-
) }) : /* @__PURE__ */
|
|
4383
|
-
|
|
4383
|
+
) }) : /* @__PURE__ */ h.jsx(wo, { children: /* @__PURE__ */ h.jsx(
|
|
4384
|
+
co,
|
|
4384
4385
|
{
|
|
4385
|
-
language:
|
|
4386
|
+
language: m,
|
|
4386
4387
|
noBackground: !0,
|
|
4387
4388
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4388
4389
|
code: f
|
|
4389
4390
|
}
|
|
4390
4391
|
) }),
|
|
4391
|
-
(c == null ? void 0 : c.description) && /* @__PURE__ */
|
|
4392
|
+
(c == null ? void 0 : c.description) && /* @__PURE__ */ h.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
|
|
4392
4393
|
] }),
|
|
4393
|
-
/* @__PURE__ */
|
|
4394
|
-
r && /* @__PURE__ */
|
|
4395
|
-
(s.length !== 0 || e.length !== 0) && /* @__PURE__ */
|
|
4396
|
-
/* @__PURE__ */
|
|
4394
|
+
/* @__PURE__ */ h.jsxs(Oo, { className: "text-xs p-0 divide-y divide-border", children: [
|
|
4395
|
+
r && /* @__PURE__ */ h.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: r }),
|
|
4396
|
+
(s.length !== 0 || e.length !== 0) && /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4397
|
+
/* @__PURE__ */ h.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ h.jsx(
|
|
4397
4398
|
et,
|
|
4398
4399
|
{
|
|
4399
4400
|
className: "max-w-[200px]",
|
|
@@ -4404,8 +4405,8 @@ const Rs = ({
|
|
|
4404
4405
|
label: $.mediaType
|
|
4405
4406
|
}))
|
|
4406
4407
|
}
|
|
4407
|
-
) : /* @__PURE__ */
|
|
4408
|
-
s.length > 1 && /* @__PURE__ */
|
|
4408
|
+
) : /* @__PURE__ */ h.jsx("span", { className: "font-mono text-[11px]", children: (g = e[0]) == null ? void 0 : g.mediaType }) }),
|
|
4409
|
+
s.length > 1 && /* @__PURE__ */ h.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ h.jsx(
|
|
4409
4410
|
et,
|
|
4410
4411
|
{
|
|
4411
4412
|
className: "max-w-[180px]",
|
|
@@ -4420,38 +4421,38 @@ const Rs = ({
|
|
|
4420
4421
|
] })
|
|
4421
4422
|
] })
|
|
4422
4423
|
] });
|
|
4423
|
-
},
|
|
4424
|
+
}, Is = ({
|
|
4424
4425
|
content: e,
|
|
4425
4426
|
onExampleChange: r
|
|
4426
|
-
}) => e.length === 0 ? null : /* @__PURE__ */
|
|
4427
|
-
/* @__PURE__ */
|
|
4428
|
-
/* @__PURE__ */
|
|
4429
|
-
] }),
|
|
4430
|
-
|
|
4427
|
+
}) => e.length === 0 ? null : /* @__PURE__ */ h.jsxs(Rr, { children: [
|
|
4428
|
+
/* @__PURE__ */ h.jsx(qr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ h.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4429
|
+
/* @__PURE__ */ h.jsx(To, { content: e, onExampleChange: r })
|
|
4430
|
+
] }), Ls = ({ response: e }) => /* @__PURE__ */ h.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ h.jsx(
|
|
4431
|
+
To,
|
|
4431
4432
|
{
|
|
4432
4433
|
content: e.content ?? [],
|
|
4433
4434
|
description: e.description ?? void 0
|
|
4434
4435
|
}
|
|
4435
|
-
) }),
|
|
4436
|
+
) }), Us = ({
|
|
4436
4437
|
responses: e,
|
|
4437
4438
|
selectedResponse: r,
|
|
4438
4439
|
onSelectResponse: t
|
|
4439
4440
|
}) => {
|
|
4440
4441
|
var o;
|
|
4441
|
-
return /* @__PURE__ */
|
|
4442
|
+
return /* @__PURE__ */ h.jsx(Rr, { children: /* @__PURE__ */ h.jsxs(
|
|
4442
4443
|
Ye.Root,
|
|
4443
4444
|
{
|
|
4444
4445
|
defaultValue: (o = e[0]) == null ? void 0 : o.statusCode,
|
|
4445
4446
|
value: r,
|
|
4446
4447
|
onValueChange: (i) => t(i),
|
|
4447
4448
|
children: [
|
|
4448
|
-
/* @__PURE__ */
|
|
4449
|
-
/* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4449
|
+
/* @__PURE__ */ h.jsxs(qr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
4450
|
+
/* @__PURE__ */ h.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
4451
|
+
/* @__PURE__ */ h.jsx(Ye.List, { className: "flex gap-2", children: e.map((i) => /* @__PURE__ */ h.jsx(
|
|
4451
4452
|
Ye.Trigger,
|
|
4452
4453
|
{
|
|
4453
4454
|
value: i.statusCode,
|
|
4454
|
-
className:
|
|
4455
|
+
className: se(
|
|
4455
4456
|
"text-xs font-mono px-1.5 py-1 pb-px translate-y-px border-b-2 border-transparent rounded-t cursor-pointer",
|
|
4456
4457
|
"data-[state=active]:text-primary data-[state=active]:dark:text-inherit data-[state=active]:border-primary",
|
|
4457
4458
|
"hover:border-accent-foreground/25"
|
|
@@ -4461,11 +4462,11 @@ const Rs = ({
|
|
|
4461
4462
|
i.statusCode
|
|
4462
4463
|
)) })
|
|
4463
4464
|
] }),
|
|
4464
|
-
e.map((i) => /* @__PURE__ */
|
|
4465
|
+
e.map((i) => /* @__PURE__ */ h.jsx(Ls, { response: i }, i.statusCode))
|
|
4465
4466
|
]
|
|
4466
4467
|
}
|
|
4467
4468
|
) });
|
|
4468
|
-
},
|
|
4469
|
+
}, Fs = (e, r) => {
|
|
4469
4470
|
let t;
|
|
4470
4471
|
switch (r) {
|
|
4471
4472
|
case "shell":
|
|
@@ -4506,7 +4507,7 @@ const Rs = ({
|
|
|
4506
4507
|
break;
|
|
4507
4508
|
}
|
|
4508
4509
|
return t ? t[0] : "";
|
|
4509
|
-
},
|
|
4510
|
+
}, _s = rt(
|
|
4510
4511
|
/* GraphQL */
|
|
4511
4512
|
`
|
|
4512
4513
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4518,7 +4519,7 @@ const Rs = ({
|
|
|
4518
4519
|
}
|
|
4519
4520
|
}
|
|
4520
4521
|
`
|
|
4521
|
-
),
|
|
4522
|
+
), Bs = [
|
|
4522
4523
|
{ value: "shell", label: "cURL" },
|
|
4523
4524
|
{ value: "js", label: "JavaScript" },
|
|
4524
4525
|
{ value: "python", label: "Python" },
|
|
@@ -4530,18 +4531,18 @@ const Rs = ({
|
|
|
4530
4531
|
{ value: "php", label: "PHP" },
|
|
4531
4532
|
{ value: "ruby", label: "Ruby" },
|
|
4532
4533
|
{ value: "swift", label: "Swift" }
|
|
4533
|
-
],
|
|
4534
|
+
], Hs = ({
|
|
4534
4535
|
operation: e,
|
|
4535
4536
|
selectedResponse: r,
|
|
4536
4537
|
onSelectResponse: t
|
|
4537
4538
|
}) => {
|
|
4538
4539
|
var p;
|
|
4539
|
-
const { input: o, type: i, options: l } =
|
|
4540
|
-
|
|
4540
|
+
const { input: o, type: i, options: l } = Sr(), n = Or(_s, { input: o, type: i }), a = xr(n), s = ao(e.method), [c, y] = Do(), [, f] = io(), [m, g] = ge(), $ = c.get("lang") ?? (l == null ? void 0 : l.examplesDefaultLanguage) ?? "shell", b = (p = e.requestBody) == null ? void 0 : p.content, u = /* @__PURE__ */ h.jsx(
|
|
4541
|
+
Yo,
|
|
4541
4542
|
{
|
|
4542
4543
|
path: e.path,
|
|
4543
|
-
renderParam: ({ name: S }) => /* @__PURE__ */
|
|
4544
|
-
|
|
4544
|
+
renderParam: ({ name: S }) => /* @__PURE__ */ h.jsx(
|
|
4545
|
+
ro,
|
|
4545
4546
|
{
|
|
4546
4547
|
name: S,
|
|
4547
4548
|
backgroundOpacity: "0",
|
|
@@ -4550,9 +4551,9 @@ const Rs = ({
|
|
|
4550
4551
|
}
|
|
4551
4552
|
)
|
|
4552
4553
|
}
|
|
4553
|
-
), { selectedServer: d } =
|
|
4554
|
-
var
|
|
4555
|
-
const S =
|
|
4554
|
+
), { selectedServer: d } = $r(a.data.schema.servers), v = so(() => {
|
|
4555
|
+
var R;
|
|
4556
|
+
const S = m ?? ((R = b == null ? void 0 : b[0]) != null && R.schema ? He(b[0].schema) : void 0), x = new Ns({
|
|
4556
4557
|
method: e.method.toLocaleUpperCase(),
|
|
4557
4558
|
url: d + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4558
4559
|
postData: S ? {
|
|
@@ -4566,9 +4567,9 @@ const Rs = ({
|
|
|
4566
4567
|
headersSize: 0,
|
|
4567
4568
|
bodySize: 0
|
|
4568
4569
|
});
|
|
4569
|
-
return
|
|
4570
|
+
return Fs(x, $);
|
|
4570
4571
|
}, [
|
|
4571
|
-
|
|
4572
|
+
m,
|
|
4572
4573
|
b,
|
|
4573
4574
|
e.method,
|
|
4574
4575
|
e.path,
|
|
@@ -4576,22 +4577,22 @@ const Rs = ({
|
|
|
4576
4577
|
a.data.schema.url,
|
|
4577
4578
|
$
|
|
4578
4579
|
]), [O, T] = Rs({ rootMargin: "200px 0px 200px 0px" });
|
|
4579
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ h.jsxs(
|
|
4580
4581
|
"aside",
|
|
4581
4582
|
{
|
|
4582
4583
|
ref: O,
|
|
4583
4584
|
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
4584
4585
|
"data-pagefind-ignore": "all",
|
|
4585
4586
|
children: [
|
|
4586
|
-
/* @__PURE__ */
|
|
4587
|
-
/* @__PURE__ */
|
|
4588
|
-
/* @__PURE__ */
|
|
4589
|
-
/* @__PURE__ */
|
|
4587
|
+
/* @__PURE__ */ h.jsxs(Rr, { children: [
|
|
4588
|
+
/* @__PURE__ */ h.jsxs(qr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4589
|
+
/* @__PURE__ */ h.jsxs("span", { className: "font-mono break-words leading-6", children: [
|
|
4590
|
+
/* @__PURE__ */ h.jsx("span", { className: se("font-semibold", s), children: e.method.toLocaleUpperCase() }),
|
|
4590
4591
|
" ",
|
|
4591
4592
|
u
|
|
4592
4593
|
] }),
|
|
4593
|
-
T && /* @__PURE__ */
|
|
4594
|
-
|
|
4594
|
+
T && /* @__PURE__ */ h.jsx(
|
|
4595
|
+
ks,
|
|
4595
4596
|
{
|
|
4596
4597
|
servers: a.data.schema.servers.map((S) => S.url),
|
|
4597
4598
|
operation: e,
|
|
@@ -4599,9 +4600,9 @@ const Rs = ({
|
|
|
4599
4600
|
}
|
|
4600
4601
|
)
|
|
4601
4602
|
] }),
|
|
4602
|
-
T && /* @__PURE__ */
|
|
4603
|
-
/* @__PURE__ */
|
|
4604
|
-
|
|
4603
|
+
T && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
4604
|
+
/* @__PURE__ */ h.jsx(So, { className: "p-0", children: /* @__PURE__ */ h.jsx(wo, { children: /* @__PURE__ */ h.jsx(
|
|
4605
|
+
co,
|
|
4605
4606
|
{
|
|
4606
4607
|
language: $,
|
|
4607
4608
|
noBackground: !0,
|
|
@@ -4609,33 +4610,33 @@ const Rs = ({
|
|
|
4609
4610
|
code: v
|
|
4610
4611
|
}
|
|
4611
4612
|
) }) }),
|
|
4612
|
-
/* @__PURE__ */
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4613
|
+
/* @__PURE__ */ h.jsxs(Oo, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
4614
|
+
/* @__PURE__ */ h.jsx("span", { children: "Show example in" }),
|
|
4615
|
+
/* @__PURE__ */ h.jsx(
|
|
4615
4616
|
et,
|
|
4616
4617
|
{
|
|
4617
4618
|
className: "self-start max-w-[150px]",
|
|
4618
4619
|
value: $,
|
|
4619
4620
|
onChange: (S) => {
|
|
4620
4621
|
f(() => {
|
|
4621
|
-
|
|
4622
|
+
y((x) => (x.set("lang", S.target.value), x));
|
|
4622
4623
|
});
|
|
4623
4624
|
},
|
|
4624
|
-
options:
|
|
4625
|
+
options: Bs
|
|
4625
4626
|
}
|
|
4626
4627
|
)
|
|
4627
4628
|
] })
|
|
4628
4629
|
] })
|
|
4629
4630
|
] }),
|
|
4630
|
-
T && b && /* @__PURE__ */
|
|
4631
|
-
|
|
4631
|
+
T && b && /* @__PURE__ */ h.jsx(
|
|
4632
|
+
Is,
|
|
4632
4633
|
{
|
|
4633
4634
|
content: b,
|
|
4634
4635
|
onExampleChange: g
|
|
4635
4636
|
}
|
|
4636
4637
|
),
|
|
4637
|
-
T && e.responses.length > 0 && /* @__PURE__ */
|
|
4638
|
-
|
|
4638
|
+
T && e.responses.length > 0 && /* @__PURE__ */ h.jsx(
|
|
4639
|
+
Us,
|
|
4639
4640
|
{
|
|
4640
4641
|
selectedResponse: r,
|
|
4641
4642
|
onSelectResponse: t,
|
|
@@ -4645,75 +4646,75 @@ const Rs = ({
|
|
|
4645
4646
|
]
|
|
4646
4647
|
}
|
|
4647
4648
|
);
|
|
4648
|
-
}, Hs = {
|
|
4649
|
-
AND: /* @__PURE__ */ m.jsx(Qo, { size: 16, className: "fill-card" }),
|
|
4650
|
-
OR: /* @__PURE__ */ m.jsx(Do, { size: 16, className: "fill-card" }),
|
|
4651
|
-
ONE: /* @__PURE__ */ m.jsx(Vo, { size: 14, className: "fill-card" })
|
|
4652
4649
|
}, Ms = {
|
|
4650
|
+
AND: /* @__PURE__ */ h.jsx(Mo, { size: 16, className: "fill-card" }),
|
|
4651
|
+
OR: /* @__PURE__ */ h.jsx(Ho, { size: 16, className: "fill-card" }),
|
|
4652
|
+
ONE: /* @__PURE__ */ h.jsx(Bo, { size: 14, className: "fill-card" })
|
|
4653
|
+
}, zs = {
|
|
4653
4654
|
AND: "text-green-500 dark:text-green-300/60",
|
|
4654
4655
|
OR: "text-blue-400 dark:text-blue-500",
|
|
4655
4656
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
4656
|
-
},
|
|
4657
|
+
}, Gs = ({
|
|
4657
4658
|
type: e,
|
|
4658
4659
|
isOpen: r,
|
|
4659
4660
|
className: t
|
|
4660
|
-
}) => /* @__PURE__ */
|
|
4661
|
+
}) => /* @__PURE__ */ h.jsx(
|
|
4661
4662
|
"div",
|
|
4662
4663
|
{
|
|
4663
|
-
className:
|
|
4664
|
-
|
|
4664
|
+
className: se(
|
|
4665
|
+
zs[e],
|
|
4665
4666
|
"relative text-sm flex py-2",
|
|
4666
4667
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
4667
4668
|
t
|
|
4668
4669
|
),
|
|
4669
|
-
children: /* @__PURE__ */
|
|
4670
|
-
|
|
4671
|
-
/* @__PURE__ */
|
|
4670
|
+
children: /* @__PURE__ */ h.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
4671
|
+
Ms[e],
|
|
4672
|
+
/* @__PURE__ */ h.jsx(
|
|
4672
4673
|
"div",
|
|
4673
4674
|
{
|
|
4674
|
-
className:
|
|
4675
|
+
className: se(
|
|
4675
4676
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
4676
4677
|
!r && "-rotate-90"
|
|
4677
4678
|
),
|
|
4678
|
-
children: /* @__PURE__ */
|
|
4679
|
+
children: /* @__PURE__ */ h.jsx(_o, { size: 16 })
|
|
4679
4680
|
}
|
|
4680
4681
|
)
|
|
4681
4682
|
] })
|
|
4682
4683
|
}
|
|
4683
|
-
),
|
|
4684
|
+
), Ws = (e) => {
|
|
4684
4685
|
const [r, t] = ge(!0);
|
|
4685
|
-
return /* @__PURE__ */
|
|
4686
|
+
return /* @__PURE__ */ h.jsxs(
|
|
4686
4687
|
xe.Root,
|
|
4687
4688
|
{
|
|
4688
4689
|
open: r,
|
|
4689
4690
|
onOpenChange: () => t((o) => !o),
|
|
4690
4691
|
className: "group",
|
|
4691
4692
|
children: [
|
|
4692
|
-
/* @__PURE__ */
|
|
4693
|
-
!r && /* @__PURE__ */
|
|
4694
|
-
/* @__PURE__ */
|
|
4693
|
+
/* @__PURE__ */ h.jsx(xe.Trigger, { children: /* @__PURE__ */ h.jsx(Gs, { type: e.type, isOpen: r }) }),
|
|
4694
|
+
!r && /* @__PURE__ */ h.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
4695
|
+
/* @__PURE__ */ h.jsx(xe.Content, { children: /* @__PURE__ */ h.jsx(Ge, { schema: e.schema, level: e.level + 1 }) })
|
|
4695
4696
|
]
|
|
4696
4697
|
}
|
|
4697
4698
|
);
|
|
4698
|
-
},
|
|
4699
|
+
}, Js = {
|
|
4699
4700
|
AND: "All of",
|
|
4700
4701
|
OR: "Any of",
|
|
4701
4702
|
ONE: "One of"
|
|
4702
|
-
},
|
|
4703
|
+
}, Vs = ({
|
|
4703
4704
|
schemas: e,
|
|
4704
4705
|
type: r,
|
|
4705
4706
|
isOpen: t,
|
|
4706
4707
|
level: o,
|
|
4707
4708
|
toggleOpen: i
|
|
4708
|
-
}) => /* @__PURE__ */
|
|
4709
|
-
/* @__PURE__ */
|
|
4710
|
-
t ? /* @__PURE__ */
|
|
4711
|
-
/* @__PURE__ */
|
|
4709
|
+
}) => /* @__PURE__ */ h.jsx(xe.Root, { open: t, onOpenChange: i, asChild: !0, children: /* @__PURE__ */ h.jsxs(be, { className: "px-6", children: [
|
|
4710
|
+
/* @__PURE__ */ h.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
4711
|
+
t ? /* @__PURE__ */ h.jsx(zo, { size: 14 }) : /* @__PURE__ */ h.jsx(Go, { size: 14 }),
|
|
4712
|
+
/* @__PURE__ */ h.jsx("span", { children: Js[r] })
|
|
4712
4713
|
] }),
|
|
4713
|
-
/* @__PURE__ */
|
|
4714
|
+
/* @__PURE__ */ h.jsx(xe.Content, { className: "pb-4", children: e.map((l, n) => (
|
|
4714
4715
|
// eslint-disable-next-line react/no-array-index-key
|
|
4715
|
-
/* @__PURE__ */
|
|
4716
|
-
|
|
4716
|
+
/* @__PURE__ */ h.jsx(
|
|
4717
|
+
Ws,
|
|
4717
4718
|
{
|
|
4718
4719
|
type: r,
|
|
4719
4720
|
schema: l,
|
|
@@ -4722,19 +4723,19 @@ const Rs = ({
|
|
|
4722
4723
|
n
|
|
4723
4724
|
)
|
|
4724
4725
|
)) })
|
|
4725
|
-
] }) }),
|
|
4726
|
+
] }) }), Ds = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), br = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Qs = {
|
|
4726
4727
|
allOf: "AND",
|
|
4727
4728
|
anyOf: "OR",
|
|
4728
4729
|
oneOf: "ONE"
|
|
4729
|
-
}, hr = (e) => e ===
|
|
4730
|
+
}, hr = (e) => e === $a, Po = ({
|
|
4730
4731
|
schema: e,
|
|
4731
4732
|
level: r
|
|
4732
4733
|
}) => {
|
|
4733
|
-
const [t, o] = ge(!0), i =
|
|
4734
|
-
for (const [l, n] of
|
|
4734
|
+
const [t, o] = ge(!0), i = sa(() => o((l) => !l), []);
|
|
4735
|
+
for (const [l, n] of xa(Qs))
|
|
4735
4736
|
if (e[l])
|
|
4736
|
-
return /* @__PURE__ */
|
|
4737
|
-
|
|
4737
|
+
return /* @__PURE__ */ h.jsx(
|
|
4738
|
+
Vs,
|
|
4738
4739
|
{
|
|
4739
4740
|
schemas: e[l],
|
|
4740
4741
|
type: n,
|
|
@@ -4743,10 +4744,10 @@ const Rs = ({
|
|
|
4743
4744
|
level: r
|
|
4744
4745
|
}
|
|
4745
4746
|
);
|
|
4746
|
-
}, eo = () => /* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
/* @__PURE__ */
|
|
4749
|
-
] }),
|
|
4747
|
+
}, eo = () => /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
|
|
4748
|
+
/* @__PURE__ */ h.jsx(Jo, { size: 16 }),
|
|
4749
|
+
/* @__PURE__ */ h.jsx("span", { children: "circular" })
|
|
4750
|
+
] }), Ks = ({
|
|
4750
4751
|
name: e,
|
|
4751
4752
|
schema: r,
|
|
4752
4753
|
group: t,
|
|
@@ -4755,48 +4756,48 @@ const Rs = ({
|
|
|
4755
4756
|
showCollapseButton: l = !0
|
|
4756
4757
|
}) => {
|
|
4757
4758
|
const [n, a] = ge(i);
|
|
4758
|
-
return hr(r) ? /* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
4761
|
-
t === "optional" && /* @__PURE__ */
|
|
4762
|
-
/* @__PURE__ */
|
|
4763
|
-
] }) }) }) : /* @__PURE__ */
|
|
4764
|
-
/* @__PURE__ */
|
|
4765
|
-
/* @__PURE__ */
|
|
4766
|
-
/* @__PURE__ */
|
|
4759
|
+
return hr(r) ? /* @__PURE__ */ h.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ h.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ h.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4760
|
+
/* @__PURE__ */ h.jsx("code", { children: e }),
|
|
4761
|
+
/* @__PURE__ */ h.jsx(we, { variant: "muted", children: "object" }),
|
|
4762
|
+
t === "optional" && /* @__PURE__ */ h.jsx(we, { variant: "outline", children: "optional" }),
|
|
4763
|
+
/* @__PURE__ */ h.jsx(eo, {})
|
|
4764
|
+
] }) }) }) : /* @__PURE__ */ h.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
|
|
4765
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4766
|
+
/* @__PURE__ */ h.jsx("code", { children: e }),
|
|
4767
|
+
/* @__PURE__ */ h.jsx(we, { variant: "muted", children: r.type === "array" && r.items.type ? /* @__PURE__ */ h.jsxs("span", { children: [
|
|
4767
4768
|
r.items.type,
|
|
4768
4769
|
"[]"
|
|
4769
|
-
] }) : Array.isArray(r.type) ? /* @__PURE__ */
|
|
4770
|
-
t === "optional" && /* @__PURE__ */
|
|
4771
|
-
r.type === "array" && "items" in r && hr(r.items) && /* @__PURE__ */
|
|
4770
|
+
] }) : Array.isArray(r.type) ? /* @__PURE__ */ h.jsx("span", { children: r.type.join(" | ") }) : /* @__PURE__ */ h.jsx("span", { children: r.type }) }),
|
|
4771
|
+
t === "optional" && /* @__PURE__ */ h.jsx(we, { variant: "outline", children: "optional" }),
|
|
4772
|
+
r.type === "array" && "items" in r && hr(r.items) && /* @__PURE__ */ h.jsx(eo, {})
|
|
4772
4773
|
] }),
|
|
4773
|
-
r.description && /* @__PURE__ */
|
|
4774
|
-
|
|
4774
|
+
r.description && /* @__PURE__ */ h.jsx(
|
|
4775
|
+
Ne,
|
|
4775
4776
|
{
|
|
4776
|
-
className:
|
|
4777
|
+
className: se(Le, "text-sm leading-normal line-clamp-4"),
|
|
4777
4778
|
content: r.description
|
|
4778
4779
|
}
|
|
4779
4780
|
),
|
|
4780
|
-
(
|
|
4781
|
+
(br(r) || Ds(r)) && /* @__PURE__ */ h.jsxs(
|
|
4781
4782
|
xe.Root,
|
|
4782
4783
|
{
|
|
4783
4784
|
defaultOpen: i,
|
|
4784
4785
|
open: n,
|
|
4785
4786
|
onOpenChange: () => a(!n),
|
|
4786
4787
|
children: [
|
|
4787
|
-
l && /* @__PURE__ */
|
|
4788
|
-
|
|
4788
|
+
l && /* @__PURE__ */ h.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ h.jsxs(
|
|
4789
|
+
lo,
|
|
4789
4790
|
{
|
|
4790
4791
|
variant: "outline",
|
|
4791
4792
|
size: "sm",
|
|
4792
4793
|
className: "mt-2 flex gap-1.5",
|
|
4793
4794
|
children: [
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ h.jsx(Wo, { size: 18 }),
|
|
4795
4796
|
n ? "Hide nested properties" : "Show nested properties"
|
|
4796
4797
|
]
|
|
4797
4798
|
}
|
|
4798
4799
|
) }),
|
|
4799
|
-
/* @__PURE__ */
|
|
4800
|
+
/* @__PURE__ */ h.jsx(xe.Content, { children: /* @__PURE__ */ h.jsx("div", { className: "mt-2", children: br(r) ? /* @__PURE__ */ h.jsx(Po, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ h.jsx(Ge, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !hr(r.items) && /* @__PURE__ */ h.jsx(Ge, { schema: r.items, level: o + 1 }) }) })
|
|
4800
4801
|
]
|
|
4801
4802
|
}
|
|
4802
4803
|
)
|
|
@@ -4807,40 +4808,40 @@ const Rs = ({
|
|
|
4807
4808
|
defaultOpen: t = !1
|
|
4808
4809
|
}) => {
|
|
4809
4810
|
if (!e || Object.keys(e).length === 0)
|
|
4810
|
-
return /* @__PURE__ */
|
|
4811
|
+
return /* @__PURE__ */ h.jsx(be, { className: "p-4", children: /* @__PURE__ */ h.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
4811
4812
|
const o = (i, l) => {
|
|
4812
|
-
if (
|
|
4813
|
-
return /* @__PURE__ */
|
|
4813
|
+
if (br(i))
|
|
4814
|
+
return /* @__PURE__ */ h.jsx(Po, { schema: i, level: l });
|
|
4814
4815
|
if (i.type === "array" && i.items) {
|
|
4815
4816
|
const n = i.items;
|
|
4816
|
-
return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */
|
|
4817
|
-
/* @__PURE__ */
|
|
4817
|
+
return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */ h.jsxs(be, { className: "p-4", children: [
|
|
4818
|
+
/* @__PURE__ */ h.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
4818
4819
|
n.type,
|
|
4819
4820
|
"[]"
|
|
4820
4821
|
] }),
|
|
4821
|
-
i.description && /* @__PURE__ */
|
|
4822
|
-
|
|
4822
|
+
i.description && /* @__PURE__ */ h.jsx(
|
|
4823
|
+
Ne,
|
|
4823
4824
|
{
|
|
4824
|
-
className:
|
|
4825
|
+
className: se(
|
|
4825
4826
|
Le,
|
|
4826
4827
|
"text-sm leading-normal line-clamp-4"
|
|
4827
4828
|
),
|
|
4828
4829
|
content: i.description
|
|
4829
4830
|
}
|
|
4830
4831
|
)
|
|
4831
|
-
] }) : n.type === "object" ? /* @__PURE__ */
|
|
4832
|
-
/* @__PURE__ */
|
|
4832
|
+
] }) : n.type === "object" ? /* @__PURE__ */ h.jsxs(be, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
|
|
4833
|
+
/* @__PURE__ */ h.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
|
|
4833
4834
|
o(n, l + 1)
|
|
4834
4835
|
] }) : o(n, l + 1);
|
|
4835
4836
|
}
|
|
4836
4837
|
if (i.type === "object" && (!i.properties || Object.keys(i.properties).length === 0))
|
|
4837
|
-
return /* @__PURE__ */
|
|
4838
|
-
"name" in i && /* @__PURE__ */
|
|
4839
|
-
/* @__PURE__ */
|
|
4840
|
-
i.description && /* @__PURE__ */
|
|
4841
|
-
|
|
4838
|
+
return /* @__PURE__ */ h.jsxs(be, { className: "p-4 flex gap-2 items-center", children: [
|
|
4839
|
+
"name" in i && /* @__PURE__ */ h.jsx(h.Fragment, { children: i.name }),
|
|
4840
|
+
/* @__PURE__ */ h.jsx("span", { className: "text-sm text-muted-foreground", children: "object" }),
|
|
4841
|
+
i.description && /* @__PURE__ */ h.jsx(
|
|
4842
|
+
Ne,
|
|
4842
4843
|
{
|
|
4843
|
-
className:
|
|
4844
|
+
className: se(
|
|
4844
4845
|
Le,
|
|
4845
4846
|
"text-sm leading-normal line-clamp-4"
|
|
4846
4847
|
),
|
|
@@ -4849,19 +4850,19 @@ const Rs = ({
|
|
|
4849
4850
|
)
|
|
4850
4851
|
] });
|
|
4851
4852
|
if (i.properties) {
|
|
4852
|
-
const n =
|
|
4853
|
+
const n = uo(
|
|
4853
4854
|
Object.entries(i.properties),
|
|
4854
4855
|
([s, c]) => {
|
|
4855
|
-
var
|
|
4856
|
-
return c.deprecated ? "deprecated" : (
|
|
4856
|
+
var y;
|
|
4857
|
+
return c.deprecated ? "deprecated" : (y = i.required) != null && y.includes(s) ? "required" : "optional";
|
|
4857
4858
|
}
|
|
4858
4859
|
), a = ["required", "optional", "deprecated"];
|
|
4859
|
-
return /* @__PURE__ */
|
|
4860
|
-
(s) => n[s] && /* @__PURE__ */
|
|
4861
|
-
|
|
4860
|
+
return /* @__PURE__ */ h.jsx(be, { className: "divide-y overflow-hidden", children: a.map(
|
|
4861
|
+
(s) => n[s] && /* @__PURE__ */ h.jsx("ul", { className: "divide-y", children: n[s].map(([c, y]) => /* @__PURE__ */ h.jsx(
|
|
4862
|
+
Ks,
|
|
4862
4863
|
{
|
|
4863
4864
|
name: c,
|
|
4864
|
-
schema:
|
|
4865
|
+
schema: y,
|
|
4865
4866
|
group: s,
|
|
4866
4867
|
level: l,
|
|
4867
4868
|
defaultOpen: t
|
|
@@ -4870,43 +4871,47 @@ const Rs = ({
|
|
|
4870
4871
|
)) }, s)
|
|
4871
4872
|
) });
|
|
4872
4873
|
}
|
|
4873
|
-
return typeof i.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(i.type) ? /* @__PURE__ */
|
|
4874
|
-
/* @__PURE__ */
|
|
4875
|
-
i.description && /* @__PURE__ */
|
|
4876
|
-
|
|
4874
|
+
return typeof i.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(i.type) ? /* @__PURE__ */ h.jsxs(be, { className: "p-4", children: [
|
|
4875
|
+
/* @__PURE__ */ h.jsx("span", { className: "text-sm text-muted-foreground", children: i.type }),
|
|
4876
|
+
i.description && /* @__PURE__ */ h.jsx(
|
|
4877
|
+
Ne,
|
|
4877
4878
|
{
|
|
4878
|
-
className:
|
|
4879
|
+
className: se(
|
|
4879
4880
|
Le,
|
|
4880
4881
|
"text-sm leading-normal line-clamp-4"
|
|
4881
4882
|
),
|
|
4882
4883
|
content: i.description
|
|
4883
4884
|
}
|
|
4884
4885
|
)
|
|
4885
|
-
] }) : i.additionalProperties ? /* @__PURE__ */
|
|
4886
|
-
/* @__PURE__ */
|
|
4887
|
-
/* @__PURE__ */
|
|
4886
|
+
] }) : i.additionalProperties ? /* @__PURE__ */ h.jsxs(be, { className: "my-2", children: [
|
|
4887
|
+
/* @__PURE__ */ h.jsx(ha, { children: /* @__PURE__ */ h.jsx(ya, { children: "Additional Properties:" }) }),
|
|
4888
|
+
/* @__PURE__ */ h.jsx(ma, { children: o(
|
|
4888
4889
|
i.additionalProperties,
|
|
4889
4890
|
l + 1
|
|
4890
4891
|
) })
|
|
4891
4892
|
] }) : null;
|
|
4892
4893
|
};
|
|
4893
4894
|
return o(e, r);
|
|
4894
|
-
},
|
|
4895
|
+
}, Ys = ["path", "query", "header", "cookie"], Xs = ({
|
|
4895
4896
|
operationFragment: e,
|
|
4896
4897
|
serverUrl: r
|
|
4897
4898
|
}) => {
|
|
4898
|
-
var s, c,
|
|
4899
|
-
const t =
|
|
4899
|
+
var s, c, y;
|
|
4900
|
+
const t = ja(el, e), o = uo(
|
|
4900
4901
|
t.parameters ?? [],
|
|
4901
4902
|
(f) => f.in
|
|
4902
|
-
), i =
|
|
4903
|
-
return /* @__PURE__ */
|
|
4904
|
-
"
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4903
|
+
), i = jr(null), l = t.responses.at(0), [n, a] = ge(l == null ? void 0 : l.statusCode);
|
|
4904
|
+
return /* @__PURE__ */ h.jsxs("div", { className: "border-b-2 mb-16 pb-16", children: [
|
|
4905
|
+
t.deprecated && /* @__PURE__ */ h.jsx(we, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
4906
|
+
/* @__PURE__ */ h.jsxs(
|
|
4907
|
+
"div",
|
|
4908
|
+
{
|
|
4909
|
+
className: se(
|
|
4910
|
+
"grid grid-cols-1 lg:grid-cols-[minmax(0,4fr)_minmax(0,3fr)] gap-x-8 gap-y-4 items-start",
|
|
4911
|
+
t.deprecated && "opacity-50 transition hover:opacity-100"
|
|
4912
|
+
),
|
|
4913
|
+
children: [
|
|
4914
|
+
/* @__PURE__ */ h.jsx(
|
|
4910
4915
|
Be,
|
|
4911
4916
|
{
|
|
4912
4917
|
level: 2,
|
|
@@ -4916,9 +4921,9 @@ const Rs = ({
|
|
|
4916
4921
|
children: t.summary
|
|
4917
4922
|
}
|
|
4918
4923
|
),
|
|
4919
|
-
/* @__PURE__ */
|
|
4920
|
-
/* @__PURE__ */
|
|
4921
|
-
/* @__PURE__ */
|
|
4924
|
+
/* @__PURE__ */ h.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
4925
|
+
/* @__PURE__ */ h.jsx("span", { className: ao(t.method), children: t.method.toUpperCase() }),
|
|
4926
|
+
/* @__PURE__ */ h.jsxs(
|
|
4922
4927
|
"div",
|
|
4923
4928
|
{
|
|
4924
4929
|
ref: i,
|
|
@@ -4927,126 +4932,128 @@ const Rs = ({
|
|
|
4927
4932
|
if (i.current) {
|
|
4928
4933
|
const f = document.createRange();
|
|
4929
4934
|
f.selectNodeContents(i.current);
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4935
|
+
const m = window.getSelection();
|
|
4936
|
+
m == null || m.removeAllRanges(), m == null || m.addRange(f);
|
|
4932
4937
|
}
|
|
4933
4938
|
},
|
|
4934
4939
|
children: [
|
|
4935
|
-
r && /* @__PURE__ */
|
|
4936
|
-
/* @__PURE__ */
|
|
4940
|
+
r && /* @__PURE__ */ h.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: r }),
|
|
4941
|
+
/* @__PURE__ */ h.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
|
|
4937
4942
|
]
|
|
4938
4943
|
}
|
|
4939
4944
|
)
|
|
4940
4945
|
] }),
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
className: `${Le} max-w-full prose-img:max-w-prose`,
|
|
4945
|
-
content: t.description
|
|
4946
|
-
}
|
|
4947
|
-
),
|
|
4948
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ m.jsx(m.Fragment, { children: Ks.flatMap(
|
|
4949
|
-
(f) => {
|
|
4950
|
-
var y;
|
|
4951
|
-
return (y = o[f]) != null && y.length ? /* @__PURE__ */ m.jsx(
|
|
4952
|
-
Ca,
|
|
4953
|
-
{
|
|
4954
|
-
summary: t.summary ?? void 0,
|
|
4955
|
-
id: t.slug,
|
|
4956
|
-
parameters: o[f],
|
|
4957
|
-
group: f
|
|
4958
|
-
},
|
|
4959
|
-
f
|
|
4960
|
-
) : [];
|
|
4961
|
-
}
|
|
4962
|
-
) }),
|
|
4963
|
-
Sa((h = (c = (s = t.requestBody) == null ? void 0 : s.content) == null ? void 0 : c.at(0)) == null ? void 0 : h.schema, (f) => /* @__PURE__ */ m.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4964
|
-
/* @__PURE__ */ m.jsxs(
|
|
4965
|
-
Be,
|
|
4946
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
4947
|
+
t.description && /* @__PURE__ */ h.jsx(
|
|
4948
|
+
Ne,
|
|
4966
4949
|
{
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
id: `${t.slug}/request-body`,
|
|
4970
|
-
children: [
|
|
4971
|
-
t.summary && /* @__PURE__ */ m.jsxs(yr, { children: [
|
|
4972
|
-
t.summary,
|
|
4973
|
-
" › "
|
|
4974
|
-
] }),
|
|
4975
|
-
"Request Body"
|
|
4976
|
-
]
|
|
4950
|
+
className: `${Le} max-w-full prose-img:max-w-prose`,
|
|
4951
|
+
content: t.description
|
|
4977
4952
|
}
|
|
4978
4953
|
),
|
|
4979
|
-
/* @__PURE__ */
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
] }),
|
|
4993
|
-
"Responses"
|
|
4994
|
-
]
|
|
4954
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ h.jsx(h.Fragment, { children: Ys.flatMap(
|
|
4955
|
+
(f) => {
|
|
4956
|
+
var m;
|
|
4957
|
+
return (m = o[f]) != null && m.length ? /* @__PURE__ */ h.jsx(
|
|
4958
|
+
Na,
|
|
4959
|
+
{
|
|
4960
|
+
summary: t.summary ?? void 0,
|
|
4961
|
+
id: t.slug,
|
|
4962
|
+
parameters: o[f],
|
|
4963
|
+
group: f
|
|
4964
|
+
},
|
|
4965
|
+
f
|
|
4966
|
+
) : [];
|
|
4995
4967
|
}
|
|
4996
|
-
),
|
|
4997
|
-
/* @__PURE__ */
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
{
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
4968
|
+
) }),
|
|
4969
|
+
Ta((y = (c = (s = t.requestBody) == null ? void 0 : s.content) == null ? void 0 : c.at(0)) == null ? void 0 : y.schema, (f) => /* @__PURE__ */ h.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4970
|
+
/* @__PURE__ */ h.jsxs(
|
|
4971
|
+
Be,
|
|
4972
|
+
{
|
|
4973
|
+
level: 3,
|
|
4974
|
+
className: "capitalize",
|
|
4975
|
+
id: `${t.slug}/request-body`,
|
|
4976
|
+
children: [
|
|
4977
|
+
t.summary && /* @__PURE__ */ h.jsxs(mr, { children: [
|
|
4978
|
+
t.summary,
|
|
4979
|
+
" › "
|
|
4980
|
+
] }),
|
|
4981
|
+
"Request Body"
|
|
4982
|
+
]
|
|
4983
|
+
}
|
|
4984
|
+
),
|
|
4985
|
+
/* @__PURE__ */ h.jsx(Ge, { schema: f })
|
|
4986
|
+
] })),
|
|
4987
|
+
t.responses.length > 0 && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
4988
|
+
/* @__PURE__ */ h.jsxs(
|
|
4989
|
+
Be,
|
|
4990
|
+
{
|
|
4991
|
+
level: 3,
|
|
4992
|
+
className: "capitalize mt-8 pt-8 border-t",
|
|
4993
|
+
id: `${t.slug}/responses`,
|
|
4994
|
+
children: [
|
|
4995
|
+
t.summary && /* @__PURE__ */ h.jsxs(mr, { children: [
|
|
4996
|
+
t.summary,
|
|
4997
|
+
" › "
|
|
4998
|
+
] }),
|
|
4999
|
+
"Responses"
|
|
5000
|
+
]
|
|
5001
|
+
}
|
|
5002
|
+
),
|
|
5003
|
+
/* @__PURE__ */ h.jsxs(
|
|
5004
|
+
ua,
|
|
5005
|
+
{
|
|
5006
|
+
onValueChange: (f) => a(f),
|
|
5007
|
+
value: n,
|
|
5008
|
+
children: [
|
|
5009
|
+
t.responses.length > 1 && /* @__PURE__ */ h.jsx(fa, { children: t.responses.map((f) => /* @__PURE__ */ h.jsx(
|
|
5010
|
+
pa,
|
|
5016
5011
|
{
|
|
5017
5012
|
value: f.statusCode,
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
{
|
|
5021
|
-
schema: (g = (y = f.content) == null ? void 0 : y.find(($) => $.schema)) == null ? void 0 : g.schema
|
|
5022
|
-
}
|
|
5023
|
-
)
|
|
5013
|
+
title: f.description ?? void 0,
|
|
5014
|
+
children: f.statusCode
|
|
5024
5015
|
},
|
|
5025
5016
|
f.statusCode
|
|
5026
|
-
)
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5017
|
+
)) }),
|
|
5018
|
+
/* @__PURE__ */ h.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
|
|
5019
|
+
var m, g;
|
|
5020
|
+
return /* @__PURE__ */ h.jsx(
|
|
5021
|
+
da,
|
|
5022
|
+
{
|
|
5023
|
+
value: f.statusCode,
|
|
5024
|
+
children: /* @__PURE__ */ h.jsx(
|
|
5025
|
+
Ge,
|
|
5026
|
+
{
|
|
5027
|
+
schema: (g = (m = f.content) == null ? void 0 : m.find(($) => $.schema)) == null ? void 0 : g.schema
|
|
5028
|
+
}
|
|
5029
|
+
)
|
|
5030
|
+
},
|
|
5031
|
+
f.statusCode
|
|
5032
|
+
);
|
|
5033
|
+
}) })
|
|
5034
|
+
]
|
|
5035
|
+
}
|
|
5036
|
+
)
|
|
5037
|
+
] })
|
|
5038
|
+
] }),
|
|
5039
|
+
/* @__PURE__ */ h.jsx(
|
|
5040
|
+
Hs,
|
|
5041
|
+
{
|
|
5042
|
+
selectedResponse: n,
|
|
5043
|
+
onSelectResponse: a,
|
|
5044
|
+
operation: t
|
|
5045
|
+
}
|
|
5046
|
+
)
|
|
5047
|
+
]
|
|
5048
|
+
},
|
|
5049
|
+
t.operationId
|
|
5050
|
+
)
|
|
5051
|
+
] });
|
|
5045
5052
|
};
|
|
5046
|
-
function
|
|
5053
|
+
function Zs(e, r = 160) {
|
|
5047
5054
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
5048
5055
|
}
|
|
5049
|
-
const
|
|
5056
|
+
const el = rt(
|
|
5050
5057
|
/* GraphQL */
|
|
5051
5058
|
`
|
|
5052
5059
|
fragment OperationsFragment on OperationItem {
|
|
@@ -5057,6 +5064,7 @@ const Zs = rt(
|
|
|
5057
5064
|
operationId
|
|
5058
5065
|
contentTypes
|
|
5059
5066
|
path
|
|
5067
|
+
deprecated
|
|
5060
5068
|
parameters {
|
|
5061
5069
|
name
|
|
5062
5070
|
in
|
|
@@ -5111,7 +5119,7 @@ const Zs = rt(
|
|
|
5111
5119
|
}
|
|
5112
5120
|
}
|
|
5113
5121
|
`
|
|
5114
|
-
),
|
|
5122
|
+
), tl = rt(
|
|
5115
5123
|
/* GraphQL */
|
|
5116
5124
|
`
|
|
5117
5125
|
query AllOperations(
|
|
@@ -5140,69 +5148,106 @@ const Zs = rt(
|
|
|
5140
5148
|
}
|
|
5141
5149
|
}
|
|
5142
5150
|
`
|
|
5143
|
-
),
|
|
5151
|
+
), Ol = ({
|
|
5144
5152
|
tag: e,
|
|
5145
5153
|
untagged: r
|
|
5146
5154
|
}) => {
|
|
5147
|
-
const { input: t, type: o, versions: i, version: l } =
|
|
5155
|
+
const { input: t, type: o, versions: i, version: l } = Sr(), n = Or(tl, {
|
|
5148
5156
|
input: t,
|
|
5149
5157
|
type: o,
|
|
5150
5158
|
tag: e,
|
|
5151
5159
|
untagged: r
|
|
5152
|
-
}), a =
|
|
5160
|
+
}), a = xr(n), {
|
|
5153
5161
|
data: { schema: s }
|
|
5154
|
-
} = a, { selectedServer: c } =
|
|
5155
|
-
|
|
5156
|
-
const b = f || (
|
|
5157
|
-
return /* @__PURE__ */
|
|
5162
|
+
} = a, { selectedServer: c } = $r(s.servers), y = s.title, f = s.summary, m = s.description, g = Qo(), $ = s.operations;
|
|
5163
|
+
Eo();
|
|
5164
|
+
const b = f || (m ? Zs(m) : void 0), u = Object.entries(i).length > 1;
|
|
5165
|
+
return /* @__PURE__ */ h.jsxs(
|
|
5158
5166
|
"div",
|
|
5159
5167
|
{
|
|
5160
5168
|
className: "pt-[--padding-content-top]",
|
|
5161
5169
|
"data-pagefind-filter": "section:openapi",
|
|
5162
5170
|
"data-pagefind-meta": "section:openapi",
|
|
5163
5171
|
children: [
|
|
5164
|
-
/* @__PURE__ */
|
|
5165
|
-
/* @__PURE__ */
|
|
5166
|
-
b && /* @__PURE__ */
|
|
5172
|
+
/* @__PURE__ */ h.jsxs(Ao, { children: [
|
|
5173
|
+
/* @__PURE__ */ h.jsx("title", { children: y }),
|
|
5174
|
+
b && /* @__PURE__ */ h.jsx("meta", { name: "description", content: b })
|
|
5167
5175
|
] }),
|
|
5168
|
-
/* @__PURE__ */
|
|
5169
|
-
"div",
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5176
|
+
/* @__PURE__ */ h.jsx("div", { className: "mb-8", children: /* @__PURE__ */ h.jsxs(no, { className: "w-full", children: [
|
|
5177
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
5178
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex-1", children: [
|
|
5179
|
+
/* @__PURE__ */ h.jsx(na, { children: y }),
|
|
5180
|
+
/* @__PURE__ */ h.jsxs(
|
|
5181
|
+
Be,
|
|
5182
|
+
{
|
|
5183
|
+
level: 1,
|
|
5184
|
+
id: "description",
|
|
5185
|
+
registerSidebarAnchor: !0,
|
|
5186
|
+
className: "mb-0",
|
|
5187
|
+
children: [
|
|
5188
|
+
e,
|
|
5189
|
+
u && /* @__PURE__ */ h.jsxs("span", { className: "text-xl text-muted-foreground ml-1.5", children: [
|
|
5179
5190
|
" ",
|
|
5180
5191
|
"(",
|
|
5181
5192
|
l,
|
|
5182
5193
|
")"
|
|
5183
5194
|
] })
|
|
5184
|
-
]
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5195
|
+
]
|
|
5196
|
+
}
|
|
5197
|
+
)
|
|
5198
|
+
] }),
|
|
5199
|
+
/* @__PURE__ */ h.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
5200
|
+
u && /* @__PURE__ */ h.jsxs(
|
|
5201
|
+
Xo,
|
|
5202
|
+
{
|
|
5203
|
+
onValueChange: (d) => g(i[d]),
|
|
5204
|
+
defaultValue: l,
|
|
5205
|
+
children: [
|
|
5206
|
+
/* @__PURE__ */ h.jsx(Zo, { className: "w-[180px]", children: /* @__PURE__ */ h.jsx(ea, { placeholder: "Select version" }) }),
|
|
5207
|
+
/* @__PURE__ */ h.jsx(ta, { children: Object.entries(i).map(([d]) => /* @__PURE__ */ h.jsx(ra, { value: d, children: d }, d)) })
|
|
5208
|
+
]
|
|
5209
|
+
}
|
|
5210
|
+
),
|
|
5211
|
+
s.description && /* @__PURE__ */ h.jsxs(yr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
|
|
5212
|
+
/* @__PURE__ */ h.jsx("span", { children: "Schema description" }),
|
|
5213
|
+
/* @__PURE__ */ h.jsx(
|
|
5214
|
+
to,
|
|
5188
5215
|
{
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
children: [
|
|
5192
|
-
/* @__PURE__ */ m.jsx(Io, { className: "w-[180px]", children: /* @__PURE__ */ m.jsx(Lo, { placeholder: "Select version" }) }),
|
|
5193
|
-
/* @__PURE__ */ m.jsx(Uo, { children: Object.entries(i).map(([d]) => /* @__PURE__ */ m.jsx(Fo, { value: d, children: d }, d)) })
|
|
5194
|
-
]
|
|
5216
|
+
className: "group-data-[state=open]:hidden translate-y-px",
|
|
5217
|
+
size: 14
|
|
5195
5218
|
}
|
|
5196
|
-
)
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5219
|
+
),
|
|
5220
|
+
/* @__PURE__ */ h.jsx(
|
|
5221
|
+
Vo,
|
|
5222
|
+
{
|
|
5223
|
+
className: "group-data-[state=closed]:hidden translate-y-px",
|
|
5224
|
+
size: 13
|
|
5225
|
+
}
|
|
5226
|
+
)
|
|
5227
|
+
] })
|
|
5228
|
+
] })
|
|
5229
|
+
] }),
|
|
5230
|
+
s.description && /* @__PURE__ */ h.jsx(oo, { className: "CollapsibleContent", children: /* @__PURE__ */ h.jsx(
|
|
5231
|
+
"div",
|
|
5232
|
+
{
|
|
5233
|
+
className: se(
|
|
5234
|
+
Le,
|
|
5235
|
+
"pt-4 max-w-full prose-img:max-w-prose"
|
|
5236
|
+
),
|
|
5237
|
+
children: /* @__PURE__ */ h.jsx(
|
|
5238
|
+
Ne,
|
|
5239
|
+
{
|
|
5240
|
+
className: "border rounded bg-muted/25 border-border px-2.5 md:px-4",
|
|
5241
|
+
content: s.description
|
|
5242
|
+
}
|
|
5243
|
+
)
|
|
5244
|
+
}
|
|
5245
|
+
) })
|
|
5246
|
+
] }) }),
|
|
5247
|
+
/* @__PURE__ */ h.jsx("hr", {}),
|
|
5248
|
+
/* @__PURE__ */ h.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ h.jsx(Sa, {}) }),
|
|
5249
|
+
$.map((d) => /* @__PURE__ */ h.jsx(
|
|
5250
|
+
Xs,
|
|
5206
5251
|
{
|
|
5207
5252
|
serverUrl: c,
|
|
5208
5253
|
operationFragment: d
|
|
@@ -5214,7 +5259,7 @@ const Zs = rt(
|
|
|
5214
5259
|
);
|
|
5215
5260
|
};
|
|
5216
5261
|
export {
|
|
5217
|
-
|
|
5218
|
-
|
|
5262
|
+
Ol as OperationList,
|
|
5263
|
+
el as OperationsFragment
|
|
5219
5264
|
};
|
|
5220
|
-
//# sourceMappingURL=OperationList-
|
|
5265
|
+
//# sourceMappingURL=OperationList-DndcCJUG.js.map
|