zudoku 0.28.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +1 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +25 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +4 -4
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +4 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +16 -14
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +17 -6
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +5 -10
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +7 -15
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/vite/plugin-api.js +4 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/prerender.js +0 -1
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{MdxPage-DewragjB.js → MdxPage-BuG8Tuwc.js} +2 -2
- package/lib/{MdxPage-DewragjB.js.map → MdxPage-BuG8Tuwc.js.map} +1 -1
- package/lib/{OperationList-D_ejrepA.js → OperationList-CDt1xdc4.js} +978 -970
- package/lib/OperationList-CDt1xdc4.js.map +1 -0
- package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
- package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
- package/lib/{createServer-BydbkTsd.js → createServer-CjNktZzL.js} +2 -2
- package/lib/{createServer-BydbkTsd.js.map → createServer-CjNktZzL.js.map} +1 -1
- package/lib/{index-DGugJOLc.js → index-Eb1oiHbM.js} +583 -560
- package/lib/index-Eb1oiHbM.js.map +1 -0
- package/lib/{useScrollToAnchor-eRM9tVvD.js → useScrollToAnchor-BZsGmBng.js} +84 -89
- package/lib/useScrollToAnchor-BZsGmBng.js.map +1 -0
- package/lib/zudoku.components.js +334 -317
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.tsx +1 -2
- package/src/lib/components/PathRenderer.tsx +59 -0
- package/src/lib/components/ThemeSwitch.tsx +15 -14
- package/src/lib/components/index.ts +7 -5
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -41
- package/src/lib/oas/graphql/circular.ts +27 -6
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +17 -26
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +23 -33
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/lib/OperationList-D_ejrepA.js.map +0 -1
- package/lib/index-DGugJOLc.js.map +0 -1
- package/lib/useScrollToAnchor-eRM9tVvD.js.map +0 -1
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { u as
|
|
3
|
-
import { H as
|
|
4
|
-
import { b as
|
|
5
|
-
import { S as
|
|
6
|
-
import { a as
|
|
7
|
-
import { C as
|
|
8
|
-
import { I as
|
|
1
|
+
import { j as m } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
2
|
+
import { u as vr, l as Ro } from "./ZudokuContext-BTUJPpQl.js";
|
|
3
|
+
import { H as qo } from "./index.esm-9-TF9KQB.js";
|
|
4
|
+
import { b as No, a as ko } from "./chunk-SYFQ2XB5-BPvC-soB.js";
|
|
5
|
+
import { S as Eo, a as Ao, b as Io, c as Lo, e as Uo } from "./Select-CnCZ4WhS.js";
|
|
6
|
+
import { a as br } from "./state-mM7uaXTW.js";
|
|
7
|
+
import { C as Fo } from "./CategoryHeading-MYL1u_6K.js";
|
|
8
|
+
import { I as _o, M as Re, H as Be, P as Le } from "./Markdown-Cyrx_JrO.js";
|
|
9
9
|
import { c as le } from "./cn-qaFjX9_3.js";
|
|
10
|
-
import { ChevronsUpDownIcon as
|
|
11
|
-
import { useContext as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { a as
|
|
14
|
-
import { g as rt, C as
|
|
15
|
-
import { Tabs as
|
|
16
|
-
import { Card as be, CardHeader as
|
|
17
|
-
import { c as
|
|
18
|
-
import { g as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { S as
|
|
21
|
-
import { B as
|
|
10
|
+
import { ChevronsUpDownIcon as Bo, CheckIcon as Ho, CopyIcon as Mo, UnfoldVerticalIcon as zo, FoldVerticalIcon as Go, ChevronDownIcon as Wo, CircleFadingPlusIcon as Jo, CircleDotIcon as Vo, CircleIcon as Do, SquareMinusIcon as Qo, SquarePlusIcon as Ko, ListPlusIcon as Yo, RefreshCcwDotIcon as Xo } from "lucide-react";
|
|
11
|
+
import { useContext as Zo, useTransition as eo, useState as ge, useRef as xr, useEffect as $r, useLayoutEffect as ea, useMemo as to, useCallback as ta } from "react";
|
|
12
|
+
import { Button as ro } from "./ui/Button.js";
|
|
13
|
+
import { a as ra, u as jr } from "./context-rwLGh-6_.js";
|
|
14
|
+
import { g as rt, C as no, a as na, b as oa, c as _r, P as aa, m as oo, d as ia } from "./index-Eb1oiHbM.js";
|
|
15
|
+
import { Tabs as sa, TabsList as la, TabsTrigger as ca, TabsContent as ua } from "./ui/Tabs.js";
|
|
16
|
+
import { Card as be, CardHeader as fa, CardTitle as pa, CardContent as da } from "./ui/Card.js";
|
|
17
|
+
import { c as ha } from "./index-Djenk2Hj.js";
|
|
18
|
+
import { g as ya, c as Ze, a as ma } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
19
|
+
import { _ as ga } from "./__vite-browser-external-BYRIRx8p.js";
|
|
20
|
+
import { S as ao } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
21
|
+
import { B as Br } from "./Spinner-BlzrEEk1.js";
|
|
22
22
|
import * as Ye from "@radix-ui/react-tabs";
|
|
23
23
|
import * as xe from "@radix-ui/react-collapsible";
|
|
24
|
-
import { C as
|
|
25
|
-
function
|
|
24
|
+
import { C as va } from "./circular-DxaIIlWD.js";
|
|
25
|
+
function ba(e, r) {
|
|
26
26
|
return r;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
const t =
|
|
28
|
+
const wr = (e, ...r) => {
|
|
29
|
+
const t = Zo(ra);
|
|
30
30
|
if (t === void 0)
|
|
31
31
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
32
32
|
return {
|
|
@@ -39,8 +39,8 @@ const jr = (e, ...r) => {
|
|
|
39
39
|
className: t,
|
|
40
40
|
options: o,
|
|
41
41
|
showChevrons: s = !0
|
|
42
|
-
}) => /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
42
|
+
}) => /* @__PURE__ */ m.jsxs("div", { className: "grid", children: [
|
|
43
|
+
/* @__PURE__ */ m.jsx(
|
|
44
44
|
"select",
|
|
45
45
|
{
|
|
46
46
|
className: le(
|
|
@@ -50,20 +50,20 @@ const jr = (e, ...r) => {
|
|
|
50
50
|
),
|
|
51
51
|
value: e,
|
|
52
52
|
onChange: r,
|
|
53
|
-
children: o.map((l) => /* @__PURE__ */
|
|
53
|
+
children: o.map((l) => /* @__PURE__ */ m.jsx("option", { value: l.value, children: l.label }, l.value))
|
|
54
54
|
}
|
|
55
55
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ m.jsx(
|
|
57
57
|
"div",
|
|
58
58
|
{
|
|
59
59
|
className: le(
|
|
60
60
|
!s && "hidden",
|
|
61
61
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
62
62
|
),
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ m.jsx(Bo, { size: 14 })
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
|
-
] }),
|
|
66
|
+
] }), xa = rt(
|
|
67
67
|
/* GraphQL */
|
|
68
68
|
`
|
|
69
69
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -75,10 +75,10 @@ const jr = (e, ...r) => {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
`
|
|
78
|
-
),
|
|
78
|
+
), Hr = ({ url: e }) => {
|
|
79
79
|
const [r, t] = ge(!1);
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
80
|
+
return /* @__PURE__ */ m.jsx(
|
|
81
|
+
ro,
|
|
82
82
|
{
|
|
83
83
|
onClick: () => {
|
|
84
84
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -87,18 +87,18 @@ const jr = (e, ...r) => {
|
|
|
87
87
|
},
|
|
88
88
|
variant: "ghost",
|
|
89
89
|
size: "icon",
|
|
90
|
-
children: r ? /* @__PURE__ */
|
|
90
|
+
children: r ? /* @__PURE__ */ m.jsx(Ho, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ m.jsx(Mo, { size: 14, strokeWidth: 1.3 })
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
|
-
},
|
|
94
|
-
const { input: e, type: r } =
|
|
95
|
-
return a.length === 0 ? null : a.length === 1 ? /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
] }) : /* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
93
|
+
}, $a = () => {
|
|
94
|
+
const { input: e, type: r } = jr(), t = wr(xa, { input: e, type: r }), o = vr(t), [, s] = eo(), { selectedServer: l, setSelectedServer: n } = br(), { servers: a } = o.data.schema;
|
|
95
|
+
return a.length === 0 ? null : a.length === 1 ? /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
96
|
+
/* @__PURE__ */ m.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
97
|
+
/* @__PURE__ */ m.jsx(_o, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: a[0].url }),
|
|
98
|
+
/* @__PURE__ */ m.jsx(Hr, { url: a[0].url })
|
|
99
|
+
] }) : /* @__PURE__ */ m.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
100
|
+
/* @__PURE__ */ m.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
101
|
+
/* @__PURE__ */ m.jsx(
|
|
102
102
|
et,
|
|
103
103
|
{
|
|
104
104
|
className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
|
|
@@ -113,15 +113,15 @@ const jr = (e, ...r) => {
|
|
|
113
113
|
}))
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ m.jsx(Hr, { url: l ?? a.at(0).url })
|
|
117
117
|
] });
|
|
118
|
-
},
|
|
118
|
+
}, io = (e, r) => e.reduce(
|
|
119
119
|
(t, o) => {
|
|
120
120
|
const s = r(o);
|
|
121
121
|
return t[s] || (t[s] = []), t[s].push(o), t;
|
|
122
122
|
},
|
|
123
123
|
{}
|
|
124
|
-
),
|
|
124
|
+
), ja = (e, r) => e ? r(e) : void 0, wa = ha(
|
|
125
125
|
"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",
|
|
126
126
|
{
|
|
127
127
|
variants: {
|
|
@@ -138,48 +138,48 @@ const jr = (e, ...r) => {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
);
|
|
141
|
-
function
|
|
142
|
-
return /* @__PURE__ */
|
|
141
|
+
function Ce({ className: e, variant: r, ...t }) {
|
|
142
|
+
return /* @__PURE__ */ m.jsx("div", { className: le(wa({ variant: r }), e), ...t });
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const Sa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
145
145
|
type: "string"
|
|
146
|
-
},
|
|
146
|
+
}, Oa = ({
|
|
147
147
|
parameter: e,
|
|
148
148
|
group: r,
|
|
149
149
|
id: t
|
|
150
150
|
}) => {
|
|
151
|
-
const o =
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
|
|
151
|
+
const o = Sa(e);
|
|
152
|
+
return /* @__PURE__ */ m.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
153
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
154
|
+
/* @__PURE__ */ m.jsx("code", { children: r === "path" ? /* @__PURE__ */ m.jsx(
|
|
155
|
+
no,
|
|
156
156
|
{
|
|
157
157
|
name: e.name,
|
|
158
158
|
backgroundOpacity: "15%",
|
|
159
159
|
className: "px-1",
|
|
160
|
-
slug: t
|
|
160
|
+
slug: `${t}-${e.name}`
|
|
161
161
|
}
|
|
162
162
|
) : e.name }),
|
|
163
|
-
o.type && /* @__PURE__ */
|
|
164
|
-
e.required && /* @__PURE__ */
|
|
165
|
-
e.style === "form" && /* @__PURE__ */
|
|
163
|
+
o.type && /* @__PURE__ */ m.jsx(Ce, { variant: "muted", children: o.type === "array" ? `${o.items.type}[]` : o.type }),
|
|
164
|
+
e.required && /* @__PURE__ */ m.jsx(Ce, { variant: "outline", children: "required" }),
|
|
165
|
+
e.style === "form" && /* @__PURE__ */ m.jsx(Ce, { variant: "secondary", children: "form" })
|
|
166
166
|
] }),
|
|
167
|
-
e.description && /* @__PURE__ */
|
|
168
|
-
|
|
167
|
+
e.description && /* @__PURE__ */ m.jsx(
|
|
168
|
+
Re,
|
|
169
169
|
{
|
|
170
170
|
content: e.description,
|
|
171
171
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
172
172
|
}
|
|
173
173
|
)
|
|
174
174
|
] });
|
|
175
|
-
},
|
|
175
|
+
}, Ta = ({
|
|
176
176
|
group: e,
|
|
177
177
|
parameters: r,
|
|
178
178
|
id: t
|
|
179
|
-
}) => /* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
179
|
+
}) => /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
180
|
+
/* @__PURE__ */ m.jsx(Be, { level: 3, id: `${t}/${e}-parameters`, className: "capitalize", children: e === "header" ? "Headers" : `${e} Parameters` }),
|
|
181
|
+
/* @__PURE__ */ m.jsx(be, { children: /* @__PURE__ */ m.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: r.sort((o, s) => o.required === s.required ? 0 : o.required ? -1 : 1).map((o) => /* @__PURE__ */ m.jsx(
|
|
182
|
+
Oa,
|
|
183
183
|
{
|
|
184
184
|
parameter: o,
|
|
185
185
|
id: t,
|
|
@@ -188,17 +188,17 @@ const ja = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
188
188
|
`${o.name}-${o.in}`
|
|
189
189
|
)) }) })
|
|
190
190
|
] });
|
|
191
|
-
var
|
|
191
|
+
var Mr = (e, r) => {
|
|
192
192
|
const t = e[r.name];
|
|
193
193
|
return t === void 0 ? (e[r.name] = r.value, e) : Array.isArray(t) ? (t.push(r.value), e) : (e[r.name] = [t, r.value], e);
|
|
194
|
-
},
|
|
194
|
+
}, zr = "", Gr = `
|
|
195
195
|
`, V = class {
|
|
196
196
|
/**
|
|
197
197
|
* Helper object to format and aggragate lines of code.
|
|
198
198
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
199
199
|
*/
|
|
200
200
|
constructor({ indent: e, join: r } = {}) {
|
|
201
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
201
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = zr, this.lineJoin = Gr, this.indentLine = (t, o = 0) => `${this.indentationCharacter.repeat(o)}${t}`, this.unshift = (t, o) => {
|
|
202
202
|
const s = this.indentLine(t, o);
|
|
203
203
|
this.code.unshift(s);
|
|
204
204
|
}, this.push = (t, o) => {
|
|
@@ -211,30 +211,30 @@ var Hr = (e, r) => {
|
|
|
211
211
|
return this.postProcessors.reduce((s, l) => l(s), t);
|
|
212
212
|
}, this.addPostProcessor = (t) => {
|
|
213
213
|
this.postProcessors = [...this.postProcessors, t];
|
|
214
|
-
}, this.indentationCharacter = e ||
|
|
214
|
+
}, this.indentationCharacter = e || zr, this.lineJoin = r ?? Gr;
|
|
215
215
|
}
|
|
216
|
-
}, yt,
|
|
217
|
-
function
|
|
218
|
-
return
|
|
216
|
+
}, yt, Wr;
|
|
217
|
+
function Pa() {
|
|
218
|
+
return Wr || (Wr = 1, yt = function(e) {
|
|
219
219
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
220
220
|
}), yt;
|
|
221
221
|
}
|
|
222
|
-
var mt,
|
|
223
|
-
function
|
|
224
|
-
return
|
|
222
|
+
var mt, Jr;
|
|
223
|
+
function Ca() {
|
|
224
|
+
return Jr || (Jr = 1, mt = function(e) {
|
|
225
225
|
var r = typeof e;
|
|
226
226
|
return e !== null && (r === "object" || r === "function");
|
|
227
227
|
}), mt;
|
|
228
228
|
}
|
|
229
|
-
var Ke = {},
|
|
230
|
-
function
|
|
231
|
-
return
|
|
229
|
+
var Ke = {}, Vr;
|
|
230
|
+
function Ra() {
|
|
231
|
+
return Vr || (Vr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ke;
|
|
232
232
|
}
|
|
233
|
-
var gt,
|
|
234
|
-
function
|
|
235
|
-
if (
|
|
236
|
-
|
|
237
|
-
const e =
|
|
233
|
+
var gt, Dr;
|
|
234
|
+
function qa() {
|
|
235
|
+
if (Dr) return gt;
|
|
236
|
+
Dr = 1;
|
|
237
|
+
const e = Pa(), r = Ca(), t = Ra().default;
|
|
238
238
|
return gt = (o, s, l) => {
|
|
239
239
|
const n = [];
|
|
240
240
|
return function a(i, c, u) {
|
|
@@ -272,8 +272,8 @@ function Ca() {
|
|
|
272
272
|
n.push(i);
|
|
273
273
|
const y = "[" + f.newLine + i.map(($, x) => {
|
|
274
274
|
const p = i.length - 1 === x ? f.newLine : "," + f.newLineOrSpace;
|
|
275
|
-
let
|
|
276
|
-
return c.transform && (
|
|
275
|
+
let g = a($, c, u + c.indent);
|
|
276
|
+
return c.transform && (g = c.transform(i, x, g)), f.indent + g + p;
|
|
277
277
|
}).join("") + f.pad + "]";
|
|
278
278
|
return n.pop(), h(y);
|
|
279
279
|
}
|
|
@@ -283,9 +283,9 @@ function Ca() {
|
|
|
283
283
|
return "{}";
|
|
284
284
|
n.push(i);
|
|
285
285
|
const $ = "{" + f.newLine + y.map((x, p) => {
|
|
286
|
-
const
|
|
286
|
+
const g = y.length - 1 === p ? f.newLine : "," + f.newLineOrSpace, v = typeof x == "symbol", O = !v && /^[a-z$_][a-z$_0-9]*$/i.test(x), T = v || O ? x : a(x, c);
|
|
287
287
|
let d = a(i[x], c, u + c.indent);
|
|
288
|
-
return c.transform && (d = c.transform(i, x, d)), f.indent + String(T) + ": " + d +
|
|
288
|
+
return c.transform && (d = c.transform(i, x, d)), f.indent + String(T) + ": " + d + g;
|
|
289
289
|
}).join("") + f.pad + "}";
|
|
290
290
|
return n.pop(), h($);
|
|
291
291
|
}
|
|
@@ -294,14 +294,14 @@ function Ca() {
|
|
|
294
294
|
}(o, s, l);
|
|
295
295
|
}, gt;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
298
|
-
const fe = /* @__PURE__ */
|
|
297
|
+
var Na = qa();
|
|
298
|
+
const fe = /* @__PURE__ */ ya(Na);
|
|
299
299
|
function Me(e, r = {}) {
|
|
300
300
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: s = !0 } = r;
|
|
301
301
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
302
302
|
` ? s ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? s ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
303
303
|
}
|
|
304
|
-
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }),
|
|
304
|
+
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), ka = {
|
|
305
305
|
info: {
|
|
306
306
|
key: "libcurl",
|
|
307
307
|
title: "Libcurl",
|
|
@@ -317,7 +317,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
317
317
|
l(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
318
318
|
}), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (n(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), n(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
319
319
|
}
|
|
320
|
-
},
|
|
320
|
+
}, Ea = {
|
|
321
321
|
info: {
|
|
322
322
|
key: "c",
|
|
323
323
|
title: "C",
|
|
@@ -325,30 +325,30 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
325
325
|
cli: "c"
|
|
326
326
|
},
|
|
327
327
|
clientsById: {
|
|
328
|
-
libcurl:
|
|
328
|
+
libcurl: ka
|
|
329
329
|
}
|
|
330
330
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
|
|
331
331
|
const t = pe(e, r);
|
|
332
332
|
if (t)
|
|
333
333
|
return e[t];
|
|
334
|
-
}, nt = (e, r) => !!pe(e, r),
|
|
334
|
+
}, nt = (e, r) => !!pe(e, r), Aa = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
335
335
|
(r) => e.indexOf(r) > -1
|
|
336
|
-
),
|
|
336
|
+
), Qr = class {
|
|
337
337
|
constructor(e) {
|
|
338
338
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
339
339
|
}
|
|
340
|
-
},
|
|
340
|
+
}, Ia = class {
|
|
341
341
|
constructor(e) {
|
|
342
342
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
343
343
|
}
|
|
344
|
-
},
|
|
344
|
+
}, so = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), lo = (e) => e === void 0 ? !0 : so(e) === "object" ? Object.keys(e).length === 0 : !1, Kr = (e) => (Object.keys(e).filter((r) => lo(e[r])).forEach((r) => {
|
|
345
345
|
delete e[r];
|
|
346
346
|
}), e), Xe = (e, r) => {
|
|
347
347
|
const t = " ".repeat(e);
|
|
348
348
|
return r.replace(/\n/g, `
|
|
349
349
|
${t}`);
|
|
350
|
-
},
|
|
351
|
-
switch (
|
|
350
|
+
}, yr = (e) => {
|
|
351
|
+
switch (so(e)) {
|
|
352
352
|
case "string":
|
|
353
353
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
354
354
|
case "file":
|
|
@@ -361,20 +361,20 @@ ${t}`);
|
|
|
361
361
|
return `#"${e.source}"`;
|
|
362
362
|
case "object": {
|
|
363
363
|
const r = Object.keys(e).reduce((t, o) => {
|
|
364
|
-
const s = Xe(o.length + 2,
|
|
364
|
+
const s = Xe(o.length + 2, yr(e[o]));
|
|
365
365
|
return `${t}:${o} ${s}
|
|
366
366
|
`;
|
|
367
367
|
}, "").trim();
|
|
368
368
|
return `{${Xe(1, r)}}`;
|
|
369
369
|
}
|
|
370
370
|
case "array": {
|
|
371
|
-
const r = e.reduce((t, o) => `${t} ${
|
|
371
|
+
const r = e.reduce((t, o) => `${t} ${yr(o)}`, "").trim();
|
|
372
372
|
return `[${Xe(1, r)}]`;
|
|
373
373
|
}
|
|
374
374
|
default:
|
|
375
375
|
return e.toString();
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, La = {
|
|
378
378
|
info: {
|
|
379
379
|
key: "clj_http",
|
|
380
380
|
title: "clj-http",
|
|
@@ -393,7 +393,7 @@ ${t}`);
|
|
|
393
393
|
switch (t.mimeType) {
|
|
394
394
|
case "application/json":
|
|
395
395
|
{
|
|
396
|
-
c["content-type"] = new
|
|
396
|
+
c["content-type"] = new Qr("json"), c["form-params"] = t.jsonObj;
|
|
397
397
|
const u = pe(c.headers, "content-type");
|
|
398
398
|
u && delete c.headers[u];
|
|
399
399
|
}
|
|
@@ -416,7 +416,7 @@ ${t}`);
|
|
|
416
416
|
if (t.params) {
|
|
417
417
|
c.multipart = t.params.map((f) => f.fileName && !f.value ? {
|
|
418
418
|
name: f.name,
|
|
419
|
-
content: new
|
|
419
|
+
content: new Ia(f.fileName)
|
|
420
420
|
} : {
|
|
421
421
|
name: f.name,
|
|
422
422
|
content: f.value
|
|
@@ -430,31 +430,31 @@ ${t}`);
|
|
|
430
430
|
switch (ve(c.headers, "accept")) {
|
|
431
431
|
case "application/json":
|
|
432
432
|
{
|
|
433
|
-
c.accept = new
|
|
433
|
+
c.accept = new Qr("json");
|
|
434
434
|
const u = pe(c.headers, "accept");
|
|
435
435
|
u && delete c.headers[u];
|
|
436
436
|
}
|
|
437
437
|
break;
|
|
438
438
|
}
|
|
439
439
|
if (n(`(require '[clj-http.client :as client])
|
|
440
|
-
`),
|
|
440
|
+
`), lo(Kr(c)))
|
|
441
441
|
n(`(client/${r} "${o}")`);
|
|
442
442
|
else {
|
|
443
|
-
const u = 11 + r.length + o.length, f = Xe(u,
|
|
443
|
+
const u = 11 + r.length + o.length, f = Xe(u, yr(Kr(c)));
|
|
444
444
|
n(`(client/${r} "${o}" ${f})`);
|
|
445
445
|
}
|
|
446
446
|
return a();
|
|
447
447
|
}
|
|
448
|
-
},
|
|
448
|
+
}, Ua = {
|
|
449
449
|
info: {
|
|
450
450
|
key: "clojure",
|
|
451
451
|
title: "Clojure",
|
|
452
452
|
default: "clj_http"
|
|
453
453
|
},
|
|
454
454
|
clientsById: {
|
|
455
|
-
clj_http:
|
|
455
|
+
clj_http: La
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Fa = (e) => {
|
|
458
458
|
let r = ve(e, "accept-encoding");
|
|
459
459
|
if (!r)
|
|
460
460
|
return [];
|
|
@@ -471,7 +471,7 @@ ${t}`);
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
}), o;
|
|
474
|
-
},
|
|
474
|
+
}, _a = {
|
|
475
475
|
info: {
|
|
476
476
|
key: "httpclient",
|
|
477
477
|
title: "HttpClient",
|
|
@@ -487,7 +487,7 @@ ${t}`);
|
|
|
487
487
|
}, { push: n, join: a } = new V({ indent: l.indent });
|
|
488
488
|
n("using System.Net.Http.Headers;");
|
|
489
489
|
let i = "";
|
|
490
|
-
const c = !!e.cookie, u =
|
|
490
|
+
const c = !!e.cookie, u = Fa(e);
|
|
491
491
|
(c || u.length) && (i = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), u.length && n(`AutomaticDecompression = ${u.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${i});`), n("var request = new HttpRequestMessage"), n("{");
|
|
492
492
|
const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
493
493
|
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);
|
|
@@ -524,10 +524,10 @@ ${t}`);
|
|
|
524
524
|
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();
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
|
-
function
|
|
527
|
+
function Ba(e) {
|
|
528
528
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
529
529
|
}
|
|
530
|
-
var
|
|
530
|
+
var Ha = {
|
|
531
531
|
info: {
|
|
532
532
|
key: "restsharp",
|
|
533
533
|
title: "RestSharp",
|
|
@@ -577,11 +577,11 @@ var _a = {
|
|
|
577
577
|
if (!s.text) break;
|
|
578
578
|
n(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
579
579
|
}
|
|
580
|
-
return n(`var response = await client.${
|
|
580
|
+
return n(`var response = await client.${Ba(e)}Async(request);
|
|
581
581
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
582
582
|
`), a();
|
|
583
583
|
}
|
|
584
|
-
},
|
|
584
|
+
}, Ma = {
|
|
585
585
|
info: {
|
|
586
586
|
key: "csharp",
|
|
587
587
|
title: "C#",
|
|
@@ -589,10 +589,10 @@ var _a = {
|
|
|
589
589
|
cli: "dotnet"
|
|
590
590
|
},
|
|
591
591
|
clientsById: {
|
|
592
|
-
httpclient:
|
|
593
|
-
restsharp:
|
|
592
|
+
httpclient: _a,
|
|
593
|
+
restsharp: Ha
|
|
594
594
|
}
|
|
595
|
-
},
|
|
595
|
+
}, za = {
|
|
596
596
|
info: {
|
|
597
597
|
key: "native",
|
|
598
598
|
title: "NewRequest",
|
|
@@ -605,12 +605,12 @@ var _a = {
|
|
|
605
605
|
c && (n("if err != nil {", y), n("panic(err)", y + 1), n("}", y));
|
|
606
606
|
};
|
|
607
607
|
i && (n("package main"), l(), n("import ("), n('"fmt"', y), f > 0 && n('"time"', y), e.text && n('"strings"', y), n('"net/http"', y), u && n('"io"', y), n(")"), l(), n("func main() {"), l());
|
|
608
|
-
const x = f > 0, p = x,
|
|
608
|
+
const x = f > 0, p = x, g = p ? "client" : "http.DefaultClient";
|
|
609
609
|
return p && (n("client := http.Client{", y), x && n(`Timeout: time.Duration(${f} * time.Second),`, y + 1), n("}", y), l()), n(`url := "${o}"`, y), l(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, y), l(), n(`req, ${h} := http.NewRequest("${r}", url, payload)`, y), l()) : (n(`req, ${h} := http.NewRequest("${r}", url, nil)`, y), l()), $(), Object.keys(t).length && (Object.keys(t).forEach((v) => {
|
|
610
610
|
n(`req.Header.Add("${v}", "${ce(t[v])}")`, y);
|
|
611
|
-
}), l()), n(`res, ${h} := ${
|
|
611
|
+
}), l()), n(`res, ${h} := ${g}.Do(req)`, y), $(), u && (l(), n("defer res.Body.Close()", y), n(`body, ${h} := io.ReadAll(res.Body)`, y), $()), l(), u && n("fmt.Println(string(body))", y), i && (l(), n("}")), a();
|
|
612
612
|
}
|
|
613
|
-
},
|
|
613
|
+
}, Ga = {
|
|
614
614
|
info: {
|
|
615
615
|
key: "go",
|
|
616
616
|
title: "Go",
|
|
@@ -618,10 +618,10 @@ var _a = {
|
|
|
618
618
|
cli: "go"
|
|
619
619
|
},
|
|
620
620
|
clientsById: {
|
|
621
|
-
native:
|
|
621
|
+
native: za
|
|
622
622
|
}
|
|
623
|
-
},
|
|
624
|
-
`,
|
|
623
|
+
}, Yr = `\r
|
|
624
|
+
`, Wa = {
|
|
625
625
|
info: {
|
|
626
626
|
key: "http1.1",
|
|
627
627
|
title: "HTTP/1.1",
|
|
@@ -635,11 +635,11 @@ var _a = {
|
|
|
635
635
|
autoContentLength: !0,
|
|
636
636
|
autoHost: !0,
|
|
637
637
|
...n
|
|
638
|
-
}, { blank: i, push: c, join: u } = new V({ indent: "", join:
|
|
638
|
+
}, { blank: i, push: c, join: u } = new V({ indent: "", join: Yr }), f = a.absoluteURI ? r : t.path;
|
|
639
639
|
c(`${e} ${f} ${o}`);
|
|
640
640
|
const h = Object.keys(s);
|
|
641
641
|
if (h.forEach((x) => {
|
|
642
|
-
const p = x.toLowerCase().replace(/(^|-)(\w)/g, (
|
|
642
|
+
const p = x.toLowerCase().replace(/(^|-)(\w)/g, (g) => g.toUpperCase());
|
|
643
643
|
c(`${p}: ${s[x]}`);
|
|
644
644
|
}), a.autoHost && !h.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !h.includes("content-length")) {
|
|
645
645
|
const p = new TextEncoder().encode(l.text).length.toString();
|
|
@@ -647,18 +647,18 @@ var _a = {
|
|
|
647
647
|
}
|
|
648
648
|
i();
|
|
649
649
|
const y = u(), $ = l.text || "";
|
|
650
|
-
return `${y}${
|
|
650
|
+
return `${y}${Yr}${$}`;
|
|
651
651
|
}
|
|
652
|
-
},
|
|
652
|
+
}, Ja = {
|
|
653
653
|
info: {
|
|
654
654
|
key: "http",
|
|
655
655
|
title: "HTTP",
|
|
656
656
|
default: "http1.1"
|
|
657
657
|
},
|
|
658
658
|
clientsById: {
|
|
659
|
-
"http1.1":
|
|
659
|
+
"http1.1": Wa
|
|
660
660
|
}
|
|
661
|
-
},
|
|
661
|
+
}, Va = {
|
|
662
662
|
info: {
|
|
663
663
|
key: "asynchttp",
|
|
664
664
|
title: "AsyncHttp",
|
|
@@ -675,7 +675,7 @@ var _a = {
|
|
|
675
675
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
676
676
|
}), 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();"), i();
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, Da = {
|
|
679
679
|
info: {
|
|
680
680
|
key: "nethttp",
|
|
681
681
|
title: "java.net.http",
|
|
@@ -697,7 +697,7 @@ var _a = {
|
|
|
697
697
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
698
698
|
), n("System.out.println(response.body());"), a();
|
|
699
699
|
}
|
|
700
|
-
},
|
|
700
|
+
}, Qa = {
|
|
701
701
|
info: {
|
|
702
702
|
key: "okhttp",
|
|
703
703
|
title: "OkHttp",
|
|
@@ -714,7 +714,7 @@ var _a = {
|
|
|
714
714
|
n(`.addHeader("${f}", "${ce(o[f])}")`, 1);
|
|
715
715
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), i();
|
|
716
716
|
}
|
|
717
|
-
},
|
|
717
|
+
}, Ka = {
|
|
718
718
|
info: {
|
|
719
719
|
key: "unirest",
|
|
720
720
|
title: "Unirest",
|
|
@@ -731,19 +731,19 @@ var _a = {
|
|
|
731
731
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
732
732
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
733
733
|
}
|
|
734
|
-
},
|
|
734
|
+
}, Ya = {
|
|
735
735
|
info: {
|
|
736
736
|
key: "java",
|
|
737
737
|
title: "Java",
|
|
738
738
|
default: "unirest"
|
|
739
739
|
},
|
|
740
740
|
clientsById: {
|
|
741
|
-
asynchttp:
|
|
742
|
-
nethttp:
|
|
743
|
-
okhttp:
|
|
744
|
-
unirest:
|
|
741
|
+
asynchttp: Va,
|
|
742
|
+
nethttp: Da,
|
|
743
|
+
okhttp: Qa,
|
|
744
|
+
unirest: Ka
|
|
745
745
|
}
|
|
746
|
-
},
|
|
746
|
+
}, Xa = {
|
|
747
747
|
info: {
|
|
748
748
|
key: "axios",
|
|
749
749
|
title: "Axios",
|
|
@@ -787,7 +787,7 @@ var _a = {
|
|
|
787
787
|
}).replace('"[form]"', "form");
|
|
788
788
|
return i(`const options = ${h};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
|
|
789
789
|
}
|
|
790
|
-
},
|
|
790
|
+
}, Za = {
|
|
791
791
|
info: {
|
|
792
792
|
key: "fetch",
|
|
793
793
|
title: "fetch",
|
|
@@ -840,7 +840,7 @@ var _a = {
|
|
|
840
840
|
})};`
|
|
841
841
|
), n(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), n()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
|
|
842
842
|
}
|
|
843
|
-
},
|
|
843
|
+
}, ei = {
|
|
844
844
|
info: {
|
|
845
845
|
key: "jquery",
|
|
846
846
|
title: "jQuery",
|
|
@@ -884,7 +884,7 @@ var _a = {
|
|
|
884
884
|
const u = fe(c, { indent: l.indent }).replace("'[form]'", "form");
|
|
885
885
|
return a(`const settings = ${u};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
|
|
886
886
|
}
|
|
887
|
-
},
|
|
887
|
+
}, ti = {
|
|
888
888
|
info: {
|
|
889
889
|
key: "xhr",
|
|
890
890
|
title: "XMLHttpRequest",
|
|
@@ -925,19 +925,19 @@ var _a = {
|
|
|
925
925
|
a(`xhr.setRequestHeader('${u}', '${ze(r[u])}');`);
|
|
926
926
|
}), n(), a("xhr.send(data);"), i();
|
|
927
927
|
}
|
|
928
|
-
},
|
|
928
|
+
}, ri = {
|
|
929
929
|
info: {
|
|
930
930
|
key: "javascript",
|
|
931
931
|
title: "JavaScript",
|
|
932
932
|
default: "xhr"
|
|
933
933
|
},
|
|
934
934
|
clientsById: {
|
|
935
|
-
xhr:
|
|
936
|
-
axios:
|
|
937
|
-
fetch:
|
|
938
|
-
jquery:
|
|
935
|
+
xhr: ti,
|
|
936
|
+
axios: Xa,
|
|
937
|
+
fetch: Za,
|
|
938
|
+
jquery: ei
|
|
939
939
|
}
|
|
940
|
-
},
|
|
940
|
+
}, ni = {
|
|
941
941
|
info: {
|
|
942
942
|
key: "native",
|
|
943
943
|
title: "Native JSON",
|
|
@@ -971,16 +971,16 @@ var _a = {
|
|
|
971
971
|
}
|
|
972
972
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
973
973
|
}
|
|
974
|
-
},
|
|
974
|
+
}, oi = {
|
|
975
975
|
info: {
|
|
976
976
|
key: "json",
|
|
977
977
|
title: "JSON",
|
|
978
978
|
default: "native"
|
|
979
979
|
},
|
|
980
980
|
clientsById: {
|
|
981
|
-
native:
|
|
981
|
+
native: ni
|
|
982
982
|
}
|
|
983
|
-
},
|
|
983
|
+
}, ai = {
|
|
984
984
|
info: {
|
|
985
985
|
key: "okhttp",
|
|
986
986
|
title: "OkHttp",
|
|
@@ -997,16 +997,16 @@ var _a = {
|
|
|
997
997
|
i(`.addHeader("${f}", "${ce(o[f])}")`, 1);
|
|
998
998
|
}), i(".build()", 1), n(), i("val response = client.newCall(request).execute()"), a();
|
|
999
999
|
}
|
|
1000
|
-
},
|
|
1000
|
+
}, ii = {
|
|
1001
1001
|
info: {
|
|
1002
1002
|
key: "kotlin",
|
|
1003
1003
|
title: "Kotlin",
|
|
1004
1004
|
default: "okhttp"
|
|
1005
1005
|
},
|
|
1006
1006
|
clientsById: {
|
|
1007
|
-
okhttp:
|
|
1007
|
+
okhttp: ai
|
|
1008
1008
|
}
|
|
1009
|
-
},
|
|
1009
|
+
}, si = {
|
|
1010
1010
|
info: {
|
|
1011
1011
|
key: "axios",
|
|
1012
1012
|
title: "Axios",
|
|
@@ -1040,7 +1040,7 @@ var _a = {
|
|
|
1040
1040
|
const f = fe(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
1041
1041
|
return i(`const options = ${f};`), n(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
|
|
1042
1042
|
}
|
|
1043
|
-
},
|
|
1043
|
+
}, li = {
|
|
1044
1044
|
info: {
|
|
1045
1045
|
key: "fetch",
|
|
1046
1046
|
title: "Fetch",
|
|
@@ -1063,8 +1063,8 @@ var _a = {
|
|
|
1063
1063
|
};
|
|
1064
1064
|
switch (Object.keys(o).length && (y.headers = o), t.mimeType) {
|
|
1065
1065
|
case "application/x-www-form-urlencoded":
|
|
1066
|
-
f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), (x = t.params) == null || x.forEach((
|
|
1067
|
-
c(`encodedParams.set('${
|
|
1066
|
+
f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), (x = t.params) == null || x.forEach((g) => {
|
|
1067
|
+
c(`encodedParams.set('${g.name}', '${g.value}');`);
|
|
1068
1068
|
}), y.body = "encodedParams";
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "application/json":
|
|
@@ -1074,19 +1074,19 @@ var _a = {
|
|
|
1074
1074
|
if (!t.params)
|
|
1075
1075
|
break;
|
|
1076
1076
|
const p = pe(o, "content-type");
|
|
1077
|
-
p && delete o[p], f("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((
|
|
1078
|
-
if (!
|
|
1079
|
-
c(`formData.append('${
|
|
1077
|
+
p && delete o[p], f("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((g) => {
|
|
1078
|
+
if (!g.fileName && !g.fileName && !g.contentType) {
|
|
1079
|
+
c(`formData.append('${g.name}', '${g.value}');`);
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
|
-
|
|
1082
|
+
g.fileName && (a = !0, c(`formData.append('${g.name}', fs.createReadStream('${g.fileName}'));`));
|
|
1083
1083
|
});
|
|
1084
1084
|
break;
|
|
1085
1085
|
default:
|
|
1086
1086
|
t.text && (y.body = t.text);
|
|
1087
1087
|
}
|
|
1088
1088
|
if (s.length) {
|
|
1089
|
-
const p = s.map(({ name:
|
|
1089
|
+
const p = s.map(({ name: g, value: v }) => `${encodeURIComponent(g)}=${encodeURIComponent(v)}`).join("; ");
|
|
1090
1090
|
y.headers || (y.headers = {}), y.headers.cookie = p;
|
|
1091
1091
|
}
|
|
1092
1092
|
i(), c(`const url = '${h}';`), y.headers && !Object.keys(y.headers).length && delete y.headers;
|
|
@@ -1096,11 +1096,11 @@ var _a = {
|
|
|
1096
1096
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
1097
1097
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
1098
1098
|
// in a `JSON.stringify` call.
|
|
1099
|
-
transform: (p,
|
|
1099
|
+
transform: (p, g, v) => g === "body" && t.mimeType === "application/json" ? `JSON.stringify(${v})` : v
|
|
1100
1100
|
});
|
|
1101
1101
|
return c(`const options = ${$};`), i(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), 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), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, ci = {
|
|
1104
1104
|
info: {
|
|
1105
1105
|
key: "native",
|
|
1106
1106
|
title: "HTTP",
|
|
@@ -1139,7 +1139,7 @@ var _a = {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
return i("req.end();"), a();
|
|
1141
1141
|
}
|
|
1142
|
-
},
|
|
1142
|
+
}, ui = {
|
|
1143
1143
|
info: {
|
|
1144
1144
|
key: "request",
|
|
1145
1145
|
title: "Request",
|
|
@@ -1192,7 +1192,7 @@ var _a = {
|
|
|
1192
1192
|
c(`jar.setCookie(request.cookie('${encodeURIComponent(x)}=${encodeURIComponent(p)}'), '${r}');`);
|
|
1193
1193
|
}), u(), y((x) => x.replace(/'JAR'/, "jar"))), i && h("const fs = require('fs');"), c(`const options = ${fe($, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), f();
|
|
1194
1194
|
}
|
|
1195
|
-
},
|
|
1195
|
+
}, fi = {
|
|
1196
1196
|
info: {
|
|
1197
1197
|
key: "unirest",
|
|
1198
1198
|
title: "Unirest",
|
|
@@ -1224,7 +1224,7 @@ var _a = {
|
|
|
1224
1224
|
const $ = [];
|
|
1225
1225
|
s.params.forEach((x) => {
|
|
1226
1226
|
const p = {};
|
|
1227
|
-
x.fileName && !x.value ? (i = !0, p.body = `fs.createReadStream('${x.fileName}')`, c((
|
|
1227
|
+
x.fileName && !x.value ? (i = !0, p.body = `fs.createReadStream('${x.fileName}')`, c((g) => g.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : x.value && (p.body = x.value), p.body && (x.contentType && (p["content-type"] = x.contentType), $.push(p));
|
|
1228
1228
|
}), h(`req.multipart(${fe($, { indent: a.indent })});`), u();
|
|
1229
1229
|
break;
|
|
1230
1230
|
}
|
|
@@ -1233,7 +1233,7 @@ var _a = {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
return i && y("const fs = require('fs');"), h("req.end(function (res) {"), h("if (res.error) throw new Error(res.error);", 1), u(), h("console.log(res.body);", 1), h("});"), f();
|
|
1235
1235
|
}
|
|
1236
|
-
},
|
|
1236
|
+
}, pi = {
|
|
1237
1237
|
info: {
|
|
1238
1238
|
key: "node",
|
|
1239
1239
|
title: "Node.js",
|
|
@@ -1241,27 +1241,27 @@ var _a = {
|
|
|
1241
1241
|
cli: "node %s"
|
|
1242
1242
|
},
|
|
1243
1243
|
clientsById: {
|
|
1244
|
-
native:
|
|
1245
|
-
request:
|
|
1246
|
-
unirest:
|
|
1247
|
-
axios:
|
|
1248
|
-
fetch:
|
|
1244
|
+
native: ci,
|
|
1245
|
+
request: ui,
|
|
1246
|
+
unirest: fi,
|
|
1247
|
+
axios: si,
|
|
1248
|
+
fetch: li
|
|
1249
1249
|
}
|
|
1250
1250
|
}, vt = (e, r, t, o) => {
|
|
1251
|
-
const s = `${e} *${r} = `, l =
|
|
1251
|
+
const s = `${e} *${r} = `, l = mr(t, o ? s.length : void 0);
|
|
1252
1252
|
return `${s}${l};`;
|
|
1253
|
-
},
|
|
1253
|
+
}, mr = (e, r) => {
|
|
1254
1254
|
const t = r === void 0 ? ", " : `,
|
|
1255
1255
|
${" ".repeat(r)}`;
|
|
1256
1256
|
switch (Object.prototype.toString.call(e)) {
|
|
1257
1257
|
case "[object Number]":
|
|
1258
1258
|
return `@${e}`;
|
|
1259
1259
|
case "[object Array]":
|
|
1260
|
-
return `@[ ${e.map((s) =>
|
|
1260
|
+
return `@[ ${e.map((s) => mr(s)).join(t)} ]`;
|
|
1261
1261
|
case "[object Object]": {
|
|
1262
1262
|
const o = [];
|
|
1263
1263
|
return Object.keys(e).forEach((s) => {
|
|
1264
|
-
o.push(`@"${s}": ${
|
|
1264
|
+
o.push(`@"${s}": ${mr(e[s])}`);
|
|
1265
1265
|
}), `@{ ${o.join(t)} }`;
|
|
1266
1266
|
}
|
|
1267
1267
|
case "[object Boolean]":
|
|
@@ -1269,7 +1269,7 @@ var _a = {
|
|
|
1269
1269
|
default:
|
|
1270
1270
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1271
1271
|
}
|
|
1272
|
-
},
|
|
1272
|
+
}, di = {
|
|
1273
1273
|
info: {
|
|
1274
1274
|
key: "nsurlsession",
|
|
1275
1275
|
title: "NSURLSession",
|
|
@@ -1326,16 +1326,16 @@ var _a = {
|
|
|
1326
1326
|
2
|
|
1327
1327
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1328
1328
|
}
|
|
1329
|
-
},
|
|
1329
|
+
}, hi = {
|
|
1330
1330
|
info: {
|
|
1331
1331
|
key: "objc",
|
|
1332
1332
|
title: "Objective-C",
|
|
1333
1333
|
default: "nsurlsession"
|
|
1334
1334
|
},
|
|
1335
1335
|
clientsById: {
|
|
1336
|
-
nsurlsession:
|
|
1336
|
+
nsurlsession: di
|
|
1337
1337
|
}
|
|
1338
|
-
},
|
|
1338
|
+
}, yi = {
|
|
1339
1339
|
info: {
|
|
1340
1340
|
key: "cohttp",
|
|
1341
1341
|
title: "CoHTTP",
|
|
@@ -1361,14 +1361,14 @@ var _a = {
|
|
|
1361
1361
|
const f = u.length ? "~headers " : "", h = t.text ? "~body " : "", y = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1362
1362
|
return a(`Client.call ${f}${h}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, mi = {
|
|
1365
1365
|
info: {
|
|
1366
1366
|
key: "ocaml",
|
|
1367
1367
|
title: "OCaml",
|
|
1368
1368
|
default: "cohttp"
|
|
1369
1369
|
},
|
|
1370
1370
|
clientsById: {
|
|
1371
|
-
cohttp:
|
|
1371
|
+
cohttp: yi
|
|
1372
1372
|
}
|
|
1373
1373
|
}, te = (e, r, t) => {
|
|
1374
1374
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1401,7 +1401,7 @@ ${t}]`;
|
|
|
1401
1401
|
default:
|
|
1402
1402
|
return "null";
|
|
1403
1403
|
}
|
|
1404
|
-
},
|
|
1404
|
+
}, Xr = [
|
|
1405
1405
|
"ACL",
|
|
1406
1406
|
"BASELINE_CONTROL",
|
|
1407
1407
|
"CHECKIN",
|
|
@@ -1429,7 +1429,7 @@ ${t}]`;
|
|
|
1429
1429
|
"UNLOCK",
|
|
1430
1430
|
"UPDATE",
|
|
1431
1431
|
"VERSION_CONTROL"
|
|
1432
|
-
],
|
|
1432
|
+
], gi = {
|
|
1433
1433
|
info: {
|
|
1434
1434
|
key: "curl",
|
|
1435
1435
|
title: "cURL",
|
|
@@ -1446,7 +1446,7 @@ ${t}]`;
|
|
|
1446
1446
|
noTags: h = !1,
|
|
1447
1447
|
shortTags: y = !1,
|
|
1448
1448
|
timeout: $ = 30
|
|
1449
|
-
} = a, { push: x, blank: p, join:
|
|
1449
|
+
} = a, { push: x, blank: p, join: g } = new V({ indent: c });
|
|
1450
1450
|
h || (x(y ? "<?" : "<?php"), p()), x("$curl = curl_init();"), p();
|
|
1451
1451
|
const v = [
|
|
1452
1452
|
{
|
|
@@ -1505,9 +1505,9 @@ ${c}` });
|
|
|
1505
1505
|
T.length && O.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1506
1506
|
const d = Object.keys(n).sort().map((S) => `"${S}: ${ce(n[S])}"`);
|
|
1507
1507
|
return d.length && (O.push("CURLOPT_HTTPHEADER => ["), O.push(d.join(`,
|
|
1508
|
-
${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = curl_exec($curl);"), x("$err = curl_error($curl);"), p(), x("curl_close($curl);"), p(), x("if ($err) {"), x(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), x("} else {"), x("echo $response;", 1), x("}"), !h && i && (p(), x("?>")),
|
|
1508
|
+
${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = curl_exec($curl);"), x("$err = curl_error($curl);"), p(), x("curl_close($curl);"), p(), x("if ($err) {"), x(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), x("} else {"), x("echo $response;", 1), x("}"), !h && i && (p(), x("?>")), g();
|
|
1509
1509
|
}
|
|
1510
|
-
},
|
|
1510
|
+
}, vi = {
|
|
1511
1511
|
info: {
|
|
1512
1512
|
key: "guzzle",
|
|
1513
1513
|
title: "Guzzle",
|
|
@@ -1531,21 +1531,21 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1531
1531
|
break;
|
|
1532
1532
|
case "multipart/form-data": {
|
|
1533
1533
|
const p = [];
|
|
1534
|
-
if (e.params && e.params.forEach((
|
|
1535
|
-
if (
|
|
1534
|
+
if (e.params && e.params.forEach((g) => {
|
|
1535
|
+
if (g.fileName) {
|
|
1536
1536
|
const v = {
|
|
1537
|
-
name:
|
|
1538
|
-
filename:
|
|
1539
|
-
contents:
|
|
1537
|
+
name: g.name,
|
|
1538
|
+
filename: g.fileName,
|
|
1539
|
+
contents: g.value
|
|
1540
1540
|
};
|
|
1541
|
-
|
|
1542
|
-
} else
|
|
1543
|
-
name:
|
|
1544
|
-
contents:
|
|
1541
|
+
g.contentType && (v.headers = { "Content-Type": g.contentType }), p.push(v);
|
|
1542
|
+
} else g.value && p.push({
|
|
1543
|
+
name: g.name,
|
|
1544
|
+
contents: g.value
|
|
1545
1545
|
});
|
|
1546
1546
|
}), p.length && (f(`'multipart' => ${te(p, n.indent + n.indent, n.indent)}`, 1), nt(s, "content-type") && (x = ve(s, "content-type")) != null && x.indexOf("boundary"))) {
|
|
1547
|
-
const
|
|
1548
|
-
|
|
1547
|
+
const g = pe(s, "content-type");
|
|
1548
|
+
g && delete s[g];
|
|
1549
1549
|
}
|
|
1550
1550
|
break;
|
|
1551
1551
|
}
|
|
@@ -1558,7 +1558,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1558
1558
|
return $.length && y.push(`${n.indent}${n.indent}'cookie' => '${ze($)}',`), y.length && (f("'headers' => [", 1), f(y.join(`
|
|
1559
1559
|
`)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(h()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), i(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (i(), a("?>")), c();
|
|
1560
1560
|
}
|
|
1561
|
-
},
|
|
1561
|
+
}, bi = {
|
|
1562
1562
|
info: {
|
|
1563
1563
|
key: "http1",
|
|
1564
1564
|
title: "HTTP v1",
|
|
@@ -1568,7 +1568,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1568
1568
|
},
|
|
1569
1569
|
convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: s, cookiesObj: l }, n = {}) => {
|
|
1570
1570
|
const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = n, { push: f, blank: h, join: y } = new V({ indent: i });
|
|
1571
|
-
switch (c || (f(u ? "<?" : "<?php"), h()),
|
|
1571
|
+
switch (c || (f(u ? "<?" : "<?php"), h()), Xr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(r)});`), Xr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), h(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, i)});`), h()), Object.keys(s).length && (f(`$request->setHeaders(${te(s, i)});`), h()), Object.keys(l).length && (f(`$request->setCookies(${te(l, i)});`), h()), t.mimeType) {
|
|
1572
1572
|
case "application/x-www-form-urlencoded":
|
|
1573
1573
|
f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, i)});`), h();
|
|
1574
1574
|
break;
|
|
@@ -1580,7 +1580,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1580
1580
|
}
|
|
1581
1581
|
return f("try {"), f("$response = $request->send();", 1), h(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !c && a && (h(), f("?>")), y();
|
|
1582
1582
|
}
|
|
1583
|
-
},
|
|
1583
|
+
}, xi = {
|
|
1584
1584
|
info: {
|
|
1585
1585
|
key: "http2",
|
|
1586
1586
|
title: "HTTP v2",
|
|
@@ -1599,7 +1599,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1599
1599
|
case "multipart/form-data": {
|
|
1600
1600
|
if (!e.params)
|
|
1601
1601
|
break;
|
|
1602
|
-
const p = [],
|
|
1602
|
+
const p = [], g = {};
|
|
1603
1603
|
e.params.forEach(({ name: T, fileName: d, value: S, contentType: b }) => {
|
|
1604
1604
|
if (d) {
|
|
1605
1605
|
p.push({
|
|
@@ -1610,9 +1610,9 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1610
1610
|
});
|
|
1611
1611
|
return;
|
|
1612
1612
|
}
|
|
1613
|
-
S && (
|
|
1613
|
+
S && (g[T] = S);
|
|
1614
1614
|
});
|
|
1615
|
-
const v = Object.keys(
|
|
1615
|
+
const v = Object.keys(g).length ? te(g, i) : "null", O = p.length ? te(p, i) : "null";
|
|
1616
1616
|
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${v}, ${O});`), nt(r, "content-type") && (x = ve(r, "content-type")) != null && x.indexOf("boundary")) {
|
|
1617
1617
|
const T = pe(r, "content-type");
|
|
1618
1618
|
T && delete r[T];
|
|
@@ -1628,7 +1628,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1628
1628
|
}
|
|
1629
1629
|
return f(`$request->setRequestUrl(${te(l)});`), f(`$request->setRequestMethod(${te(t)});`), $ && (f("$request->setBody($body);"), h()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), h()), Object.keys(r).length && (f(`$request->setHeaders(${te(r, i)});`), h()), Object.keys(s).length && (h(), f(`$client->setCookies(${te(s, i)});`), h()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), h(), f("echo $response->getBody();"), !c && a && (h(), f("?>")), y();
|
|
1630
1630
|
}
|
|
1631
|
-
},
|
|
1631
|
+
}, $i = {
|
|
1632
1632
|
info: {
|
|
1633
1633
|
key: "php",
|
|
1634
1634
|
title: "PHP",
|
|
@@ -1636,12 +1636,12 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1636
1636
|
cli: "php %s"
|
|
1637
1637
|
},
|
|
1638
1638
|
clientsById: {
|
|
1639
|
-
curl:
|
|
1640
|
-
guzzle:
|
|
1641
|
-
http1:
|
|
1642
|
-
http2:
|
|
1639
|
+
curl: gi,
|
|
1640
|
+
guzzle: vi,
|
|
1641
|
+
http1: bi,
|
|
1642
|
+
http2: xi
|
|
1643
1643
|
}
|
|
1644
|
-
},
|
|
1644
|
+
}, co = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: n, postData: a, allHeaders: i }) => {
|
|
1645
1645
|
const { push: c, join: u } = new V();
|
|
1646
1646
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1647
1647
|
return "Method not supported";
|
|
@@ -1653,7 +1653,7 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1653
1653
|
}), h.push("-WebSession $session")), a.text && (h.push(
|
|
1654
1654
|
`-ContentType '${Me(ve(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1655
1655
|
), h.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${h.join(" ")}`.trim()), u();
|
|
1656
|
-
},
|
|
1656
|
+
}, ji = {
|
|
1657
1657
|
info: {
|
|
1658
1658
|
key: "restmethod",
|
|
1659
1659
|
title: "Invoke-RestMethod",
|
|
@@ -1661,8 +1661,8 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1661
1661
|
description: "Powershell Invoke-RestMethod client",
|
|
1662
1662
|
extname: ".ps1"
|
|
1663
1663
|
},
|
|
1664
|
-
convert:
|
|
1665
|
-
},
|
|
1664
|
+
convert: co("Invoke-RestMethod")
|
|
1665
|
+
}, wi = {
|
|
1666
1666
|
info: {
|
|
1667
1667
|
key: "webrequest",
|
|
1668
1668
|
title: "Invoke-WebRequest",
|
|
@@ -1670,39 +1670,39 @@ ${c}${c}`), 1), O.push("],")), x(O.join(), 1), x("]);"), p(), x("$response = cur
|
|
|
1670
1670
|
description: "Powershell Invoke-WebRequest client",
|
|
1671
1671
|
extname: ".ps1"
|
|
1672
1672
|
},
|
|
1673
|
-
convert:
|
|
1674
|
-
},
|
|
1673
|
+
convert: co("Invoke-WebRequest")
|
|
1674
|
+
}, Si = {
|
|
1675
1675
|
info: {
|
|
1676
1676
|
key: "powershell",
|
|
1677
1677
|
title: "Powershell",
|
|
1678
1678
|
default: "webrequest"
|
|
1679
1679
|
},
|
|
1680
1680
|
clientsById: {
|
|
1681
|
-
webrequest:
|
|
1682
|
-
restmethod:
|
|
1681
|
+
webrequest: wi,
|
|
1682
|
+
restmethod: ji
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
1685
|
-
function
|
|
1685
|
+
function Zr(e, r, t, o, s) {
|
|
1686
1686
|
const l = o.repeat(s), n = o.repeat(s - 1), a = t ? `,
|
|
1687
1687
|
${l}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
1688
1688
|
return t ? `${i}
|
|
1689
1689
|
${l}${r.join(a)}
|
|
1690
1690
|
${n}${c}` : e === "object" && r.length > 0 ? `${i} ${r.join(a)} ${c}` : `${i}${r.join(a)}${c}`;
|
|
1691
1691
|
}
|
|
1692
|
-
var
|
|
1692
|
+
var Ie = (e, r, t) => {
|
|
1693
1693
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
1694
1694
|
case "[object Number]":
|
|
1695
1695
|
return e;
|
|
1696
1696
|
case "[object Array]": {
|
|
1697
1697
|
let o = !1;
|
|
1698
|
-
const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1),
|
|
1699
|
-
return
|
|
1698
|
+
const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), Ie(l, r, t)));
|
|
1699
|
+
return Zr("array", s, o, r.indent, t);
|
|
1700
1700
|
}
|
|
1701
1701
|
case "[object Object]": {
|
|
1702
1702
|
const o = [];
|
|
1703
1703
|
for (const s in e)
|
|
1704
|
-
o.push(`"${s}": ${
|
|
1705
|
-
return
|
|
1704
|
+
o.push(`"${s}": ${Ie(e[s], r, t)}`);
|
|
1705
|
+
return Zr("object", o, r.pretty && o.length > 1, r.indent, t);
|
|
1706
1706
|
}
|
|
1707
1707
|
case "[object Null]":
|
|
1708
1708
|
return "None";
|
|
@@ -1711,7 +1711,7 @@ var Ae = (e, r, t) => {
|
|
|
1711
1711
|
default:
|
|
1712
1712
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1713
1713
|
}
|
|
1714
|
-
},
|
|
1714
|
+
}, Oi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Ti = {
|
|
1715
1715
|
info: {
|
|
1716
1716
|
key: "requests",
|
|
1717
1717
|
title: "Requests",
|
|
@@ -1733,7 +1733,7 @@ var Ae = (e, r, t) => {
|
|
|
1733
1733
|
let y = !1, $ = !1, x = !1;
|
|
1734
1734
|
switch (r.mimeType) {
|
|
1735
1735
|
case "application/json":
|
|
1736
|
-
r.jsonObj && (n(`payload = ${
|
|
1736
|
+
r.jsonObj && (n(`payload = ${Ie(r.jsonObj, l)}`), x = !0, $ = !0);
|
|
1737
1737
|
break;
|
|
1738
1738
|
case "multipart/form-data":
|
|
1739
1739
|
if (!r.params)
|
|
@@ -1741,7 +1741,7 @@ var Ae = (e, r, t) => {
|
|
|
1741
1741
|
if (f = {}, r.params.forEach((v) => {
|
|
1742
1742
|
v.fileName ? (v.contentType ? h[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : h[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (f[v.name] = v.value, $ = !0);
|
|
1743
1743
|
}), y) {
|
|
1744
|
-
n(`files = ${
|
|
1744
|
+
n(`files = ${Ie(h, l)}`), $ && n(`payload = ${Ie(f, l)}`);
|
|
1745
1745
|
const v = pe(u, "content-type");
|
|
1746
1746
|
v && delete u[v];
|
|
1747
1747
|
} else {
|
|
@@ -1754,7 +1754,7 @@ var Ae = (e, r, t) => {
|
|
|
1754
1754
|
break;
|
|
1755
1755
|
default: {
|
|
1756
1756
|
if (r.mimeType === "application/x-www-form-urlencoded" && r.paramsObj) {
|
|
1757
|
-
n(`payload = ${
|
|
1757
|
+
n(`payload = ${Ie(r.paramsObj, l)}`), $ = !0;
|
|
1758
1758
|
break;
|
|
1759
1759
|
}
|
|
1760
1760
|
const v = JSON.stringify(r.text);
|
|
@@ -1774,10 +1774,10 @@ var Ae = (e, r, t) => {
|
|
|
1774
1774
|
n(v !== p ? `"${O}": "${ce(u[O])}",` : `"${O}": "${ce(u[O])}"`, 1), v += 1;
|
|
1775
1775
|
}), n("}"), a();
|
|
1776
1776
|
}
|
|
1777
|
-
let
|
|
1778
|
-
return $ && (x ?
|
|
1777
|
+
let g = Oi.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1778
|
+
return $ && (x ? g += ", json=payload" : g += ", data=payload"), y && (g += ", files=files"), p > 0 && (g += ", headers=headers"), g += ")", n(g), a(), n("print(response.text)"), i();
|
|
1779
1779
|
}
|
|
1780
|
-
},
|
|
1780
|
+
}, Pi = {
|
|
1781
1781
|
info: {
|
|
1782
1782
|
key: "python",
|
|
1783
1783
|
title: "Python",
|
|
@@ -1785,9 +1785,9 @@ var Ae = (e, r, t) => {
|
|
|
1785
1785
|
cli: "python3 %s"
|
|
1786
1786
|
},
|
|
1787
1787
|
clientsById: {
|
|
1788
|
-
requests:
|
|
1788
|
+
requests: Ti
|
|
1789
1789
|
}
|
|
1790
|
-
},
|
|
1790
|
+
}, Ci = {
|
|
1791
1791
|
info: {
|
|
1792
1792
|
key: "httr",
|
|
1793
1793
|
title: "httr",
|
|
@@ -1820,22 +1820,22 @@ var Ae = (e, r, t) => {
|
|
|
1820
1820
|
n('encode <- "raw"'), a();
|
|
1821
1821
|
break;
|
|
1822
1822
|
}
|
|
1823
|
-
const h = ve(s, "cookie"), y = ve(s, "accept"), $ = h ? `set_cookies(\`${String(h).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, x = y ? `accept("${ce(y)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`,
|
|
1823
|
+
const h = ve(s, "cookie"), y = ve(s, "accept"), $ = h ? `set_cookies(\`${String(h).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, x = y ? `accept("${ce(y)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`, g = Object.entries(s).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, S]) => `'${d}' = '${ze(S)}'`).join(", "), v = g ? `add_headers(${g})` : void 0;
|
|
1824
1824
|
let O = `response <- VERB("${l}", url`;
|
|
1825
1825
|
f && (O += ", body = payload"), t.length && (O += ", query = queryString");
|
|
1826
1826
|
const T = [v, p, x, $].filter((d) => !!d).join(", ");
|
|
1827
1827
|
return T && (O += `, ${T}`), (o.text || o.jsonObj || o.params) && (O += ", encode = encode"), O += ")", n(O), a(), n('content(response, "text")'), i();
|
|
1828
1828
|
}
|
|
1829
|
-
},
|
|
1829
|
+
}, Ri = {
|
|
1830
1830
|
info: {
|
|
1831
1831
|
key: "r",
|
|
1832
1832
|
title: "R",
|
|
1833
1833
|
default: "httr"
|
|
1834
1834
|
},
|
|
1835
1835
|
clientsById: {
|
|
1836
|
-
httr:
|
|
1836
|
+
httr: Ci
|
|
1837
1837
|
}
|
|
1838
|
-
},
|
|
1838
|
+
}, qi = {
|
|
1839
1839
|
info: {
|
|
1840
1840
|
key: "native",
|
|
1841
1841
|
title: "net::http",
|
|
@@ -1866,16 +1866,16 @@ var Ae = (e, r, t) => {
|
|
|
1866
1866
|
l(`request["${h}"] = '${ze(s[h])}'`);
|
|
1867
1867
|
}), o.text && l(`request.body = ${JSON.stringify(o.text)}`), n(), l("response = http.request(request)"), l("puts response.read_body"), a();
|
|
1868
1868
|
}
|
|
1869
|
-
},
|
|
1869
|
+
}, Ni = {
|
|
1870
1870
|
info: {
|
|
1871
1871
|
key: "ruby",
|
|
1872
1872
|
title: "Ruby",
|
|
1873
1873
|
default: "native"
|
|
1874
1874
|
},
|
|
1875
1875
|
clientsById: {
|
|
1876
|
-
native:
|
|
1876
|
+
native: qi
|
|
1877
1877
|
}
|
|
1878
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1878
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, ki = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ei = {
|
|
1879
1879
|
"http1.0": "0",
|
|
1880
1880
|
"url ": "",
|
|
1881
1881
|
cookie: "b",
|
|
@@ -1885,13 +1885,13 @@ var Ae = (e, r, t) => {
|
|
|
1885
1885
|
header: "H",
|
|
1886
1886
|
insecure: "k",
|
|
1887
1887
|
request: "X"
|
|
1888
|
-
},
|
|
1888
|
+
}, Ai = (e) => (r) => {
|
|
1889
1889
|
if (e) {
|
|
1890
|
-
const t =
|
|
1890
|
+
const t = Ei[r];
|
|
1891
1891
|
return t ? `-${t}` : "";
|
|
1892
1892
|
}
|
|
1893
1893
|
return `--${r}`;
|
|
1894
|
-
},
|
|
1894
|
+
}, Ii = {
|
|
1895
1895
|
info: {
|
|
1896
1896
|
key: "curl",
|
|
1897
1897
|
title: "cURL",
|
|
@@ -1905,20 +1905,20 @@ var Ae = (e, r, t) => {
|
|
|
1905
1905
|
...typeof a == "string" ? { indent: a } : {},
|
|
1906
1906
|
join: a !== !1 ? ` \\
|
|
1907
1907
|
${a}` : " "
|
|
1908
|
-
}), $ =
|
|
1908
|
+
}), $ = Ai(i);
|
|
1909
1909
|
let x = ue(e);
|
|
1910
1910
|
if (h(`curl ${$("request")} ${r}`), u && (x = unescape(x), h($("globoff"))), h(`${$("url ")}${x}`), t === "HTTP/1.0" && h($("http1.0")), ve(s, "accept-encoding") && h("--compressed"), l.mimeType === "multipart/form-data") {
|
|
1911
|
-
const
|
|
1912
|
-
if (
|
|
1913
|
-
const v = o[
|
|
1914
|
-
if (
|
|
1911
|
+
const g = pe(o, "content-type");
|
|
1912
|
+
if (g) {
|
|
1913
|
+
const v = o[g];
|
|
1914
|
+
if (g && v) {
|
|
1915
1915
|
const O = String(v).replace(/; boundary.+?(?=(;|$))/, "");
|
|
1916
|
-
o[
|
|
1916
|
+
o[g] = O, s[g] = O;
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
|
-
switch (Object.keys(o).sort().forEach((
|
|
1921
|
-
const v = `${
|
|
1920
|
+
switch (Object.keys(o).sort().forEach((g) => {
|
|
1921
|
+
const v = `${g}: ${o[g]}`;
|
|
1922
1922
|
h(`${$("header")} ${ue(v)}`);
|
|
1923
1923
|
}), s.cookie && h(`${$("cookie")} ${ue(s.cookie)}`), l.mimeType) {
|
|
1924
1924
|
case "multipart/form-data":
|
|
@@ -1936,11 +1936,11 @@ ${a}` : " "
|
|
|
1936
1936
|
default:
|
|
1937
1937
|
if (!l.text)
|
|
1938
1938
|
break;
|
|
1939
|
-
let
|
|
1940
|
-
if (
|
|
1939
|
+
let g = !1;
|
|
1940
|
+
if (Aa(l.mimeType) && l.text.length > 20)
|
|
1941
1941
|
try {
|
|
1942
1942
|
const v = JSON.parse(l.text);
|
|
1943
|
-
|
|
1943
|
+
g = !0, l.text.indexOf("'") > 0 ? h(
|
|
1944
1944
|
`${c ? "--data-binary" : $("data")} @- <<EOF
|
|
1945
1945
|
${JSON.stringify(
|
|
1946
1946
|
v,
|
|
@@ -1955,11 +1955,11 @@ ${JSON.stringify(v, null, f)}
|
|
|
1955
1955
|
);
|
|
1956
1956
|
} catch {
|
|
1957
1957
|
}
|
|
1958
|
-
|
|
1958
|
+
g || h(`${c ? "--data-binary" : $("data")} ${ue(l.text)}`);
|
|
1959
1959
|
}
|
|
1960
1960
|
return y();
|
|
1961
1961
|
}
|
|
1962
|
-
},
|
|
1962
|
+
}, Li = {
|
|
1963
1963
|
info: {
|
|
1964
1964
|
key: "httpie",
|
|
1965
1965
|
title: "HTTPie",
|
|
@@ -2008,7 +2008,7 @@ ${a.indent}` : " "
|
|
|
2008
2008
|
}
|
|
2009
2009
|
return c();
|
|
2010
2010
|
}
|
|
2011
|
-
},
|
|
2011
|
+
}, Ui = {
|
|
2012
2012
|
info: {
|
|
2013
2013
|
key: "wget",
|
|
2014
2014
|
title: "Wget",
|
|
@@ -2030,9 +2030,9 @@ ${l.indent}` : " "
|
|
|
2030
2030
|
return l.verbose ? n(`wget ${l.short ? "-v" : "--verbose"}`) : n(`wget ${l.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((i) => {
|
|
2031
2031
|
const c = `${i}: ${t[i]}`;
|
|
2032
2032
|
n(`--header ${ue(c)}`);
|
|
2033
|
-
}), r.text && n(`--body-data ${
|
|
2033
|
+
}), r.text && n(`--body-data ${ki(ue(r.text))}`), n(l.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2034
2034
|
}
|
|
2035
|
-
},
|
|
2035
|
+
}, Fi = {
|
|
2036
2036
|
info: {
|
|
2037
2037
|
key: "shell",
|
|
2038
2038
|
title: "Shell",
|
|
@@ -2040,30 +2040,30 @@ ${l.indent}` : " "
|
|
|
2040
2040
|
cli: "%s"
|
|
2041
2041
|
},
|
|
2042
2042
|
clientsById: {
|
|
2043
|
-
curl:
|
|
2044
|
-
httpie:
|
|
2045
|
-
wget:
|
|
2043
|
+
curl: Ii,
|
|
2044
|
+
httpie: Li,
|
|
2045
|
+
wget: Ui
|
|
2046
2046
|
}
|
|
2047
|
-
},
|
|
2048
|
-
const s =
|
|
2047
|
+
}, en = (e, r) => r.repeat(e), tn = (e, r, t, o) => {
|
|
2048
|
+
const s = en(o, t), l = en(o - 1, t), n = r ? `,
|
|
2049
2049
|
${s}` : ", ";
|
|
2050
2050
|
return r ? `[
|
|
2051
2051
|
${s}${e.join(n)}
|
|
2052
2052
|
${l}]` : `[${e.join(n)}]`;
|
|
2053
|
-
},
|
|
2053
|
+
}, rn = (e, r, t) => `let ${e} = ${tt(r, t)}`, tt = (e, r, t) => {
|
|
2054
2054
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
2055
2055
|
case "[object Number]":
|
|
2056
2056
|
return e;
|
|
2057
2057
|
case "[object Array]": {
|
|
2058
2058
|
let o = !1;
|
|
2059
2059
|
const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), tt(l, r, t)));
|
|
2060
|
-
return
|
|
2060
|
+
return tn(s, o, r.indent, t);
|
|
2061
2061
|
}
|
|
2062
2062
|
case "[object Object]": {
|
|
2063
2063
|
const o = [];
|
|
2064
2064
|
for (const s in e)
|
|
2065
2065
|
o.push(`"${s}": ${tt(e[s], r, t)}`);
|
|
2066
|
-
return
|
|
2066
|
+
return tn(
|
|
2067
2067
|
o,
|
|
2068
2068
|
// @ts-expect-error needs better types
|
|
2069
2069
|
r.pretty && o.length > 1,
|
|
@@ -2077,7 +2077,7 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2077
2077
|
default:
|
|
2078
2078
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2079
2079
|
}
|
|
2080
|
-
},
|
|
2080
|
+
}, _i = {
|
|
2081
2081
|
info: {
|
|
2082
2082
|
key: "urlsession",
|
|
2083
2083
|
title: "URLSession",
|
|
@@ -2104,10 +2104,10 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2104
2104
|
}
|
|
2105
2105
|
break;
|
|
2106
2106
|
case "application/json":
|
|
2107
|
-
r.jsonObj && (a(`${
|
|
2107
|
+
r.jsonObj && (a(`${rn("parameters", r.jsonObj, n)} as [String : Any?]`), i(), a("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
|
|
2108
2108
|
break;
|
|
2109
2109
|
case "multipart/form-data":
|
|
2110
|
-
a(
|
|
2110
|
+
a(rn("parameters", r.params, n)), i(), a(`let boundary = "${r.boundary}"`), i(), a('var body = ""'), a("for param in parameters {"), a('let paramName = param["name"]!', 1), a('body += "--\\(boundary)\\r\\n"', 1), a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), a('if let filename = param["fileName"] {', 1), a('let contentType = param["contentType"]!', 2), a("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), a('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), a("body += fileContent", 2), a('} else if let paramValue = param["value"] {', 1), a('body += "\\r\\n\\r\\n\\(paramValue)"', 2), a("}", 1), a("}"), i(), a("let postData = Data(body.utf8)"), i();
|
|
2111
2111
|
break;
|
|
2112
2112
|
default:
|
|
2113
2113
|
a(`let postData = Data("${r.text}".utf8)`), i();
|
|
@@ -2128,44 +2128,44 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2128
2128
|
}
|
|
2129
2129
|
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`), u && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2130
2130
|
}
|
|
2131
|
-
},
|
|
2131
|
+
}, Bi = {
|
|
2132
2132
|
info: {
|
|
2133
2133
|
key: "swift",
|
|
2134
2134
|
title: "Swift",
|
|
2135
2135
|
default: "urlsession"
|
|
2136
2136
|
},
|
|
2137
2137
|
clientsById: {
|
|
2138
|
-
urlsession:
|
|
2138
|
+
urlsession: _i
|
|
2139
2139
|
}
|
|
2140
|
-
},
|
|
2141
|
-
c:
|
|
2142
|
-
clojure:
|
|
2143
|
-
csharp:
|
|
2144
|
-
go:
|
|
2145
|
-
http:
|
|
2146
|
-
java:
|
|
2147
|
-
javascript:
|
|
2148
|
-
json:
|
|
2149
|
-
kotlin:
|
|
2150
|
-
node:
|
|
2151
|
-
objc:
|
|
2152
|
-
ocaml:
|
|
2153
|
-
php:
|
|
2154
|
-
powershell:
|
|
2155
|
-
python:
|
|
2156
|
-
r:
|
|
2157
|
-
ruby:
|
|
2158
|
-
shell:
|
|
2159
|
-
swift:
|
|
2160
|
-
}, Pe = {},
|
|
2140
|
+
}, Hi = {
|
|
2141
|
+
c: Ea,
|
|
2142
|
+
clojure: Ua,
|
|
2143
|
+
csharp: Ma,
|
|
2144
|
+
go: Ga,
|
|
2145
|
+
http: Ja,
|
|
2146
|
+
java: Ya,
|
|
2147
|
+
javascript: ri,
|
|
2148
|
+
json: oi,
|
|
2149
|
+
kotlin: ii,
|
|
2150
|
+
node: pi,
|
|
2151
|
+
objc: hi,
|
|
2152
|
+
ocaml: mi,
|
|
2153
|
+
php: $i,
|
|
2154
|
+
powershell: Si,
|
|
2155
|
+
python: Pi,
|
|
2156
|
+
r: Ri,
|
|
2157
|
+
ruby: Ni,
|
|
2158
|
+
shell: Fi,
|
|
2159
|
+
swift: Bi
|
|
2160
|
+
}, Pe = {}, _e = { exports: {} };
|
|
2161
2161
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2162
|
-
var
|
|
2163
|
-
function
|
|
2164
|
-
return
|
|
2162
|
+
var Mi = _e.exports, nn;
|
|
2163
|
+
function zi() {
|
|
2164
|
+
return nn || (nn = 1, function(e, r) {
|
|
2165
2165
|
(function(t) {
|
|
2166
2166
|
var o = r && !r.nodeType && r, s = !e.nodeType && e, l = typeof Ze == "object" && Ze;
|
|
2167
2167
|
(l.global === l || l.window === l || l.self === l) && (t = l);
|
|
2168
|
-
var n, a = 2147483647, i = 36, c = 1, u = 26, f = 38, h = 700, y = 72, $ = 128, x = "-", p = /^xn--/,
|
|
2168
|
+
var n, a = 2147483647, i = 36, c = 1, u = 26, f = 38, h = 700, y = 72, $ = 128, x = "-", p = /^xn--/, g = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, O = {
|
|
2169
2169
|
overflow: "Overflow: input needs wider integers to process",
|
|
2170
2170
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2171
2171
|
"invalid-input": "Invalid input"
|
|
@@ -2173,24 +2173,24 @@ function Hi() {
|
|
|
2173
2173
|
function q(R) {
|
|
2174
2174
|
throw new RangeError(O[R]);
|
|
2175
2175
|
}
|
|
2176
|
-
function
|
|
2176
|
+
function L(R, N) {
|
|
2177
2177
|
for (var U = R.length, C = []; U--; )
|
|
2178
2178
|
C[U] = N(R[U]);
|
|
2179
2179
|
return C;
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function E(R, N) {
|
|
2182
2182
|
var U = R.split("@"), C = "";
|
|
2183
2183
|
U.length > 1 && (C = U[0] + "@", R = U[1]), R = R.replace(v, ".");
|
|
2184
|
-
var
|
|
2184
|
+
var I = R.split("."), W = L(I, N).join(".");
|
|
2185
2185
|
return C + W;
|
|
2186
2186
|
}
|
|
2187
2187
|
function B(R) {
|
|
2188
|
-
for (var N = [], U = 0, C = R.length,
|
|
2189
|
-
|
|
2188
|
+
for (var N = [], U = 0, C = R.length, I, W; U < C; )
|
|
2189
|
+
I = R.charCodeAt(U++), I >= 55296 && I <= 56319 && U < C ? (W = R.charCodeAt(U++), (W & 64512) == 56320 ? N.push(((I & 1023) << 10) + (W & 1023) + 65536) : (N.push(I), U--)) : N.push(I);
|
|
2190
2190
|
return N;
|
|
2191
2191
|
}
|
|
2192
2192
|
function P(R) {
|
|
2193
|
-
return
|
|
2193
|
+
return L(R, function(N) {
|
|
2194
2194
|
var U = "";
|
|
2195
2195
|
return N > 65535 && (N -= 65536, U += S(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), U += S(N), U;
|
|
2196
2196
|
}).join("");
|
|
@@ -2208,21 +2208,21 @@ function Hi() {
|
|
|
2208
2208
|
return d(C + (T + 1) * R / (R + f));
|
|
2209
2209
|
}
|
|
2210
2210
|
function se(R) {
|
|
2211
|
-
var N = [], U = R.length, C,
|
|
2211
|
+
var N = [], U = R.length, C, I = 0, W = $, z = y, K, ne, J, A, F, _, Q, G, Y;
|
|
2212
2212
|
for (K = R.lastIndexOf(x), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
|
|
2213
2213
|
R.charCodeAt(ne) >= 128 && q("not-basic"), N.push(R.charCodeAt(ne));
|
|
2214
2214
|
for (J = K > 0 ? K + 1 : 0; J < U; ) {
|
|
2215
|
-
for (A =
|
|
2215
|
+
for (A = I, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > d((a - I) / F)) && q("overflow"), I += Q * F, G = _ <= z ? c : _ >= z + u ? u : _ - z, !(Q < G); _ += i)
|
|
2216
2216
|
Y = i - G, F > d(a / Y) && q("overflow"), F *= Y;
|
|
2217
|
-
C = N.length + 1, z = D(
|
|
2217
|
+
C = N.length + 1, z = D(I - A, C, A == 0), d(I / C) > a - W && q("overflow"), W += d(I / C), I %= C, N.splice(I++, 0, W);
|
|
2218
2218
|
}
|
|
2219
2219
|
return P(N);
|
|
2220
2220
|
}
|
|
2221
2221
|
function Z(R) {
|
|
2222
|
-
var N, U, C,
|
|
2222
|
+
var N, U, C, I, W, z, K, ne, J, A, F, _ = [], Q, G, Y, oe;
|
|
2223
2223
|
for (R = B(R), Q = R.length, N = $, U = 0, W = y, z = 0; z < Q; ++z)
|
|
2224
2224
|
F = R[z], F < 128 && _.push(S(F));
|
|
2225
|
-
for (C =
|
|
2225
|
+
for (C = I = _.length, I && _.push(x); C < Q; ) {
|
|
2226
2226
|
for (K = a, z = 0; z < Q; ++z)
|
|
2227
2227
|
F = R[z], F >= N && F < K && (K = F);
|
|
2228
2228
|
for (G = C + 1, K - N > d((a - U) / G) && q("overflow"), U += (K - N) * G, N = K, z = 0; z < Q; ++z)
|
|
@@ -2231,20 +2231,20 @@ function Hi() {
|
|
|
2231
2231
|
oe = ne - A, Y = i - A, _.push(
|
|
2232
2232
|
S(H(A + oe % Y, 0))
|
|
2233
2233
|
), ne = d(oe / Y);
|
|
2234
|
-
_.push(S(H(ne, 0))), W = D(U, G, C ==
|
|
2234
|
+
_.push(S(H(ne, 0))), W = D(U, G, C == I), U = 0, ++C;
|
|
2235
2235
|
}
|
|
2236
2236
|
++U, ++N;
|
|
2237
2237
|
}
|
|
2238
2238
|
return _.join("");
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2241
|
-
return
|
|
2240
|
+
function k(R) {
|
|
2241
|
+
return E(R, function(N) {
|
|
2242
2242
|
return p.test(N) ? se(N.slice(4).toLowerCase()) : N;
|
|
2243
2243
|
});
|
|
2244
2244
|
}
|
|
2245
2245
|
function re(R) {
|
|
2246
|
-
return
|
|
2247
|
-
return
|
|
2246
|
+
return E(R, function(N) {
|
|
2247
|
+
return g.test(N) ? "xn--" + Z(N) : N;
|
|
2248
2248
|
});
|
|
2249
2249
|
}
|
|
2250
2250
|
if (n = {
|
|
@@ -2268,7 +2268,7 @@ function Hi() {
|
|
|
2268
2268
|
decode: se,
|
|
2269
2269
|
encode: Z,
|
|
2270
2270
|
toASCII: re,
|
|
2271
|
-
toUnicode:
|
|
2271
|
+
toUnicode: k
|
|
2272
2272
|
}, o && s)
|
|
2273
2273
|
if (e.exports == o)
|
|
2274
2274
|
s.exports = n;
|
|
@@ -2277,89 +2277,89 @@ function Hi() {
|
|
|
2277
2277
|
n.hasOwnProperty(b) && (o[b] = n[b]);
|
|
2278
2278
|
else
|
|
2279
2279
|
t.punycode = n;
|
|
2280
|
-
})(
|
|
2281
|
-
}(
|
|
2280
|
+
})(Mi);
|
|
2281
|
+
}(_e, _e.exports)), _e.exports;
|
|
2282
2282
|
}
|
|
2283
|
-
var bt,
|
|
2284
|
-
function
|
|
2285
|
-
return
|
|
2286
|
-
}
|
|
2287
|
-
var xt, on;
|
|
2288
|
-
function Mi() {
|
|
2289
|
-
return on || (on = 1, xt = Error), xt;
|
|
2290
|
-
}
|
|
2291
|
-
var $t, an;
|
|
2292
|
-
function zi() {
|
|
2293
|
-
return an || (an = 1, $t = EvalError), $t;
|
|
2283
|
+
var bt, on;
|
|
2284
|
+
function uo() {
|
|
2285
|
+
return on || (on = 1, bt = Object), bt;
|
|
2294
2286
|
}
|
|
2295
|
-
var
|
|
2287
|
+
var xt, an;
|
|
2296
2288
|
function Gi() {
|
|
2297
|
-
return
|
|
2289
|
+
return an || (an = 1, xt = Error), xt;
|
|
2298
2290
|
}
|
|
2299
|
-
var
|
|
2291
|
+
var $t, sn;
|
|
2300
2292
|
function Wi() {
|
|
2301
|
-
return
|
|
2302
|
-
}
|
|
2303
|
-
var St, cn;
|
|
2304
|
-
function co() {
|
|
2305
|
-
return cn || (cn = 1, St = SyntaxError), St;
|
|
2306
|
-
}
|
|
2307
|
-
var Ot, un;
|
|
2308
|
-
function We() {
|
|
2309
|
-
return un || (un = 1, Ot = TypeError), Ot;
|
|
2293
|
+
return sn || (sn = 1, $t = EvalError), $t;
|
|
2310
2294
|
}
|
|
2311
|
-
var
|
|
2295
|
+
var jt, ln;
|
|
2312
2296
|
function Ji() {
|
|
2313
|
-
return
|
|
2297
|
+
return ln || (ln = 1, jt = RangeError), jt;
|
|
2314
2298
|
}
|
|
2315
|
-
var
|
|
2299
|
+
var wt, cn;
|
|
2316
2300
|
function Vi() {
|
|
2317
|
-
return
|
|
2301
|
+
return cn || (cn = 1, wt = ReferenceError), wt;
|
|
2318
2302
|
}
|
|
2319
|
-
var
|
|
2303
|
+
var St, un;
|
|
2304
|
+
function fo() {
|
|
2305
|
+
return un || (un = 1, St = SyntaxError), St;
|
|
2306
|
+
}
|
|
2307
|
+
var Ot, fn;
|
|
2308
|
+
function We() {
|
|
2309
|
+
return fn || (fn = 1, Ot = TypeError), Ot;
|
|
2310
|
+
}
|
|
2311
|
+
var Tt, pn;
|
|
2320
2312
|
function Di() {
|
|
2321
|
-
return
|
|
2313
|
+
return pn || (pn = 1, Tt = URIError), Tt;
|
|
2322
2314
|
}
|
|
2323
|
-
var
|
|
2315
|
+
var Pt, dn;
|
|
2324
2316
|
function Qi() {
|
|
2325
|
-
return
|
|
2317
|
+
return dn || (dn = 1, Pt = Math.abs), Pt;
|
|
2326
2318
|
}
|
|
2327
|
-
var
|
|
2319
|
+
var Ct, hn;
|
|
2328
2320
|
function Ki() {
|
|
2329
|
-
return
|
|
2321
|
+
return hn || (hn = 1, Ct = Math.floor), Ct;
|
|
2330
2322
|
}
|
|
2331
|
-
var
|
|
2323
|
+
var Rt, yn;
|
|
2332
2324
|
function Yi() {
|
|
2333
|
-
return
|
|
2325
|
+
return yn || (yn = 1, Rt = Math.max), Rt;
|
|
2334
2326
|
}
|
|
2335
|
-
var
|
|
2327
|
+
var qt, mn;
|
|
2336
2328
|
function Xi() {
|
|
2337
|
-
return
|
|
2329
|
+
return mn || (mn = 1, qt = Math.min), qt;
|
|
2338
2330
|
}
|
|
2339
|
-
var
|
|
2331
|
+
var Nt, gn;
|
|
2340
2332
|
function Zi() {
|
|
2341
|
-
return
|
|
2333
|
+
return gn || (gn = 1, Nt = Math.pow), Nt;
|
|
2334
|
+
}
|
|
2335
|
+
var kt, vn;
|
|
2336
|
+
function es() {
|
|
2337
|
+
return vn || (vn = 1, kt = Math.round), kt;
|
|
2338
|
+
}
|
|
2339
|
+
var Et, bn;
|
|
2340
|
+
function ts() {
|
|
2341
|
+
return bn || (bn = 1, Et = Number.isNaN || function(r) {
|
|
2342
2342
|
return r !== r;
|
|
2343
2343
|
}), Et;
|
|
2344
2344
|
}
|
|
2345
|
-
var At,
|
|
2346
|
-
function
|
|
2347
|
-
if (
|
|
2348
|
-
|
|
2349
|
-
var e = /* @__PURE__ */
|
|
2345
|
+
var At, xn;
|
|
2346
|
+
function rs() {
|
|
2347
|
+
if (xn) return At;
|
|
2348
|
+
xn = 1;
|
|
2349
|
+
var e = /* @__PURE__ */ ts();
|
|
2350
2350
|
return At = function(t) {
|
|
2351
2351
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2352
2352
|
}, At;
|
|
2353
2353
|
}
|
|
2354
|
-
var It,
|
|
2355
|
-
function
|
|
2356
|
-
return
|
|
2354
|
+
var It, $n;
|
|
2355
|
+
function ns() {
|
|
2356
|
+
return $n || ($n = 1, It = Object.getOwnPropertyDescriptor), It;
|
|
2357
2357
|
}
|
|
2358
|
-
var Lt,
|
|
2358
|
+
var Lt, jn;
|
|
2359
2359
|
function ot() {
|
|
2360
|
-
if (
|
|
2361
|
-
|
|
2362
|
-
var e = /* @__PURE__ */
|
|
2360
|
+
if (jn) return Lt;
|
|
2361
|
+
jn = 1;
|
|
2362
|
+
var e = /* @__PURE__ */ ns();
|
|
2363
2363
|
if (e)
|
|
2364
2364
|
try {
|
|
2365
2365
|
e([], "length");
|
|
@@ -2368,10 +2368,10 @@ function ot() {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
return Lt = e, Lt;
|
|
2370
2370
|
}
|
|
2371
|
-
var Ut,
|
|
2371
|
+
var Ut, wn;
|
|
2372
2372
|
function at() {
|
|
2373
|
-
if (
|
|
2374
|
-
|
|
2373
|
+
if (wn) return Ut;
|
|
2374
|
+
wn = 1;
|
|
2375
2375
|
var e = Object.defineProperty || !1;
|
|
2376
2376
|
if (e)
|
|
2377
2377
|
try {
|
|
@@ -2381,9 +2381,9 @@ function at() {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
return Ut = e, Ut;
|
|
2383
2383
|
}
|
|
2384
|
-
var Ft,
|
|
2385
|
-
function
|
|
2386
|
-
return
|
|
2384
|
+
var Ft, Sn;
|
|
2385
|
+
function os() {
|
|
2386
|
+
return Sn || (Sn = 1, Ft = function() {
|
|
2387
2387
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2388
2388
|
return !1;
|
|
2389
2389
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2411,30 +2411,30 @@ function rs() {
|
|
|
2411
2411
|
return !0;
|
|
2412
2412
|
}), Ft;
|
|
2413
2413
|
}
|
|
2414
|
-
var _t,
|
|
2415
|
-
function
|
|
2416
|
-
if (
|
|
2417
|
-
|
|
2418
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2414
|
+
var _t, On;
|
|
2415
|
+
function as() {
|
|
2416
|
+
if (On) return _t;
|
|
2417
|
+
On = 1;
|
|
2418
|
+
var e = typeof Symbol < "u" && Symbol, r = os();
|
|
2419
2419
|
return _t = function() {
|
|
2420
2420
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2421
2421
|
}, _t;
|
|
2422
2422
|
}
|
|
2423
|
-
var Bt,
|
|
2424
|
-
function
|
|
2425
|
-
return
|
|
2423
|
+
var Bt, Tn;
|
|
2424
|
+
function po() {
|
|
2425
|
+
return Tn || (Tn = 1, Bt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Bt;
|
|
2426
2426
|
}
|
|
2427
|
-
var Ht,
|
|
2428
|
-
function
|
|
2429
|
-
if (
|
|
2430
|
-
|
|
2431
|
-
var e = /* @__PURE__ */
|
|
2427
|
+
var Ht, Pn;
|
|
2428
|
+
function ho() {
|
|
2429
|
+
if (Pn) return Ht;
|
|
2430
|
+
Pn = 1;
|
|
2431
|
+
var e = /* @__PURE__ */ uo();
|
|
2432
2432
|
return Ht = e.getPrototypeOf || null, Ht;
|
|
2433
2433
|
}
|
|
2434
|
-
var Mt,
|
|
2435
|
-
function
|
|
2436
|
-
if (
|
|
2437
|
-
|
|
2434
|
+
var Mt, Cn;
|
|
2435
|
+
function is() {
|
|
2436
|
+
if (Cn) return Mt;
|
|
2437
|
+
Cn = 1;
|
|
2438
2438
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
|
|
2439
2439
|
for (var u = [], f = 0; f < i.length; f += 1)
|
|
2440
2440
|
u[f] = i[f];
|
|
@@ -2456,11 +2456,11 @@ function os() {
|
|
|
2456
2456
|
throw new TypeError(e + c);
|
|
2457
2457
|
for (var u = l(arguments, 1), f, h = function() {
|
|
2458
2458
|
if (this instanceof f) {
|
|
2459
|
-
var
|
|
2459
|
+
var g = c.apply(
|
|
2460
2460
|
this,
|
|
2461
2461
|
s(u, arguments)
|
|
2462
2462
|
);
|
|
2463
|
-
return Object(
|
|
2463
|
+
return Object(g) === g ? g : this;
|
|
2464
2464
|
}
|
|
2465
2465
|
return c.apply(
|
|
2466
2466
|
i,
|
|
@@ -2476,48 +2476,48 @@ function os() {
|
|
|
2476
2476
|
return f;
|
|
2477
2477
|
}, Mt;
|
|
2478
2478
|
}
|
|
2479
|
-
var zt,
|
|
2479
|
+
var zt, Rn;
|
|
2480
2480
|
function Je() {
|
|
2481
|
-
if (
|
|
2482
|
-
|
|
2483
|
-
var e =
|
|
2481
|
+
if (Rn) return zt;
|
|
2482
|
+
Rn = 1;
|
|
2483
|
+
var e = is();
|
|
2484
2484
|
return zt = Function.prototype.bind || e, zt;
|
|
2485
2485
|
}
|
|
2486
|
-
var Gt,
|
|
2487
|
-
function wr() {
|
|
2488
|
-
return Rn || (Rn = 1, Gt = Function.prototype.call), Gt;
|
|
2489
|
-
}
|
|
2490
|
-
var Wt, qn;
|
|
2486
|
+
var Gt, qn;
|
|
2491
2487
|
function Sr() {
|
|
2492
|
-
return qn || (qn = 1,
|
|
2488
|
+
return qn || (qn = 1, Gt = Function.prototype.call), Gt;
|
|
2493
2489
|
}
|
|
2494
|
-
var
|
|
2495
|
-
function
|
|
2496
|
-
return Nn || (Nn = 1,
|
|
2490
|
+
var Wt, Nn;
|
|
2491
|
+
function Or() {
|
|
2492
|
+
return Nn || (Nn = 1, Wt = Function.prototype.apply), Wt;
|
|
2497
2493
|
}
|
|
2498
|
-
var
|
|
2499
|
-
function
|
|
2500
|
-
|
|
2501
|
-
kn = 1;
|
|
2502
|
-
var e = Je(), r = Sr(), t = wr(), o = as();
|
|
2503
|
-
return Vt = o || e.call(t, r), Vt;
|
|
2494
|
+
var Jt, kn;
|
|
2495
|
+
function ss() {
|
|
2496
|
+
return kn || (kn = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
|
|
2504
2497
|
}
|
|
2505
|
-
var
|
|
2506
|
-
function
|
|
2507
|
-
if (En) return
|
|
2498
|
+
var Vt, En;
|
|
2499
|
+
function yo() {
|
|
2500
|
+
if (En) return Vt;
|
|
2508
2501
|
En = 1;
|
|
2509
|
-
var e = Je(), r =
|
|
2502
|
+
var e = Je(), r = Or(), t = Sr(), o = ss();
|
|
2503
|
+
return Vt = o || e.call(t, r), Vt;
|
|
2504
|
+
}
|
|
2505
|
+
var Dt, An;
|
|
2506
|
+
function mo() {
|
|
2507
|
+
if (An) return Dt;
|
|
2508
|
+
An = 1;
|
|
2509
|
+
var e = Je(), r = /* @__PURE__ */ We(), t = Sr(), o = yo();
|
|
2510
2510
|
return Dt = function(l) {
|
|
2511
2511
|
if (l.length < 1 || typeof l[0] != "function")
|
|
2512
2512
|
throw new r("a function is required");
|
|
2513
2513
|
return o(e, t, l);
|
|
2514
2514
|
}, Dt;
|
|
2515
2515
|
}
|
|
2516
|
-
var Qt,
|
|
2517
|
-
function
|
|
2518
|
-
if (
|
|
2519
|
-
|
|
2520
|
-
var e =
|
|
2516
|
+
var Qt, In;
|
|
2517
|
+
function ls() {
|
|
2518
|
+
if (In) return Qt;
|
|
2519
|
+
In = 1;
|
|
2520
|
+
var e = mo(), r = /* @__PURE__ */ ot(), t;
|
|
2521
2521
|
try {
|
|
2522
2522
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2523
2523
|
[].__proto__ === Array.prototype;
|
|
@@ -2537,11 +2537,11 @@ function is() {
|
|
|
2537
2537
|
}
|
|
2538
2538
|
) : !1, Qt;
|
|
2539
2539
|
}
|
|
2540
|
-
var Kt,
|
|
2541
|
-
function
|
|
2542
|
-
if (
|
|
2543
|
-
|
|
2544
|
-
var e =
|
|
2540
|
+
var Kt, Ln;
|
|
2541
|
+
function cs() {
|
|
2542
|
+
if (Ln) return Kt;
|
|
2543
|
+
Ln = 1;
|
|
2544
|
+
var e = po(), r = ho(), t = /* @__PURE__ */ ls();
|
|
2545
2545
|
return Kt = e ? function(s) {
|
|
2546
2546
|
return e(s);
|
|
2547
2547
|
} : r ? function(s) {
|
|
@@ -2552,18 +2552,18 @@ function ss() {
|
|
|
2552
2552
|
return t(s);
|
|
2553
2553
|
} : null, Kt;
|
|
2554
2554
|
}
|
|
2555
|
-
var Yt,
|
|
2556
|
-
function
|
|
2557
|
-
if (
|
|
2558
|
-
|
|
2555
|
+
var Yt, Un;
|
|
2556
|
+
function us() {
|
|
2557
|
+
if (Un) return Yt;
|
|
2558
|
+
Un = 1;
|
|
2559
2559
|
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
|
|
2560
2560
|
return Yt = t.call(e, r), Yt;
|
|
2561
2561
|
}
|
|
2562
|
-
var Xt,
|
|
2563
|
-
function
|
|
2564
|
-
if (
|
|
2565
|
-
|
|
2566
|
-
var e, r = /* @__PURE__ */
|
|
2562
|
+
var Xt, Fn;
|
|
2563
|
+
function Tr() {
|
|
2564
|
+
if (Fn) return Xt;
|
|
2565
|
+
Fn = 1;
|
|
2566
|
+
var e, r = /* @__PURE__ */ uo(), t = /* @__PURE__ */ Gi(), o = /* @__PURE__ */ Wi(), s = /* @__PURE__ */ Ji(), l = /* @__PURE__ */ Vi(), n = /* @__PURE__ */ fo(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Di(), c = /* @__PURE__ */ Qi(), u = /* @__PURE__ */ Ki(), f = /* @__PURE__ */ Yi(), h = /* @__PURE__ */ Xi(), y = /* @__PURE__ */ Zi(), $ = /* @__PURE__ */ es(), x = /* @__PURE__ */ rs(), p = Function, g = function(J) {
|
|
2567
2567
|
try {
|
|
2568
2568
|
return p('"use strict"; return (' + J + ").constructor;")();
|
|
2569
2569
|
} catch {
|
|
@@ -2580,7 +2580,7 @@ function Or() {
|
|
|
2580
2580
|
return T;
|
|
2581
2581
|
}
|
|
2582
2582
|
}
|
|
2583
|
-
}() : T, S =
|
|
2583
|
+
}() : T, S = as()(), b = cs(), q = ho(), L = po(), E = Or(), B = Sr(), P = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2584
2584
|
__proto__: null,
|
|
2585
2585
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2586
2586
|
"%Array%": Array,
|
|
@@ -2651,7 +2651,7 @@ function Or() {
|
|
|
2651
2651
|
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
|
|
2652
2652
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
|
|
2653
2653
|
"%Function.prototype.call%": B,
|
|
2654
|
-
"%Function.prototype.apply%":
|
|
2654
|
+
"%Function.prototype.apply%": E,
|
|
2655
2655
|
"%Object.defineProperty%": O,
|
|
2656
2656
|
"%Object.getPrototypeOf%": q,
|
|
2657
2657
|
"%Math.abs%": c,
|
|
@@ -2661,7 +2661,7 @@ function Or() {
|
|
|
2661
2661
|
"%Math.pow%": y,
|
|
2662
2662
|
"%Math.round%": $,
|
|
2663
2663
|
"%Math.sign%": x,
|
|
2664
|
-
"%Reflect.getPrototypeOf%":
|
|
2664
|
+
"%Reflect.getPrototypeOf%": L
|
|
2665
2665
|
};
|
|
2666
2666
|
if (b)
|
|
2667
2667
|
try {
|
|
@@ -2673,11 +2673,11 @@ function Or() {
|
|
|
2673
2673
|
var se = function J(A) {
|
|
2674
2674
|
var F;
|
|
2675
2675
|
if (A === "%AsyncFunction%")
|
|
2676
|
-
F =
|
|
2676
|
+
F = g("async function () {}");
|
|
2677
2677
|
else if (A === "%GeneratorFunction%")
|
|
2678
|
-
F =
|
|
2678
|
+
F = g("function* () {}");
|
|
2679
2679
|
else if (A === "%AsyncGeneratorFunction%")
|
|
2680
|
-
F =
|
|
2680
|
+
F = g("async function* () {}");
|
|
2681
2681
|
else if (A === "%AsyncGenerator%") {
|
|
2682
2682
|
var _ = J("%AsyncGeneratorFunction%");
|
|
2683
2683
|
_ && (F = _.prototype);
|
|
@@ -2739,7 +2739,7 @@ function Or() {
|
|
|
2739
2739
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2740
2740
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2741
2741
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2742
|
-
},
|
|
2742
|
+
}, k = Je(), re = /* @__PURE__ */ us(), R = k.call(B, Array.prototype.concat), N = 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) {
|
|
2743
2743
|
var F = C(A, 0, 1), _ = C(A, -1);
|
|
2744
2744
|
if (F === "%" && _ !== "%")
|
|
2745
2745
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -2768,13 +2768,13 @@ function Or() {
|
|
|
2768
2768
|
throw new a("intrinsic name must be a non-empty string");
|
|
2769
2769
|
if (arguments.length > 1 && typeof F != "boolean")
|
|
2770
2770
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2771
|
-
if (
|
|
2771
|
+
if (I(/^%?[^%]*%?$/, A) === null)
|
|
2772
2772
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2773
2773
|
var _ = K(A), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, we = G.alias;
|
|
2774
2774
|
we && (Q = we[0], N(_, R([0, 1], we)));
|
|
2775
|
-
for (var
|
|
2776
|
-
var ye = _[
|
|
2777
|
-
if ((
|
|
2775
|
+
for (var qe = 1, Se = !0; qe < _.length; qe += 1) {
|
|
2776
|
+
var ye = _[qe], Ne = C(ye, 0, 1), ke = C(ye, -1);
|
|
2777
|
+
if ((Ne === '"' || Ne === "'" || Ne === "`" || ke === '"' || ke === "'" || ke === "`") && Ne !== ke)
|
|
2778
2778
|
throw new n("property names with quotes must have matching quotes");
|
|
2779
2779
|
if ((ye === "constructor" || !Se) && (he = !0), Q += "." + ye, Y = "%" + Q + "%", re(H, Y))
|
|
2780
2780
|
oe = H[Y];
|
|
@@ -2784,7 +2784,7 @@ function Or() {
|
|
|
2784
2784
|
throw new a("base intrinsic for " + A + " exists, but the property is not available.");
|
|
2785
2785
|
return;
|
|
2786
2786
|
}
|
|
2787
|
-
if (v &&
|
|
2787
|
+
if (v && qe + 1 >= _.length) {
|
|
2788
2788
|
var Oe = v(oe, ye);
|
|
2789
2789
|
Se = !!Oe, Se && "get" in Oe && !("originalValue" in Oe.get) ? oe = Oe.get : oe = oe[ye];
|
|
2790
2790
|
} else
|
|
@@ -2795,11 +2795,11 @@ function Or() {
|
|
|
2795
2795
|
return oe;
|
|
2796
2796
|
}, Xt;
|
|
2797
2797
|
}
|
|
2798
|
-
var Zt = { exports: {} }, er,
|
|
2799
|
-
function
|
|
2800
|
-
if (
|
|
2801
|
-
|
|
2802
|
-
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */
|
|
2798
|
+
var Zt = { exports: {} }, er, _n;
|
|
2799
|
+
function fs() {
|
|
2800
|
+
if (_n) return er;
|
|
2801
|
+
_n = 1;
|
|
2802
|
+
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ fo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ ot();
|
|
2803
2803
|
return er = function(l, n, a) {
|
|
2804
2804
|
if (!l || typeof l != "object" && typeof l != "function")
|
|
2805
2805
|
throw new t("`obj` must be an object or a function`");
|
|
@@ -2827,10 +2827,10 @@ function cs() {
|
|
|
2827
2827
|
throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2828
2828
|
}, er;
|
|
2829
2829
|
}
|
|
2830
|
-
var tr,
|
|
2831
|
-
function
|
|
2832
|
-
if (
|
|
2833
|
-
|
|
2830
|
+
var tr, Bn;
|
|
2831
|
+
function ps() {
|
|
2832
|
+
if (Bn) return tr;
|
|
2833
|
+
Bn = 1;
|
|
2834
2834
|
var e = /* @__PURE__ */ at(), r = function() {
|
|
2835
2835
|
return !!e;
|
|
2836
2836
|
};
|
|
@@ -2844,11 +2844,11 @@ function us() {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
}, tr = r, tr;
|
|
2846
2846
|
}
|
|
2847
|
-
var rr,
|
|
2848
|
-
function
|
|
2849
|
-
if (
|
|
2850
|
-
|
|
2851
|
-
var e = /* @__PURE__ */
|
|
2847
|
+
var rr, Hn;
|
|
2848
|
+
function ds() {
|
|
2849
|
+
if (Hn) return rr;
|
|
2850
|
+
Hn = 1;
|
|
2851
|
+
var e = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ fs(), t = /* @__PURE__ */ ps()(), o = /* @__PURE__ */ ot(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
|
|
2852
2852
|
return rr = function(a, i) {
|
|
2853
2853
|
if (typeof a != "function")
|
|
2854
2854
|
throw new s("`fn` is not a function");
|
|
@@ -2874,19 +2874,19 @@ function fs() {
|
|
|
2874
2874
|
)), a;
|
|
2875
2875
|
}, rr;
|
|
2876
2876
|
}
|
|
2877
|
-
var nr,
|
|
2878
|
-
function
|
|
2879
|
-
if (
|
|
2880
|
-
|
|
2881
|
-
var e = Je(), r =
|
|
2877
|
+
var nr, Mn;
|
|
2878
|
+
function hs() {
|
|
2879
|
+
if (Mn) return nr;
|
|
2880
|
+
Mn = 1;
|
|
2881
|
+
var e = Je(), r = Or(), t = yo();
|
|
2882
2882
|
return nr = function() {
|
|
2883
2883
|
return t(e, r, arguments);
|
|
2884
2884
|
}, nr;
|
|
2885
2885
|
}
|
|
2886
|
-
var
|
|
2887
|
-
function
|
|
2888
|
-
return
|
|
2889
|
-
var r = /* @__PURE__ */
|
|
2886
|
+
var zn;
|
|
2887
|
+
function ys() {
|
|
2888
|
+
return zn || (zn = 1, function(e) {
|
|
2889
|
+
var r = /* @__PURE__ */ ds(), t = /* @__PURE__ */ at(), o = mo(), s = hs();
|
|
2890
2890
|
e.exports = function(n) {
|
|
2891
2891
|
var a = o(arguments), i = n.length - (arguments.length - 1);
|
|
2892
2892
|
return r(
|
|
@@ -2897,30 +2897,30 @@ function ds() {
|
|
|
2897
2897
|
}, t ? t(e.exports, "apply", { value: s }) : e.exports.apply = s;
|
|
2898
2898
|
}(Zt)), Zt.exports;
|
|
2899
2899
|
}
|
|
2900
|
-
var or,
|
|
2901
|
-
function
|
|
2902
|
-
if (
|
|
2903
|
-
|
|
2904
|
-
var e = /* @__PURE__ */
|
|
2900
|
+
var or, Gn;
|
|
2901
|
+
function ms() {
|
|
2902
|
+
if (Gn) return or;
|
|
2903
|
+
Gn = 1;
|
|
2904
|
+
var e = /* @__PURE__ */ Tr(), r = ys(), t = r(e("String.prototype.indexOf"));
|
|
2905
2905
|
return or = function(s, l) {
|
|
2906
2906
|
var n = e(s, !!l);
|
|
2907
2907
|
return typeof n == "function" && t(s, ".prototype.") > -1 ? r(n) : n;
|
|
2908
2908
|
}, or;
|
|
2909
2909
|
}
|
|
2910
|
-
const
|
|
2911
|
-
var ar,
|
|
2912
|
-
function
|
|
2913
|
-
if (
|
|
2914
|
-
|
|
2915
|
-
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, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, f = u ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, y = h ? WeakRef.prototype.deref : null, $ = Boolean.prototype.valueOf, x = Object.prototype.toString, p = Function.prototype.toString,
|
|
2910
|
+
const gs = /* @__PURE__ */ ma(ga);
|
|
2911
|
+
var ar, Wn;
|
|
2912
|
+
function vs() {
|
|
2913
|
+
if (Wn) return ar;
|
|
2914
|
+
Wn = 1;
|
|
2915
|
+
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, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, f = u ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, y = h ? WeakRef.prototype.deref : null, $ = Boolean.prototype.valueOf, x = Object.prototype.toString, p = Function.prototype.toString, g = String.prototype.match, v = String.prototype.slice, O = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, S = RegExp.prototype.test, b = Array.prototype.concat, q = 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, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
|
|
2916
2916
|
return j.__proto__;
|
|
2917
2917
|
} : null);
|
|
2918
|
-
function
|
|
2918
|
+
function k(j, w) {
|
|
2919
2919
|
if (j === 1 / 0 || j === -1 / 0 || j !== j || j && j > -1e3 && j < 1e3 || S.call(/e/, w))
|
|
2920
2920
|
return w;
|
|
2921
2921
|
var X = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
2922
2922
|
if (typeof j == "number") {
|
|
2923
|
-
var ee = j < 0 ? -
|
|
2923
|
+
var ee = j < 0 ? -E(-j) : E(j);
|
|
2924
2924
|
if (ee !== j) {
|
|
2925
2925
|
var ie = String(ee), M = v.call(w, ie.length + 1);
|
|
2926
2926
|
return O.call(ie, X, "$&_") + "." + O.call(O.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
@@ -2928,7 +2928,7 @@ function ms() {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
return O.call(w, X, "$&_");
|
|
2930
2930
|
}
|
|
2931
|
-
var re =
|
|
2931
|
+
var re = gs, R = re.custom, N = F(R) ? R : null;
|
|
2932
2932
|
ar = function j(w, X, ee, ie) {
|
|
2933
2933
|
var M = X || {};
|
|
2934
2934
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
@@ -2955,47 +2955,47 @@ function ms() {
|
|
|
2955
2955
|
if (w === 0)
|
|
2956
2956
|
return 1 / 0 / w > 0 ? "0" : "-0";
|
|
2957
2957
|
var de = String(w);
|
|
2958
|
-
return Te ?
|
|
2958
|
+
return Te ? k(w, de) : de;
|
|
2959
2959
|
}
|
|
2960
2960
|
if (typeof w == "bigint") {
|
|
2961
2961
|
var je = String(w) + "n";
|
|
2962
|
-
return Te ?
|
|
2962
|
+
return Te ? k(w, je) : je;
|
|
2963
2963
|
}
|
|
2964
2964
|
var lt = typeof M.depth > "u" ? 5 : M.depth;
|
|
2965
2965
|
if (typeof ee > "u" && (ee = 0), ee >= lt && lt > 0 && typeof w == "object")
|
|
2966
|
-
return
|
|
2967
|
-
var
|
|
2966
|
+
return I(w) ? "[Array]" : "[Object]";
|
|
2967
|
+
var Ee = To(M, ee);
|
|
2968
2968
|
if (typeof ie > "u")
|
|
2969
2969
|
ie = [];
|
|
2970
2970
|
else if (he(ie, w) >= 0)
|
|
2971
2971
|
return "[Circular]";
|
|
2972
|
-
function me(
|
|
2973
|
-
if (Qe && (ie =
|
|
2974
|
-
var
|
|
2972
|
+
function me(Ae, Qe, Co) {
|
|
2973
|
+
if (Qe && (ie = L.call(ie), ie.push(Qe)), Co) {
|
|
2974
|
+
var Fr = {
|
|
2975
2975
|
depth: M.depth
|
|
2976
2976
|
};
|
|
2977
|
-
return G(M, "quoteStyle") && (
|
|
2977
|
+
return G(M, "quoteStyle") && (Fr.quoteStyle = M.quoteStyle), j(Ae, Fr, ee + 1, ie);
|
|
2978
2978
|
}
|
|
2979
|
-
return j(
|
|
2979
|
+
return j(Ae, M, ee + 1, ie);
|
|
2980
2980
|
}
|
|
2981
2981
|
if (typeof w == "function" && !z(w)) {
|
|
2982
|
-
var
|
|
2983
|
-
return "[Function" + (
|
|
2982
|
+
var Nr = oe(w), kr = Ve(w, me);
|
|
2983
|
+
return "[Function" + (Nr ? ": " + Nr : " (anonymous)") + "]" + (kr.length > 0 ? " { " + q.call(kr, ", ") + " }" : "");
|
|
2984
2984
|
}
|
|
2985
2985
|
if (F(w)) {
|
|
2986
|
-
var
|
|
2987
|
-
return typeof w == "object" && !H ?
|
|
2986
|
+
var Er = H ? O.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
|
|
2987
|
+
return typeof w == "object" && !H ? Ue(Er) : Er;
|
|
2988
2988
|
}
|
|
2989
|
-
if (
|
|
2990
|
-
for (var
|
|
2991
|
-
|
|
2992
|
-
return
|
|
2989
|
+
if (ke(w)) {
|
|
2990
|
+
for (var Fe = "<" + d.call(String(w.nodeName)), ct = w.attributes || [], De = 0; De < ct.length; De++)
|
|
2991
|
+
Fe += " " + ct[De].name + "=" + U(C(ct[De].value), "double", M);
|
|
2992
|
+
return Fe += ">", w.childNodes && w.childNodes.length && (Fe += "..."), Fe += "</" + d.call(String(w.nodeName)) + ">", Fe;
|
|
2993
2993
|
}
|
|
2994
|
-
if (
|
|
2994
|
+
if (I(w)) {
|
|
2995
2995
|
if (w.length === 0)
|
|
2996
2996
|
return "[]";
|
|
2997
2997
|
var ut = Ve(w, me);
|
|
2998
|
-
return
|
|
2998
|
+
return Ee && !Oo(ut) ? "[" + st(ut, Ee) + "]" : "[ " + q.call(ut, ", ") + " ]";
|
|
2999
2999
|
}
|
|
3000
3000
|
if (K(w)) {
|
|
3001
3001
|
var ft = Ve(w, me);
|
|
@@ -3008,38 +3008,38 @@ function ms() {
|
|
|
3008
3008
|
return w.inspect();
|
|
3009
3009
|
}
|
|
3010
3010
|
if (we(w)) {
|
|
3011
|
-
var
|
|
3012
|
-
return o && o.call(w, function(
|
|
3013
|
-
|
|
3014
|
-
}),
|
|
3011
|
+
var Ar = [];
|
|
3012
|
+
return o && o.call(w, function(Ae, Qe) {
|
|
3013
|
+
Ar.push(me(Qe, w, !0) + " => " + me(Ae, w));
|
|
3014
|
+
}), qr("Map", t.call(w), Ar, Ee);
|
|
3015
3015
|
}
|
|
3016
3016
|
if (ye(w)) {
|
|
3017
|
-
var
|
|
3018
|
-
return a && a.call(w, function(
|
|
3019
|
-
|
|
3020
|
-
}),
|
|
3017
|
+
var Ir = [];
|
|
3018
|
+
return a && a.call(w, function(Ae) {
|
|
3019
|
+
Ir.push(me(Ae, w));
|
|
3020
|
+
}), qr("Set", n.call(w), Ir, Ee);
|
|
3021
3021
|
}
|
|
3022
|
-
if (Re(w))
|
|
3023
|
-
return it("WeakMap");
|
|
3024
3022
|
if (qe(w))
|
|
3023
|
+
return it("WeakMap");
|
|
3024
|
+
if (Ne(w))
|
|
3025
3025
|
return it("WeakSet");
|
|
3026
3026
|
if (Se(w))
|
|
3027
3027
|
return it("WeakRef");
|
|
3028
3028
|
if (J(w))
|
|
3029
|
-
return
|
|
3029
|
+
return Ue(me(Number(w)));
|
|
3030
3030
|
if (_(w))
|
|
3031
|
-
return
|
|
3031
|
+
return Ue(me(B.call(w)));
|
|
3032
3032
|
if (A(w))
|
|
3033
|
-
return
|
|
3033
|
+
return Ue($.call(w));
|
|
3034
3034
|
if (ne(w))
|
|
3035
|
-
return
|
|
3035
|
+
return Ue(me(String(w)));
|
|
3036
3036
|
if (typeof window < "u" && w === window)
|
|
3037
3037
|
return "{ [object Window] }";
|
|
3038
3038
|
if (typeof globalThis < "u" && w === globalThis || typeof Ze < "u" && w === Ze)
|
|
3039
3039
|
return "{ [object globalThis] }";
|
|
3040
3040
|
if (!W(w) && !z(w)) {
|
|
3041
|
-
var pt = Ve(w, me),
|
|
3042
|
-
return pt.length === 0 ? ht + "{}" :
|
|
3041
|
+
var pt = Ve(w, me), Lr = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, dt = w instanceof Object ? "" : "null prototype", Ur = !Lr && D && Object(w) === w && D in w ? v.call(Y(w), 8, -1) : dt ? "Object" : "", Po = Lr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", ht = Po + (Ur || dt ? "[" + q.call(b.call([], Ur || [], dt || []), ": ") + "] " : "");
|
|
3042
|
+
return pt.length === 0 ? ht + "{}" : Ee ? ht + "{" + st(pt, Ee) + "}" : ht + "{ " + q.call(pt, ", ") + " }";
|
|
3043
3043
|
}
|
|
3044
3044
|
return String(w);
|
|
3045
3045
|
};
|
|
@@ -3050,7 +3050,7 @@ function ms() {
|
|
|
3050
3050
|
function C(j) {
|
|
3051
3051
|
return O.call(String(j), /"/g, """);
|
|
3052
3052
|
}
|
|
3053
|
-
function
|
|
3053
|
+
function I(j) {
|
|
3054
3054
|
return Y(j) === "[object Array]" && (!D || !(typeof j == "object" && D in j));
|
|
3055
3055
|
}
|
|
3056
3056
|
function W(j) {
|
|
@@ -3105,7 +3105,7 @@ function ms() {
|
|
|
3105
3105
|
function oe(j) {
|
|
3106
3106
|
if (j.name)
|
|
3107
3107
|
return j.name;
|
|
3108
|
-
var w =
|
|
3108
|
+
var w = g.call(p.call(j), /^function\s*([\w$]+)/);
|
|
3109
3109
|
return w ? w[1] : null;
|
|
3110
3110
|
}
|
|
3111
3111
|
function he(j, w) {
|
|
@@ -3131,7 +3131,7 @@ function ms() {
|
|
|
3131
3131
|
}
|
|
3132
3132
|
return !1;
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3134
|
+
function qe(j) {
|
|
3135
3135
|
if (!c || !j || typeof j != "object")
|
|
3136
3136
|
return !1;
|
|
3137
3137
|
try {
|
|
@@ -3170,7 +3170,7 @@ function ms() {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
return !1;
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3173
|
+
function Ne(j) {
|
|
3174
3174
|
if (!f || !j || typeof j != "object")
|
|
3175
3175
|
return !1;
|
|
3176
3176
|
try {
|
|
@@ -3185,7 +3185,7 @@ function ms() {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
return !1;
|
|
3187
3187
|
}
|
|
3188
|
-
function
|
|
3188
|
+
function ke(j) {
|
|
3189
3189
|
return !j || typeof j != "object" ? !1 : typeof HTMLElement < "u" && j instanceof HTMLElement ? !0 : typeof j.nodeName == "string" && typeof j.getAttribute == "function";
|
|
3190
3190
|
}
|
|
3191
3191
|
function Oe(j, w) {
|
|
@@ -3193,10 +3193,10 @@ function ms() {
|
|
|
3193
3193
|
var X = j.length - w.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3194
3194
|
return Oe(v.call(j, 0, w.maxStringLength), w) + ee;
|
|
3195
3195
|
}
|
|
3196
|
-
var ie = O.call(O.call(j, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
3196
|
+
var ie = O.call(O.call(j, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, So);
|
|
3197
3197
|
return U(ie, "single", w);
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function So(j) {
|
|
3200
3200
|
var w = j.charCodeAt(0), X = {
|
|
3201
3201
|
8: "b",
|
|
3202
3202
|
9: "t",
|
|
@@ -3206,24 +3206,24 @@ function ms() {
|
|
|
3206
3206
|
}[w];
|
|
3207
3207
|
return X ? "\\" + X : "\\x" + (w < 16 ? "0" : "") + T.call(w.toString(16));
|
|
3208
3208
|
}
|
|
3209
|
-
function
|
|
3209
|
+
function Ue(j) {
|
|
3210
3210
|
return "Object(" + j + ")";
|
|
3211
3211
|
}
|
|
3212
3212
|
function it(j) {
|
|
3213
3213
|
return j + " { ? }";
|
|
3214
3214
|
}
|
|
3215
|
-
function
|
|
3215
|
+
function qr(j, w, X, ee) {
|
|
3216
3216
|
var ie = ee ? st(X, ee) : q.call(X, ", ");
|
|
3217
3217
|
return j + " (" + w + ") {" + ie + "}";
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function Oo(j) {
|
|
3220
3220
|
for (var w = 0; w < j.length; w++)
|
|
3221
3221
|
if (he(j[w], `
|
|
3222
3222
|
`) >= 0)
|
|
3223
3223
|
return !1;
|
|
3224
3224
|
return !0;
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function To(j, w) {
|
|
3227
3227
|
var X;
|
|
3228
3228
|
if (j.indent === " ")
|
|
3229
3229
|
X = " ";
|
|
@@ -3245,7 +3245,7 @@ function ms() {
|
|
|
3245
3245
|
` + w.prev;
|
|
3246
3246
|
}
|
|
3247
3247
|
function Ve(j, w) {
|
|
3248
|
-
var X =
|
|
3248
|
+
var X = I(j), ee = [];
|
|
3249
3249
|
if (X) {
|
|
3250
3250
|
ee.length = j.length;
|
|
3251
3251
|
for (var ie = 0; ie < j.length; ie++)
|
|
@@ -3266,40 +3266,40 @@ function ms() {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
return ar;
|
|
3268
3268
|
}
|
|
3269
|
-
var ir,
|
|
3270
|
-
function
|
|
3271
|
-
if (
|
|
3272
|
-
|
|
3273
|
-
var e = /* @__PURE__ */
|
|
3269
|
+
var ir, Jn;
|
|
3270
|
+
function bs() {
|
|
3271
|
+
if (Jn) return ir;
|
|
3272
|
+
Jn = 1;
|
|
3273
|
+
var e = /* @__PURE__ */ Tr(), r = ms(), t = /* @__PURE__ */ vs(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), i = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), u = r("Map.prototype.set", !0), f = r("Map.prototype.has", !0), h = function(p, g) {
|
|
3274
3274
|
for (var v = p, O; (O = v.next) !== null; v = O)
|
|
3275
|
-
if (O.key ===
|
|
3275
|
+
if (O.key === g)
|
|
3276
3276
|
return v.next = O.next, O.next = /** @type {NonNullable<typeof list.next>} */
|
|
3277
3277
|
p.next, p.next = O, O;
|
|
3278
|
-
}, y = function(p,
|
|
3279
|
-
var v = h(p,
|
|
3278
|
+
}, y = function(p, g) {
|
|
3279
|
+
var v = h(p, g);
|
|
3280
3280
|
return v && v.value;
|
|
3281
|
-
}, $ = function(p,
|
|
3282
|
-
var O = h(p,
|
|
3281
|
+
}, $ = function(p, g, v) {
|
|
3282
|
+
var O = h(p, g);
|
|
3283
3283
|
O ? O.value = v : p.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3284
3284
|
{
|
|
3285
3285
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
3286
|
-
key:
|
|
3286
|
+
key: g,
|
|
3287
3287
|
next: p.next,
|
|
3288
3288
|
value: v
|
|
3289
3289
|
};
|
|
3290
|
-
}, x = function(p,
|
|
3291
|
-
return !!h(p,
|
|
3290
|
+
}, x = function(p, g) {
|
|
3291
|
+
return !!h(p, g);
|
|
3292
3292
|
};
|
|
3293
3293
|
return ir = function() {
|
|
3294
|
-
var
|
|
3294
|
+
var g, v, O, T = {
|
|
3295
3295
|
assert: function(d) {
|
|
3296
3296
|
if (!T.has(d))
|
|
3297
3297
|
throw new o("Side channel does not contain " + t(d));
|
|
3298
3298
|
},
|
|
3299
3299
|
get: function(d) {
|
|
3300
3300
|
if (s && d && (typeof d == "object" || typeof d == "function")) {
|
|
3301
|
-
if (
|
|
3302
|
-
return n(
|
|
3301
|
+
if (g)
|
|
3302
|
+
return n(g, d);
|
|
3303
3303
|
} else if (l) {
|
|
3304
3304
|
if (v)
|
|
3305
3305
|
return c(v, d);
|
|
@@ -3308,8 +3308,8 @@ function gs() {
|
|
|
3308
3308
|
},
|
|
3309
3309
|
has: function(d) {
|
|
3310
3310
|
if (s && d && (typeof d == "object" || typeof d == "function")) {
|
|
3311
|
-
if (
|
|
3312
|
-
return i(
|
|
3311
|
+
if (g)
|
|
3312
|
+
return i(g, d);
|
|
3313
3313
|
} else if (l) {
|
|
3314
3314
|
if (v)
|
|
3315
3315
|
return f(v, d);
|
|
@@ -3318,16 +3318,16 @@ function gs() {
|
|
|
3318
3318
|
return !1;
|
|
3319
3319
|
},
|
|
3320
3320
|
set: function(d, S) {
|
|
3321
|
-
s && d && (typeof d == "object" || typeof d == "function") ? (
|
|
3321
|
+
s && d && (typeof d == "object" || typeof d == "function") ? (g || (g = new s()), a(g, d, S)) : l ? (v || (v = new l()), u(v, d, S)) : (O || (O = { key: {}, next: null }), $(O, d, S));
|
|
3322
3322
|
}
|
|
3323
3323
|
};
|
|
3324
3324
|
return T;
|
|
3325
3325
|
}, ir;
|
|
3326
3326
|
}
|
|
3327
|
-
var sr,
|
|
3328
|
-
function
|
|
3329
|
-
if (
|
|
3330
|
-
|
|
3327
|
+
var sr, Vn;
|
|
3328
|
+
function Pr() {
|
|
3329
|
+
if (Vn) return sr;
|
|
3330
|
+
Vn = 1;
|
|
3331
3331
|
var e = String.prototype.replace, r = /%20/g, t = {
|
|
3332
3332
|
RFC1738: "RFC1738",
|
|
3333
3333
|
RFC3986: "RFC3986"
|
|
@@ -3346,57 +3346,57 @@ function Tr() {
|
|
|
3346
3346
|
RFC3986: t.RFC3986
|
|
3347
3347
|
}, sr;
|
|
3348
3348
|
}
|
|
3349
|
-
var lr,
|
|
3350
|
-
function
|
|
3351
|
-
if (
|
|
3352
|
-
|
|
3353
|
-
var e = /* @__PURE__ */
|
|
3354
|
-
for (var p = [],
|
|
3355
|
-
p.push("%" + ((
|
|
3349
|
+
var lr, Dn;
|
|
3350
|
+
function go() {
|
|
3351
|
+
if (Dn) return lr;
|
|
3352
|
+
Dn = 1;
|
|
3353
|
+
var e = /* @__PURE__ */ Pr(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
|
|
3354
|
+
for (var p = [], g = 0; g < 256; ++g)
|
|
3355
|
+
p.push("%" + ((g < 16 ? "0" : "") + g.toString(16)).toUpperCase());
|
|
3356
3356
|
return p;
|
|
3357
|
-
}(), s = function(
|
|
3358
|
-
for (;
|
|
3359
|
-
var v =
|
|
3357
|
+
}(), s = function(g) {
|
|
3358
|
+
for (; g.length > 1; ) {
|
|
3359
|
+
var v = g.pop(), O = v.obj[v.prop];
|
|
3360
3360
|
if (t(O)) {
|
|
3361
3361
|
for (var T = [], d = 0; d < O.length; ++d)
|
|
3362
3362
|
typeof O[d] < "u" && T.push(O[d]);
|
|
3363
3363
|
v.obj[v.prop] = T;
|
|
3364
3364
|
}
|
|
3365
3365
|
}
|
|
3366
|
-
}, l = function(
|
|
3367
|
-
for (var O = v && v.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T <
|
|
3368
|
-
typeof
|
|
3366
|
+
}, l = function(g, v) {
|
|
3367
|
+
for (var O = v && v.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < g.length; ++T)
|
|
3368
|
+
typeof g[T] < "u" && (O[T] = g[T]);
|
|
3369
3369
|
return O;
|
|
3370
|
-
}, n = function p(
|
|
3370
|
+
}, n = function p(g, v, O) {
|
|
3371
3371
|
if (!v)
|
|
3372
|
-
return
|
|
3372
|
+
return g;
|
|
3373
3373
|
if (typeof v != "object") {
|
|
3374
|
-
if (t(
|
|
3375
|
-
|
|
3376
|
-
else if (
|
|
3377
|
-
(O && (O.plainObjects || O.allowPrototypes) || !r.call(Object.prototype, v)) && (
|
|
3374
|
+
if (t(g))
|
|
3375
|
+
g.push(v);
|
|
3376
|
+
else if (g && typeof g == "object")
|
|
3377
|
+
(O && (O.plainObjects || O.allowPrototypes) || !r.call(Object.prototype, v)) && (g[v] = !0);
|
|
3378
3378
|
else
|
|
3379
|
-
return [
|
|
3380
|
-
return
|
|
3379
|
+
return [g, v];
|
|
3380
|
+
return g;
|
|
3381
3381
|
}
|
|
3382
|
-
if (!
|
|
3383
|
-
return [
|
|
3384
|
-
var T =
|
|
3385
|
-
return t(
|
|
3386
|
-
if (r.call(
|
|
3387
|
-
var b =
|
|
3388
|
-
b && typeof b == "object" && d && typeof d == "object" ?
|
|
3382
|
+
if (!g || typeof g != "object")
|
|
3383
|
+
return [g].concat(v);
|
|
3384
|
+
var T = g;
|
|
3385
|
+
return t(g) && !t(v) && (T = l(g, O)), t(g) && t(v) ? (v.forEach(function(d, S) {
|
|
3386
|
+
if (r.call(g, S)) {
|
|
3387
|
+
var b = g[S];
|
|
3388
|
+
b && typeof b == "object" && d && typeof d == "object" ? g[S] = p(b, d, O) : g.push(d);
|
|
3389
3389
|
} else
|
|
3390
|
-
|
|
3391
|
-
}),
|
|
3390
|
+
g[S] = d;
|
|
3391
|
+
}), g) : Object.keys(v).reduce(function(d, S) {
|
|
3392
3392
|
var b = v[S];
|
|
3393
3393
|
return r.call(d, S) ? d[S] = p(d[S], b, O) : d[S] = b, d;
|
|
3394
3394
|
}, T);
|
|
3395
|
-
}, a = function(
|
|
3395
|
+
}, a = function(g, v) {
|
|
3396
3396
|
return Object.keys(v).reduce(function(O, T) {
|
|
3397
3397
|
return O[T] = v[T], O;
|
|
3398
|
-
},
|
|
3399
|
-
}, i = function(p,
|
|
3398
|
+
}, g);
|
|
3399
|
+
}, i = function(p, g, v) {
|
|
3400
3400
|
var O = p.replace(/\+/g, " ");
|
|
3401
3401
|
if (v === "iso-8859-1")
|
|
3402
3402
|
return O.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -3405,58 +3405,58 @@ function yo() {
|
|
|
3405
3405
|
} catch {
|
|
3406
3406
|
return O;
|
|
3407
3407
|
}
|
|
3408
|
-
}, c = 1024, u = function(
|
|
3409
|
-
if (
|
|
3410
|
-
return
|
|
3411
|
-
var S =
|
|
3412
|
-
if (typeof
|
|
3408
|
+
}, c = 1024, u = function(g, v, O, T, d) {
|
|
3409
|
+
if (g.length === 0)
|
|
3410
|
+
return g;
|
|
3411
|
+
var S = g;
|
|
3412
|
+
if (typeof g == "symbol" ? S = Symbol.prototype.toString.call(g) : typeof g != "string" && (S = String(g)), O === "iso-8859-1")
|
|
3413
3413
|
return escape(S).replace(/%u[0-9a-f]{4}/gi, function(ae) {
|
|
3414
3414
|
return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
|
|
3415
3415
|
});
|
|
3416
3416
|
for (var b = "", q = 0; q < S.length; q += c) {
|
|
3417
|
-
for (var
|
|
3418
|
-
var P =
|
|
3417
|
+
for (var L = S.length >= c ? S.slice(q, q + c) : S, E = [], B = 0; B < L.length; ++B) {
|
|
3418
|
+
var P = L.charCodeAt(B);
|
|
3419
3419
|
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || d === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3420
|
-
|
|
3420
|
+
E[E.length] = L.charAt(B);
|
|
3421
3421
|
continue;
|
|
3422
3422
|
}
|
|
3423
3423
|
if (P < 128) {
|
|
3424
|
-
|
|
3424
|
+
E[E.length] = o[P];
|
|
3425
3425
|
continue;
|
|
3426
3426
|
}
|
|
3427
3427
|
if (P < 2048) {
|
|
3428
|
-
|
|
3428
|
+
E[E.length] = o[192 | P >> 6] + o[128 | P & 63];
|
|
3429
3429
|
continue;
|
|
3430
3430
|
}
|
|
3431
3431
|
if (P < 55296 || P >= 57344) {
|
|
3432
|
-
|
|
3432
|
+
E[E.length] = o[224 | P >> 12] + o[128 | P >> 6 & 63] + o[128 | P & 63];
|
|
3433
3433
|
continue;
|
|
3434
3434
|
}
|
|
3435
|
-
B += 1, P = 65536 + ((P & 1023) << 10 |
|
|
3435
|
+
B += 1, P = 65536 + ((P & 1023) << 10 | L.charCodeAt(B) & 1023), E[E.length] = o[240 | P >> 18] + o[128 | P >> 12 & 63] + o[128 | P >> 6 & 63] + o[128 | P & 63];
|
|
3436
3436
|
}
|
|
3437
|
-
b +=
|
|
3437
|
+
b += E.join("");
|
|
3438
3438
|
}
|
|
3439
3439
|
return b;
|
|
3440
|
-
}, f = function(
|
|
3441
|
-
for (var v = [{ obj: { o:
|
|
3440
|
+
}, f = function(g) {
|
|
3441
|
+
for (var v = [{ obj: { o: g }, prop: "o" }], O = [], T = 0; T < v.length; ++T)
|
|
3442
3442
|
for (var d = v[T], S = d.obj[d.prop], b = Object.keys(S), q = 0; q < b.length; ++q) {
|
|
3443
|
-
var
|
|
3444
|
-
typeof
|
|
3443
|
+
var L = b[q], E = S[L];
|
|
3444
|
+
typeof E == "object" && E !== null && O.indexOf(E) === -1 && (v.push({ obj: S, prop: L }), O.push(E));
|
|
3445
3445
|
}
|
|
3446
|
-
return s(v),
|
|
3447
|
-
}, h = function(
|
|
3448
|
-
return Object.prototype.toString.call(
|
|
3449
|
-
}, y = function(
|
|
3450
|
-
return !
|
|
3451
|
-
}, $ = function(
|
|
3452
|
-
return [].concat(
|
|
3453
|
-
}, x = function(
|
|
3454
|
-
if (t(
|
|
3455
|
-
for (var O = [], T = 0; T <
|
|
3456
|
-
O.push(v(
|
|
3446
|
+
return s(v), g;
|
|
3447
|
+
}, h = function(g) {
|
|
3448
|
+
return Object.prototype.toString.call(g) === "[object RegExp]";
|
|
3449
|
+
}, y = function(g) {
|
|
3450
|
+
return !g || typeof g != "object" ? !1 : !!(g.constructor && g.constructor.isBuffer && g.constructor.isBuffer(g));
|
|
3451
|
+
}, $ = function(g, v) {
|
|
3452
|
+
return [].concat(g, v);
|
|
3453
|
+
}, x = function(g, v) {
|
|
3454
|
+
if (t(g)) {
|
|
3455
|
+
for (var O = [], T = 0; T < g.length; T += 1)
|
|
3456
|
+
O.push(v(g[T]));
|
|
3457
3457
|
return O;
|
|
3458
3458
|
}
|
|
3459
|
-
return v(
|
|
3459
|
+
return v(g);
|
|
3460
3460
|
};
|
|
3461
3461
|
return lr = {
|
|
3462
3462
|
arrayToObject: l,
|
|
@@ -3471,17 +3471,17 @@ function yo() {
|
|
|
3471
3471
|
merge: n
|
|
3472
3472
|
}, lr;
|
|
3473
3473
|
}
|
|
3474
|
-
var cr,
|
|
3475
|
-
function
|
|
3476
|
-
if (
|
|
3477
|
-
|
|
3478
|
-
var e =
|
|
3474
|
+
var cr, Qn;
|
|
3475
|
+
function xs() {
|
|
3476
|
+
if (Qn) return cr;
|
|
3477
|
+
Qn = 1;
|
|
3478
|
+
var e = bs(), r = /* @__PURE__ */ go(), t = /* @__PURE__ */ Pr(), o = Object.prototype.hasOwnProperty, s = {
|
|
3479
3479
|
brackets: function(p) {
|
|
3480
3480
|
return p + "[]";
|
|
3481
3481
|
},
|
|
3482
3482
|
comma: "comma",
|
|
3483
|
-
indices: function(p,
|
|
3484
|
-
return p + "[" +
|
|
3483
|
+
indices: function(p, g) {
|
|
3484
|
+
return p + "[" + g + "]";
|
|
3485
3485
|
},
|
|
3486
3486
|
repeat: function(p) {
|
|
3487
3487
|
return p;
|
|
@@ -3511,8 +3511,8 @@ function vs() {
|
|
|
3511
3511
|
strictNullHandling: !1
|
|
3512
3512
|
}, f = function(p) {
|
|
3513
3513
|
return typeof p == "string" || typeof p == "number" || typeof p == "boolean" || typeof p == "symbol" || typeof p == "bigint";
|
|
3514
|
-
}, h = {}, y = function x(p,
|
|
3515
|
-
for (var
|
|
3514
|
+
}, h = {}, y = function x(p, g, v, O, T, d, S, b, q, L, E, B, P, ae, H, D, se, Z) {
|
|
3515
|
+
for (var k = p, re = Z, R = 0, N = !1; (re = re.get(h)) !== void 0 && !N; ) {
|
|
3516
3516
|
var U = re.get(p);
|
|
3517
3517
|
if (R += 1, typeof U < "u") {
|
|
3518
3518
|
if (U === R)
|
|
@@ -3521,42 +3521,42 @@ function vs() {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
typeof re.get(h) > "u" && (R = 0);
|
|
3523
3523
|
}
|
|
3524
|
-
if (typeof
|
|
3524
|
+
if (typeof L == "function" ? k = L(g, k) : k instanceof Date ? k = P(k) : v === "comma" && l(k) && (k = r.maybeMap(k, function(Y) {
|
|
3525
3525
|
return Y instanceof Date ? P(Y) : Y;
|
|
3526
|
-
})),
|
|
3526
|
+
})), k === null) {
|
|
3527
3527
|
if (d)
|
|
3528
|
-
return q && !D ? q(
|
|
3529
|
-
|
|
3528
|
+
return q && !D ? q(g, u.encoder, se, "key", ae) : g;
|
|
3529
|
+
k = "";
|
|
3530
3530
|
}
|
|
3531
|
-
if (f(
|
|
3531
|
+
if (f(k) || r.isBuffer(k)) {
|
|
3532
3532
|
if (q) {
|
|
3533
|
-
var C = D ?
|
|
3534
|
-
return [H(C) + "=" + H(q(
|
|
3533
|
+
var C = D ? g : q(g, u.encoder, se, "key", ae);
|
|
3534
|
+
return [H(C) + "=" + H(q(k, u.encoder, se, "value", ae))];
|
|
3535
3535
|
}
|
|
3536
|
-
return [H(
|
|
3536
|
+
return [H(g) + "=" + H(String(k))];
|
|
3537
3537
|
}
|
|
3538
|
-
var
|
|
3539
|
-
if (typeof
|
|
3540
|
-
return
|
|
3538
|
+
var I = [];
|
|
3539
|
+
if (typeof k > "u")
|
|
3540
|
+
return I;
|
|
3541
3541
|
var W;
|
|
3542
|
-
if (v === "comma" && l(
|
|
3543
|
-
D && q && (
|
|
3544
|
-
else if (l(
|
|
3545
|
-
W =
|
|
3542
|
+
if (v === "comma" && l(k))
|
|
3543
|
+
D && q && (k = r.maybeMap(k, q)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
|
|
3544
|
+
else if (l(L))
|
|
3545
|
+
W = L;
|
|
3546
3546
|
else {
|
|
3547
|
-
var z = Object.keys(
|
|
3548
|
-
W =
|
|
3547
|
+
var z = Object.keys(k);
|
|
3548
|
+
W = E ? z.sort(E) : z;
|
|
3549
3549
|
}
|
|
3550
|
-
var K = b ?
|
|
3551
|
-
if (T && l(
|
|
3550
|
+
var K = b ? g.replace(/\./g, "%2E") : g, ne = O && l(k) && k.length === 1 ? K + "[]" : K;
|
|
3551
|
+
if (T && l(k) && k.length === 0)
|
|
3552
3552
|
return ne + "[]";
|
|
3553
3553
|
for (var J = 0; J < W.length; ++J) {
|
|
3554
|
-
var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value :
|
|
3554
|
+
var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value : k[A];
|
|
3555
3555
|
if (!(S && F === null)) {
|
|
3556
|
-
var _ = B && b ? A.replace(/\./g, "%2E") : A, Q = l(
|
|
3556
|
+
var _ = B && b ? A.replace(/\./g, "%2E") : A, Q = l(k) ? typeof v == "function" ? v(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
|
|
3557
3557
|
Z.set(p, R);
|
|
3558
3558
|
var G = e();
|
|
3559
|
-
G.set(h, Z), a(
|
|
3559
|
+
G.set(h, Z), a(I, x(
|
|
3560
3560
|
F,
|
|
3561
3561
|
Q,
|
|
3562
3562
|
v,
|
|
@@ -3565,9 +3565,9 @@ function vs() {
|
|
|
3565
3565
|
d,
|
|
3566
3566
|
S,
|
|
3567
3567
|
b,
|
|
3568
|
-
v === "comma" && D && l(
|
|
3569
|
-
|
|
3570
|
-
|
|
3568
|
+
v === "comma" && D && l(k) ? null : q,
|
|
3569
|
+
L,
|
|
3570
|
+
E,
|
|
3571
3571
|
B,
|
|
3572
3572
|
P,
|
|
3573
3573
|
ae,
|
|
@@ -3578,7 +3578,7 @@ function vs() {
|
|
|
3578
3578
|
));
|
|
3579
3579
|
}
|
|
3580
3580
|
}
|
|
3581
|
-
return
|
|
3581
|
+
return I;
|
|
3582
3582
|
}, $ = function(p) {
|
|
3583
3583
|
if (!p)
|
|
3584
3584
|
return u;
|
|
@@ -3588,7 +3588,7 @@ function vs() {
|
|
|
3588
3588
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3589
3589
|
if (p.encoder !== null && typeof p.encoder < "u" && typeof p.encoder != "function")
|
|
3590
3590
|
throw new TypeError("Encoder has to be a function.");
|
|
3591
|
-
var
|
|
3591
|
+
var g = p.charset || u.charset;
|
|
3592
3592
|
if (typeof p.charset < "u" && p.charset !== "utf-8" && p.charset !== "iso-8859-1")
|
|
3593
3593
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3594
3594
|
var v = t.default;
|
|
@@ -3608,7 +3608,7 @@ function vs() {
|
|
|
3608
3608
|
allowDots: S,
|
|
3609
3609
|
allowEmptyArrays: typeof p.allowEmptyArrays == "boolean" ? !!p.allowEmptyArrays : u.allowEmptyArrays,
|
|
3610
3610
|
arrayFormat: d,
|
|
3611
|
-
charset:
|
|
3611
|
+
charset: g,
|
|
3612
3612
|
charsetSentinel: typeof p.charsetSentinel == "boolean" ? p.charsetSentinel : u.charsetSentinel,
|
|
3613
3613
|
commaRoundTrip: p.commaRoundTrip,
|
|
3614
3614
|
delimiter: typeof p.delimiter > "u" ? u.delimiter : p.delimiter,
|
|
@@ -3626,18 +3626,18 @@ function vs() {
|
|
|
3626
3626
|
};
|
|
3627
3627
|
};
|
|
3628
3628
|
return cr = function(x, p) {
|
|
3629
|
-
var
|
|
3630
|
-
typeof v.filter == "function" ? (T = v.filter,
|
|
3629
|
+
var g = x, v = $(p), O, T;
|
|
3630
|
+
typeof v.filter == "function" ? (T = v.filter, g = T("", g)) : l(v.filter) && (T = v.filter, O = T);
|
|
3631
3631
|
var d = [];
|
|
3632
|
-
if (typeof
|
|
3632
|
+
if (typeof g != "object" || g === null)
|
|
3633
3633
|
return "";
|
|
3634
3634
|
var S = s[v.arrayFormat], b = S === "comma" && v.commaRoundTrip;
|
|
3635
|
-
O || (O = Object.keys(
|
|
3636
|
-
for (var q = e(),
|
|
3637
|
-
var
|
|
3638
|
-
v.skipNulls &&
|
|
3639
|
-
|
|
3640
|
-
|
|
3635
|
+
O || (O = Object.keys(g)), v.sort && O.sort(v.sort);
|
|
3636
|
+
for (var q = e(), L = 0; L < O.length; ++L) {
|
|
3637
|
+
var E = O[L];
|
|
3638
|
+
v.skipNulls && g[E] === null || a(d, y(
|
|
3639
|
+
g[E],
|
|
3640
|
+
E,
|
|
3641
3641
|
S,
|
|
3642
3642
|
b,
|
|
3643
3643
|
v.allowEmptyArrays,
|
|
@@ -3660,11 +3660,11 @@ function vs() {
|
|
|
3660
3660
|
return v.charsetSentinel && (v.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), B.length > 0 ? P + B : "";
|
|
3661
3661
|
}, cr;
|
|
3662
3662
|
}
|
|
3663
|
-
var ur,
|
|
3664
|
-
function
|
|
3665
|
-
if (
|
|
3666
|
-
|
|
3667
|
-
var e = /* @__PURE__ */
|
|
3663
|
+
var ur, Kn;
|
|
3664
|
+
function $s() {
|
|
3665
|
+
if (Kn) return ur;
|
|
3666
|
+
Kn = 1;
|
|
3667
|
+
var e = /* @__PURE__ */ go(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
3668
3668
|
allowDots: !1,
|
|
3669
3669
|
allowEmptyArrays: !1,
|
|
3670
3670
|
allowPrototypes: !1,
|
|
@@ -3694,26 +3694,26 @@ function bs() {
|
|
|
3694
3694
|
}, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", i = function(y, $) {
|
|
3695
3695
|
var x = { __proto__: null }, p = $.ignoreQueryPrefix ? y.replace(/^\?/, "") : y;
|
|
3696
3696
|
p = p.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3697
|
-
var
|
|
3697
|
+
var g = $.parameterLimit === 1 / 0 ? void 0 : $.parameterLimit, v = p.split($.delimiter, g), O = -1, T, d = $.charset;
|
|
3698
3698
|
if ($.charsetSentinel)
|
|
3699
3699
|
for (T = 0; T < v.length; ++T)
|
|
3700
3700
|
v[T].indexOf("utf8=") === 0 && (v[T] === a ? d = "utf-8" : v[T] === n && (d = "iso-8859-1"), O = T, T = v.length);
|
|
3701
3701
|
for (T = 0; T < v.length; ++T)
|
|
3702
3702
|
if (T !== O) {
|
|
3703
|
-
var S = v[T], b = S.indexOf("]="), q = b === -1 ? S.indexOf("=") : b + 1,
|
|
3704
|
-
q === -1 ? (
|
|
3703
|
+
var S = v[T], b = S.indexOf("]="), q = b === -1 ? S.indexOf("=") : b + 1, L, E;
|
|
3704
|
+
q === -1 ? (L = $.decoder(S, o.decoder, d, "key"), E = $.strictNullHandling ? null : "") : (L = $.decoder(S.slice(0, q), o.decoder, d, "key"), E = e.maybeMap(
|
|
3705
3705
|
l(S.slice(q + 1), $),
|
|
3706
3706
|
function(P) {
|
|
3707
3707
|
return $.decoder(P, o.decoder, d, "value");
|
|
3708
3708
|
}
|
|
3709
|
-
)),
|
|
3710
|
-
var B = r.call(x,
|
|
3711
|
-
B && $.duplicates === "combine" ? x[
|
|
3709
|
+
)), E && $.interpretNumericEntities && d === "iso-8859-1" && (E = s(E)), S.indexOf("[]=") > -1 && (E = t(E) ? [E] : E);
|
|
3710
|
+
var B = r.call(x, L);
|
|
3711
|
+
B && $.duplicates === "combine" ? x[L] = e.combine(x[L], E) : (!B || $.duplicates === "last") && (x[L] = E);
|
|
3712
3712
|
}
|
|
3713
3713
|
return x;
|
|
3714
3714
|
}, c = function(h, y, $, x) {
|
|
3715
|
-
for (var p = x ? y : l(y, $),
|
|
3716
|
-
var v, O = h[
|
|
3715
|
+
for (var p = x ? y : l(y, $), g = h.length - 1; g >= 0; --g) {
|
|
3716
|
+
var v, O = h[g];
|
|
3717
3717
|
if (O === "[]" && $.parseArrays)
|
|
3718
3718
|
v = $.allowEmptyArrays && (p === "" || $.strictNullHandling && p === null) ? [] : [].concat(p);
|
|
3719
3719
|
else {
|
|
@@ -3726,13 +3726,13 @@ function bs() {
|
|
|
3726
3726
|
return p;
|
|
3727
3727
|
}, u = function(y, $, x, p) {
|
|
3728
3728
|
if (y) {
|
|
3729
|
-
var
|
|
3729
|
+
var g = x.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, O = /(\[[^[\]]*])/g, T = x.depth > 0 && v.exec(g), d = T ? g.slice(0, T.index) : g, S = [];
|
|
3730
3730
|
if (d) {
|
|
3731
3731
|
if (!x.plainObjects && r.call(Object.prototype, d) && !x.allowPrototypes)
|
|
3732
3732
|
return;
|
|
3733
3733
|
S.push(d);
|
|
3734
3734
|
}
|
|
3735
|
-
for (var b = 0; x.depth > 0 && (T = O.exec(
|
|
3735
|
+
for (var b = 0; x.depth > 0 && (T = O.exec(g)) !== null && b < x.depth; ) {
|
|
3736
3736
|
if (b += 1, !x.plainObjects && r.call(Object.prototype, T[1].slice(1, -1)) && !x.allowPrototypes)
|
|
3737
3737
|
return;
|
|
3738
3738
|
S.push(T[1]);
|
|
@@ -3740,7 +3740,7 @@ function bs() {
|
|
|
3740
3740
|
if (T) {
|
|
3741
3741
|
if (x.strictDepth === !0)
|
|
3742
3742
|
throw new RangeError("Input depth exceeded depth option of " + x.depth + " and strictDepth is true");
|
|
3743
|
-
S.push("[" +
|
|
3743
|
+
S.push("[" + g.slice(T.index) + "]");
|
|
3744
3744
|
}
|
|
3745
3745
|
return c(S, $, x, p);
|
|
3746
3746
|
}
|
|
@@ -3787,29 +3787,29 @@ function bs() {
|
|
|
3787
3787
|
var $ = f(y);
|
|
3788
3788
|
if (h === "" || h === null || typeof h > "u")
|
|
3789
3789
|
return $.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3790
|
-
for (var x = typeof h == "string" ? i(h, $) : h, p = $.plainObjects ? /* @__PURE__ */ Object.create(null) : {},
|
|
3791
|
-
var O =
|
|
3790
|
+
for (var x = typeof h == "string" ? i(h, $) : h, p = $.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, g = Object.keys(x), v = 0; v < g.length; ++v) {
|
|
3791
|
+
var O = g[v], T = u(O, x[O], $, typeof h == "string");
|
|
3792
3792
|
p = e.merge(p, T, $);
|
|
3793
3793
|
}
|
|
3794
3794
|
return $.allowSparse === !0 ? p : e.compact(p);
|
|
3795
3795
|
}, ur;
|
|
3796
3796
|
}
|
|
3797
|
-
var fr,
|
|
3798
|
-
function
|
|
3799
|
-
if (
|
|
3800
|
-
|
|
3801
|
-
var e = /* @__PURE__ */
|
|
3797
|
+
var fr, Yn;
|
|
3798
|
+
function vo() {
|
|
3799
|
+
if (Yn) return fr;
|
|
3800
|
+
Yn = 1;
|
|
3801
|
+
var e = /* @__PURE__ */ xs(), r = /* @__PURE__ */ $s(), t = /* @__PURE__ */ Pr();
|
|
3802
3802
|
return fr = {
|
|
3803
3803
|
formats: t,
|
|
3804
3804
|
parse: r,
|
|
3805
3805
|
stringify: e
|
|
3806
3806
|
}, fr;
|
|
3807
3807
|
}
|
|
3808
|
-
var
|
|
3809
|
-
function
|
|
3810
|
-
if (
|
|
3811
|
-
|
|
3812
|
-
var e =
|
|
3808
|
+
var Xn;
|
|
3809
|
+
function js() {
|
|
3810
|
+
if (Xn) return Pe;
|
|
3811
|
+
Xn = 1;
|
|
3812
|
+
var e = zi();
|
|
3813
3813
|
function r() {
|
|
3814
3814
|
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;
|
|
3815
3815
|
}
|
|
@@ -3857,8 +3857,8 @@ function xs() {
|
|
|
3857
3857
|
"ftp:": !0,
|
|
3858
3858
|
"gopher:": !0,
|
|
3859
3859
|
"file:": !0
|
|
3860
|
-
}, p = /* @__PURE__ */
|
|
3861
|
-
function
|
|
3860
|
+
}, p = /* @__PURE__ */ vo();
|
|
3861
|
+
function g(d, S, b) {
|
|
3862
3862
|
if (d && typeof d == "object" && d instanceof r)
|
|
3863
3863
|
return d;
|
|
3864
3864
|
var q = new r();
|
|
@@ -3867,8 +3867,8 @@ function xs() {
|
|
|
3867
3867
|
r.prototype.parse = function(d, S, b) {
|
|
3868
3868
|
if (typeof d != "string")
|
|
3869
3869
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof d);
|
|
3870
|
-
var q = d.indexOf("?"),
|
|
3871
|
-
|
|
3870
|
+
var q = d.indexOf("?"), L = q !== -1 && q < d.indexOf("#") ? "?" : "#", E = d.split(L), B = /\\/g;
|
|
3871
|
+
E[0] = E[0].replace(B, "/"), d = E.join(L);
|
|
3872
3872
|
var P = d;
|
|
3873
3873
|
if (P = P.trim(), !b && d.split("#").length === 1) {
|
|
3874
3874
|
var ae = s.exec(P);
|
|
@@ -3886,26 +3886,26 @@ function xs() {
|
|
|
3886
3886
|
se && !(H && $[H]) && (P = P.substr(2), this.slashes = !0);
|
|
3887
3887
|
}
|
|
3888
3888
|
if (!$[H] && (se || H && !x[H])) {
|
|
3889
|
-
for (var Z = -1,
|
|
3890
|
-
var re = P.indexOf(c[
|
|
3889
|
+
for (var Z = -1, k = 0; k < c.length; k++) {
|
|
3890
|
+
var re = P.indexOf(c[k]);
|
|
3891
3891
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3892
3892
|
}
|
|
3893
3893
|
var R, N;
|
|
3894
3894
|
Z === -1 ? N = P.lastIndexOf("@") : N = P.lastIndexOf("@", Z), N !== -1 && (R = P.slice(0, N), P = P.slice(N + 1), this.auth = decodeURIComponent(R)), Z = -1;
|
|
3895
|
-
for (var
|
|
3896
|
-
var re = P.indexOf(i[
|
|
3895
|
+
for (var k = 0; k < i.length; k++) {
|
|
3896
|
+
var re = P.indexOf(i[k]);
|
|
3897
3897
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3898
3898
|
}
|
|
3899
3899
|
Z === -1 && (Z = P.length), this.host = P.slice(0, Z), P = P.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
|
|
3900
3900
|
var U = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3901
3901
|
if (!U)
|
|
3902
|
-
for (var C = this.hostname.split(/\./),
|
|
3903
|
-
var W = C[
|
|
3902
|
+
for (var C = this.hostname.split(/\./), k = 0, I = C.length; k < I; k++) {
|
|
3903
|
+
var W = C[k];
|
|
3904
3904
|
if (W && !W.match(f)) {
|
|
3905
3905
|
for (var z = "", K = 0, ne = W.length; K < ne; K++)
|
|
3906
3906
|
W.charCodeAt(K) > 127 ? z += "x" : z += W[K];
|
|
3907
3907
|
if (!z.match(f)) {
|
|
3908
|
-
var J = C.slice(0,
|
|
3908
|
+
var J = C.slice(0, k), A = C.slice(k + 1), F = W.match(h);
|
|
3909
3909
|
F && (J.push(F[1]), A.unshift(F[2])), A.length && (P = "/" + A.join(".") + P), this.hostname = J.join(".");
|
|
3910
3910
|
break;
|
|
3911
3911
|
}
|
|
@@ -3916,8 +3916,8 @@ function xs() {
|
|
|
3916
3916
|
this.host = Q + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
|
|
3917
3917
|
}
|
|
3918
3918
|
if (!y[D])
|
|
3919
|
-
for (var
|
|
3920
|
-
var G = a[
|
|
3919
|
+
for (var k = 0, I = a.length; k < I; k++) {
|
|
3920
|
+
var G = a[k];
|
|
3921
3921
|
if (P.indexOf(G) !== -1) {
|
|
3922
3922
|
var Y = encodeURIComponent(G);
|
|
3923
3923
|
Y === G && (Y = escape(G)), P = P.split(G).join(Y);
|
|
@@ -3933,38 +3933,38 @@ function xs() {
|
|
|
3933
3933
|
return this.href = this.format(), this;
|
|
3934
3934
|
};
|
|
3935
3935
|
function v(d) {
|
|
3936
|
-
return typeof d == "string" && (d =
|
|
3936
|
+
return typeof d == "string" && (d = g(d)), d instanceof r ? d.format() : r.prototype.format.call(d);
|
|
3937
3937
|
}
|
|
3938
3938
|
r.prototype.format = function() {
|
|
3939
3939
|
var d = this.auth || "";
|
|
3940
3940
|
d && (d = encodeURIComponent(d), d = d.replace(/%3A/i, ":"), d += "@");
|
|
3941
|
-
var S = this.protocol || "", b = this.pathname || "", q = this.hash || "",
|
|
3942
|
-
this.host ?
|
|
3941
|
+
var S = this.protocol || "", b = this.pathname || "", q = this.hash || "", L = !1, E = "";
|
|
3942
|
+
this.host ? L = d + this.host : this.hostname && (L = d + (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 = p.stringify(this.query, {
|
|
3943
3943
|
arrayFormat: "repeat",
|
|
3944
3944
|
addQueryPrefix: !1
|
|
3945
3945
|
}));
|
|
3946
|
-
var B = this.search ||
|
|
3947
|
-
return S && S.substr(-1) !== ":" && (S += ":"), this.slashes || (!S || x[S]) &&
|
|
3946
|
+
var B = this.search || E && "?" + E || "";
|
|
3947
|
+
return S && S.substr(-1) !== ":" && (S += ":"), this.slashes || (!S || x[S]) && L !== !1 ? (L = "//" + (L || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : L || (L = ""), q && q.charAt(0) !== "#" && (q = "#" + q), B && B.charAt(0) !== "?" && (B = "?" + B), b = b.replace(/[?#]/g, function(P) {
|
|
3948
3948
|
return encodeURIComponent(P);
|
|
3949
|
-
}), B = B.replace("#", "%23"), S +
|
|
3949
|
+
}), B = B.replace("#", "%23"), S + L + b + B + q;
|
|
3950
3950
|
};
|
|
3951
3951
|
function O(d, S) {
|
|
3952
|
-
return
|
|
3952
|
+
return g(d, !1, !0).resolve(S);
|
|
3953
3953
|
}
|
|
3954
3954
|
r.prototype.resolve = function(d) {
|
|
3955
|
-
return this.resolveObject(
|
|
3955
|
+
return this.resolveObject(g(d, !1, !0)).format();
|
|
3956
3956
|
};
|
|
3957
3957
|
function T(d, S) {
|
|
3958
|
-
return d ?
|
|
3958
|
+
return d ? g(d, !1, !0).resolveObject(S) : S;
|
|
3959
3959
|
}
|
|
3960
3960
|
return r.prototype.resolveObject = function(d) {
|
|
3961
3961
|
if (typeof d == "string") {
|
|
3962
3962
|
var S = new r();
|
|
3963
3963
|
S.parse(d, !1, !0), d = S;
|
|
3964
3964
|
}
|
|
3965
|
-
for (var b = new r(), q = Object.keys(this),
|
|
3966
|
-
var
|
|
3967
|
-
b[
|
|
3965
|
+
for (var b = new r(), q = Object.keys(this), L = 0; L < q.length; L++) {
|
|
3966
|
+
var E = q[L];
|
|
3967
|
+
b[E] = this[E];
|
|
3968
3968
|
}
|
|
3969
3969
|
if (b.hash = d.hash, d.href === "")
|
|
3970
3970
|
return b.href = b.format(), b;
|
|
@@ -3984,22 +3984,22 @@ function xs() {
|
|
|
3984
3984
|
return b.href = b.format(), b;
|
|
3985
3985
|
}
|
|
3986
3986
|
if (b.protocol = d.protocol, !d.host && !$[d.protocol]) {
|
|
3987
|
-
for (var
|
|
3987
|
+
for (var I = (d.pathname || "").split("/"); I.length && !(d.host = I.shift()); )
|
|
3988
3988
|
;
|
|
3989
|
-
d.host || (d.host = ""), d.hostname || (d.hostname = ""),
|
|
3989
|
+
d.host || (d.host = ""), d.hostname || (d.hostname = ""), I[0] !== "" && I.unshift(""), I.length < 2 && I.unshift(""), b.pathname = I.join("/");
|
|
3990
3990
|
} else
|
|
3991
3991
|
b.pathname = d.pathname;
|
|
3992
3992
|
if (b.search = d.search, b.query = d.query, b.host = d.host || "", b.auth = d.auth, b.hostname = d.hostname || d.host, b.port = d.port, b.pathname || b.search) {
|
|
3993
|
-
var Z = b.pathname || "",
|
|
3994
|
-
b.path = Z +
|
|
3993
|
+
var Z = b.pathname || "", k = b.search || "";
|
|
3994
|
+
b.path = Z + k;
|
|
3995
3995
|
}
|
|
3996
3996
|
return b.slashes = b.slashes || d.slashes, b.href = b.format(), b;
|
|
3997
3997
|
}
|
|
3998
|
-
var re = b.pathname && b.pathname.charAt(0) === "/", R = d.host || d.pathname && d.pathname.charAt(0) === "/", N = R || re || b.host && d.pathname, U = N, C = b.pathname && b.pathname.split("/") || [],
|
|
3999
|
-
if (W && (b.hostname = "", b.port = null, b.host && (C[0] === "" ? C[0] = b.host : C.unshift(b.host)), b.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (
|
|
4000
|
-
b.host = d.host || d.host === "" ? d.host : b.host, b.hostname = d.hostname || d.hostname === "" ? d.hostname : b.hostname, b.search = d.search, b.query = d.query, C =
|
|
4001
|
-
else if (
|
|
4002
|
-
C || (C = []), C.pop(), C = C.concat(
|
|
3998
|
+
var re = b.pathname && b.pathname.charAt(0) === "/", R = d.host || d.pathname && d.pathname.charAt(0) === "/", N = R || re || b.host && d.pathname, U = N, C = b.pathname && b.pathname.split("/") || [], I = d.pathname && d.pathname.split("/") || [], W = b.protocol && !x[b.protocol];
|
|
3999
|
+
if (W && (b.hostname = "", b.port = null, b.host && (C[0] === "" ? C[0] = b.host : C.unshift(b.host)), b.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (I[0] === "" ? I[0] = d.host : I.unshift(d.host)), d.host = null), N = N && (I[0] === "" || C[0] === "")), R)
|
|
4000
|
+
b.host = d.host || d.host === "" ? d.host : b.host, b.hostname = d.hostname || d.hostname === "" ? d.hostname : b.hostname, b.search = d.search, b.query = d.query, C = I;
|
|
4001
|
+
else if (I.length)
|
|
4002
|
+
C || (C = []), C.pop(), C = C.concat(I), b.search = d.search, b.query = d.query;
|
|
4003
4003
|
else if (d.search != null) {
|
|
4004
4004
|
if (W) {
|
|
4005
4005
|
b.host = C.shift(), b.hostname = b.host;
|
|
@@ -4026,14 +4026,14 @@ function xs() {
|
|
|
4026
4026
|
}, r.prototype.parseHost = function() {
|
|
4027
4027
|
var d = this.host, S = o.exec(d);
|
|
4028
4028
|
S && (S = S[0], S !== ":" && (this.port = S.substr(1)), d = d.substr(0, d.length - S.length)), d && (this.hostname = d);
|
|
4029
|
-
}, Pe.parse =
|
|
4029
|
+
}, Pe.parse = g, Pe.resolve = O, Pe.resolveObject = T, Pe.format = v, Pe.Url = r, Pe;
|
|
4030
4030
|
}
|
|
4031
|
-
var pr =
|
|
4031
|
+
var pr = js(), dr = /* @__PURE__ */ vo(), ws = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Ss = class {
|
|
4032
4032
|
constructor(e, r = {}) {
|
|
4033
4033
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4034
4034
|
harIsAlreadyEncoded: !1,
|
|
4035
4035
|
...r
|
|
4036
|
-
}, this.requests = [],
|
|
4036
|
+
}, this.requests = [], ws(e) ? this.entries = e.log.entries : this.entries = [
|
|
4037
4037
|
{
|
|
4038
4038
|
request: e
|
|
4039
4039
|
}
|
|
@@ -4068,13 +4068,13 @@ var pr = xs(), dr = /* @__PURE__ */ mo(), $s = (e) => typeof e == "object" && "l
|
|
|
4068
4068
|
cookiesObj: {},
|
|
4069
4069
|
allHeaders: {}
|
|
4070
4070
|
};
|
|
4071
|
-
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(
|
|
4071
|
+
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Mr, {})), t.headers && t.headers.length) {
|
|
4072
4072
|
const y = /^HTTP\/2/;
|
|
4073
4073
|
t.headersObj = t.headers.reduce(($, { name: x, value: p }) => {
|
|
4074
|
-
const
|
|
4074
|
+
const g = y.exec(t.httpVersion) ? x.toLocaleLowerCase() : x;
|
|
4075
4075
|
return {
|
|
4076
4076
|
...$,
|
|
4077
|
-
[
|
|
4077
|
+
[g]: p
|
|
4078
4078
|
};
|
|
4079
4079
|
}, {});
|
|
4080
4080
|
}
|
|
@@ -4093,20 +4093,20 @@ var pr = xs(), dr = /* @__PURE__ */ mo(), $s = (e) => typeof e == "object" && "l
|
|
|
4093
4093
|
case "multipart/alternative":
|
|
4094
4094
|
if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (f = t.postData) != null && f.params) {
|
|
4095
4095
|
const y = "---011000010111000001101001", $ = `${y}--`, x = `\r
|
|
4096
|
-
`, p = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"),
|
|
4096
|
+
`, p = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), g = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4097
4097
|
`), v = [`--${y}`];
|
|
4098
4098
|
(h = t.postData) == null || h.params.forEach((T, d) => {
|
|
4099
|
-
const S = T.name, b = T.value || "", q = T.fileName || null,
|
|
4099
|
+
const S = T.name, b = T.value || "", q = T.fileName || null, L = T.contentType || "application/octet-stream";
|
|
4100
4100
|
q ? (v.push(
|
|
4101
|
-
`Content-Disposition: form-data; name="${p(
|
|
4102
|
-
), v.push(`Content-Type: ${
|
|
4101
|
+
`Content-Disposition: form-data; name="${p(g(S))}"; filename="${q}"`
|
|
4102
|
+
), v.push(`Content-Type: ${L}`)) : v.push(`Content-Disposition: form-data; name="${p(g(S))}"`), v.push(""), v.push(g(b)), d !== t.postData.params.length - 1 && v.push(`--${y}`);
|
|
4103
4103
|
}), v.push(`--${$}`), t.postData.boundary = y, t.postData.text = v.join(x);
|
|
4104
4104
|
const O = pe(t.headersObj, "content-type") || "content-type";
|
|
4105
4105
|
t.headersObj[O] = `multipart/form-data; boundary=${y}`;
|
|
4106
4106
|
}
|
|
4107
4107
|
break;
|
|
4108
4108
|
case "application/x-www-form-urlencoded":
|
|
4109
|
-
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(
|
|
4109
|
+
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Mr, {}), t.postData.text = dr.stringify(t.postData.paramsObj)) : t.postData.text = "";
|
|
4110
4110
|
break;
|
|
4111
4111
|
case "text/json":
|
|
4112
4112
|
case "text/x-json":
|
|
@@ -4158,19 +4158,19 @@ var pr = xs(), dr = /* @__PURE__ */ mo(), $s = (e) => typeof e == "object" && "l
|
|
|
4158
4158
|
}
|
|
4159
4159
|
convert(e, r, t) {
|
|
4160
4160
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4161
|
-
const o =
|
|
4161
|
+
const o = Hi[e];
|
|
4162
4162
|
if (!o)
|
|
4163
4163
|
return !1;
|
|
4164
4164
|
const { convert: s } = o.clientsById[r || o.info.default];
|
|
4165
4165
|
return this.requests.map((n) => s(n, t));
|
|
4166
4166
|
}
|
|
4167
4167
|
};
|
|
4168
|
-
const
|
|
4168
|
+
const Os = ({
|
|
4169
4169
|
rootMargin: e = "0px",
|
|
4170
4170
|
threshold: r
|
|
4171
4171
|
} = {}) => {
|
|
4172
|
-
const [t, o] = ge(!1), s =
|
|
4173
|
-
return
|
|
4172
|
+
const [t, o] = ge(!1), s = xr(null);
|
|
4173
|
+
return $r(() => {
|
|
4174
4174
|
const l = new IntersectionObserver(
|
|
4175
4175
|
([a]) => {
|
|
4176
4176
|
a && o(a.isIntersecting);
|
|
@@ -4180,12 +4180,12 @@ const ws = ({
|
|
|
4180
4180
|
if (n)
|
|
4181
4181
|
return l.observe(n), () => l.unobserve(n);
|
|
4182
4182
|
}, [e, r]), [s, t];
|
|
4183
|
-
},
|
|
4183
|
+
}, Ts = typeof window < "u" ? ea : $r, bo = ({
|
|
4184
4184
|
children: e,
|
|
4185
4185
|
maxHeight: r = 250
|
|
4186
4186
|
}) => {
|
|
4187
|
-
const t =
|
|
4188
|
-
return
|
|
4187
|
+
const t = xr(null), [o, s] = ge(!1), [l, n] = ge(!1);
|
|
4188
|
+
return Ts(() => {
|
|
4189
4189
|
const a = t.current;
|
|
4190
4190
|
if (!a) return;
|
|
4191
4191
|
s(a.scrollHeight > r);
|
|
@@ -4193,16 +4193,16 @@ const ws = ({
|
|
|
4193
4193
|
s(a.scrollHeight > r);
|
|
4194
4194
|
});
|
|
4195
4195
|
return i.observe(a), () => i.disconnect();
|
|
4196
|
-
}, [r]), /* @__PURE__ */
|
|
4197
|
-
|
|
4196
|
+
}, [r]), /* @__PURE__ */ m.jsxs(
|
|
4197
|
+
na,
|
|
4198
4198
|
{
|
|
4199
4199
|
className: "group",
|
|
4200
4200
|
open: l,
|
|
4201
4201
|
onOpenChange: n,
|
|
4202
4202
|
style: { "--max-height": `${r}px` },
|
|
4203
4203
|
children: [
|
|
4204
|
-
/* @__PURE__ */
|
|
4205
|
-
|
|
4204
|
+
/* @__PURE__ */ m.jsxs(
|
|
4205
|
+
oa,
|
|
4206
4206
|
{
|
|
4207
4207
|
forceMount: !0,
|
|
4208
4208
|
className: le(
|
|
@@ -4210,15 +4210,15 @@ const ws = ({
|
|
|
4210
4210
|
!l && o && "max-h-[--max-height]"
|
|
4211
4211
|
),
|
|
4212
4212
|
children: [
|
|
4213
|
-
!l && o && /* @__PURE__ */
|
|
4214
|
-
/* @__PURE__ */
|
|
4215
|
-
!l && o && /* @__PURE__ */
|
|
4216
|
-
|
|
4213
|
+
!l && o && /* @__PURE__ */ m.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" }),
|
|
4214
|
+
/* @__PURE__ */ m.jsx("div", { ref: t, children: e }),
|
|
4215
|
+
!l && o && /* @__PURE__ */ m.jsx(
|
|
4216
|
+
_r,
|
|
4217
4217
|
{
|
|
4218
4218
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4219
4219
|
asChild: !0,
|
|
4220
|
-
children: /* @__PURE__ */
|
|
4221
|
-
/* @__PURE__ */
|
|
4220
|
+
children: /* @__PURE__ */ m.jsx("div", { children: /* @__PURE__ */ m.jsxs(Br, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4221
|
+
/* @__PURE__ */ m.jsx(zo, { size: 14, className: "mr-1.5" }),
|
|
4222
4222
|
"Click to expand"
|
|
4223
4223
|
] }) })
|
|
4224
4224
|
}
|
|
@@ -4226,20 +4226,20 @@ const ws = ({
|
|
|
4226
4226
|
]
|
|
4227
4227
|
}
|
|
4228
4228
|
),
|
|
4229
|
-
o && /* @__PURE__ */
|
|
4229
|
+
o && /* @__PURE__ */ m.jsx(
|
|
4230
4230
|
"div",
|
|
4231
4231
|
{
|
|
4232
4232
|
className: le("flex justify-center w-full mb-2", !l && "hidden"),
|
|
4233
|
-
children: /* @__PURE__ */
|
|
4233
|
+
children: /* @__PURE__ */ m.jsx(_r, { asChild: !0, children: /* @__PURE__ */ m.jsxs(Br, { variant: "outline", size: "sm", children: [
|
|
4234
4234
|
"Collapse",
|
|
4235
|
-
/* @__PURE__ */
|
|
4235
|
+
/* @__PURE__ */ m.jsx(Go, { size: 14, className: "ml-1.5" })
|
|
4236
4236
|
] }) })
|
|
4237
4237
|
}
|
|
4238
4238
|
)
|
|
4239
4239
|
]
|
|
4240
4240
|
}
|
|
4241
4241
|
);
|
|
4242
|
-
},
|
|
4242
|
+
}, Ps = ({
|
|
4243
4243
|
server: e,
|
|
4244
4244
|
servers: r,
|
|
4245
4245
|
operation: t,
|
|
@@ -4263,8 +4263,8 @@ const ws = ({
|
|
|
4263
4263
|
type: ((x = u.schema) == null ? void 0 : x.type) ?? "string"
|
|
4264
4264
|
};
|
|
4265
4265
|
}), n = (c = t.parameters) == null ? void 0 : c.filter((u) => u.in === "path").map((u) => ({ name: u.name }));
|
|
4266
|
-
return /* @__PURE__ */
|
|
4267
|
-
|
|
4266
|
+
return /* @__PURE__ */ m.jsx(
|
|
4267
|
+
aa,
|
|
4268
4268
|
{
|
|
4269
4269
|
server: e,
|
|
4270
4270
|
servers: r,
|
|
@@ -4276,13 +4276,13 @@ const ws = ({
|
|
|
4276
4276
|
examples: o
|
|
4277
4277
|
}
|
|
4278
4278
|
);
|
|
4279
|
-
},
|
|
4279
|
+
}, Cr = ({ children: e, className: r }) => /* @__PURE__ */ m.jsx(
|
|
4280
4280
|
"div",
|
|
4281
4281
|
{
|
|
4282
4282
|
className: le("rounded-xl overflow-hidden border border-border", r),
|
|
4283
4283
|
children: e
|
|
4284
4284
|
}
|
|
4285
|
-
),
|
|
4285
|
+
), Rr = ({ children: e, className: r }) => /* @__PURE__ */ m.jsx(
|
|
4286
4286
|
"div",
|
|
4287
4287
|
{
|
|
4288
4288
|
className: le(
|
|
@@ -4291,7 +4291,7 @@ const ws = ({
|
|
|
4291
4291
|
),
|
|
4292
4292
|
children: e
|
|
4293
4293
|
}
|
|
4294
|
-
),
|
|
4294
|
+
), xo = ({ children: e, className: r }) => /* @__PURE__ */ m.jsx("div", { className: le("bg-card overflow-auto p-2", r), children: e }), $o = ({ children: e, className: r }) => /* @__PURE__ */ m.jsx("div", { className: le("border-t bg-muted dark:bg-transparent p-3", r), children: e }), He = (e, r) => {
|
|
4295
4295
|
if (e.example !== void 0)
|
|
4296
4296
|
return e.example;
|
|
4297
4297
|
if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
|
|
@@ -4327,32 +4327,32 @@ const ws = ({
|
|
|
4327
4327
|
default:
|
|
4328
4328
|
return {};
|
|
4329
4329
|
}
|
|
4330
|
-
},
|
|
4330
|
+
}, Cs = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Rs = (e) => e ? {
|
|
4331
4331
|
"application/json": "json",
|
|
4332
4332
|
"application/xml": "xml",
|
|
4333
4333
|
"application/x-yaml": "yaml",
|
|
4334
4334
|
"text/csv": "csv",
|
|
4335
4335
|
"application/javascript": "javascript",
|
|
4336
4336
|
"application/graphql": "graphql"
|
|
4337
|
-
}[e] ?? "plain" : "plain",
|
|
4337
|
+
}[e] ?? "plain" : "plain", jo = ({
|
|
4338
4338
|
content: e,
|
|
4339
4339
|
description: r,
|
|
4340
4340
|
onExampleChange: t
|
|
4341
4341
|
}) => {
|
|
4342
4342
|
var y;
|
|
4343
|
-
const [o, s] = ge(0), [l, n] = ge(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], i = (a == null ? void 0 : a.examples) ?? [], c = i[l], u =
|
|
4343
|
+
const [o, s] = ge(0), [l, n] = ge(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], i = (a == null ? void 0 : a.examples) ?? [], c = i[l], u = to(() => {
|
|
4344
4344
|
if (c)
|
|
4345
4345
|
return "value" in c ? c.value : c;
|
|
4346
4346
|
if (a != null && a.schema)
|
|
4347
4347
|
return He(a.schema);
|
|
4348
4348
|
}, [c, a == null ? void 0 : a.schema]);
|
|
4349
|
-
|
|
4349
|
+
$r(() => {
|
|
4350
4350
|
u && (t == null || t(u));
|
|
4351
4351
|
}, [u, t]);
|
|
4352
|
-
const f =
|
|
4353
|
-
return /* @__PURE__ */
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
c != null && c.externalValue ? /* @__PURE__ */
|
|
4352
|
+
const f = Cs(u), h = Rs(a == null ? void 0 : a.mediaType);
|
|
4353
|
+
return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
4354
|
+
/* @__PURE__ */ m.jsxs(xo, { className: "p-0", children: [
|
|
4355
|
+
c != null && c.externalValue ? /* @__PURE__ */ m.jsx("div", { className: "p-2", children: /* @__PURE__ */ m.jsx(
|
|
4356
4356
|
"a",
|
|
4357
4357
|
{
|
|
4358
4358
|
href: c.externalValue,
|
|
@@ -4361,8 +4361,8 @@ const ws = ({
|
|
|
4361
4361
|
className: "text-xs text-primary hover:underline",
|
|
4362
4362
|
children: "View External Example →"
|
|
4363
4363
|
}
|
|
4364
|
-
) }) : /* @__PURE__ */
|
|
4365
|
-
|
|
4364
|
+
) }) : /* @__PURE__ */ m.jsx(bo, { children: /* @__PURE__ */ m.jsx(
|
|
4365
|
+
ao,
|
|
4366
4366
|
{
|
|
4367
4367
|
language: h,
|
|
4368
4368
|
noBackground: !0,
|
|
@@ -4371,12 +4371,12 @@ const ws = ({
|
|
|
4371
4371
|
code: f
|
|
4372
4372
|
}
|
|
4373
4373
|
) }),
|
|
4374
|
-
(c == null ? void 0 : c.description) && /* @__PURE__ */
|
|
4374
|
+
(c == null ? void 0 : c.description) && /* @__PURE__ */ m.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
|
|
4375
4375
|
] }),
|
|
4376
|
-
/* @__PURE__ */
|
|
4377
|
-
r && /* @__PURE__ */
|
|
4378
|
-
(i.length !== 0 || e.length !== 0) && /* @__PURE__ */
|
|
4379
|
-
/* @__PURE__ */
|
|
4376
|
+
/* @__PURE__ */ m.jsxs($o, { className: "text-xs p-0 divide-y divide-border", children: [
|
|
4377
|
+
r && /* @__PURE__ */ m.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: r }),
|
|
4378
|
+
(i.length !== 0 || e.length !== 0) && /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4379
|
+
/* @__PURE__ */ m.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ m.jsx(
|
|
4380
4380
|
et,
|
|
4381
4381
|
{
|
|
4382
4382
|
className: "max-w-[200px]",
|
|
@@ -4387,8 +4387,8 @@ const ws = ({
|
|
|
4387
4387
|
label: $.mediaType
|
|
4388
4388
|
}))
|
|
4389
4389
|
}
|
|
4390
|
-
) : /* @__PURE__ */
|
|
4391
|
-
i.length > 1 && /* @__PURE__ */
|
|
4390
|
+
) : /* @__PURE__ */ m.jsx("span", { className: "font-mono text-[11px]", children: (y = e[0]) == null ? void 0 : y.mediaType }) }),
|
|
4391
|
+
i.length > 1 && /* @__PURE__ */ m.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ m.jsx(
|
|
4392
4392
|
et,
|
|
4393
4393
|
{
|
|
4394
4394
|
className: "max-w-[180px]",
|
|
@@ -4403,34 +4403,34 @@ const ws = ({
|
|
|
4403
4403
|
] })
|
|
4404
4404
|
] })
|
|
4405
4405
|
] });
|
|
4406
|
-
},
|
|
4406
|
+
}, qs = ({
|
|
4407
4407
|
content: e,
|
|
4408
4408
|
onExampleChange: r
|
|
4409
|
-
}) => e.length === 0 ? null : /* @__PURE__ */
|
|
4410
|
-
/* @__PURE__ */
|
|
4411
|
-
/* @__PURE__ */
|
|
4412
|
-
] }),
|
|
4413
|
-
|
|
4409
|
+
}) => e.length === 0 ? null : /* @__PURE__ */ m.jsxs(Cr, { children: [
|
|
4410
|
+
/* @__PURE__ */ m.jsx(Rr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ m.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4411
|
+
/* @__PURE__ */ m.jsx(jo, { content: e, onExampleChange: r })
|
|
4412
|
+
] }), Ns = ({ response: e }) => /* @__PURE__ */ m.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ m.jsx(
|
|
4413
|
+
jo,
|
|
4414
4414
|
{
|
|
4415
4415
|
content: e.content ?? [],
|
|
4416
4416
|
description: e.description ?? void 0
|
|
4417
4417
|
}
|
|
4418
|
-
) }),
|
|
4418
|
+
) }), ks = ({
|
|
4419
4419
|
responses: e,
|
|
4420
4420
|
selectedResponse: r,
|
|
4421
4421
|
onSelectResponse: t
|
|
4422
4422
|
}) => {
|
|
4423
4423
|
var o;
|
|
4424
|
-
return /* @__PURE__ */
|
|
4424
|
+
return /* @__PURE__ */ m.jsx(Cr, { children: /* @__PURE__ */ m.jsxs(
|
|
4425
4425
|
Ye.Root,
|
|
4426
4426
|
{
|
|
4427
4427
|
defaultValue: (o = e[0]) == null ? void 0 : o.statusCode,
|
|
4428
4428
|
value: r,
|
|
4429
4429
|
onValueChange: (s) => t(s),
|
|
4430
4430
|
children: [
|
|
4431
|
-
/* @__PURE__ */
|
|
4432
|
-
/* @__PURE__ */
|
|
4433
|
-
/* @__PURE__ */
|
|
4431
|
+
/* @__PURE__ */ m.jsxs(Rr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
4432
|
+
/* @__PURE__ */ m.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
4433
|
+
/* @__PURE__ */ m.jsx(Ye.List, { className: "flex gap-2", children: e.map((s) => /* @__PURE__ */ m.jsx(
|
|
4434
4434
|
Ye.Trigger,
|
|
4435
4435
|
{
|
|
4436
4436
|
value: s.statusCode,
|
|
@@ -4444,11 +4444,11 @@ const ws = ({
|
|
|
4444
4444
|
s.statusCode
|
|
4445
4445
|
)) })
|
|
4446
4446
|
] }),
|
|
4447
|
-
e.map((s) => /* @__PURE__ */
|
|
4447
|
+
e.map((s) => /* @__PURE__ */ m.jsx(Ns, { response: s }, s.statusCode))
|
|
4448
4448
|
]
|
|
4449
4449
|
}
|
|
4450
4450
|
) });
|
|
4451
|
-
},
|
|
4451
|
+
}, Es = (e, r) => {
|
|
4452
4452
|
let t;
|
|
4453
4453
|
switch (r) {
|
|
4454
4454
|
case "shell":
|
|
@@ -4489,7 +4489,7 @@ const ws = ({
|
|
|
4489
4489
|
break;
|
|
4490
4490
|
}
|
|
4491
4491
|
return t ? t[0] : "";
|
|
4492
|
-
},
|
|
4492
|
+
}, As = rt(
|
|
4493
4493
|
/* GraphQL */
|
|
4494
4494
|
`
|
|
4495
4495
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4501,7 +4501,7 @@ const ws = ({
|
|
|
4501
4501
|
}
|
|
4502
4502
|
}
|
|
4503
4503
|
`
|
|
4504
|
-
),
|
|
4504
|
+
), Is = [
|
|
4505
4505
|
{ value: "shell", label: "cURL" },
|
|
4506
4506
|
{ value: "js", label: "JavaScript" },
|
|
4507
4507
|
{ value: "python", label: "Python" },
|
|
@@ -4513,35 +4513,31 @@ const ws = ({
|
|
|
4513
4513
|
{ value: "php", label: "PHP" },
|
|
4514
4514
|
{ value: "ruby", label: "Ruby" },
|
|
4515
4515
|
{ value: "swift", label: "Swift" }
|
|
4516
|
-
],
|
|
4516
|
+
], Ls = ({
|
|
4517
4517
|
operation: e,
|
|
4518
4518
|
selectedResponse: r,
|
|
4519
4519
|
onSelectResponse: t
|
|
4520
4520
|
}) => {
|
|
4521
4521
|
var d;
|
|
4522
|
-
const { input: o, type: s, options: l } =
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
/* @__PURE__ */
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
/* @__PURE__ */ g.jsx("wbr", {})
|
|
4538
|
-
] }, S + b)
|
|
4539
|
-
);
|
|
4540
|
-
}), { selectedServer: m } = vr(), v = Zn(() => {
|
|
4522
|
+
const { input: o, type: s, options: l } = jr(), n = wr(As, { input: o, type: s }), a = vr(n), i = oo(e.method), [c, u] = No(), [, f] = eo(), [h, y] = ge(), $ = c.get("lang") ?? (l == null ? void 0 : l.examplesDefaultLanguage) ?? "shell", x = (d = e.requestBody) == null ? void 0 : d.content, p = /* @__PURE__ */ m.jsx(
|
|
4523
|
+
ia,
|
|
4524
|
+
{
|
|
4525
|
+
path: e.path,
|
|
4526
|
+
renderParam: ({ name: S }) => /* @__PURE__ */ m.jsx(
|
|
4527
|
+
no,
|
|
4528
|
+
{
|
|
4529
|
+
name: S,
|
|
4530
|
+
backgroundOpacity: "0",
|
|
4531
|
+
slug: `${e.slug}-${S}`,
|
|
4532
|
+
children: `{${S}}`
|
|
4533
|
+
}
|
|
4534
|
+
)
|
|
4535
|
+
}
|
|
4536
|
+
), { selectedServer: g } = br(), v = to(() => {
|
|
4541
4537
|
var q;
|
|
4542
|
-
const S = h ?? ((q = x == null ? void 0 : x[0]) != null && q.schema ? He(x[0].schema) : void 0), b = new
|
|
4538
|
+
const S = h ?? ((q = x == null ? void 0 : x[0]) != null && q.schema ? He(x[0].schema) : void 0), b = new Ss({
|
|
4543
4539
|
method: e.method.toLocaleUpperCase(),
|
|
4544
|
-
url: (
|
|
4540
|
+
url: (g ?? a.data.schema.url ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4545
4541
|
postData: S ? {
|
|
4546
4542
|
text: JSON.stringify(S, null, 2),
|
|
4547
4543
|
mimeType: "application/json"
|
|
@@ -4553,31 +4549,31 @@ const ws = ({
|
|
|
4553
4549
|
headersSize: 0,
|
|
4554
4550
|
bodySize: 0
|
|
4555
4551
|
});
|
|
4556
|
-
return
|
|
4552
|
+
return Es(b, $);
|
|
4557
4553
|
}, [
|
|
4558
4554
|
h,
|
|
4559
4555
|
x,
|
|
4560
4556
|
e.method,
|
|
4561
4557
|
e.path,
|
|
4562
|
-
|
|
4558
|
+
g,
|
|
4563
4559
|
a.data.schema.url,
|
|
4564
4560
|
$
|
|
4565
|
-
]), [O, T] =
|
|
4566
|
-
return /* @__PURE__ */
|
|
4561
|
+
]), [O, T] = Os({ rootMargin: "200px 0px 200px 0px" });
|
|
4562
|
+
return /* @__PURE__ */ m.jsxs(
|
|
4567
4563
|
"aside",
|
|
4568
4564
|
{
|
|
4569
4565
|
ref: O,
|
|
4570
4566
|
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
4571
4567
|
children: [
|
|
4572
|
-
/* @__PURE__ */
|
|
4573
|
-
/* @__PURE__ */
|
|
4574
|
-
/* @__PURE__ */
|
|
4575
|
-
/* @__PURE__ */
|
|
4568
|
+
/* @__PURE__ */ m.jsxs(Cr, { children: [
|
|
4569
|
+
/* @__PURE__ */ m.jsxs(Rr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4570
|
+
/* @__PURE__ */ m.jsxs("span", { className: "font-mono break-words", children: [
|
|
4571
|
+
/* @__PURE__ */ m.jsx("span", { className: le("font-semibold", i), children: e.method.toLocaleUpperCase() }),
|
|
4576
4572
|
" ",
|
|
4577
4573
|
p
|
|
4578
4574
|
] }),
|
|
4579
|
-
T && /* @__PURE__ */
|
|
4580
|
-
|
|
4575
|
+
T && /* @__PURE__ */ m.jsx(
|
|
4576
|
+
Ps,
|
|
4581
4577
|
{
|
|
4582
4578
|
server: a.data.schema.url ?? "",
|
|
4583
4579
|
servers: a.data.schema.servers.map((S) => S.url),
|
|
@@ -4586,9 +4582,9 @@ const ws = ({
|
|
|
4586
4582
|
}
|
|
4587
4583
|
)
|
|
4588
4584
|
] }),
|
|
4589
|
-
T && /* @__PURE__ */
|
|
4590
|
-
/* @__PURE__ */
|
|
4591
|
-
|
|
4585
|
+
T && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
4586
|
+
/* @__PURE__ */ m.jsx(xo, { className: "p-0", children: /* @__PURE__ */ m.jsx(bo, { children: /* @__PURE__ */ m.jsx(
|
|
4587
|
+
ao,
|
|
4592
4588
|
{
|
|
4593
4589
|
language: $,
|
|
4594
4590
|
noBackground: !0,
|
|
@@ -4596,9 +4592,9 @@ const ws = ({
|
|
|
4596
4592
|
code: v
|
|
4597
4593
|
}
|
|
4598
4594
|
) }) }),
|
|
4599
|
-
/* @__PURE__ */
|
|
4600
|
-
/* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ m.jsxs($o, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
4596
|
+
/* @__PURE__ */ m.jsx("span", { children: "Show example in" }),
|
|
4597
|
+
/* @__PURE__ */ m.jsx(
|
|
4602
4598
|
et,
|
|
4603
4599
|
{
|
|
4604
4600
|
className: "self-start max-w-[150px]",
|
|
@@ -4608,21 +4604,21 @@ const ws = ({
|
|
|
4608
4604
|
u((b) => (b.set("lang", S.target.value), b));
|
|
4609
4605
|
});
|
|
4610
4606
|
},
|
|
4611
|
-
options:
|
|
4607
|
+
options: Is
|
|
4612
4608
|
}
|
|
4613
4609
|
)
|
|
4614
4610
|
] })
|
|
4615
4611
|
] })
|
|
4616
4612
|
] }),
|
|
4617
|
-
T && x && /* @__PURE__ */
|
|
4618
|
-
|
|
4613
|
+
T && x && /* @__PURE__ */ m.jsx(
|
|
4614
|
+
qs,
|
|
4619
4615
|
{
|
|
4620
4616
|
content: x,
|
|
4621
4617
|
onExampleChange: y
|
|
4622
4618
|
}
|
|
4623
4619
|
),
|
|
4624
|
-
T && e.responses.length > 0 && /* @__PURE__ */
|
|
4625
|
-
|
|
4620
|
+
T && e.responses.length > 0 && /* @__PURE__ */ m.jsx(
|
|
4621
|
+
ks,
|
|
4626
4622
|
{
|
|
4627
4623
|
selectedResponse: r,
|
|
4628
4624
|
onSelectResponse: t,
|
|
@@ -4632,75 +4628,75 @@ const ws = ({
|
|
|
4632
4628
|
]
|
|
4633
4629
|
}
|
|
4634
4630
|
);
|
|
4635
|
-
},
|
|
4636
|
-
AND: /* @__PURE__ */
|
|
4637
|
-
OR: /* @__PURE__ */
|
|
4638
|
-
ONE: /* @__PURE__ */
|
|
4639
|
-
},
|
|
4631
|
+
}, Us = (e) => Object.entries(e), Fs = {
|
|
4632
|
+
AND: /* @__PURE__ */ m.jsx(Jo, { size: 16, className: "fill-card" }),
|
|
4633
|
+
OR: /* @__PURE__ */ m.jsx(Vo, { size: 16, className: "fill-card" }),
|
|
4634
|
+
ONE: /* @__PURE__ */ m.jsx(Do, { size: 14, className: "fill-card" })
|
|
4635
|
+
}, _s = {
|
|
4640
4636
|
AND: "text-green-500 dark:text-green-300/60",
|
|
4641
4637
|
OR: "text-blue-400 dark:text-blue-500",
|
|
4642
4638
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
4643
|
-
},
|
|
4639
|
+
}, Bs = ({
|
|
4644
4640
|
type: e,
|
|
4645
4641
|
isOpen: r,
|
|
4646
4642
|
className: t
|
|
4647
|
-
}) => /* @__PURE__ */
|
|
4643
|
+
}) => /* @__PURE__ */ m.jsx(
|
|
4648
4644
|
"div",
|
|
4649
4645
|
{
|
|
4650
4646
|
className: le(
|
|
4651
|
-
|
|
4647
|
+
_s[e],
|
|
4652
4648
|
"relative text-sm flex py-2",
|
|
4653
4649
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
4654
4650
|
t
|
|
4655
4651
|
),
|
|
4656
|
-
children: /* @__PURE__ */
|
|
4657
|
-
|
|
4658
|
-
/* @__PURE__ */
|
|
4652
|
+
children: /* @__PURE__ */ m.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
4653
|
+
Fs[e],
|
|
4654
|
+
/* @__PURE__ */ m.jsx(
|
|
4659
4655
|
"div",
|
|
4660
4656
|
{
|
|
4661
4657
|
className: le(
|
|
4662
4658
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
4663
4659
|
!r && "-rotate-90"
|
|
4664
4660
|
),
|
|
4665
|
-
children: /* @__PURE__ */
|
|
4661
|
+
children: /* @__PURE__ */ m.jsx(Wo, { size: 16 })
|
|
4666
4662
|
}
|
|
4667
4663
|
)
|
|
4668
4664
|
] })
|
|
4669
4665
|
}
|
|
4670
|
-
),
|
|
4666
|
+
), Hs = (e) => {
|
|
4671
4667
|
const [r, t] = ge(!0);
|
|
4672
|
-
return /* @__PURE__ */
|
|
4668
|
+
return /* @__PURE__ */ m.jsxs(
|
|
4673
4669
|
xe.Root,
|
|
4674
4670
|
{
|
|
4675
4671
|
open: r,
|
|
4676
4672
|
onOpenChange: () => t((o) => !o),
|
|
4677
4673
|
className: "group",
|
|
4678
4674
|
children: [
|
|
4679
|
-
/* @__PURE__ */
|
|
4680
|
-
!r && /* @__PURE__ */
|
|
4681
|
-
/* @__PURE__ */
|
|
4675
|
+
/* @__PURE__ */ m.jsx(xe.Trigger, { children: /* @__PURE__ */ m.jsx(Bs, { type: e.type, isOpen: r }) }),
|
|
4676
|
+
!r && /* @__PURE__ */ m.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
4677
|
+
/* @__PURE__ */ m.jsx(xe.Content, { children: /* @__PURE__ */ m.jsx(Ge, { schema: e.schema, level: e.level + 1 }) })
|
|
4682
4678
|
]
|
|
4683
4679
|
}
|
|
4684
4680
|
);
|
|
4685
|
-
},
|
|
4681
|
+
}, Ms = {
|
|
4686
4682
|
AND: "All of",
|
|
4687
4683
|
OR: "Any of",
|
|
4688
4684
|
ONE: "One of"
|
|
4689
|
-
},
|
|
4685
|
+
}, zs = ({
|
|
4690
4686
|
schemas: e,
|
|
4691
4687
|
type: r,
|
|
4692
4688
|
isOpen: t,
|
|
4693
4689
|
level: o,
|
|
4694
4690
|
toggleOpen: s
|
|
4695
|
-
}) => /* @__PURE__ */
|
|
4696
|
-
/* @__PURE__ */
|
|
4697
|
-
t ? /* @__PURE__ */
|
|
4698
|
-
/* @__PURE__ */
|
|
4691
|
+
}) => /* @__PURE__ */ m.jsx(xe.Root, { open: t, onOpenChange: s, asChild: !0, children: /* @__PURE__ */ m.jsxs(be, { className: "px-6", children: [
|
|
4692
|
+
/* @__PURE__ */ m.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
4693
|
+
t ? /* @__PURE__ */ m.jsx(Qo, { size: 14 }) : /* @__PURE__ */ m.jsx(Ko, { size: 14 }),
|
|
4694
|
+
/* @__PURE__ */ m.jsx("span", { children: Ms[r] })
|
|
4699
4695
|
] }),
|
|
4700
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ m.jsx(xe.Content, { className: "pb-4", children: e.map((l, n) => (
|
|
4701
4697
|
// eslint-disable-next-line react/no-array-index-key
|
|
4702
|
-
/* @__PURE__ */
|
|
4703
|
-
|
|
4698
|
+
/* @__PURE__ */ m.jsx(
|
|
4699
|
+
Hs,
|
|
4704
4700
|
{
|
|
4705
4701
|
type: r,
|
|
4706
4702
|
schema: l,
|
|
@@ -4709,19 +4705,19 @@ const ws = ({
|
|
|
4709
4705
|
n
|
|
4710
4706
|
)
|
|
4711
4707
|
)) })
|
|
4712
|
-
] }) }),
|
|
4708
|
+
] }) }), Gs = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), gr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Ws = {
|
|
4713
4709
|
allOf: "AND",
|
|
4714
4710
|
anyOf: "OR",
|
|
4715
4711
|
oneOf: "ONE"
|
|
4716
|
-
},
|
|
4712
|
+
}, hr = (e) => e === va, wo = ({
|
|
4717
4713
|
schema: e,
|
|
4718
4714
|
level: r
|
|
4719
4715
|
}) => {
|
|
4720
|
-
const [t, o] = ge(!0), s =
|
|
4721
|
-
for (const [l, n] of
|
|
4716
|
+
const [t, o] = ge(!0), s = ta(() => o((l) => !l), []);
|
|
4717
|
+
for (const [l, n] of Us(Ws))
|
|
4722
4718
|
if (e[l])
|
|
4723
|
-
return /* @__PURE__ */
|
|
4724
|
-
|
|
4719
|
+
return /* @__PURE__ */ m.jsx(
|
|
4720
|
+
zs,
|
|
4725
4721
|
{
|
|
4726
4722
|
schemas: e[l],
|
|
4727
4723
|
type: n,
|
|
@@ -4730,9 +4726,9 @@ const ws = ({
|
|
|
4730
4726
|
level: r
|
|
4731
4727
|
}
|
|
4732
4728
|
);
|
|
4733
|
-
},
|
|
4734
|
-
/* @__PURE__ */
|
|
4735
|
-
/* @__PURE__ */
|
|
4729
|
+
}, Zn = () => /* @__PURE__ */ m.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: [
|
|
4730
|
+
/* @__PURE__ */ m.jsx(Xo, { size: 16 }),
|
|
4731
|
+
/* @__PURE__ */ m.jsx("span", { children: "circular" })
|
|
4736
4732
|
] }), Js = ({
|
|
4737
4733
|
name: e,
|
|
4738
4734
|
schema: r,
|
|
@@ -4742,45 +4738,48 @@ const ws = ({
|
|
|
4742
4738
|
showCollapseButton: l = !0
|
|
4743
4739
|
}) => {
|
|
4744
4740
|
const [n, a] = ge(s);
|
|
4745
|
-
return
|
|
4746
|
-
/* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
|
|
4749
|
-
/* @__PURE__ */
|
|
4750
|
-
|
|
4751
|
-
|
|
4741
|
+
return hr(r) ? /* @__PURE__ */ m.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ m.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ m.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4742
|
+
/* @__PURE__ */ m.jsx("code", { children: e }),
|
|
4743
|
+
/* @__PURE__ */ m.jsx(Ce, { variant: "muted", children: "object" }),
|
|
4744
|
+
t === "optional" && /* @__PURE__ */ m.jsx(Ce, { variant: "outline", children: "optional" }),
|
|
4745
|
+
/* @__PURE__ */ m.jsx(Zn, {})
|
|
4746
|
+
] }) }) }) : /* @__PURE__ */ m.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
|
|
4747
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
4748
|
+
/* @__PURE__ */ m.jsx("code", { children: e }),
|
|
4749
|
+
/* @__PURE__ */ m.jsx(Ce, { variant: "muted", children: r.type === "array" && r.items.type ? /* @__PURE__ */ m.jsxs("span", { children: [
|
|
4752
4750
|
r.items.type,
|
|
4753
4751
|
"[]"
|
|
4754
|
-
] }) : Array.isArray(r.type) ? /* @__PURE__ */
|
|
4755
|
-
t === "optional" && /* @__PURE__ */
|
|
4752
|
+
] }) : Array.isArray(r.type) ? /* @__PURE__ */ m.jsx("span", { children: r.type.join(" | ") }) : /* @__PURE__ */ m.jsx("span", { children: r.type }) }),
|
|
4753
|
+
t === "optional" && /* @__PURE__ */ m.jsx(Ce, { variant: "outline", children: "optional" }),
|
|
4754
|
+
r.type === "array" && "items" in r && hr(r.items) && /* @__PURE__ */ m.jsx(Zn, {})
|
|
4756
4755
|
] }),
|
|
4757
|
-
r.description && /* @__PURE__ */
|
|
4758
|
-
|
|
4756
|
+
r.description && /* @__PURE__ */ m.jsx(
|
|
4757
|
+
Re,
|
|
4759
4758
|
{
|
|
4760
|
-
className: le(
|
|
4759
|
+
className: le(Le, "text-sm leading-normal line-clamp-4"),
|
|
4761
4760
|
content: r.description
|
|
4762
4761
|
}
|
|
4763
4762
|
),
|
|
4764
|
-
(
|
|
4763
|
+
(gr(r) || Gs(r)) && /* @__PURE__ */ m.jsxs(
|
|
4765
4764
|
xe.Root,
|
|
4766
4765
|
{
|
|
4767
4766
|
defaultOpen: s,
|
|
4768
4767
|
open: n,
|
|
4769
4768
|
onOpenChange: () => a(!n),
|
|
4770
4769
|
children: [
|
|
4771
|
-
l && /* @__PURE__ */
|
|
4772
|
-
|
|
4770
|
+
l && /* @__PURE__ */ m.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ m.jsxs(
|
|
4771
|
+
ro,
|
|
4773
4772
|
{
|
|
4774
4773
|
variant: "outline",
|
|
4775
4774
|
size: "sm",
|
|
4776
4775
|
className: "mt-2 flex gap-1.5",
|
|
4777
4776
|
children: [
|
|
4778
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ m.jsx(Yo, { size: 18 }),
|
|
4779
4778
|
n ? "Hide nested properties" : "Show nested properties"
|
|
4780
4779
|
]
|
|
4781
4780
|
}
|
|
4782
4781
|
) }),
|
|
4783
|
-
/* @__PURE__ */
|
|
4782
|
+
/* @__PURE__ */ m.jsx(xe.Content, { children: /* @__PURE__ */ m.jsx("div", { className: "mt-2", children: gr(r) ? /* @__PURE__ */ m.jsx(wo, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ m.jsx(Ge, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !hr(r.items) && /* @__PURE__ */ m.jsx(Ge, { schema: r.items, level: o + 1 }) }) })
|
|
4784
4783
|
]
|
|
4785
4784
|
}
|
|
4786
4785
|
)
|
|
@@ -4791,41 +4790,41 @@ const ws = ({
|
|
|
4791
4790
|
defaultOpen: t = !1
|
|
4792
4791
|
}) => {
|
|
4793
4792
|
if (!e || Object.keys(e).length === 0)
|
|
4794
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ m.jsx(be, { className: "p-4", children: /* @__PURE__ */ m.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
4795
4794
|
const o = (s, l) => {
|
|
4796
|
-
if (
|
|
4797
|
-
return /* @__PURE__ */
|
|
4795
|
+
if (gr(s))
|
|
4796
|
+
return /* @__PURE__ */ m.jsx(wo, { schema: s, level: l });
|
|
4798
4797
|
if (s.type === "array" && s.items) {
|
|
4799
4798
|
const n = s.items;
|
|
4800
|
-
return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */
|
|
4801
|
-
/* @__PURE__ */
|
|
4799
|
+
return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */ m.jsxs(be, { className: "p-4", children: [
|
|
4800
|
+
/* @__PURE__ */ m.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
4802
4801
|
n.type,
|
|
4803
4802
|
"[]"
|
|
4804
4803
|
] }),
|
|
4805
|
-
s.description && /* @__PURE__ */
|
|
4806
|
-
|
|
4804
|
+
s.description && /* @__PURE__ */ m.jsx(
|
|
4805
|
+
Re,
|
|
4807
4806
|
{
|
|
4808
4807
|
className: le(
|
|
4809
|
-
|
|
4808
|
+
Le,
|
|
4810
4809
|
"text-sm leading-normal line-clamp-4"
|
|
4811
4810
|
),
|
|
4812
4811
|
content: s.description
|
|
4813
4812
|
}
|
|
4814
4813
|
)
|
|
4815
|
-
] }) : n.type === "object" ? /* @__PURE__ */
|
|
4816
|
-
/* @__PURE__ */
|
|
4814
|
+
] }) : n.type === "object" ? /* @__PURE__ */ m.jsxs(be, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
|
|
4815
|
+
/* @__PURE__ */ m.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
|
|
4817
4816
|
o(n, l + 1)
|
|
4818
4817
|
] }) : o(n, l + 1);
|
|
4819
4818
|
}
|
|
4820
4819
|
if (s.type === "object" && (!s.properties || Object.keys(s.properties).length === 0))
|
|
4821
|
-
return /* @__PURE__ */
|
|
4822
|
-
"name" in s && /* @__PURE__ */
|
|
4823
|
-
/* @__PURE__ */
|
|
4824
|
-
s.description && /* @__PURE__ */
|
|
4825
|
-
|
|
4820
|
+
return /* @__PURE__ */ m.jsxs(be, { className: "p-4 flex gap-2 items-center", children: [
|
|
4821
|
+
"name" in s && /* @__PURE__ */ m.jsx(m.Fragment, { children: s.name }),
|
|
4822
|
+
/* @__PURE__ */ m.jsx("span", { className: "text-sm text-muted-foreground", children: "object" }),
|
|
4823
|
+
s.description && /* @__PURE__ */ m.jsx(
|
|
4824
|
+
Re,
|
|
4826
4825
|
{
|
|
4827
4826
|
className: le(
|
|
4828
|
-
|
|
4827
|
+
Le,
|
|
4829
4828
|
"text-sm leading-normal line-clamp-4"
|
|
4830
4829
|
),
|
|
4831
4830
|
content: s.description
|
|
@@ -4833,15 +4832,15 @@ const ws = ({
|
|
|
4833
4832
|
)
|
|
4834
4833
|
] });
|
|
4835
4834
|
if (s.properties) {
|
|
4836
|
-
const n =
|
|
4835
|
+
const n = io(
|
|
4837
4836
|
Object.entries(s.properties),
|
|
4838
4837
|
([i, c]) => {
|
|
4839
4838
|
var u;
|
|
4840
4839
|
return c.deprecated ? "deprecated" : (u = s.required) != null && u.includes(i) ? "required" : "optional";
|
|
4841
4840
|
}
|
|
4842
4841
|
), a = ["required", "optional", "deprecated"];
|
|
4843
|
-
return /* @__PURE__ */
|
|
4844
|
-
(i) => n[i] && /* @__PURE__ */
|
|
4842
|
+
return /* @__PURE__ */ m.jsx(be, { className: "divide-y overflow-hidden", children: a.map(
|
|
4843
|
+
(i) => n[i] && /* @__PURE__ */ m.jsx("ul", { className: "divide-y", children: n[i].map(([c, u]) => /* @__PURE__ */ m.jsx(
|
|
4845
4844
|
Js,
|
|
4846
4845
|
{
|
|
4847
4846
|
name: c,
|
|
@@ -4854,21 +4853,21 @@ const ws = ({
|
|
|
4854
4853
|
)) }, i)
|
|
4855
4854
|
) });
|
|
4856
4855
|
}
|
|
4857
|
-
return typeof s.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(s.type) ? /* @__PURE__ */
|
|
4858
|
-
/* @__PURE__ */
|
|
4859
|
-
s.description && /* @__PURE__ */
|
|
4860
|
-
|
|
4856
|
+
return typeof s.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(s.type) ? /* @__PURE__ */ m.jsxs(be, { className: "p-4", children: [
|
|
4857
|
+
/* @__PURE__ */ m.jsx("span", { className: "text-sm text-muted-foreground", children: s.type }),
|
|
4858
|
+
s.description && /* @__PURE__ */ m.jsx(
|
|
4859
|
+
Re,
|
|
4861
4860
|
{
|
|
4862
4861
|
className: le(
|
|
4863
|
-
|
|
4862
|
+
Le,
|
|
4864
4863
|
"text-sm leading-normal line-clamp-4"
|
|
4865
4864
|
),
|
|
4866
4865
|
content: s.description
|
|
4867
4866
|
}
|
|
4868
4867
|
)
|
|
4869
|
-
] }) : s.additionalProperties ? /* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
/* @__PURE__ */
|
|
4868
|
+
] }) : s.additionalProperties ? /* @__PURE__ */ m.jsxs(be, { className: "my-2", children: [
|
|
4869
|
+
/* @__PURE__ */ m.jsx(fa, { children: /* @__PURE__ */ m.jsx(pa, { children: "Additional Properties:" }) }),
|
|
4870
|
+
/* @__PURE__ */ m.jsx(da, { children: o(
|
|
4872
4871
|
s.additionalProperties,
|
|
4873
4872
|
l + 1
|
|
4874
4873
|
) })
|
|
@@ -4880,20 +4879,29 @@ const ws = ({
|
|
|
4880
4879
|
serverUrl: r
|
|
4881
4880
|
}) => {
|
|
4882
4881
|
var i, c, u;
|
|
4883
|
-
const t =
|
|
4882
|
+
const t = ba(Ks, e), o = io(
|
|
4884
4883
|
t.parameters ?? [],
|
|
4885
4884
|
(f) => f.in
|
|
4886
|
-
), s =
|
|
4887
|
-
return /* @__PURE__ */
|
|
4885
|
+
), s = xr(null), l = t.responses.at(0), [n, a] = ge(l == null ? void 0 : l.statusCode);
|
|
4886
|
+
return /* @__PURE__ */ m.jsxs(
|
|
4888
4887
|
"div",
|
|
4889
4888
|
{
|
|
4890
4889
|
className: "grid grid-cols-1 lg:grid-cols-[minmax(0,4fr)_minmax(0,3fr)] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
4891
4890
|
children: [
|
|
4892
|
-
/* @__PURE__ */
|
|
4893
|
-
/* @__PURE__ */
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4891
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
4892
|
+
/* @__PURE__ */ m.jsx(
|
|
4893
|
+
Be,
|
|
4894
|
+
{
|
|
4895
|
+
level: 2,
|
|
4896
|
+
id: t.slug,
|
|
4897
|
+
registerSidebarAnchor: !0,
|
|
4898
|
+
className: "break-all",
|
|
4899
|
+
children: t.summary
|
|
4900
|
+
}
|
|
4901
|
+
),
|
|
4902
|
+
/* @__PURE__ */ m.jsxs("div", { className: "text-sm flex gap-2 font-mono", children: [
|
|
4903
|
+
/* @__PURE__ */ m.jsx("span", { className: oo(t.method), children: t.method.toUpperCase() }),
|
|
4904
|
+
/* @__PURE__ */ m.jsxs(
|
|
4897
4905
|
"div",
|
|
4898
4906
|
{
|
|
4899
4907
|
ref: s,
|
|
@@ -4907,24 +4915,24 @@ const ws = ({
|
|
|
4907
4915
|
}
|
|
4908
4916
|
},
|
|
4909
4917
|
children: [
|
|
4910
|
-
r && /* @__PURE__ */
|
|
4911
|
-
/* @__PURE__ */
|
|
4918
|
+
r && /* @__PURE__ */ m.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: r }),
|
|
4919
|
+
/* @__PURE__ */ m.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
|
|
4912
4920
|
]
|
|
4913
4921
|
}
|
|
4914
4922
|
)
|
|
4915
4923
|
] }),
|
|
4916
|
-
t.description && /* @__PURE__ */
|
|
4917
|
-
|
|
4924
|
+
t.description && /* @__PURE__ */ m.jsx(
|
|
4925
|
+
Re,
|
|
4918
4926
|
{
|
|
4919
|
-
className: `${
|
|
4927
|
+
className: `${Le} max-w-full prose-img:max-w-prose`,
|
|
4920
4928
|
content: t.description
|
|
4921
4929
|
}
|
|
4922
4930
|
),
|
|
4923
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */
|
|
4931
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ m.jsx(m.Fragment, { children: Vs.flatMap(
|
|
4924
4932
|
(f) => {
|
|
4925
4933
|
var h;
|
|
4926
|
-
return (h = o[f]) != null && h.length ? /* @__PURE__ */
|
|
4927
|
-
|
|
4934
|
+
return (h = o[f]) != null && h.length ? /* @__PURE__ */ m.jsx(
|
|
4935
|
+
Ta,
|
|
4928
4936
|
{
|
|
4929
4937
|
id: t.slug,
|
|
4930
4938
|
parameters: o[f],
|
|
@@ -4934,9 +4942,9 @@ const ws = ({
|
|
|
4934
4942
|
) : [];
|
|
4935
4943
|
}
|
|
4936
4944
|
) }),
|
|
4937
|
-
|
|
4938
|
-
/* @__PURE__ */
|
|
4939
|
-
|
|
4945
|
+
ja((u = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : u.schema, (f) => /* @__PURE__ */ m.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4946
|
+
/* @__PURE__ */ m.jsx(
|
|
4947
|
+
Be,
|
|
4940
4948
|
{
|
|
4941
4949
|
level: 3,
|
|
4942
4950
|
className: "capitalize",
|
|
@@ -4944,11 +4952,11 @@ const ws = ({
|
|
|
4944
4952
|
children: "Request Body"
|
|
4945
4953
|
}
|
|
4946
4954
|
),
|
|
4947
|
-
/* @__PURE__ */
|
|
4955
|
+
/* @__PURE__ */ m.jsx(Ge, { schema: f })
|
|
4948
4956
|
] })),
|
|
4949
|
-
t.responses.length > 0 && /* @__PURE__ */
|
|
4950
|
-
/* @__PURE__ */
|
|
4951
|
-
|
|
4957
|
+
t.responses.length > 0 && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
4958
|
+
/* @__PURE__ */ m.jsx(
|
|
4959
|
+
Be,
|
|
4952
4960
|
{
|
|
4953
4961
|
level: 3,
|
|
4954
4962
|
className: "capitalize mt-8 pt-8 border-t",
|
|
@@ -4956,14 +4964,14 @@ const ws = ({
|
|
|
4956
4964
|
children: "Responses"
|
|
4957
4965
|
}
|
|
4958
4966
|
),
|
|
4959
|
-
/* @__PURE__ */
|
|
4960
|
-
|
|
4967
|
+
/* @__PURE__ */ m.jsxs(
|
|
4968
|
+
sa,
|
|
4961
4969
|
{
|
|
4962
4970
|
onValueChange: (f) => a(f),
|
|
4963
4971
|
value: n,
|
|
4964
4972
|
children: [
|
|
4965
|
-
t.responses.length > 1 && /* @__PURE__ */
|
|
4966
|
-
|
|
4973
|
+
t.responses.length > 1 && /* @__PURE__ */ m.jsx(la, { children: t.responses.map((f) => /* @__PURE__ */ m.jsx(
|
|
4974
|
+
ca,
|
|
4967
4975
|
{
|
|
4968
4976
|
value: f.statusCode,
|
|
4969
4977
|
title: f.description ?? void 0,
|
|
@@ -4971,13 +4979,13 @@ const ws = ({
|
|
|
4971
4979
|
},
|
|
4972
4980
|
f.statusCode
|
|
4973
4981
|
)) }),
|
|
4974
|
-
/* @__PURE__ */
|
|
4982
|
+
/* @__PURE__ */ m.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
|
|
4975
4983
|
var h, y;
|
|
4976
|
-
return /* @__PURE__ */
|
|
4977
|
-
|
|
4984
|
+
return /* @__PURE__ */ m.jsx(
|
|
4985
|
+
ua,
|
|
4978
4986
|
{
|
|
4979
4987
|
value: f.statusCode,
|
|
4980
|
-
children: /* @__PURE__ */
|
|
4988
|
+
children: /* @__PURE__ */ m.jsx(
|
|
4981
4989
|
Ge,
|
|
4982
4990
|
{
|
|
4983
4991
|
schema: (y = (h = f.content) == null ? void 0 : h.find(($) => $.schema)) == null ? void 0 : y.schema
|
|
@@ -4992,8 +5000,8 @@ const ws = ({
|
|
|
4992
5000
|
)
|
|
4993
5001
|
] })
|
|
4994
5002
|
] }),
|
|
4995
|
-
/* @__PURE__ */
|
|
4996
|
-
|
|
5003
|
+
/* @__PURE__ */ m.jsx(
|
|
5004
|
+
Ls,
|
|
4997
5005
|
{
|
|
4998
5006
|
selectedResponse: n,
|
|
4999
5007
|
onSelectResponse: a,
|
|
@@ -5103,48 +5111,48 @@ const Ks = rt(
|
|
|
5103
5111
|
tag: e,
|
|
5104
5112
|
untagged: r
|
|
5105
5113
|
}) => {
|
|
5106
|
-
const { input: t, type: o, versions: s, version: l } =
|
|
5114
|
+
const { input: t, type: o, versions: s, version: l } = jr(), n = wr(Ys, {
|
|
5107
5115
|
input: t,
|
|
5108
5116
|
type: o,
|
|
5109
5117
|
tag: e,
|
|
5110
5118
|
untagged: r
|
|
5111
|
-
}), { selectedServer: a } =
|
|
5112
|
-
|
|
5119
|
+
}), { selectedServer: a } = br(), i = vr(n), c = i.data.schema.title, u = i.data.schema.summary, f = i.data.schema.description, h = ko(), y = i.data.schema.operations;
|
|
5120
|
+
Ro();
|
|
5113
5121
|
const $ = u || (f ? Qs(f) : void 0);
|
|
5114
|
-
return /* @__PURE__ */
|
|
5115
|
-
/* @__PURE__ */
|
|
5116
|
-
/* @__PURE__ */
|
|
5117
|
-
$ && /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ m.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
5123
|
+
/* @__PURE__ */ m.jsxs(qo, { children: [
|
|
5124
|
+
/* @__PURE__ */ m.jsx("title", { children: c }),
|
|
5125
|
+
$ && /* @__PURE__ */ m.jsx("meta", { name: "description", content: $ })
|
|
5118
5126
|
] }),
|
|
5119
|
-
/* @__PURE__ */
|
|
5127
|
+
/* @__PURE__ */ m.jsxs(
|
|
5120
5128
|
"div",
|
|
5121
5129
|
{
|
|
5122
|
-
className: le(
|
|
5130
|
+
className: le(Le, "mb-16 max-w-full prose-img:max-w-prose"),
|
|
5123
5131
|
children: [
|
|
5124
|
-
/* @__PURE__ */
|
|
5125
|
-
/* @__PURE__ */
|
|
5126
|
-
/* @__PURE__ */
|
|
5127
|
-
/* @__PURE__ */
|
|
5132
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex", children: [
|
|
5133
|
+
/* @__PURE__ */ m.jsxs("div", { className: "flex-1", children: [
|
|
5134
|
+
/* @__PURE__ */ m.jsx(Fo, { children: "Overview" }),
|
|
5135
|
+
/* @__PURE__ */ m.jsx(Be, { level: 1, id: "description", registerSidebarAnchor: !0, children: c })
|
|
5128
5136
|
] }),
|
|
5129
|
-
/* @__PURE__ */
|
|
5130
|
-
|
|
5137
|
+
/* @__PURE__ */ m.jsx("div", { children: Object.entries(s).length > 1 && /* @__PURE__ */ m.jsxs(
|
|
5138
|
+
Eo,
|
|
5131
5139
|
{
|
|
5132
5140
|
onValueChange: (x) => h(s[x]),
|
|
5133
5141
|
defaultValue: l,
|
|
5134
5142
|
children: [
|
|
5135
|
-
/* @__PURE__ */
|
|
5136
|
-
/* @__PURE__ */
|
|
5143
|
+
/* @__PURE__ */ m.jsx(Ao, { className: "w-[180px]", children: /* @__PURE__ */ m.jsx(Io, { placeholder: "Select version" }) }),
|
|
5144
|
+
/* @__PURE__ */ m.jsx(Lo, { children: Object.entries(s).map(([x]) => /* @__PURE__ */ m.jsx(Uo, { value: x, children: x }, x)) })
|
|
5137
5145
|
]
|
|
5138
5146
|
}
|
|
5139
5147
|
) })
|
|
5140
5148
|
] }),
|
|
5141
|
-
/* @__PURE__ */
|
|
5149
|
+
/* @__PURE__ */ m.jsx(Re, { content: i.data.schema.description ?? "" })
|
|
5142
5150
|
]
|
|
5143
5151
|
}
|
|
5144
5152
|
),
|
|
5145
|
-
/* @__PURE__ */
|
|
5146
|
-
/* @__PURE__ */
|
|
5147
|
-
y.map((x) => /* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ m.jsx("hr", {}),
|
|
5154
|
+
/* @__PURE__ */ m.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ m.jsx($a, {}) }),
|
|
5155
|
+
y.map((x) => /* @__PURE__ */ m.jsx(
|
|
5148
5156
|
Ds,
|
|
5149
5157
|
{
|
|
5150
5158
|
serverUrl: a ?? i.data.schema.url ?? "",
|
|
@@ -5158,4 +5166,4 @@ export {
|
|
|
5158
5166
|
xl as OperationList,
|
|
5159
5167
|
Ks as OperationsFragment
|
|
5160
5168
|
};
|
|
5161
|
-
//# sourceMappingURL=OperationList-
|
|
5169
|
+
//# sourceMappingURL=OperationList-CDt1xdc4.js.map
|