zudoku 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +2 -2
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/vite/build.js +4 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/prerender/prerender.d.ts +1 -1
- package/dist/vite/prerender/prerender.js +53 -20
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +6 -4
- package/dist/vite/prerender/worker.js +13 -19
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/lib/{OperationList-B3VX94x4.js → OperationList-CnYOgwBj.js} +259 -257
- package/lib/OperationList-CnYOgwBj.js.map +1 -0
- package/lib/{index-P0YUtHIb.js → index-CnKeVT2S.js} +5 -5
- package/lib/{index-P0YUtHIb.js.map → index-CnKeVT2S.js.map} +1 -1
- package/lib/zudoku.plugin-markdown.js +23 -44
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +2 -2
- package/src/lib/plugins/markdown/resolver.ts +0 -33
- package/src/lib/plugins/openapi/index.tsx +2 -2
- package/lib/OperationList-B3VX94x4.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
|
@@ -11,18 +11,17 @@ import { ChevronsUpDownIcon as Bo, CheckIcon as Ho, CopyIcon as Mo, UnfoldVertic
|
|
|
11
11
|
import { useContext as Zo, useTransition as eo, useState as ge, useRef as xr, useEffect as $r, useLayoutEffect as ea, useMemo as to, useCallback as ta } from "react";
|
|
12
12
|
import { Button as ro } from "./ui/Button.js";
|
|
13
13
|
import { a as ra, u as jr } from "./context-rwLGh-6_.js";
|
|
14
|
-
import { g as rt, C as no, a as na, b as oa, c as _r, P as aa, m as oo, d as ia } from "./index-
|
|
14
|
+
import { g as rt, C as no, a as na, b as oa, c as _r, P as aa, m as oo, d as ia } from "./index-CnKeVT2S.js";
|
|
15
15
|
import { Tabs as sa, TabsList as la, TabsTrigger as ca, TabsContent as ua } from "./ui/Tabs.js";
|
|
16
16
|
import { Card as be, CardHeader as fa, CardTitle as pa, CardContent as da } from "./ui/Card.js";
|
|
17
17
|
import { c as ha } from "./index-Djenk2Hj.js";
|
|
18
18
|
import { g as ya, c as Ze, a as ma } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
19
|
-
import { _ as ga } from "./__vite-browser-external-BYRIRx8p.js";
|
|
20
19
|
import { S as ao } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
21
20
|
import { B as Br } from "./Spinner-BlzrEEk1.js";
|
|
22
21
|
import * as Ye from "@radix-ui/react-tabs";
|
|
23
22
|
import * as xe from "@radix-ui/react-collapsible";
|
|
24
|
-
import { C as
|
|
25
|
-
function
|
|
23
|
+
import { C as ga } from "./circular-DxaIIlWD.js";
|
|
24
|
+
function va(e, r) {
|
|
26
25
|
return r;
|
|
27
26
|
}
|
|
28
27
|
const wr = (e, ...r) => {
|
|
@@ -63,7 +62,7 @@ const wr = (e, ...r) => {
|
|
|
63
62
|
children: /* @__PURE__ */ g.jsx(Bo, { size: 14 })
|
|
64
63
|
}
|
|
65
64
|
)
|
|
66
|
-
] }),
|
|
65
|
+
] }), ba = rt(
|
|
67
66
|
/* GraphQL */
|
|
68
67
|
`
|
|
69
68
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -90,8 +89,8 @@ const wr = (e, ...r) => {
|
|
|
90
89
|
children: r ? /* @__PURE__ */ g.jsx(Ho, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ g.jsx(Mo, { size: 14, strokeWidth: 1.3 })
|
|
91
90
|
}
|
|
92
91
|
);
|
|
93
|
-
},
|
|
94
|
-
const { input: e, type: r } = jr(), t = wr(
|
|
92
|
+
}, xa = () => {
|
|
93
|
+
const { input: e, type: r } = jr(), t = wr(ba, { input: e, type: r }), o = vr(t), [, s] = eo(), { selectedServer: l, setSelectedServer: n } = br(
|
|
95
94
|
o.data.schema.servers
|
|
96
95
|
), { servers: a } = o.data.schema;
|
|
97
96
|
if (a.length === 0) return null;
|
|
@@ -123,7 +122,7 @@ const wr = (e, ...r) => {
|
|
|
123
122
|
return t[s] || (t[s] = []), t[s].push(o), t;
|
|
124
123
|
},
|
|
125
124
|
{}
|
|
126
|
-
),
|
|
125
|
+
), $a = (e, r) => e ? r(e) : void 0, ja = ha(
|
|
127
126
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
128
127
|
{
|
|
129
128
|
variants: {
|
|
@@ -141,16 +140,16 @@ const wr = (e, ...r) => {
|
|
|
141
140
|
}
|
|
142
141
|
);
|
|
143
142
|
function Ce({ className: e, variant: r, ...t }) {
|
|
144
|
-
return /* @__PURE__ */ g.jsx("div", { className: le(
|
|
143
|
+
return /* @__PURE__ */ g.jsx("div", { className: le(ja({ variant: r }), e), ...t });
|
|
145
144
|
}
|
|
146
|
-
const
|
|
145
|
+
const wa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
147
146
|
type: "string"
|
|
148
|
-
},
|
|
147
|
+
}, Sa = ({
|
|
149
148
|
parameter: e,
|
|
150
149
|
group: r,
|
|
151
150
|
id: t
|
|
152
151
|
}) => {
|
|
153
|
-
const o =
|
|
152
|
+
const o = wa(e);
|
|
154
153
|
return /* @__PURE__ */ g.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
155
154
|
/* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
156
155
|
/* @__PURE__ */ g.jsx("code", { children: r === "path" ? /* @__PURE__ */ g.jsx(
|
|
@@ -174,14 +173,14 @@ const Sa = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
|
174
173
|
}
|
|
175
174
|
)
|
|
176
175
|
] });
|
|
177
|
-
},
|
|
176
|
+
}, Oa = ({
|
|
178
177
|
group: e,
|
|
179
178
|
parameters: r,
|
|
180
179
|
id: t
|
|
181
180
|
}) => /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
182
181
|
/* @__PURE__ */ g.jsx(Be, { level: 3, id: `${t}/${e}-parameters`, className: "capitalize", children: e === "header" ? "Headers" : `${e} Parameters` }),
|
|
183
182
|
/* @__PURE__ */ g.jsx(be, { children: /* @__PURE__ */ g.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: r.sort((o, s) => o.required === s.required ? 0 : o.required ? -1 : 1).map((o) => /* @__PURE__ */ g.jsx(
|
|
184
|
-
|
|
183
|
+
Sa,
|
|
185
184
|
{
|
|
186
185
|
parameter: o,
|
|
187
186
|
id: t,
|
|
@@ -216,27 +215,27 @@ var Mr = (e, r) => {
|
|
|
216
215
|
}, this.indentationCharacter = e || zr, this.lineJoin = r ?? Gr;
|
|
217
216
|
}
|
|
218
217
|
}, yt, Wr;
|
|
219
|
-
function
|
|
218
|
+
function Ta() {
|
|
220
219
|
return Wr || (Wr = 1, yt = function(e) {
|
|
221
220
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
222
221
|
}), yt;
|
|
223
222
|
}
|
|
224
223
|
var mt, Jr;
|
|
225
|
-
function
|
|
224
|
+
function Pa() {
|
|
226
225
|
return Jr || (Jr = 1, mt = function(e) {
|
|
227
226
|
var r = typeof e;
|
|
228
227
|
return e !== null && (r === "object" || r === "function");
|
|
229
228
|
}), mt;
|
|
230
229
|
}
|
|
231
230
|
var Ke = {}, Vr;
|
|
232
|
-
function
|
|
231
|
+
function Ca() {
|
|
233
232
|
return Vr || (Vr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ke;
|
|
234
233
|
}
|
|
235
234
|
var gt, Dr;
|
|
236
|
-
function
|
|
235
|
+
function Ra() {
|
|
237
236
|
if (Dr) return gt;
|
|
238
237
|
Dr = 1;
|
|
239
|
-
const e =
|
|
238
|
+
const e = Ta(), r = Pa(), t = Ca().default;
|
|
240
239
|
return gt = (o, s, l) => {
|
|
241
240
|
const n = [];
|
|
242
241
|
return function a(i, c, u) {
|
|
@@ -296,14 +295,14 @@ function qa() {
|
|
|
296
295
|
}(o, s, l);
|
|
297
296
|
}, gt;
|
|
298
297
|
}
|
|
299
|
-
var
|
|
300
|
-
const fe = /* @__PURE__ */ ya(
|
|
298
|
+
var qa = Ra();
|
|
299
|
+
const fe = /* @__PURE__ */ ya(qa);
|
|
301
300
|
function Me(e, r = {}) {
|
|
302
301
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: s = !0 } = r;
|
|
303
302
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
304
303
|
` ? s ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? s ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
305
304
|
}
|
|
306
|
-
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }),
|
|
305
|
+
var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), Na = {
|
|
307
306
|
info: {
|
|
308
307
|
key: "libcurl",
|
|
309
308
|
title: "Libcurl",
|
|
@@ -319,7 +318,7 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
319
318
|
l(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
320
319
|
}), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (n(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), n(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
321
320
|
}
|
|
322
|
-
},
|
|
321
|
+
}, ka = {
|
|
323
322
|
info: {
|
|
324
323
|
key: "c",
|
|
325
324
|
title: "C",
|
|
@@ -327,19 +326,19 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
|
|
|
327
326
|
cli: "c"
|
|
328
327
|
},
|
|
329
328
|
clientsById: {
|
|
330
|
-
libcurl:
|
|
329
|
+
libcurl: Na
|
|
331
330
|
}
|
|
332
331
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
|
|
333
332
|
const t = pe(e, r);
|
|
334
333
|
if (t)
|
|
335
334
|
return e[t];
|
|
336
|
-
}, nt = (e, r) => !!pe(e, r),
|
|
335
|
+
}, nt = (e, r) => !!pe(e, r), Ea = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
337
336
|
(r) => e.indexOf(r) > -1
|
|
338
337
|
), Qr = class {
|
|
339
338
|
constructor(e) {
|
|
340
339
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
341
340
|
}
|
|
342
|
-
},
|
|
341
|
+
}, Aa = class {
|
|
343
342
|
constructor(e) {
|
|
344
343
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
345
344
|
}
|
|
@@ -376,7 +375,7 @@ ${t}`);
|
|
|
376
375
|
default:
|
|
377
376
|
return e.toString();
|
|
378
377
|
}
|
|
379
|
-
},
|
|
378
|
+
}, Ia = {
|
|
380
379
|
info: {
|
|
381
380
|
key: "clj_http",
|
|
382
381
|
title: "clj-http",
|
|
@@ -418,7 +417,7 @@ ${t}`);
|
|
|
418
417
|
if (t.params) {
|
|
419
418
|
c.multipart = t.params.map((p) => p.fileName && !p.value ? {
|
|
420
419
|
name: p.name,
|
|
421
|
-
content: new
|
|
420
|
+
content: new Aa(p.fileName)
|
|
422
421
|
} : {
|
|
423
422
|
name: p.name,
|
|
424
423
|
content: p.value
|
|
@@ -447,16 +446,16 @@ ${t}`);
|
|
|
447
446
|
}
|
|
448
447
|
return a();
|
|
449
448
|
}
|
|
450
|
-
},
|
|
449
|
+
}, La = {
|
|
451
450
|
info: {
|
|
452
451
|
key: "clojure",
|
|
453
452
|
title: "Clojure",
|
|
454
453
|
default: "clj_http"
|
|
455
454
|
},
|
|
456
455
|
clientsById: {
|
|
457
|
-
clj_http:
|
|
456
|
+
clj_http: Ia
|
|
458
457
|
}
|
|
459
|
-
},
|
|
458
|
+
}, Ua = (e) => {
|
|
460
459
|
let r = ve(e, "accept-encoding");
|
|
461
460
|
if (!r)
|
|
462
461
|
return [];
|
|
@@ -473,7 +472,7 @@ ${t}`);
|
|
|
473
472
|
}
|
|
474
473
|
});
|
|
475
474
|
}), o;
|
|
476
|
-
},
|
|
475
|
+
}, Fa = {
|
|
477
476
|
info: {
|
|
478
477
|
key: "httpclient",
|
|
479
478
|
title: "HttpClient",
|
|
@@ -489,7 +488,7 @@ ${t}`);
|
|
|
489
488
|
}, { push: n, join: a } = new V({ indent: l.indent });
|
|
490
489
|
n("using System.Net.Http.Headers;");
|
|
491
490
|
let i = "";
|
|
492
|
-
const c = !!e.cookie, u =
|
|
491
|
+
const c = !!e.cookie, u = Ua(e);
|
|
493
492
|
(c || u.length) && (i = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), u.length && n(`AutomaticDecompression = ${u.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${i});`), n("var request = new HttpRequestMessage"), n("{");
|
|
494
493
|
const p = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
495
494
|
t = t.toUpperCase(), t && p.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
|
|
@@ -526,10 +525,10 @@ ${t}`);
|
|
|
526
525
|
return n("};"), n("using (var response = await client.SendAsync(request))"), n("{"), n("response.EnsureSuccessStatusCode();", 1), n("var body = await response.Content.ReadAsStringAsync();", 1), n("Console.WriteLine(body);", 1), n("}"), a();
|
|
527
526
|
}
|
|
528
527
|
};
|
|
529
|
-
function
|
|
528
|
+
function _a(e) {
|
|
530
529
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
531
530
|
}
|
|
532
|
-
var
|
|
531
|
+
var Ba = {
|
|
533
532
|
info: {
|
|
534
533
|
key: "restsharp",
|
|
535
534
|
title: "RestSharp",
|
|
@@ -579,11 +578,11 @@ var Ha = {
|
|
|
579
578
|
if (!s.text) break;
|
|
580
579
|
n(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
581
580
|
}
|
|
582
|
-
return n(`var response = await client.${
|
|
581
|
+
return n(`var response = await client.${_a(e)}Async(request);
|
|
583
582
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
584
583
|
`), a();
|
|
585
584
|
}
|
|
586
|
-
},
|
|
585
|
+
}, Ha = {
|
|
587
586
|
info: {
|
|
588
587
|
key: "csharp",
|
|
589
588
|
title: "C#",
|
|
@@ -591,10 +590,10 @@ var Ha = {
|
|
|
591
590
|
cli: "dotnet"
|
|
592
591
|
},
|
|
593
592
|
clientsById: {
|
|
594
|
-
httpclient:
|
|
595
|
-
restsharp:
|
|
593
|
+
httpclient: Fa,
|
|
594
|
+
restsharp: Ba
|
|
596
595
|
}
|
|
597
|
-
},
|
|
596
|
+
}, Ma = {
|
|
598
597
|
info: {
|
|
599
598
|
key: "native",
|
|
600
599
|
title: "NewRequest",
|
|
@@ -612,7 +611,7 @@ var Ha = {
|
|
|
612
611
|
n(`req.Header.Add("${v}", "${ce(t[v])}")`, y);
|
|
613
612
|
}), l()), n(`res, ${h} := ${m}.Do(req)`, y), x(), u && (l(), n("defer res.Body.Close()", y), n(`body, ${h} := io.ReadAll(res.Body)`, y), x()), l(), u && n("fmt.Println(string(body))", y), i && (l(), n("}")), a();
|
|
614
613
|
}
|
|
615
|
-
},
|
|
614
|
+
}, za = {
|
|
616
615
|
info: {
|
|
617
616
|
key: "go",
|
|
618
617
|
title: "Go",
|
|
@@ -620,10 +619,10 @@ var Ha = {
|
|
|
620
619
|
cli: "go"
|
|
621
620
|
},
|
|
622
621
|
clientsById: {
|
|
623
|
-
native:
|
|
622
|
+
native: Ma
|
|
624
623
|
}
|
|
625
624
|
}, Yr = `\r
|
|
626
|
-
`,
|
|
625
|
+
`, Ga = {
|
|
627
626
|
info: {
|
|
628
627
|
key: "http1.1",
|
|
629
628
|
title: "HTTP/1.1",
|
|
@@ -651,16 +650,16 @@ var Ha = {
|
|
|
651
650
|
const y = u(), x = l.text || "";
|
|
652
651
|
return `${y}${Yr}${x}`;
|
|
653
652
|
}
|
|
654
|
-
},
|
|
653
|
+
}, Wa = {
|
|
655
654
|
info: {
|
|
656
655
|
key: "http",
|
|
657
656
|
title: "HTTP",
|
|
658
657
|
default: "http1.1"
|
|
659
658
|
},
|
|
660
659
|
clientsById: {
|
|
661
|
-
"http1.1":
|
|
660
|
+
"http1.1": Ga
|
|
662
661
|
}
|
|
663
|
-
},
|
|
662
|
+
}, Ja = {
|
|
664
663
|
info: {
|
|
665
664
|
key: "asynchttp",
|
|
666
665
|
title: "AsyncHttp",
|
|
@@ -677,7 +676,7 @@ var Ha = {
|
|
|
677
676
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
678
677
|
}), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), i();
|
|
679
678
|
}
|
|
680
|
-
},
|
|
679
|
+
}, Va = {
|
|
681
680
|
info: {
|
|
682
681
|
key: "nethttp",
|
|
683
682
|
title: "java.net.http",
|
|
@@ -699,7 +698,7 @@ var Ha = {
|
|
|
699
698
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
700
699
|
), n("System.out.println(response.body());"), a();
|
|
701
700
|
}
|
|
702
|
-
},
|
|
701
|
+
}, Da = {
|
|
703
702
|
info: {
|
|
704
703
|
key: "okhttp",
|
|
705
704
|
title: "OkHttp",
|
|
@@ -716,7 +715,7 @@ var Ha = {
|
|
|
716
715
|
n(`.addHeader("${p}", "${ce(o[p])}")`, 1);
|
|
717
716
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), i();
|
|
718
717
|
}
|
|
719
|
-
},
|
|
718
|
+
}, Qa = {
|
|
720
719
|
info: {
|
|
721
720
|
key: "unirest",
|
|
722
721
|
title: "Unirest",
|
|
@@ -733,19 +732,19 @@ var Ha = {
|
|
|
733
732
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
734
733
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
735
734
|
}
|
|
736
|
-
},
|
|
735
|
+
}, Ka = {
|
|
737
736
|
info: {
|
|
738
737
|
key: "java",
|
|
739
738
|
title: "Java",
|
|
740
739
|
default: "unirest"
|
|
741
740
|
},
|
|
742
741
|
clientsById: {
|
|
743
|
-
asynchttp:
|
|
744
|
-
nethttp:
|
|
745
|
-
okhttp:
|
|
746
|
-
unirest:
|
|
742
|
+
asynchttp: Ja,
|
|
743
|
+
nethttp: Va,
|
|
744
|
+
okhttp: Da,
|
|
745
|
+
unirest: Qa
|
|
747
746
|
}
|
|
748
|
-
},
|
|
747
|
+
}, Ya = {
|
|
749
748
|
info: {
|
|
750
749
|
key: "axios",
|
|
751
750
|
title: "Axios",
|
|
@@ -789,7 +788,7 @@ var Ha = {
|
|
|
789
788
|
}).replace('"[form]"', "form");
|
|
790
789
|
return i(`const options = ${h};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
|
|
791
790
|
}
|
|
792
|
-
},
|
|
791
|
+
}, Xa = {
|
|
793
792
|
info: {
|
|
794
793
|
key: "fetch",
|
|
795
794
|
title: "fetch",
|
|
@@ -842,7 +841,7 @@ var Ha = {
|
|
|
842
841
|
})};`
|
|
843
842
|
), n(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), n()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
|
|
844
843
|
}
|
|
845
|
-
},
|
|
844
|
+
}, Za = {
|
|
846
845
|
info: {
|
|
847
846
|
key: "jquery",
|
|
848
847
|
title: "jQuery",
|
|
@@ -886,7 +885,7 @@ var Ha = {
|
|
|
886
885
|
const u = fe(c, { indent: l.indent }).replace("'[form]'", "form");
|
|
887
886
|
return a(`const settings = ${u};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
|
|
888
887
|
}
|
|
889
|
-
},
|
|
888
|
+
}, ei = {
|
|
890
889
|
info: {
|
|
891
890
|
key: "xhr",
|
|
892
891
|
title: "XMLHttpRequest",
|
|
@@ -927,19 +926,19 @@ var Ha = {
|
|
|
927
926
|
a(`xhr.setRequestHeader('${u}', '${ze(r[u])}');`);
|
|
928
927
|
}), n(), a("xhr.send(data);"), i();
|
|
929
928
|
}
|
|
930
|
-
},
|
|
929
|
+
}, ti = {
|
|
931
930
|
info: {
|
|
932
931
|
key: "javascript",
|
|
933
932
|
title: "JavaScript",
|
|
934
933
|
default: "xhr"
|
|
935
934
|
},
|
|
936
935
|
clientsById: {
|
|
937
|
-
xhr:
|
|
938
|
-
axios:
|
|
939
|
-
fetch:
|
|
940
|
-
jquery:
|
|
936
|
+
xhr: ei,
|
|
937
|
+
axios: Ya,
|
|
938
|
+
fetch: Xa,
|
|
939
|
+
jquery: Za
|
|
941
940
|
}
|
|
942
|
-
},
|
|
941
|
+
}, ri = {
|
|
943
942
|
info: {
|
|
944
943
|
key: "native",
|
|
945
944
|
title: "Native JSON",
|
|
@@ -973,16 +972,16 @@ var Ha = {
|
|
|
973
972
|
}
|
|
974
973
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
975
974
|
}
|
|
976
|
-
},
|
|
975
|
+
}, ni = {
|
|
977
976
|
info: {
|
|
978
977
|
key: "json",
|
|
979
978
|
title: "JSON",
|
|
980
979
|
default: "native"
|
|
981
980
|
},
|
|
982
981
|
clientsById: {
|
|
983
|
-
native:
|
|
982
|
+
native: ri
|
|
984
983
|
}
|
|
985
|
-
},
|
|
984
|
+
}, oi = {
|
|
986
985
|
info: {
|
|
987
986
|
key: "okhttp",
|
|
988
987
|
title: "OkHttp",
|
|
@@ -999,16 +998,16 @@ var Ha = {
|
|
|
999
998
|
i(`.addHeader("${p}", "${ce(o[p])}")`, 1);
|
|
1000
999
|
}), i(".build()", 1), n(), i("val response = client.newCall(request).execute()"), a();
|
|
1001
1000
|
}
|
|
1002
|
-
},
|
|
1001
|
+
}, ai = {
|
|
1003
1002
|
info: {
|
|
1004
1003
|
key: "kotlin",
|
|
1005
1004
|
title: "Kotlin",
|
|
1006
1005
|
default: "okhttp"
|
|
1007
1006
|
},
|
|
1008
1007
|
clientsById: {
|
|
1009
|
-
okhttp:
|
|
1008
|
+
okhttp: oi
|
|
1010
1009
|
}
|
|
1011
|
-
},
|
|
1010
|
+
}, ii = {
|
|
1012
1011
|
info: {
|
|
1013
1012
|
key: "axios",
|
|
1014
1013
|
title: "Axios",
|
|
@@ -1042,7 +1041,7 @@ var Ha = {
|
|
|
1042
1041
|
const p = fe(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
1043
1042
|
return i(`const options = ${p};`), n(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
|
|
1044
1043
|
}
|
|
1045
|
-
},
|
|
1044
|
+
}, si = {
|
|
1046
1045
|
info: {
|
|
1047
1046
|
key: "fetch",
|
|
1048
1047
|
title: "Fetch",
|
|
@@ -1102,7 +1101,7 @@ var Ha = {
|
|
|
1102
1101
|
});
|
|
1103
1102
|
return c(`const options = ${x};`), i(), a && p("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")');
|
|
1104
1103
|
}
|
|
1105
|
-
},
|
|
1104
|
+
}, li = {
|
|
1106
1105
|
info: {
|
|
1107
1106
|
key: "native",
|
|
1108
1107
|
title: "HTTP",
|
|
@@ -1141,7 +1140,7 @@ var Ha = {
|
|
|
1141
1140
|
}
|
|
1142
1141
|
return i("req.end();"), a();
|
|
1143
1142
|
}
|
|
1144
|
-
},
|
|
1143
|
+
}, ci = {
|
|
1145
1144
|
info: {
|
|
1146
1145
|
key: "request",
|
|
1147
1146
|
title: "Request",
|
|
@@ -1194,7 +1193,7 @@ var Ha = {
|
|
|
1194
1193
|
c(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(f)}'), '${r}');`);
|
|
1195
1194
|
}), u(), y(($) => $.replace(/'JAR'/, "jar"))), i && h("const fs = require('fs');"), c(`const options = ${fe(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("});"), p();
|
|
1196
1195
|
}
|
|
1197
|
-
},
|
|
1196
|
+
}, ui = {
|
|
1198
1197
|
info: {
|
|
1199
1198
|
key: "unirest",
|
|
1200
1199
|
title: "Unirest",
|
|
@@ -1235,7 +1234,7 @@ var Ha = {
|
|
|
1235
1234
|
}
|
|
1236
1235
|
return i && y("const fs = require('fs');"), h("req.end(function (res) {"), h("if (res.error) throw new Error(res.error);", 1), u(), h("console.log(res.body);", 1), h("});"), p();
|
|
1237
1236
|
}
|
|
1238
|
-
},
|
|
1237
|
+
}, fi = {
|
|
1239
1238
|
info: {
|
|
1240
1239
|
key: "node",
|
|
1241
1240
|
title: "Node.js",
|
|
@@ -1243,11 +1242,11 @@ var Ha = {
|
|
|
1243
1242
|
cli: "node %s"
|
|
1244
1243
|
},
|
|
1245
1244
|
clientsById: {
|
|
1246
|
-
native:
|
|
1247
|
-
request:
|
|
1248
|
-
unirest:
|
|
1249
|
-
axios:
|
|
1250
|
-
fetch:
|
|
1245
|
+
native: li,
|
|
1246
|
+
request: ci,
|
|
1247
|
+
unirest: ui,
|
|
1248
|
+
axios: ii,
|
|
1249
|
+
fetch: si
|
|
1251
1250
|
}
|
|
1252
1251
|
}, vt = (e, r, t, o) => {
|
|
1253
1252
|
const s = `${e} *${r} = `, l = mr(t, o ? s.length : void 0);
|
|
@@ -1271,7 +1270,7 @@ var Ha = {
|
|
|
1271
1270
|
default:
|
|
1272
1271
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1273
1272
|
}
|
|
1274
|
-
},
|
|
1273
|
+
}, pi = {
|
|
1275
1274
|
info: {
|
|
1276
1275
|
key: "nsurlsession",
|
|
1277
1276
|
title: "NSURLSession",
|
|
@@ -1328,16 +1327,16 @@ var Ha = {
|
|
|
1328
1327
|
2
|
|
1329
1328
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1330
1329
|
}
|
|
1331
|
-
},
|
|
1330
|
+
}, di = {
|
|
1332
1331
|
info: {
|
|
1333
1332
|
key: "objc",
|
|
1334
1333
|
title: "Objective-C",
|
|
1335
1334
|
default: "nsurlsession"
|
|
1336
1335
|
},
|
|
1337
1336
|
clientsById: {
|
|
1338
|
-
nsurlsession:
|
|
1337
|
+
nsurlsession: pi
|
|
1339
1338
|
}
|
|
1340
|
-
},
|
|
1339
|
+
}, hi = {
|
|
1341
1340
|
info: {
|
|
1342
1341
|
key: "cohttp",
|
|
1343
1342
|
title: "CoHTTP",
|
|
@@ -1363,14 +1362,14 @@ var Ha = {
|
|
|
1363
1362
|
const p = u.length ? "~headers " : "", h = t.text ? "~body " : "", y = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1364
1363
|
return a(`Client.call ${p}${h}${y} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1365
1364
|
}
|
|
1366
|
-
},
|
|
1365
|
+
}, yi = {
|
|
1367
1366
|
info: {
|
|
1368
1367
|
key: "ocaml",
|
|
1369
1368
|
title: "OCaml",
|
|
1370
1369
|
default: "cohttp"
|
|
1371
1370
|
},
|
|
1372
1371
|
clientsById: {
|
|
1373
|
-
cohttp:
|
|
1372
|
+
cohttp: hi
|
|
1374
1373
|
}
|
|
1375
1374
|
}, te = (e, r, t) => {
|
|
1376
1375
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1431,7 +1430,7 @@ ${t}]`;
|
|
|
1431
1430
|
"UNLOCK",
|
|
1432
1431
|
"UPDATE",
|
|
1433
1432
|
"VERSION_CONTROL"
|
|
1434
|
-
],
|
|
1433
|
+
], mi = {
|
|
1435
1434
|
info: {
|
|
1436
1435
|
key: "curl",
|
|
1437
1436
|
title: "cURL",
|
|
@@ -1509,7 +1508,7 @@ ${c}` });
|
|
|
1509
1508
|
return d.length && (O.push("CURLOPT_HTTPHEADER => ["), O.push(d.join(`,
|
|
1510
1509
|
${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), f(), $("curl_close($curl);"), f(), $("if ($err) {"), $(p ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !h && i && (f(), $("?>")), m();
|
|
1511
1510
|
}
|
|
1512
|
-
},
|
|
1511
|
+
}, gi = {
|
|
1513
1512
|
info: {
|
|
1514
1513
|
key: "guzzle",
|
|
1515
1514
|
title: "Guzzle",
|
|
@@ -1560,7 +1559,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1560
1559
|
return x.length && y.push(`${n.indent}${n.indent}'cookie' => '${ze(x)}',`), y.length && (p("'headers' => [", 1), p(y.join(`
|
|
1561
1560
|
`)), p("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(h()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), i(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (i(), a("?>")), c();
|
|
1562
1561
|
}
|
|
1563
|
-
},
|
|
1562
|
+
}, vi = {
|
|
1564
1563
|
info: {
|
|
1565
1564
|
key: "http1",
|
|
1566
1565
|
title: "HTTP v1",
|
|
@@ -1582,7 +1581,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1582
1581
|
}
|
|
1583
1582
|
return p("try {"), p("$response = $request->send();", 1), h(), p("echo $response->getBody();", 1), p("} catch (HttpException $ex) {"), p("echo $ex;", 1), p("}"), !c && a && (h(), p("?>")), y();
|
|
1584
1583
|
}
|
|
1585
|
-
},
|
|
1584
|
+
}, bi = {
|
|
1586
1585
|
info: {
|
|
1587
1586
|
key: "http2",
|
|
1588
1587
|
title: "HTTP v2",
|
|
@@ -1630,7 +1629,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1630
1629
|
}
|
|
1631
1630
|
return p(`$request->setRequestUrl(${te(l)});`), p(`$request->setRequestMethod(${te(t)});`), x && (p("$request->setBody($body);"), h()), Object.keys(o).length && (p(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), h()), Object.keys(r).length && (p(`$request->setHeaders(${te(r, i)});`), h()), Object.keys(s).length && (h(), p(`$client->setCookies(${te(s, i)});`), h()), p("$client->enqueue($request)->send();"), p("$response = $client->getResponse();"), h(), p("echo $response->getBody();"), !c && a && (h(), p("?>")), y();
|
|
1632
1631
|
}
|
|
1633
|
-
},
|
|
1632
|
+
}, xi = {
|
|
1634
1633
|
info: {
|
|
1635
1634
|
key: "php",
|
|
1636
1635
|
title: "PHP",
|
|
@@ -1638,10 +1637,10 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1638
1637
|
cli: "php %s"
|
|
1639
1638
|
},
|
|
1640
1639
|
clientsById: {
|
|
1641
|
-
curl:
|
|
1642
|
-
guzzle:
|
|
1643
|
-
http1:
|
|
1644
|
-
http2:
|
|
1640
|
+
curl: mi,
|
|
1641
|
+
guzzle: gi,
|
|
1642
|
+
http1: vi,
|
|
1643
|
+
http2: bi
|
|
1645
1644
|
}
|
|
1646
1645
|
}, co = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: n, postData: a, allHeaders: i }) => {
|
|
1647
1646
|
const { push: c, join: u } = new V();
|
|
@@ -1655,7 +1654,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1655
1654
|
}), h.push("-WebSession $session")), a.text && (h.push(
|
|
1656
1655
|
`-ContentType '${Me(ve(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1657
1656
|
), h.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${h.join(" ")}`.trim()), u();
|
|
1658
|
-
},
|
|
1657
|
+
}, $i = {
|
|
1659
1658
|
info: {
|
|
1660
1659
|
key: "restmethod",
|
|
1661
1660
|
title: "Invoke-RestMethod",
|
|
@@ -1664,7 +1663,7 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1664
1663
|
extname: ".ps1"
|
|
1665
1664
|
},
|
|
1666
1665
|
convert: co("Invoke-RestMethod")
|
|
1667
|
-
},
|
|
1666
|
+
}, ji = {
|
|
1668
1667
|
info: {
|
|
1669
1668
|
key: "webrequest",
|
|
1670
1669
|
title: "Invoke-WebRequest",
|
|
@@ -1673,15 +1672,15 @@ ${c}${c}`), 1), O.push("],")), $(O.join(), 1), $("]);"), f(), $("$response = cur
|
|
|
1673
1672
|
extname: ".ps1"
|
|
1674
1673
|
},
|
|
1675
1674
|
convert: co("Invoke-WebRequest")
|
|
1676
|
-
},
|
|
1675
|
+
}, wi = {
|
|
1677
1676
|
info: {
|
|
1678
1677
|
key: "powershell",
|
|
1679
1678
|
title: "Powershell",
|
|
1680
1679
|
default: "webrequest"
|
|
1681
1680
|
},
|
|
1682
1681
|
clientsById: {
|
|
1683
|
-
webrequest:
|
|
1684
|
-
restmethod:
|
|
1682
|
+
webrequest: ji,
|
|
1683
|
+
restmethod: $i
|
|
1685
1684
|
}
|
|
1686
1685
|
};
|
|
1687
1686
|
function Zr(e, r, t, o, s) {
|
|
@@ -1713,7 +1712,7 @@ var Ie = (e, r, t) => {
|
|
|
1713
1712
|
default:
|
|
1714
1713
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1715
1714
|
}
|
|
1716
|
-
},
|
|
1715
|
+
}, Si = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Oi = {
|
|
1717
1716
|
info: {
|
|
1718
1717
|
key: "requests",
|
|
1719
1718
|
title: "Requests",
|
|
@@ -1776,10 +1775,10 @@ var Ie = (e, r, t) => {
|
|
|
1776
1775
|
n(v !== f ? `"${O}": "${ce(u[O])}",` : `"${O}": "${ce(u[O])}"`, 1), v += 1;
|
|
1777
1776
|
}), n("}"), a();
|
|
1778
1777
|
}
|
|
1779
|
-
let m =
|
|
1778
|
+
let m = Si.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1780
1779
|
return x && ($ ? m += ", json=payload" : m += ", data=payload"), y && (m += ", files=files"), f > 0 && (m += ", headers=headers"), m += ")", n(m), a(), n("print(response.text)"), i();
|
|
1781
1780
|
}
|
|
1782
|
-
},
|
|
1781
|
+
}, Ti = {
|
|
1783
1782
|
info: {
|
|
1784
1783
|
key: "python",
|
|
1785
1784
|
title: "Python",
|
|
@@ -1787,9 +1786,9 @@ var Ie = (e, r, t) => {
|
|
|
1787
1786
|
cli: "python3 %s"
|
|
1788
1787
|
},
|
|
1789
1788
|
clientsById: {
|
|
1790
|
-
requests:
|
|
1789
|
+
requests: Oi
|
|
1791
1790
|
}
|
|
1792
|
-
},
|
|
1791
|
+
}, Pi = {
|
|
1793
1792
|
info: {
|
|
1794
1793
|
key: "httr",
|
|
1795
1794
|
title: "httr",
|
|
@@ -1828,16 +1827,16 @@ var Ie = (e, r, t) => {
|
|
|
1828
1827
|
const T = [v, f, $, x].filter((d) => !!d).join(", ");
|
|
1829
1828
|
return T && (O += `, ${T}`), (o.text || o.jsonObj || o.params) && (O += ", encode = encode"), O += ")", n(O), a(), n('content(response, "text")'), i();
|
|
1830
1829
|
}
|
|
1831
|
-
},
|
|
1830
|
+
}, Ci = {
|
|
1832
1831
|
info: {
|
|
1833
1832
|
key: "r",
|
|
1834
1833
|
title: "R",
|
|
1835
1834
|
default: "httr"
|
|
1836
1835
|
},
|
|
1837
1836
|
clientsById: {
|
|
1838
|
-
httr:
|
|
1837
|
+
httr: Pi
|
|
1839
1838
|
}
|
|
1840
|
-
},
|
|
1839
|
+
}, Ri = {
|
|
1841
1840
|
info: {
|
|
1842
1841
|
key: "native",
|
|
1843
1842
|
title: "net::http",
|
|
@@ -1868,16 +1867,16 @@ var Ie = (e, r, t) => {
|
|
|
1868
1867
|
l(`request["${h}"] = '${ze(s[h])}'`);
|
|
1869
1868
|
}), o.text && l(`request.body = ${JSON.stringify(o.text)}`), n(), l("response = http.request(request)"), l("puts response.read_body"), a();
|
|
1870
1869
|
}
|
|
1871
|
-
},
|
|
1870
|
+
}, qi = {
|
|
1872
1871
|
info: {
|
|
1873
1872
|
key: "ruby",
|
|
1874
1873
|
title: "Ruby",
|
|
1875
1874
|
default: "native"
|
|
1876
1875
|
},
|
|
1877
1876
|
clientsById: {
|
|
1878
|
-
native:
|
|
1877
|
+
native: Ri
|
|
1879
1878
|
}
|
|
1880
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1879
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Ni = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), ki = {
|
|
1881
1880
|
"http1.0": "0",
|
|
1882
1881
|
"url ": "",
|
|
1883
1882
|
cookie: "b",
|
|
@@ -1887,13 +1886,13 @@ var Ie = (e, r, t) => {
|
|
|
1887
1886
|
header: "H",
|
|
1888
1887
|
insecure: "k",
|
|
1889
1888
|
request: "X"
|
|
1890
|
-
},
|
|
1889
|
+
}, Ei = (e) => (r) => {
|
|
1891
1890
|
if (e) {
|
|
1892
|
-
const t =
|
|
1891
|
+
const t = ki[r];
|
|
1893
1892
|
return t ? `-${t}` : "";
|
|
1894
1893
|
}
|
|
1895
1894
|
return `--${r}`;
|
|
1896
|
-
},
|
|
1895
|
+
}, Ai = {
|
|
1897
1896
|
info: {
|
|
1898
1897
|
key: "curl",
|
|
1899
1898
|
title: "cURL",
|
|
@@ -1907,7 +1906,7 @@ var Ie = (e, r, t) => {
|
|
|
1907
1906
|
...typeof a == "string" ? { indent: a } : {},
|
|
1908
1907
|
join: a !== !1 ? ` \\
|
|
1909
1908
|
${a}` : " "
|
|
1910
|
-
}), x =
|
|
1909
|
+
}), x = Ei(i);
|
|
1911
1910
|
let $ = ue(e);
|
|
1912
1911
|
if (h(`curl ${x("request")} ${r}`), u && ($ = unescape($), h(x("globoff"))), h(`${x("url ")}${$}`), t === "HTTP/1.0" && h(x("http1.0")), ve(s, "accept-encoding") && h("--compressed"), l.mimeType === "multipart/form-data") {
|
|
1913
1912
|
const m = pe(o, "content-type");
|
|
@@ -1939,7 +1938,7 @@ ${a}` : " "
|
|
|
1939
1938
|
if (!l.text)
|
|
1940
1939
|
break;
|
|
1941
1940
|
let m = !1;
|
|
1942
|
-
if (
|
|
1941
|
+
if (Ea(l.mimeType) && l.text.length > 20)
|
|
1943
1942
|
try {
|
|
1944
1943
|
const v = JSON.parse(l.text);
|
|
1945
1944
|
m = !0, l.text.indexOf("'") > 0 ? h(
|
|
@@ -1961,7 +1960,7 @@ ${JSON.stringify(v, null, p)}
|
|
|
1961
1960
|
}
|
|
1962
1961
|
return y();
|
|
1963
1962
|
}
|
|
1964
|
-
},
|
|
1963
|
+
}, Ii = {
|
|
1965
1964
|
info: {
|
|
1966
1965
|
key: "httpie",
|
|
1967
1966
|
title: "HTTPie",
|
|
@@ -2010,7 +2009,7 @@ ${a.indent}` : " "
|
|
|
2010
2009
|
}
|
|
2011
2010
|
return c();
|
|
2012
2011
|
}
|
|
2013
|
-
},
|
|
2012
|
+
}, Li = {
|
|
2014
2013
|
info: {
|
|
2015
2014
|
key: "wget",
|
|
2016
2015
|
title: "Wget",
|
|
@@ -2032,9 +2031,9 @@ ${l.indent}` : " "
|
|
|
2032
2031
|
return l.verbose ? n(`wget ${l.short ? "-v" : "--verbose"}`) : n(`wget ${l.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((i) => {
|
|
2033
2032
|
const c = `${i}: ${t[i]}`;
|
|
2034
2033
|
n(`--header ${ue(c)}`);
|
|
2035
|
-
}), r.text && n(`--body-data ${
|
|
2034
|
+
}), r.text && n(`--body-data ${Ni(ue(r.text))}`), n(l.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2036
2035
|
}
|
|
2037
|
-
},
|
|
2036
|
+
}, Ui = {
|
|
2038
2037
|
info: {
|
|
2039
2038
|
key: "shell",
|
|
2040
2039
|
title: "Shell",
|
|
@@ -2042,9 +2041,9 @@ ${l.indent}` : " "
|
|
|
2042
2041
|
cli: "%s"
|
|
2043
2042
|
},
|
|
2044
2043
|
clientsById: {
|
|
2045
|
-
curl:
|
|
2046
|
-
httpie:
|
|
2047
|
-
wget:
|
|
2044
|
+
curl: Ai,
|
|
2045
|
+
httpie: Ii,
|
|
2046
|
+
wget: Li
|
|
2048
2047
|
}
|
|
2049
2048
|
}, en = (e, r) => r.repeat(e), tn = (e, r, t, o) => {
|
|
2050
2049
|
const s = en(o, t), l = en(o - 1, t), n = r ? `,
|
|
@@ -2079,7 +2078,7 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2079
2078
|
default:
|
|
2080
2079
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2081
2080
|
}
|
|
2082
|
-
},
|
|
2081
|
+
}, Fi = {
|
|
2083
2082
|
info: {
|
|
2084
2083
|
key: "urlsession",
|
|
2085
2084
|
title: "URLSession",
|
|
@@ -2130,39 +2129,39 @@ ${l}]` : `[${e.join(n)}]`;
|
|
|
2130
2129
|
}
|
|
2131
2130
|
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`), u && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2132
2131
|
}
|
|
2133
|
-
},
|
|
2132
|
+
}, _i = {
|
|
2134
2133
|
info: {
|
|
2135
2134
|
key: "swift",
|
|
2136
2135
|
title: "Swift",
|
|
2137
2136
|
default: "urlsession"
|
|
2138
2137
|
},
|
|
2139
2138
|
clientsById: {
|
|
2140
|
-
urlsession:
|
|
2139
|
+
urlsession: Fi
|
|
2141
2140
|
}
|
|
2142
|
-
},
|
|
2143
|
-
c:
|
|
2144
|
-
clojure:
|
|
2145
|
-
csharp:
|
|
2146
|
-
go:
|
|
2147
|
-
http:
|
|
2148
|
-
java:
|
|
2149
|
-
javascript:
|
|
2150
|
-
json:
|
|
2151
|
-
kotlin:
|
|
2152
|
-
node:
|
|
2153
|
-
objc:
|
|
2154
|
-
ocaml:
|
|
2155
|
-
php:
|
|
2156
|
-
powershell:
|
|
2157
|
-
python:
|
|
2158
|
-
r:
|
|
2159
|
-
ruby:
|
|
2160
|
-
shell:
|
|
2161
|
-
swift:
|
|
2141
|
+
}, Bi = {
|
|
2142
|
+
c: ka,
|
|
2143
|
+
clojure: La,
|
|
2144
|
+
csharp: Ha,
|
|
2145
|
+
go: za,
|
|
2146
|
+
http: Wa,
|
|
2147
|
+
java: Ka,
|
|
2148
|
+
javascript: ti,
|
|
2149
|
+
json: ni,
|
|
2150
|
+
kotlin: ai,
|
|
2151
|
+
node: fi,
|
|
2152
|
+
objc: di,
|
|
2153
|
+
ocaml: yi,
|
|
2154
|
+
php: xi,
|
|
2155
|
+
powershell: wi,
|
|
2156
|
+
python: Ti,
|
|
2157
|
+
r: Ci,
|
|
2158
|
+
ruby: qi,
|
|
2159
|
+
shell: Ui,
|
|
2160
|
+
swift: _i
|
|
2162
2161
|
}, Pe = {}, _e = { exports: {} };
|
|
2163
2162
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2164
|
-
var
|
|
2165
|
-
function
|
|
2163
|
+
var Hi = _e.exports, nn;
|
|
2164
|
+
function Mi() {
|
|
2166
2165
|
return nn || (nn = 1, function(e, r) {
|
|
2167
2166
|
(function(t) {
|
|
2168
2167
|
var o = r && !r.nodeType && r, s = !e.nodeType && e, l = typeof Ze == "object" && Ze;
|
|
@@ -2279,7 +2278,7 @@ function zi() {
|
|
|
2279
2278
|
n.hasOwnProperty(b) && (o[b] = n[b]);
|
|
2280
2279
|
else
|
|
2281
2280
|
t.punycode = n;
|
|
2282
|
-
})(
|
|
2281
|
+
})(Hi);
|
|
2283
2282
|
}(_e, _e.exports)), _e.exports;
|
|
2284
2283
|
}
|
|
2285
2284
|
var bt, on;
|
|
@@ -2287,19 +2286,19 @@ function uo() {
|
|
|
2287
2286
|
return on || (on = 1, bt = Object), bt;
|
|
2288
2287
|
}
|
|
2289
2288
|
var xt, an;
|
|
2290
|
-
function
|
|
2289
|
+
function zi() {
|
|
2291
2290
|
return an || (an = 1, xt = Error), xt;
|
|
2292
2291
|
}
|
|
2293
2292
|
var $t, sn;
|
|
2294
|
-
function
|
|
2293
|
+
function Gi() {
|
|
2295
2294
|
return sn || (sn = 1, $t = EvalError), $t;
|
|
2296
2295
|
}
|
|
2297
2296
|
var jt, ln;
|
|
2298
|
-
function
|
|
2297
|
+
function Wi() {
|
|
2299
2298
|
return ln || (ln = 1, jt = RangeError), jt;
|
|
2300
2299
|
}
|
|
2301
2300
|
var wt, cn;
|
|
2302
|
-
function
|
|
2301
|
+
function Ji() {
|
|
2303
2302
|
return cn || (cn = 1, wt = ReferenceError), wt;
|
|
2304
2303
|
}
|
|
2305
2304
|
var St, un;
|
|
@@ -2311,57 +2310,57 @@ function We() {
|
|
|
2311
2310
|
return fn || (fn = 1, Ot = TypeError), Ot;
|
|
2312
2311
|
}
|
|
2313
2312
|
var Tt, pn;
|
|
2314
|
-
function
|
|
2313
|
+
function Vi() {
|
|
2315
2314
|
return pn || (pn = 1, Tt = URIError), Tt;
|
|
2316
2315
|
}
|
|
2317
2316
|
var Pt, dn;
|
|
2318
|
-
function
|
|
2317
|
+
function Di() {
|
|
2319
2318
|
return dn || (dn = 1, Pt = Math.abs), Pt;
|
|
2320
2319
|
}
|
|
2321
2320
|
var Ct, hn;
|
|
2322
|
-
function
|
|
2321
|
+
function Qi() {
|
|
2323
2322
|
return hn || (hn = 1, Ct = Math.floor), Ct;
|
|
2324
2323
|
}
|
|
2325
2324
|
var Rt, yn;
|
|
2326
|
-
function
|
|
2325
|
+
function Ki() {
|
|
2327
2326
|
return yn || (yn = 1, Rt = Math.max), Rt;
|
|
2328
2327
|
}
|
|
2329
2328
|
var qt, mn;
|
|
2330
|
-
function
|
|
2329
|
+
function Yi() {
|
|
2331
2330
|
return mn || (mn = 1, qt = Math.min), qt;
|
|
2332
2331
|
}
|
|
2333
2332
|
var Nt, gn;
|
|
2334
|
-
function
|
|
2333
|
+
function Xi() {
|
|
2335
2334
|
return gn || (gn = 1, Nt = Math.pow), Nt;
|
|
2336
2335
|
}
|
|
2337
2336
|
var kt, vn;
|
|
2338
|
-
function
|
|
2337
|
+
function Zi() {
|
|
2339
2338
|
return vn || (vn = 1, kt = Math.round), kt;
|
|
2340
2339
|
}
|
|
2341
2340
|
var Et, bn;
|
|
2342
|
-
function
|
|
2341
|
+
function es() {
|
|
2343
2342
|
return bn || (bn = 1, Et = Number.isNaN || function(r) {
|
|
2344
2343
|
return r !== r;
|
|
2345
2344
|
}), Et;
|
|
2346
2345
|
}
|
|
2347
2346
|
var At, xn;
|
|
2348
|
-
function
|
|
2347
|
+
function ts() {
|
|
2349
2348
|
if (xn) return At;
|
|
2350
2349
|
xn = 1;
|
|
2351
|
-
var e = /* @__PURE__ */
|
|
2350
|
+
var e = /* @__PURE__ */ es();
|
|
2352
2351
|
return At = function(t) {
|
|
2353
2352
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2354
2353
|
}, At;
|
|
2355
2354
|
}
|
|
2356
2355
|
var It, $n;
|
|
2357
|
-
function
|
|
2356
|
+
function rs() {
|
|
2358
2357
|
return $n || ($n = 1, It = Object.getOwnPropertyDescriptor), It;
|
|
2359
2358
|
}
|
|
2360
2359
|
var Lt, jn;
|
|
2361
2360
|
function ot() {
|
|
2362
2361
|
if (jn) return Lt;
|
|
2363
2362
|
jn = 1;
|
|
2364
|
-
var e = /* @__PURE__ */
|
|
2363
|
+
var e = /* @__PURE__ */ rs();
|
|
2365
2364
|
if (e)
|
|
2366
2365
|
try {
|
|
2367
2366
|
e([], "length");
|
|
@@ -2384,7 +2383,7 @@ function at() {
|
|
|
2384
2383
|
return Ut = e, Ut;
|
|
2385
2384
|
}
|
|
2386
2385
|
var Ft, Sn;
|
|
2387
|
-
function
|
|
2386
|
+
function ns() {
|
|
2388
2387
|
return Sn || (Sn = 1, Ft = function() {
|
|
2389
2388
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2390
2389
|
return !1;
|
|
@@ -2414,10 +2413,10 @@ function os() {
|
|
|
2414
2413
|
}), Ft;
|
|
2415
2414
|
}
|
|
2416
2415
|
var _t, On;
|
|
2417
|
-
function
|
|
2416
|
+
function os() {
|
|
2418
2417
|
if (On) return _t;
|
|
2419
2418
|
On = 1;
|
|
2420
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2419
|
+
var e = typeof Symbol < "u" && Symbol, r = ns();
|
|
2421
2420
|
return _t = function() {
|
|
2422
2421
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2423
2422
|
}, _t;
|
|
@@ -2434,7 +2433,7 @@ function ho() {
|
|
|
2434
2433
|
return Ht = e.getPrototypeOf || null, Ht;
|
|
2435
2434
|
}
|
|
2436
2435
|
var Mt, Cn;
|
|
2437
|
-
function
|
|
2436
|
+
function as() {
|
|
2438
2437
|
if (Cn) return Mt;
|
|
2439
2438
|
Cn = 1;
|
|
2440
2439
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
|
|
@@ -2482,7 +2481,7 @@ var zt, Rn;
|
|
|
2482
2481
|
function Je() {
|
|
2483
2482
|
if (Rn) return zt;
|
|
2484
2483
|
Rn = 1;
|
|
2485
|
-
var e =
|
|
2484
|
+
var e = as();
|
|
2486
2485
|
return zt = Function.prototype.bind || e, zt;
|
|
2487
2486
|
}
|
|
2488
2487
|
var Gt, qn;
|
|
@@ -2494,14 +2493,14 @@ function Or() {
|
|
|
2494
2493
|
return Nn || (Nn = 1, Wt = Function.prototype.apply), Wt;
|
|
2495
2494
|
}
|
|
2496
2495
|
var Jt, kn;
|
|
2497
|
-
function
|
|
2496
|
+
function is() {
|
|
2498
2497
|
return kn || (kn = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
|
|
2499
2498
|
}
|
|
2500
2499
|
var Vt, En;
|
|
2501
2500
|
function yo() {
|
|
2502
2501
|
if (En) return Vt;
|
|
2503
2502
|
En = 1;
|
|
2504
|
-
var e = Je(), r = Or(), t = Sr(), o =
|
|
2503
|
+
var e = Je(), r = Or(), t = Sr(), o = is();
|
|
2505
2504
|
return Vt = o || e.call(t, r), Vt;
|
|
2506
2505
|
}
|
|
2507
2506
|
var Dt, An;
|
|
@@ -2516,7 +2515,7 @@ function mo() {
|
|
|
2516
2515
|
}, Dt;
|
|
2517
2516
|
}
|
|
2518
2517
|
var Qt, In;
|
|
2519
|
-
function
|
|
2518
|
+
function ss() {
|
|
2520
2519
|
if (In) return Qt;
|
|
2521
2520
|
In = 1;
|
|
2522
2521
|
var e = mo(), r = /* @__PURE__ */ ot(), t;
|
|
@@ -2540,10 +2539,10 @@ function ls() {
|
|
|
2540
2539
|
) : !1, Qt;
|
|
2541
2540
|
}
|
|
2542
2541
|
var Kt, Ln;
|
|
2543
|
-
function
|
|
2542
|
+
function ls() {
|
|
2544
2543
|
if (Ln) return Kt;
|
|
2545
2544
|
Ln = 1;
|
|
2546
|
-
var e = po(), r = ho(), t = /* @__PURE__ */
|
|
2545
|
+
var e = po(), r = ho(), t = /* @__PURE__ */ ss();
|
|
2547
2546
|
return Kt = e ? function(s) {
|
|
2548
2547
|
return e(s);
|
|
2549
2548
|
} : r ? function(s) {
|
|
@@ -2555,7 +2554,7 @@ function cs() {
|
|
|
2555
2554
|
} : null, Kt;
|
|
2556
2555
|
}
|
|
2557
2556
|
var Yt, Un;
|
|
2558
|
-
function
|
|
2557
|
+
function cs() {
|
|
2559
2558
|
if (Un) return Yt;
|
|
2560
2559
|
Un = 1;
|
|
2561
2560
|
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
|
|
@@ -2565,7 +2564,7 @@ var Xt, Fn;
|
|
|
2565
2564
|
function Tr() {
|
|
2566
2565
|
if (Fn) return Xt;
|
|
2567
2566
|
Fn = 1;
|
|
2568
|
-
var e, r = /* @__PURE__ */ uo(), t = /* @__PURE__ */
|
|
2567
|
+
var e, r = /* @__PURE__ */ uo(), t = /* @__PURE__ */ zi(), o = /* @__PURE__ */ Gi(), s = /* @__PURE__ */ Wi(), l = /* @__PURE__ */ Ji(), n = /* @__PURE__ */ fo(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Vi(), c = /* @__PURE__ */ Di(), u = /* @__PURE__ */ Qi(), p = /* @__PURE__ */ Ki(), h = /* @__PURE__ */ Yi(), y = /* @__PURE__ */ Xi(), x = /* @__PURE__ */ Zi(), $ = /* @__PURE__ */ ts(), f = Function, m = function(J) {
|
|
2569
2568
|
try {
|
|
2570
2569
|
return f('"use strict"; return (' + J + ").constructor;")();
|
|
2571
2570
|
} catch {
|
|
@@ -2582,7 +2581,7 @@ function Tr() {
|
|
|
2582
2581
|
return T;
|
|
2583
2582
|
}
|
|
2584
2583
|
}
|
|
2585
|
-
}() : T, S =
|
|
2584
|
+
}() : T, S = os()(), b = ls(), q = ho(), L = po(), E = Or(), B = Sr(), P = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
|
|
2586
2585
|
__proto__: null,
|
|
2587
2586
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2588
2587
|
"%Array%": Array,
|
|
@@ -2741,7 +2740,7 @@ function Tr() {
|
|
|
2741
2740
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2742
2741
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2743
2742
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2744
|
-
}, k = Je(), re = /* @__PURE__ */
|
|
2743
|
+
}, k = Je(), re = /* @__PURE__ */ cs(), R = k.call(B, Array.prototype.concat), N = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), I = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
|
|
2745
2744
|
var F = C(A, 0, 1), _ = C(A, -1);
|
|
2746
2745
|
if (F === "%" && _ !== "%")
|
|
2747
2746
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -2798,7 +2797,7 @@ function Tr() {
|
|
|
2798
2797
|
}, Xt;
|
|
2799
2798
|
}
|
|
2800
2799
|
var Zt = { exports: {} }, er, _n;
|
|
2801
|
-
function
|
|
2800
|
+
function us() {
|
|
2802
2801
|
if (_n) return er;
|
|
2803
2802
|
_n = 1;
|
|
2804
2803
|
var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ fo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ ot();
|
|
@@ -2830,7 +2829,7 @@ function fs() {
|
|
|
2830
2829
|
}, er;
|
|
2831
2830
|
}
|
|
2832
2831
|
var tr, Bn;
|
|
2833
|
-
function
|
|
2832
|
+
function fs() {
|
|
2834
2833
|
if (Bn) return tr;
|
|
2835
2834
|
Bn = 1;
|
|
2836
2835
|
var e = /* @__PURE__ */ at(), r = function() {
|
|
@@ -2847,10 +2846,10 @@ function ps() {
|
|
|
2847
2846
|
}, tr = r, tr;
|
|
2848
2847
|
}
|
|
2849
2848
|
var rr, Hn;
|
|
2850
|
-
function
|
|
2849
|
+
function ps() {
|
|
2851
2850
|
if (Hn) return rr;
|
|
2852
2851
|
Hn = 1;
|
|
2853
|
-
var e = /* @__PURE__ */ Tr(), r = /* @__PURE__ */
|
|
2852
|
+
var e = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ us(), t = /* @__PURE__ */ fs()(), o = /* @__PURE__ */ ot(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
|
|
2854
2853
|
return rr = function(a, i) {
|
|
2855
2854
|
if (typeof a != "function")
|
|
2856
2855
|
throw new s("`fn` is not a function");
|
|
@@ -2877,7 +2876,7 @@ function ds() {
|
|
|
2877
2876
|
}, rr;
|
|
2878
2877
|
}
|
|
2879
2878
|
var nr, Mn;
|
|
2880
|
-
function
|
|
2879
|
+
function ds() {
|
|
2881
2880
|
if (Mn) return nr;
|
|
2882
2881
|
Mn = 1;
|
|
2883
2882
|
var e = Je(), r = Or(), t = yo();
|
|
@@ -2886,9 +2885,9 @@ function hs() {
|
|
|
2886
2885
|
}, nr;
|
|
2887
2886
|
}
|
|
2888
2887
|
var zn;
|
|
2889
|
-
function
|
|
2888
|
+
function hs() {
|
|
2890
2889
|
return zn || (zn = 1, function(e) {
|
|
2891
|
-
var r = /* @__PURE__ */
|
|
2890
|
+
var r = /* @__PURE__ */ ps(), t = /* @__PURE__ */ at(), o = mo(), s = ds();
|
|
2892
2891
|
e.exports = function(n) {
|
|
2893
2892
|
var a = o(arguments), i = n.length - (arguments.length - 1);
|
|
2894
2893
|
return r(
|
|
@@ -2900,18 +2899,21 @@ function ys() {
|
|
|
2900
2899
|
}(Zt)), Zt.exports;
|
|
2901
2900
|
}
|
|
2902
2901
|
var or, Gn;
|
|
2903
|
-
function
|
|
2902
|
+
function ys() {
|
|
2904
2903
|
if (Gn) return or;
|
|
2905
2904
|
Gn = 1;
|
|
2906
|
-
var e = /* @__PURE__ */ Tr(), r =
|
|
2905
|
+
var e = /* @__PURE__ */ Tr(), r = hs(), t = r(e("String.prototype.indexOf"));
|
|
2907
2906
|
return or = function(s, l) {
|
|
2908
2907
|
var n = e(s, !!l);
|
|
2909
2908
|
return typeof n == "function" && t(s, ".prototype.") > -1 ? r(n) : n;
|
|
2910
2909
|
}, or;
|
|
2911
2910
|
}
|
|
2912
|
-
const gs = /* @__PURE__ */
|
|
2911
|
+
const ms = {}, gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2912
|
+
__proto__: null,
|
|
2913
|
+
default: ms
|
|
2914
|
+
}, Symbol.toStringTag, { value: "Module" })), vs = /* @__PURE__ */ ma(gs);
|
|
2913
2915
|
var ar, Wn;
|
|
2914
|
-
function
|
|
2916
|
+
function bs() {
|
|
2915
2917
|
if (Wn) return ar;
|
|
2916
2918
|
Wn = 1;
|
|
2917
2919
|
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, p = u ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, y = h ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, f = Function.prototype.toString, m = String.prototype.match, v = String.prototype.slice, O = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, S = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
|
|
@@ -2930,7 +2932,7 @@ function vs() {
|
|
|
2930
2932
|
}
|
|
2931
2933
|
return O.call(w, X, "$&_");
|
|
2932
2934
|
}
|
|
2933
|
-
var re =
|
|
2935
|
+
var re = vs, R = re.custom, N = F(R) ? R : null;
|
|
2934
2936
|
ar = function j(w, X, ee, ie) {
|
|
2935
2937
|
var M = X || {};
|
|
2936
2938
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
@@ -3269,10 +3271,10 @@ function vs() {
|
|
|
3269
3271
|
return ar;
|
|
3270
3272
|
}
|
|
3271
3273
|
var ir, Jn;
|
|
3272
|
-
function
|
|
3274
|
+
function xs() {
|
|
3273
3275
|
if (Jn) return ir;
|
|
3274
3276
|
Jn = 1;
|
|
3275
|
-
var e = /* @__PURE__ */ Tr(), r =
|
|
3277
|
+
var e = /* @__PURE__ */ Tr(), r = ys(), t = /* @__PURE__ */ bs(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), i = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), u = r("Map.prototype.set", !0), p = r("Map.prototype.has", !0), h = function(f, m) {
|
|
3276
3278
|
for (var v = f, O; (O = v.next) !== null; v = O)
|
|
3277
3279
|
if (O.key === m)
|
|
3278
3280
|
return v.next = O.next, O.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -3474,10 +3476,10 @@ function go() {
|
|
|
3474
3476
|
}, lr;
|
|
3475
3477
|
}
|
|
3476
3478
|
var cr, Qn;
|
|
3477
|
-
function
|
|
3479
|
+
function $s() {
|
|
3478
3480
|
if (Qn) return cr;
|
|
3479
3481
|
Qn = 1;
|
|
3480
|
-
var e =
|
|
3482
|
+
var e = xs(), r = /* @__PURE__ */ go(), t = /* @__PURE__ */ Pr(), o = Object.prototype.hasOwnProperty, s = {
|
|
3481
3483
|
brackets: function(f) {
|
|
3482
3484
|
return f + "[]";
|
|
3483
3485
|
},
|
|
@@ -3663,7 +3665,7 @@ function xs() {
|
|
|
3663
3665
|
}, cr;
|
|
3664
3666
|
}
|
|
3665
3667
|
var ur, Kn;
|
|
3666
|
-
function
|
|
3668
|
+
function js() {
|
|
3667
3669
|
if (Kn) return ur;
|
|
3668
3670
|
Kn = 1;
|
|
3669
3671
|
var e = /* @__PURE__ */ go(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
@@ -3800,7 +3802,7 @@ var fr, Yn;
|
|
|
3800
3802
|
function vo() {
|
|
3801
3803
|
if (Yn) return fr;
|
|
3802
3804
|
Yn = 1;
|
|
3803
|
-
var e = /* @__PURE__ */
|
|
3805
|
+
var e = /* @__PURE__ */ $s(), r = /* @__PURE__ */ js(), t = /* @__PURE__ */ Pr();
|
|
3804
3806
|
return fr = {
|
|
3805
3807
|
formats: t,
|
|
3806
3808
|
parse: r,
|
|
@@ -3808,10 +3810,10 @@ function vo() {
|
|
|
3808
3810
|
}, fr;
|
|
3809
3811
|
}
|
|
3810
3812
|
var Xn;
|
|
3811
|
-
function
|
|
3813
|
+
function ws() {
|
|
3812
3814
|
if (Xn) return Pe;
|
|
3813
3815
|
Xn = 1;
|
|
3814
|
-
var e =
|
|
3816
|
+
var e = Mi();
|
|
3815
3817
|
function r() {
|
|
3816
3818
|
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;
|
|
3817
3819
|
}
|
|
@@ -4030,12 +4032,12 @@ function js() {
|
|
|
4030
4032
|
S && (S = S[0], S !== ":" && (this.port = S.substr(1)), d = d.substr(0, d.length - S.length)), d && (this.hostname = d);
|
|
4031
4033
|
}, Pe.parse = m, Pe.resolve = O, Pe.resolveObject = T, Pe.format = v, Pe.Url = r, Pe;
|
|
4032
4034
|
}
|
|
4033
|
-
var pr =
|
|
4035
|
+
var pr = ws(), dr = /* @__PURE__ */ vo(), Ss = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Os = class {
|
|
4034
4036
|
constructor(e, r = {}) {
|
|
4035
4037
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4036
4038
|
harIsAlreadyEncoded: !1,
|
|
4037
4039
|
...r
|
|
4038
|
-
}, this.requests = [],
|
|
4040
|
+
}, this.requests = [], Ss(e) ? this.entries = e.log.entries : this.entries = [
|
|
4039
4041
|
{
|
|
4040
4042
|
request: e
|
|
4041
4043
|
}
|
|
@@ -4160,14 +4162,14 @@ var pr = js(), dr = /* @__PURE__ */ vo(), ws = (e) => typeof e == "object" && "l
|
|
|
4160
4162
|
}
|
|
4161
4163
|
convert(e, r, t) {
|
|
4162
4164
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4163
|
-
const o =
|
|
4165
|
+
const o = Bi[e];
|
|
4164
4166
|
if (!o)
|
|
4165
4167
|
return !1;
|
|
4166
4168
|
const { convert: s } = o.clientsById[r || o.info.default];
|
|
4167
4169
|
return this.requests.map((n) => s(n, t));
|
|
4168
4170
|
}
|
|
4169
4171
|
};
|
|
4170
|
-
const
|
|
4172
|
+
const Ts = ({
|
|
4171
4173
|
rootMargin: e = "0px",
|
|
4172
4174
|
threshold: r
|
|
4173
4175
|
} = {}) => {
|
|
@@ -4182,12 +4184,12 @@ const Os = ({
|
|
|
4182
4184
|
if (n)
|
|
4183
4185
|
return l.observe(n), () => l.unobserve(n);
|
|
4184
4186
|
}, [e, r]), [s, t];
|
|
4185
|
-
},
|
|
4187
|
+
}, Ps = typeof window < "u" ? ea : $r, bo = ({
|
|
4186
4188
|
children: e,
|
|
4187
4189
|
maxHeight: r = 250
|
|
4188
4190
|
}) => {
|
|
4189
4191
|
const t = xr(null), [o, s] = ge(!1), [l, n] = ge(!1);
|
|
4190
|
-
return
|
|
4192
|
+
return Ps(() => {
|
|
4191
4193
|
const a = t.current;
|
|
4192
4194
|
if (!a) return;
|
|
4193
4195
|
s(a.scrollHeight > r);
|
|
@@ -4241,7 +4243,7 @@ const Os = ({
|
|
|
4241
4243
|
]
|
|
4242
4244
|
}
|
|
4243
4245
|
);
|
|
4244
|
-
},
|
|
4246
|
+
}, Cs = ({
|
|
4245
4247
|
server: e,
|
|
4246
4248
|
servers: r,
|
|
4247
4249
|
operation: t,
|
|
@@ -4332,7 +4334,7 @@ const Os = ({
|
|
|
4332
4334
|
default:
|
|
4333
4335
|
return {};
|
|
4334
4336
|
}
|
|
4335
|
-
},
|
|
4337
|
+
}, Rs = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), qs = (e) => e ? {
|
|
4336
4338
|
"application/json": "json",
|
|
4337
4339
|
"application/xml": "xml",
|
|
4338
4340
|
"application/x-yaml": "yaml",
|
|
@@ -4354,7 +4356,7 @@ const Os = ({
|
|
|
4354
4356
|
$r(() => {
|
|
4355
4357
|
u && (t == null || t(u));
|
|
4356
4358
|
}, [u, t]);
|
|
4357
|
-
const p =
|
|
4359
|
+
const p = Rs(u), h = qs(a == null ? void 0 : a.mediaType);
|
|
4358
4360
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
4359
4361
|
/* @__PURE__ */ g.jsxs(xo, { className: "p-0", children: [
|
|
4360
4362
|
c != null && c.externalValue ? /* @__PURE__ */ g.jsx("div", { className: "p-2", children: /* @__PURE__ */ g.jsx(
|
|
@@ -4408,19 +4410,19 @@ const Os = ({
|
|
|
4408
4410
|
] })
|
|
4409
4411
|
] })
|
|
4410
4412
|
] });
|
|
4411
|
-
},
|
|
4413
|
+
}, Ns = ({
|
|
4412
4414
|
content: e,
|
|
4413
4415
|
onExampleChange: r
|
|
4414
4416
|
}) => e.length === 0 ? null : /* @__PURE__ */ g.jsxs(Cr, { children: [
|
|
4415
4417
|
/* @__PURE__ */ g.jsx(Rr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ g.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4416
4418
|
/* @__PURE__ */ g.jsx(jo, { content: e, onExampleChange: r })
|
|
4417
|
-
] }),
|
|
4419
|
+
] }), ks = ({ response: e }) => /* @__PURE__ */ g.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ g.jsx(
|
|
4418
4420
|
jo,
|
|
4419
4421
|
{
|
|
4420
4422
|
content: e.content ?? [],
|
|
4421
4423
|
description: e.description ?? void 0
|
|
4422
4424
|
}
|
|
4423
|
-
) }),
|
|
4425
|
+
) }), Es = ({
|
|
4424
4426
|
responses: e,
|
|
4425
4427
|
selectedResponse: r,
|
|
4426
4428
|
onSelectResponse: t
|
|
@@ -4449,11 +4451,11 @@ const Os = ({
|
|
|
4449
4451
|
s.statusCode
|
|
4450
4452
|
)) })
|
|
4451
4453
|
] }),
|
|
4452
|
-
e.map((s) => /* @__PURE__ */ g.jsx(
|
|
4454
|
+
e.map((s) => /* @__PURE__ */ g.jsx(ks, { response: s }, s.statusCode))
|
|
4453
4455
|
]
|
|
4454
4456
|
}
|
|
4455
4457
|
) });
|
|
4456
|
-
},
|
|
4458
|
+
}, As = (e, r) => {
|
|
4457
4459
|
let t;
|
|
4458
4460
|
switch (r) {
|
|
4459
4461
|
case "shell":
|
|
@@ -4494,7 +4496,7 @@ const Os = ({
|
|
|
4494
4496
|
break;
|
|
4495
4497
|
}
|
|
4496
4498
|
return t ? t[0] : "";
|
|
4497
|
-
},
|
|
4499
|
+
}, Is = rt(
|
|
4498
4500
|
/* GraphQL */
|
|
4499
4501
|
`
|
|
4500
4502
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4506,7 +4508,7 @@ const Os = ({
|
|
|
4506
4508
|
}
|
|
4507
4509
|
}
|
|
4508
4510
|
`
|
|
4509
|
-
),
|
|
4511
|
+
), Ls = [
|
|
4510
4512
|
{ value: "shell", label: "cURL" },
|
|
4511
4513
|
{ value: "js", label: "JavaScript" },
|
|
4512
4514
|
{ value: "python", label: "Python" },
|
|
@@ -4518,13 +4520,13 @@ const Os = ({
|
|
|
4518
4520
|
{ value: "php", label: "PHP" },
|
|
4519
4521
|
{ value: "ruby", label: "Ruby" },
|
|
4520
4522
|
{ value: "swift", label: "Swift" }
|
|
4521
|
-
],
|
|
4523
|
+
], Us = ({
|
|
4522
4524
|
operation: e,
|
|
4523
4525
|
selectedResponse: r,
|
|
4524
4526
|
onSelectResponse: t
|
|
4525
4527
|
}) => {
|
|
4526
4528
|
var d;
|
|
4527
|
-
const { input: o, type: s, options: l } = jr(), n = wr(
|
|
4529
|
+
const { input: o, type: s, options: l } = jr(), n = wr(Is, { input: o, type: s }), a = vr(n), i = oo(e.method), [c, u] = No(), [, p] = eo(), [h, y] = ge(), x = c.get("lang") ?? (l == null ? void 0 : l.examplesDefaultLanguage) ?? "shell", $ = (d = e.requestBody) == null ? void 0 : d.content, f = /* @__PURE__ */ g.jsx(
|
|
4528
4530
|
ia,
|
|
4529
4531
|
{
|
|
4530
4532
|
path: e.path,
|
|
@@ -4540,7 +4542,7 @@ const Os = ({
|
|
|
4540
4542
|
}
|
|
4541
4543
|
), { selectedServer: m } = br(a.data.schema.servers), v = to(() => {
|
|
4542
4544
|
var q;
|
|
4543
|
-
const S = h ?? ((q = $ == null ? void 0 : $[0]) != null && q.schema ? He($[0].schema) : void 0), b = new
|
|
4545
|
+
const S = h ?? ((q = $ == null ? void 0 : $[0]) != null && q.schema ? He($[0].schema) : void 0), b = new Os({
|
|
4544
4546
|
method: e.method.toLocaleUpperCase(),
|
|
4545
4547
|
url: m + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4546
4548
|
postData: S ? {
|
|
@@ -4554,7 +4556,7 @@ const Os = ({
|
|
|
4554
4556
|
headersSize: 0,
|
|
4555
4557
|
bodySize: 0
|
|
4556
4558
|
});
|
|
4557
|
-
return
|
|
4559
|
+
return As(b, x);
|
|
4558
4560
|
}, [
|
|
4559
4561
|
h,
|
|
4560
4562
|
$,
|
|
@@ -4563,7 +4565,7 @@ const Os = ({
|
|
|
4563
4565
|
m,
|
|
4564
4566
|
a.data.schema.url,
|
|
4565
4567
|
x
|
|
4566
|
-
]), [O, T] =
|
|
4568
|
+
]), [O, T] = Ts({ rootMargin: "200px 0px 200px 0px" });
|
|
4567
4569
|
return /* @__PURE__ */ g.jsxs(
|
|
4568
4570
|
"aside",
|
|
4569
4571
|
{
|
|
@@ -4578,7 +4580,7 @@ const Os = ({
|
|
|
4578
4580
|
f
|
|
4579
4581
|
] }),
|
|
4580
4582
|
T && /* @__PURE__ */ g.jsx(
|
|
4581
|
-
|
|
4583
|
+
Cs,
|
|
4582
4584
|
{
|
|
4583
4585
|
server: m,
|
|
4584
4586
|
servers: a.data.schema.servers.map((S) => S.url),
|
|
@@ -4609,21 +4611,21 @@ const Os = ({
|
|
|
4609
4611
|
u((b) => (b.set("lang", S.target.value), b));
|
|
4610
4612
|
});
|
|
4611
4613
|
},
|
|
4612
|
-
options:
|
|
4614
|
+
options: Ls
|
|
4613
4615
|
}
|
|
4614
4616
|
)
|
|
4615
4617
|
] })
|
|
4616
4618
|
] })
|
|
4617
4619
|
] }),
|
|
4618
4620
|
T && $ && /* @__PURE__ */ g.jsx(
|
|
4619
|
-
|
|
4621
|
+
Ns,
|
|
4620
4622
|
{
|
|
4621
4623
|
content: $,
|
|
4622
4624
|
onExampleChange: y
|
|
4623
4625
|
}
|
|
4624
4626
|
),
|
|
4625
4627
|
T && e.responses.length > 0 && /* @__PURE__ */ g.jsx(
|
|
4626
|
-
|
|
4628
|
+
Es,
|
|
4627
4629
|
{
|
|
4628
4630
|
selectedResponse: r,
|
|
4629
4631
|
onSelectResponse: t,
|
|
@@ -4633,15 +4635,15 @@ const Os = ({
|
|
|
4633
4635
|
]
|
|
4634
4636
|
}
|
|
4635
4637
|
);
|
|
4636
|
-
},
|
|
4638
|
+
}, Fs = (e) => Object.entries(e), _s = {
|
|
4637
4639
|
AND: /* @__PURE__ */ g.jsx(Jo, { size: 16, className: "fill-card" }),
|
|
4638
4640
|
OR: /* @__PURE__ */ g.jsx(Vo, { size: 16, className: "fill-card" }),
|
|
4639
4641
|
ONE: /* @__PURE__ */ g.jsx(Do, { size: 14, className: "fill-card" })
|
|
4640
|
-
},
|
|
4642
|
+
}, Bs = {
|
|
4641
4643
|
AND: "text-green-500 dark:text-green-300/60",
|
|
4642
4644
|
OR: "text-blue-400 dark:text-blue-500",
|
|
4643
4645
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
4644
|
-
},
|
|
4646
|
+
}, Hs = ({
|
|
4645
4647
|
type: e,
|
|
4646
4648
|
isOpen: r,
|
|
4647
4649
|
className: t
|
|
@@ -4649,13 +4651,13 @@ const Os = ({
|
|
|
4649
4651
|
"div",
|
|
4650
4652
|
{
|
|
4651
4653
|
className: le(
|
|
4652
|
-
|
|
4654
|
+
Bs[e],
|
|
4653
4655
|
"relative text-sm flex py-2",
|
|
4654
4656
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
4655
4657
|
t
|
|
4656
4658
|
),
|
|
4657
4659
|
children: /* @__PURE__ */ g.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
4658
|
-
|
|
4660
|
+
_s[e],
|
|
4659
4661
|
/* @__PURE__ */ g.jsx(
|
|
4660
4662
|
"div",
|
|
4661
4663
|
{
|
|
@@ -4668,7 +4670,7 @@ const Os = ({
|
|
|
4668
4670
|
)
|
|
4669
4671
|
] })
|
|
4670
4672
|
}
|
|
4671
|
-
),
|
|
4673
|
+
), Ms = (e) => {
|
|
4672
4674
|
const [r, t] = ge(!0);
|
|
4673
4675
|
return /* @__PURE__ */ g.jsxs(
|
|
4674
4676
|
xe.Root,
|
|
@@ -4677,17 +4679,17 @@ const Os = ({
|
|
|
4677
4679
|
onOpenChange: () => t((o) => !o),
|
|
4678
4680
|
className: "group",
|
|
4679
4681
|
children: [
|
|
4680
|
-
/* @__PURE__ */ g.jsx(xe.Trigger, { children: /* @__PURE__ */ g.jsx(
|
|
4682
|
+
/* @__PURE__ */ g.jsx(xe.Trigger, { children: /* @__PURE__ */ g.jsx(Hs, { type: e.type, isOpen: r }) }),
|
|
4681
4683
|
!r && /* @__PURE__ */ g.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
4682
4684
|
/* @__PURE__ */ g.jsx(xe.Content, { children: /* @__PURE__ */ g.jsx(Ge, { schema: e.schema, level: e.level + 1 }) })
|
|
4683
4685
|
]
|
|
4684
4686
|
}
|
|
4685
4687
|
);
|
|
4686
|
-
},
|
|
4688
|
+
}, zs = {
|
|
4687
4689
|
AND: "All of",
|
|
4688
4690
|
OR: "Any of",
|
|
4689
4691
|
ONE: "One of"
|
|
4690
|
-
},
|
|
4692
|
+
}, Gs = ({
|
|
4691
4693
|
schemas: e,
|
|
4692
4694
|
type: r,
|
|
4693
4695
|
isOpen: t,
|
|
@@ -4696,12 +4698,12 @@ const Os = ({
|
|
|
4696
4698
|
}) => /* @__PURE__ */ g.jsx(xe.Root, { open: t, onOpenChange: s, asChild: !0, children: /* @__PURE__ */ g.jsxs(be, { className: "px-6", children: [
|
|
4697
4699
|
/* @__PURE__ */ g.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
4698
4700
|
t ? /* @__PURE__ */ g.jsx(Qo, { size: 14 }) : /* @__PURE__ */ g.jsx(Ko, { size: 14 }),
|
|
4699
|
-
/* @__PURE__ */ g.jsx("span", { children:
|
|
4701
|
+
/* @__PURE__ */ g.jsx("span", { children: zs[r] })
|
|
4700
4702
|
] }),
|
|
4701
4703
|
/* @__PURE__ */ g.jsx(xe.Content, { className: "pb-4", children: e.map((l, n) => (
|
|
4702
4704
|
// eslint-disable-next-line react/no-array-index-key
|
|
4703
4705
|
/* @__PURE__ */ g.jsx(
|
|
4704
|
-
|
|
4706
|
+
Ms,
|
|
4705
4707
|
{
|
|
4706
4708
|
type: r,
|
|
4707
4709
|
schema: l,
|
|
@@ -4710,19 +4712,19 @@ const Os = ({
|
|
|
4710
4712
|
n
|
|
4711
4713
|
)
|
|
4712
4714
|
)) })
|
|
4713
|
-
] }) }),
|
|
4715
|
+
] }) }), Ws = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), gr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Js = {
|
|
4714
4716
|
allOf: "AND",
|
|
4715
4717
|
anyOf: "OR",
|
|
4716
4718
|
oneOf: "ONE"
|
|
4717
|
-
}, hr = (e) => e ===
|
|
4719
|
+
}, hr = (e) => e === ga, wo = ({
|
|
4718
4720
|
schema: e,
|
|
4719
4721
|
level: r
|
|
4720
4722
|
}) => {
|
|
4721
4723
|
const [t, o] = ge(!0), s = ta(() => o((l) => !l), []);
|
|
4722
|
-
for (const [l, n] of
|
|
4724
|
+
for (const [l, n] of Fs(Js))
|
|
4723
4725
|
if (e[l])
|
|
4724
4726
|
return /* @__PURE__ */ g.jsx(
|
|
4725
|
-
|
|
4727
|
+
Gs,
|
|
4726
4728
|
{
|
|
4727
4729
|
schemas: e[l],
|
|
4728
4730
|
type: n,
|
|
@@ -4734,7 +4736,7 @@ const Os = ({
|
|
|
4734
4736
|
}, Zn = () => /* @__PURE__ */ g.jsxs("div", { className: "flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
|
|
4735
4737
|
/* @__PURE__ */ g.jsx(Xo, { size: 16 }),
|
|
4736
4738
|
/* @__PURE__ */ g.jsx("span", { children: "circular" })
|
|
4737
|
-
] }),
|
|
4739
|
+
] }), Vs = ({
|
|
4738
4740
|
name: e,
|
|
4739
4741
|
schema: r,
|
|
4740
4742
|
group: t,
|
|
@@ -4765,7 +4767,7 @@ const Os = ({
|
|
|
4765
4767
|
content: r.description
|
|
4766
4768
|
}
|
|
4767
4769
|
),
|
|
4768
|
-
(gr(r) ||
|
|
4770
|
+
(gr(r) || Ws(r)) && /* @__PURE__ */ g.jsxs(
|
|
4769
4771
|
xe.Root,
|
|
4770
4772
|
{
|
|
4771
4773
|
defaultOpen: s,
|
|
@@ -4846,7 +4848,7 @@ const Os = ({
|
|
|
4846
4848
|
), a = ["required", "optional", "deprecated"];
|
|
4847
4849
|
return /* @__PURE__ */ g.jsx(be, { className: "divide-y overflow-hidden", children: a.map(
|
|
4848
4850
|
(i) => n[i] && /* @__PURE__ */ g.jsx("ul", { className: "divide-y", children: n[i].map(([c, u]) => /* @__PURE__ */ g.jsx(
|
|
4849
|
-
|
|
4851
|
+
Vs,
|
|
4850
4852
|
{
|
|
4851
4853
|
name: c,
|
|
4852
4854
|
schema: u,
|
|
@@ -4879,12 +4881,12 @@ const Os = ({
|
|
|
4879
4881
|
] }) : null;
|
|
4880
4882
|
};
|
|
4881
4883
|
return o(e, r);
|
|
4882
|
-
},
|
|
4884
|
+
}, Ds = ["path", "query", "header", "cookie"], Qs = ({
|
|
4883
4885
|
operationFragment: e,
|
|
4884
4886
|
serverUrl: r
|
|
4885
4887
|
}) => {
|
|
4886
4888
|
var i, c, u;
|
|
4887
|
-
const t =
|
|
4889
|
+
const t = va(Ys, e), o = io(
|
|
4888
4890
|
t.parameters ?? [],
|
|
4889
4891
|
(p) => p.in
|
|
4890
4892
|
), s = xr(null), l = t.responses.at(0), [n, a] = ge(l == null ? void 0 : l.statusCode);
|
|
@@ -4933,11 +4935,11 @@ const Os = ({
|
|
|
4933
4935
|
content: t.description
|
|
4934
4936
|
}
|
|
4935
4937
|
),
|
|
4936
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ g.jsx(g.Fragment, { children:
|
|
4938
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ g.jsx(g.Fragment, { children: Ds.flatMap(
|
|
4937
4939
|
(p) => {
|
|
4938
4940
|
var h;
|
|
4939
4941
|
return (h = o[p]) != null && h.length ? /* @__PURE__ */ g.jsx(
|
|
4940
|
-
|
|
4942
|
+
Oa,
|
|
4941
4943
|
{
|
|
4942
4944
|
id: t.slug,
|
|
4943
4945
|
parameters: o[p],
|
|
@@ -4947,7 +4949,7 @@ const Os = ({
|
|
|
4947
4949
|
) : [];
|
|
4948
4950
|
}
|
|
4949
4951
|
) }),
|
|
4950
|
-
|
|
4952
|
+
$a((u = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : u.schema, (p) => /* @__PURE__ */ g.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
4951
4953
|
/* @__PURE__ */ g.jsx(
|
|
4952
4954
|
Be,
|
|
4953
4955
|
{
|
|
@@ -5006,7 +5008,7 @@ const Os = ({
|
|
|
5006
5008
|
] })
|
|
5007
5009
|
] }),
|
|
5008
5010
|
/* @__PURE__ */ g.jsx(
|
|
5009
|
-
|
|
5011
|
+
Us,
|
|
5010
5012
|
{
|
|
5011
5013
|
selectedResponse: n,
|
|
5012
5014
|
onSelectResponse: a,
|
|
@@ -5018,10 +5020,10 @@ const Os = ({
|
|
|
5018
5020
|
t.operationId
|
|
5019
5021
|
);
|
|
5020
5022
|
};
|
|
5021
|
-
function
|
|
5023
|
+
function Ks(e, r = 160) {
|
|
5022
5024
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
5023
5025
|
}
|
|
5024
|
-
const
|
|
5026
|
+
const Ys = rt(
|
|
5025
5027
|
/* GraphQL */
|
|
5026
5028
|
`
|
|
5027
5029
|
fragment OperationsFragment on OperationItem {
|
|
@@ -5086,7 +5088,7 @@ const Ks = rt(
|
|
|
5086
5088
|
}
|
|
5087
5089
|
}
|
|
5088
5090
|
`
|
|
5089
|
-
),
|
|
5091
|
+
), Xs = rt(
|
|
5090
5092
|
/* GraphQL */
|
|
5091
5093
|
`
|
|
5092
5094
|
query AllOperations(
|
|
@@ -5119,7 +5121,7 @@ const Ks = rt(
|
|
|
5119
5121
|
tag: e,
|
|
5120
5122
|
untagged: r
|
|
5121
5123
|
}) => {
|
|
5122
|
-
const { input: t, type: o, versions: s, version: l } = jr(), n = wr(
|
|
5124
|
+
const { input: t, type: o, versions: s, version: l } = jr(), n = wr(Xs, {
|
|
5123
5125
|
input: t,
|
|
5124
5126
|
type: o,
|
|
5125
5127
|
tag: e,
|
|
@@ -5128,7 +5130,7 @@ const Ks = rt(
|
|
|
5128
5130
|
data: { schema: i }
|
|
5129
5131
|
} = a, { selectedServer: c } = br(i.servers), u = i.title, p = i.summary, h = i.description, y = ko(), x = i.operations;
|
|
5130
5132
|
Ro();
|
|
5131
|
-
const $ = p || (h ?
|
|
5133
|
+
const $ = p || (h ? Ks(h) : void 0);
|
|
5132
5134
|
return /* @__PURE__ */ g.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
5133
5135
|
/* @__PURE__ */ g.jsxs(qo, { children: [
|
|
5134
5136
|
/* @__PURE__ */ g.jsx("title", { children: u }),
|
|
@@ -5161,9 +5163,9 @@ const Ks = rt(
|
|
|
5161
5163
|
}
|
|
5162
5164
|
),
|
|
5163
5165
|
/* @__PURE__ */ g.jsx("hr", {}),
|
|
5164
|
-
/* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx(
|
|
5166
|
+
/* @__PURE__ */ g.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ g.jsx(xa, {}) }),
|
|
5165
5167
|
x.map((f) => /* @__PURE__ */ g.jsx(
|
|
5166
|
-
|
|
5168
|
+
Qs,
|
|
5167
5169
|
{
|
|
5168
5170
|
serverUrl: c,
|
|
5169
5171
|
operationFragment: f
|
|
@@ -5174,6 +5176,6 @@ const Ks = rt(
|
|
|
5174
5176
|
};
|
|
5175
5177
|
export {
|
|
5176
5178
|
xl as OperationList,
|
|
5177
|
-
|
|
5179
|
+
Ys as OperationsFragment
|
|
5178
5180
|
};
|
|
5179
|
-
//# sourceMappingURL=OperationList-
|
|
5181
|
+
//# sourceMappingURL=OperationList-CnYOgwBj.js.map
|