zudoku 0.42.1 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/entry.client.js +21 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/config/loader.d.ts +1 -16
- package/dist/config/loader.js +9 -90
- package/dist/config/loader.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.d.ts +1 -1
- package/dist/lib/authentication/components/SignIn.js +5 -2
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.d.ts +1 -1
- package/dist/lib/authentication/components/SignUp.js +4 -1
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +8 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +7 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +9 -6
- 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 +3 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +40 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/vite/config.js +1 -1
- package/dist/vite/config.js.map +1 -1
- package/lib/AuthenticationPlugin-ByDF051g.js +99 -0
- package/lib/AuthenticationPlugin-ByDF051g.js.map +1 -0
- package/lib/Card-BtheiD7j.js +61 -0
- package/lib/Card-BtheiD7j.js.map +1 -0
- package/lib/{OasProvider-CZiF_RMW.js → OasProvider-DOs0v9u7.js} +2 -2
- package/lib/{OasProvider-CZiF_RMW.js.map → OasProvider-DOs0v9u7.js.map} +1 -1
- package/lib/{OperationList-CMMzLfIZ.js → OperationList-CKac6iap.js} +1152 -1102
- package/lib/OperationList-CKac6iap.js.map +1 -0
- package/lib/{SchemaList-_d3Mf4IX.js → SchemaList-BTX2mRMW.js} +3 -3
- package/lib/{SchemaList-_d3Mf4IX.js.map → SchemaList-BTX2mRMW.js.map} +1 -1
- package/lib/SchemaView-BYRn_-2l.js +388 -0
- package/lib/SchemaView-BYRn_-2l.js.map +1 -0
- package/lib/{index-BPqJMdth.js → index-DuB48L78.js} +393 -442
- package/lib/index-DuB48L78.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +4 -4
- package/src/app/entry.client.tsx +26 -0
- package/src/lib/authentication/components/SignIn.tsx +35 -2
- package/src/lib/authentication/components/SignUp.tsx +35 -1
- package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +30 -0
- package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +10 -4
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +31 -20
- package/src/lib/plugins/openapi/schema/utils.ts +5 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +45 -0
- package/lib/AuthenticationPlugin-DPCuR3xm.js +0 -58
- package/lib/AuthenticationPlugin-DPCuR3xm.js.map +0 -1
- package/lib/OperationList-CMMzLfIZ.js.map +0 -1
- package/lib/SchemaView-J7Srn-Iy.js +0 -357
- package/lib/SchemaView-J7Srn-Iy.js.map +0 -1
- package/lib/index-BPqJMdth.js.map +0 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { j as $ } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { d as
|
|
3
|
-
import { H as
|
|
4
|
-
import { ChevronsUpDownIcon as
|
|
5
|
-
import { b as
|
|
6
|
-
import { c as _e, u as
|
|
7
|
-
import { S as
|
|
8
|
-
import { C as
|
|
9
|
-
import { I as
|
|
10
|
-
import { P as
|
|
2
|
+
import { d as gr, u as Ca, m as Ra, t as Ea } from "./hook-CldJlP5c.js";
|
|
3
|
+
import { H as ka } from "./RouteGuard-DRtEu9nh.js";
|
|
4
|
+
import { ChevronsUpDownIcon as Xn, CheckIcon as Na, CopyIcon as Aa, MinusIcon as Ia, PlusIcon as Ua, UnfoldVerticalIcon as La, FoldVerticalIcon as Fa, ChevronsDownUpIcon as _a } from "lucide-react";
|
|
5
|
+
import { b as Ba, c as Ha, a as Ma } from "./chunk-BAXFHI7N-BVBOl9s0.js";
|
|
6
|
+
import { c as _e, u as vr, d as Zn, C as ea, b as ta, a as fr, P as za, m as ra, e as Wa, U as Ja } from "./index-DuB48L78.js";
|
|
7
|
+
import { S as Ga, a as Va, b as Da, c as Qa, e as Ka } from "./Select-CT64Ou40.js";
|
|
8
|
+
import { C as Ya } from "./CategoryHeading-D06WK_Wo.js";
|
|
9
|
+
import { I as Xa, S as na, M as De, H as Ue, P as pr } from "./Markdown-mFpg_n9p.js";
|
|
10
|
+
import { P as Za } from "./Pagination-DLPL5z77.js";
|
|
11
11
|
import { c as pe } from "./cn-qaFjX9_3.js";
|
|
12
|
-
import { useTransition as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { u as Qe, P as
|
|
15
|
-
import { u as
|
|
16
|
-
import { VisuallyHidden as
|
|
17
|
-
import { c as
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import { Card as
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
12
|
+
import { useTransition as aa, useState as ve, useRef as oa, useEffect as br, useLayoutEffect as eo, useMemo as ia } from "react";
|
|
13
|
+
import { Button as sa } from "./ui/Button.js";
|
|
14
|
+
import { u as Qe, i as to, P as ro, E as Ur, a as no, S as dr, g as ao } from "./SchemaView-BYRn_-2l.js";
|
|
15
|
+
import { u as xr } from "./context-Lrf2Y9bR.js";
|
|
16
|
+
import { VisuallyHidden as hr } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import { c as oo } from "./index-CPNSgwSb.js";
|
|
18
|
+
import { Tabs as io, TabsList as so, TabsTrigger as lo, TabsContent as co } from "./ui/Tabs.js";
|
|
19
|
+
import { Card as uo } from "./ui/Card.js";
|
|
20
|
+
import * as ft from "@radix-ui/react-collapsible";
|
|
21
|
+
import { g as fo, c as Ke, a as po } from "./_commonjsHelpers-B4e78b8K.js";
|
|
22
|
+
import { a as ho, b as yo } from "./index-DnQftvP4.js";
|
|
23
|
+
import { S as la } from "./SyntaxHighlight-CxhyyMkF.js";
|
|
24
|
+
import { B as Lr } from "./Button-BBNrKpQd.js";
|
|
24
25
|
import * as Ge from "@radix-ui/react-tabs";
|
|
25
|
-
function
|
|
26
|
+
function mo(e, n) {
|
|
26
27
|
return n;
|
|
27
28
|
}
|
|
28
29
|
const Ye = ({
|
|
@@ -30,7 +31,7 @@ const Ye = ({
|
|
|
30
31
|
onChange: n,
|
|
31
32
|
className: t,
|
|
32
33
|
options: a,
|
|
33
|
-
showChevrons:
|
|
34
|
+
showChevrons: l = !0
|
|
34
35
|
}) => /* @__PURE__ */ $.jsxs("div", { className: "grid", children: [
|
|
35
36
|
/* @__PURE__ */ $.jsx(
|
|
36
37
|
"select",
|
|
@@ -49,13 +50,13 @@ const Ye = ({
|
|
|
49
50
|
"div",
|
|
50
51
|
{
|
|
51
52
|
className: pe(
|
|
52
|
-
!
|
|
53
|
+
!l && "hidden",
|
|
53
54
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
54
55
|
),
|
|
55
|
-
children: /* @__PURE__ */ $.jsx(
|
|
56
|
+
children: /* @__PURE__ */ $.jsx(Xn, { size: 14 })
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
|
-
] }),
|
|
59
|
+
] }), go = _e(
|
|
59
60
|
/* GraphQL */
|
|
60
61
|
`
|
|
61
62
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -67,10 +68,10 @@ const Ye = ({
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
`
|
|
70
|
-
),
|
|
71
|
-
const [n, t] =
|
|
71
|
+
), Fr = ({ url: e }) => {
|
|
72
|
+
const [n, t] = ve(!1);
|
|
72
73
|
return /* @__PURE__ */ $.jsx(
|
|
73
|
-
|
|
74
|
+
sa,
|
|
74
75
|
{
|
|
75
76
|
onClick: () => {
|
|
76
77
|
navigator.clipboard.writeText(e).then(() => {
|
|
@@ -79,37 +80,37 @@ const Ye = ({
|
|
|
79
80
|
},
|
|
80
81
|
variant: "ghost",
|
|
81
82
|
size: "icon",
|
|
82
|
-
children: n ? /* @__PURE__ */ $.jsx(
|
|
83
|
+
children: n ? /* @__PURE__ */ $.jsx(Na, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ $.jsx(Aa, { size: 14, strokeWidth: 1.3 })
|
|
83
84
|
}
|
|
84
85
|
);
|
|
85
|
-
},
|
|
86
|
-
const { input: e, type: n } =
|
|
86
|
+
}, vo = () => {
|
|
87
|
+
const { input: e, type: n } = xr(), t = Qe(go, { input: e, type: n }), a = gr(t), [, l] = aa(), { selectedServer: s, setSelectedServer: r } = vr(
|
|
87
88
|
a.data.schema.servers
|
|
88
89
|
), { servers: o } = a.data.schema;
|
|
89
90
|
if (o.length === 0) return null;
|
|
90
91
|
const i = o.at(0);
|
|
91
92
|
return o.length === 1 ? /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
92
93
|
/* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
|
|
93
|
-
/* @__PURE__ */ $.jsx(
|
|
94
|
-
/* @__PURE__ */ $.jsx(
|
|
94
|
+
/* @__PURE__ */ $.jsx(Xa, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: i.url }),
|
|
95
|
+
/* @__PURE__ */ $.jsx(Fr, { url: i.url })
|
|
95
96
|
] }) : /* @__PURE__ */ $.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
96
97
|
/* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
97
98
|
/* @__PURE__ */ $.jsx(
|
|
98
99
|
Ye,
|
|
99
100
|
{
|
|
100
101
|
className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
|
|
101
|
-
onChange: (
|
|
102
|
+
onChange: (c) => l(() => r(c.target.value)),
|
|
102
103
|
value: s,
|
|
103
104
|
showChevrons: o.length > 1,
|
|
104
|
-
options: o.map((
|
|
105
|
-
value:
|
|
106
|
-
label:
|
|
105
|
+
options: o.map((c) => ({
|
|
106
|
+
value: c.url,
|
|
107
|
+
label: c.url
|
|
107
108
|
}))
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
|
-
/* @__PURE__ */ $.jsx(
|
|
111
|
+
/* @__PURE__ */ $.jsx(Fr, { url: s })
|
|
111
112
|
] });
|
|
112
|
-
},
|
|
113
|
+
}, bo = oo(
|
|
113
114
|
"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",
|
|
114
115
|
{
|
|
115
116
|
variants: {
|
|
@@ -126,21 +127,21 @@ const Ye = ({
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
);
|
|
129
|
-
function
|
|
130
|
-
return /* @__PURE__ */ $.jsx("div", { className: pe(
|
|
130
|
+
function _r({ className: e, variant: n, ...t }) {
|
|
131
|
+
return /* @__PURE__ */ $.jsx("div", { className: pe(bo({ variant: n }), e), ...t });
|
|
131
132
|
}
|
|
132
|
-
const
|
|
133
|
+
const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
133
134
|
type: "string"
|
|
134
|
-
},
|
|
135
|
+
}, wo = ({
|
|
135
136
|
parameter: e,
|
|
136
137
|
group: n,
|
|
137
138
|
id: t
|
|
138
139
|
}) => {
|
|
139
|
-
const a =
|
|
140
|
+
const a = $o(e), [l, s] = ve(!1);
|
|
140
141
|
return /* @__PURE__ */ $.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
|
|
141
142
|
/* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
142
|
-
/* @__PURE__ */ $.jsx(
|
|
143
|
-
|
|
143
|
+
/* @__PURE__ */ $.jsx(na, { asChild: !0, children: /* @__PURE__ */ $.jsx("code", { children: n === "path" ? /* @__PURE__ */ $.jsx(
|
|
144
|
+
Zn,
|
|
144
145
|
{
|
|
145
146
|
name: e.name,
|
|
146
147
|
backgroundOpacity: "15%",
|
|
@@ -149,7 +150,7 @@ const mo = (e, n) => e ? n(e) : void 0, go = (e) => e.schema != null && typeof e
|
|
|
149
150
|
}
|
|
150
151
|
) : e.name }) }),
|
|
151
152
|
/* @__PURE__ */ $.jsx(
|
|
152
|
-
|
|
153
|
+
ro,
|
|
153
154
|
{
|
|
154
155
|
schema: a,
|
|
155
156
|
extraItems: [
|
|
@@ -167,91 +168,111 @@ const mo = (e, n) => e ? n(e) : void 0, go = (e) => e.schema != null && typeof e
|
|
|
167
168
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
168
169
|
}
|
|
169
170
|
),
|
|
170
|
-
a.type === "array" && a.items.enum ? /* @__PURE__ */ $.jsx(
|
|
171
|
-
/* @__PURE__ */ $.jsx(
|
|
171
|
+
a.type === "array" && a.items.enum ? /* @__PURE__ */ $.jsx(Ur, { values: a.items.enum }) : a.enum && /* @__PURE__ */ $.jsx(Ur, { values: a.enum }),
|
|
172
|
+
/* @__PURE__ */ $.jsx(no, { schema: a }),
|
|
173
|
+
(a.type === "object" || to(a)) && /* @__PURE__ */ $.jsxs(
|
|
174
|
+
ft.Root,
|
|
175
|
+
{
|
|
176
|
+
defaultOpen: !1,
|
|
177
|
+
onOpenChange: s,
|
|
178
|
+
open: l,
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ $.jsx(ft.Trigger, { asChild: !0, children: /* @__PURE__ */ $.jsxs(sa, { variant: "expand", size: "sm", children: [
|
|
181
|
+
l ? /* @__PURE__ */ $.jsx(Ia, { size: 12 }) : /* @__PURE__ */ $.jsx(Ua, { size: 12 }),
|
|
182
|
+
l ? "Hide properties" : "Show properties"
|
|
183
|
+
] }) }),
|
|
184
|
+
/* @__PURE__ */ $.jsx(ft.Content, { children: /* @__PURE__ */ $.jsx("div", { className: "mt-2", children: /* @__PURE__ */ $.jsx(
|
|
185
|
+
dr,
|
|
186
|
+
{
|
|
187
|
+
schema: "items" in a ? a.items : a
|
|
188
|
+
}
|
|
189
|
+
) }) })
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
)
|
|
172
193
|
] });
|
|
173
|
-
},
|
|
194
|
+
}, jo = ({
|
|
174
195
|
summary: e,
|
|
175
196
|
group: n,
|
|
176
197
|
parameters: t,
|
|
177
198
|
id: a
|
|
178
199
|
}) => /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
179
|
-
/* @__PURE__ */ $.jsxs(
|
|
180
|
-
e && /* @__PURE__ */ $.jsxs(
|
|
200
|
+
/* @__PURE__ */ $.jsxs(Ue, { level: 3, id: `${a}/${n}-parameters`, className: "capitalize", children: [
|
|
201
|
+
e && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
181
202
|
e,
|
|
182
203
|
" › "
|
|
183
204
|
] }),
|
|
184
205
|
n === "header" ? "Headers" : `${n} Parameters`
|
|
185
206
|
] }),
|
|
186
|
-
/* @__PURE__ */ $.jsx(
|
|
187
|
-
|
|
207
|
+
/* @__PURE__ */ $.jsx(uo, { children: /* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((l, s) => l.required === s.required ? 0 : l.required ? -1 : 1).map((l) => /* @__PURE__ */ $.jsx(
|
|
208
|
+
wo,
|
|
188
209
|
{
|
|
189
|
-
parameter:
|
|
210
|
+
parameter: l,
|
|
190
211
|
id: a,
|
|
191
212
|
group: n
|
|
192
213
|
},
|
|
193
|
-
`${
|
|
214
|
+
`${l.name}-${l.in}`
|
|
194
215
|
)) }) })
|
|
195
216
|
] });
|
|
196
|
-
var
|
|
217
|
+
var Br = (e, n) => {
|
|
197
218
|
const t = e[n.name];
|
|
198
219
|
return t === void 0 ? (e[n.name] = n.value, e) : Array.isArray(t) ? (t.push(n.value), e) : (e[n.name] = [t, n.value], e);
|
|
199
|
-
},
|
|
220
|
+
}, Hr = "", Mr = `
|
|
200
221
|
`, V = class {
|
|
201
222
|
/**
|
|
202
223
|
* Helper object to format and aggragate lines of code.
|
|
203
224
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
204
225
|
*/
|
|
205
226
|
constructor({ indent: e, join: n } = {}) {
|
|
206
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
207
|
-
const
|
|
208
|
-
this.code.unshift(
|
|
227
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Hr, this.lineJoin = Mr, this.indentLine = (t, a = 0) => `${this.indentationCharacter.repeat(a)}${t}`, this.unshift = (t, a) => {
|
|
228
|
+
const l = this.indentLine(t, a);
|
|
229
|
+
this.code.unshift(l);
|
|
209
230
|
}, this.push = (t, a) => {
|
|
210
|
-
const
|
|
211
|
-
this.code.push(
|
|
231
|
+
const l = this.indentLine(t, a);
|
|
232
|
+
this.code.push(l);
|
|
212
233
|
}, this.blank = () => {
|
|
213
234
|
this.code.push("");
|
|
214
235
|
}, this.join = () => {
|
|
215
236
|
const t = this.code.join(this.lineJoin);
|
|
216
|
-
return this.postProcessors.reduce((
|
|
237
|
+
return this.postProcessors.reduce((l, s) => s(l), t);
|
|
217
238
|
}, this.addPostProcessor = (t) => {
|
|
218
239
|
this.postProcessors = [...this.postProcessors, t];
|
|
219
|
-
}, this.indentationCharacter = e ||
|
|
240
|
+
}, this.indentationCharacter = e || Hr, this.lineJoin = n ?? Mr;
|
|
220
241
|
}
|
|
221
|
-
},
|
|
222
|
-
function
|
|
223
|
-
return
|
|
242
|
+
}, pt, zr;
|
|
243
|
+
function So() {
|
|
244
|
+
return zr || (zr = 1, pt = function(e) {
|
|
224
245
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
225
|
-
}),
|
|
246
|
+
}), pt;
|
|
226
247
|
}
|
|
227
|
-
var
|
|
228
|
-
function
|
|
229
|
-
return
|
|
248
|
+
var dt, Wr;
|
|
249
|
+
function Oo() {
|
|
250
|
+
return Wr || (Wr = 1, dt = function(e) {
|
|
230
251
|
var n = typeof e;
|
|
231
252
|
return e !== null && (n === "object" || n === "function");
|
|
232
|
-
}),
|
|
253
|
+
}), dt;
|
|
233
254
|
}
|
|
234
|
-
var Je = {},
|
|
235
|
-
function
|
|
236
|
-
return
|
|
255
|
+
var Je = {}, Jr;
|
|
256
|
+
function To() {
|
|
257
|
+
return Jr || (Jr = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Je;
|
|
237
258
|
}
|
|
238
|
-
var
|
|
239
|
-
function
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
const e =
|
|
243
|
-
return
|
|
259
|
+
var ht, Gr;
|
|
260
|
+
function Po() {
|
|
261
|
+
if (Gr) return ht;
|
|
262
|
+
Gr = 1;
|
|
263
|
+
const e = So(), n = Oo(), t = To().default;
|
|
264
|
+
return ht = (a, l, s) => {
|
|
244
265
|
const r = [];
|
|
245
|
-
return function o(i,
|
|
246
|
-
|
|
266
|
+
return function o(i, c, u) {
|
|
267
|
+
c = c || {}, c.indent = c.indent || " ", u = u || "";
|
|
247
268
|
let y;
|
|
248
|
-
|
|
269
|
+
c.inlineCharacterLimit === void 0 ? y = {
|
|
249
270
|
newLine: `
|
|
250
271
|
`,
|
|
251
272
|
newLineOrSpace: `
|
|
252
273
|
`,
|
|
253
274
|
pad: u,
|
|
254
|
-
indent: u +
|
|
275
|
+
indent: u + c.indent
|
|
255
276
|
} : y = {
|
|
256
277
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
257
278
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
@@ -259,11 +280,11 @@ function jo() {
|
|
|
259
280
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
260
281
|
};
|
|
261
282
|
const g = (m) => {
|
|
262
|
-
if (
|
|
283
|
+
if (c.inlineCharacterLimit === void 0)
|
|
263
284
|
return m;
|
|
264
285
|
const x = m.replace(new RegExp(y.newLine, "g"), "").replace(new RegExp(y.newLineOrSpace, "g"), " ").replace(new RegExp(y.pad + "|" + y.indent, "g"), "");
|
|
265
|
-
return x.length <=
|
|
266
|
-
`).replace(new RegExp(y.pad, "g"), u).replace(new RegExp(y.indent, "g"), u +
|
|
286
|
+
return x.length <= c.inlineCharacterLimit ? x : m.replace(new RegExp(y.newLine + "|" + y.newLineOrSpace, "g"), `
|
|
287
|
+
`).replace(new RegExp(y.pad, "g"), u).replace(new RegExp(y.indent, "g"), u + c.indent);
|
|
267
288
|
};
|
|
268
289
|
if (r.indexOf(i) !== -1)
|
|
269
290
|
return '"[Circular]"';
|
|
@@ -277,36 +298,36 @@ function jo() {
|
|
|
277
298
|
r.push(i);
|
|
278
299
|
const m = "[" + y.newLine + i.map((x, v) => {
|
|
279
300
|
const f = i.length - 1 === v ? y.newLine : "," + y.newLineOrSpace;
|
|
280
|
-
let h = o(x,
|
|
281
|
-
return
|
|
301
|
+
let h = o(x, c, u + c.indent);
|
|
302
|
+
return c.transform && (h = c.transform(i, v, h)), y.indent + h + f;
|
|
282
303
|
}).join("") + y.pad + "]";
|
|
283
304
|
return r.pop(), g(m);
|
|
284
305
|
}
|
|
285
306
|
if (n(i)) {
|
|
286
307
|
let m = Object.keys(i).concat(t(i));
|
|
287
|
-
if (
|
|
308
|
+
if (c.filter && (m = m.filter((v) => c.filter(i, v))), m.length === 0)
|
|
288
309
|
return "{}";
|
|
289
310
|
r.push(i);
|
|
290
311
|
const x = "{" + y.newLine + m.map((v, f) => {
|
|
291
|
-
const h = m.length - 1 === f ? y.newLine : "," + y.newLineOrSpace, d = typeof v == "symbol", j = !d && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = d || j ? v : o(v,
|
|
292
|
-
let p = o(i[v],
|
|
293
|
-
return
|
|
312
|
+
const h = m.length - 1 === f ? y.newLine : "," + y.newLineOrSpace, d = typeof v == "symbol", j = !d && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = d || j ? v : o(v, c);
|
|
313
|
+
let p = o(i[v], c, u + c.indent);
|
|
314
|
+
return c.transform && (p = c.transform(i, v, p)), y.indent + String(T) + ": " + p + h;
|
|
294
315
|
}).join("") + y.pad + "}";
|
|
295
316
|
return r.pop(), g(x);
|
|
296
317
|
}
|
|
297
318
|
return i = String(i).replace(/[\r\n]/g, (m) => m === `
|
|
298
|
-
` ? "\\n" : "\\r"),
|
|
299
|
-
}(a,
|
|
300
|
-
},
|
|
319
|
+
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
|
|
320
|
+
}(a, l, s);
|
|
321
|
+
}, ht;
|
|
301
322
|
}
|
|
302
|
-
var
|
|
303
|
-
const ue = /* @__PURE__ */
|
|
323
|
+
var qo = Po();
|
|
324
|
+
const ue = /* @__PURE__ */ fo(qo);
|
|
304
325
|
function Le(e, n = {}) {
|
|
305
|
-
const { delimiter: t = '"', escapeChar: a = "\\", escapeNewlines:
|
|
326
|
+
const { delimiter: t = '"', escapeChar: a = "\\", escapeNewlines: l = !0 } = n;
|
|
306
327
|
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
307
|
-
` ?
|
|
328
|
+
` ? l ? `${a}n` : r : r === "\f" ? `${a}f` : r === "\r" ? l ? `${a}r` : r : r === a ? a + a : r === t ? a + t : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
|
|
308
329
|
}
|
|
309
|
-
var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' }),
|
|
330
|
+
var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' }), Co = {
|
|
310
331
|
info: {
|
|
311
332
|
key: "libcurl",
|
|
312
333
|
title: "Libcurl",
|
|
@@ -314,15 +335,15 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
|
|
|
314
335
|
description: "Simple REST and HTTP API Client for C",
|
|
315
336
|
extname: ".c"
|
|
316
337
|
},
|
|
317
|
-
convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: a, postData:
|
|
338
|
+
convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: a, postData: l }) => {
|
|
318
339
|
const { push: s, blank: r, join: o } = new V();
|
|
319
340
|
s("CURL *hnd = curl_easy_init();"), r(), s(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), s("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), s(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
|
|
320
341
|
const i = Object.keys(t);
|
|
321
|
-
return i.length && (r(), s("struct curl_slist *headers = NULL;"), i.forEach((
|
|
322
|
-
s(`headers = curl_slist_append(headers, "${
|
|
323
|
-
}), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)),
|
|
342
|
+
return i.length && (r(), s("struct curl_slist *headers = NULL;"), i.forEach((c) => {
|
|
343
|
+
s(`headers = curl_slist_append(headers, "${c}: ${le(t[c])}");`);
|
|
344
|
+
}), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), l.text && (r(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(l.text)});`)), r(), s("CURLcode ret = curl_easy_perform(hnd);"), o();
|
|
324
345
|
}
|
|
325
|
-
},
|
|
346
|
+
}, Ro = {
|
|
326
347
|
info: {
|
|
327
348
|
key: "c",
|
|
328
349
|
title: "C",
|
|
@@ -330,30 +351,30 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
|
|
|
330
351
|
cli: "c"
|
|
331
352
|
},
|
|
332
353
|
clientsById: {
|
|
333
|
-
libcurl:
|
|
354
|
+
libcurl: Co
|
|
334
355
|
}
|
|
335
356
|
}, fe = (e, n) => Object.keys(e).find((t) => t.toLowerCase() === n.toLowerCase()), ge = (e, n) => {
|
|
336
357
|
const t = fe(e, n);
|
|
337
358
|
if (t)
|
|
338
359
|
return e[t];
|
|
339
|
-
}, Ze = (e, n) => !!fe(e, n),
|
|
360
|
+
}, Ze = (e, n) => !!fe(e, n), Eo = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
340
361
|
(n) => e.indexOf(n) > -1
|
|
341
|
-
),
|
|
362
|
+
), Vr = class {
|
|
342
363
|
constructor(e) {
|
|
343
364
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
344
365
|
}
|
|
345
|
-
},
|
|
366
|
+
}, ko = class {
|
|
346
367
|
constructor(e) {
|
|
347
368
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
348
369
|
}
|
|
349
|
-
},
|
|
370
|
+
}, ca = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), ua = (e) => e === void 0 ? !0 : ca(e) === "object" ? Object.keys(e).length === 0 : !1, Dr = (e) => (Object.keys(e).filter((n) => ua(e[n])).forEach((n) => {
|
|
350
371
|
delete e[n];
|
|
351
372
|
}), e), Ve = (e, n) => {
|
|
352
373
|
const t = " ".repeat(e);
|
|
353
374
|
return n.replace(/\n/g, `
|
|
354
375
|
${t}`);
|
|
355
|
-
},
|
|
356
|
-
switch (
|
|
376
|
+
}, yr = (e) => {
|
|
377
|
+
switch (ca(e)) {
|
|
357
378
|
case "string":
|
|
358
379
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
359
380
|
case "file":
|
|
@@ -366,20 +387,20 @@ ${t}`);
|
|
|
366
387
|
return `#"${e.source}"`;
|
|
367
388
|
case "object": {
|
|
368
389
|
const n = Object.keys(e).reduce((t, a) => {
|
|
369
|
-
const
|
|
370
|
-
return `${t}:${a} ${
|
|
390
|
+
const l = Ve(a.length + 2, yr(e[a]));
|
|
391
|
+
return `${t}:${a} ${l}
|
|
371
392
|
`;
|
|
372
393
|
}, "").trim();
|
|
373
394
|
return `{${Ve(1, n)}}`;
|
|
374
395
|
}
|
|
375
396
|
case "array": {
|
|
376
|
-
const n = e.reduce((t, a) => `${t} ${
|
|
397
|
+
const n = e.reduce((t, a) => `${t} ${yr(a)}`, "").trim();
|
|
377
398
|
return `[${Ve(1, n)}]`;
|
|
378
399
|
}
|
|
379
400
|
default:
|
|
380
401
|
return e.toString();
|
|
381
402
|
}
|
|
382
|
-
},
|
|
403
|
+
}, No = {
|
|
383
404
|
info: {
|
|
384
405
|
key: "clj_http",
|
|
385
406
|
title: "clj-http",
|
|
@@ -387,79 +408,79 @@ ${t}`);
|
|
|
387
408
|
description: "An idiomatic clojure http client wrapping the apache client.",
|
|
388
409
|
extname: ".clj"
|
|
389
410
|
},
|
|
390
|
-
convert: ({ queryObj: e, method: n, postData: t, url: a, allHeaders:
|
|
411
|
+
convert: ({ queryObj: e, method: n, postData: t, url: a, allHeaders: l }, s) => {
|
|
391
412
|
const { push: r, join: o } = new V({ indent: s == null ? void 0 : s.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
|
|
392
413
|
if (n = n.toLowerCase(), !i.includes(n))
|
|
393
414
|
return r("Method not supported"), o();
|
|
394
|
-
const
|
|
395
|
-
headers:
|
|
415
|
+
const c = {
|
|
416
|
+
headers: l,
|
|
396
417
|
"query-params": e
|
|
397
418
|
};
|
|
398
419
|
switch (t.mimeType) {
|
|
399
420
|
case "application/json":
|
|
400
421
|
{
|
|
401
|
-
|
|
402
|
-
const u = fe(
|
|
403
|
-
u && delete
|
|
422
|
+
c["content-type"] = new Vr("json"), c["form-params"] = t.jsonObj;
|
|
423
|
+
const u = fe(c.headers, "content-type");
|
|
424
|
+
u && delete c.headers[u];
|
|
404
425
|
}
|
|
405
426
|
break;
|
|
406
427
|
case "application/x-www-form-urlencoded":
|
|
407
428
|
{
|
|
408
|
-
|
|
409
|
-
const u = fe(
|
|
410
|
-
u && delete
|
|
429
|
+
c["form-params"] = t.paramsObj;
|
|
430
|
+
const u = fe(c.headers, "content-type");
|
|
431
|
+
u && delete c.headers[u];
|
|
411
432
|
}
|
|
412
433
|
break;
|
|
413
434
|
case "text/plain":
|
|
414
435
|
{
|
|
415
|
-
|
|
416
|
-
const u = fe(
|
|
417
|
-
u && delete
|
|
436
|
+
c.body = t.text;
|
|
437
|
+
const u = fe(c.headers, "content-type");
|
|
438
|
+
u && delete c.headers[u];
|
|
418
439
|
}
|
|
419
440
|
break;
|
|
420
441
|
case "multipart/form-data": {
|
|
421
442
|
if (t.params) {
|
|
422
|
-
|
|
443
|
+
c.multipart = t.params.map((y) => y.fileName && !y.value ? {
|
|
423
444
|
name: y.name,
|
|
424
|
-
content: new
|
|
445
|
+
content: new ko(y.fileName)
|
|
425
446
|
} : {
|
|
426
447
|
name: y.name,
|
|
427
448
|
content: y.value
|
|
428
449
|
});
|
|
429
|
-
const u = fe(
|
|
430
|
-
u && delete
|
|
450
|
+
const u = fe(c.headers, "content-type");
|
|
451
|
+
u && delete c.headers[u];
|
|
431
452
|
}
|
|
432
453
|
break;
|
|
433
454
|
}
|
|
434
455
|
}
|
|
435
|
-
switch (ge(
|
|
456
|
+
switch (ge(c.headers, "accept")) {
|
|
436
457
|
case "application/json":
|
|
437
458
|
{
|
|
438
|
-
|
|
439
|
-
const u = fe(
|
|
440
|
-
u && delete
|
|
459
|
+
c.accept = new Vr("json");
|
|
460
|
+
const u = fe(c.headers, "accept");
|
|
461
|
+
u && delete c.headers[u];
|
|
441
462
|
}
|
|
442
463
|
break;
|
|
443
464
|
}
|
|
444
465
|
if (r(`(require '[clj-http.client :as client])
|
|
445
|
-
`),
|
|
466
|
+
`), ua(Dr(c)))
|
|
446
467
|
r(`(client/${n} "${a}")`);
|
|
447
468
|
else {
|
|
448
|
-
const u = 11 + n.length + a.length, y = Ve(u,
|
|
469
|
+
const u = 11 + n.length + a.length, y = Ve(u, yr(Dr(c)));
|
|
449
470
|
r(`(client/${n} "${a}" ${y})`);
|
|
450
471
|
}
|
|
451
472
|
return o();
|
|
452
473
|
}
|
|
453
|
-
},
|
|
474
|
+
}, Ao = {
|
|
454
475
|
info: {
|
|
455
476
|
key: "clojure",
|
|
456
477
|
title: "Clojure",
|
|
457
478
|
default: "clj_http"
|
|
458
479
|
},
|
|
459
480
|
clientsById: {
|
|
460
|
-
clj_http:
|
|
481
|
+
clj_http: No
|
|
461
482
|
}
|
|
462
|
-
},
|
|
483
|
+
}, Io = (e) => {
|
|
463
484
|
let n = ge(e, "accept-encoding");
|
|
464
485
|
if (!n)
|
|
465
486
|
return [];
|
|
@@ -467,8 +488,8 @@ ${t}`);
|
|
|
467
488
|
gzip: "DecompressionMethods.GZip",
|
|
468
489
|
deflate: "DecompressionMethods.Deflate"
|
|
469
490
|
}, a = [];
|
|
470
|
-
return typeof n == "string" && (n = [n]), n.forEach((
|
|
471
|
-
|
|
491
|
+
return typeof n == "string" && (n = [n]), n.forEach((l) => {
|
|
492
|
+
l.split(",").forEach((s) => {
|
|
472
493
|
const r = /\s*([^;\s]+)/.exec(s);
|
|
473
494
|
if (r) {
|
|
474
495
|
const o = t[r[1]];
|
|
@@ -476,7 +497,7 @@ ${t}`);
|
|
|
476
497
|
}
|
|
477
498
|
});
|
|
478
499
|
}), a;
|
|
479
|
-
},
|
|
500
|
+
}, Uo = {
|
|
480
501
|
info: {
|
|
481
502
|
key: "httpclient",
|
|
482
503
|
title: "HttpClient",
|
|
@@ -484,16 +505,16 @@ ${t}`);
|
|
|
484
505
|
description: ".NET Standard HTTP Client",
|
|
485
506
|
extname: ".cs"
|
|
486
507
|
},
|
|
487
|
-
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a },
|
|
508
|
+
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
|
|
488
509
|
var m, x;
|
|
489
510
|
const s = {
|
|
490
511
|
indent: " ",
|
|
491
|
-
...
|
|
512
|
+
...l
|
|
492
513
|
}, { push: r, join: o } = new V({ indent: s.indent });
|
|
493
514
|
r("using System.Net.Http.Headers;");
|
|
494
515
|
let i = "";
|
|
495
|
-
const
|
|
496
|
-
(
|
|
516
|
+
const c = !!e.cookie, u = Io(e);
|
|
517
|
+
(c || u.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), u.length && r(`AutomaticDecompression = ${u.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
|
|
497
518
|
const y = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
498
519
|
t = t.toUpperCase(), t && y.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
|
|
499
520
|
const g = Object.keys(e).filter((v) => {
|
|
@@ -529,10 +550,10 @@ ${t}`);
|
|
|
529
550
|
return r("};"), r("using (var response = await client.SendAsync(request))"), r("{"), r("response.EnsureSuccessStatusCode();", 1), r("var body = await response.Content.ReadAsStringAsync();", 1), r("Console.WriteLine(body);", 1), r("}"), o();
|
|
530
551
|
}
|
|
531
552
|
};
|
|
532
|
-
function
|
|
553
|
+
function Lo(e) {
|
|
533
554
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
534
555
|
}
|
|
535
|
-
var
|
|
556
|
+
var Fo = {
|
|
536
557
|
info: {
|
|
537
558
|
key: "restsharp",
|
|
538
559
|
title: "RestSharp",
|
|
@@ -541,7 +562,7 @@ var Ao = {
|
|
|
541
562
|
extname: ".cs",
|
|
542
563
|
installation: "dotnet add package RestSharp"
|
|
543
564
|
},
|
|
544
|
-
convert: ({ method: e, fullUrl: n, headersObj: t, cookies: a, postData:
|
|
565
|
+
convert: ({ method: e, fullUrl: n, headersObj: t, cookies: a, postData: l, uriObj: s }) => {
|
|
545
566
|
const { push: r, join: o } = new V();
|
|
546
567
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
|
|
547
568
|
e.toUpperCase()
|
|
@@ -550,43 +571,43 @@ var Ao = {
|
|
|
550
571
|
r(`using RestSharp;
|
|
551
572
|
|
|
552
573
|
`), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
|
|
553
|
-
const
|
|
554
|
-
switch (
|
|
555
|
-
if (
|
|
556
|
-
|
|
574
|
+
const c = l.mimeType && l.mimeType === "multipart/form-data";
|
|
575
|
+
switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((u) => {
|
|
576
|
+
if (l.mimeType && u.toLowerCase() === "content-type" && l.text) {
|
|
577
|
+
c && l.boundary && r(`request.FormBoundary = "${l.boundary}";`);
|
|
557
578
|
return;
|
|
558
579
|
}
|
|
559
580
|
r(`request.AddHeader("${u}", "${le(t[u])}");`);
|
|
560
581
|
}), a.forEach(({ name: u, value: y }) => {
|
|
561
582
|
r(`request.AddCookie("${u}", "${le(y)}", "${s.pathname}", "${s.host}");`);
|
|
562
|
-
}),
|
|
583
|
+
}), l.mimeType) {
|
|
563
584
|
case "multipart/form-data":
|
|
564
|
-
if (!
|
|
565
|
-
|
|
585
|
+
if (!l.params) break;
|
|
586
|
+
l.params.forEach((u) => {
|
|
566
587
|
u.fileName ? r(`request.AddFile("${u.name}", "${u.fileName}");`) : r(`request.AddParameter("${u.name}", "${u.value}");`);
|
|
567
588
|
});
|
|
568
589
|
break;
|
|
569
590
|
case "application/x-www-form-urlencoded":
|
|
570
|
-
if (!
|
|
571
|
-
|
|
591
|
+
if (!l.params) break;
|
|
592
|
+
l.params.forEach((u) => {
|
|
572
593
|
r(`request.AddParameter("${u.name}", "${u.value}");`);
|
|
573
594
|
});
|
|
574
595
|
break;
|
|
575
596
|
case "application/json": {
|
|
576
|
-
if (!
|
|
577
|
-
const u = JSON.stringify(
|
|
597
|
+
if (!l.text) break;
|
|
598
|
+
const u = JSON.stringify(l.text);
|
|
578
599
|
r(`request.AddJsonBody(${u}, false);`);
|
|
579
600
|
break;
|
|
580
601
|
}
|
|
581
602
|
default:
|
|
582
|
-
if (!
|
|
583
|
-
r(`request.AddStringBody("${
|
|
603
|
+
if (!l.text) break;
|
|
604
|
+
r(`request.AddStringBody("${l.text}", "${l.mimeType}");`);
|
|
584
605
|
}
|
|
585
|
-
return r(`var response = await client.${
|
|
606
|
+
return r(`var response = await client.${Lo(e)}Async(request);
|
|
586
607
|
`), r(`Console.WriteLine("{0}", response.Content);
|
|
587
608
|
`), o();
|
|
588
609
|
}
|
|
589
|
-
},
|
|
610
|
+
}, _o = {
|
|
590
611
|
info: {
|
|
591
612
|
key: "csharp",
|
|
592
613
|
title: "C#",
|
|
@@ -594,10 +615,10 @@ var Ao = {
|
|
|
594
615
|
cli: "dotnet"
|
|
595
616
|
},
|
|
596
617
|
clientsById: {
|
|
597
|
-
httpclient:
|
|
598
|
-
restsharp:
|
|
618
|
+
httpclient: Uo,
|
|
619
|
+
restsharp: Fo
|
|
599
620
|
}
|
|
600
|
-
},
|
|
621
|
+
}, Bo = {
|
|
601
622
|
info: {
|
|
602
623
|
key: "native",
|
|
603
624
|
title: "NewRequest",
|
|
@@ -605,9 +626,9 @@ var Ao = {
|
|
|
605
626
|
description: "Golang HTTP client request",
|
|
606
627
|
extname: ".go"
|
|
607
628
|
},
|
|
608
|
-
convert: ({ postData: e, method: n, allHeaders: t, fullUrl: a },
|
|
609
|
-
const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors:
|
|
610
|
-
|
|
629
|
+
convert: ({ postData: e, method: n, allHeaders: t, fullUrl: a }, l = {}) => {
|
|
630
|
+
const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: u = !0, timeout: y = -1 } = l, g = c ? "err" : "_", m = i ? 1 : 0, x = () => {
|
|
631
|
+
c && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
|
|
611
632
|
};
|
|
612
633
|
i && (r("package main"), s(), r("import ("), r('"fmt"', m), y > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), u && r('"io"', m), r(")"), s(), r("func main() {"), s());
|
|
613
634
|
const v = y > 0, f = v, h = f ? "client" : "http.DefaultClient";
|
|
@@ -615,7 +636,7 @@ var Ao = {
|
|
|
615
636
|
r(`req.Header.Add("${d}", "${le(t[d])}")`, m);
|
|
616
637
|
}), s()), r(`res, ${g} := ${h}.Do(req)`, m), x(), u && (s(), r("defer res.Body.Close()", m), r(`body, ${g} := io.ReadAll(res.Body)`, m), x()), s(), u && r("fmt.Println(string(body))", m), i && (s(), r("}")), o();
|
|
617
638
|
}
|
|
618
|
-
},
|
|
639
|
+
}, Ho = {
|
|
619
640
|
info: {
|
|
620
641
|
key: "go",
|
|
621
642
|
title: "Go",
|
|
@@ -623,10 +644,10 @@ var Ao = {
|
|
|
623
644
|
cli: "go"
|
|
624
645
|
},
|
|
625
646
|
clientsById: {
|
|
626
|
-
native:
|
|
647
|
+
native: Bo
|
|
627
648
|
}
|
|
628
|
-
},
|
|
629
|
-
`,
|
|
649
|
+
}, Qr = `\r
|
|
650
|
+
`, Mo = {
|
|
630
651
|
info: {
|
|
631
652
|
key: "http1.1",
|
|
632
653
|
title: "HTTP/1.1",
|
|
@@ -634,36 +655,36 @@ var Ao = {
|
|
|
634
655
|
description: "HTTP/1.1 request string in accordance with RFC 7230",
|
|
635
656
|
extname: null
|
|
636
657
|
},
|
|
637
|
-
convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: a, allHeaders:
|
|
658
|
+
convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: a, allHeaders: l, postData: s }, r) => {
|
|
638
659
|
const o = {
|
|
639
660
|
absoluteURI: !1,
|
|
640
661
|
autoContentLength: !0,
|
|
641
662
|
autoHost: !0,
|
|
642
663
|
...r
|
|
643
|
-
}, { blank: i, push:
|
|
644
|
-
|
|
645
|
-
const g = Object.keys(
|
|
664
|
+
}, { blank: i, push: c, join: u } = new V({ indent: "", join: Qr }), y = o.absoluteURI ? n : t.path;
|
|
665
|
+
c(`${e} ${y} ${a}`);
|
|
666
|
+
const g = Object.keys(l);
|
|
646
667
|
if (g.forEach((v) => {
|
|
647
668
|
const f = v.toLowerCase().replace(/(^|-)(\w)/g, (h) => h.toUpperCase());
|
|
648
|
-
|
|
649
|
-
}), o.autoHost && !g.includes("host") &&
|
|
669
|
+
c(`${f}: ${l[v]}`);
|
|
670
|
+
}), o.autoHost && !g.includes("host") && c(`Host: ${t.host}`), o.autoContentLength && s.text && !g.includes("content-length")) {
|
|
650
671
|
const f = new TextEncoder().encode(s.text).length.toString();
|
|
651
|
-
|
|
672
|
+
c(`Content-Length: ${f}`);
|
|
652
673
|
}
|
|
653
674
|
i();
|
|
654
675
|
const m = u(), x = s.text || "";
|
|
655
|
-
return `${m}${
|
|
676
|
+
return `${m}${Qr}${x}`;
|
|
656
677
|
}
|
|
657
|
-
},
|
|
678
|
+
}, zo = {
|
|
658
679
|
info: {
|
|
659
680
|
key: "http",
|
|
660
681
|
title: "HTTP",
|
|
661
682
|
default: "http1.1"
|
|
662
683
|
},
|
|
663
684
|
clientsById: {
|
|
664
|
-
"http1.1":
|
|
685
|
+
"http1.1": Mo
|
|
665
686
|
}
|
|
666
|
-
},
|
|
687
|
+
}, Wo = {
|
|
667
688
|
info: {
|
|
668
689
|
key: "asynchttp",
|
|
669
690
|
title: "AsyncHttp",
|
|
@@ -671,16 +692,16 @@ var Ao = {
|
|
|
671
692
|
description: "Asynchronous Http and WebSocket Client library for Java",
|
|
672
693
|
extname: ".java"
|
|
673
694
|
},
|
|
674
|
-
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a },
|
|
695
|
+
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
|
|
675
696
|
const s = {
|
|
676
697
|
indent: " ",
|
|
677
|
-
...
|
|
698
|
+
...l
|
|
678
699
|
}, { blank: r, push: o, join: i } = new V({ indent: s.indent });
|
|
679
|
-
return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(n).forEach((
|
|
680
|
-
o(`.setHeader("${
|
|
700
|
+
return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(n).forEach((c) => {
|
|
701
|
+
o(`.setHeader("${c}", "${le(n[c])}")`, 1);
|
|
681
702
|
}), t.text && o(`.setBody(${JSON.stringify(t.text)})`, 1), o(".execute()", 1), o(".toCompletableFuture()", 1), o(".thenAccept(System.out::println)", 1), o(".join();", 1), r(), o("client.close();"), i();
|
|
682
703
|
}
|
|
683
|
-
},
|
|
704
|
+
}, Jo = {
|
|
684
705
|
info: {
|
|
685
706
|
key: "nethttp",
|
|
686
707
|
title: "java.net.http",
|
|
@@ -688,10 +709,10 @@ var Ao = {
|
|
|
688
709
|
description: "Java Standardized HTTP Client API",
|
|
689
710
|
extname: ".java"
|
|
690
711
|
},
|
|
691
|
-
convert: ({ allHeaders: e, fullUrl: n, method: t, postData: a },
|
|
712
|
+
convert: ({ allHeaders: e, fullUrl: n, method: t, postData: a }, l) => {
|
|
692
713
|
const s = {
|
|
693
714
|
indent: " ",
|
|
694
|
-
...
|
|
715
|
+
...l
|
|
695
716
|
}, { push: r, join: o } = new V({ indent: s.indent });
|
|
696
717
|
return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${n}"))`, 2), Object.keys(e).forEach((i) => {
|
|
697
718
|
r(`.header("${i}", "${le(e[i])}")`, 2);
|
|
@@ -702,7 +723,7 @@ var Ao = {
|
|
|
702
723
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
703
724
|
), r("System.out.println(response.body());"), o();
|
|
704
725
|
}
|
|
705
|
-
},
|
|
726
|
+
}, Go = {
|
|
706
727
|
info: {
|
|
707
728
|
key: "okhttp",
|
|
708
729
|
title: "OkHttp",
|
|
@@ -710,16 +731,16 @@ var Ao = {
|
|
|
710
731
|
description: "An HTTP Request Client Library",
|
|
711
732
|
extname: ".java"
|
|
712
733
|
},
|
|
713
|
-
convert: ({ postData: e, method: n, fullUrl: t, allHeaders: a },
|
|
734
|
+
convert: ({ postData: e, method: n, fullUrl: t, allHeaders: a }, l) => {
|
|
714
735
|
const s = {
|
|
715
736
|
indent: " ",
|
|
716
|
-
...
|
|
717
|
-
}, { push: r, blank: o, join: i } = new V({ indent: s.indent }),
|
|
718
|
-
return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1),
|
|
737
|
+
...l
|
|
738
|
+
}, { push: r, blank: o, join: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
739
|
+
return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
|
|
719
740
|
r(`.addHeader("${y}", "${le(a[y])}")`, 1);
|
|
720
741
|
}), r(".build();", 1), o(), r("Response response = client.newCall(request).execute();"), i();
|
|
721
742
|
}
|
|
722
|
-
},
|
|
743
|
+
}, Vo = {
|
|
723
744
|
info: {
|
|
724
745
|
key: "unirest",
|
|
725
746
|
title: "Unirest",
|
|
@@ -727,28 +748,28 @@ var Ao = {
|
|
|
727
748
|
description: "Lightweight HTTP Request Client Library",
|
|
728
749
|
extname: ".java"
|
|
729
750
|
},
|
|
730
|
-
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a },
|
|
751
|
+
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
|
|
731
752
|
const s = {
|
|
732
753
|
indent: " ",
|
|
733
|
-
...
|
|
754
|
+
...l
|
|
734
755
|
}, { join: r, push: o } = new V({ indent: s.indent });
|
|
735
|
-
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : o(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(n).forEach((
|
|
736
|
-
o(`.header("${
|
|
756
|
+
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : o(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(n).forEach((c) => {
|
|
757
|
+
o(`.header("${c}", "${le(n[c])}")`, 1);
|
|
737
758
|
}), t.text && o(`.body(${JSON.stringify(t.text)})`, 1), o(".asString();", 1), r();
|
|
738
759
|
}
|
|
739
|
-
},
|
|
760
|
+
}, Do = {
|
|
740
761
|
info: {
|
|
741
762
|
key: "java",
|
|
742
763
|
title: "Java",
|
|
743
764
|
default: "unirest"
|
|
744
765
|
},
|
|
745
766
|
clientsById: {
|
|
746
|
-
asynchttp:
|
|
747
|
-
nethttp:
|
|
748
|
-
okhttp:
|
|
749
|
-
unirest:
|
|
767
|
+
asynchttp: Wo,
|
|
768
|
+
nethttp: Jo,
|
|
769
|
+
okhttp: Go,
|
|
770
|
+
unirest: Vo
|
|
750
771
|
}
|
|
751
|
-
},
|
|
772
|
+
}, Qo = {
|
|
752
773
|
info: {
|
|
753
774
|
key: "axios",
|
|
754
775
|
title: "Axios",
|
|
@@ -757,42 +778,42 @@ var Ao = {
|
|
|
757
778
|
extname: ".js",
|
|
758
779
|
installation: "npm install axios --save"
|
|
759
780
|
},
|
|
760
|
-
convert: ({ allHeaders: e, method: n, url: t, queryObj: a, postData:
|
|
781
|
+
convert: ({ allHeaders: e, method: n, url: t, queryObj: a, postData: l }, s) => {
|
|
761
782
|
const r = {
|
|
762
783
|
indent: " ",
|
|
763
784
|
...s
|
|
764
|
-
}, { blank: o, push: i, join:
|
|
785
|
+
}, { blank: o, push: i, join: c, addPostProcessor: u } = new V({ indent: r.indent });
|
|
765
786
|
i("import axios from 'axios';"), o();
|
|
766
787
|
const y = {
|
|
767
788
|
method: n,
|
|
768
789
|
url: t
|
|
769
790
|
};
|
|
770
|
-
switch (Object.keys(a).length && (y.params = a), Object.keys(e).length && (y.headers = e),
|
|
791
|
+
switch (Object.keys(a).length && (y.params = a), Object.keys(e).length && (y.headers = e), l.mimeType) {
|
|
771
792
|
case "application/x-www-form-urlencoded":
|
|
772
|
-
|
|
793
|
+
l.params && (i("const encodedParams = new URLSearchParams();"), l.params.forEach((m) => {
|
|
773
794
|
i(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
774
795
|
}), o(), y.data = "encodedParams,", u((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
|
|
775
796
|
break;
|
|
776
797
|
case "application/json":
|
|
777
|
-
|
|
798
|
+
l.jsonObj && (y.data = l.jsonObj);
|
|
778
799
|
break;
|
|
779
800
|
case "multipart/form-data":
|
|
780
|
-
if (!
|
|
801
|
+
if (!l.params)
|
|
781
802
|
break;
|
|
782
|
-
i("const form = new FormData();"),
|
|
803
|
+
i("const form = new FormData();"), l.params.forEach((m) => {
|
|
783
804
|
i(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
|
|
784
805
|
}), o(), y.data = "[form]";
|
|
785
806
|
break;
|
|
786
807
|
default:
|
|
787
|
-
|
|
808
|
+
l.text && (y.data = l.text);
|
|
788
809
|
}
|
|
789
810
|
const g = ue(y, {
|
|
790
811
|
indent: " ",
|
|
791
812
|
inlineCharacterLimit: 80
|
|
792
813
|
}).replace('"[form]"', "form");
|
|
793
|
-
return i(`const options = ${g};`), o(), 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),
|
|
814
|
+
return i(`const options = ${g};`), o(), 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();
|
|
794
815
|
}
|
|
795
|
-
},
|
|
816
|
+
}, Ko = {
|
|
796
817
|
info: {
|
|
797
818
|
key: "fetch",
|
|
798
819
|
title: "fetch",
|
|
@@ -800,20 +821,20 @@ var Ao = {
|
|
|
800
821
|
description: "Perform asynchronous HTTP requests with the Fetch API",
|
|
801
822
|
extname: ".js"
|
|
802
823
|
},
|
|
803
|
-
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a },
|
|
824
|
+
convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
|
|
804
825
|
const s = {
|
|
805
826
|
indent: " ",
|
|
806
827
|
credentials: null,
|
|
807
|
-
...
|
|
808
|
-
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }),
|
|
828
|
+
...l
|
|
829
|
+
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = {
|
|
809
830
|
method: e
|
|
810
831
|
};
|
|
811
|
-
switch (Object.keys(n).length && (
|
|
832
|
+
switch (Object.keys(n).length && (c.headers = n), s.credentials !== null && (c.credentials = s.credentials), t.mimeType) {
|
|
812
833
|
case "application/x-www-form-urlencoded":
|
|
813
|
-
|
|
834
|
+
c.body = t.paramsObj ? t.paramsObj : t.text;
|
|
814
835
|
break;
|
|
815
836
|
case "application/json":
|
|
816
|
-
t.jsonObj && (
|
|
837
|
+
t.jsonObj && (c.body = t.jsonObj);
|
|
817
838
|
break;
|
|
818
839
|
case "multipart/form-data":
|
|
819
840
|
if (!t.params)
|
|
@@ -824,10 +845,10 @@ var Ao = {
|
|
|
824
845
|
}), r();
|
|
825
846
|
break;
|
|
826
847
|
default:
|
|
827
|
-
t.text && (
|
|
848
|
+
t.text && (c.body = t.text);
|
|
828
849
|
}
|
|
829
|
-
return
|
|
830
|
-
`const options = ${ue(
|
|
850
|
+
return c.headers && !Object.keys(c.headers).length && delete c.headers, i(
|
|
851
|
+
`const options = ${ue(c, {
|
|
831
852
|
indent: s.indent,
|
|
832
853
|
inlineCharacterLimit: 80,
|
|
833
854
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
@@ -845,7 +866,7 @@ var Ao = {
|
|
|
845
866
|
})};`
|
|
846
867
|
), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${a}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), o();
|
|
847
868
|
}
|
|
848
|
-
},
|
|
869
|
+
}, Yo = {
|
|
849
870
|
info: {
|
|
850
871
|
key: "jquery",
|
|
851
872
|
title: "jQuery",
|
|
@@ -853,12 +874,12 @@ var Ao = {
|
|
|
853
874
|
description: "Perform an asynchronous HTTP (Ajax) requests with jQuery",
|
|
854
875
|
extname: ".js"
|
|
855
876
|
},
|
|
856
|
-
convert: ({ fullUrl: e, method: n, allHeaders: t, postData: a },
|
|
877
|
+
convert: ({ fullUrl: e, method: n, allHeaders: t, postData: a }, l) => {
|
|
857
878
|
var y;
|
|
858
879
|
const s = {
|
|
859
880
|
indent: " ",
|
|
860
|
-
...
|
|
861
|
-
}, { blank: r, push: o, join: i } = new V({ indent: s.indent }),
|
|
881
|
+
...l
|
|
882
|
+
}, { blank: r, push: o, join: i } = new V({ indent: s.indent }), c = {
|
|
862
883
|
async: !0,
|
|
863
884
|
crossDomain: !0,
|
|
864
885
|
url: e,
|
|
@@ -867,29 +888,29 @@ var Ao = {
|
|
|
867
888
|
};
|
|
868
889
|
switch (a.mimeType) {
|
|
869
890
|
case "application/x-www-form-urlencoded":
|
|
870
|
-
|
|
891
|
+
c.data = a.paramsObj ? a.paramsObj : a.text;
|
|
871
892
|
break;
|
|
872
893
|
case "application/json":
|
|
873
|
-
|
|
894
|
+
c.processData = !1, c.data = a.text;
|
|
874
895
|
break;
|
|
875
896
|
case "multipart/form-data":
|
|
876
897
|
if (!a.params)
|
|
877
898
|
break;
|
|
878
899
|
if (o("const form = new FormData();"), a.params.forEach((g) => {
|
|
879
900
|
o(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
|
|
880
|
-
}),
|
|
901
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", Ze(t, "content-type") && (y = ge(t, "content-type")) != null && y.includes("boundary")) {
|
|
881
902
|
const g = fe(t, "content-type");
|
|
882
|
-
g && delete
|
|
903
|
+
g && delete c.headers[g];
|
|
883
904
|
}
|
|
884
905
|
r();
|
|
885
906
|
break;
|
|
886
907
|
default:
|
|
887
|
-
a.text && (
|
|
908
|
+
a.text && (c.data = a.text);
|
|
888
909
|
}
|
|
889
|
-
const u = ue(
|
|
910
|
+
const u = ue(c, { indent: s.indent }).replace("'[form]'", "form");
|
|
890
911
|
return o(`const settings = ${u};`), r(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), i();
|
|
891
912
|
}
|
|
892
|
-
},
|
|
913
|
+
}, Xo = {
|
|
893
914
|
info: {
|
|
894
915
|
key: "xhr",
|
|
895
916
|
title: "XMLHttpRequest",
|
|
@@ -897,12 +918,12 @@ var Ao = {
|
|
|
897
918
|
description: "W3C Standard API that provides scripted client functionality",
|
|
898
919
|
extname: ".js"
|
|
899
920
|
},
|
|
900
|
-
convert: ({ postData: e, allHeaders: n, method: t, fullUrl: a },
|
|
901
|
-
var
|
|
921
|
+
convert: ({ postData: e, allHeaders: n, method: t, fullUrl: a }, l) => {
|
|
922
|
+
var c;
|
|
902
923
|
const s = {
|
|
903
924
|
indent: " ",
|
|
904
925
|
cors: !0,
|
|
905
|
-
...
|
|
926
|
+
...l
|
|
906
927
|
}, { blank: r, push: o, join: i } = new V({ indent: s.indent });
|
|
907
928
|
switch (e.mimeType) {
|
|
908
929
|
case "application/json":
|
|
@@ -917,7 +938,7 @@ var Ao = {
|
|
|
917
938
|
break;
|
|
918
939
|
if (o("const data = new FormData();"), e.params.forEach((u) => {
|
|
919
940
|
o(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
920
|
-
}), Ze(n, "content-type") && (
|
|
941
|
+
}), Ze(n, "content-type") && (c = ge(n, "content-type")) != null && c.includes("boundary")) {
|
|
921
942
|
const u = fe(n, "content-type");
|
|
922
943
|
u && delete n[u];
|
|
923
944
|
}
|
|
@@ -930,19 +951,19 @@ var Ao = {
|
|
|
930
951
|
o(`xhr.setRequestHeader('${u}', '${Fe(n[u])}');`);
|
|
931
952
|
}), r(), o("xhr.send(data);"), i();
|
|
932
953
|
}
|
|
933
|
-
},
|
|
954
|
+
}, Zo = {
|
|
934
955
|
info: {
|
|
935
956
|
key: "javascript",
|
|
936
957
|
title: "JavaScript",
|
|
937
958
|
default: "xhr"
|
|
938
959
|
},
|
|
939
960
|
clientsById: {
|
|
940
|
-
xhr:
|
|
941
|
-
axios:
|
|
942
|
-
fetch:
|
|
943
|
-
jquery:
|
|
961
|
+
xhr: Xo,
|
|
962
|
+
axios: Qo,
|
|
963
|
+
fetch: Ko,
|
|
964
|
+
jquery: Yo
|
|
944
965
|
}
|
|
945
|
-
},
|
|
966
|
+
}, ei = {
|
|
946
967
|
info: {
|
|
947
968
|
key: "native",
|
|
948
969
|
title: "Native JSON",
|
|
@@ -966,26 +987,26 @@ var Ao = {
|
|
|
966
987
|
case "multipart/form-data":
|
|
967
988
|
if (!e.params)
|
|
968
989
|
break;
|
|
969
|
-
const
|
|
990
|
+
const l = {};
|
|
970
991
|
e.params.forEach((s) => {
|
|
971
|
-
|
|
972
|
-
}), a =
|
|
992
|
+
l[s.name] = s.value;
|
|
993
|
+
}), a = l;
|
|
973
994
|
break;
|
|
974
995
|
default:
|
|
975
996
|
e.text && (a = e.text);
|
|
976
997
|
}
|
|
977
998
|
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, t.indent);
|
|
978
999
|
}
|
|
979
|
-
},
|
|
1000
|
+
}, ti = {
|
|
980
1001
|
info: {
|
|
981
1002
|
key: "json",
|
|
982
1003
|
title: "JSON",
|
|
983
1004
|
default: "native"
|
|
984
1005
|
},
|
|
985
1006
|
clientsById: {
|
|
986
|
-
native:
|
|
1007
|
+
native: ei
|
|
987
1008
|
}
|
|
988
|
-
},
|
|
1009
|
+
}, ri = {
|
|
989
1010
|
info: {
|
|
990
1011
|
key: "okhttp",
|
|
991
1012
|
title: "OkHttp",
|
|
@@ -993,25 +1014,25 @@ var Ao = {
|
|
|
993
1014
|
description: "An HTTP Request Client Library",
|
|
994
1015
|
extname: ".kt"
|
|
995
1016
|
},
|
|
996
|
-
convert: ({ postData: e, fullUrl: n, method: t, allHeaders: a },
|
|
1017
|
+
convert: ({ postData: e, fullUrl: n, method: t, allHeaders: a }, l) => {
|
|
997
1018
|
const s = {
|
|
998
1019
|
indent: " ",
|
|
999
|
-
...
|
|
1000
|
-
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }),
|
|
1001
|
-
return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1),
|
|
1020
|
+
...l
|
|
1021
|
+
}, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1022
|
+
return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
|
|
1002
1023
|
i(`.addHeader("${y}", "${le(a[y])}")`, 1);
|
|
1003
1024
|
}), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), o();
|
|
1004
1025
|
}
|
|
1005
|
-
},
|
|
1026
|
+
}, ni = {
|
|
1006
1027
|
info: {
|
|
1007
1028
|
key: "kotlin",
|
|
1008
1029
|
title: "Kotlin",
|
|
1009
1030
|
default: "okhttp"
|
|
1010
1031
|
},
|
|
1011
1032
|
clientsById: {
|
|
1012
|
-
okhttp:
|
|
1033
|
+
okhttp: ri
|
|
1013
1034
|
}
|
|
1014
|
-
},
|
|
1035
|
+
}, ai = {
|
|
1015
1036
|
info: {
|
|
1016
1037
|
key: "axios",
|
|
1017
1038
|
title: "Axios",
|
|
@@ -1020,11 +1041,11 @@ var Ao = {
|
|
|
1020
1041
|
extname: ".cjs",
|
|
1021
1042
|
installation: "npm install axios --save"
|
|
1022
1043
|
},
|
|
1023
|
-
convert: ({ method: e, fullUrl: n, allHeaders: t, postData: a },
|
|
1044
|
+
convert: ({ method: e, fullUrl: n, allHeaders: t, postData: a }, l) => {
|
|
1024
1045
|
const s = {
|
|
1025
1046
|
indent: " ",
|
|
1026
|
-
...
|
|
1027
|
-
}, { blank: r, join: o, push: i, addPostProcessor:
|
|
1047
|
+
...l
|
|
1048
|
+
}, { blank: r, join: o, push: i, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1028
1049
|
i("const axios = require('axios');");
|
|
1029
1050
|
const u = {
|
|
1030
1051
|
method: e,
|
|
@@ -1034,7 +1055,7 @@ var Ao = {
|
|
|
1034
1055
|
case "application/x-www-form-urlencoded":
|
|
1035
1056
|
a.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), a.params.forEach((g) => {
|
|
1036
1057
|
i(`encodedParams.set('${g.name}', '${g.value}');`);
|
|
1037
|
-
}), r(), u.data = "encodedParams,",
|
|
1058
|
+
}), r(), u.data = "encodedParams,", c((g) => g.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1038
1059
|
break;
|
|
1039
1060
|
case "application/json":
|
|
1040
1061
|
r(), a.jsonObj && (u.data = a.jsonObj);
|
|
@@ -1045,7 +1066,7 @@ var Ao = {
|
|
|
1045
1066
|
const y = ue(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
1046
1067
|
return i(`const options = ${y};`), r(), 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), o();
|
|
1047
1068
|
}
|
|
1048
|
-
},
|
|
1069
|
+
}, oi = {
|
|
1049
1070
|
info: {
|
|
1050
1071
|
key: "fetch",
|
|
1051
1072
|
title: "Fetch",
|
|
@@ -1054,22 +1075,22 @@ var Ao = {
|
|
|
1054
1075
|
extname: ".cjs",
|
|
1055
1076
|
installation: "npm install node-fetch@2 --save"
|
|
1056
1077
|
},
|
|
1057
|
-
convert: ({ method: e, fullUrl: n, postData: t, headersObj: a, cookies:
|
|
1078
|
+
convert: ({ method: e, fullUrl: n, postData: t, headersObj: a, cookies: l }, s) => {
|
|
1058
1079
|
var v;
|
|
1059
1080
|
const r = {
|
|
1060
1081
|
indent: " ",
|
|
1061
1082
|
...s
|
|
1062
1083
|
};
|
|
1063
1084
|
let o = !1;
|
|
1064
|
-
const { blank: i, push:
|
|
1065
|
-
|
|
1085
|
+
const { blank: i, push: c, join: u, unshift: y } = new V({ indent: r.indent });
|
|
1086
|
+
c("const fetch = require('node-fetch');");
|
|
1066
1087
|
const g = n, m = {
|
|
1067
1088
|
method: e
|
|
1068
1089
|
};
|
|
1069
1090
|
switch (Object.keys(a).length && (m.headers = a), t.mimeType) {
|
|
1070
1091
|
case "application/x-www-form-urlencoded":
|
|
1071
|
-
y("const { URLSearchParams } = require('url');"),
|
|
1072
|
-
|
|
1092
|
+
y("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), (v = t.params) == null || v.forEach((h) => {
|
|
1093
|
+
c(`encodedParams.set('${h.name}', '${h.value}');`);
|
|
1073
1094
|
}), m.body = "encodedParams";
|
|
1074
1095
|
break;
|
|
1075
1096
|
case "application/json":
|
|
@@ -1079,22 +1100,22 @@ var Ao = {
|
|
|
1079
1100
|
if (!t.params)
|
|
1080
1101
|
break;
|
|
1081
1102
|
const f = fe(a, "content-type");
|
|
1082
|
-
f && delete a[f], y("const FormData = require('form-data');"),
|
|
1103
|
+
f && delete a[f], y("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((h) => {
|
|
1083
1104
|
if (!h.fileName && !h.fileName && !h.contentType) {
|
|
1084
|
-
|
|
1105
|
+
c(`formData.append('${h.name}', '${h.value}');`);
|
|
1085
1106
|
return;
|
|
1086
1107
|
}
|
|
1087
|
-
h.fileName && (o = !0,
|
|
1108
|
+
h.fileName && (o = !0, c(`formData.append('${h.name}', fs.createReadStream('${h.fileName}'));`));
|
|
1088
1109
|
});
|
|
1089
1110
|
break;
|
|
1090
1111
|
default:
|
|
1091
1112
|
t.text && (m.body = t.text);
|
|
1092
1113
|
}
|
|
1093
|
-
if (
|
|
1094
|
-
const f =
|
|
1114
|
+
if (l.length) {
|
|
1115
|
+
const f = l.map(({ name: h, value: d }) => `${encodeURIComponent(h)}=${encodeURIComponent(d)}`).join("; ");
|
|
1095
1116
|
m.headers || (m.headers = {}), m.headers.cookie = f;
|
|
1096
1117
|
}
|
|
1097
|
-
i(),
|
|
1118
|
+
i(), c(`const url = '${g}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
|
|
1098
1119
|
const x = ue(m, {
|
|
1099
1120
|
indent: " ",
|
|
1100
1121
|
inlineCharacterLimit: 80,
|
|
@@ -1103,9 +1124,9 @@ var Ao = {
|
|
|
1103
1124
|
// in a `JSON.stringify` call.
|
|
1104
1125
|
transform: (f, h, d) => h === "body" && t.mimeType === "application/json" ? `JSON.stringify(${d})` : d
|
|
1105
1126
|
});
|
|
1106
|
-
return
|
|
1127
|
+
return c(`const options = ${x};`), i(), o && y("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")');
|
|
1107
1128
|
}
|
|
1108
|
-
},
|
|
1129
|
+
}, ii = {
|
|
1109
1130
|
info: {
|
|
1110
1131
|
key: "native",
|
|
1111
1132
|
title: "HTTP",
|
|
@@ -1113,9 +1134,9 @@ var Ao = {
|
|
|
1113
1134
|
description: "Node.js native HTTP interface",
|
|
1114
1135
|
extname: ".cjs"
|
|
1115
1136
|
},
|
|
1116
|
-
convert: ({ uriObj: e, method: n, allHeaders: t, postData: a },
|
|
1137
|
+
convert: ({ uriObj: e, method: n, allHeaders: t, postData: a }, l = {}) => {
|
|
1117
1138
|
var y;
|
|
1118
|
-
const { indent: s = " " } =
|
|
1139
|
+
const { indent: s = " " } = l, { blank: r, join: o, push: i, unshift: c } = new V({ indent: s }), u = {
|
|
1119
1140
|
method: n,
|
|
1120
1141
|
hostname: e.hostname,
|
|
1121
1142
|
port: e.port,
|
|
@@ -1124,7 +1145,7 @@ var Ao = {
|
|
|
1124
1145
|
};
|
|
1125
1146
|
switch (i(`const http = require('${(y = e.protocol) == null ? void 0 : y.replace(":", "")}');`), r(), i(`const options = ${ue(u, { indent: s })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), a.mimeType) {
|
|
1126
1147
|
case "application/x-www-form-urlencoded":
|
|
1127
|
-
a.paramsObj && (
|
|
1148
|
+
a.paramsObj && (c("const qs = require('querystring');"), i(
|
|
1128
1149
|
`req.write(qs.stringify(${ue(a.paramsObj, {
|
|
1129
1150
|
indent: " ",
|
|
1130
1151
|
inlineCharacterLimit: 80
|
|
@@ -1144,7 +1165,7 @@ var Ao = {
|
|
|
1144
1165
|
}
|
|
1145
1166
|
return i("req.end();"), o();
|
|
1146
1167
|
}
|
|
1147
|
-
},
|
|
1168
|
+
}, si = {
|
|
1148
1169
|
info: {
|
|
1149
1170
|
key: "request",
|
|
1150
1171
|
title: "Request",
|
|
@@ -1153,19 +1174,19 @@ var Ao = {
|
|
|
1153
1174
|
extname: ".cjs",
|
|
1154
1175
|
installation: "npm install request --save"
|
|
1155
1176
|
},
|
|
1156
|
-
convert: ({ method: e, url: n, fullUrl: t, postData: a, headersObj:
|
|
1177
|
+
convert: ({ method: e, url: n, fullUrl: t, postData: a, headersObj: l, cookies: s }, r) => {
|
|
1157
1178
|
const o = {
|
|
1158
1179
|
indent: " ",
|
|
1159
1180
|
...r
|
|
1160
1181
|
};
|
|
1161
1182
|
let i = !1;
|
|
1162
|
-
const { push:
|
|
1163
|
-
|
|
1183
|
+
const { push: c, blank: u, join: y, unshift: g, addPostProcessor: m } = new V({ indent: o.indent });
|
|
1184
|
+
c("const request = require('request');"), u();
|
|
1164
1185
|
const x = {
|
|
1165
1186
|
method: e,
|
|
1166
1187
|
url: t
|
|
1167
1188
|
};
|
|
1168
|
-
switch (Object.keys(
|
|
1189
|
+
switch (Object.keys(l).length && (x.headers = l), a.mimeType) {
|
|
1169
1190
|
case "application/x-www-form-urlencoded":
|
|
1170
1191
|
x.form = a.paramsObj;
|
|
1171
1192
|
break;
|
|
@@ -1193,11 +1214,11 @@ var Ao = {
|
|
|
1193
1214
|
default:
|
|
1194
1215
|
a.text && (x.body = a.text);
|
|
1195
1216
|
}
|
|
1196
|
-
return s.length && (x.jar = "JAR",
|
|
1197
|
-
|
|
1198
|
-
}), u(), m((v) => v.replace(/'JAR'/, "jar"))), i && g("const fs = require('fs');"),
|
|
1217
|
+
return s.length && (x.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: v, value: f }) => {
|
|
1218
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(f)}'), '${n}');`);
|
|
1219
|
+
}), u(), m((v) => v.replace(/'JAR'/, "jar"))), i && g("const fs = require('fs');"), c(`const options = ${ue(x, { 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("});"), y();
|
|
1199
1220
|
}
|
|
1200
|
-
},
|
|
1221
|
+
}, li = {
|
|
1201
1222
|
info: {
|
|
1202
1223
|
key: "unirest",
|
|
1203
1224
|
title: "Unirest",
|
|
@@ -1205,40 +1226,40 @@ var Ao = {
|
|
|
1205
1226
|
description: "Lightweight HTTP Request Client Library",
|
|
1206
1227
|
extname: ".cjs"
|
|
1207
1228
|
},
|
|
1208
|
-
convert: ({ method: e, url: n, cookies: t, queryObj: a, postData:
|
|
1229
|
+
convert: ({ method: e, url: n, cookies: t, queryObj: a, postData: l, headersObj: s }, r) => {
|
|
1209
1230
|
const o = {
|
|
1210
1231
|
indent: " ",
|
|
1211
1232
|
...r
|
|
1212
1233
|
};
|
|
1213
1234
|
let i = !1;
|
|
1214
|
-
const { addPostProcessor:
|
|
1235
|
+
const { addPostProcessor: c, blank: u, join: y, push: g, unshift: m } = new V({
|
|
1215
1236
|
indent: o.indent
|
|
1216
1237
|
});
|
|
1217
1238
|
switch (g("const unirest = require('unirest');"), u(), g(`const req = unirest('${e}', '${n}');`), u(), t.length && (g("const CookieJar = unirest.jar();"), t.forEach((x) => {
|
|
1218
1239
|
g(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
|
|
1219
|
-
}), g("req.jar(CookieJar);"), u()), Object.keys(a).length && (g(`req.query(${ue(a, { indent: o.indent })});`), u()), Object.keys(s).length && (g(`req.headers(${ue(s, { indent: o.indent })});`), u()),
|
|
1240
|
+
}), g("req.jar(CookieJar);"), u()), Object.keys(a).length && (g(`req.query(${ue(a, { indent: o.indent })});`), u()), Object.keys(s).length && (g(`req.headers(${ue(s, { indent: o.indent })});`), u()), l.mimeType) {
|
|
1220
1241
|
case "application/x-www-form-urlencoded":
|
|
1221
|
-
|
|
1242
|
+
l.paramsObj && (g(`req.form(${ue(l.paramsObj, { indent: o.indent })});`), u());
|
|
1222
1243
|
break;
|
|
1223
1244
|
case "application/json":
|
|
1224
|
-
|
|
1245
|
+
l.jsonObj && (g("req.type('json');"), g(`req.send(${ue(l.jsonObj, { indent: o.indent })});`), u());
|
|
1225
1246
|
break;
|
|
1226
1247
|
case "multipart/form-data": {
|
|
1227
|
-
if (!
|
|
1248
|
+
if (!l.params)
|
|
1228
1249
|
break;
|
|
1229
1250
|
const x = [];
|
|
1230
|
-
|
|
1251
|
+
l.params.forEach((v) => {
|
|
1231
1252
|
const f = {};
|
|
1232
|
-
v.fileName && !v.value ? (i = !0, f.body = `fs.createReadStream('${v.fileName}')`,
|
|
1253
|
+
v.fileName && !v.value ? (i = !0, f.body = `fs.createReadStream('${v.fileName}')`, c((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (f.body = v.value), f.body && (v.contentType && (f["content-type"] = v.contentType), x.push(f));
|
|
1233
1254
|
}), g(`req.multipart(${ue(x, { indent: o.indent })});`), u();
|
|
1234
1255
|
break;
|
|
1235
1256
|
}
|
|
1236
1257
|
default:
|
|
1237
|
-
|
|
1258
|
+
l.text && (g(`req.send(${ue(l.text, { indent: o.indent })});`), u());
|
|
1238
1259
|
}
|
|
1239
1260
|
return i && m("const fs = require('fs');"), g("req.end(function (res) {"), g("if (res.error) throw new Error(res.error);", 1), u(), g("console.log(res.body);", 1), g("});"), y();
|
|
1240
1261
|
}
|
|
1241
|
-
},
|
|
1262
|
+
}, ci = {
|
|
1242
1263
|
info: {
|
|
1243
1264
|
key: "node",
|
|
1244
1265
|
title: "Node.js",
|
|
@@ -1246,27 +1267,27 @@ var Ao = {
|
|
|
1246
1267
|
cli: "node %s"
|
|
1247
1268
|
},
|
|
1248
1269
|
clientsById: {
|
|
1249
|
-
native:
|
|
1250
|
-
request:
|
|
1251
|
-
unirest:
|
|
1252
|
-
axios:
|
|
1253
|
-
fetch:
|
|
1270
|
+
native: ii,
|
|
1271
|
+
request: si,
|
|
1272
|
+
unirest: li,
|
|
1273
|
+
axios: ai,
|
|
1274
|
+
fetch: oi
|
|
1254
1275
|
}
|
|
1255
|
-
},
|
|
1256
|
-
const
|
|
1257
|
-
return `${
|
|
1258
|
-
},
|
|
1276
|
+
}, yt = (e, n, t, a) => {
|
|
1277
|
+
const l = `${e} *${n} = `, s = mr(t, a ? l.length : void 0);
|
|
1278
|
+
return `${l}${s};`;
|
|
1279
|
+
}, mr = (e, n) => {
|
|
1259
1280
|
const t = n === void 0 ? ", " : `,
|
|
1260
1281
|
${" ".repeat(n)}`;
|
|
1261
1282
|
switch (Object.prototype.toString.call(e)) {
|
|
1262
1283
|
case "[object Number]":
|
|
1263
1284
|
return `@${e}`;
|
|
1264
1285
|
case "[object Array]":
|
|
1265
|
-
return `@[ ${e.map((
|
|
1286
|
+
return `@[ ${e.map((l) => mr(l)).join(t)} ]`;
|
|
1266
1287
|
case "[object Object]": {
|
|
1267
1288
|
const a = [];
|
|
1268
|
-
return Object.keys(e).forEach((
|
|
1269
|
-
a.push(`@"${
|
|
1289
|
+
return Object.keys(e).forEach((l) => {
|
|
1290
|
+
a.push(`@"${l}": ${mr(e[l])}`);
|
|
1270
1291
|
}), `@{ ${a.join(t)} }`;
|
|
1271
1292
|
}
|
|
1272
1293
|
case "[object Boolean]":
|
|
@@ -1274,7 +1295,7 @@ var Ao = {
|
|
|
1274
1295
|
default:
|
|
1275
1296
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1276
1297
|
}
|
|
1277
|
-
},
|
|
1298
|
+
}, ui = {
|
|
1278
1299
|
info: {
|
|
1279
1300
|
key: "nsurlsession",
|
|
1280
1301
|
title: "NSURLSession",
|
|
@@ -1282,19 +1303,19 @@ var Ao = {
|
|
|
1282
1303
|
description: "Foundation's NSURLSession request",
|
|
1283
1304
|
extname: ".m"
|
|
1284
1305
|
},
|
|
1285
|
-
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a },
|
|
1306
|
+
convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
|
|
1286
1307
|
var u;
|
|
1287
1308
|
const s = {
|
|
1288
1309
|
indent: " ",
|
|
1289
1310
|
pretty: !0,
|
|
1290
1311
|
timeout: 10,
|
|
1291
|
-
...
|
|
1292
|
-
}, { push: r, join: o, blank: i } = new V({ indent: s.indent }),
|
|
1312
|
+
...l
|
|
1313
|
+
}, { push: r, join: o, blank: i } = new V({ indent: s.indent }), c = {
|
|
1293
1314
|
hasHeaders: !1,
|
|
1294
1315
|
hasBody: !1
|
|
1295
1316
|
};
|
|
1296
|
-
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (
|
|
1297
|
-
switch (
|
|
1317
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(yt("NSDictionary", "headers", e, s.pretty))), n.text || n.jsonObj || n.params)
|
|
1318
|
+
switch (c.hasBody = !0, n.mimeType) {
|
|
1298
1319
|
case "application/x-www-form-urlencoded":
|
|
1299
1320
|
if ((u = n.params) != null && u.length) {
|
|
1300
1321
|
i();
|
|
@@ -1305,13 +1326,13 @@ var Ao = {
|
|
|
1305
1326
|
r(`[postData appendData:[@"&${m}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1306
1327
|
});
|
|
1307
1328
|
} else
|
|
1308
|
-
|
|
1329
|
+
c.hasBody = !1;
|
|
1309
1330
|
break;
|
|
1310
1331
|
case "application/json":
|
|
1311
|
-
n.jsonObj && (r(
|
|
1332
|
+
n.jsonObj && (r(yt("NSDictionary", "parameters", n.jsonObj, s.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
1312
1333
|
break;
|
|
1313
1334
|
case "multipart/form-data":
|
|
1314
|
-
r(
|
|
1335
|
+
r(yt("NSArray", "parameters", n.params || [], s.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
|
|
1315
1336
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
1316
1337
|
2
|
|
1317
1338
|
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
@@ -1324,23 +1345,23 @@ var Ao = {
|
|
|
1324
1345
|
`NSData *postData = [[NSData alloc] initWithData:[@"${n.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1325
1346
|
);
|
|
1326
1347
|
}
|
|
1327
|
-
return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${a}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${s.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`),
|
|
1348
|
+
return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${a}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${s.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
|
|
1328
1349
|
" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
|
|
1329
1350
|
), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
|
|
1330
1351
|
" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
|
|
1331
1352
|
2
|
|
1332
1353
|
), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), o();
|
|
1333
1354
|
}
|
|
1334
|
-
},
|
|
1355
|
+
}, fi = {
|
|
1335
1356
|
info: {
|
|
1336
1357
|
key: "objc",
|
|
1337
1358
|
title: "Objective-C",
|
|
1338
1359
|
default: "nsurlsession"
|
|
1339
1360
|
},
|
|
1340
1361
|
clientsById: {
|
|
1341
|
-
nsurlsession:
|
|
1362
|
+
nsurlsession: ui
|
|
1342
1363
|
}
|
|
1343
|
-
},
|
|
1364
|
+
}, pi = {
|
|
1344
1365
|
info: {
|
|
1345
1366
|
key: "cohttp",
|
|
1346
1367
|
title: "CoHTTP",
|
|
@@ -1349,11 +1370,11 @@ var Ao = {
|
|
|
1349
1370
|
extname: ".ml",
|
|
1350
1371
|
installation: "opam install cohttp-lwt-unix cohttp-async"
|
|
1351
1372
|
},
|
|
1352
|
-
convert: ({ fullUrl: e, allHeaders: n, postData: t, method: a },
|
|
1373
|
+
convert: ({ fullUrl: e, allHeaders: n, postData: t, method: a }, l) => {
|
|
1353
1374
|
const s = {
|
|
1354
1375
|
indent: " ",
|
|
1355
|
-
...
|
|
1356
|
-
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: i, join:
|
|
1376
|
+
...l
|
|
1377
|
+
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: i, join: c } = new V({ indent: s.indent });
|
|
1357
1378
|
o("open Cohttp_lwt_unix"), o("open Cohttp"), o("open Lwt"), i(), o(`let uri = Uri.of_string "${e}" in`);
|
|
1358
1379
|
const u = Object.keys(n);
|
|
1359
1380
|
u.length === 1 ? o(
|
|
@@ -1364,16 +1385,16 @@ var Ao = {
|
|
|
1364
1385
|
o(`("${x}", "${le(n[x])}");`, 1);
|
|
1365
1386
|
}), o("] in")), t.text && o(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
|
|
1366
1387
|
const y = u.length ? "~headers " : "", g = t.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
1367
|
-
return o(`Client.call ${y}${g}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1),
|
|
1388
|
+
return o(`Client.call ${y}${g}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), c();
|
|
1368
1389
|
}
|
|
1369
|
-
},
|
|
1390
|
+
}, di = {
|
|
1370
1391
|
info: {
|
|
1371
1392
|
key: "ocaml",
|
|
1372
1393
|
title: "OCaml",
|
|
1373
1394
|
default: "cohttp"
|
|
1374
1395
|
},
|
|
1375
1396
|
clientsById: {
|
|
1376
|
-
cohttp:
|
|
1397
|
+
cohttp: pi
|
|
1377
1398
|
}
|
|
1378
1399
|
}, te = (e, n, t) => {
|
|
1379
1400
|
switch (t = t || "", n = n || "", Object.prototype.toString.call(e)) {
|
|
@@ -1388,7 +1409,7 @@ var Ao = {
|
|
|
1388
1409
|
case "[object Number]":
|
|
1389
1410
|
return e.toString();
|
|
1390
1411
|
case "[object Array]": {
|
|
1391
|
-
const a = e.map((
|
|
1412
|
+
const a = e.map((l) => te(l, `${n}${n}`, n)).join(`,
|
|
1392
1413
|
${n}`);
|
|
1393
1414
|
return `[
|
|
1394
1415
|
${n}${a}
|
|
@@ -1396,8 +1417,8 @@ ${t}]`;
|
|
|
1396
1417
|
}
|
|
1397
1418
|
case "[object Object]": {
|
|
1398
1419
|
const a = [];
|
|
1399
|
-
for (const
|
|
1400
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
1420
|
+
for (const l in e)
|
|
1421
|
+
Object.prototype.hasOwnProperty.call(e, l) && a.push(`${te(l, n)} => ${te(e[l], `${n}${n}`, n)}`);
|
|
1401
1422
|
return `[
|
|
1402
1423
|
${n}${a.join(`,
|
|
1403
1424
|
${n}`)}
|
|
@@ -1406,7 +1427,7 @@ ${t}]`;
|
|
|
1406
1427
|
default:
|
|
1407
1428
|
return "null";
|
|
1408
1429
|
}
|
|
1409
|
-
},
|
|
1430
|
+
}, Kr = [
|
|
1410
1431
|
"ACL",
|
|
1411
1432
|
"BASELINE_CONTROL",
|
|
1412
1433
|
"CHECKIN",
|
|
@@ -1434,7 +1455,7 @@ ${t}]`;
|
|
|
1434
1455
|
"UNLOCK",
|
|
1435
1456
|
"UPDATE",
|
|
1436
1457
|
"VERSION_CONTROL"
|
|
1437
|
-
],
|
|
1458
|
+
], hi = {
|
|
1438
1459
|
info: {
|
|
1439
1460
|
key: "curl",
|
|
1440
1461
|
title: "cURL",
|
|
@@ -1442,16 +1463,16 @@ ${t}]`;
|
|
|
1442
1463
|
description: "PHP with ext-curl",
|
|
1443
1464
|
extname: ".php"
|
|
1444
1465
|
},
|
|
1445
|
-
convert: ({ uriObj: e, postData: n, fullUrl: t, method: a, httpVersion:
|
|
1466
|
+
convert: ({ uriObj: e, postData: n, fullUrl: t, method: a, httpVersion: l, cookies: s, headersObj: r }, o = {}) => {
|
|
1446
1467
|
const {
|
|
1447
1468
|
closingTag: i = !1,
|
|
1448
|
-
indent:
|
|
1469
|
+
indent: c = " ",
|
|
1449
1470
|
maxRedirects: u = 10,
|
|
1450
1471
|
namedErrors: y = !1,
|
|
1451
1472
|
noTags: g = !1,
|
|
1452
1473
|
shortTags: m = !1,
|
|
1453
1474
|
timeout: x = 30
|
|
1454
|
-
} = o, { push: v, blank: f, join: h } = new V({ indent:
|
|
1475
|
+
} = o, { push: v, blank: f, join: h } = new V({ indent: c });
|
|
1455
1476
|
g || (v(m ? "<?" : "<?php"), f()), v("$curl = curl_init();"), f();
|
|
1456
1477
|
const d = [
|
|
1457
1478
|
{
|
|
@@ -1487,7 +1508,7 @@ ${t}]`;
|
|
|
1487
1508
|
{
|
|
1488
1509
|
escape: !1,
|
|
1489
1510
|
name: "CURLOPT_HTTP_VERSION",
|
|
1490
|
-
value:
|
|
1511
|
+
value: l === "HTTP/1.0" ? "CURL_HTTP_VERSION_1_0" : "CURL_HTTP_VERSION_1_1"
|
|
1491
1512
|
},
|
|
1492
1513
|
{
|
|
1493
1514
|
escape: !0,
|
|
@@ -1497,22 +1518,22 @@ ${t}]`;
|
|
|
1497
1518
|
{
|
|
1498
1519
|
escape: !n.jsonObj,
|
|
1499
1520
|
name: "CURLOPT_POSTFIELDS",
|
|
1500
|
-
value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj,
|
|
1521
|
+
value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, c.repeat(2), c)})` : n.text : void 0
|
|
1501
1522
|
}
|
|
1502
1523
|
];
|
|
1503
1524
|
v("curl_setopt_array($curl, [");
|
|
1504
|
-
const j = new V({ indent:
|
|
1505
|
-
${
|
|
1506
|
-
d.forEach(({ value: O, name: b, escape:
|
|
1507
|
-
O != null && j.push(`${b} => ${
|
|
1525
|
+
const j = new V({ indent: c, join: `
|
|
1526
|
+
${c}` });
|
|
1527
|
+
d.forEach(({ value: O, name: b, escape: R }) => {
|
|
1528
|
+
O != null && j.push(`${b} => ${R ? JSON.stringify(O) : O},`);
|
|
1508
1529
|
});
|
|
1509
1530
|
const T = s.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
|
|
1510
1531
|
T.length && j.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1511
1532
|
const p = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
|
|
1512
1533
|
return p.length && (j.push("CURLOPT_HTTPHEADER => ["), j.push(p.join(`,
|
|
1513
|
-
${
|
|
1534
|
+
${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), f(), v("curl_close($curl);"), f(), v("if ($err) {"), v(y ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !g && i && (f(), v("?>")), h();
|
|
1514
1535
|
}
|
|
1515
|
-
},
|
|
1536
|
+
}, yi = {
|
|
1516
1537
|
info: {
|
|
1517
1538
|
key: "guzzle",
|
|
1518
1539
|
title: "Guzzle",
|
|
@@ -1521,7 +1542,7 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1521
1542
|
extname: ".php",
|
|
1522
1543
|
installation: "composer require guzzlehttp/guzzle"
|
|
1523
1544
|
},
|
|
1524
|
-
convert: ({ postData: e, fullUrl: n, method: t, cookies: a, headersObj:
|
|
1545
|
+
convert: ({ postData: e, fullUrl: n, method: t, cookies: a, headersObj: l }, s) => {
|
|
1525
1546
|
var v;
|
|
1526
1547
|
const r = {
|
|
1527
1548
|
closingTag: !1,
|
|
@@ -1529,7 +1550,7 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1529
1550
|
noTags: !1,
|
|
1530
1551
|
shortTags: !1,
|
|
1531
1552
|
...s
|
|
1532
|
-
}, { push: o, blank: i, join:
|
|
1553
|
+
}, { push: o, blank: i, join: c } = new V({ indent: r.indent }), { code: u, push: y, join: g } = new V({ indent: r.indent });
|
|
1533
1554
|
switch (r.noTags || o(r.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), i(), e.mimeType) {
|
|
1534
1555
|
case "application/x-www-form-urlencoded":
|
|
1535
1556
|
y(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
@@ -1548,22 +1569,22 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1548
1569
|
name: h.name,
|
|
1549
1570
|
contents: h.value
|
|
1550
1571
|
});
|
|
1551
|
-
}), f.length && (y(`'multipart' => ${te(f, r.indent + r.indent, r.indent)}`, 1), Ze(
|
|
1552
|
-
const h = fe(
|
|
1553
|
-
h && delete
|
|
1572
|
+
}), f.length && (y(`'multipart' => ${te(f, r.indent + r.indent, r.indent)}`, 1), Ze(l, "content-type") && (v = ge(l, "content-type")) != null && v.indexOf("boundary"))) {
|
|
1573
|
+
const h = fe(l, "content-type");
|
|
1574
|
+
h && delete l[h];
|
|
1554
1575
|
}
|
|
1555
1576
|
break;
|
|
1556
1577
|
}
|
|
1557
1578
|
default:
|
|
1558
1579
|
e.text && y(`'body' => ${te(e.text)},`, 1);
|
|
1559
1580
|
}
|
|
1560
|
-
const m = Object.keys(
|
|
1561
|
-
return `${r.indent}${r.indent}'${f}' => '${Fe(
|
|
1581
|
+
const m = Object.keys(l).sort().map(function(f) {
|
|
1582
|
+
return `${r.indent}${r.indent}'${f}' => '${Fe(l[f])}',`;
|
|
1562
1583
|
}), x = a.map((f) => `${encodeURIComponent(f.name)}=${encodeURIComponent(f.value)}`).join("; ");
|
|
1563
1584
|
return x.length && m.push(`${r.indent}${r.indent}'cookie' => '${Fe(x)}',`), m.length && (y("'headers' => [", 1), y(m.join(`
|
|
1564
|
-
`)), y("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (o(`$response = $client->request('${t}', '${n}', [`), o(g()), o("]);")) : o(`$response = $client->request('${t}', '${n}');`), i(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), o("?>")),
|
|
1585
|
+
`)), y("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (o(`$response = $client->request('${t}', '${n}', [`), o(g()), o("]);")) : o(`$response = $client->request('${t}', '${n}');`), i(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), o("?>")), c();
|
|
1565
1586
|
}
|
|
1566
|
-
},
|
|
1587
|
+
}, mi = {
|
|
1567
1588
|
info: {
|
|
1568
1589
|
key: "http1",
|
|
1569
1590
|
title: "HTTP v1",
|
|
@@ -1571,9 +1592,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1571
1592
|
description: "PHP with pecl/http v1",
|
|
1572
1593
|
extname: ".php"
|
|
1573
1594
|
},
|
|
1574
|
-
convert: ({ method: e, url: n, postData: t, queryObj: a, headersObj:
|
|
1575
|
-
const { closingTag: o = !1, indent: i = " ", noTags:
|
|
1576
|
-
switch (
|
|
1595
|
+
convert: ({ method: e, url: n, postData: t, queryObj: a, headersObj: l, cookiesObj: s }, r = {}) => {
|
|
1596
|
+
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
|
|
1597
|
+
switch (c || (y(u ? "<?" : "<?php"), g()), Kr.includes(e.toUpperCase()) || y(`HttpRequest::methodRegister('${e}');`), y("$request = new HttpRequest();"), y(`$request->setUrl(${te(n)});`), Kr.includes(e.toUpperCase()) ? y(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : y(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), g(), Object.keys(a).length && (y(`$request->setQueryData(${te(a, i)});`), g()), Object.keys(l).length && (y(`$request->setHeaders(${te(l, i)});`), g()), Object.keys(s).length && (y(`$request->setCookies(${te(s, i)});`), g()), t.mimeType) {
|
|
1577
1598
|
case "application/x-www-form-urlencoded":
|
|
1578
1599
|
y(`$request->setContentType(${te(t.mimeType)});`), y(`$request->setPostFields(${te(t.paramsObj, i)});`), g();
|
|
1579
1600
|
break;
|
|
@@ -1583,9 +1604,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1583
1604
|
default:
|
|
1584
1605
|
t.text && (y(`$request->setBody(${te(t.text)});`), g());
|
|
1585
1606
|
}
|
|
1586
|
-
return y("try {"), y("$response = $request->send();", 1), g(), y("echo $response->getBody();", 1), y("} catch (HttpException $ex) {"), y("echo $ex;", 1), y("}"), !
|
|
1607
|
+
return y("try {"), y("$response = $request->send();", 1), g(), y("echo $response->getBody();", 1), y("} catch (HttpException $ex) {"), y("echo $ex;", 1), y("}"), !c && o && (g(), y("?>")), m();
|
|
1587
1608
|
}
|
|
1588
|
-
},
|
|
1609
|
+
}, gi = {
|
|
1589
1610
|
info: {
|
|
1590
1611
|
key: "http2",
|
|
1591
1612
|
title: "HTTP v2",
|
|
@@ -1593,11 +1614,11 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1593
1614
|
description: "PHP with pecl/http v2",
|
|
1594
1615
|
extname: ".php"
|
|
1595
1616
|
},
|
|
1596
|
-
convert: ({ postData: e, headersObj: n, method: t, queryObj: a, cookiesObj:
|
|
1617
|
+
convert: ({ postData: e, headersObj: n, method: t, queryObj: a, cookiesObj: l, url: s }, r = {}) => {
|
|
1597
1618
|
var v;
|
|
1598
|
-
const { closingTag: o = !1, indent: i = " ", noTags:
|
|
1619
|
+
const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
|
|
1599
1620
|
let x = !1;
|
|
1600
|
-
switch (
|
|
1621
|
+
switch (c || (y(u ? "<?" : "<?php"), g()), y("$client = new http\\Client;"), y("$request = new http\\Client\\Request;"), g(), e.mimeType) {
|
|
1601
1622
|
case "application/x-www-form-urlencoded":
|
|
1602
1623
|
y("$body = new http\\Message\\Body;"), y(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), g(), x = !0;
|
|
1603
1624
|
break;
|
|
@@ -1631,9 +1652,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1631
1652
|
default:
|
|
1632
1653
|
e.text && (y("$body = new http\\Message\\Body;"), y(`$body->append(${te(e.text)});`), g(), x = !0);
|
|
1633
1654
|
}
|
|
1634
|
-
return y(`$request->setRequestUrl(${te(s)});`), y(`$request->setRequestMethod(${te(t)});`), x && (y("$request->setBody($body);"), g()), Object.keys(a).length && (y(`$request->setQuery(new http\\QueryString(${te(a, i)}));`), g()), Object.keys(n).length && (y(`$request->setHeaders(${te(n, i)});`), g()), Object.keys(
|
|
1655
|
+
return y(`$request->setRequestUrl(${te(s)});`), y(`$request->setRequestMethod(${te(t)});`), x && (y("$request->setBody($body);"), g()), Object.keys(a).length && (y(`$request->setQuery(new http\\QueryString(${te(a, i)}));`), g()), Object.keys(n).length && (y(`$request->setHeaders(${te(n, i)});`), g()), Object.keys(l).length && (g(), y(`$client->setCookies(${te(l, i)});`), g()), y("$client->enqueue($request)->send();"), y("$response = $client->getResponse();"), g(), y("echo $response->getBody();"), !c && o && (g(), y("?>")), m();
|
|
1635
1656
|
}
|
|
1636
|
-
},
|
|
1657
|
+
}, vi = {
|
|
1637
1658
|
info: {
|
|
1638
1659
|
key: "php",
|
|
1639
1660
|
title: "PHP",
|
|
@@ -1641,24 +1662,24 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1641
1662
|
cli: "php %s"
|
|
1642
1663
|
},
|
|
1643
1664
|
clientsById: {
|
|
1644
|
-
curl:
|
|
1645
|
-
guzzle:
|
|
1646
|
-
http1:
|
|
1647
|
-
http2:
|
|
1665
|
+
curl: hi,
|
|
1666
|
+
guzzle: yi,
|
|
1667
|
+
http1: mi,
|
|
1668
|
+
http2: gi
|
|
1648
1669
|
}
|
|
1649
|
-
},
|
|
1650
|
-
const { push:
|
|
1670
|
+
}, fa = (e) => ({ method: t, headersObj: a, cookies: l, uriObj: s, fullUrl: r, postData: o, allHeaders: i }) => {
|
|
1671
|
+
const { push: c, join: u } = new V();
|
|
1651
1672
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1652
1673
|
return "Method not supported";
|
|
1653
1674
|
const g = [], m = Object.keys(a);
|
|
1654
|
-
return m.length && (
|
|
1655
|
-
x !== "connection" &&
|
|
1656
|
-
}), g.push("-Headers $headers")),
|
|
1657
|
-
|
|
1675
|
+
return m.length && (c("$headers=@{}"), m.forEach((x) => {
|
|
1676
|
+
x !== "connection" && c(`$headers.Add("${x}", "${Le(a[x], { escapeChar: "`" })}")`);
|
|
1677
|
+
}), g.push("-Headers $headers")), l.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), l.forEach((x) => {
|
|
1678
|
+
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${s.host}'`), c("$session.Cookies.Add($cookie)");
|
|
1658
1679
|
}), g.push("-WebSession $session")), o.text && (g.push(
|
|
1659
1680
|
`-ContentType '${Le(ge(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1660
|
-
), g.push(`-Body '${o.text}'`)),
|
|
1661
|
-
},
|
|
1681
|
+
), g.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${g.join(" ")}`.trim()), u();
|
|
1682
|
+
}, bi = {
|
|
1662
1683
|
info: {
|
|
1663
1684
|
key: "restmethod",
|
|
1664
1685
|
title: "Invoke-RestMethod",
|
|
@@ -1666,8 +1687,8 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1666
1687
|
description: "Powershell Invoke-RestMethod client",
|
|
1667
1688
|
extname: ".ps1"
|
|
1668
1689
|
},
|
|
1669
|
-
convert:
|
|
1670
|
-
},
|
|
1690
|
+
convert: fa("Invoke-RestMethod")
|
|
1691
|
+
}, xi = {
|
|
1671
1692
|
info: {
|
|
1672
1693
|
key: "webrequest",
|
|
1673
1694
|
title: "Invoke-WebRequest",
|
|
@@ -1675,39 +1696,39 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
|
|
|
1675
1696
|
description: "Powershell Invoke-WebRequest client",
|
|
1676
1697
|
extname: ".ps1"
|
|
1677
1698
|
},
|
|
1678
|
-
convert:
|
|
1679
|
-
},
|
|
1699
|
+
convert: fa("Invoke-WebRequest")
|
|
1700
|
+
}, $i = {
|
|
1680
1701
|
info: {
|
|
1681
1702
|
key: "powershell",
|
|
1682
1703
|
title: "Powershell",
|
|
1683
1704
|
default: "webrequest"
|
|
1684
1705
|
},
|
|
1685
1706
|
clientsById: {
|
|
1686
|
-
webrequest:
|
|
1687
|
-
restmethod:
|
|
1707
|
+
webrequest: xi,
|
|
1708
|
+
restmethod: bi
|
|
1688
1709
|
}
|
|
1689
1710
|
};
|
|
1690
|
-
function
|
|
1691
|
-
const s = a.repeat(
|
|
1692
|
-
${s}` : ", ", i = e === "object" ? "{" : "[",
|
|
1711
|
+
function Yr(e, n, t, a, l) {
|
|
1712
|
+
const s = a.repeat(l), r = a.repeat(l - 1), o = t ? `,
|
|
1713
|
+
${s}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
1693
1714
|
return t ? `${i}
|
|
1694
1715
|
${s}${n.join(o)}
|
|
1695
|
-
${r}${
|
|
1716
|
+
${r}${c}` : e === "object" && n.length > 0 ? `${i} ${n.join(o)} ${c}` : `${i}${n.join(o)}${c}`;
|
|
1696
1717
|
}
|
|
1697
|
-
var
|
|
1718
|
+
var ke = (e, n, t) => {
|
|
1698
1719
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
1699
1720
|
case "[object Number]":
|
|
1700
1721
|
return e;
|
|
1701
1722
|
case "[object Array]": {
|
|
1702
1723
|
let a = !1;
|
|
1703
|
-
const
|
|
1704
|
-
return
|
|
1724
|
+
const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), ke(s, n, t)));
|
|
1725
|
+
return Yr("array", l, a, n.indent, t);
|
|
1705
1726
|
}
|
|
1706
1727
|
case "[object Object]": {
|
|
1707
1728
|
const a = [];
|
|
1708
|
-
for (const
|
|
1709
|
-
a.push(`"${
|
|
1710
|
-
return
|
|
1729
|
+
for (const l in e)
|
|
1730
|
+
a.push(`"${l}": ${ke(e[l], n, t)}`);
|
|
1731
|
+
return Yr("object", a, n.pretty && a.length > 1, n.indent, t);
|
|
1711
1732
|
}
|
|
1712
1733
|
case "[object Null]":
|
|
1713
1734
|
return "None";
|
|
@@ -1716,7 +1737,7 @@ var Re = (e, n, t) => {
|
|
|
1716
1737
|
default:
|
|
1717
1738
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1718
1739
|
}
|
|
1719
|
-
},
|
|
1740
|
+
}, wi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], ji = {
|
|
1720
1741
|
info: {
|
|
1721
1742
|
key: "requests",
|
|
1722
1743
|
title: "Requests",
|
|
@@ -1725,12 +1746,12 @@ var Re = (e, n, t) => {
|
|
|
1725
1746
|
extname: ".py",
|
|
1726
1747
|
installation: "python -m pip install requests"
|
|
1727
1748
|
},
|
|
1728
|
-
convert: ({ fullUrl: e, postData: n, allHeaders: t, method: a },
|
|
1749
|
+
convert: ({ fullUrl: e, postData: n, allHeaders: t, method: a }, l) => {
|
|
1729
1750
|
const s = {
|
|
1730
1751
|
indent: " ",
|
|
1731
1752
|
pretty: !0,
|
|
1732
|
-
...
|
|
1733
|
-
}, { push: r, blank: o, join: i, addPostProcessor:
|
|
1753
|
+
...l
|
|
1754
|
+
}, { push: r, blank: o, join: i, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1734
1755
|
r("import requests"), o(), r(`url = "${e}"`), o();
|
|
1735
1756
|
const u = t;
|
|
1736
1757
|
let y = {};
|
|
@@ -1738,7 +1759,7 @@ var Re = (e, n, t) => {
|
|
|
1738
1759
|
let m = !1, x = !1, v = !1;
|
|
1739
1760
|
switch (n.mimeType) {
|
|
1740
1761
|
case "application/json":
|
|
1741
|
-
n.jsonObj && (r(`payload = ${
|
|
1762
|
+
n.jsonObj && (r(`payload = ${ke(n.jsonObj, s)}`), v = !0, x = !0);
|
|
1742
1763
|
break;
|
|
1743
1764
|
case "multipart/form-data":
|
|
1744
1765
|
if (!n.params)
|
|
@@ -1746,20 +1767,20 @@ var Re = (e, n, t) => {
|
|
|
1746
1767
|
if (y = {}, n.params.forEach((d) => {
|
|
1747
1768
|
d.fileName ? (d.contentType ? g[d.name] = `('${d.fileName}', open('${d.fileName}', 'rb'), '${d.contentType}')` : g[d.name] = `('${d.fileName}', open('${d.fileName}', 'rb'))`, m = !0) : (y[d.name] = d.value, x = !0);
|
|
1748
1769
|
}), m) {
|
|
1749
|
-
r(`files = ${
|
|
1770
|
+
r(`files = ${ke(g, s)}`), x && r(`payload = ${ke(y, s)}`);
|
|
1750
1771
|
const d = fe(u, "content-type");
|
|
1751
1772
|
d && delete u[d];
|
|
1752
1773
|
} else {
|
|
1753
1774
|
const d = JSON.stringify(n.text);
|
|
1754
1775
|
d && (r(`payload = ${d}`), x = !0);
|
|
1755
1776
|
}
|
|
1756
|
-
|
|
1777
|
+
c(
|
|
1757
1778
|
(d) => d.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
|
|
1758
1779
|
);
|
|
1759
1780
|
break;
|
|
1760
1781
|
default: {
|
|
1761
1782
|
if (n.mimeType === "application/x-www-form-urlencoded" && n.paramsObj) {
|
|
1762
|
-
r(`payload = ${
|
|
1783
|
+
r(`payload = ${ke(n.paramsObj, s)}`), x = !0;
|
|
1763
1784
|
break;
|
|
1764
1785
|
}
|
|
1765
1786
|
const d = JSON.stringify(n.text);
|
|
@@ -1779,10 +1800,10 @@ var Re = (e, n, t) => {
|
|
|
1779
1800
|
r(d !== f ? `"${j}": "${le(u[j])}",` : `"${j}": "${le(u[j])}"`, 1), d += 1;
|
|
1780
1801
|
}), r("}"), o();
|
|
1781
1802
|
}
|
|
1782
|
-
let h =
|
|
1803
|
+
let h = wi.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
1783
1804
|
return x && (v ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), f > 0 && (h += ", headers=headers"), h += ")", r(h), o(), r("print(response.text)"), i();
|
|
1784
1805
|
}
|
|
1785
|
-
},
|
|
1806
|
+
}, Si = {
|
|
1786
1807
|
info: {
|
|
1787
1808
|
key: "python",
|
|
1788
1809
|
title: "Python",
|
|
@@ -1790,9 +1811,9 @@ var Re = (e, n, t) => {
|
|
|
1790
1811
|
cli: "python3 %s"
|
|
1791
1812
|
},
|
|
1792
1813
|
clientsById: {
|
|
1793
|
-
requests:
|
|
1814
|
+
requests: ji
|
|
1794
1815
|
}
|
|
1795
|
-
},
|
|
1816
|
+
}, Oi = {
|
|
1796
1817
|
info: {
|
|
1797
1818
|
key: "httr",
|
|
1798
1819
|
title: "httr",
|
|
@@ -1800,14 +1821,14 @@ var Re = (e, n, t) => {
|
|
|
1800
1821
|
description: "httr: Tools for Working with URLs and HTTP",
|
|
1801
1822
|
extname: ".r"
|
|
1802
1823
|
},
|
|
1803
|
-
convert: ({ url: e, queryObj: n, queryString: t, postData: a, allHeaders:
|
|
1824
|
+
convert: ({ url: e, queryObj: n, queryString: t, postData: a, allHeaders: l, method: s }) => {
|
|
1804
1825
|
const { push: r, blank: o, join: i } = new V();
|
|
1805
1826
|
r("library(httr)"), o(), r(`url <- "${e}"`), o();
|
|
1806
|
-
const
|
|
1827
|
+
const c = n;
|
|
1807
1828
|
delete n.key;
|
|
1808
|
-
const u = Object.keys(
|
|
1809
|
-
t.length === 1 ? (r(`queryString <- list(${Object.keys(
|
|
1810
|
-
O !== u - 1 ? r(` ${p} = "${
|
|
1829
|
+
const u = Object.keys(c).length;
|
|
1830
|
+
t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), o()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((p, O) => {
|
|
1831
|
+
O !== u - 1 ? r(` ${p} = "${c[p].toString()}",`) : r(` ${p} = "${c[p].toString()}"`);
|
|
1811
1832
|
}), r(")"), o());
|
|
1812
1833
|
const y = JSON.stringify(a.text);
|
|
1813
1834
|
if (y && (r(`payload <- ${y}`), o()), a.text || a.jsonObj || a.params)
|
|
@@ -1825,22 +1846,22 @@ var Re = (e, n, t) => {
|
|
|
1825
1846
|
r('encode <- "raw"'), o();
|
|
1826
1847
|
break;
|
|
1827
1848
|
}
|
|
1828
|
-
const g = ge(
|
|
1849
|
+
const g = ge(l, "cookie"), m = ge(l, "accept"), x = g ? `set_cookies(\`${String(g).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${le(m)}")` : void 0, f = `content_type("${le(a.mimeType)}")`, h = Object.entries(l).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, O]) => `'${p}' = '${Fe(O)}'`).join(", "), d = h ? `add_headers(${h})` : void 0;
|
|
1829
1850
|
let j = `response <- VERB("${s}", url`;
|
|
1830
1851
|
y && (j += ", body = payload"), t.length && (j += ", query = queryString");
|
|
1831
1852
|
const T = [d, f, v, x].filter((p) => !!p).join(", ");
|
|
1832
1853
|
return T && (j += `, ${T}`), (a.text || a.jsonObj || a.params) && (j += ", encode = encode"), j += ")", r(j), o(), r('content(response, "text")'), i();
|
|
1833
1854
|
}
|
|
1834
|
-
},
|
|
1855
|
+
}, Ti = {
|
|
1835
1856
|
info: {
|
|
1836
1857
|
key: "r",
|
|
1837
1858
|
title: "R",
|
|
1838
1859
|
default: "httr"
|
|
1839
1860
|
},
|
|
1840
1861
|
clientsById: {
|
|
1841
|
-
httr:
|
|
1862
|
+
httr: Oi
|
|
1842
1863
|
}
|
|
1843
|
-
},
|
|
1864
|
+
}, Pi = {
|
|
1844
1865
|
info: {
|
|
1845
1866
|
key: "native",
|
|
1846
1867
|
title: "net::http",
|
|
@@ -1848,10 +1869,10 @@ var Re = (e, n, t) => {
|
|
|
1848
1869
|
description: "Ruby HTTP client",
|
|
1849
1870
|
extname: ".rb"
|
|
1850
1871
|
},
|
|
1851
|
-
convert: ({ uriObj: e, method: n, fullUrl: t, postData: a, allHeaders:
|
|
1872
|
+
convert: ({ uriObj: e, method: n, fullUrl: t, postData: a, allHeaders: l }) => {
|
|
1852
1873
|
const { push: s, blank: r, join: o } = new V();
|
|
1853
1874
|
s("require 'uri'"), s("require 'net/http'"), r();
|
|
1854
|
-
const i = n.toUpperCase(),
|
|
1875
|
+
const i = n.toUpperCase(), c = [
|
|
1855
1876
|
"GET",
|
|
1856
1877
|
"POST",
|
|
1857
1878
|
"HEAD",
|
|
@@ -1865,22 +1886,22 @@ var Re = (e, n, t) => {
|
|
|
1865
1886
|
"MOVE",
|
|
1866
1887
|
"TRACE"
|
|
1867
1888
|
], u = i.charAt(0) + i.substring(1).toLowerCase();
|
|
1868
|
-
|
|
1869
|
-
const y = Object.keys(
|
|
1889
|
+
c.includes(i) || (s(`class Net::HTTP::${u} < Net::HTTPRequest`), s(` METHOD = '${i.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), r()), s(`url = URI("${t}")`), r(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), r(), s(`request = Net::HTTP::${u}.new(url)`);
|
|
1890
|
+
const y = Object.keys(l);
|
|
1870
1891
|
return y.length && y.forEach((g) => {
|
|
1871
|
-
s(`request["${g}"] = '${Fe(
|
|
1892
|
+
s(`request["${g}"] = '${Fe(l[g])}'`);
|
|
1872
1893
|
}), a.text && s(`request.body = ${JSON.stringify(a.text)}`), r(), s("response = http.request(request)"), s("puts response.read_body"), o();
|
|
1873
1894
|
}
|
|
1874
|
-
},
|
|
1895
|
+
}, qi = {
|
|
1875
1896
|
info: {
|
|
1876
1897
|
key: "ruby",
|
|
1877
1898
|
title: "Ruby",
|
|
1878
1899
|
default: "native"
|
|
1879
1900
|
},
|
|
1880
1901
|
clientsById: {
|
|
1881
|
-
native:
|
|
1902
|
+
native: Pi
|
|
1882
1903
|
}
|
|
1883
|
-
}, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1904
|
+
}, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Ci = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ri = {
|
|
1884
1905
|
"http1.0": "0",
|
|
1885
1906
|
"url ": "",
|
|
1886
1907
|
cookie: "b",
|
|
@@ -1890,13 +1911,13 @@ var Re = (e, n, t) => {
|
|
|
1890
1911
|
header: "H",
|
|
1891
1912
|
insecure: "k",
|
|
1892
1913
|
request: "X"
|
|
1893
|
-
},
|
|
1914
|
+
}, Ei = (e) => (n) => {
|
|
1894
1915
|
if (e) {
|
|
1895
|
-
const t =
|
|
1916
|
+
const t = Ri[n];
|
|
1896
1917
|
return t ? `-${t}` : "";
|
|
1897
1918
|
}
|
|
1898
1919
|
return `--${n}`;
|
|
1899
|
-
},
|
|
1920
|
+
}, ki = {
|
|
1900
1921
|
info: {
|
|
1901
1922
|
key: "curl",
|
|
1902
1923
|
title: "cURL",
|
|
@@ -1904,28 +1925,28 @@ var Re = (e, n, t) => {
|
|
|
1904
1925
|
description: "cURL is a command line tool and library for transferring data with URL syntax",
|
|
1905
1926
|
extname: ".sh"
|
|
1906
1927
|
},
|
|
1907
|
-
convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: a, allHeaders:
|
|
1928
|
+
convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: a, allHeaders: l, postData: s }, r = {}) => {
|
|
1908
1929
|
var f;
|
|
1909
|
-
const { indent: o = " ", short: i = !1, binary:
|
|
1930
|
+
const { indent: o = " ", short: i = !1, binary: c = !1, globOff: u = !1 } = r, y = " ", { push: g, join: m } = new V({
|
|
1910
1931
|
...typeof o == "string" ? { indent: o } : {},
|
|
1911
1932
|
join: o !== !1 ? ` \\
|
|
1912
1933
|
${o}` : " "
|
|
1913
|
-
}), x =
|
|
1934
|
+
}), x = Ei(i);
|
|
1914
1935
|
let v = ce(e);
|
|
1915
|
-
if (g(`curl ${x("request")} ${n}`), u && (v = unescape(v), g(x("globoff"))), g(`${x("url ")}${v}`), t === "HTTP/1.0" && g(x("http1.0")), ge(
|
|
1936
|
+
if (g(`curl ${x("request")} ${n}`), u && (v = unescape(v), g(x("globoff"))), g(`${x("url ")}${v}`), t === "HTTP/1.0" && g(x("http1.0")), ge(l, "accept-encoding") && g("--compressed"), s.mimeType === "multipart/form-data") {
|
|
1916
1937
|
const h = fe(a, "content-type");
|
|
1917
1938
|
if (h) {
|
|
1918
1939
|
const d = a[h];
|
|
1919
1940
|
if (h && d) {
|
|
1920
1941
|
const j = String(d).replace(/; boundary.+?(?=(;|$))/, "");
|
|
1921
|
-
a[h] = j,
|
|
1942
|
+
a[h] = j, l[h] = j;
|
|
1922
1943
|
}
|
|
1923
1944
|
}
|
|
1924
1945
|
}
|
|
1925
1946
|
switch (Object.keys(a).sort().forEach((h) => {
|
|
1926
1947
|
const d = `${h}: ${a[h]}`;
|
|
1927
1948
|
g(`${x("header")} ${ce(d)}`);
|
|
1928
|
-
}),
|
|
1949
|
+
}), l.cookie && g(`${x("cookie")} ${ce(l.cookie)}`), s.mimeType) {
|
|
1929
1950
|
case "multipart/form-data":
|
|
1930
1951
|
(f = s.params) == null || f.forEach((d) => {
|
|
1931
1952
|
let j = "";
|
|
@@ -1934,19 +1955,19 @@ ${o}` : " "
|
|
|
1934
1955
|
break;
|
|
1935
1956
|
case "application/x-www-form-urlencoded":
|
|
1936
1957
|
s.params ? s.params.forEach((d) => {
|
|
1937
|
-
const j = d.name, T = encodeURIComponent(d.name), p = T !== j, O = p ? T : j, b =
|
|
1958
|
+
const j = d.name, T = encodeURIComponent(d.name), p = T !== j, O = p ? T : j, b = c ? "--data-binary" : p ? "--data-urlencode" : x("data");
|
|
1938
1959
|
g(`${b} ${ce(`${O}=${d.value}`)}`);
|
|
1939
|
-
}) : g(`${
|
|
1960
|
+
}) : g(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
|
|
1940
1961
|
break;
|
|
1941
1962
|
default:
|
|
1942
1963
|
if (!s.text)
|
|
1943
1964
|
break;
|
|
1944
1965
|
let h = !1;
|
|
1945
|
-
if (
|
|
1966
|
+
if (Eo(s.mimeType) && s.text.length > 20)
|
|
1946
1967
|
try {
|
|
1947
1968
|
const d = JSON.parse(s.text);
|
|
1948
1969
|
h = !0, s.text.indexOf("'") > 0 ? g(
|
|
1949
|
-
`${
|
|
1970
|
+
`${c ? "--data-binary" : x("data")} @- <<EOF
|
|
1950
1971
|
${JSON.stringify(
|
|
1951
1972
|
d,
|
|
1952
1973
|
null,
|
|
@@ -1954,17 +1975,17 @@ ${JSON.stringify(
|
|
|
1954
1975
|
)}
|
|
1955
1976
|
EOF`
|
|
1956
1977
|
) : g(
|
|
1957
|
-
`${
|
|
1978
|
+
`${c ? "--data-binary" : x("data")} '
|
|
1958
1979
|
${JSON.stringify(d, null, y)}
|
|
1959
1980
|
'`
|
|
1960
1981
|
);
|
|
1961
1982
|
} catch {
|
|
1962
1983
|
}
|
|
1963
|
-
h || g(`${
|
|
1984
|
+
h || g(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
|
|
1964
1985
|
}
|
|
1965
1986
|
return m();
|
|
1966
1987
|
}
|
|
1967
|
-
},
|
|
1988
|
+
}, Ni = {
|
|
1968
1989
|
info: {
|
|
1969
1990
|
key: "httpie",
|
|
1970
1991
|
title: "HTTPie",
|
|
@@ -1973,7 +1994,7 @@ ${JSON.stringify(d, null, y)}
|
|
|
1973
1994
|
extname: ".sh",
|
|
1974
1995
|
installation: "brew install httpie"
|
|
1975
1996
|
},
|
|
1976
|
-
convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: a, method:
|
|
1997
|
+
convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: a, method: l, url: s }, r) => {
|
|
1977
1998
|
const o = {
|
|
1978
1999
|
body: !1,
|
|
1979
2000
|
cert: !1,
|
|
@@ -1988,7 +2009,7 @@ ${JSON.stringify(d, null, y)}
|
|
|
1988
2009
|
verbose: !1,
|
|
1989
2010
|
verify: !1,
|
|
1990
2011
|
...r
|
|
1991
|
-
}, { push: i, join:
|
|
2012
|
+
}, { push: i, join: c, unshift: u } = new V({
|
|
1992
2013
|
indent: o.indent,
|
|
1993
2014
|
// @ts-expect-error SEEMS LEGIT
|
|
1994
2015
|
join: o.indent !== !1 ? ` \\
|
|
@@ -2007,13 +2028,13 @@ ${o.indent}` : " "
|
|
|
2007
2028
|
i(`${x.name}=${ce(x.value)}`);
|
|
2008
2029
|
})) : y = !0;
|
|
2009
2030
|
const m = g.length ? `${g.join(" ")} ` : "";
|
|
2010
|
-
if (s = ce(o.queryParams ? s : a), u(`http ${m}${
|
|
2031
|
+
if (s = ce(o.queryParams ? s : a), u(`http ${m}${l} ${s}`), y && n.text) {
|
|
2011
2032
|
const x = ce(n.text);
|
|
2012
2033
|
u(`echo ${x} | `);
|
|
2013
2034
|
}
|
|
2014
|
-
return
|
|
2035
|
+
return c();
|
|
2015
2036
|
}
|
|
2016
|
-
},
|
|
2037
|
+
}, Ai = {
|
|
2017
2038
|
info: {
|
|
2018
2039
|
key: "wget",
|
|
2019
2040
|
title: "Wget",
|
|
@@ -2021,23 +2042,23 @@ ${o.indent}` : " "
|
|
|
2021
2042
|
description: "a free software package for retrieving files using HTTP, HTTPS",
|
|
2022
2043
|
extname: ".sh"
|
|
2023
2044
|
},
|
|
2024
|
-
convert: ({ method: e, postData: n, allHeaders: t, fullUrl: a },
|
|
2045
|
+
convert: ({ method: e, postData: n, allHeaders: t, fullUrl: a }, l) => {
|
|
2025
2046
|
const s = {
|
|
2026
2047
|
indent: " ",
|
|
2027
2048
|
short: !1,
|
|
2028
2049
|
verbose: !1,
|
|
2029
|
-
...
|
|
2050
|
+
...l
|
|
2030
2051
|
}, { push: r, join: o } = new V({
|
|
2031
2052
|
...typeof s.indent == "string" ? { indent: s.indent } : {},
|
|
2032
2053
|
join: s.indent !== !1 ? ` \\
|
|
2033
2054
|
${s.indent}` : " "
|
|
2034
2055
|
});
|
|
2035
2056
|
return s.verbose ? r(`wget ${s.short ? "-v" : "--verbose"}`) : r(`wget ${s.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
|
|
2036
|
-
const
|
|
2037
|
-
r(`--header ${ce(
|
|
2038
|
-
}), n.text && r(`--body-data ${
|
|
2057
|
+
const c = `${i}: ${t[i]}`;
|
|
2058
|
+
r(`--header ${ce(c)}`);
|
|
2059
|
+
}), n.text && r(`--body-data ${Ci(ce(n.text))}`), r(s.short ? "-O" : "--output-document"), r(`- ${ce(a)}`), o();
|
|
2039
2060
|
}
|
|
2040
|
-
},
|
|
2061
|
+
}, Ii = {
|
|
2041
2062
|
info: {
|
|
2042
2063
|
key: "shell",
|
|
2043
2064
|
title: "Shell",
|
|
@@ -2045,30 +2066,30 @@ ${s.indent}` : " "
|
|
|
2045
2066
|
cli: "%s"
|
|
2046
2067
|
},
|
|
2047
2068
|
clientsById: {
|
|
2048
|
-
curl:
|
|
2049
|
-
httpie:
|
|
2050
|
-
wget:
|
|
2069
|
+
curl: ki,
|
|
2070
|
+
httpie: Ni,
|
|
2071
|
+
wget: Ai
|
|
2051
2072
|
}
|
|
2052
|
-
},
|
|
2053
|
-
const
|
|
2054
|
-
${
|
|
2073
|
+
}, Xr = (e, n) => n.repeat(e), Zr = (e, n, t, a) => {
|
|
2074
|
+
const l = Xr(a, t), s = Xr(a - 1, t), r = n ? `,
|
|
2075
|
+
${l}` : ", ";
|
|
2055
2076
|
return n ? `[
|
|
2056
|
-
${
|
|
2077
|
+
${l}${e.join(r)}
|
|
2057
2078
|
${s}]` : `[${e.join(r)}]`;
|
|
2058
|
-
},
|
|
2079
|
+
}, en = (e, n, t) => `let ${e} = ${Xe(n, t)}`, Xe = (e, n, t) => {
|
|
2059
2080
|
switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
|
|
2060
2081
|
case "[object Number]":
|
|
2061
2082
|
return e;
|
|
2062
2083
|
case "[object Array]": {
|
|
2063
2084
|
let a = !1;
|
|
2064
|
-
const
|
|
2065
|
-
return
|
|
2085
|
+
const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), Xe(s, n, t)));
|
|
2086
|
+
return Zr(l, a, n.indent, t);
|
|
2066
2087
|
}
|
|
2067
2088
|
case "[object Object]": {
|
|
2068
2089
|
const a = [];
|
|
2069
|
-
for (const
|
|
2070
|
-
a.push(`"${
|
|
2071
|
-
return
|
|
2090
|
+
for (const l in e)
|
|
2091
|
+
a.push(`"${l}": ${Xe(e[l], n, t)}`);
|
|
2092
|
+
return Zr(
|
|
2072
2093
|
a,
|
|
2073
2094
|
// @ts-expect-error needs better types
|
|
2074
2095
|
n.pretty && a.length > 1,
|
|
@@ -2082,7 +2103,7 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2082
2103
|
default:
|
|
2083
2104
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2084
2105
|
}
|
|
2085
|
-
},
|
|
2106
|
+
}, Ui = {
|
|
2086
2107
|
info: {
|
|
2087
2108
|
key: "urlsession",
|
|
2088
2109
|
title: "URLSession",
|
|
@@ -2090,14 +2111,14 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2090
2111
|
description: "Foundation's URLSession request",
|
|
2091
2112
|
extname: ".swift"
|
|
2092
2113
|
},
|
|
2093
|
-
convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: a, method:
|
|
2114
|
+
convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: a, method: l }, s) => {
|
|
2094
2115
|
var g;
|
|
2095
2116
|
const r = {
|
|
2096
2117
|
indent: " ",
|
|
2097
2118
|
pretty: !0,
|
|
2098
2119
|
timeout: 10,
|
|
2099
2120
|
...s
|
|
2100
|
-
}, { push: o, blank: i, join:
|
|
2121
|
+
}, { push: o, blank: i, join: c } = new V({ indent: r.indent });
|
|
2101
2122
|
o("import Foundation"), i();
|
|
2102
2123
|
const u = n.text || n.jsonObj || n.params;
|
|
2103
2124
|
if (u)
|
|
@@ -2109,10 +2130,10 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2109
2130
|
}
|
|
2110
2131
|
break;
|
|
2111
2132
|
case "application/json":
|
|
2112
|
-
n.jsonObj && (o(`${
|
|
2133
|
+
n.jsonObj && (o(`${en("parameters", n.jsonObj, r)} as [String : Any?]`), i(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
|
|
2113
2134
|
break;
|
|
2114
2135
|
case "multipart/form-data":
|
|
2115
|
-
o(
|
|
2136
|
+
o(en("parameters", n.params, r)), i(), o(`let boundary = "${n.boundary}"`), i(), o('var body = ""'), o("for param in parameters {"), o('let paramName = param["name"]!', 1), o('body += "--\\(boundary)\\r\\n"', 1), o('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), o('if let filename = param["fileName"] {', 1), o('let contentType = param["contentType"]!', 2), o("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), o('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), o('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), o("body += fileContent", 2), o('} else if let paramValue = param["value"] {', 1), o('body += "\\r\\n\\r\\n\\(paramValue)"', 2), o("}", 1), o("}"), i(), o("let postData = Data(body.utf8)"), i();
|
|
2116
2137
|
break;
|
|
2117
2138
|
default:
|
|
2118
2139
|
o(`let postData = Data("${n.text}".utf8)`), i();
|
|
@@ -2131,108 +2152,108 @@ ${s}]` : `[${e.join(r)}]`;
|
|
|
2131
2152
|
});
|
|
2132
2153
|
break;
|
|
2133
2154
|
}
|
|
2134
|
-
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${
|
|
2155
|
+
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${l}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${Xe(e, r)}`), u && o("request.httpBody = postData"), i(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2135
2156
|
}
|
|
2136
|
-
},
|
|
2157
|
+
}, Li = {
|
|
2137
2158
|
info: {
|
|
2138
2159
|
key: "swift",
|
|
2139
2160
|
title: "Swift",
|
|
2140
2161
|
default: "urlsession"
|
|
2141
2162
|
},
|
|
2142
2163
|
clientsById: {
|
|
2143
|
-
urlsession:
|
|
2164
|
+
urlsession: Ui
|
|
2144
2165
|
}
|
|
2145
|
-
},
|
|
2146
|
-
c:
|
|
2147
|
-
clojure:
|
|
2148
|
-
csharp:
|
|
2149
|
-
go:
|
|
2150
|
-
http:
|
|
2151
|
-
java:
|
|
2152
|
-
javascript:
|
|
2153
|
-
json:
|
|
2154
|
-
kotlin:
|
|
2155
|
-
node:
|
|
2156
|
-
objc:
|
|
2157
|
-
ocaml:
|
|
2158
|
-
php:
|
|
2159
|
-
powershell:
|
|
2160
|
-
python:
|
|
2161
|
-
r:
|
|
2162
|
-
ruby:
|
|
2163
|
-
shell:
|
|
2164
|
-
swift:
|
|
2165
|
-
},
|
|
2166
|
+
}, Fi = {
|
|
2167
|
+
c: Ro,
|
|
2168
|
+
clojure: Ao,
|
|
2169
|
+
csharp: _o,
|
|
2170
|
+
go: Ho,
|
|
2171
|
+
http: zo,
|
|
2172
|
+
java: Do,
|
|
2173
|
+
javascript: Zo,
|
|
2174
|
+
json: ti,
|
|
2175
|
+
kotlin: ni,
|
|
2176
|
+
node: ci,
|
|
2177
|
+
objc: fi,
|
|
2178
|
+
ocaml: di,
|
|
2179
|
+
php: vi,
|
|
2180
|
+
powershell: $i,
|
|
2181
|
+
python: Si,
|
|
2182
|
+
r: Ti,
|
|
2183
|
+
ruby: qi,
|
|
2184
|
+
shell: Ii,
|
|
2185
|
+
swift: Li
|
|
2186
|
+
}, Te = {}, Ie = { exports: {} };
|
|
2166
2187
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2167
|
-
var
|
|
2168
|
-
function
|
|
2169
|
-
return
|
|
2188
|
+
var _i = Ie.exports, tn;
|
|
2189
|
+
function Bi() {
|
|
2190
|
+
return tn || (tn = 1, function(e, n) {
|
|
2170
2191
|
(function(t) {
|
|
2171
|
-
var a = n && !n.nodeType && n,
|
|
2192
|
+
var a = n && !n.nodeType && n, l = e && !e.nodeType && e, s = typeof Ke == "object" && Ke;
|
|
2172
2193
|
(s.global === s || s.window === s || s.self === s) && (t = s);
|
|
2173
|
-
var r, o = 2147483647, i = 36,
|
|
2194
|
+
var r, o = 2147483647, i = 36, c = 1, u = 26, y = 38, g = 700, m = 72, x = 128, v = "-", f = /^xn--/, h = /[^\x20-\x7E]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, j = {
|
|
2174
2195
|
overflow: "Overflow: input needs wider integers to process",
|
|
2175
2196
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2176
2197
|
"invalid-input": "Invalid input"
|
|
2177
|
-
}, T = i -
|
|
2178
|
-
function E
|
|
2179
|
-
throw new RangeError(j[
|
|
2198
|
+
}, T = i - c, p = Math.floor, O = String.fromCharCode, b;
|
|
2199
|
+
function R(E) {
|
|
2200
|
+
throw new RangeError(j[E]);
|
|
2180
2201
|
}
|
|
2181
|
-
function N(
|
|
2182
|
-
for (var F =
|
|
2183
|
-
q[F] = k(
|
|
2202
|
+
function N(E, k) {
|
|
2203
|
+
for (var F = E.length, q = []; F--; )
|
|
2204
|
+
q[F] = k(E[F]);
|
|
2184
2205
|
return q;
|
|
2185
2206
|
}
|
|
2186
|
-
function C(
|
|
2187
|
-
var F =
|
|
2188
|
-
F.length > 1 && (q = F[0] + "@",
|
|
2189
|
-
var U =
|
|
2207
|
+
function C(E, k) {
|
|
2208
|
+
var F = E.split("@"), q = "";
|
|
2209
|
+
F.length > 1 && (q = F[0] + "@", E = F[1]), E = E.replace(d, ".");
|
|
2210
|
+
var U = E.split("."), J = N(U, k).join(".");
|
|
2190
2211
|
return q + J;
|
|
2191
2212
|
}
|
|
2192
|
-
function L(
|
|
2193
|
-
for (var k = [], F = 0, q =
|
|
2194
|
-
U =
|
|
2213
|
+
function L(E) {
|
|
2214
|
+
for (var k = [], F = 0, q = E.length, U, J; F < q; )
|
|
2215
|
+
U = E.charCodeAt(F++), U >= 55296 && U <= 56319 && F < q ? (J = E.charCodeAt(F++), (J & 64512) == 56320 ? k.push(((U & 1023) << 10) + (J & 1023) + 65536) : (k.push(U), F--)) : k.push(U);
|
|
2195
2216
|
return k;
|
|
2196
2217
|
}
|
|
2197
|
-
function P(
|
|
2198
|
-
return N(
|
|
2218
|
+
function P(E) {
|
|
2219
|
+
return N(E, function(k) {
|
|
2199
2220
|
var F = "";
|
|
2200
2221
|
return k > 65535 && (k -= 65536, F += O(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), F += O(k), F;
|
|
2201
2222
|
}).join("");
|
|
2202
2223
|
}
|
|
2203
|
-
function oe(
|
|
2204
|
-
return
|
|
2224
|
+
function oe(E) {
|
|
2225
|
+
return E - 48 < 10 ? E - 22 : E - 65 < 26 ? E - 65 : E - 97 < 26 ? E - 97 : i;
|
|
2205
2226
|
}
|
|
2206
|
-
function H(
|
|
2207
|
-
return
|
|
2227
|
+
function H(E, k) {
|
|
2228
|
+
return E + 22 + 75 * (E < 26) - ((k != 0) << 5);
|
|
2208
2229
|
}
|
|
2209
|
-
function D(
|
|
2230
|
+
function D(E, k, F) {
|
|
2210
2231
|
var q = 0;
|
|
2211
|
-
for (
|
|
2212
|
-
|
|
2213
|
-
return p(q + (T + 1) *
|
|
2232
|
+
for (E = F ? p(E / g) : E >> 1, E += p(E / k); E > T * u >> 1; q += i)
|
|
2233
|
+
E = p(E / T);
|
|
2234
|
+
return p(q + (T + 1) * E / (E + y));
|
|
2214
2235
|
}
|
|
2215
|
-
function se(
|
|
2216
|
-
var k = [], F =
|
|
2217
|
-
for (K =
|
|
2218
|
-
|
|
2236
|
+
function se(E) {
|
|
2237
|
+
var k = [], F = E.length, q, U = 0, J = x, z = m, K, ne, G, I, _, B, Q, W, Y;
|
|
2238
|
+
for (K = E.lastIndexOf(v), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
|
|
2239
|
+
E.charCodeAt(ne) >= 128 && R("not-basic"), k.push(E.charCodeAt(ne));
|
|
2219
2240
|
for (G = K > 0 ? K + 1 : 0; G < F; ) {
|
|
2220
|
-
for (I = U, _ = 1, B = i; G >= F &&
|
|
2221
|
-
Y = i - W, _ > p(o / Y) &&
|
|
2222
|
-
q = k.length + 1, z = D(U - I, q, I == 0), p(U / q) > o - J &&
|
|
2241
|
+
for (I = U, _ = 1, B = i; G >= F && R("invalid-input"), Q = oe(E.charCodeAt(G++)), (Q >= i || Q > p((o - U) / _)) && R("overflow"), U += Q * _, W = B <= z ? c : B >= z + u ? u : B - z, !(Q < W); B += i)
|
|
2242
|
+
Y = i - W, _ > p(o / Y) && R("overflow"), _ *= Y;
|
|
2243
|
+
q = k.length + 1, z = D(U - I, q, I == 0), p(U / q) > o - J && R("overflow"), J += p(U / q), U %= q, k.splice(U++, 0, J);
|
|
2223
2244
|
}
|
|
2224
2245
|
return P(k);
|
|
2225
2246
|
}
|
|
2226
|
-
function Z(
|
|
2247
|
+
function Z(E) {
|
|
2227
2248
|
var k, F, q, U, J, z, K, ne, G, I, _, B = [], Q, W, Y, ae;
|
|
2228
|
-
for (
|
|
2229
|
-
_ =
|
|
2249
|
+
for (E = L(E), Q = E.length, k = x, F = 0, J = m, z = 0; z < Q; ++z)
|
|
2250
|
+
_ = E[z], _ < 128 && B.push(O(_));
|
|
2230
2251
|
for (q = U = B.length, U && B.push(v); q < Q; ) {
|
|
2231
2252
|
for (K = o, z = 0; z < Q; ++z)
|
|
2232
|
-
_ =
|
|
2233
|
-
for (W = q + 1, K - k > p((o - F) / W) &&
|
|
2234
|
-
if (_ =
|
|
2235
|
-
for (ne = F, G = i; I = G <= J ?
|
|
2253
|
+
_ = E[z], _ >= k && _ < K && (K = _);
|
|
2254
|
+
for (W = q + 1, K - k > p((o - F) / W) && R("overflow"), F += (K - k) * W, k = K, z = 0; z < Q; ++z)
|
|
2255
|
+
if (_ = E[z], _ < k && ++F > o && R("overflow"), _ == k) {
|
|
2256
|
+
for (ne = F, G = i; I = G <= J ? c : G >= J + u ? u : G - J, !(ne < I); G += i)
|
|
2236
2257
|
ae = ne - I, Y = i - I, B.push(
|
|
2237
2258
|
O(H(I + ae % Y, 0))
|
|
2238
2259
|
), ne = p(ae / Y);
|
|
@@ -2242,13 +2263,13 @@ function Ui() {
|
|
|
2242
2263
|
}
|
|
2243
2264
|
return B.join("");
|
|
2244
2265
|
}
|
|
2245
|
-
function A(
|
|
2246
|
-
return C(
|
|
2266
|
+
function A(E) {
|
|
2267
|
+
return C(E, function(k) {
|
|
2247
2268
|
return f.test(k) ? se(k.slice(4).toLowerCase()) : k;
|
|
2248
2269
|
});
|
|
2249
2270
|
}
|
|
2250
|
-
function re(
|
|
2251
|
-
return C(
|
|
2271
|
+
function re(E) {
|
|
2272
|
+
return C(E, function(k) {
|
|
2252
2273
|
return h.test(k) ? "xn--" + Z(k) : k;
|
|
2253
2274
|
});
|
|
2254
2275
|
}
|
|
@@ -2274,109 +2295,109 @@ function Ui() {
|
|
|
2274
2295
|
encode: Z,
|
|
2275
2296
|
toASCII: re,
|
|
2276
2297
|
toUnicode: A
|
|
2277
|
-
}, a &&
|
|
2298
|
+
}, a && l)
|
|
2278
2299
|
if (e.exports == a)
|
|
2279
|
-
|
|
2300
|
+
l.exports = r;
|
|
2280
2301
|
else
|
|
2281
2302
|
for (b in r)
|
|
2282
2303
|
r.hasOwnProperty(b) && (a[b] = r[b]);
|
|
2283
2304
|
else
|
|
2284
2305
|
t.punycode = r;
|
|
2285
|
-
})(
|
|
2286
|
-
}(
|
|
2287
|
-
}
|
|
2288
|
-
var yt, tn;
|
|
2289
|
-
function ua() {
|
|
2290
|
-
return tn || (tn = 1, yt = Object), yt;
|
|
2306
|
+
})(_i);
|
|
2307
|
+
}(Ie, Ie.exports)), Ie.exports;
|
|
2291
2308
|
}
|
|
2292
2309
|
var mt, rn;
|
|
2293
|
-
function
|
|
2294
|
-
return rn || (rn = 1, mt =
|
|
2310
|
+
function pa() {
|
|
2311
|
+
return rn || (rn = 1, mt = Object), mt;
|
|
2295
2312
|
}
|
|
2296
2313
|
var gt, nn;
|
|
2297
|
-
function
|
|
2298
|
-
return nn || (nn = 1, gt =
|
|
2314
|
+
function Hi() {
|
|
2315
|
+
return nn || (nn = 1, gt = Error), gt;
|
|
2299
2316
|
}
|
|
2300
2317
|
var vt, an;
|
|
2301
|
-
function
|
|
2302
|
-
return an || (an = 1, vt =
|
|
2318
|
+
function Mi() {
|
|
2319
|
+
return an || (an = 1, vt = EvalError), vt;
|
|
2303
2320
|
}
|
|
2304
2321
|
var bt, on;
|
|
2305
|
-
function
|
|
2306
|
-
return on || (on = 1, bt =
|
|
2322
|
+
function zi() {
|
|
2323
|
+
return on || (on = 1, bt = RangeError), bt;
|
|
2307
2324
|
}
|
|
2308
2325
|
var xt, sn;
|
|
2309
|
-
function
|
|
2310
|
-
return sn || (sn = 1, xt =
|
|
2326
|
+
function Wi() {
|
|
2327
|
+
return sn || (sn = 1, xt = ReferenceError), xt;
|
|
2311
2328
|
}
|
|
2312
2329
|
var $t, ln;
|
|
2313
|
-
function
|
|
2314
|
-
return ln || (ln = 1, $t =
|
|
2330
|
+
function da() {
|
|
2331
|
+
return ln || (ln = 1, $t = SyntaxError), $t;
|
|
2315
2332
|
}
|
|
2316
2333
|
var wt, cn;
|
|
2317
|
-
function
|
|
2318
|
-
return cn || (cn = 1, wt =
|
|
2334
|
+
function Be() {
|
|
2335
|
+
return cn || (cn = 1, wt = TypeError), wt;
|
|
2319
2336
|
}
|
|
2320
2337
|
var jt, un;
|
|
2321
|
-
function
|
|
2322
|
-
return un || (un = 1, jt =
|
|
2338
|
+
function Ji() {
|
|
2339
|
+
return un || (un = 1, jt = URIError), jt;
|
|
2323
2340
|
}
|
|
2324
2341
|
var St, fn;
|
|
2325
|
-
function
|
|
2326
|
-
return fn || (fn = 1, St = Math.
|
|
2342
|
+
function Gi() {
|
|
2343
|
+
return fn || (fn = 1, St = Math.abs), St;
|
|
2327
2344
|
}
|
|
2328
2345
|
var Ot, pn;
|
|
2329
|
-
function
|
|
2330
|
-
return pn || (pn = 1, Ot = Math.
|
|
2346
|
+
function Vi() {
|
|
2347
|
+
return pn || (pn = 1, Ot = Math.floor), Ot;
|
|
2331
2348
|
}
|
|
2332
2349
|
var Tt, dn;
|
|
2333
|
-
function
|
|
2334
|
-
return dn || (dn = 1, Tt = Math.
|
|
2350
|
+
function Di() {
|
|
2351
|
+
return dn || (dn = 1, Tt = Math.max), Tt;
|
|
2335
2352
|
}
|
|
2336
2353
|
var Pt, hn;
|
|
2337
|
-
function
|
|
2338
|
-
return hn || (hn = 1, Pt = Math.
|
|
2354
|
+
function Qi() {
|
|
2355
|
+
return hn || (hn = 1, Pt = Math.min), Pt;
|
|
2339
2356
|
}
|
|
2340
2357
|
var qt, yn;
|
|
2341
|
-
function
|
|
2342
|
-
return yn || (yn = 1, qt = Math.
|
|
2358
|
+
function Ki() {
|
|
2359
|
+
return yn || (yn = 1, qt = Math.pow), qt;
|
|
2343
2360
|
}
|
|
2344
2361
|
var Ct, mn;
|
|
2345
|
-
function
|
|
2346
|
-
return mn || (mn = 1, Ct =
|
|
2362
|
+
function Yi() {
|
|
2363
|
+
return mn || (mn = 1, Ct = Math.round), Ct;
|
|
2364
|
+
}
|
|
2365
|
+
var Rt, gn;
|
|
2366
|
+
function Xi() {
|
|
2367
|
+
return gn || (gn = 1, Rt = Number.isNaN || function(n) {
|
|
2347
2368
|
return n !== n;
|
|
2348
|
-
}),
|
|
2369
|
+
}), Rt;
|
|
2349
2370
|
}
|
|
2350
|
-
var Et,
|
|
2351
|
-
function
|
|
2352
|
-
if (
|
|
2353
|
-
|
|
2354
|
-
var e = /* @__PURE__ */
|
|
2371
|
+
var Et, vn;
|
|
2372
|
+
function Zi() {
|
|
2373
|
+
if (vn) return Et;
|
|
2374
|
+
vn = 1;
|
|
2375
|
+
var e = /* @__PURE__ */ Xi();
|
|
2355
2376
|
return Et = function(t) {
|
|
2356
2377
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2357
2378
|
}, Et;
|
|
2358
2379
|
}
|
|
2359
|
-
var Rt, vn;
|
|
2360
|
-
function Ki() {
|
|
2361
|
-
return vn || (vn = 1, Rt = Object.getOwnPropertyDescriptor), Rt;
|
|
2362
|
-
}
|
|
2363
2380
|
var kt, bn;
|
|
2381
|
+
function es() {
|
|
2382
|
+
return bn || (bn = 1, kt = Object.getOwnPropertyDescriptor), kt;
|
|
2383
|
+
}
|
|
2384
|
+
var Nt, xn;
|
|
2364
2385
|
function et() {
|
|
2365
|
-
if (
|
|
2366
|
-
|
|
2367
|
-
var e = /* @__PURE__ */
|
|
2386
|
+
if (xn) return Nt;
|
|
2387
|
+
xn = 1;
|
|
2388
|
+
var e = /* @__PURE__ */ es();
|
|
2368
2389
|
if (e)
|
|
2369
2390
|
try {
|
|
2370
2391
|
e([], "length");
|
|
2371
2392
|
} catch {
|
|
2372
2393
|
e = null;
|
|
2373
2394
|
}
|
|
2374
|
-
return
|
|
2395
|
+
return Nt = e, Nt;
|
|
2375
2396
|
}
|
|
2376
|
-
var
|
|
2397
|
+
var At, $n;
|
|
2377
2398
|
function tt() {
|
|
2378
|
-
if (
|
|
2379
|
-
|
|
2399
|
+
if ($n) return At;
|
|
2400
|
+
$n = 1;
|
|
2380
2401
|
var e = Object.defineProperty || !1;
|
|
2381
2402
|
if (e)
|
|
2382
2403
|
try {
|
|
@@ -2384,11 +2405,11 @@ function tt() {
|
|
|
2384
2405
|
} catch {
|
|
2385
2406
|
e = !1;
|
|
2386
2407
|
}
|
|
2387
|
-
return
|
|
2408
|
+
return At = e, At;
|
|
2388
2409
|
}
|
|
2389
|
-
var
|
|
2390
|
-
function
|
|
2391
|
-
return
|
|
2410
|
+
var It, wn;
|
|
2411
|
+
function ts() {
|
|
2412
|
+
return wn || (wn = 1, It = function() {
|
|
2392
2413
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2393
2414
|
return !1;
|
|
2394
2415
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2396,8 +2417,8 @@ function Yi() {
|
|
|
2396
2417
|
var n = {}, t = Symbol("test"), a = Object(t);
|
|
2397
2418
|
if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(a) !== "[object Symbol]")
|
|
2398
2419
|
return !1;
|
|
2399
|
-
var
|
|
2400
|
-
n[t] =
|
|
2420
|
+
var l = 42;
|
|
2421
|
+
n[t] = l;
|
|
2401
2422
|
for (var s in n)
|
|
2402
2423
|
return !1;
|
|
2403
2424
|
if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(n).length !== 0)
|
|
@@ -2410,119 +2431,119 @@ function Yi() {
|
|
|
2410
2431
|
/** @type {PropertyDescriptor} */
|
|
2411
2432
|
Object.getOwnPropertyDescriptor(n, t)
|
|
2412
2433
|
);
|
|
2413
|
-
if (o.value !==
|
|
2434
|
+
if (o.value !== l || o.enumerable !== !0)
|
|
2414
2435
|
return !1;
|
|
2415
2436
|
}
|
|
2416
2437
|
return !0;
|
|
2417
|
-
}),
|
|
2418
|
-
}
|
|
2419
|
-
var It, wn;
|
|
2420
|
-
function Xi() {
|
|
2421
|
-
if (wn) return It;
|
|
2422
|
-
wn = 1;
|
|
2423
|
-
var e = typeof Symbol < "u" && Symbol, n = Yi();
|
|
2424
|
-
return It = function() {
|
|
2425
|
-
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
|
|
2426
|
-
}, It;
|
|
2438
|
+
}), It;
|
|
2427
2439
|
}
|
|
2428
2440
|
var Ut, jn;
|
|
2429
|
-
function
|
|
2430
|
-
|
|
2441
|
+
function rs() {
|
|
2442
|
+
if (jn) return Ut;
|
|
2443
|
+
jn = 1;
|
|
2444
|
+
var e = typeof Symbol < "u" && Symbol, n = ts();
|
|
2445
|
+
return Ut = function() {
|
|
2446
|
+
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
|
|
2447
|
+
}, Ut;
|
|
2431
2448
|
}
|
|
2432
2449
|
var Lt, Sn;
|
|
2433
|
-
function
|
|
2434
|
-
|
|
2435
|
-
Sn = 1;
|
|
2436
|
-
var e = /* @__PURE__ */ ua();
|
|
2437
|
-
return Lt = e.getPrototypeOf || null, Lt;
|
|
2450
|
+
function ha() {
|
|
2451
|
+
return Sn || (Sn = 1, Lt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Lt;
|
|
2438
2452
|
}
|
|
2439
2453
|
var Ft, On;
|
|
2440
|
-
function
|
|
2454
|
+
function ya() {
|
|
2441
2455
|
if (On) return Ft;
|
|
2442
2456
|
On = 1;
|
|
2443
|
-
var e =
|
|
2457
|
+
var e = /* @__PURE__ */ pa();
|
|
2458
|
+
return Ft = e.getPrototypeOf || null, Ft;
|
|
2459
|
+
}
|
|
2460
|
+
var _t, Tn;
|
|
2461
|
+
function ns() {
|
|
2462
|
+
if (Tn) return _t;
|
|
2463
|
+
Tn = 1;
|
|
2464
|
+
var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, a = "[object Function]", l = function(i, c) {
|
|
2444
2465
|
for (var u = [], y = 0; y < i.length; y += 1)
|
|
2445
2466
|
u[y] = i[y];
|
|
2446
|
-
for (var g = 0; g <
|
|
2447
|
-
u[g + i.length] =
|
|
2467
|
+
for (var g = 0; g < c.length; g += 1)
|
|
2468
|
+
u[g + i.length] = c[g];
|
|
2448
2469
|
return u;
|
|
2449
|
-
}, s = function(i,
|
|
2450
|
-
for (var u = [], y =
|
|
2470
|
+
}, s = function(i, c) {
|
|
2471
|
+
for (var u = [], y = c, g = 0; y < i.length; y += 1, g += 1)
|
|
2451
2472
|
u[g] = i[y];
|
|
2452
2473
|
return u;
|
|
2453
2474
|
}, r = function(o, i) {
|
|
2454
|
-
for (var
|
|
2455
|
-
|
|
2456
|
-
return
|
|
2475
|
+
for (var c = "", u = 0; u < o.length; u += 1)
|
|
2476
|
+
c += o[u], u + 1 < o.length && (c += i);
|
|
2477
|
+
return c;
|
|
2457
2478
|
};
|
|
2458
|
-
return
|
|
2459
|
-
var
|
|
2460
|
-
if (typeof
|
|
2461
|
-
throw new TypeError(e +
|
|
2479
|
+
return _t = function(i) {
|
|
2480
|
+
var c = this;
|
|
2481
|
+
if (typeof c != "function" || n.apply(c) !== a)
|
|
2482
|
+
throw new TypeError(e + c);
|
|
2462
2483
|
for (var u = s(arguments, 1), y, g = function() {
|
|
2463
2484
|
if (this instanceof y) {
|
|
2464
|
-
var h =
|
|
2485
|
+
var h = c.apply(
|
|
2465
2486
|
this,
|
|
2466
|
-
|
|
2487
|
+
l(u, arguments)
|
|
2467
2488
|
);
|
|
2468
2489
|
return Object(h) === h ? h : this;
|
|
2469
2490
|
}
|
|
2470
|
-
return
|
|
2491
|
+
return c.apply(
|
|
2471
2492
|
i,
|
|
2472
|
-
|
|
2493
|
+
l(u, arguments)
|
|
2473
2494
|
);
|
|
2474
|
-
}, m = t(0,
|
|
2495
|
+
}, m = t(0, c.length - u.length), x = [], v = 0; v < m; v++)
|
|
2475
2496
|
x[v] = "$" + v;
|
|
2476
|
-
if (y = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(g),
|
|
2497
|
+
if (y = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(g), c.prototype) {
|
|
2477
2498
|
var f = function() {
|
|
2478
2499
|
};
|
|
2479
|
-
f.prototype =
|
|
2500
|
+
f.prototype = c.prototype, y.prototype = new f(), f.prototype = null;
|
|
2480
2501
|
}
|
|
2481
2502
|
return y;
|
|
2482
|
-
},
|
|
2483
|
-
}
|
|
2484
|
-
var _t, Tn;
|
|
2485
|
-
function He() {
|
|
2486
|
-
if (Tn) return _t;
|
|
2487
|
-
Tn = 1;
|
|
2488
|
-
var e = Zi();
|
|
2489
|
-
return _t = Function.prototype.bind || e, _t;
|
|
2503
|
+
}, _t;
|
|
2490
2504
|
}
|
|
2491
2505
|
var Bt, Pn;
|
|
2492
|
-
function
|
|
2493
|
-
|
|
2506
|
+
function He() {
|
|
2507
|
+
if (Pn) return Bt;
|
|
2508
|
+
Pn = 1;
|
|
2509
|
+
var e = ns();
|
|
2510
|
+
return Bt = Function.prototype.bind || e, Bt;
|
|
2494
2511
|
}
|
|
2495
2512
|
var Ht, qn;
|
|
2496
|
-
function
|
|
2497
|
-
return qn || (qn = 1, Ht = Function.prototype.
|
|
2513
|
+
function $r() {
|
|
2514
|
+
return qn || (qn = 1, Ht = Function.prototype.call), Ht;
|
|
2498
2515
|
}
|
|
2499
2516
|
var Mt, Cn;
|
|
2500
|
-
function
|
|
2501
|
-
return Cn || (Cn = 1, Mt =
|
|
2517
|
+
function wr() {
|
|
2518
|
+
return Cn || (Cn = 1, Mt = Function.prototype.apply), Mt;
|
|
2502
2519
|
}
|
|
2503
|
-
var zt,
|
|
2504
|
-
function
|
|
2505
|
-
|
|
2520
|
+
var zt, Rn;
|
|
2521
|
+
function as() {
|
|
2522
|
+
return Rn || (Rn = 1, zt = typeof Reflect < "u" && Reflect && Reflect.apply), zt;
|
|
2523
|
+
}
|
|
2524
|
+
var Wt, En;
|
|
2525
|
+
function ma() {
|
|
2526
|
+
if (En) return Wt;
|
|
2506
2527
|
En = 1;
|
|
2507
|
-
var e = He(), n =
|
|
2508
|
-
return
|
|
2528
|
+
var e = He(), n = wr(), t = $r(), a = as();
|
|
2529
|
+
return Wt = a || e.call(t, n), Wt;
|
|
2509
2530
|
}
|
|
2510
|
-
var
|
|
2511
|
-
function
|
|
2512
|
-
if (
|
|
2513
|
-
|
|
2514
|
-
var e = He(), n = /* @__PURE__ */ Be(), t =
|
|
2515
|
-
return
|
|
2531
|
+
var Jt, kn;
|
|
2532
|
+
function ga() {
|
|
2533
|
+
if (kn) return Jt;
|
|
2534
|
+
kn = 1;
|
|
2535
|
+
var e = He(), n = /* @__PURE__ */ Be(), t = $r(), a = ma();
|
|
2536
|
+
return Jt = function(s) {
|
|
2516
2537
|
if (s.length < 1 || typeof s[0] != "function")
|
|
2517
2538
|
throw new n("a function is required");
|
|
2518
2539
|
return a(e, t, s);
|
|
2519
|
-
},
|
|
2540
|
+
}, Jt;
|
|
2520
2541
|
}
|
|
2521
|
-
var
|
|
2522
|
-
function
|
|
2523
|
-
if (
|
|
2524
|
-
|
|
2525
|
-
var e =
|
|
2542
|
+
var Gt, Nn;
|
|
2543
|
+
function os() {
|
|
2544
|
+
if (Nn) return Gt;
|
|
2545
|
+
Nn = 1;
|
|
2546
|
+
var e = ga(), n = /* @__PURE__ */ et(), t;
|
|
2526
2547
|
try {
|
|
2527
2548
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
2528
2549
|
[].__proto__ === Array.prototype;
|
|
@@ -2534,41 +2555,41 @@ function ts() {
|
|
|
2534
2555
|
Object.prototype,
|
|
2535
2556
|
/** @type {keyof typeof Object.prototype} */
|
|
2536
2557
|
"__proto__"
|
|
2537
|
-
),
|
|
2538
|
-
return
|
|
2558
|
+
), l = Object, s = l.getPrototypeOf;
|
|
2559
|
+
return Gt = a && typeof a.get == "function" ? e([a.get]) : typeof s == "function" ? (
|
|
2539
2560
|
/** @type {import('./get')} */
|
|
2540
2561
|
function(o) {
|
|
2541
|
-
return s(o == null ? o :
|
|
2562
|
+
return s(o == null ? o : l(o));
|
|
2542
2563
|
}
|
|
2543
|
-
) : !1,
|
|
2544
|
-
}
|
|
2545
|
-
var Gt, Nn;
|
|
2546
|
-
function rs() {
|
|
2547
|
-
if (Nn) return Gt;
|
|
2548
|
-
Nn = 1;
|
|
2549
|
-
var e = pa(), n = da(), t = /* @__PURE__ */ ts();
|
|
2550
|
-
return Gt = e ? function(c) {
|
|
2551
|
-
return e(c);
|
|
2552
|
-
} : n ? function(c) {
|
|
2553
|
-
if (!c || typeof c != "object" && typeof c != "function")
|
|
2554
|
-
throw new TypeError("getProto: not an object");
|
|
2555
|
-
return n(c);
|
|
2556
|
-
} : t ? function(c) {
|
|
2557
|
-
return t(c);
|
|
2558
|
-
} : null, Gt;
|
|
2564
|
+
) : !1, Gt;
|
|
2559
2565
|
}
|
|
2560
2566
|
var Vt, An;
|
|
2561
|
-
function
|
|
2567
|
+
function is() {
|
|
2562
2568
|
if (An) return Vt;
|
|
2563
2569
|
An = 1;
|
|
2564
|
-
var e =
|
|
2565
|
-
return Vt =
|
|
2570
|
+
var e = ha(), n = ya(), t = /* @__PURE__ */ os();
|
|
2571
|
+
return Vt = e ? function(l) {
|
|
2572
|
+
return e(l);
|
|
2573
|
+
} : n ? function(l) {
|
|
2574
|
+
if (!l || typeof l != "object" && typeof l != "function")
|
|
2575
|
+
throw new TypeError("getProto: not an object");
|
|
2576
|
+
return n(l);
|
|
2577
|
+
} : t ? function(l) {
|
|
2578
|
+
return t(l);
|
|
2579
|
+
} : null, Vt;
|
|
2566
2580
|
}
|
|
2567
2581
|
var Dt, In;
|
|
2568
|
-
function
|
|
2582
|
+
function ss() {
|
|
2569
2583
|
if (In) return Dt;
|
|
2570
2584
|
In = 1;
|
|
2571
|
-
var e
|
|
2585
|
+
var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = He();
|
|
2586
|
+
return Dt = t.call(e, n), Dt;
|
|
2587
|
+
}
|
|
2588
|
+
var Qt, Un;
|
|
2589
|
+
function jr() {
|
|
2590
|
+
if (Un) return Qt;
|
|
2591
|
+
Un = 1;
|
|
2592
|
+
var e, n = /* @__PURE__ */ pa(), t = /* @__PURE__ */ Hi(), a = /* @__PURE__ */ Mi(), l = /* @__PURE__ */ zi(), s = /* @__PURE__ */ Wi(), r = /* @__PURE__ */ da(), o = /* @__PURE__ */ Be(), i = /* @__PURE__ */ Ji(), c = /* @__PURE__ */ Gi(), u = /* @__PURE__ */ Vi(), y = /* @__PURE__ */ Di(), g = /* @__PURE__ */ Qi(), m = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), v = /* @__PURE__ */ Zi(), f = Function, h = function(G) {
|
|
2572
2593
|
try {
|
|
2573
2594
|
return f('"use strict"; return (' + G + ").constructor;")();
|
|
2574
2595
|
} catch {
|
|
@@ -2585,7 +2606,7 @@ function $r() {
|
|
|
2585
2606
|
return T;
|
|
2586
2607
|
}
|
|
2587
2608
|
}
|
|
2588
|
-
}() : T, O =
|
|
2609
|
+
}() : T, O = rs()(), b = is(), R = ya(), N = ha(), C = wr(), L = $r(), P = {}, oe = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2589
2610
|
__proto__: null,
|
|
2590
2611
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2591
2612
|
"%Array%": Array,
|
|
@@ -2634,7 +2655,7 @@ function $r() {
|
|
|
2634
2655
|
"%parseInt%": parseInt,
|
|
2635
2656
|
"%Promise%": typeof Promise > "u" ? e : Promise,
|
|
2636
2657
|
"%Proxy%": typeof Proxy > "u" ? e : Proxy,
|
|
2637
|
-
"%RangeError%":
|
|
2658
|
+
"%RangeError%": l,
|
|
2638
2659
|
"%ReferenceError%": s,
|
|
2639
2660
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
2640
2661
|
"%RegExp%": RegExp,
|
|
@@ -2659,8 +2680,8 @@ function $r() {
|
|
|
2659
2680
|
"%Function.prototype.call%": L,
|
|
2660
2681
|
"%Function.prototype.apply%": C,
|
|
2661
2682
|
"%Object.defineProperty%": j,
|
|
2662
|
-
"%Object.getPrototypeOf%":
|
|
2663
|
-
"%Math.abs%":
|
|
2683
|
+
"%Object.getPrototypeOf%": R,
|
|
2684
|
+
"%Math.abs%": c,
|
|
2664
2685
|
"%Math.floor%": u,
|
|
2665
2686
|
"%Math.max%": y,
|
|
2666
2687
|
"%Math.min%": g,
|
|
@@ -2745,7 +2766,7 @@ function $r() {
|
|
|
2745
2766
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2746
2767
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2747
2768
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2748
|
-
}, A = He(), re = /* @__PURE__ */
|
|
2769
|
+
}, A = He(), re = /* @__PURE__ */ ss(), E = A.call(L, Array.prototype.concat), k = A.call(C, Array.prototype.splice), F = A.call(L, String.prototype.replace), q = A.call(L, String.prototype.slice), U = A.call(L, RegExp.prototype.exec), J = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(I) {
|
|
2749
2770
|
var _ = q(I, 0, 1), B = q(I, -1);
|
|
2750
2771
|
if (_ === "%" && B !== "%")
|
|
2751
2772
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -2769,20 +2790,20 @@ function $r() {
|
|
|
2769
2790
|
}
|
|
2770
2791
|
throw new r("intrinsic " + I + " does not exist!");
|
|
2771
2792
|
};
|
|
2772
|
-
return
|
|
2793
|
+
return Qt = function(I, _) {
|
|
2773
2794
|
if (typeof I != "string" || I.length === 0)
|
|
2774
2795
|
throw new o("intrinsic name must be a non-empty string");
|
|
2775
2796
|
if (arguments.length > 1 && typeof _ != "boolean")
|
|
2776
2797
|
throw new o('"allowMissing" argument must be a boolean');
|
|
2777
2798
|
if (U(/^%?[^%]*%?$/, I) === null)
|
|
2778
2799
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2779
|
-
var B = K(I), Q = B.length > 0 ? B[0] : "", W = ne("%" + Q + "%", _), Y = W.name, ae = W.value, he = !1,
|
|
2780
|
-
|
|
2781
|
-
for (var
|
|
2782
|
-
var ye = B[
|
|
2783
|
-
if ((
|
|
2800
|
+
var B = K(I), Q = B.length > 0 ? B[0] : "", W = ne("%" + Q + "%", _), Y = W.name, ae = W.value, he = !1, we = W.alias;
|
|
2801
|
+
we && (Q = we[0], k(B, E([0, 1], we)));
|
|
2802
|
+
for (var Pe = 1, je = !0; Pe < B.length; Pe += 1) {
|
|
2803
|
+
var ye = B[Pe], qe = q(ye, 0, 1), Ce = q(ye, -1);
|
|
2804
|
+
if ((qe === '"' || qe === "'" || qe === "`" || Ce === '"' || Ce === "'" || Ce === "`") && qe !== Ce)
|
|
2784
2805
|
throw new r("property names with quotes must have matching quotes");
|
|
2785
|
-
if ((ye === "constructor" || !
|
|
2806
|
+
if ((ye === "constructor" || !je) && (he = !0), Q += "." + ye, Y = "%" + Q + "%", re(H, Y))
|
|
2786
2807
|
ae = H[Y];
|
|
2787
2808
|
else if (ae != null) {
|
|
2788
2809
|
if (!(ye in ae)) {
|
|
@@ -2790,23 +2811,23 @@ function $r() {
|
|
|
2790
2811
|
throw new o("base intrinsic for " + I + " exists, but the property is not available.");
|
|
2791
2812
|
return;
|
|
2792
2813
|
}
|
|
2793
|
-
if (d &&
|
|
2794
|
-
var
|
|
2795
|
-
|
|
2814
|
+
if (d && Pe + 1 >= B.length) {
|
|
2815
|
+
var Se = d(ae, ye);
|
|
2816
|
+
je = !!Se, je && "get" in Se && !("originalValue" in Se.get) ? ae = Se.get : ae = ae[ye];
|
|
2796
2817
|
} else
|
|
2797
|
-
|
|
2798
|
-
|
|
2818
|
+
je = re(ae, ye), ae = ae[ye];
|
|
2819
|
+
je && !he && (H[Y] = ae);
|
|
2799
2820
|
}
|
|
2800
2821
|
}
|
|
2801
2822
|
return ae;
|
|
2802
|
-
},
|
|
2823
|
+
}, Qt;
|
|
2803
2824
|
}
|
|
2804
|
-
var
|
|
2805
|
-
function
|
|
2806
|
-
if (
|
|
2807
|
-
|
|
2808
|
-
var e = /* @__PURE__ */ tt(), n = /* @__PURE__ */
|
|
2809
|
-
return
|
|
2825
|
+
var Kt = { exports: {} }, Yt, Ln;
|
|
2826
|
+
function ls() {
|
|
2827
|
+
if (Ln) return Yt;
|
|
2828
|
+
Ln = 1;
|
|
2829
|
+
var e = /* @__PURE__ */ tt(), n = /* @__PURE__ */ da(), t = /* @__PURE__ */ Be(), a = /* @__PURE__ */ et();
|
|
2830
|
+
return Yt = function(s, r, o) {
|
|
2810
2831
|
if (!s || typeof s != "object" && typeof s != "function")
|
|
2811
2832
|
throw new t("`obj` must be an object or a function`");
|
|
2812
2833
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -2819,24 +2840,24 @@ function as() {
|
|
|
2819
2840
|
throw new t("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2820
2841
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2821
2842
|
throw new t("`loose`, if provided, must be a boolean");
|
|
2822
|
-
var i = arguments.length > 3 ? arguments[3] : null,
|
|
2843
|
+
var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, u = arguments.length > 5 ? arguments[5] : null, y = arguments.length > 6 ? arguments[6] : !1, g = !!a && a(s, r);
|
|
2823
2844
|
if (e)
|
|
2824
2845
|
e(s, r, {
|
|
2825
2846
|
configurable: u === null && g ? g.configurable : !u,
|
|
2826
2847
|
enumerable: i === null && g ? g.enumerable : !i,
|
|
2827
2848
|
value: o,
|
|
2828
|
-
writable:
|
|
2849
|
+
writable: c === null && g ? g.writable : !c
|
|
2829
2850
|
});
|
|
2830
|
-
else if (y || !i && !
|
|
2851
|
+
else if (y || !i && !c && !u)
|
|
2831
2852
|
s[r] = o;
|
|
2832
2853
|
else
|
|
2833
2854
|
throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2834
|
-
},
|
|
2855
|
+
}, Yt;
|
|
2835
2856
|
}
|
|
2836
|
-
var
|
|
2837
|
-
function
|
|
2838
|
-
if (
|
|
2839
|
-
|
|
2857
|
+
var Xt, Fn;
|
|
2858
|
+
function cs() {
|
|
2859
|
+
if (Fn) return Xt;
|
|
2860
|
+
Fn = 1;
|
|
2840
2861
|
var e = /* @__PURE__ */ tt(), n = function() {
|
|
2841
2862
|
return !!e;
|
|
2842
2863
|
};
|
|
@@ -2848,24 +2869,24 @@ function os() {
|
|
|
2848
2869
|
} catch {
|
|
2849
2870
|
return !0;
|
|
2850
2871
|
}
|
|
2851
|
-
},
|
|
2872
|
+
}, Xt = n, Xt;
|
|
2852
2873
|
}
|
|
2853
|
-
var
|
|
2854
|
-
function
|
|
2855
|
-
if (
|
|
2856
|
-
|
|
2857
|
-
var e = /* @__PURE__ */
|
|
2858
|
-
return
|
|
2874
|
+
var Zt, _n;
|
|
2875
|
+
function us() {
|
|
2876
|
+
if (_n) return Zt;
|
|
2877
|
+
_n = 1;
|
|
2878
|
+
var e = /* @__PURE__ */ jr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), a = /* @__PURE__ */ et(), l = /* @__PURE__ */ Be(), s = e("%Math.floor%");
|
|
2879
|
+
return Zt = function(o, i) {
|
|
2859
2880
|
if (typeof o != "function")
|
|
2860
|
-
throw new
|
|
2881
|
+
throw new l("`fn` is not a function");
|
|
2861
2882
|
if (typeof i != "number" || i < 0 || i > 4294967295 || s(i) !== i)
|
|
2862
|
-
throw new
|
|
2863
|
-
var
|
|
2883
|
+
throw new l("`length` must be a positive 32-bit integer");
|
|
2884
|
+
var c = arguments.length > 2 && !!arguments[2], u = !0, y = !0;
|
|
2864
2885
|
if ("length" in o && a) {
|
|
2865
2886
|
var g = a(o, "length");
|
|
2866
2887
|
g && !g.configurable && (u = !1), g && !g.writable && (y = !1);
|
|
2867
2888
|
}
|
|
2868
|
-
return (u || y || !
|
|
2889
|
+
return (u || y || !c) && (t ? n(
|
|
2869
2890
|
/** @type {Parameters<define>[0]} */
|
|
2870
2891
|
o,
|
|
2871
2892
|
"length",
|
|
@@ -2878,21 +2899,21 @@ function is() {
|
|
|
2878
2899
|
"length",
|
|
2879
2900
|
i
|
|
2880
2901
|
)), o;
|
|
2881
|
-
},
|
|
2902
|
+
}, Zt;
|
|
2882
2903
|
}
|
|
2883
|
-
var
|
|
2884
|
-
function
|
|
2885
|
-
if (
|
|
2886
|
-
|
|
2887
|
-
var e = He(), n =
|
|
2888
|
-
return
|
|
2904
|
+
var er, Bn;
|
|
2905
|
+
function fs() {
|
|
2906
|
+
if (Bn) return er;
|
|
2907
|
+
Bn = 1;
|
|
2908
|
+
var e = He(), n = wr(), t = ma();
|
|
2909
|
+
return er = function() {
|
|
2889
2910
|
return t(e, n, arguments);
|
|
2890
|
-
},
|
|
2911
|
+
}, er;
|
|
2891
2912
|
}
|
|
2892
|
-
var
|
|
2893
|
-
function
|
|
2894
|
-
return
|
|
2895
|
-
var n = /* @__PURE__ */
|
|
2913
|
+
var Hn;
|
|
2914
|
+
function ps() {
|
|
2915
|
+
return Hn || (Hn = 1, function(e) {
|
|
2916
|
+
var n = /* @__PURE__ */ us(), t = /* @__PURE__ */ tt(), a = ga(), l = fs();
|
|
2896
2917
|
e.exports = function(r) {
|
|
2897
2918
|
var o = a(arguments), i = r.length - (arguments.length - 1);
|
|
2898
2919
|
return n(
|
|
@@ -2900,28 +2921,28 @@ function ls() {
|
|
|
2900
2921
|
1 + (i > 0 ? i : 0),
|
|
2901
2922
|
!0
|
|
2902
2923
|
);
|
|
2903
|
-
}, t ? t(e.exports, "apply", { value:
|
|
2904
|
-
}(
|
|
2924
|
+
}, t ? t(e.exports, "apply", { value: l }) : e.exports.apply = l;
|
|
2925
|
+
}(Kt)), Kt.exports;
|
|
2905
2926
|
}
|
|
2906
|
-
var er, Hn;
|
|
2907
|
-
function cs() {
|
|
2908
|
-
if (Hn) return er;
|
|
2909
|
-
Hn = 1;
|
|
2910
|
-
var e = /* @__PURE__ */ $r(), n = ls(), t = n(e("String.prototype.indexOf"));
|
|
2911
|
-
return er = function(c, s) {
|
|
2912
|
-
var r = e(c, !!s);
|
|
2913
|
-
return typeof r == "function" && t(c, ".prototype.") > -1 ? n(r) : r;
|
|
2914
|
-
}, er;
|
|
2915
|
-
}
|
|
2916
|
-
const us = {}, fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2917
|
-
__proto__: null,
|
|
2918
|
-
default: us
|
|
2919
|
-
}, Symbol.toStringTag, { value: "Module" })), ps = /* @__PURE__ */ lo(fs);
|
|
2920
2927
|
var tr, Mn;
|
|
2921
2928
|
function ds() {
|
|
2922
2929
|
if (Mn) return tr;
|
|
2923
2930
|
Mn = 1;
|
|
2924
|
-
var e =
|
|
2931
|
+
var e = /* @__PURE__ */ jr(), n = ps(), t = n(e("String.prototype.indexOf"));
|
|
2932
|
+
return tr = function(l, s) {
|
|
2933
|
+
var r = e(l, !!s);
|
|
2934
|
+
return typeof r == "function" && t(l, ".prototype.") > -1 ? n(r) : r;
|
|
2935
|
+
}, tr;
|
|
2936
|
+
}
|
|
2937
|
+
const hs = {}, ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2938
|
+
__proto__: null,
|
|
2939
|
+
default: hs
|
|
2940
|
+
}, Symbol.toStringTag, { value: "Module" })), ms = /* @__PURE__ */ po(ys);
|
|
2941
|
+
var rr, zn;
|
|
2942
|
+
function gs() {
|
|
2943
|
+
if (zn) return rr;
|
|
2944
|
+
zn = 1;
|
|
2945
|
+
var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, a = e && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = l && s && typeof s.get == "function" ? s.get : null, o = l && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, y = u ? WeakSet.prototype.has : null, g = typeof WeakRef == "function" && WeakRef.prototype, m = g ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, v = Object.prototype.toString, f = Function.prototype.toString, h = String.prototype.match, d = String.prototype.slice, j = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, R = Array.prototype.join, N = Array.prototype.slice, C = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, oe = 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(w) {
|
|
2925
2946
|
return w.__proto__;
|
|
2926
2947
|
} : null);
|
|
2927
2948
|
function A(w, S) {
|
|
@@ -2937,21 +2958,21 @@ function ds() {
|
|
|
2937
2958
|
}
|
|
2938
2959
|
return j.call(S, X, "$&_");
|
|
2939
2960
|
}
|
|
2940
|
-
var re =
|
|
2941
|
-
|
|
2961
|
+
var re = ms, E = re.custom, k = _(E) ? E : null;
|
|
2962
|
+
rr = function w(S, X, ee, ie) {
|
|
2942
2963
|
var M = X || {};
|
|
2943
2964
|
if (W(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
2944
2965
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
2945
2966
|
if (W(M, "maxStringLength") && (typeof M.maxStringLength == "number" ? M.maxStringLength < 0 && M.maxStringLength !== 1 / 0 : M.maxStringLength !== null))
|
|
2946
2967
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
2947
|
-
var
|
|
2948
|
-
if (typeof
|
|
2968
|
+
var be = W(M, "customInspect") ? M.customInspect : !0;
|
|
2969
|
+
if (typeof be != "boolean" && be !== "symbol")
|
|
2949
2970
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
2950
2971
|
if (W(M, "indent") && M.indent !== null && M.indent !== " " && !(parseInt(M.indent, 10) === M.indent && M.indent > 0))
|
|
2951
2972
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
2952
2973
|
if (W(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
|
|
2953
2974
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
2954
|
-
var
|
|
2975
|
+
var Oe = M.numericSeparator;
|
|
2955
2976
|
if (typeof S > "u")
|
|
2956
2977
|
return "undefined";
|
|
2957
2978
|
if (S === null)
|
|
@@ -2959,96 +2980,96 @@ function ds() {
|
|
|
2959
2980
|
if (typeof S == "boolean")
|
|
2960
2981
|
return S ? "true" : "false";
|
|
2961
2982
|
if (typeof S == "string")
|
|
2962
|
-
return
|
|
2983
|
+
return Se(S, M);
|
|
2963
2984
|
if (typeof S == "number") {
|
|
2964
2985
|
if (S === 0)
|
|
2965
2986
|
return 1 / 0 / S > 0 ? "0" : "-0";
|
|
2966
2987
|
var de = String(S);
|
|
2967
|
-
return
|
|
2988
|
+
return Oe ? A(S, de) : de;
|
|
2968
2989
|
}
|
|
2969
2990
|
if (typeof S == "bigint") {
|
|
2970
|
-
var
|
|
2971
|
-
return
|
|
2991
|
+
var xe = String(S) + "n";
|
|
2992
|
+
return Oe ? A(S, xe) : xe;
|
|
2972
2993
|
}
|
|
2973
2994
|
var at = typeof M.depth > "u" ? 5 : M.depth;
|
|
2974
2995
|
if (typeof ee > "u" && (ee = 0), ee >= at && at > 0 && typeof S == "object")
|
|
2975
2996
|
return U(S) ? "[Array]" : "[Object]";
|
|
2976
|
-
var
|
|
2997
|
+
var Re = Ta(M, ee);
|
|
2977
2998
|
if (typeof ie > "u")
|
|
2978
2999
|
ie = [];
|
|
2979
3000
|
else if (he(ie, S) >= 0)
|
|
2980
3001
|
return "[Circular]";
|
|
2981
|
-
function me(Ee, We,
|
|
2982
|
-
if (We && (ie = N.call(ie), ie.push(We)),
|
|
2983
|
-
var
|
|
3002
|
+
function me(Ee, We, qa) {
|
|
3003
|
+
if (We && (ie = N.call(ie), ie.push(We)), qa) {
|
|
3004
|
+
var Ir = {
|
|
2984
3005
|
depth: M.depth
|
|
2985
3006
|
};
|
|
2986
|
-
return W(M, "quoteStyle") && (
|
|
3007
|
+
return W(M, "quoteStyle") && (Ir.quoteStyle = M.quoteStyle), w(Ee, Ir, ee + 1, ie);
|
|
2987
3008
|
}
|
|
2988
3009
|
return w(Ee, M, ee + 1, ie);
|
|
2989
3010
|
}
|
|
2990
3011
|
if (typeof S == "function" && !z(S)) {
|
|
2991
|
-
var
|
|
2992
|
-
return "[Function" + (
|
|
3012
|
+
var qr = ae(S), Cr = Me(S, me);
|
|
3013
|
+
return "[Function" + (qr ? ": " + qr : " (anonymous)") + "]" + (Cr.length > 0 ? " { " + R.call(Cr, ", ") + " }" : "");
|
|
2993
3014
|
}
|
|
2994
3015
|
if (_(S)) {
|
|
2995
|
-
var
|
|
2996
|
-
return typeof S == "object" && !H ?
|
|
3016
|
+
var Rr = H ? j.call(String(S), /^(Symbol\(.*\))_[^)]*$/, "$1") : oe.call(S);
|
|
3017
|
+
return typeof S == "object" && !H ? Ne(Rr) : Rr;
|
|
2997
3018
|
}
|
|
2998
|
-
if (
|
|
2999
|
-
for (var
|
|
3000
|
-
|
|
3001
|
-
return
|
|
3019
|
+
if (Ce(S)) {
|
|
3020
|
+
for (var Ae = "<" + p.call(String(S.nodeName)), ot = S.attributes || [], ze = 0; ze < ot.length; ze++)
|
|
3021
|
+
Ae += " " + ot[ze].name + "=" + F(q(ot[ze].value), "double", M);
|
|
3022
|
+
return Ae += ">", S.childNodes && S.childNodes.length && (Ae += "..."), Ae += "</" + p.call(String(S.nodeName)) + ">", Ae;
|
|
3002
3023
|
}
|
|
3003
3024
|
if (U(S)) {
|
|
3004
3025
|
if (S.length === 0)
|
|
3005
3026
|
return "[]";
|
|
3006
3027
|
var it = Me(S, me);
|
|
3007
|
-
return
|
|
3028
|
+
return Re && !Oa(it) ? "[" + nt(it, Re) + "]" : "[ " + R.call(it, ", ") + " ]";
|
|
3008
3029
|
}
|
|
3009
3030
|
if (K(S)) {
|
|
3010
3031
|
var st = Me(S, me);
|
|
3011
|
-
return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " +
|
|
3032
|
+
return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + R.call(b.call("[cause]: " + me(S.cause), st), ", ") + " }" : st.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + R.call(st, ", ") + " }";
|
|
3012
3033
|
}
|
|
3013
|
-
if (typeof S == "object" &&
|
|
3034
|
+
if (typeof S == "object" && be) {
|
|
3014
3035
|
if (k && typeof S[k] == "function" && re)
|
|
3015
3036
|
return re(S, { depth: at - ee });
|
|
3016
|
-
if (
|
|
3037
|
+
if (be !== "symbol" && typeof S.inspect == "function")
|
|
3017
3038
|
return S.inspect();
|
|
3018
3039
|
}
|
|
3019
|
-
if (
|
|
3020
|
-
var
|
|
3040
|
+
if (we(S)) {
|
|
3041
|
+
var Er = [];
|
|
3021
3042
|
return a && a.call(S, function(Ee, We) {
|
|
3022
|
-
|
|
3023
|
-
}),
|
|
3043
|
+
Er.push(me(We, S, !0) + " => " + me(Ee, S));
|
|
3044
|
+
}), Pr("Map", t.call(S), Er, Re);
|
|
3024
3045
|
}
|
|
3025
3046
|
if (ye(S)) {
|
|
3026
|
-
var
|
|
3047
|
+
var kr = [];
|
|
3027
3048
|
return o && o.call(S, function(Ee) {
|
|
3028
|
-
|
|
3029
|
-
}),
|
|
3049
|
+
kr.push(me(Ee, S));
|
|
3050
|
+
}), Pr("Set", r.call(S), kr, Re);
|
|
3030
3051
|
}
|
|
3031
|
-
if (Te(S))
|
|
3032
|
-
return rt("WeakMap");
|
|
3033
3052
|
if (Pe(S))
|
|
3053
|
+
return rt("WeakMap");
|
|
3054
|
+
if (qe(S))
|
|
3034
3055
|
return rt("WeakSet");
|
|
3035
|
-
if (
|
|
3056
|
+
if (je(S))
|
|
3036
3057
|
return rt("WeakRef");
|
|
3037
3058
|
if (G(S))
|
|
3038
|
-
return
|
|
3059
|
+
return Ne(me(Number(S)));
|
|
3039
3060
|
if (B(S))
|
|
3040
|
-
return
|
|
3061
|
+
return Ne(me(L.call(S)));
|
|
3041
3062
|
if (I(S))
|
|
3042
|
-
return
|
|
3063
|
+
return Ne(x.call(S));
|
|
3043
3064
|
if (ne(S))
|
|
3044
|
-
return
|
|
3065
|
+
return Ne(me(String(S)));
|
|
3045
3066
|
if (typeof window < "u" && S === window)
|
|
3046
3067
|
return "{ [object Window] }";
|
|
3047
3068
|
if (typeof globalThis < "u" && S === globalThis || typeof Ke < "u" && S === Ke)
|
|
3048
3069
|
return "{ [object globalThis] }";
|
|
3049
3070
|
if (!J(S) && !z(S)) {
|
|
3050
|
-
var lt = Me(S, me),
|
|
3051
|
-
return lt.length === 0 ? ut + "{}" :
|
|
3071
|
+
var lt = Me(S, me), Nr = Z ? Z(S) === Object.prototype : S instanceof Object || S.constructor === Object, ct = S instanceof Object ? "" : "null prototype", Ar = !Nr && D && Object(S) === S && D in S ? d.call(Y(S), 8, -1) : ct ? "Object" : "", Pa = Nr || typeof S.constructor != "function" ? "" : S.constructor.name ? S.constructor.name + " " : "", ut = Pa + (Ar || ct ? "[" + R.call(b.call([], Ar || [], ct || []), ": ") + "] " : "");
|
|
3072
|
+
return lt.length === 0 ? ut + "{}" : Re ? ut + "{" + nt(lt, Re) + "}" : ut + "{ " + R.call(lt, ", ") + " }";
|
|
3052
3073
|
}
|
|
3053
3074
|
return String(S);
|
|
3054
3075
|
};
|
|
@@ -3125,7 +3146,7 @@ function ds() {
|
|
|
3125
3146
|
return X;
|
|
3126
3147
|
return -1;
|
|
3127
3148
|
}
|
|
3128
|
-
function
|
|
3149
|
+
function we(w) {
|
|
3129
3150
|
if (!t || !w || typeof w != "object")
|
|
3130
3151
|
return !1;
|
|
3131
3152
|
try {
|
|
@@ -3140,11 +3161,11 @@ function ds() {
|
|
|
3140
3161
|
}
|
|
3141
3162
|
return !1;
|
|
3142
3163
|
}
|
|
3143
|
-
function
|
|
3144
|
-
if (!
|
|
3164
|
+
function Pe(w) {
|
|
3165
|
+
if (!c || !w || typeof w != "object")
|
|
3145
3166
|
return !1;
|
|
3146
3167
|
try {
|
|
3147
|
-
|
|
3168
|
+
c.call(w, c);
|
|
3148
3169
|
try {
|
|
3149
3170
|
y.call(w, y);
|
|
3150
3171
|
} catch {
|
|
@@ -3155,7 +3176,7 @@ function ds() {
|
|
|
3155
3176
|
}
|
|
3156
3177
|
return !1;
|
|
3157
3178
|
}
|
|
3158
|
-
function
|
|
3179
|
+
function je(w) {
|
|
3159
3180
|
if (!m || !w || typeof w != "object")
|
|
3160
3181
|
return !1;
|
|
3161
3182
|
try {
|
|
@@ -3179,13 +3200,13 @@ function ds() {
|
|
|
3179
3200
|
}
|
|
3180
3201
|
return !1;
|
|
3181
3202
|
}
|
|
3182
|
-
function
|
|
3203
|
+
function qe(w) {
|
|
3183
3204
|
if (!y || !w || typeof w != "object")
|
|
3184
3205
|
return !1;
|
|
3185
3206
|
try {
|
|
3186
3207
|
y.call(w, y);
|
|
3187
3208
|
try {
|
|
3188
|
-
|
|
3209
|
+
c.call(w, c);
|
|
3189
3210
|
} catch {
|
|
3190
3211
|
return !0;
|
|
3191
3212
|
}
|
|
@@ -3194,18 +3215,18 @@ function ds() {
|
|
|
3194
3215
|
}
|
|
3195
3216
|
return !1;
|
|
3196
3217
|
}
|
|
3197
|
-
function
|
|
3218
|
+
function Ce(w) {
|
|
3198
3219
|
return !w || typeof w != "object" ? !1 : typeof HTMLElement < "u" && w instanceof HTMLElement ? !0 : typeof w.nodeName == "string" && typeof w.getAttribute == "function";
|
|
3199
3220
|
}
|
|
3200
|
-
function
|
|
3221
|
+
function Se(w, S) {
|
|
3201
3222
|
if (w.length > S.maxStringLength) {
|
|
3202
3223
|
var X = w.length - S.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3203
|
-
return
|
|
3224
|
+
return Se(d.call(w, 0, S.maxStringLength), S) + ee;
|
|
3204
3225
|
}
|
|
3205
|
-
var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
3226
|
+
var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Sa);
|
|
3206
3227
|
return F(ie, "single", S);
|
|
3207
3228
|
}
|
|
3208
|
-
function
|
|
3229
|
+
function Sa(w) {
|
|
3209
3230
|
var S = w.charCodeAt(0), X = {
|
|
3210
3231
|
8: "b",
|
|
3211
3232
|
9: "t",
|
|
@@ -3215,34 +3236,34 @@ function ds() {
|
|
|
3215
3236
|
}[S];
|
|
3216
3237
|
return X ? "\\" + X : "\\x" + (S < 16 ? "0" : "") + T.call(S.toString(16));
|
|
3217
3238
|
}
|
|
3218
|
-
function
|
|
3239
|
+
function Ne(w) {
|
|
3219
3240
|
return "Object(" + w + ")";
|
|
3220
3241
|
}
|
|
3221
3242
|
function rt(w) {
|
|
3222
3243
|
return w + " { ? }";
|
|
3223
3244
|
}
|
|
3224
|
-
function
|
|
3225
|
-
var ie = ee ? nt(X, ee) :
|
|
3245
|
+
function Pr(w, S, X, ee) {
|
|
3246
|
+
var ie = ee ? nt(X, ee) : R.call(X, ", ");
|
|
3226
3247
|
return w + " (" + S + ") {" + ie + "}";
|
|
3227
3248
|
}
|
|
3228
|
-
function
|
|
3249
|
+
function Oa(w) {
|
|
3229
3250
|
for (var S = 0; S < w.length; S++)
|
|
3230
3251
|
if (he(w[S], `
|
|
3231
3252
|
`) >= 0)
|
|
3232
3253
|
return !1;
|
|
3233
3254
|
return !0;
|
|
3234
3255
|
}
|
|
3235
|
-
function
|
|
3256
|
+
function Ta(w, S) {
|
|
3236
3257
|
var X;
|
|
3237
3258
|
if (w.indent === " ")
|
|
3238
3259
|
X = " ";
|
|
3239
3260
|
else if (typeof w.indent == "number" && w.indent > 0)
|
|
3240
|
-
X =
|
|
3261
|
+
X = R.call(Array(w.indent + 1), " ");
|
|
3241
3262
|
else
|
|
3242
3263
|
return null;
|
|
3243
3264
|
return {
|
|
3244
3265
|
base: X,
|
|
3245
|
-
prev:
|
|
3266
|
+
prev: R.call(Array(S + 1), X)
|
|
3246
3267
|
};
|
|
3247
3268
|
}
|
|
3248
3269
|
function nt(w, S) {
|
|
@@ -3250,7 +3271,7 @@ function ds() {
|
|
|
3250
3271
|
return "";
|
|
3251
3272
|
var X = `
|
|
3252
3273
|
` + S.prev + S.base;
|
|
3253
|
-
return X +
|
|
3274
|
+
return X + R.call(w, "," + X) + `
|
|
3254
3275
|
` + S.prev;
|
|
3255
3276
|
}
|
|
3256
3277
|
function Me(w, S) {
|
|
@@ -3260,26 +3281,26 @@ function ds() {
|
|
|
3260
3281
|
for (var ie = 0; ie < w.length; ie++)
|
|
3261
3282
|
ee[ie] = W(w, ie) ? S(w[ie], w) : "";
|
|
3262
3283
|
}
|
|
3263
|
-
var M = typeof P == "function" ? P(w) : [],
|
|
3284
|
+
var M = typeof P == "function" ? P(w) : [], be;
|
|
3264
3285
|
if (H) {
|
|
3265
|
-
|
|
3266
|
-
for (var
|
|
3267
|
-
|
|
3286
|
+
be = {};
|
|
3287
|
+
for (var Oe = 0; Oe < M.length; Oe++)
|
|
3288
|
+
be["$" + M[Oe]] = M[Oe];
|
|
3268
3289
|
}
|
|
3269
3290
|
for (var de in w)
|
|
3270
|
-
W(w, de) && (X && String(Number(de)) === de && de < w.length || H &&
|
|
3291
|
+
W(w, de) && (X && String(Number(de)) === de && de < w.length || H && be["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(S(de, w) + ": " + S(w[de], w)) : ee.push(de + ": " + S(w[de], w))));
|
|
3271
3292
|
if (typeof P == "function")
|
|
3272
|
-
for (var
|
|
3273
|
-
se.call(w, M[
|
|
3293
|
+
for (var xe = 0; xe < M.length; xe++)
|
|
3294
|
+
se.call(w, M[xe]) && ee.push("[" + S(M[xe]) + "]: " + S(w[M[xe]], w));
|
|
3274
3295
|
return ee;
|
|
3275
3296
|
}
|
|
3276
|
-
return
|
|
3297
|
+
return rr;
|
|
3277
3298
|
}
|
|
3278
|
-
var
|
|
3279
|
-
function
|
|
3280
|
-
if (
|
|
3281
|
-
|
|
3282
|
-
var e = /* @__PURE__ */
|
|
3299
|
+
var nr, Wn;
|
|
3300
|
+
function vs() {
|
|
3301
|
+
if (Wn) return nr;
|
|
3302
|
+
Wn = 1;
|
|
3303
|
+
var e = /* @__PURE__ */ jr(), n = ds(), t = /* @__PURE__ */ gs(), a = /* @__PURE__ */ Be(), l = e("%WeakMap%", !0), s = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), u = n("Map.prototype.set", !0), y = n("Map.prototype.has", !0), g = function(f, h) {
|
|
3283
3304
|
for (var d = f, j; (j = d.next) !== null; d = j)
|
|
3284
3305
|
if (j.key === h)
|
|
3285
3306
|
return d.next = j.next, j.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -3299,24 +3320,24 @@ function hs() {
|
|
|
3299
3320
|
}, v = function(f, h) {
|
|
3300
3321
|
return !!g(f, h);
|
|
3301
3322
|
};
|
|
3302
|
-
return
|
|
3323
|
+
return nr = function() {
|
|
3303
3324
|
var h, d, j, T = {
|
|
3304
3325
|
assert: function(p) {
|
|
3305
3326
|
if (!T.has(p))
|
|
3306
3327
|
throw new a("Side channel does not contain " + t(p));
|
|
3307
3328
|
},
|
|
3308
3329
|
get: function(p) {
|
|
3309
|
-
if (
|
|
3330
|
+
if (l && p && (typeof p == "object" || typeof p == "function")) {
|
|
3310
3331
|
if (h)
|
|
3311
3332
|
return r(h, p);
|
|
3312
3333
|
} else if (s) {
|
|
3313
3334
|
if (d)
|
|
3314
|
-
return
|
|
3335
|
+
return c(d, p);
|
|
3315
3336
|
} else if (j)
|
|
3316
3337
|
return m(j, p);
|
|
3317
3338
|
},
|
|
3318
3339
|
has: function(p) {
|
|
3319
|
-
if (
|
|
3340
|
+
if (l && p && (typeof p == "object" || typeof p == "function")) {
|
|
3320
3341
|
if (h)
|
|
3321
3342
|
return i(h, p);
|
|
3322
3343
|
} else if (s) {
|
|
@@ -3327,21 +3348,21 @@ function hs() {
|
|
|
3327
3348
|
return !1;
|
|
3328
3349
|
},
|
|
3329
3350
|
set: function(p, O) {
|
|
3330
|
-
|
|
3351
|
+
l && p && (typeof p == "object" || typeof p == "function") ? (h || (h = new l()), o(h, p, O)) : s ? (d || (d = new s()), u(d, p, O)) : (j || (j = { key: {}, next: null }), x(j, p, O));
|
|
3331
3352
|
}
|
|
3332
3353
|
};
|
|
3333
3354
|
return T;
|
|
3334
|
-
},
|
|
3355
|
+
}, nr;
|
|
3335
3356
|
}
|
|
3336
|
-
var
|
|
3337
|
-
function
|
|
3338
|
-
if (
|
|
3339
|
-
|
|
3357
|
+
var ar, Jn;
|
|
3358
|
+
function Sr() {
|
|
3359
|
+
if (Jn) return ar;
|
|
3360
|
+
Jn = 1;
|
|
3340
3361
|
var e = String.prototype.replace, n = /%20/g, t = {
|
|
3341
3362
|
RFC1738: "RFC1738",
|
|
3342
3363
|
RFC3986: "RFC3986"
|
|
3343
3364
|
};
|
|
3344
|
-
return
|
|
3365
|
+
return ar = {
|
|
3345
3366
|
default: t.RFC3986,
|
|
3346
3367
|
formatters: {
|
|
3347
3368
|
RFC1738: function(a) {
|
|
@@ -3353,17 +3374,17 @@ function wr() {
|
|
|
3353
3374
|
},
|
|
3354
3375
|
RFC1738: t.RFC1738,
|
|
3355
3376
|
RFC3986: t.RFC3986
|
|
3356
|
-
},
|
|
3377
|
+
}, ar;
|
|
3357
3378
|
}
|
|
3358
|
-
var
|
|
3359
|
-
function
|
|
3360
|
-
if (
|
|
3361
|
-
|
|
3362
|
-
var e = /* @__PURE__ */
|
|
3379
|
+
var or, Gn;
|
|
3380
|
+
function va() {
|
|
3381
|
+
if (Gn) return or;
|
|
3382
|
+
Gn = 1;
|
|
3383
|
+
var e = /* @__PURE__ */ Sr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = function() {
|
|
3363
3384
|
for (var f = [], h = 0; h < 256; ++h)
|
|
3364
3385
|
f.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
|
|
3365
3386
|
return f;
|
|
3366
|
-
}(),
|
|
3387
|
+
}(), l = function(h) {
|
|
3367
3388
|
for (; h.length > 1; ) {
|
|
3368
3389
|
var d = h.pop(), j = d.obj[d.prop];
|
|
3369
3390
|
if (t(j)) {
|
|
@@ -3414,7 +3435,7 @@ function ma() {
|
|
|
3414
3435
|
} catch {
|
|
3415
3436
|
return j;
|
|
3416
3437
|
}
|
|
3417
|
-
},
|
|
3438
|
+
}, c = 1024, u = function(h, d, j, T, p) {
|
|
3418
3439
|
if (h.length === 0)
|
|
3419
3440
|
return h;
|
|
3420
3441
|
var O = h;
|
|
@@ -3422,8 +3443,8 @@ function ma() {
|
|
|
3422
3443
|
return escape(O).replace(/%u[0-9a-f]{4}/gi, function(oe) {
|
|
3423
3444
|
return "%26%23" + parseInt(oe.slice(2), 16) + "%3B";
|
|
3424
3445
|
});
|
|
3425
|
-
for (var b = "",
|
|
3426
|
-
for (var N = O.length >=
|
|
3446
|
+
for (var b = "", R = 0; R < O.length; R += c) {
|
|
3447
|
+
for (var N = O.length >= c ? O.slice(R, R + c) : O, C = [], L = 0; L < N.length; ++L) {
|
|
3427
3448
|
var P = N.charCodeAt(L);
|
|
3428
3449
|
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || p === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3429
3450
|
C[C.length] = N.charAt(L);
|
|
@@ -3448,11 +3469,11 @@ function ma() {
|
|
|
3448
3469
|
return b;
|
|
3449
3470
|
}, y = function(h) {
|
|
3450
3471
|
for (var d = [{ obj: { o: h }, prop: "o" }], j = [], T = 0; T < d.length; ++T)
|
|
3451
|
-
for (var p = d[T], O = p.obj[p.prop], b = Object.keys(O),
|
|
3452
|
-
var N = b[
|
|
3472
|
+
for (var p = d[T], O = p.obj[p.prop], b = Object.keys(O), R = 0; R < b.length; ++R) {
|
|
3473
|
+
var N = b[R], C = O[N];
|
|
3453
3474
|
typeof C == "object" && C !== null && j.indexOf(C) === -1 && (d.push({ obj: O, prop: N }), j.push(C));
|
|
3454
3475
|
}
|
|
3455
|
-
return
|
|
3476
|
+
return l(d), h;
|
|
3456
3477
|
}, g = function(h) {
|
|
3457
3478
|
return Object.prototype.toString.call(h) === "[object RegExp]";
|
|
3458
3479
|
}, m = function(h) {
|
|
@@ -3467,7 +3488,7 @@ function ma() {
|
|
|
3467
3488
|
}
|
|
3468
3489
|
return d(h);
|
|
3469
3490
|
};
|
|
3470
|
-
return
|
|
3491
|
+
return or = {
|
|
3471
3492
|
arrayToObject: s,
|
|
3472
3493
|
assign: o,
|
|
3473
3494
|
combine: x,
|
|
@@ -3478,13 +3499,13 @@ function ma() {
|
|
|
3478
3499
|
isRegExp: g,
|
|
3479
3500
|
maybeMap: v,
|
|
3480
3501
|
merge: r
|
|
3481
|
-
},
|
|
3502
|
+
}, or;
|
|
3482
3503
|
}
|
|
3483
|
-
var
|
|
3484
|
-
function
|
|
3485
|
-
if (
|
|
3486
|
-
|
|
3487
|
-
var e =
|
|
3504
|
+
var ir, Vn;
|
|
3505
|
+
function bs() {
|
|
3506
|
+
if (Vn) return ir;
|
|
3507
|
+
Vn = 1;
|
|
3508
|
+
var e = vs(), n = /* @__PURE__ */ va(), t = /* @__PURE__ */ Sr(), a = Object.prototype.hasOwnProperty, l = {
|
|
3488
3509
|
brackets: function(f) {
|
|
3489
3510
|
return f + "[]";
|
|
3490
3511
|
},
|
|
@@ -3497,7 +3518,7 @@ function ys() {
|
|
|
3497
3518
|
}
|
|
3498
3519
|
}, s = Array.isArray, r = Array.prototype.push, o = function(v, f) {
|
|
3499
3520
|
r.apply(v, s(f) ? f : [f]);
|
|
3500
|
-
}, i = Date.prototype.toISOString,
|
|
3521
|
+
}, i = Date.prototype.toISOString, c = t.default, u = {
|
|
3501
3522
|
addQueryPrefix: !1,
|
|
3502
3523
|
allowDots: !1,
|
|
3503
3524
|
allowEmptyArrays: !1,
|
|
@@ -3509,8 +3530,8 @@ function ys() {
|
|
|
3509
3530
|
encodeDotInKeys: !1,
|
|
3510
3531
|
encoder: n.encode,
|
|
3511
3532
|
encodeValuesOnly: !1,
|
|
3512
|
-
format:
|
|
3513
|
-
formatter: t.formatters[
|
|
3533
|
+
format: c,
|
|
3534
|
+
formatter: t.formatters[c],
|
|
3514
3535
|
// deprecated
|
|
3515
3536
|
indices: !1,
|
|
3516
3537
|
serializeDate: function(f) {
|
|
@@ -3520,27 +3541,27 @@ function ys() {
|
|
|
3520
3541
|
strictNullHandling: !1
|
|
3521
3542
|
}, y = function(f) {
|
|
3522
3543
|
return typeof f == "string" || typeof f == "number" || typeof f == "boolean" || typeof f == "symbol" || typeof f == "bigint";
|
|
3523
|
-
}, g = {}, m = function v(f, h, d, j, T, p, O, b,
|
|
3524
|
-
for (var A = f, re = Z,
|
|
3544
|
+
}, g = {}, m = function v(f, h, d, j, T, p, O, b, R, N, C, L, P, oe, H, D, se, Z) {
|
|
3545
|
+
for (var A = f, re = Z, E = 0, k = !1; (re = re.get(g)) !== void 0 && !k; ) {
|
|
3525
3546
|
var F = re.get(f);
|
|
3526
|
-
if (
|
|
3527
|
-
if (F ===
|
|
3547
|
+
if (E += 1, typeof F < "u") {
|
|
3548
|
+
if (F === E)
|
|
3528
3549
|
throw new RangeError("Cyclic object value");
|
|
3529
3550
|
k = !0;
|
|
3530
3551
|
}
|
|
3531
|
-
typeof re.get(g) > "u" && (
|
|
3552
|
+
typeof re.get(g) > "u" && (E = 0);
|
|
3532
3553
|
}
|
|
3533
3554
|
if (typeof N == "function" ? A = N(h, A) : A instanceof Date ? A = P(A) : d === "comma" && s(A) && (A = n.maybeMap(A, function(Y) {
|
|
3534
3555
|
return Y instanceof Date ? P(Y) : Y;
|
|
3535
3556
|
})), A === null) {
|
|
3536
3557
|
if (p)
|
|
3537
|
-
return
|
|
3558
|
+
return R && !D ? R(h, u.encoder, se, "key", oe) : h;
|
|
3538
3559
|
A = "";
|
|
3539
3560
|
}
|
|
3540
3561
|
if (y(A) || n.isBuffer(A)) {
|
|
3541
|
-
if (
|
|
3542
|
-
var q = D ? h :
|
|
3543
|
-
return [H(q) + "=" + H(
|
|
3562
|
+
if (R) {
|
|
3563
|
+
var q = D ? h : R(h, u.encoder, se, "key", oe);
|
|
3564
|
+
return [H(q) + "=" + H(R(A, u.encoder, se, "value", oe))];
|
|
3544
3565
|
}
|
|
3545
3566
|
return [H(h) + "=" + H(String(A))];
|
|
3546
3567
|
}
|
|
@@ -3549,7 +3570,7 @@ function ys() {
|
|
|
3549
3570
|
return U;
|
|
3550
3571
|
var J;
|
|
3551
3572
|
if (d === "comma" && s(A))
|
|
3552
|
-
D &&
|
|
3573
|
+
D && R && (A = n.maybeMap(A, R)), J = [{ value: A.length > 0 ? A.join(",") || null : void 0 }];
|
|
3553
3574
|
else if (s(N))
|
|
3554
3575
|
J = N;
|
|
3555
3576
|
else {
|
|
@@ -3563,7 +3584,7 @@ function ys() {
|
|
|
3563
3584
|
var I = J[G], _ = typeof I == "object" && typeof I.value < "u" ? I.value : A[I];
|
|
3564
3585
|
if (!(O && _ === null)) {
|
|
3565
3586
|
var B = L && b ? I.replace(/\./g, "%2E") : I, Q = s(A) ? typeof d == "function" ? d(ne, B) : ne : ne + (L ? "." + B : "[" + B + "]");
|
|
3566
|
-
Z.set(f,
|
|
3587
|
+
Z.set(f, E);
|
|
3567
3588
|
var W = e();
|
|
3568
3589
|
W.set(g, Z), o(U, v(
|
|
3569
3590
|
_,
|
|
@@ -3574,7 +3595,7 @@ function ys() {
|
|
|
3574
3595
|
p,
|
|
3575
3596
|
O,
|
|
3576
3597
|
b,
|
|
3577
|
-
d === "comma" && D && s(A) ? null :
|
|
3598
|
+
d === "comma" && D && s(A) ? null : R,
|
|
3578
3599
|
N,
|
|
3579
3600
|
C,
|
|
3580
3601
|
L,
|
|
@@ -3609,7 +3630,7 @@ function ys() {
|
|
|
3609
3630
|
var j = t.formatters[d], T = u.filter;
|
|
3610
3631
|
(typeof f.filter == "function" || s(f.filter)) && (T = f.filter);
|
|
3611
3632
|
var p;
|
|
3612
|
-
if (f.arrayFormat in
|
|
3633
|
+
if (f.arrayFormat in l ? p = f.arrayFormat : "indices" in f ? p = f.indices ? "indices" : "repeat" : p = u.arrayFormat, "commaRoundTrip" in f && typeof f.commaRoundTrip != "boolean")
|
|
3613
3634
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3614
3635
|
var O = typeof f.allowDots > "u" ? f.encodeDotInKeys === !0 ? !0 : u.allowDots : !!f.allowDots;
|
|
3615
3636
|
return {
|
|
@@ -3634,15 +3655,15 @@ function ys() {
|
|
|
3634
3655
|
strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling : u.strictNullHandling
|
|
3635
3656
|
};
|
|
3636
3657
|
};
|
|
3637
|
-
return
|
|
3658
|
+
return ir = function(v, f) {
|
|
3638
3659
|
var h = v, d = x(f), j, T;
|
|
3639
3660
|
typeof d.filter == "function" ? (T = d.filter, h = T("", h)) : s(d.filter) && (T = d.filter, j = T);
|
|
3640
3661
|
var p = [];
|
|
3641
3662
|
if (typeof h != "object" || h === null)
|
|
3642
3663
|
return "";
|
|
3643
|
-
var O =
|
|
3664
|
+
var O = l[d.arrayFormat], b = O === "comma" && d.commaRoundTrip;
|
|
3644
3665
|
j || (j = Object.keys(h)), d.sort && j.sort(d.sort);
|
|
3645
|
-
for (var
|
|
3666
|
+
for (var R = e(), N = 0; N < j.length; ++N) {
|
|
3646
3667
|
var C = j[N];
|
|
3647
3668
|
d.skipNulls && h[C] === null || o(p, m(
|
|
3648
3669
|
h[C],
|
|
@@ -3662,18 +3683,18 @@ function ys() {
|
|
|
3662
3683
|
d.formatter,
|
|
3663
3684
|
d.encodeValuesOnly,
|
|
3664
3685
|
d.charset,
|
|
3665
|
-
|
|
3686
|
+
R
|
|
3666
3687
|
));
|
|
3667
3688
|
}
|
|
3668
3689
|
var L = p.join(d.delimiter), P = d.addQueryPrefix === !0 ? "?" : "";
|
|
3669
3690
|
return d.charsetSentinel && (d.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), L.length > 0 ? P + L : "";
|
|
3670
|
-
},
|
|
3691
|
+
}, ir;
|
|
3671
3692
|
}
|
|
3672
|
-
var
|
|
3673
|
-
function
|
|
3674
|
-
if (
|
|
3675
|
-
|
|
3676
|
-
var e = /* @__PURE__ */
|
|
3693
|
+
var sr, Dn;
|
|
3694
|
+
function xs() {
|
|
3695
|
+
if (Dn) return sr;
|
|
3696
|
+
Dn = 1;
|
|
3697
|
+
var e = /* @__PURE__ */ va(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = {
|
|
3677
3698
|
allowDots: !1,
|
|
3678
3699
|
allowEmptyArrays: !1,
|
|
3679
3700
|
allowPrototypes: !1,
|
|
@@ -3694,7 +3715,7 @@ function ms() {
|
|
|
3694
3715
|
plainObjects: !1,
|
|
3695
3716
|
strictDepth: !1,
|
|
3696
3717
|
strictNullHandling: !1
|
|
3697
|
-
},
|
|
3718
|
+
}, l = function(g) {
|
|
3698
3719
|
return g.replace(/&#(\d+);/g, function(m, x) {
|
|
3699
3720
|
return String.fromCharCode(parseInt(x, 10));
|
|
3700
3721
|
});
|
|
@@ -3709,18 +3730,18 @@ function ms() {
|
|
|
3709
3730
|
d[T].indexOf("utf8=") === 0 && (d[T] === o ? p = "utf-8" : d[T] === r && (p = "iso-8859-1"), j = T, T = d.length);
|
|
3710
3731
|
for (T = 0; T < d.length; ++T)
|
|
3711
3732
|
if (T !== j) {
|
|
3712
|
-
var O = d[T], b = O.indexOf("]="),
|
|
3713
|
-
|
|
3714
|
-
s(O.slice(
|
|
3733
|
+
var O = d[T], b = O.indexOf("]="), R = b === -1 ? O.indexOf("=") : b + 1, N, C;
|
|
3734
|
+
R === -1 ? (N = x.decoder(O, a.decoder, p, "key"), C = x.strictNullHandling ? null : "") : (N = x.decoder(O.slice(0, R), a.decoder, p, "key"), C = e.maybeMap(
|
|
3735
|
+
s(O.slice(R + 1), x),
|
|
3715
3736
|
function(P) {
|
|
3716
3737
|
return x.decoder(P, a.decoder, p, "value");
|
|
3717
3738
|
}
|
|
3718
|
-
)), C && x.interpretNumericEntities && p === "iso-8859-1" && (C =
|
|
3739
|
+
)), C && x.interpretNumericEntities && p === "iso-8859-1" && (C = l(C)), O.indexOf("[]=") > -1 && (C = t(C) ? [C] : C);
|
|
3719
3740
|
var L = n.call(v, N);
|
|
3720
3741
|
L && x.duplicates === "combine" ? v[N] = e.combine(v[N], C) : (!L || x.duplicates === "last") && (v[N] = C);
|
|
3721
3742
|
}
|
|
3722
3743
|
return v;
|
|
3723
|
-
},
|
|
3744
|
+
}, c = function(g, m, x, v) {
|
|
3724
3745
|
for (var f = v ? m : s(m, x), h = g.length - 1; h >= 0; --h) {
|
|
3725
3746
|
var d, j = g[h];
|
|
3726
3747
|
if (j === "[]" && x.parseArrays)
|
|
@@ -3751,7 +3772,7 @@ function ms() {
|
|
|
3751
3772
|
throw new RangeError("Input depth exceeded depth option of " + v.depth + " and strictDepth is true");
|
|
3752
3773
|
O.push("[" + h.slice(T.index) + "]");
|
|
3753
3774
|
}
|
|
3754
|
-
return
|
|
3775
|
+
return c(O, x, v, f);
|
|
3755
3776
|
}
|
|
3756
3777
|
}, y = function(m) {
|
|
3757
3778
|
if (!m)
|
|
@@ -3792,7 +3813,7 @@ function ms() {
|
|
|
3792
3813
|
strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : a.strictNullHandling
|
|
3793
3814
|
};
|
|
3794
3815
|
};
|
|
3795
|
-
return
|
|
3816
|
+
return sr = function(g, m) {
|
|
3796
3817
|
var x = y(m);
|
|
3797
3818
|
if (g === "" || g === null || typeof g > "u")
|
|
3798
3819
|
return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
@@ -3801,28 +3822,28 @@ function ms() {
|
|
|
3801
3822
|
f = e.merge(f, T, x);
|
|
3802
3823
|
}
|
|
3803
3824
|
return x.allowSparse === !0 ? f : e.compact(f);
|
|
3804
|
-
},
|
|
3825
|
+
}, sr;
|
|
3805
3826
|
}
|
|
3806
|
-
var
|
|
3807
|
-
function
|
|
3808
|
-
if (
|
|
3809
|
-
|
|
3810
|
-
var e = /* @__PURE__ */
|
|
3811
|
-
return
|
|
3827
|
+
var lr, Qn;
|
|
3828
|
+
function ba() {
|
|
3829
|
+
if (Qn) return lr;
|
|
3830
|
+
Qn = 1;
|
|
3831
|
+
var e = /* @__PURE__ */ bs(), n = /* @__PURE__ */ xs(), t = /* @__PURE__ */ Sr();
|
|
3832
|
+
return lr = {
|
|
3812
3833
|
formats: t,
|
|
3813
3834
|
parse: n,
|
|
3814
3835
|
stringify: e
|
|
3815
|
-
},
|
|
3836
|
+
}, lr;
|
|
3816
3837
|
}
|
|
3817
|
-
var
|
|
3818
|
-
function
|
|
3819
|
-
if (
|
|
3820
|
-
|
|
3821
|
-
var e =
|
|
3838
|
+
var Kn;
|
|
3839
|
+
function $s() {
|
|
3840
|
+
if (Kn) return Te;
|
|
3841
|
+
Kn = 1;
|
|
3842
|
+
var e = Bi();
|
|
3822
3843
|
function n() {
|
|
3823
3844
|
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;
|
|
3824
3845
|
}
|
|
3825
|
-
var t = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/,
|
|
3846
|
+
var t = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, l = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, s = [
|
|
3826
3847
|
"<",
|
|
3827
3848
|
">",
|
|
3828
3849
|
'"',
|
|
@@ -3845,7 +3866,7 @@ function gs() {
|
|
|
3845
3866
|
"?",
|
|
3846
3867
|
";",
|
|
3847
3868
|
"#"
|
|
3848
|
-
].concat(o),
|
|
3869
|
+
].concat(o), c = [
|
|
3849
3870
|
"/",
|
|
3850
3871
|
"?",
|
|
3851
3872
|
"#"
|
|
@@ -3866,21 +3887,21 @@ function gs() {
|
|
|
3866
3887
|
"ftp:": !0,
|
|
3867
3888
|
"gopher:": !0,
|
|
3868
3889
|
"file:": !0
|
|
3869
|
-
}, f = /* @__PURE__ */
|
|
3890
|
+
}, f = /* @__PURE__ */ ba();
|
|
3870
3891
|
function h(p, O, b) {
|
|
3871
3892
|
if (p && typeof p == "object" && p instanceof n)
|
|
3872
3893
|
return p;
|
|
3873
|
-
var
|
|
3874
|
-
return
|
|
3894
|
+
var R = new n();
|
|
3895
|
+
return R.parse(p, O, b), R;
|
|
3875
3896
|
}
|
|
3876
3897
|
n.prototype.parse = function(p, O, b) {
|
|
3877
3898
|
if (typeof p != "string")
|
|
3878
3899
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof p);
|
|
3879
|
-
var
|
|
3900
|
+
var R = p.indexOf("?"), N = R !== -1 && R < p.indexOf("#") ? "?" : "#", C = p.split(N), L = /\\/g;
|
|
3880
3901
|
C[0] = C[0].replace(L, "/"), p = C.join(N);
|
|
3881
3902
|
var P = p;
|
|
3882
3903
|
if (P = P.trim(), !b && p.split("#").length === 1) {
|
|
3883
|
-
var oe =
|
|
3904
|
+
var oe = l.exec(P);
|
|
3884
3905
|
if (oe)
|
|
3885
3906
|
return this.path = P, this.href = P, this.pathname = oe[1], oe[2] ? (this.search = oe[2], O ? this.query = f.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
|
|
3886
3907
|
}
|
|
@@ -3895,12 +3916,12 @@ function gs() {
|
|
|
3895
3916
|
se && !(H && x[H]) && (P = P.substr(2), this.slashes = !0);
|
|
3896
3917
|
}
|
|
3897
3918
|
if (!x[H] && (se || H && !v[H])) {
|
|
3898
|
-
for (var Z = -1, A = 0; A <
|
|
3899
|
-
var re = P.indexOf(
|
|
3919
|
+
for (var Z = -1, A = 0; A < c.length; A++) {
|
|
3920
|
+
var re = P.indexOf(c[A]);
|
|
3900
3921
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
3901
3922
|
}
|
|
3902
|
-
var
|
|
3903
|
-
Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (
|
|
3923
|
+
var E, k;
|
|
3924
|
+
Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (E = P.slice(0, k), P = P.slice(k + 1), this.auth = decodeURIComponent(E)), Z = -1;
|
|
3904
3925
|
for (var A = 0; A < i.length; A++) {
|
|
3905
3926
|
var re = P.indexOf(i[A]);
|
|
3906
3927
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
@@ -3936,8 +3957,8 @@ function gs() {
|
|
|
3936
3957
|
ae !== -1 && (this.hash = P.substr(ae), P = P.slice(0, ae));
|
|
3937
3958
|
var he = P.indexOf("?");
|
|
3938
3959
|
if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), O && (this.query = f.parse(this.query)), P = P.slice(0, he)) : O && (this.search = "", this.query = {}), P && (this.pathname = P), v[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3939
|
-
var B = this.pathname || "",
|
|
3940
|
-
this.path = B +
|
|
3960
|
+
var B = this.pathname || "", we = this.search || "";
|
|
3961
|
+
this.path = B + we;
|
|
3941
3962
|
}
|
|
3942
3963
|
return this.href = this.format(), this;
|
|
3943
3964
|
};
|
|
@@ -3947,15 +3968,15 @@ function gs() {
|
|
|
3947
3968
|
n.prototype.format = function() {
|
|
3948
3969
|
var p = this.auth || "";
|
|
3949
3970
|
p && (p = encodeURIComponent(p), p = p.replace(/%3A/i, ":"), p += "@");
|
|
3950
|
-
var O = this.protocol || "", b = this.pathname || "",
|
|
3971
|
+
var O = this.protocol || "", b = this.pathname || "", R = this.hash || "", N = !1, C = "";
|
|
3951
3972
|
this.host ? N = p + this.host : this.hostname && (N = p + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (N += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (C = f.stringify(this.query, {
|
|
3952
3973
|
arrayFormat: "repeat",
|
|
3953
3974
|
addQueryPrefix: !1
|
|
3954
3975
|
}));
|
|
3955
3976
|
var L = this.search || C && "?" + C || "";
|
|
3956
|
-
return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || v[O]) && N !== !1 ? (N = "//" + (N || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : N || (N = ""),
|
|
3977
|
+
return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || v[O]) && N !== !1 ? (N = "//" + (N || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : N || (N = ""), R && R.charAt(0) !== "#" && (R = "#" + R), L && L.charAt(0) !== "?" && (L = "?" + L), b = b.replace(/[?#]/g, function(P) {
|
|
3957
3978
|
return encodeURIComponent(P);
|
|
3958
|
-
}), L = L.replace("#", "%23"), O + N + b + L +
|
|
3979
|
+
}), L = L.replace("#", "%23"), O + N + b + L + R;
|
|
3959
3980
|
};
|
|
3960
3981
|
function j(p, O) {
|
|
3961
3982
|
return h(p, !1, !0).resolve(O);
|
|
@@ -3971,8 +3992,8 @@ function gs() {
|
|
|
3971
3992
|
var O = new n();
|
|
3972
3993
|
O.parse(p, !1, !0), p = O;
|
|
3973
3994
|
}
|
|
3974
|
-
for (var b = new n(),
|
|
3975
|
-
var C =
|
|
3995
|
+
for (var b = new n(), R = Object.keys(this), N = 0; N < R.length; N++) {
|
|
3996
|
+
var C = R[N];
|
|
3976
3997
|
b[C] = this[C];
|
|
3977
3998
|
}
|
|
3978
3999
|
if (b.hash = p.hash, p.href === "")
|
|
@@ -4004,8 +4025,8 @@ function gs() {
|
|
|
4004
4025
|
}
|
|
4005
4026
|
return b.slashes = b.slashes || p.slashes, b.href = b.format(), b;
|
|
4006
4027
|
}
|
|
4007
|
-
var re = b.pathname && b.pathname.charAt(0) === "/",
|
|
4008
|
-
if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (U[0] === "" ? U[0] = p.host : U.unshift(p.host)), p.host = null), k = k && (U[0] === "" || q[0] === "")),
|
|
4028
|
+
var re = b.pathname && b.pathname.charAt(0) === "/", E = p.host || p.pathname && p.pathname.charAt(0) === "/", k = E || re || b.host && p.pathname, F = k, q = b.pathname && b.pathname.split("/") || [], U = p.pathname && p.pathname.split("/") || [], J = b.protocol && !v[b.protocol];
|
|
4029
|
+
if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (U[0] === "" ? U[0] = p.host : U.unshift(p.host)), p.host = null), k = k && (U[0] === "" || q[0] === "")), E)
|
|
4009
4030
|
b.host = p.host || p.host === "" ? p.host : b.host, b.hostname = p.hostname || p.hostname === "" ? p.hostname : b.hostname, b.search = p.search, b.query = p.query, q = U;
|
|
4010
4031
|
else if (U.length)
|
|
4011
4032
|
q || (q = []), q.pop(), q = q.concat(U), b.search = p.search, b.query = p.query;
|
|
@@ -4035,14 +4056,14 @@ function gs() {
|
|
|
4035
4056
|
}, n.prototype.parseHost = function() {
|
|
4036
4057
|
var p = this.host, O = a.exec(p);
|
|
4037
4058
|
O && (O = O[0], O !== ":" && (this.port = O.substr(1)), p = p.substr(0, p.length - O.length)), p && (this.hostname = p);
|
|
4038
|
-
},
|
|
4059
|
+
}, Te.parse = h, Te.resolve = j, Te.resolveObject = T, Te.format = d, Te.Url = n, Te;
|
|
4039
4060
|
}
|
|
4040
|
-
var
|
|
4061
|
+
var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), js = class {
|
|
4041
4062
|
constructor(e, n = {}) {
|
|
4042
4063
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4043
4064
|
harIsAlreadyEncoded: !1,
|
|
4044
4065
|
...n
|
|
4045
|
-
}, this.requests = [],
|
|
4066
|
+
}, this.requests = [], ws(e) ? this.entries = e.log.entries : this.entries = [
|
|
4046
4067
|
{
|
|
4047
4068
|
request: e
|
|
4048
4069
|
}
|
|
@@ -4077,7 +4098,7 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
|
|
|
4077
4098
|
cookiesObj: {},
|
|
4078
4099
|
allHeaders: {}
|
|
4079
4100
|
};
|
|
4080
|
-
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(
|
|
4101
|
+
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Br, {})), t.headers && t.headers.length) {
|
|
4081
4102
|
const m = /^HTTP\/2/;
|
|
4082
4103
|
t.headersObj = t.headers.reduce((x, { name: v, value: f }) => {
|
|
4083
4104
|
const h = m.exec(t.httpVersion) ? v.toLocaleLowerCase() : v;
|
|
@@ -4105,9 +4126,9 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
|
|
|
4105
4126
|
`, f = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), h = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4106
4127
|
`), d = [`--${m}`];
|
|
4107
4128
|
(g = t.postData) == null || g.params.forEach((T, p) => {
|
|
4108
|
-
const O = T.name, b = T.value || "",
|
|
4109
|
-
|
|
4110
|
-
`Content-Disposition: form-data; name="${f(h(O))}"; filename="${
|
|
4129
|
+
const O = T.name, b = T.value || "", R = T.fileName || null, N = T.contentType || "application/octet-stream";
|
|
4130
|
+
R ? (d.push(
|
|
4131
|
+
`Content-Disposition: form-data; name="${f(h(O))}"; filename="${R}"`
|
|
4111
4132
|
), d.push(`Content-Type: ${N}`)) : d.push(`Content-Disposition: form-data; name="${f(h(O))}"`), d.push(""), d.push(h(b)), p !== t.postData.params.length - 1 && d.push(`--${m}`);
|
|
4112
4133
|
}), d.push(`--${x}`), t.postData.boundary = m, t.postData.text = d.join(v);
|
|
4113
4134
|
const j = fe(t.headersObj, "content-type") || "content-type";
|
|
@@ -4115,7 +4136,7 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
|
|
|
4115
4136
|
}
|
|
4116
4137
|
break;
|
|
4117
4138
|
case "application/x-www-form-urlencoded":
|
|
4118
|
-
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(
|
|
4139
|
+
t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Br, {}), t.postData.text = ur.stringify(t.postData.paramsObj)) : t.postData.text = "";
|
|
4119
4140
|
break;
|
|
4120
4141
|
case "text/json":
|
|
4121
4142
|
case "text/x-json":
|
|
@@ -4129,19 +4150,19 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
|
|
|
4129
4150
|
}
|
|
4130
4151
|
break;
|
|
4131
4152
|
}
|
|
4132
|
-
const
|
|
4153
|
+
const l = {
|
|
4133
4154
|
...t.allHeaders,
|
|
4134
4155
|
...t.headersObj
|
|
4135
|
-
}, s =
|
|
4156
|
+
}, s = cr.parse(t.url, !0, !0);
|
|
4136
4157
|
t.queryObj = {
|
|
4137
4158
|
...t.queryObj,
|
|
4138
4159
|
...s.query
|
|
4139
4160
|
};
|
|
4140
4161
|
let r;
|
|
4141
|
-
n.harIsAlreadyEncoded ? r =
|
|
4162
|
+
n.harIsAlreadyEncoded ? r = ur.stringify(t.queryObj, {
|
|
4142
4163
|
encode: !1,
|
|
4143
4164
|
indices: !1
|
|
4144
|
-
}) : r =
|
|
4165
|
+
}) : r = ur.stringify(t.queryObj, {
|
|
4145
4166
|
indices: !1
|
|
4146
4167
|
});
|
|
4147
4168
|
const o = {
|
|
@@ -4149,62 +4170,62 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
|
|
|
4149
4170
|
query: t.queryObj,
|
|
4150
4171
|
search: r,
|
|
4151
4172
|
path: r ? `${s.pathname}?${r}` : s.pathname
|
|
4152
|
-
}, i =
|
|
4173
|
+
}, i = cr.format({
|
|
4153
4174
|
...s,
|
|
4154
4175
|
query: null,
|
|
4155
4176
|
search: null
|
|
4156
|
-
}),
|
|
4177
|
+
}), c = cr.format({
|
|
4157
4178
|
...s,
|
|
4158
4179
|
...o
|
|
4159
4180
|
});
|
|
4160
4181
|
return {
|
|
4161
4182
|
...t,
|
|
4162
|
-
allHeaders:
|
|
4163
|
-
fullUrl:
|
|
4183
|
+
allHeaders: l,
|
|
4184
|
+
fullUrl: c,
|
|
4164
4185
|
url: i,
|
|
4165
4186
|
uriObj: o
|
|
4166
4187
|
};
|
|
4167
4188
|
}
|
|
4168
4189
|
convert(e, n, t) {
|
|
4169
4190
|
this.initCalled || this.init(), !t && n && (t = n);
|
|
4170
|
-
const a =
|
|
4191
|
+
const a = Fi[e];
|
|
4171
4192
|
if (!a)
|
|
4172
4193
|
return !1;
|
|
4173
|
-
const { convert:
|
|
4174
|
-
return this.requests.map((r) =>
|
|
4194
|
+
const { convert: l } = a.clientsById[n || a.info.default];
|
|
4195
|
+
return this.requests.map((r) => l(r, t));
|
|
4175
4196
|
}
|
|
4176
4197
|
};
|
|
4177
|
-
const
|
|
4198
|
+
const Ss = ({
|
|
4178
4199
|
rootMargin: e = "0px",
|
|
4179
4200
|
threshold: n,
|
|
4180
4201
|
root: t
|
|
4181
4202
|
} = {}) => {
|
|
4182
|
-
const [a,
|
|
4183
|
-
return
|
|
4203
|
+
const [a, l] = ve(!1), s = oa(null);
|
|
4204
|
+
return br(() => {
|
|
4184
4205
|
const r = new IntersectionObserver(
|
|
4185
4206
|
([i]) => {
|
|
4186
|
-
i &&
|
|
4207
|
+
i && l(i.isIntersecting);
|
|
4187
4208
|
},
|
|
4188
4209
|
{ rootMargin: e, threshold: n, root: t }
|
|
4189
4210
|
), o = s.current;
|
|
4190
4211
|
if (o)
|
|
4191
4212
|
return r.observe(o), () => r.unobserve(o);
|
|
4192
4213
|
}, [t, e, n]), [s, a];
|
|
4193
|
-
},
|
|
4214
|
+
}, Os = typeof window < "u" ? eo : br, xa = ({
|
|
4194
4215
|
children: e,
|
|
4195
4216
|
maxHeight: n = 250
|
|
4196
4217
|
}) => {
|
|
4197
|
-
const t =
|
|
4198
|
-
return
|
|
4218
|
+
const t = oa(null), [a, l] = ve(!1), [s, r] = ve(!1);
|
|
4219
|
+
return Os(() => {
|
|
4199
4220
|
const o = t.current;
|
|
4200
4221
|
if (!o) return;
|
|
4201
|
-
|
|
4222
|
+
l(o.scrollHeight > n);
|
|
4202
4223
|
const i = new ResizeObserver(() => {
|
|
4203
|
-
|
|
4224
|
+
l(o.scrollHeight > n);
|
|
4204
4225
|
});
|
|
4205
4226
|
return i.observe(o), () => i.disconnect();
|
|
4206
4227
|
}, [n]), /* @__PURE__ */ $.jsxs(
|
|
4207
|
-
|
|
4228
|
+
ea,
|
|
4208
4229
|
{
|
|
4209
4230
|
className: "group",
|
|
4210
4231
|
open: s,
|
|
@@ -4212,7 +4233,7 @@ const xs = ({
|
|
|
4212
4233
|
style: { "--max-height": `${n}px` },
|
|
4213
4234
|
children: [
|
|
4214
4235
|
/* @__PURE__ */ $.jsxs(
|
|
4215
|
-
|
|
4236
|
+
ta,
|
|
4216
4237
|
{
|
|
4217
4238
|
forceMount: !0,
|
|
4218
4239
|
className: pe(
|
|
@@ -4223,12 +4244,12 @@ const xs = ({
|
|
|
4223
4244
|
!s && a && /* @__PURE__ */ $.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" }),
|
|
4224
4245
|
/* @__PURE__ */ $.jsx("div", { ref: t, children: e }),
|
|
4225
4246
|
!s && a && /* @__PURE__ */ $.jsx(
|
|
4226
|
-
|
|
4247
|
+
fr,
|
|
4227
4248
|
{
|
|
4228
4249
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4229
4250
|
asChild: !0,
|
|
4230
|
-
children: /* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsxs(
|
|
4231
|
-
/* @__PURE__ */ $.jsx(
|
|
4251
|
+
children: /* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4252
|
+
/* @__PURE__ */ $.jsx(La, { size: 14, className: "mr-1.5" }),
|
|
4232
4253
|
"Click to expand"
|
|
4233
4254
|
] }) })
|
|
4234
4255
|
}
|
|
@@ -4240,27 +4261,27 @@ const xs = ({
|
|
|
4240
4261
|
"div",
|
|
4241
4262
|
{
|
|
4242
4263
|
className: pe("flex justify-center w-full mb-2", !s && "hidden"),
|
|
4243
|
-
children: /* @__PURE__ */ $.jsx(
|
|
4264
|
+
children: /* @__PURE__ */ $.jsx(fr, { asChild: !0, children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", size: "sm", children: [
|
|
4244
4265
|
"Collapse",
|
|
4245
|
-
/* @__PURE__ */ $.jsx(
|
|
4266
|
+
/* @__PURE__ */ $.jsx(Fa, { size: 14, className: "ml-1.5" })
|
|
4246
4267
|
] }) })
|
|
4247
4268
|
}
|
|
4248
4269
|
)
|
|
4249
4270
|
]
|
|
4250
4271
|
}
|
|
4251
4272
|
);
|
|
4252
|
-
},
|
|
4273
|
+
}, Ts = ({
|
|
4253
4274
|
server: e,
|
|
4254
4275
|
servers: n,
|
|
4255
4276
|
operation: t,
|
|
4256
4277
|
examples: a
|
|
4257
4278
|
}) => {
|
|
4258
4279
|
var g, m, x;
|
|
4259
|
-
const { isAuthEnabled:
|
|
4280
|
+
const { isAuthEnabled: l, login: s, signup: r, isPending: o, isAuthenticated: i } = ho(), c = (g = t.parameters) == null ? void 0 : g.filter((v) => v.in === "header").sort((v, f) => v.required && !f.required ? -1 : 1).map((v) => {
|
|
4260
4281
|
var f, h, d, j, T, p, O, b;
|
|
4261
4282
|
return {
|
|
4262
4283
|
name: v.name,
|
|
4263
|
-
defaultValue: ((f = v.schema) == null ? void 0 : f.default) ?? ((d = (h = v.examples) == null ? void 0 : h.find((
|
|
4284
|
+
defaultValue: ((f = v.schema) == null ? void 0 : f.default) ?? ((d = (h = v.examples) == null ? void 0 : h.find((R) => R.value)) == null ? void 0 : d.value) ?? "",
|
|
4264
4285
|
defaultActive: v.required ?? !1,
|
|
4265
4286
|
isRequired: v.required ?? !1,
|
|
4266
4287
|
enum: ((j = v.schema) == null ? void 0 : j.type) == "array" ? (p = (T = v.schema) == null ? void 0 : T.items) == null ? void 0 : p.enum : (O = v.schema) == null ? void 0 : O.enum,
|
|
@@ -4277,28 +4298,28 @@ const xs = ({
|
|
|
4277
4298
|
};
|
|
4278
4299
|
}), y = (x = t.parameters) == null ? void 0 : x.filter((v) => v.in === "path").map((v) => ({ name: v.name }));
|
|
4279
4300
|
return /* @__PURE__ */ $.jsx(
|
|
4280
|
-
|
|
4301
|
+
za,
|
|
4281
4302
|
{
|
|
4282
4303
|
server: e,
|
|
4283
4304
|
servers: n,
|
|
4284
4305
|
method: t.method,
|
|
4285
4306
|
url: t.path,
|
|
4286
|
-
headers:
|
|
4307
|
+
headers: c,
|
|
4287
4308
|
queryParams: u,
|
|
4288
4309
|
pathParams: y,
|
|
4289
4310
|
examples: a,
|
|
4290
|
-
requiresLogin:
|
|
4311
|
+
requiresLogin: l && !i && !o,
|
|
4291
4312
|
onLogin: () => s(),
|
|
4292
4313
|
onSignUp: () => r()
|
|
4293
4314
|
}
|
|
4294
4315
|
);
|
|
4295
|
-
},
|
|
4316
|
+
}, Or = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
|
|
4296
4317
|
"div",
|
|
4297
4318
|
{
|
|
4298
4319
|
className: pe("rounded-xl overflow-hidden border border-border", n),
|
|
4299
4320
|
children: e
|
|
4300
4321
|
}
|
|
4301
|
-
),
|
|
4322
|
+
), Tr = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
|
|
4302
4323
|
"div",
|
|
4303
4324
|
{
|
|
4304
4325
|
className: pe(
|
|
@@ -4307,7 +4328,7 @@ const xs = ({
|
|
|
4307
4328
|
),
|
|
4308
4329
|
children: e
|
|
4309
4330
|
}
|
|
4310
|
-
),
|
|
4331
|
+
), $a = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("bg-card overflow-auto p-2", n), children: e }), wa = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("border-t bg-muted dark:bg-transparent p-3", n), children: e }), $e = (e, n) => {
|
|
4311
4332
|
if (e.example !== void 0)
|
|
4312
4333
|
return e.example;
|
|
4313
4334
|
if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
|
|
@@ -4315,18 +4336,47 @@ const xs = ({
|
|
|
4315
4336
|
if (t !== null)
|
|
4316
4337
|
return typeof t == "object" && "value" in t ? t.value : t;
|
|
4317
4338
|
}
|
|
4339
|
+
if (e.const !== void 0)
|
|
4340
|
+
return e.const;
|
|
4318
4341
|
if (e.type === "object" && e.properties) {
|
|
4319
4342
|
const t = {};
|
|
4320
|
-
for (const [a,
|
|
4321
|
-
typeof
|
|
4343
|
+
for (const [a, l] of Object.entries(e.properties))
|
|
4344
|
+
typeof l == "object" && (t[a] = $e(l, a));
|
|
4322
4345
|
return t;
|
|
4323
4346
|
}
|
|
4324
4347
|
if (e.type === "array")
|
|
4325
4348
|
return Array.isArray(e.items) ? e.items.map(
|
|
4326
|
-
(t) =>
|
|
4327
|
-
) : e.items ? [
|
|
4349
|
+
(t) => $e(t)
|
|
4350
|
+
) : e.items ? [$e(e.items)] : [];
|
|
4351
|
+
if (e.format !== void 0)
|
|
4352
|
+
switch (e.format) {
|
|
4353
|
+
case "date-time":
|
|
4354
|
+
return "2024-08-25T15:00:00Z";
|
|
4355
|
+
case "date":
|
|
4356
|
+
return "2024-08-25";
|
|
4357
|
+
case "time":
|
|
4358
|
+
return "15:00:00";
|
|
4359
|
+
case "email":
|
|
4360
|
+
return "test@example.com";
|
|
4361
|
+
case "uri":
|
|
4362
|
+
return "https://www.example.com/path/to/resource";
|
|
4363
|
+
case "uri-reference":
|
|
4364
|
+
return "/path/to/resource";
|
|
4365
|
+
case "uuid":
|
|
4366
|
+
return "00000000-0000-0000-0000-000000000000";
|
|
4367
|
+
}
|
|
4328
4368
|
if (e.enum)
|
|
4329
4369
|
return e.enum[0];
|
|
4370
|
+
if (e.oneOf) {
|
|
4371
|
+
const t = Math.floor(Math.random() * e.oneOf.length);
|
|
4372
|
+
return $e(e.oneOf[t]);
|
|
4373
|
+
}
|
|
4374
|
+
if (e.anyOf) {
|
|
4375
|
+
const t = Math.floor(Math.random() * e.anyOf.length);
|
|
4376
|
+
return $e(e.anyOf[t]);
|
|
4377
|
+
}
|
|
4378
|
+
if (e.allOf)
|
|
4379
|
+
return e.allOf.reduce((t, a) => ({ ...t, ...$e(a) }), {});
|
|
4330
4380
|
switch (e.type) {
|
|
4331
4381
|
case "string":
|
|
4332
4382
|
return n || "string";
|
|
@@ -4343,42 +4393,42 @@ const xs = ({
|
|
|
4343
4393
|
default:
|
|
4344
4394
|
return {};
|
|
4345
4395
|
}
|
|
4346
|
-
},
|
|
4396
|
+
}, Ps = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), qs = (e) => e ? {
|
|
4347
4397
|
"application/json": "json",
|
|
4348
4398
|
"application/xml": "xml",
|
|
4349
4399
|
"application/x-yaml": "yaml",
|
|
4350
4400
|
"text/csv": "csv",
|
|
4351
4401
|
"application/javascript": "javascript",
|
|
4352
4402
|
"application/graphql": "graphql"
|
|
4353
|
-
}[e] ?? "plain" : "plain",
|
|
4403
|
+
}[e] ?? "plain" : "plain", ja = ({
|
|
4354
4404
|
content: e,
|
|
4355
4405
|
description: n,
|
|
4356
4406
|
onExampleChange: t
|
|
4357
4407
|
}) => {
|
|
4358
4408
|
var m;
|
|
4359
|
-
const [a,
|
|
4360
|
-
if (
|
|
4361
|
-
return "value" in
|
|
4409
|
+
const [a, l] = ve(0), [s, r] = ve(0), o = Array.isArray(e) && e.length === 1 ? e[0] : e[a], i = (o == null ? void 0 : o.examples) ?? [], c = i[s], u = ia(() => {
|
|
4410
|
+
if (c)
|
|
4411
|
+
return "value" in c ? c.value : c;
|
|
4362
4412
|
if (o != null && o.schema)
|
|
4363
|
-
return
|
|
4364
|
-
}, [
|
|
4365
|
-
|
|
4413
|
+
return $e(o.schema);
|
|
4414
|
+
}, [c, o == null ? void 0 : o.schema]);
|
|
4415
|
+
br(() => {
|
|
4366
4416
|
u && (t == null || t(u));
|
|
4367
4417
|
}, [u, t]);
|
|
4368
|
-
const y =
|
|
4418
|
+
const y = Ps(u), g = qs(o == null ? void 0 : o.mediaType);
|
|
4369
4419
|
return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4370
|
-
/* @__PURE__ */ $.jsxs(
|
|
4371
|
-
|
|
4420
|
+
/* @__PURE__ */ $.jsxs($a, { className: "p-0", children: [
|
|
4421
|
+
c != null && c.externalValue ? /* @__PURE__ */ $.jsx("div", { className: "p-2", children: /* @__PURE__ */ $.jsx(
|
|
4372
4422
|
"a",
|
|
4373
4423
|
{
|
|
4374
|
-
href:
|
|
4424
|
+
href: c.externalValue,
|
|
4375
4425
|
target: "_blank",
|
|
4376
4426
|
rel: "noopener noreferrer",
|
|
4377
4427
|
className: "text-xs text-primary hover:underline",
|
|
4378
4428
|
children: "View External Example →"
|
|
4379
4429
|
}
|
|
4380
|
-
) }) : /* @__PURE__ */ $.jsx(
|
|
4381
|
-
|
|
4430
|
+
) }) : /* @__PURE__ */ $.jsx(xa, { children: /* @__PURE__ */ $.jsx(
|
|
4431
|
+
la,
|
|
4382
4432
|
{
|
|
4383
4433
|
language: g,
|
|
4384
4434
|
noBackground: !0,
|
|
@@ -4386,9 +4436,9 @@ const xs = ({
|
|
|
4386
4436
|
code: y
|
|
4387
4437
|
}
|
|
4388
4438
|
) }),
|
|
4389
|
-
(
|
|
4439
|
+
(c == null ? void 0 : c.description) && /* @__PURE__ */ $.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
|
|
4390
4440
|
] }),
|
|
4391
|
-
/* @__PURE__ */ $.jsxs(
|
|
4441
|
+
/* @__PURE__ */ $.jsxs(wa, { className: "text-xs p-0 divide-y divide-border", children: [
|
|
4392
4442
|
n && /* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: n }),
|
|
4393
4443
|
(i.length !== 0 || e.length !== 0) && /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
|
|
4394
4444
|
/* @__PURE__ */ $.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ $.jsx(
|
|
@@ -4396,7 +4446,7 @@ const xs = ({
|
|
|
4396
4446
|
{
|
|
4397
4447
|
className: "max-w-[200px]",
|
|
4398
4448
|
value: a.toString(),
|
|
4399
|
-
onChange: (x) =>
|
|
4449
|
+
onChange: (x) => l(Number(x.target.value)),
|
|
4400
4450
|
options: e.map((x, v) => ({
|
|
4401
4451
|
value: v.toString(),
|
|
4402
4452
|
label: x.mediaType
|
|
@@ -4418,52 +4468,52 @@ const xs = ({
|
|
|
4418
4468
|
] })
|
|
4419
4469
|
] })
|
|
4420
4470
|
] });
|
|
4421
|
-
},
|
|
4471
|
+
}, Cs = ({
|
|
4422
4472
|
content: e,
|
|
4423
4473
|
onExampleChange: n
|
|
4424
|
-
}) => e.length === 0 ? null : /* @__PURE__ */ $.jsxs(
|
|
4425
|
-
/* @__PURE__ */ $.jsx(
|
|
4426
|
-
/* @__PURE__ */ $.jsx(
|
|
4427
|
-
] }),
|
|
4428
|
-
|
|
4474
|
+
}) => e.length === 0 ? null : /* @__PURE__ */ $.jsxs(Or, { children: [
|
|
4475
|
+
/* @__PURE__ */ $.jsx(Tr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4476
|
+
/* @__PURE__ */ $.jsx(ja, { content: e, onExampleChange: n })
|
|
4477
|
+
] }), Rs = ({ response: e }) => /* @__PURE__ */ $.jsx(Ge.Content, { value: e.statusCode, children: /* @__PURE__ */ $.jsx(
|
|
4478
|
+
ja,
|
|
4429
4479
|
{
|
|
4430
4480
|
content: e.content ?? [],
|
|
4431
4481
|
description: e.description ?? void 0
|
|
4432
4482
|
}
|
|
4433
|
-
) }),
|
|
4483
|
+
) }), Es = ({
|
|
4434
4484
|
responses: e,
|
|
4435
4485
|
selectedResponse: n,
|
|
4436
4486
|
onSelectResponse: t
|
|
4437
4487
|
}) => {
|
|
4438
4488
|
var a;
|
|
4439
|
-
return /* @__PURE__ */ $.jsx(
|
|
4489
|
+
return /* @__PURE__ */ $.jsx(Or, { children: /* @__PURE__ */ $.jsxs(
|
|
4440
4490
|
Ge.Root,
|
|
4441
4491
|
{
|
|
4442
4492
|
defaultValue: (a = e[0]) == null ? void 0 : a.statusCode,
|
|
4443
4493
|
value: n,
|
|
4444
|
-
onValueChange: (
|
|
4494
|
+
onValueChange: (l) => t(l),
|
|
4445
4495
|
children: [
|
|
4446
|
-
/* @__PURE__ */ $.jsxs(
|
|
4496
|
+
/* @__PURE__ */ $.jsxs(Tr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
4447
4497
|
/* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
4448
|
-
/* @__PURE__ */ $.jsx(Ge.List, { className: "flex gap-2", children: e.map((
|
|
4498
|
+
/* @__PURE__ */ $.jsx(Ge.List, { className: "flex gap-2", children: e.map((l) => /* @__PURE__ */ $.jsx(
|
|
4449
4499
|
Ge.Trigger,
|
|
4450
4500
|
{
|
|
4451
|
-
value:
|
|
4501
|
+
value: l.statusCode,
|
|
4452
4502
|
className: pe(
|
|
4453
4503
|
"text-xs font-mono px-1.5 py-1 pb-px translate-y-px border-b-2 border-transparent rounded-t cursor-pointer",
|
|
4454
4504
|
"data-[state=active]:text-primary data-[state=active]:dark:text-inherit data-[state=active]:border-primary",
|
|
4455
4505
|
"hover:border-accent-foreground/25"
|
|
4456
4506
|
),
|
|
4457
|
-
children:
|
|
4507
|
+
children: l.statusCode
|
|
4458
4508
|
},
|
|
4459
|
-
|
|
4509
|
+
l.statusCode
|
|
4460
4510
|
)) })
|
|
4461
4511
|
] }),
|
|
4462
|
-
e.map((
|
|
4512
|
+
e.map((l) => /* @__PURE__ */ $.jsx(Rs, { response: l }, l.statusCode))
|
|
4463
4513
|
]
|
|
4464
4514
|
}
|
|
4465
4515
|
) });
|
|
4466
|
-
},
|
|
4516
|
+
}, ks = (e, n) => {
|
|
4467
4517
|
let t;
|
|
4468
4518
|
switch (n) {
|
|
4469
4519
|
case "shell":
|
|
@@ -4504,7 +4554,7 @@ const xs = ({
|
|
|
4504
4554
|
break;
|
|
4505
4555
|
}
|
|
4506
4556
|
return t ? t[0] : "";
|
|
4507
|
-
},
|
|
4557
|
+
}, Ns = _e(
|
|
4508
4558
|
/* GraphQL */
|
|
4509
4559
|
`
|
|
4510
4560
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4516,7 +4566,7 @@ const xs = ({
|
|
|
4516
4566
|
}
|
|
4517
4567
|
}
|
|
4518
4568
|
`
|
|
4519
|
-
),
|
|
4569
|
+
), As = [
|
|
4520
4570
|
{ value: "shell", label: "cURL" },
|
|
4521
4571
|
{ value: "js", label: "JavaScript" },
|
|
4522
4572
|
{ value: "python", label: "Python" },
|
|
@@ -4528,24 +4578,24 @@ const xs = ({
|
|
|
4528
4578
|
{ value: "php", label: "PHP" },
|
|
4529
4579
|
{ value: "ruby", label: "Ruby" },
|
|
4530
4580
|
{ value: "swift", label: "Swift" }
|
|
4531
|
-
],
|
|
4581
|
+
], Is = ({
|
|
4532
4582
|
operation: e,
|
|
4533
4583
|
selectedResponse: n,
|
|
4534
4584
|
onSelectResponse: t
|
|
4535
4585
|
}) => {
|
|
4536
4586
|
var N;
|
|
4537
|
-
const { input: a, type:
|
|
4587
|
+
const { input: a, type: l, options: s } = xr(), r = Ca(), o = Qe(Ns, { input: a, type: l }), i = gr(o), c = yo(), u = ra(e.method), [y, g] = Ba(), [, m] = aa(), [x, v] = ve(), f = y.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", h = (N = e.requestBody) == null ? void 0 : N.content, d = h && (s != null && s.transformExamples) ? s.transformExamples({
|
|
4538
4588
|
auth: r,
|
|
4539
4589
|
type: "request",
|
|
4540
4590
|
operation: e,
|
|
4541
4591
|
content: h,
|
|
4542
|
-
context:
|
|
4592
|
+
context: c
|
|
4543
4593
|
}) : h, j = /* @__PURE__ */ $.jsx(
|
|
4544
|
-
|
|
4594
|
+
Wa,
|
|
4545
4595
|
{
|
|
4546
4596
|
path: e.path,
|
|
4547
4597
|
renderParam: ({ name: C }) => /* @__PURE__ */ $.jsx(
|
|
4548
|
-
|
|
4598
|
+
Zn,
|
|
4549
4599
|
{
|
|
4550
4600
|
name: C,
|
|
4551
4601
|
backgroundOpacity: "0",
|
|
@@ -4554,11 +4604,11 @@ const xs = ({
|
|
|
4554
4604
|
}
|
|
4555
4605
|
)
|
|
4556
4606
|
}
|
|
4557
|
-
), { selectedServer: T } =
|
|
4607
|
+
), { selectedServer: T } = vr(i.data.schema.servers), p = ia(() => {
|
|
4558
4608
|
var P;
|
|
4559
|
-
const C = x ?? ((P = d == null ? void 0 : d[0]) != null && P.schema ?
|
|
4609
|
+
const C = x ?? ((P = d == null ? void 0 : d[0]) != null && P.schema ? $e(
|
|
4560
4610
|
d[0].schema
|
|
4561
|
-
) : void 0), L = new
|
|
4611
|
+
) : void 0), L = new js({
|
|
4562
4612
|
method: e.method.toLocaleUpperCase(),
|
|
4563
4613
|
url: T + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4564
4614
|
postData: C ? {
|
|
@@ -4572,7 +4622,7 @@ const xs = ({
|
|
|
4572
4622
|
headersSize: 0,
|
|
4573
4623
|
bodySize: 0
|
|
4574
4624
|
});
|
|
4575
|
-
return
|
|
4625
|
+
return ks(L, f);
|
|
4576
4626
|
}, [
|
|
4577
4627
|
x,
|
|
4578
4628
|
d,
|
|
@@ -4580,7 +4630,7 @@ const xs = ({
|
|
|
4580
4630
|
e.path,
|
|
4581
4631
|
T,
|
|
4582
4632
|
f
|
|
4583
|
-
]), [O, b] =
|
|
4633
|
+
]), [O, b] = Ss({ rootMargin: "200px 0px 200px 0px" }), R = b && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
|
|
4584
4634
|
return /* @__PURE__ */ $.jsxs(
|
|
4585
4635
|
"aside",
|
|
4586
4636
|
{
|
|
@@ -4588,15 +4638,15 @@ const xs = ({
|
|
|
4588
4638
|
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
4589
4639
|
"data-pagefind-ignore": "all",
|
|
4590
4640
|
children: [
|
|
4591
|
-
/* @__PURE__ */ $.jsxs(
|
|
4592
|
-
/* @__PURE__ */ $.jsxs(
|
|
4641
|
+
/* @__PURE__ */ $.jsxs(Or, { children: [
|
|
4642
|
+
/* @__PURE__ */ $.jsxs(Tr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4593
4643
|
/* @__PURE__ */ $.jsxs("span", { className: "font-mono break-words leading-6", children: [
|
|
4594
4644
|
/* @__PURE__ */ $.jsx("span", { className: pe("font-semibold", u), children: e.method.toLocaleUpperCase() }),
|
|
4595
4645
|
" ",
|
|
4596
4646
|
j
|
|
4597
4647
|
] }),
|
|
4598
|
-
|
|
4599
|
-
|
|
4648
|
+
R && /* @__PURE__ */ $.jsx(
|
|
4649
|
+
Ts,
|
|
4600
4650
|
{
|
|
4601
4651
|
servers: i.data.schema.servers.map((C) => C.url),
|
|
4602
4652
|
operation: e,
|
|
@@ -4605,8 +4655,8 @@ const xs = ({
|
|
|
4605
4655
|
)
|
|
4606
4656
|
] }),
|
|
4607
4657
|
b && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4608
|
-
/* @__PURE__ */ $.jsx(
|
|
4609
|
-
|
|
4658
|
+
/* @__PURE__ */ $.jsx($a, { className: "p-0", children: /* @__PURE__ */ $.jsx(xa, { children: /* @__PURE__ */ $.jsx(
|
|
4659
|
+
la,
|
|
4610
4660
|
{
|
|
4611
4661
|
language: f,
|
|
4612
4662
|
noBackground: !0,
|
|
@@ -4614,7 +4664,7 @@ const xs = ({
|
|
|
4614
4664
|
code: p
|
|
4615
4665
|
}
|
|
4616
4666
|
) }) }),
|
|
4617
|
-
/* @__PURE__ */ $.jsxs(
|
|
4667
|
+
/* @__PURE__ */ $.jsxs(wa, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
4618
4668
|
/* @__PURE__ */ $.jsx("span", { children: "Show example in" }),
|
|
4619
4669
|
/* @__PURE__ */ $.jsx(
|
|
4620
4670
|
Ye,
|
|
@@ -4626,21 +4676,21 @@ const xs = ({
|
|
|
4626
4676
|
g((L) => (L.set("lang", C.target.value), L));
|
|
4627
4677
|
});
|
|
4628
4678
|
},
|
|
4629
|
-
options:
|
|
4679
|
+
options: As
|
|
4630
4680
|
}
|
|
4631
4681
|
)
|
|
4632
4682
|
] })
|
|
4633
4683
|
] })
|
|
4634
4684
|
] }),
|
|
4635
4685
|
b && d && /* @__PURE__ */ $.jsx(
|
|
4636
|
-
|
|
4686
|
+
Cs,
|
|
4637
4687
|
{
|
|
4638
4688
|
content: d,
|
|
4639
4689
|
onExampleChange: v
|
|
4640
4690
|
}
|
|
4641
4691
|
),
|
|
4642
4692
|
b && e.responses.length > 0 && /* @__PURE__ */ $.jsx(
|
|
4643
|
-
|
|
4693
|
+
Es,
|
|
4644
4694
|
{
|
|
4645
4695
|
selectedResponse: n,
|
|
4646
4696
|
onSelectResponse: t,
|
|
@@ -4649,7 +4699,7 @@ const xs = ({
|
|
|
4649
4699
|
content: C.content && (s != null && s.transformExamples) ? s.transformExamples({
|
|
4650
4700
|
auth: r,
|
|
4651
4701
|
type: "response",
|
|
4652
|
-
context:
|
|
4702
|
+
context: c,
|
|
4653
4703
|
operation: e,
|
|
4654
4704
|
content: C.content
|
|
4655
4705
|
}) : C.content
|
|
@@ -4659,17 +4709,17 @@ const xs = ({
|
|
|
4659
4709
|
]
|
|
4660
4710
|
}
|
|
4661
4711
|
);
|
|
4662
|
-
},
|
|
4712
|
+
}, Us = ["path", "query", "header", "cookie"], Ls = ({
|
|
4663
4713
|
operationFragment: e,
|
|
4664
4714
|
serverUrl: n
|
|
4665
4715
|
}) => {
|
|
4666
|
-
var o, i,
|
|
4667
|
-
const t =
|
|
4716
|
+
var o, i, c;
|
|
4717
|
+
const t = mo(Fs, e), a = ao(
|
|
4668
4718
|
t.parameters ?? [],
|
|
4669
4719
|
(u) => u.in
|
|
4670
|
-
),
|
|
4720
|
+
), l = t.responses.at(0), [s, r] = ve(l == null ? void 0 : l.statusCode);
|
|
4671
4721
|
return /* @__PURE__ */ $.jsxs("div", { children: [
|
|
4672
|
-
t.deprecated && /* @__PURE__ */ $.jsx(
|
|
4722
|
+
t.deprecated && /* @__PURE__ */ $.jsx(_r, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
4673
4723
|
/* @__PURE__ */ $.jsxs(
|
|
4674
4724
|
"div",
|
|
4675
4725
|
{
|
|
@@ -4679,7 +4729,7 @@ const xs = ({
|
|
|
4679
4729
|
),
|
|
4680
4730
|
children: [
|
|
4681
4731
|
/* @__PURE__ */ $.jsx(
|
|
4682
|
-
|
|
4732
|
+
Ue,
|
|
4683
4733
|
{
|
|
4684
4734
|
level: 2,
|
|
4685
4735
|
id: t.slug,
|
|
@@ -4689,8 +4739,8 @@ const xs = ({
|
|
|
4689
4739
|
}
|
|
4690
4740
|
),
|
|
4691
4741
|
/* @__PURE__ */ $.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
4692
|
-
/* @__PURE__ */ $.jsx("span", { className:
|
|
4693
|
-
/* @__PURE__ */ $.jsxs(
|
|
4742
|
+
/* @__PURE__ */ $.jsx("span", { className: ra(t.method), children: t.method.toUpperCase() }),
|
|
4743
|
+
/* @__PURE__ */ $.jsxs(na, { className: "max-w-full truncate flex cursor-pointer", children: [
|
|
4694
4744
|
n && /* @__PURE__ */ $.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: n.replace(/\/$/, "") }),
|
|
4695
4745
|
/* @__PURE__ */ $.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
|
|
4696
4746
|
] })
|
|
@@ -4699,15 +4749,15 @@ const xs = ({
|
|
|
4699
4749
|
t.description && /* @__PURE__ */ $.jsx(
|
|
4700
4750
|
De,
|
|
4701
4751
|
{
|
|
4702
|
-
className: `${
|
|
4752
|
+
className: `${pr} max-w-full prose-img:max-w-prose`,
|
|
4703
4753
|
content: t.description
|
|
4704
4754
|
}
|
|
4705
4755
|
),
|
|
4706
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ $.jsx($.Fragment, { children:
|
|
4756
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ $.jsx($.Fragment, { children: Us.flatMap(
|
|
4707
4757
|
(u) => {
|
|
4708
4758
|
var y;
|
|
4709
4759
|
return (y = a[u]) != null && y.length ? /* @__PURE__ */ $.jsx(
|
|
4710
|
-
|
|
4760
|
+
jo,
|
|
4711
4761
|
{
|
|
4712
4762
|
summary: t.summary ?? void 0,
|
|
4713
4763
|
id: t.slug,
|
|
@@ -4718,38 +4768,38 @@ const xs = ({
|
|
|
4718
4768
|
) : [];
|
|
4719
4769
|
}
|
|
4720
4770
|
) }),
|
|
4721
|
-
|
|
4771
|
+
xo((c = (i = (o = t.requestBody) == null ? void 0 : o.content) == null ? void 0 : i.at(0)) == null ? void 0 : c.schema, (u) => {
|
|
4722
4772
|
var y;
|
|
4723
4773
|
return /* @__PURE__ */ $.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4724
4774
|
/* @__PURE__ */ $.jsxs(
|
|
4725
|
-
|
|
4775
|
+
Ue,
|
|
4726
4776
|
{
|
|
4727
4777
|
level: 3,
|
|
4728
4778
|
className: "capitalize flex items-center gap-2",
|
|
4729
4779
|
id: `${t.slug}/request-body`,
|
|
4730
4780
|
children: [
|
|
4731
|
-
t.summary && /* @__PURE__ */ $.jsxs(
|
|
4781
|
+
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4732
4782
|
t.summary,
|
|
4733
4783
|
" › "
|
|
4734
4784
|
] }),
|
|
4735
4785
|
"Request Body",
|
|
4736
4786
|
" ",
|
|
4737
|
-
((y = t.requestBody) == null ? void 0 : y.required) === !1 ? /* @__PURE__ */ $.jsx(
|
|
4787
|
+
((y = t.requestBody) == null ? void 0 : y.required) === !1 ? /* @__PURE__ */ $.jsx(_r, { variant: "muted", children: "optional" }) : ""
|
|
4738
4788
|
]
|
|
4739
4789
|
}
|
|
4740
4790
|
),
|
|
4741
|
-
/* @__PURE__ */ $.jsx(
|
|
4791
|
+
/* @__PURE__ */ $.jsx(dr, { schema: u })
|
|
4742
4792
|
] });
|
|
4743
4793
|
}),
|
|
4744
4794
|
t.responses.length > 0 && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
4745
4795
|
/* @__PURE__ */ $.jsxs(
|
|
4746
|
-
|
|
4796
|
+
Ue,
|
|
4747
4797
|
{
|
|
4748
4798
|
level: 3,
|
|
4749
4799
|
className: "capitalize mt-8 pt-8 border-t",
|
|
4750
4800
|
id: `${t.slug}/responses`,
|
|
4751
4801
|
children: [
|
|
4752
|
-
t.summary && /* @__PURE__ */ $.jsxs(
|
|
4802
|
+
t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
|
|
4753
4803
|
t.summary,
|
|
4754
4804
|
" › "
|
|
4755
4805
|
] }),
|
|
@@ -4758,13 +4808,13 @@ const xs = ({
|
|
|
4758
4808
|
}
|
|
4759
4809
|
),
|
|
4760
4810
|
/* @__PURE__ */ $.jsxs(
|
|
4761
|
-
|
|
4811
|
+
io,
|
|
4762
4812
|
{
|
|
4763
4813
|
onValueChange: (u) => r(u),
|
|
4764
4814
|
value: s,
|
|
4765
4815
|
children: [
|
|
4766
|
-
t.responses.length > 1 && /* @__PURE__ */ $.jsx(
|
|
4767
|
-
|
|
4816
|
+
t.responses.length > 1 && /* @__PURE__ */ $.jsx(so, { children: t.responses.map((u) => /* @__PURE__ */ $.jsx(
|
|
4817
|
+
lo,
|
|
4768
4818
|
{
|
|
4769
4819
|
value: u.statusCode,
|
|
4770
4820
|
title: u.description ?? void 0,
|
|
@@ -4775,11 +4825,11 @@ const xs = ({
|
|
|
4775
4825
|
/* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((u) => {
|
|
4776
4826
|
var y, g;
|
|
4777
4827
|
return /* @__PURE__ */ $.jsx(
|
|
4778
|
-
|
|
4828
|
+
co,
|
|
4779
4829
|
{
|
|
4780
4830
|
value: u.statusCode,
|
|
4781
4831
|
children: /* @__PURE__ */ $.jsx(
|
|
4782
|
-
|
|
4832
|
+
dr,
|
|
4783
4833
|
{
|
|
4784
4834
|
schema: (g = (y = u.content) == null ? void 0 : y.find((m) => m.schema)) == null ? void 0 : g.schema
|
|
4785
4835
|
}
|
|
@@ -4794,7 +4844,7 @@ const xs = ({
|
|
|
4794
4844
|
] })
|
|
4795
4845
|
] }),
|
|
4796
4846
|
/* @__PURE__ */ $.jsx(
|
|
4797
|
-
|
|
4847
|
+
Is,
|
|
4798
4848
|
{
|
|
4799
4849
|
selectedResponse: s,
|
|
4800
4850
|
onSelectResponse: r,
|
|
@@ -4807,10 +4857,10 @@ const xs = ({
|
|
|
4807
4857
|
)
|
|
4808
4858
|
] });
|
|
4809
4859
|
};
|
|
4810
|
-
function
|
|
4860
|
+
function Yn(e, n = 160) {
|
|
4811
4861
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, n).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4812
4862
|
}
|
|
4813
|
-
const
|
|
4863
|
+
const Fs = _e(
|
|
4814
4864
|
/* GraphQL */
|
|
4815
4865
|
`
|
|
4816
4866
|
fragment OperationsFragment on OperationItem {
|
|
@@ -4878,7 +4928,7 @@ const As = _e(
|
|
|
4878
4928
|
}
|
|
4879
4929
|
}
|
|
4880
4930
|
`
|
|
4881
|
-
),
|
|
4931
|
+
), _s = _e(
|
|
4882
4932
|
/* GraphQL */
|
|
4883
4933
|
`
|
|
4884
4934
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
@@ -4887,7 +4937,7 @@ const As = _e(
|
|
|
4887
4937
|
}
|
|
4888
4938
|
}
|
|
4889
4939
|
`
|
|
4890
|
-
),
|
|
4940
|
+
), Bs = _e(
|
|
4891
4941
|
/* GraphQL */
|
|
4892
4942
|
`
|
|
4893
4943
|
query OperationsForTag(
|
|
@@ -4924,31 +4974,31 @@ const As = _e(
|
|
|
4924
4974
|
}
|
|
4925
4975
|
}
|
|
4926
4976
|
`
|
|
4927
|
-
),
|
|
4977
|
+
), ul = ({
|
|
4928
4978
|
tag: e,
|
|
4929
4979
|
untagged: n
|
|
4930
4980
|
}) => {
|
|
4931
|
-
const { input: t, type: a, versions:
|
|
4981
|
+
const { input: t, type: a, versions: l, version: s, options: r } = xr(), { tag: o } = Ha(), i = Qe(Bs, {
|
|
4932
4982
|
input: t,
|
|
4933
4983
|
type: a,
|
|
4934
4984
|
tag: e ?? o,
|
|
4935
4985
|
untagged: n
|
|
4936
|
-
}),
|
|
4986
|
+
}), c = gr(i), {
|
|
4937
4987
|
data: { schema: u }
|
|
4938
|
-
} =
|
|
4939
|
-
if (
|
|
4988
|
+
} = c, { selectedServer: y } = vr(u.servers), g = u.title, m = u.summary, x = u.description, v = Ma(), f = Qe(_s, { input: t, type: a });
|
|
4989
|
+
if (Ra({
|
|
4940
4990
|
...f,
|
|
4941
4991
|
enabled: typeof window < "u",
|
|
4942
4992
|
notifyOnChangeProps: []
|
|
4943
|
-
}),
|
|
4993
|
+
}), Ea(), !u.tag)
|
|
4944
4994
|
return /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col h-full items-center justify-center text-center", children: [
|
|
4945
4995
|
/* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground font-medium", children: "No operations found" }),
|
|
4946
4996
|
/* @__PURE__ */ $.jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: "This API doesn't have any operations defined yet." })
|
|
4947
4997
|
] });
|
|
4948
|
-
const { operations: h, next: d, prev: j, description: T } = u.tag, p = T ?
|
|
4998
|
+
const { operations: h, next: d, prev: j, description: T } = u.tag, p = T ? Yn(T) : m || (x ? Yn(x) : void 0), O = Object.entries(l).length > 1, b = (r == null ? void 0 : r.showVersionSelect) === "always" || O && (r == null ? void 0 : r.showVersionSelect) !== "hide", R = {
|
|
4949
4999
|
prev: j != null && j.name ? { to: `../${j.slug}`, label: j.name } : void 0,
|
|
4950
5000
|
next: d ? {
|
|
4951
|
-
to: `../${d.slug ??
|
|
5001
|
+
to: `../${d.slug ?? Ja}`,
|
|
4952
5002
|
label: d.name ?? "Other endpoints"
|
|
4953
5003
|
} : void 0
|
|
4954
5004
|
};
|
|
@@ -4959,17 +5009,17 @@ const As = _e(
|
|
|
4959
5009
|
"data-pagefind-filter": "section:openapi",
|
|
4960
5010
|
"data-pagefind-meta": "section:openapi",
|
|
4961
5011
|
children: [
|
|
4962
|
-
/* @__PURE__ */ $.jsxs(
|
|
5012
|
+
/* @__PURE__ */ $.jsxs(ka, { children: [
|
|
4963
5013
|
/* @__PURE__ */ $.jsx("title", { children: [u.tag.name, g].filter(Boolean).join(" - ") }),
|
|
4964
5014
|
p && /* @__PURE__ */ $.jsx("meta", { name: "description", content: p })
|
|
4965
5015
|
] }),
|
|
4966
5016
|
/* @__PURE__ */ $.jsxs("div", { className: "mb-8", children: [
|
|
4967
|
-
/* @__PURE__ */ $.jsxs(
|
|
5017
|
+
/* @__PURE__ */ $.jsxs(ea, { className: "w-full", children: [
|
|
4968
5018
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
4969
5019
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col flex-1 gap-2", children: [
|
|
4970
|
-
/* @__PURE__ */ $.jsx(
|
|
5020
|
+
/* @__PURE__ */ $.jsx(Ya, { children: g }),
|
|
4971
5021
|
/* @__PURE__ */ $.jsxs(
|
|
4972
|
-
|
|
5022
|
+
Ue,
|
|
4973
5023
|
{
|
|
4974
5024
|
level: 1,
|
|
4975
5025
|
id: "description",
|
|
@@ -4986,32 +5036,32 @@ const As = _e(
|
|
|
4986
5036
|
]
|
|
4987
5037
|
}
|
|
4988
5038
|
),
|
|
4989
|
-
/* @__PURE__ */ $.jsx(
|
|
5039
|
+
/* @__PURE__ */ $.jsx(vo, {})
|
|
4990
5040
|
] }),
|
|
4991
5041
|
/* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
4992
5042
|
b && /* @__PURE__ */ $.jsxs(
|
|
4993
|
-
|
|
5043
|
+
Ga,
|
|
4994
5044
|
{
|
|
4995
|
-
onValueChange: (N) => v(
|
|
5045
|
+
onValueChange: (N) => v(l[N]),
|
|
4996
5046
|
defaultValue: s,
|
|
4997
5047
|
disabled: !O,
|
|
4998
5048
|
children: [
|
|
4999
|
-
/* @__PURE__ */ $.jsx(
|
|
5000
|
-
/* @__PURE__ */ $.jsx(
|
|
5049
|
+
/* @__PURE__ */ $.jsx(Va, { className: "w-[180px]", children: /* @__PURE__ */ $.jsx(Da, { placeholder: "Select version" }) }),
|
|
5050
|
+
/* @__PURE__ */ $.jsx(Qa, { children: Object.entries(l).map(([N]) => /* @__PURE__ */ $.jsx(Ka, { value: N, children: N }, N)) })
|
|
5001
5051
|
]
|
|
5002
5052
|
}
|
|
5003
5053
|
),
|
|
5004
|
-
u.description && /* @__PURE__ */ $.jsxs(
|
|
5054
|
+
u.description && /* @__PURE__ */ $.jsxs(fr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
|
|
5005
5055
|
/* @__PURE__ */ $.jsx("span", { children: "API information" }),
|
|
5006
5056
|
/* @__PURE__ */ $.jsx(
|
|
5007
|
-
|
|
5057
|
+
Xn,
|
|
5008
5058
|
{
|
|
5009
5059
|
className: "group-data-[state=open]:hidden translate-y-px",
|
|
5010
5060
|
size: 14
|
|
5011
5061
|
}
|
|
5012
5062
|
),
|
|
5013
5063
|
/* @__PURE__ */ $.jsx(
|
|
5014
|
-
|
|
5064
|
+
_a,
|
|
5015
5065
|
{
|
|
5016
5066
|
className: "group-data-[state=closed]:hidden translate-y-px",
|
|
5017
5067
|
size: 13
|
|
@@ -5020,11 +5070,11 @@ const As = _e(
|
|
|
5020
5070
|
] })
|
|
5021
5071
|
] })
|
|
5022
5072
|
] }),
|
|
5023
|
-
u.description && /* @__PURE__ */ $.jsx(
|
|
5073
|
+
u.description && /* @__PURE__ */ $.jsx(ta, { className: "CollapsibleContent", children: /* @__PURE__ */ $.jsx(
|
|
5024
5074
|
"div",
|
|
5025
5075
|
{
|
|
5026
5076
|
className: pe(
|
|
5027
|
-
|
|
5077
|
+
pr,
|
|
5028
5078
|
"pt-4 max-w-full prose-img:max-w-prose"
|
|
5029
5079
|
),
|
|
5030
5080
|
children: /* @__PURE__ */ $.jsx(
|
|
@@ -5041,7 +5091,7 @@ const As = _e(
|
|
|
5041
5091
|
"div",
|
|
5042
5092
|
{
|
|
5043
5093
|
className: pe(
|
|
5044
|
-
|
|
5094
|
+
pr,
|
|
5045
5095
|
"my-4 max-w-full prose-img:max-w-prose"
|
|
5046
5096
|
),
|
|
5047
5097
|
children: /* @__PURE__ */ $.jsx(De, { content: T })
|
|
@@ -5052,7 +5102,7 @@ const As = _e(
|
|
|
5052
5102
|
/* @__PURE__ */ $.jsxs("div", { className: "px-6 mt-6 -mx-6 [content-visibility:auto]", children: [
|
|
5053
5103
|
h.map((N) => /* @__PURE__ */ $.jsxs("div", { children: [
|
|
5054
5104
|
/* @__PURE__ */ $.jsx(
|
|
5055
|
-
|
|
5105
|
+
Ls,
|
|
5056
5106
|
{
|
|
5057
5107
|
serverUrl: y,
|
|
5058
5108
|
operationFragment: N
|
|
@@ -5060,14 +5110,14 @@ const As = _e(
|
|
|
5060
5110
|
),
|
|
5061
5111
|
/* @__PURE__ */ $.jsx("hr", { className: "my-10" })
|
|
5062
5112
|
] }, N.slug)),
|
|
5063
|
-
/* @__PURE__ */ $.jsx(
|
|
5113
|
+
/* @__PURE__ */ $.jsx(Za, { className: "mb-4", ...R })
|
|
5064
5114
|
] })
|
|
5065
5115
|
]
|
|
5066
5116
|
}
|
|
5067
5117
|
);
|
|
5068
5118
|
};
|
|
5069
5119
|
export {
|
|
5070
|
-
|
|
5071
|
-
|
|
5120
|
+
ul as OperationList,
|
|
5121
|
+
Fs as OperationsFragment
|
|
5072
5122
|
};
|
|
5073
|
-
//# sourceMappingURL=OperationList-
|
|
5123
|
+
//# sourceMappingURL=OperationList-CKac6iap.js.map
|