zudoku 0.13.0 → 0.13.2
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/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/validate.d.ts +27 -13
- package/dist/config/validators/validate.js +3 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +6 -2
- package/dist/lib/components/SlotletProvider.js +3 -5
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +8 -6
- package/dist/lib/plugins/custom-pages/index.js +3 -4
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +36 -35
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Drawer.d.ts +8 -10
- package/dist/lib/ui/Drawer.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +8 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/vite/dev-server.d.ts +6 -1
- package/dist/vite/dev-server.js +4 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-CbgJ5SAh.js} +3 -3
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-CbgJ5SAh.js.map} +1 -1
- package/lib/{CategoryHeading-ovR-zHRq.js → CategoryHeading-3Qtp2yZ8.js} +2 -2
- package/lib/{CategoryHeading-ovR-zHRq.js.map → CategoryHeading-3Qtp2yZ8.js.map} +1 -1
- package/lib/{DeveloperHint-YeWHKvyr.js → DeveloperHint-BE9DzNhv.js} +2 -2
- package/lib/{DeveloperHint-YeWHKvyr.js.map → DeveloperHint-BE9DzNhv.js.map} +1 -1
- package/lib/{ErrorPage-CsZAN_za.js → ErrorPage-B0COs372.js} +3 -3
- package/lib/{ErrorPage-CsZAN_za.js.map → ErrorPage-B0COs372.js.map} +1 -1
- package/lib/Input-CHfE_2Qk.js +2229 -0
- package/lib/Input-CHfE_2Qk.js.map +1 -0
- package/lib/{Markdown-DapSf3wG.js → Markdown-CWI6lU11.js} +714 -554
- package/lib/Markdown-CWI6lU11.js.map +1 -0
- package/lib/{MdxPage-BqBWsXZ1.js → MdxPage-C3tlrV4j.js} +6 -6
- package/lib/{MdxPage-BqBWsXZ1.js.map → MdxPage-C3tlrV4j.js.map} +1 -1
- package/lib/{OperationList-CYrmxPa8.js → OperationList-BO-ES1C5.js} +38 -39
- package/lib/OperationList-BO-ES1C5.js.map +1 -0
- package/lib/{Route-Q5mqNQrv.js → Route-Dq6zv0Pi.js} +3 -4
- package/lib/Route-Dq6zv0Pi.js.map +1 -0
- package/lib/SidebarBadge-DmI5hT04.js +503 -0
- package/lib/SidebarBadge-DmI5hT04.js.map +1 -0
- package/lib/{SlotletProvider-BWwfPzgI.js → SlotletProvider-RvaeLR6z.js} +43 -44
- package/lib/{SlotletProvider-BWwfPzgI.js.map → SlotletProvider-RvaeLR6z.js.map} +1 -1
- package/lib/ZudokuContext-BEmsYQoq.js +1173 -0
- package/lib/ZudokuContext-BEmsYQoq.js.map +1 -0
- package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
- package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
- package/lib/assets/{worker-BP8Uzflt.js → worker-Bf8vjASY.js} +4581 -4300
- package/lib/assets/worker-Bf8vjASY.js.map +1 -0
- package/lib/{index-BG0g4WW0.js → index-BRCiYFaL.js} +747 -737
- package/lib/index-BRCiYFaL.js.map +1 -0
- package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
- package/lib/index-CkwDvuPt.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-D06ATMgg.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-D06ATMgg.js.map} +1 -1
- package/lib/index-DJqnphbT.js +35 -0
- package/lib/{index-Bn6Lc9tq.js.map → index-DJqnphbT.js.map} +1 -1
- package/lib/{index-BlJ2rj99.js → index-DNfiZTPV.js} +1123 -974
- package/lib/index-DNfiZTPV.js.map +1 -0
- package/lib/{index-Dolisrci.js → index-Do_BBSIs.js} +597 -544
- package/lib/index-Do_BBSIs.js.map +1 -0
- package/lib/{index-BngPzhKn.js → index-Dvh1BL_e.js} +3 -3
- package/lib/{index-BngPzhKn.js.map → index-Dvh1BL_e.js.map} +1 -1
- package/lib/router-Oe6YmY6B.js +3024 -0
- package/lib/router-Oe6YmY6B.js.map +1 -0
- package/lib/state-CsuHT8ZO.js +183 -0
- package/lib/state-CsuHT8ZO.js.map +1 -0
- package/lib/urql-core-KJnLL26g.js +1455 -0
- package/lib/urql-core-KJnLL26g.js.map +1 -0
- package/lib/useExposedProps-Csw8oAlt.js +9 -0
- package/lib/useExposedProps-Csw8oAlt.js.map +1 -0
- package/lib/{utils-ByIc_KIM.js → utils-Chi3p5nE.js} +4 -4
- package/lib/utils-Chi3p5nE.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +363 -350
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1694 -1628
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +4599 -4317
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +16 -8
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +58 -65
- package/src/lib/components/Header.tsx +2 -2
- package/src/lib/components/MobileTopNavigation.tsx +4 -0
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +14 -7
- package/src/lib/components/index.ts +1 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
- package/src/lib/plugins/custom-pages/index.tsx +11 -9
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
- package/src/lib/plugins/openapi/index.tsx +1 -5
- package/src/lib/ui/Callout.tsx +7 -6
- package/src/lib/ui/Drawer.tsx +38 -36
- package/src/lib/util/useExposedProps.tsx +10 -0
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
- package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
- package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
- package/dist/lib/plugins/openapi/util/urql.js +0 -8
- package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
- package/lib/Input-CtVUl3eT.js +0 -2198
- package/lib/Input-CtVUl3eT.js.map +0 -1
- package/lib/Markdown-DapSf3wG.js.map +0 -1
- package/lib/OperationList-CYrmxPa8.js.map +0 -1
- package/lib/Route-Q5mqNQrv.js.map +0 -1
- package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
- package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
- package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
- package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/assets/index-B9EWVYfo.js.map +0 -1
- package/lib/assets/worker-BP8Uzflt.js.map +0 -1
- package/lib/index-BG0g4WW0.js.map +0 -1
- package/lib/index-BlJ2rj99.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-CLd8ycZz.js.map +0 -1
- package/lib/index-Dolisrci.js.map +0 -1
- package/lib/router-D2p7Olpn.js +0 -2971
- package/lib/router-D2p7Olpn.js.map +0 -1
- package/lib/state-hNe1dw4B.js +0 -548
- package/lib/state-hNe1dw4B.js.map +0 -1
- package/lib/urql-YhcsXYy8.js +0 -1591
- package/lib/urql-YhcsXYy8.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
- package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
- package/src/lib/plugins/openapi/util/urql.ts +0 -8
|
@@ -1,22 +1,160 @@
|
|
|
1
1
|
import { j as p } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { c as
|
|
19
|
-
|
|
2
|
+
import { z as ma, A as ha } from "./ZudokuContext-BEmsYQoq.js";
|
|
3
|
+
import { XIcon as cr, EraserIcon as ur, ChevronsUpDownIcon as ya, LogInIcon as va, CirclePlayIcon as ga } from "lucide-react";
|
|
4
|
+
import { createClient as ba } from "zudoku/openapi-worker";
|
|
5
|
+
import { c as xa, h as ka, u as $a, a as Sa, P as ft, b as vt, B as je, S as wa, V as ja, n as Na } from "./index-Do_BBSIs.js";
|
|
6
|
+
import { E as Ta } from "./ErrorPage-B0COs372.js";
|
|
7
|
+
import { a as F, b as Oa, S as We, C as Ca } from "./Markdown-CWI6lU11.js";
|
|
8
|
+
import { j as Pa } from "./joinPath-B7kNnUX4.js";
|
|
9
|
+
import * as P from "react";
|
|
10
|
+
import { useRef as dr, useEffect as pr, useState as fr, useTransition as mr, Fragment as Ze, createContext as Ea, useContext as Ra, useMemo as Aa } from "react";
|
|
11
|
+
import { O as hr, C as yr, a as qa, b as vr, D as gr, e as Fa, d as Ia, T as _a, c as br, R as La, I as Ua, P as Ma, f as me } from "./SidebarBadge-DmI5hT04.js";
|
|
12
|
+
import { g as Yt, I as it, C as $e, h as Ha, u as Ba, a as Va, S as vn, b as gn, c as bn, d as xn, f as gt, F as za } from "./Input-CHfE_2Qk.js";
|
|
13
|
+
import { a as xr } from "./state-CsuHT8ZO.js";
|
|
14
|
+
import { S as kn } from "./Spinner-3cQDBVGr.js";
|
|
15
|
+
import { g as Da, c as Me, a as Ja } from "./index-DJqnphbT.js";
|
|
16
|
+
import { b as Wa, d as Ga } from "./index-BRCiYFaL.js";
|
|
17
|
+
import { o as $n, s as _t, t as Qa, a as Ka, c as Ya, C as Xa, b as Za, f as ei } from "./urql-core-KJnLL26g.js";
|
|
18
|
+
import { c as ti } from "./router-Oe6YmY6B.js";
|
|
19
|
+
var kr = {}, mt = P.createContext(kr), lu = mt.Provider;
|
|
20
|
+
mt.Consumer;
|
|
21
|
+
mt.displayName = "UrqlContext";
|
|
22
|
+
var ni = () => {
|
|
23
|
+
var e = P.useContext(mt);
|
|
24
|
+
if (e === kr && process.env.NODE_ENV !== "production") {
|
|
25
|
+
var t = "No client has been specified using urql's Provider. please create a client and add a Provider.";
|
|
26
|
+
throw console.error(t), new Error(t);
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}, ri = {
|
|
30
|
+
fetching: !1,
|
|
31
|
+
stale: !1,
|
|
32
|
+
error: void 0,
|
|
33
|
+
data: void 0,
|
|
34
|
+
extensions: void 0,
|
|
35
|
+
operation: void 0
|
|
36
|
+
}, ai = (e, t) => e === t || !(!e || !t || e.key !== t.key), bt = (e, t) => {
|
|
37
|
+
var n = {
|
|
38
|
+
...e,
|
|
39
|
+
...t,
|
|
40
|
+
data: t.data !== void 0 || t.error ? t.data : e.data,
|
|
41
|
+
fetching: !!t.fetching,
|
|
42
|
+
stale: !!t.stale
|
|
43
|
+
};
|
|
44
|
+
return ((a, s) => {
|
|
45
|
+
for (var i in a)
|
|
46
|
+
if (!(i in s))
|
|
47
|
+
return !0;
|
|
48
|
+
for (var r in s)
|
|
49
|
+
if (r === "operation" ? !ai(a[r], s[r]) : a[r] !== s[r])
|
|
50
|
+
return !0;
|
|
51
|
+
return !1;
|
|
52
|
+
})(e, n) ? n : e;
|
|
53
|
+
}, ii = (e, t) => {
|
|
54
|
+
for (var n = 0, a = t.length; n < a; n++)
|
|
55
|
+
if (e[n] !== t[n])
|
|
56
|
+
return !0;
|
|
57
|
+
return !1;
|
|
58
|
+
}, xt = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
59
|
+
function Sn(e, t) {
|
|
60
|
+
process.env.NODE_ENV !== "production" && xt && xt.ReactCurrentOwner && xt.ReactCurrentOwner.current ? Promise.resolve(t).then(e) : e(t);
|
|
61
|
+
}
|
|
62
|
+
function oi(e, t) {
|
|
63
|
+
var n = P.useRef(void 0);
|
|
64
|
+
return P.useMemo(() => {
|
|
65
|
+
var a = Ya(e, t);
|
|
66
|
+
return n.current !== void 0 && n.current.key === a.key ? n.current : (n.current = a, a);
|
|
67
|
+
}, [e, t]);
|
|
68
|
+
}
|
|
69
|
+
var si = (e) => {
|
|
70
|
+
if (!e._react) {
|
|
71
|
+
var t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
|
|
72
|
+
e.operations$ && _t((a) => {
|
|
73
|
+
a.kind === "teardown" && t.has(a.key) && (t.delete(a.key), n.delete(a.key));
|
|
74
|
+
})(e.operations$), e._react = {
|
|
75
|
+
get: (a) => n.get(a),
|
|
76
|
+
set(a, s) {
|
|
77
|
+
t.delete(a), n.set(a, s);
|
|
78
|
+
},
|
|
79
|
+
dispose(a) {
|
|
80
|
+
t.add(a);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return e._react;
|
|
85
|
+
}, li = (e, t) => t && t.suspense !== void 0 ? !!t.suspense : e.suspense;
|
|
86
|
+
function ci(e) {
|
|
87
|
+
var t = ni(), n = si(t), a = li(t, e.context), s = oi(e.query, e.variables), i = P.useMemo(() => {
|
|
88
|
+
if (e.pause)
|
|
89
|
+
return null;
|
|
90
|
+
var d = t.executeQuery(s, {
|
|
91
|
+
requestPolicy: e.requestPolicy,
|
|
92
|
+
...e.context
|
|
93
|
+
});
|
|
94
|
+
return a ? $n((m) => {
|
|
95
|
+
n.set(s.key, m);
|
|
96
|
+
})(d) : d;
|
|
97
|
+
}, [n, t, s, a, e.pause, e.requestPolicy, e.context]), r = P.useCallback((d, m) => {
|
|
98
|
+
if (!d)
|
|
99
|
+
return {
|
|
100
|
+
fetching: !1
|
|
101
|
+
};
|
|
102
|
+
var h = n.get(s.key);
|
|
103
|
+
if (h) {
|
|
104
|
+
if (m && h != null && "then" in h)
|
|
105
|
+
throw h;
|
|
106
|
+
} else {
|
|
107
|
+
var v, g = _t((y) => {
|
|
108
|
+
h = y, v && v(h);
|
|
109
|
+
})(Qa(() => m && !v || !h)(d));
|
|
110
|
+
if (h == null && m) {
|
|
111
|
+
var b = new Promise((y) => {
|
|
112
|
+
v = y;
|
|
113
|
+
});
|
|
114
|
+
throw n.set(s.key, b), b;
|
|
115
|
+
} else
|
|
116
|
+
g.unsubscribe();
|
|
117
|
+
}
|
|
118
|
+
return h || {
|
|
119
|
+
fetching: !0
|
|
120
|
+
};
|
|
121
|
+
}, [n, s]), o = [t, s, e.requestPolicy, e.context, e.pause], [l, c] = P.useState(() => [i, bt(ri, r(i, a)), o]), u = l[1];
|
|
122
|
+
i !== l[0] && ii(l[2], o) && c([i, u = bt(l[1], r(i, a)), o]), P.useEffect(() => {
|
|
123
|
+
var d = l[0], m = l[2][1], h = !1, v = (b) => {
|
|
124
|
+
h = !0, Sn(c, (y) => {
|
|
125
|
+
var x = bt(y[1], b);
|
|
126
|
+
return y[1] !== x ? [y[0], x, y[2]] : y;
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
if (d) {
|
|
130
|
+
var g = _t(v)(Ka(() => {
|
|
131
|
+
v({
|
|
132
|
+
fetching: !1
|
|
133
|
+
});
|
|
134
|
+
})(d));
|
|
135
|
+
return h || v({
|
|
136
|
+
fetching: !0
|
|
137
|
+
}), () => {
|
|
138
|
+
n.dispose(m.key), g.unsubscribe();
|
|
139
|
+
};
|
|
140
|
+
} else
|
|
141
|
+
v({
|
|
142
|
+
fetching: !1
|
|
143
|
+
});
|
|
144
|
+
}, [n, l[0], l[2][1]]);
|
|
145
|
+
var f = P.useCallback((d) => {
|
|
146
|
+
var m = {
|
|
147
|
+
requestPolicy: e.requestPolicy,
|
|
148
|
+
...e.context,
|
|
149
|
+
...d
|
|
150
|
+
};
|
|
151
|
+
Sn(c, (h) => [a ? $n((v) => {
|
|
152
|
+
n.set(s.key, v);
|
|
153
|
+
})(t.executeQuery(s, m)) : t.executeQuery(s, m), h[1], o]);
|
|
154
|
+
}, [t, n, s, a, e.requestPolicy, e.context, e.pause]);
|
|
155
|
+
return [u, f];
|
|
156
|
+
}
|
|
157
|
+
const ui = {
|
|
20
158
|
kind: "Document",
|
|
21
159
|
definitions: [
|
|
22
160
|
{
|
|
@@ -161,7 +299,7 @@ const Da = {
|
|
|
161
299
|
}
|
|
162
300
|
}
|
|
163
301
|
]
|
|
164
|
-
},
|
|
302
|
+
}, di = {
|
|
165
303
|
kind: "Document",
|
|
166
304
|
definitions: [
|
|
167
305
|
{
|
|
@@ -237,7 +375,7 @@ const Da = {
|
|
|
237
375
|
}
|
|
238
376
|
}
|
|
239
377
|
]
|
|
240
|
-
},
|
|
378
|
+
}, pi = {
|
|
241
379
|
kind: "Document",
|
|
242
380
|
definitions: [
|
|
243
381
|
{
|
|
@@ -481,7 +619,7 @@ const Da = {
|
|
|
481
619
|
}
|
|
482
620
|
}
|
|
483
621
|
]
|
|
484
|
-
},
|
|
622
|
+
}, fi = {
|
|
485
623
|
kind: "Document",
|
|
486
624
|
definitions: [
|
|
487
625
|
{
|
|
@@ -557,7 +695,7 @@ const Da = {
|
|
|
557
695
|
}
|
|
558
696
|
}
|
|
559
697
|
]
|
|
560
|
-
},
|
|
698
|
+
}, mi = {
|
|
561
699
|
kind: "Document",
|
|
562
700
|
definitions: [
|
|
563
701
|
{
|
|
@@ -673,76 +811,76 @@ const Da = {
|
|
|
673
811
|
}
|
|
674
812
|
}
|
|
675
813
|
]
|
|
676
|
-
},
|
|
677
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
678
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
679
|
-
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
|
|
680
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
681
|
-
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n":
|
|
814
|
+
}, hi = {
|
|
815
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": di,
|
|
816
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": ui,
|
|
817
|
+
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": pi,
|
|
818
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": fi,
|
|
819
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": mi
|
|
682
820
|
};
|
|
683
|
-
function
|
|
684
|
-
return
|
|
821
|
+
function $r(e) {
|
|
822
|
+
return hi[e] ?? {};
|
|
685
823
|
}
|
|
686
|
-
const
|
|
687
|
-
|
|
824
|
+
const yi = Ia, vi = _a, gi = Fa, Sr = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
825
|
+
hr,
|
|
688
826
|
{
|
|
689
827
|
ref: n,
|
|
690
|
-
className:
|
|
828
|
+
className: F(
|
|
691
829
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
692
830
|
e
|
|
693
831
|
),
|
|
694
832
|
...t
|
|
695
833
|
}
|
|
696
834
|
));
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
/* @__PURE__ */ p.jsx(
|
|
835
|
+
Sr.displayName = hr.displayName;
|
|
836
|
+
const wr = P.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ p.jsxs(gi, { children: [
|
|
837
|
+
/* @__PURE__ */ p.jsx(Sr, {}),
|
|
700
838
|
/* @__PURE__ */ p.jsxs(
|
|
701
|
-
|
|
839
|
+
yr,
|
|
702
840
|
{
|
|
703
841
|
ref: a,
|
|
704
|
-
className:
|
|
842
|
+
className: F(
|
|
705
843
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg border-border",
|
|
706
844
|
e
|
|
707
845
|
),
|
|
708
846
|
...n,
|
|
709
847
|
children: [
|
|
710
848
|
t,
|
|
711
|
-
/* @__PURE__ */ p.jsxs(
|
|
712
|
-
/* @__PURE__ */ p.jsx(
|
|
849
|
+
/* @__PURE__ */ p.jsxs(qa, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
850
|
+
/* @__PURE__ */ p.jsx(cr, { className: "h-4 w-4" }),
|
|
713
851
|
/* @__PURE__ */ p.jsx("span", { className: "sr-only", children: "Close" })
|
|
714
852
|
] })
|
|
715
853
|
]
|
|
716
854
|
}
|
|
717
855
|
)
|
|
718
856
|
] }));
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
857
|
+
wr.displayName = yr.displayName;
|
|
858
|
+
const jr = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
859
|
+
vr,
|
|
722
860
|
{
|
|
723
861
|
ref: n,
|
|
724
|
-
className:
|
|
862
|
+
className: F(
|
|
725
863
|
"text-lg font-semibold leading-none tracking-tight",
|
|
726
864
|
e
|
|
727
865
|
),
|
|
728
866
|
...t
|
|
729
867
|
}
|
|
730
868
|
));
|
|
731
|
-
|
|
732
|
-
const
|
|
733
|
-
|
|
869
|
+
jr.displayName = vr.displayName;
|
|
870
|
+
const bi = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
871
|
+
gr,
|
|
734
872
|
{
|
|
735
873
|
ref: n,
|
|
736
|
-
className:
|
|
874
|
+
className: F("text-sm text-muted-foreground", e),
|
|
737
875
|
...t
|
|
738
876
|
}
|
|
739
877
|
));
|
|
740
|
-
|
|
741
|
-
const ot =
|
|
878
|
+
bi.displayName = gr.displayName;
|
|
879
|
+
const ot = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
742
880
|
"div",
|
|
743
881
|
{
|
|
744
882
|
ref: n,
|
|
745
|
-
className:
|
|
883
|
+
className: F(
|
|
746
884
|
"rounded-xl border bg-card text-card-foreground shadow",
|
|
747
885
|
e
|
|
748
886
|
),
|
|
@@ -750,47 +888,47 @@ const ot = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
|
750
888
|
}
|
|
751
889
|
));
|
|
752
890
|
ot.displayName = "Card";
|
|
753
|
-
const
|
|
891
|
+
const Nr = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
754
892
|
"div",
|
|
755
893
|
{
|
|
756
894
|
ref: n,
|
|
757
|
-
className:
|
|
895
|
+
className: F("flex flex-col space-y-1.5 p-6", e),
|
|
758
896
|
...t
|
|
759
897
|
}
|
|
760
898
|
));
|
|
761
|
-
|
|
762
|
-
const
|
|
899
|
+
Nr.displayName = "CardHeader";
|
|
900
|
+
const Tr = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
763
901
|
"h3",
|
|
764
902
|
{
|
|
765
903
|
ref: n,
|
|
766
|
-
className:
|
|
904
|
+
className: F("font-semibold leading-none tracking-tight", e),
|
|
767
905
|
...t
|
|
768
906
|
}
|
|
769
907
|
));
|
|
770
|
-
|
|
771
|
-
const
|
|
908
|
+
Tr.displayName = "CardTitle";
|
|
909
|
+
const xi = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
772
910
|
"p",
|
|
773
911
|
{
|
|
774
912
|
ref: n,
|
|
775
|
-
className:
|
|
913
|
+
className: F("text-sm text-muted-foreground", e),
|
|
776
914
|
...t
|
|
777
915
|
}
|
|
778
916
|
));
|
|
779
|
-
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
const
|
|
917
|
+
xi.displayName = "CardDescription";
|
|
918
|
+
const Or = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx("div", { ref: n, className: F("p-6 pt-0", e), ...t }));
|
|
919
|
+
Or.displayName = "CardContent";
|
|
920
|
+
const ki = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
783
921
|
"div",
|
|
784
922
|
{
|
|
785
923
|
ref: n,
|
|
786
|
-
className:
|
|
924
|
+
className: F("flex items-center p-6 pt-0", e),
|
|
787
925
|
...t
|
|
788
926
|
}
|
|
789
927
|
));
|
|
790
|
-
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
]),
|
|
928
|
+
ki.displayName = "CardFooter";
|
|
929
|
+
var Xt = "Tabs", [$i, cu] = xa(Xt, [
|
|
930
|
+
br
|
|
931
|
+
]), Cr = br(), [Si, Zt] = $i(Xt), Pr = P.forwardRef(
|
|
794
932
|
(e, t) => {
|
|
795
933
|
const {
|
|
796
934
|
__scopeTabs: n,
|
|
@@ -801,16 +939,16 @@ var Gt = "Tabs", [ii, Jc] = va(Gt, [
|
|
|
801
939
|
dir: o,
|
|
802
940
|
activationMode: l = "automatic",
|
|
803
941
|
...c
|
|
804
|
-
} = e, u =
|
|
942
|
+
} = e, u = ka(o), [f, d] = $a({
|
|
805
943
|
prop: a,
|
|
806
944
|
onChange: s,
|
|
807
945
|
defaultProp: i
|
|
808
946
|
});
|
|
809
947
|
return /* @__PURE__ */ p.jsx(
|
|
810
|
-
|
|
948
|
+
Si,
|
|
811
949
|
{
|
|
812
950
|
scope: n,
|
|
813
|
-
baseId:
|
|
951
|
+
baseId: Sa(),
|
|
814
952
|
value: f,
|
|
815
953
|
onValueChange: d,
|
|
816
954
|
orientation: r,
|
|
@@ -829,12 +967,12 @@ var Gt = "Tabs", [ii, Jc] = va(Gt, [
|
|
|
829
967
|
);
|
|
830
968
|
}
|
|
831
969
|
);
|
|
832
|
-
|
|
833
|
-
var
|
|
970
|
+
Pr.displayName = Xt;
|
|
971
|
+
var Er = "TabsList", Rr = P.forwardRef(
|
|
834
972
|
(e, t) => {
|
|
835
|
-
const { __scopeTabs: n, loop: a = !0, ...s } = e, i =
|
|
973
|
+
const { __scopeTabs: n, loop: a = !0, ...s } = e, i = Zt(Er, n), r = Cr(n);
|
|
836
974
|
return /* @__PURE__ */ p.jsx(
|
|
837
|
-
|
|
975
|
+
La,
|
|
838
976
|
{
|
|
839
977
|
asChild: !0,
|
|
840
978
|
...r,
|
|
@@ -854,12 +992,12 @@ var wr = "TabsList", jr = V.forwardRef(
|
|
|
854
992
|
);
|
|
855
993
|
}
|
|
856
994
|
);
|
|
857
|
-
|
|
858
|
-
var
|
|
995
|
+
Rr.displayName = Er;
|
|
996
|
+
var Ar = "TabsTrigger", qr = P.forwardRef(
|
|
859
997
|
(e, t) => {
|
|
860
|
-
const { __scopeTabs: n, value: a, disabled: s = !1, ...i } = e, r =
|
|
998
|
+
const { __scopeTabs: n, value: a, disabled: s = !1, ...i } = e, r = Zt(Ar, n), o = Cr(n), l = _r(r.baseId, a), c = Lr(r.baseId, a), u = a === r.value;
|
|
861
999
|
return /* @__PURE__ */ p.jsx(
|
|
862
|
-
|
|
1000
|
+
Ua,
|
|
863
1001
|
{
|
|
864
1002
|
asChild: !0,
|
|
865
1003
|
...o,
|
|
@@ -878,13 +1016,13 @@ var Nr = "TabsTrigger", Tr = V.forwardRef(
|
|
|
878
1016
|
id: l,
|
|
879
1017
|
...i,
|
|
880
1018
|
ref: t,
|
|
881
|
-
onMouseDown:
|
|
1019
|
+
onMouseDown: vt(e.onMouseDown, (f) => {
|
|
882
1020
|
!s && f.button === 0 && f.ctrlKey === !1 ? r.onValueChange(a) : f.preventDefault();
|
|
883
1021
|
}),
|
|
884
|
-
onKeyDown:
|
|
1022
|
+
onKeyDown: vt(e.onKeyDown, (f) => {
|
|
885
1023
|
[" ", "Enter"].includes(f.key) && r.onValueChange(a);
|
|
886
1024
|
}),
|
|
887
|
-
onFocus:
|
|
1025
|
+
onFocus: vt(e.onFocus, () => {
|
|
888
1026
|
const f = r.activationMode !== "manual";
|
|
889
1027
|
!u && !s && f && r.onValueChange(a);
|
|
890
1028
|
})
|
|
@@ -894,14 +1032,14 @@ var Nr = "TabsTrigger", Tr = V.forwardRef(
|
|
|
894
1032
|
);
|
|
895
1033
|
}
|
|
896
1034
|
);
|
|
897
|
-
|
|
898
|
-
var
|
|
1035
|
+
qr.displayName = Ar;
|
|
1036
|
+
var Fr = "TabsContent", Ir = P.forwardRef(
|
|
899
1037
|
(e, t) => {
|
|
900
|
-
const { __scopeTabs: n, value: a, forceMount: s, children: i, ...r } = e, o =
|
|
901
|
-
return
|
|
1038
|
+
const { __scopeTabs: n, value: a, forceMount: s, children: i, ...r } = e, o = Zt(Fr, n), l = _r(o.baseId, a), c = Lr(o.baseId, a), u = a === o.value, f = P.useRef(u);
|
|
1039
|
+
return P.useEffect(() => {
|
|
902
1040
|
const d = requestAnimationFrame(() => f.current = !1);
|
|
903
1041
|
return () => cancelAnimationFrame(d);
|
|
904
|
-
}, []), /* @__PURE__ */ p.jsx(
|
|
1042
|
+
}, []), /* @__PURE__ */ p.jsx(Ma, { present: s || u, children: ({ present: d }) => /* @__PURE__ */ p.jsx(
|
|
905
1043
|
ft.div,
|
|
906
1044
|
{
|
|
907
1045
|
"data-state": u ? "active" : "inactive",
|
|
@@ -922,62 +1060,62 @@ var Or = "TabsContent", Cr = V.forwardRef(
|
|
|
922
1060
|
) });
|
|
923
1061
|
}
|
|
924
1062
|
);
|
|
925
|
-
|
|
926
|
-
function
|
|
1063
|
+
Ir.displayName = Fr;
|
|
1064
|
+
function _r(e, t) {
|
|
927
1065
|
return `${e}-trigger-${t}`;
|
|
928
1066
|
}
|
|
929
|
-
function
|
|
1067
|
+
function Lr(e, t) {
|
|
930
1068
|
return `${e}-content-${t}`;
|
|
931
1069
|
}
|
|
932
|
-
var
|
|
933
|
-
const
|
|
934
|
-
|
|
1070
|
+
var Ur = Pr, en = Rr, tn = qr, nn = Ir;
|
|
1071
|
+
const wn = Ur, Lt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
1072
|
+
en,
|
|
935
1073
|
{
|
|
936
1074
|
ref: n,
|
|
937
|
-
className:
|
|
1075
|
+
className: F(
|
|
938
1076
|
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
939
1077
|
e
|
|
940
1078
|
),
|
|
941
1079
|
...t
|
|
942
1080
|
}
|
|
943
1081
|
));
|
|
944
|
-
|
|
945
|
-
const Oe =
|
|
946
|
-
|
|
1082
|
+
Lt.displayName = en.displayName;
|
|
1083
|
+
const Oe = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
1084
|
+
tn,
|
|
947
1085
|
{
|
|
948
1086
|
ref: n,
|
|
949
|
-
className:
|
|
1087
|
+
className: F(
|
|
950
1088
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
951
1089
|
e
|
|
952
1090
|
),
|
|
953
1091
|
...t
|
|
954
1092
|
}
|
|
955
1093
|
));
|
|
956
|
-
Oe.displayName =
|
|
957
|
-
const Ce =
|
|
958
|
-
|
|
1094
|
+
Oe.displayName = tn.displayName;
|
|
1095
|
+
const Ce = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
|
|
1096
|
+
nn,
|
|
959
1097
|
{
|
|
960
1098
|
ref: n,
|
|
961
|
-
className:
|
|
1099
|
+
className: F(
|
|
962
1100
|
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
963
1101
|
e
|
|
964
1102
|
),
|
|
965
1103
|
...t
|
|
966
1104
|
}
|
|
967
1105
|
));
|
|
968
|
-
Ce.displayName =
|
|
969
|
-
const
|
|
1106
|
+
Ce.displayName = nn.displayName;
|
|
1107
|
+
const kt = (e) => Math.abs(
|
|
970
1108
|
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
971
|
-
),
|
|
972
|
-
const n = (3 *
|
|
1109
|
+
), $t = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, n) => `${kt(t) + kt(n)}`)) : kt(e), wi = (e, t = {}) => {
|
|
1110
|
+
const n = (3 * $t(e) + 2 * $t(e) + $t(e)) % 360, { saturation: a = 75, lightness: s = 60 } = t;
|
|
973
1111
|
return `${n}deg ${a}% ${s}%`;
|
|
974
|
-
},
|
|
975
|
-
const [t] =
|
|
976
|
-
return
|
|
1112
|
+
}, St = "data-linked-param", ji = (e) => {
|
|
1113
|
+
const [t] = Oa();
|
|
1114
|
+
return wi(
|
|
977
1115
|
e,
|
|
978
1116
|
t ? void 0 : { saturation: 85, lightness: 50 }
|
|
979
1117
|
);
|
|
980
|
-
},
|
|
1118
|
+
}, rn = ({
|
|
981
1119
|
name: e,
|
|
982
1120
|
className: t,
|
|
983
1121
|
backgroundOpacity: n = "100%",
|
|
@@ -986,15 +1124,15 @@ const gt = (e) => Math.abs(
|
|
|
986
1124
|
children: i,
|
|
987
1125
|
onClick: r
|
|
988
1126
|
}) => {
|
|
989
|
-
const o =
|
|
990
|
-
return
|
|
1127
|
+
const o = dr(null), l = e.replace(/[{}]/g, ""), c = s == null ? void 0 : s.replace(/[{}]/g, ""), u = ji(l), f = `hsl(${u} / ${a})`, d = `hsl(${u} / ${n})`;
|
|
1128
|
+
return pr(() => {
|
|
991
1129
|
if (!c || !o.current) return;
|
|
992
1130
|
const m = () => {
|
|
993
|
-
document.querySelectorAll(`[${
|
|
1131
|
+
document.querySelectorAll(`[${St}="${c}"]`).forEach((v) => {
|
|
994
1132
|
v instanceof HTMLElement && (v.dataset.active = "true");
|
|
995
1133
|
});
|
|
996
1134
|
}, h = () => {
|
|
997
|
-
document.querySelectorAll(`[${
|
|
1135
|
+
document.querySelectorAll(`[${St}="${c}"]`).forEach((v) => {
|
|
998
1136
|
v instanceof HTMLElement && (v.dataset.active = "false");
|
|
999
1137
|
});
|
|
1000
1138
|
};
|
|
@@ -1005,8 +1143,8 @@ const gt = (e) => Math.abs(
|
|
|
1005
1143
|
}, [c]), /* @__PURE__ */ p.jsxs(
|
|
1006
1144
|
"span",
|
|
1007
1145
|
{
|
|
1008
|
-
className:
|
|
1009
|
-
[
|
|
1146
|
+
className: F("inline-flex relative rounded group", t),
|
|
1147
|
+
[St]: c,
|
|
1010
1148
|
ref: o,
|
|
1011
1149
|
onClick: r,
|
|
1012
1150
|
children: [
|
|
@@ -1021,7 +1159,7 @@ const gt = (e) => Math.abs(
|
|
|
1021
1159
|
]
|
|
1022
1160
|
}
|
|
1023
1161
|
);
|
|
1024
|
-
},
|
|
1162
|
+
}, Ni = (e, t, n) => {
|
|
1025
1163
|
const a = t.replace(/(:\w+|\{\w+})/g, (i) => {
|
|
1026
1164
|
var l;
|
|
1027
1165
|
const r = i.replace(/[:{}]/g, "");
|
|
@@ -1033,11 +1171,11 @@ const gt = (e) => Math.abs(
|
|
|
1033
1171
|
return n.queryParams.filter((i) => i.active).forEach((i) => {
|
|
1034
1172
|
s.searchParams.set(i.name, i.value);
|
|
1035
1173
|
}), s;
|
|
1036
|
-
},
|
|
1174
|
+
}, Ti = ({
|
|
1037
1175
|
control: e,
|
|
1038
1176
|
register: t
|
|
1039
1177
|
}) => {
|
|
1040
|
-
const { fields: n, append: a, remove: s } =
|
|
1178
|
+
const { fields: n, append: a, remove: s } = Yt({
|
|
1041
1179
|
control: e,
|
|
1042
1180
|
name: "headers"
|
|
1043
1181
|
});
|
|
@@ -1076,7 +1214,7 @@ const gt = (e) => Math.abs(
|
|
|
1076
1214
|
s(r);
|
|
1077
1215
|
},
|
|
1078
1216
|
type: "button",
|
|
1079
|
-
children: /* @__PURE__ */ p.jsx(
|
|
1217
|
+
children: /* @__PURE__ */ p.jsx(cr, { size: 16 })
|
|
1080
1218
|
}
|
|
1081
1219
|
)
|
|
1082
1220
|
] }) })
|
|
@@ -1094,10 +1232,10 @@ const gt = (e) => Math.abs(
|
|
|
1094
1232
|
}
|
|
1095
1233
|
) })
|
|
1096
1234
|
] });
|
|
1097
|
-
},
|
|
1235
|
+
}, Oi = ({
|
|
1098
1236
|
control: e
|
|
1099
1237
|
}) => {
|
|
1100
|
-
const { fields: t } =
|
|
1238
|
+
const { fields: t } = Yt({
|
|
1101
1239
|
control: e,
|
|
1102
1240
|
name: "pathParams"
|
|
1103
1241
|
});
|
|
@@ -1109,13 +1247,13 @@ const gt = (e) => Math.abs(
|
|
|
1109
1247
|
name: `pathParams.${a}.value`,
|
|
1110
1248
|
render: ({ field: s }) => /* @__PURE__ */ p.jsxs("div", { children: [
|
|
1111
1249
|
/* @__PURE__ */ p.jsx(
|
|
1112
|
-
|
|
1250
|
+
rn,
|
|
1113
1251
|
{
|
|
1114
1252
|
slug: n.name,
|
|
1115
1253
|
name: n.name,
|
|
1116
1254
|
backgroundOpacity: "25%",
|
|
1117
1255
|
borderOpacity: s.value ? "100%" : "0",
|
|
1118
|
-
className:
|
|
1256
|
+
className: F(
|
|
1119
1257
|
"font-mono text-xs m-2",
|
|
1120
1258
|
!s.value && "opacity-60"
|
|
1121
1259
|
)
|
|
@@ -1153,40 +1291,40 @@ const gt = (e) => Math.abs(
|
|
|
1153
1291
|
type: "button",
|
|
1154
1292
|
variant: "ghost",
|
|
1155
1293
|
"aria-label": "Clear value",
|
|
1156
|
-
className:
|
|
1294
|
+
className: F(
|
|
1157
1295
|
"ms-2",
|
|
1158
1296
|
s.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
1159
1297
|
),
|
|
1160
1298
|
title: "Clear value",
|
|
1161
1299
|
onClick: () => s.onChange(""),
|
|
1162
|
-
children: /* @__PURE__ */ p.jsx(
|
|
1300
|
+
children: /* @__PURE__ */ p.jsx(ur, { size: 16 })
|
|
1163
1301
|
}
|
|
1164
1302
|
)
|
|
1165
1303
|
}
|
|
1166
1304
|
)
|
|
1167
1305
|
] }) })
|
|
1168
1306
|
] }, n.id)) }) });
|
|
1169
|
-
},
|
|
1170
|
-
const n =
|
|
1171
|
-
const o = s ?
|
|
1172
|
-
return
|
|
1307
|
+
}, Ci = (e, t) => {
|
|
1308
|
+
const n = P.forwardRef(({ className: a, asChild: s, ...i }, r) => {
|
|
1309
|
+
const o = s ? wa : e;
|
|
1310
|
+
return P.createElement(o, {
|
|
1173
1311
|
...i,
|
|
1174
1312
|
ref: r,
|
|
1175
|
-
className:
|
|
1313
|
+
className: F(t, a)
|
|
1176
1314
|
});
|
|
1177
1315
|
});
|
|
1178
1316
|
return n.displayName = `VariantComponent(${e})`, n;
|
|
1179
|
-
},
|
|
1317
|
+
}, Pi = Ci(
|
|
1180
1318
|
"input",
|
|
1181
1319
|
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
1182
|
-
),
|
|
1320
|
+
), Ei = ({
|
|
1183
1321
|
control: e,
|
|
1184
1322
|
queryParams: t
|
|
1185
1323
|
}) => {
|
|
1186
|
-
const { fields: n } =
|
|
1324
|
+
const { fields: n } = Yt({
|
|
1187
1325
|
control: e,
|
|
1188
1326
|
name: "queryParams"
|
|
1189
|
-
}), a =
|
|
1327
|
+
}), a = Ha(), s = t.map((o) => !!o.isRequired), r = a.watch("identity") !== et;
|
|
1190
1328
|
return /* @__PURE__ */ p.jsx("div", { className: "", children: /* @__PURE__ */ p.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ p.jsx("tbody", { children: n.filter(
|
|
1191
1329
|
// TODO remove this hack for Accu or make it more generic
|
|
1192
1330
|
(o) => !(r && o.name === "apikey")
|
|
@@ -1211,7 +1349,7 @@ const gt = (e) => Math.abs(
|
|
|
1211
1349
|
$e,
|
|
1212
1350
|
{
|
|
1213
1351
|
control: e,
|
|
1214
|
-
render: ({ field: c }) => /* @__PURE__ */ p.jsx(
|
|
1352
|
+
render: ({ field: c }) => /* @__PURE__ */ p.jsx(Pi, { asChild: !0, children: /* @__PURE__ */ p.jsxs(
|
|
1215
1353
|
"label",
|
|
1216
1354
|
{
|
|
1217
1355
|
className: "flex items-center cursor-pointer",
|
|
@@ -1256,13 +1394,13 @@ const gt = (e) => Math.abs(
|
|
|
1256
1394
|
type: "button",
|
|
1257
1395
|
variant: "ghost",
|
|
1258
1396
|
"aria-label": "Clear value",
|
|
1259
|
-
className:
|
|
1397
|
+
className: F(
|
|
1260
1398
|
"ms-2",
|
|
1261
1399
|
c.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
1262
1400
|
),
|
|
1263
1401
|
title: "Clear value",
|
|
1264
1402
|
onClick: () => c.onChange(""),
|
|
1265
|
-
children: /* @__PURE__ */ p.jsx(
|
|
1403
|
+
children: /* @__PURE__ */ p.jsx(ur, { size: 16 })
|
|
1266
1404
|
}
|
|
1267
1405
|
),
|
|
1268
1406
|
name: `queryParams.${l}.value`
|
|
@@ -1270,7 +1408,7 @@ const gt = (e) => Math.abs(
|
|
|
1270
1408
|
)
|
|
1271
1409
|
] }) })
|
|
1272
1410
|
] }, o.id)) }) }) });
|
|
1273
|
-
},
|
|
1411
|
+
}, Mr = ({
|
|
1274
1412
|
value: e,
|
|
1275
1413
|
onChange: t,
|
|
1276
1414
|
className: n,
|
|
@@ -1280,7 +1418,7 @@ const gt = (e) => Math.abs(
|
|
|
1280
1418
|
/* @__PURE__ */ p.jsx(
|
|
1281
1419
|
"select",
|
|
1282
1420
|
{
|
|
1283
|
-
className:
|
|
1421
|
+
className: F(
|
|
1284
1422
|
"row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
|
|
1285
1423
|
"rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
|
|
1286
1424
|
n
|
|
@@ -1293,14 +1431,14 @@ const gt = (e) => Math.abs(
|
|
|
1293
1431
|
/* @__PURE__ */ p.jsx(
|
|
1294
1432
|
"div",
|
|
1295
1433
|
{
|
|
1296
|
-
className:
|
|
1434
|
+
className: F(
|
|
1297
1435
|
!s && "hidden",
|
|
1298
1436
|
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
1299
1437
|
),
|
|
1300
|
-
children: /* @__PURE__ */ p.jsx(
|
|
1438
|
+
children: /* @__PURE__ */ p.jsx(ya, { size: 14 })
|
|
1301
1439
|
}
|
|
1302
1440
|
)
|
|
1303
|
-
] }),
|
|
1441
|
+
] }), Ri = (e) => {
|
|
1304
1442
|
var n;
|
|
1305
1443
|
return (n = Object.entries({
|
|
1306
1444
|
"application/json": "json",
|
|
@@ -1313,25 +1451,25 @@ const gt = (e) => Math.abs(
|
|
|
1313
1451
|
}).find(
|
|
1314
1452
|
([a]) => e.includes(a)
|
|
1315
1453
|
)) == null ? void 0 : n[1];
|
|
1316
|
-
},
|
|
1454
|
+
}, Ai = (e) => {
|
|
1317
1455
|
const t = e.get("Content-Type") || "";
|
|
1318
|
-
return
|
|
1319
|
-
},
|
|
1456
|
+
return Ri(t);
|
|
1457
|
+
}, qi = (e) => {
|
|
1320
1458
|
try {
|
|
1321
1459
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
1322
1460
|
} catch {
|
|
1323
1461
|
return null;
|
|
1324
1462
|
}
|
|
1325
|
-
},
|
|
1463
|
+
}, Fi = ({
|
|
1326
1464
|
body: e = "",
|
|
1327
1465
|
headers: t
|
|
1328
1466
|
}) => {
|
|
1329
|
-
const n =
|
|
1467
|
+
const n = Ai(t), a = qi(e), s = a || e, [i, r] = fr(
|
|
1330
1468
|
a ? "formatted" : "raw"
|
|
1331
1469
|
);
|
|
1332
1470
|
return /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1333
1471
|
/* @__PURE__ */ p.jsx(ot, { className: "shadow-none", children: /* @__PURE__ */ p.jsx(
|
|
1334
|
-
|
|
1472
|
+
We,
|
|
1335
1473
|
{
|
|
1336
1474
|
language: i === "raw" ? a ? "plain" : n : "json",
|
|
1337
1475
|
noBackground: !0,
|
|
@@ -1340,7 +1478,7 @@ const gt = (e) => Math.abs(
|
|
|
1340
1478
|
}
|
|
1341
1479
|
) }),
|
|
1342
1480
|
a && /* @__PURE__ */ p.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ p.jsx(
|
|
1343
|
-
|
|
1481
|
+
Mr,
|
|
1344
1482
|
{
|
|
1345
1483
|
value: i,
|
|
1346
1484
|
onChange: (o) => r(o.target.value),
|
|
@@ -1351,7 +1489,7 @@ const gt = (e) => Math.abs(
|
|
|
1351
1489
|
}
|
|
1352
1490
|
) })
|
|
1353
1491
|
] });
|
|
1354
|
-
}, et = "__none",
|
|
1492
|
+
}, et = "__none", Ii = {
|
|
1355
1493
|
200: "OK",
|
|
1356
1494
|
201: "Created",
|
|
1357
1495
|
202: "Accepted",
|
|
@@ -1362,7 +1500,7 @@ const gt = (e) => Math.abs(
|
|
|
1362
1500
|
404: "Not Found",
|
|
1363
1501
|
405: "Method Not Allowed",
|
|
1364
1502
|
500: "Internal Server Error"
|
|
1365
|
-
},
|
|
1503
|
+
}, _i = ({
|
|
1366
1504
|
server: e,
|
|
1367
1505
|
servers: t,
|
|
1368
1506
|
url: n,
|
|
@@ -1372,8 +1510,8 @@ const gt = (e) => Math.abs(
|
|
|
1372
1510
|
pathParams: r = [],
|
|
1373
1511
|
defaultBody: o = ""
|
|
1374
1512
|
}) => {
|
|
1375
|
-
var
|
|
1376
|
-
const { selectedServer: l, setSelectedServer: c } =
|
|
1513
|
+
var A, H;
|
|
1514
|
+
const { selectedServer: l, setSelectedServer: c } = xr(), [, u] = mr(), { register: f, control: d, handleSubmit: m, watch: h, setValue: v, ...g } = Ba({
|
|
1377
1515
|
defaultValues: {
|
|
1378
1516
|
body: o,
|
|
1379
1517
|
queryParams: i.map(($) => ({
|
|
@@ -1391,66 +1529,66 @@ const gt = (e) => Math.abs(
|
|
|
1391
1529
|
})),
|
|
1392
1530
|
identity: et
|
|
1393
1531
|
}
|
|
1394
|
-
}), b = h(), y =
|
|
1395
|
-
|
|
1396
|
-
var
|
|
1532
|
+
}), b = h(), y = ma(), x = dr(!1);
|
|
1533
|
+
pr(() => {
|
|
1534
|
+
var L;
|
|
1397
1535
|
if (x.current) return;
|
|
1398
|
-
const $ = (
|
|
1536
|
+
const $ = (L = y.data) == null ? void 0 : L.at(0);
|
|
1399
1537
|
$ && (v("identity", $.id), x.current = !0);
|
|
1400
1538
|
}, [v, y.data]);
|
|
1401
|
-
const k =
|
|
1539
|
+
const k = Va({
|
|
1402
1540
|
mutationFn: async ($) => {
|
|
1403
|
-
var
|
|
1404
|
-
const
|
|
1541
|
+
var B, D;
|
|
1542
|
+
const L = Ni(l ?? e, n, $), I = performance.now(), z = new Request(L, {
|
|
1405
1543
|
method: a.toUpperCase(),
|
|
1406
1544
|
headers: Object.fromEntries(
|
|
1407
|
-
$.headers.filter((
|
|
1545
|
+
$.headers.filter((_) => _.name).map((_) => [_.name, _.value])
|
|
1408
1546
|
)
|
|
1409
1547
|
});
|
|
1410
|
-
$.identity !== et && ((
|
|
1548
|
+
$.identity !== et && ((D = (B = y.data) == null ? void 0 : B.find((_) => _.id === $.identity)) == null || D.authorizeRequest(z));
|
|
1411
1549
|
try {
|
|
1412
|
-
const
|
|
1550
|
+
const _ = await fetch(z, {
|
|
1413
1551
|
signal: AbortSignal.timeout(5e3)
|
|
1414
|
-
}), he = performance.now() -
|
|
1552
|
+
}), he = performance.now() - I, pe = await _.text();
|
|
1415
1553
|
return {
|
|
1416
|
-
status:
|
|
1417
|
-
headers:
|
|
1554
|
+
status: _.status,
|
|
1555
|
+
headers: _.headers,
|
|
1418
1556
|
size: pe.length,
|
|
1419
1557
|
body: pe,
|
|
1420
1558
|
time: he
|
|
1421
1559
|
};
|
|
1422
|
-
} catch (
|
|
1423
|
-
throw
|
|
1560
|
+
} catch (_) {
|
|
1561
|
+
throw _ instanceof TypeError ? new Error(
|
|
1424
1562
|
"The request failed, possibly due to network issues or CORS policy."
|
|
1425
|
-
) :
|
|
1563
|
+
) : _;
|
|
1426
1564
|
}
|
|
1427
1565
|
}
|
|
1428
|
-
}), S = n.split("/").map(($,
|
|
1566
|
+
}), S = n.split("/").map(($, L, I) => {
|
|
1429
1567
|
var he;
|
|
1430
|
-
const z = $.startsWith("{") && $.endsWith("}") || $.startsWith(":"),
|
|
1568
|
+
const z = $.startsWith("{") && $.endsWith("}") || $.startsWith(":"), B = $.replace(/[:{}]/g, ""), D = (he = b.pathParams.find((pe) => pe.name === B)) == null ? void 0 : he.value, _ = D ? /* @__PURE__ */ p.jsx(rn, { backgroundOpacity: "25%", name: $, slug: $, children: encodeURIComponent(D) }) : /* @__PURE__ */ p.jsx(
|
|
1431
1569
|
"span",
|
|
1432
1570
|
{
|
|
1433
1571
|
className: "underline decoration-wavy decoration-red-500",
|
|
1434
|
-
title: `Missing value for path parameter \`${
|
|
1572
|
+
title: `Missing value for path parameter \`${B}\``,
|
|
1435
1573
|
children: $
|
|
1436
1574
|
}
|
|
1437
1575
|
);
|
|
1438
1576
|
return (
|
|
1439
1577
|
// eslint-disable-next-line react/no-array-index-key
|
|
1440
1578
|
/* @__PURE__ */ p.jsxs(Ze, { children: [
|
|
1441
|
-
z ?
|
|
1442
|
-
|
|
1579
|
+
z ? _ : $,
|
|
1580
|
+
L < I.length - 1 && "/",
|
|
1443
1581
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
1444
|
-
] }, $ +
|
|
1582
|
+
] }, $ + L)
|
|
1445
1583
|
);
|
|
1446
|
-
}), j = Array.from(((
|
|
1584
|
+
}), j = Array.from(((A = k.data) == null ? void 0 : A.headers.entries()) ?? []), R = b.queryParams.filter(($) => $.active).map(($, L, I) => /* @__PURE__ */ p.jsxs(Ze, { children: [
|
|
1447
1585
|
$.name,
|
|
1448
1586
|
"=",
|
|
1449
1587
|
encodeURIComponent($.value).replaceAll("%20", "+"),
|
|
1450
|
-
|
|
1588
|
+
L < I.length - 1 && "&",
|
|
1451
1589
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
1452
|
-
] }, $.name)),
|
|
1453
|
-
|
|
1590
|
+
] }, $.name)), E = /* @__PURE__ */ p.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: t && t.length > 1 ? /* @__PURE__ */ p.jsxs(
|
|
1591
|
+
vn,
|
|
1454
1592
|
{
|
|
1455
1593
|
onValueChange: ($) => {
|
|
1456
1594
|
u(() => {
|
|
@@ -1459,13 +1597,13 @@ const gt = (e) => Math.abs(
|
|
|
1459
1597
|
},
|
|
1460
1598
|
value: l,
|
|
1461
1599
|
children: [
|
|
1462
|
-
/* @__PURE__ */ p.jsx(
|
|
1463
|
-
/* @__PURE__ */ p.jsx(
|
|
1600
|
+
/* @__PURE__ */ p.jsx(gn, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ p.jsx(bn, {}) }),
|
|
1601
|
+
/* @__PURE__ */ p.jsx(xn, { children: t.map(($) => /* @__PURE__ */ p.jsx(gt, { value: $, children: $.replace(/^https?:\/\//, "") }, $)) })
|
|
1464
1602
|
]
|
|
1465
1603
|
}
|
|
1466
1604
|
) : /* @__PURE__ */ p.jsx("span", { children: e.replace(/^https?:\/\//, "") }) });
|
|
1467
1605
|
return /* @__PURE__ */ p.jsx(
|
|
1468
|
-
|
|
1606
|
+
za,
|
|
1469
1607
|
{
|
|
1470
1608
|
register: f,
|
|
1471
1609
|
control: d,
|
|
@@ -1479,21 +1617,21 @@ const gt = (e) => Math.abs(
|
|
|
1479
1617
|
/* @__PURE__ */ p.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1480
1618
|
/* @__PURE__ */ p.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: a.toUpperCase() }),
|
|
1481
1619
|
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
|
|
1482
|
-
|
|
1620
|
+
E,
|
|
1483
1621
|
S,
|
|
1484
|
-
|
|
1485
|
-
|
|
1622
|
+
R.length > 0 ? "?" : "",
|
|
1623
|
+
R
|
|
1486
1624
|
] })
|
|
1487
1625
|
] }),
|
|
1488
1626
|
/* @__PURE__ */ p.jsx(je, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
|
|
1489
1627
|
] }),
|
|
1490
1628
|
/* @__PURE__ */ p.jsxs(
|
|
1491
|
-
|
|
1629
|
+
wn,
|
|
1492
1630
|
{
|
|
1493
1631
|
defaultValue: i.length + r.length > 0 ? "parameters" : "headers",
|
|
1494
1632
|
children: [
|
|
1495
1633
|
/* @__PURE__ */ p.jsxs("div", { className: "flex flex-wrap gap-1 justify-between", children: [
|
|
1496
|
-
/* @__PURE__ */ p.jsxs(
|
|
1634
|
+
/* @__PURE__ */ p.jsxs(Lt, { children: [
|
|
1497
1635
|
i.length + r.length > 0 && /* @__PURE__ */ p.jsx(Oe, { value: "parameters", children: "Parameters" }),
|
|
1498
1636
|
/* @__PURE__ */ p.jsxs(Oe, { value: "headers", children: [
|
|
1499
1637
|
"Headers",
|
|
@@ -1514,31 +1652,31 @@ const gt = (e) => Math.abs(
|
|
|
1514
1652
|
/* @__PURE__ */ p.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
1515
1653
|
"Auth:",
|
|
1516
1654
|
/* @__PURE__ */ p.jsxs(
|
|
1517
|
-
|
|
1655
|
+
vn,
|
|
1518
1656
|
{
|
|
1519
1657
|
onValueChange: ($) => v("identity", $),
|
|
1520
1658
|
value: b.identity,
|
|
1521
1659
|
defaultValue: b.identity,
|
|
1522
1660
|
children: [
|
|
1523
|
-
/* @__PURE__ */ p.jsx(
|
|
1524
|
-
/* @__PURE__ */ p.jsxs(
|
|
1525
|
-
/* @__PURE__ */ p.jsx(
|
|
1526
|
-
(
|
|
1661
|
+
/* @__PURE__ */ p.jsx(gn, { className: "w-[180px] flex", children: y.isPending ? /* @__PURE__ */ p.jsx(kn, {}) : /* @__PURE__ */ p.jsx(bn, {}) }),
|
|
1662
|
+
/* @__PURE__ */ p.jsxs(xn, { align: "center", children: [
|
|
1663
|
+
/* @__PURE__ */ p.jsx(gt, { value: et, children: "None" }),
|
|
1664
|
+
(H = y.data) == null ? void 0 : H.map(($) => /* @__PURE__ */ p.jsx(gt, { value: $.id, children: $.label }, $.id))
|
|
1527
1665
|
] })
|
|
1528
1666
|
]
|
|
1529
1667
|
}
|
|
1530
1668
|
)
|
|
1531
1669
|
] })
|
|
1532
1670
|
] }),
|
|
1533
|
-
/* @__PURE__ */ p.jsx(Ce, { value: "headers", children: /* @__PURE__ */ p.jsx(
|
|
1671
|
+
/* @__PURE__ */ p.jsx(Ce, { value: "headers", children: /* @__PURE__ */ p.jsx(Ti, { control: d, register: f }) }),
|
|
1534
1672
|
/* @__PURE__ */ p.jsxs(Ce, { value: "parameters", children: [
|
|
1535
1673
|
r.length > 0 && /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1536
1674
|
/* @__PURE__ */ p.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1537
|
-
/* @__PURE__ */ p.jsx(
|
|
1675
|
+
/* @__PURE__ */ p.jsx(Oi, { control: d })
|
|
1538
1676
|
] }),
|
|
1539
1677
|
i.length > 0 && /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1540
1678
|
/* @__PURE__ */ p.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1541
|
-
/* @__PURE__ */ p.jsx(
|
|
1679
|
+
/* @__PURE__ */ p.jsx(Ei, { control: d, queryParams: i })
|
|
1542
1680
|
] })
|
|
1543
1681
|
] }),
|
|
1544
1682
|
/* @__PURE__ */ p.jsx(Ce, { value: "body", children: /* @__PURE__ */ p.jsx(
|
|
@@ -1553,10 +1691,10 @@ const gt = (e) => Math.abs(
|
|
|
1553
1691
|
)
|
|
1554
1692
|
] }),
|
|
1555
1693
|
/* @__PURE__ */ p.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children: k.error ? /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1556
|
-
b.pathParams.some(($) => $.value === "") && /* @__PURE__ */ p.jsx(
|
|
1694
|
+
b.pathParams.some(($) => $.value === "") && /* @__PURE__ */ p.jsx(Ca, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1557
1695
|
/* @__PURE__ */ p.jsxs(ot, { children: [
|
|
1558
|
-
/* @__PURE__ */ p.jsx(
|
|
1559
|
-
/* @__PURE__ */ p.jsxs(
|
|
1696
|
+
/* @__PURE__ */ p.jsx(Nr, { children: /* @__PURE__ */ p.jsx(Tr, { children: "Request failed" }) }),
|
|
1697
|
+
/* @__PURE__ */ p.jsxs(Or, { children: [
|
|
1560
1698
|
"Error:",
|
|
1561
1699
|
" ",
|
|
1562
1700
|
k.error.message || String(k.error) || "Unexpected error"
|
|
@@ -1568,7 +1706,7 @@ const gt = (e) => Math.abs(
|
|
|
1568
1706
|
"Status: ",
|
|
1569
1707
|
k.data.status,
|
|
1570
1708
|
" ",
|
|
1571
|
-
|
|
1709
|
+
Ii[k.data.status] ?? ""
|
|
1572
1710
|
] }),
|
|
1573
1711
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
1574
1712
|
"Time: ",
|
|
@@ -1581,13 +1719,13 @@ const gt = (e) => Math.abs(
|
|
|
1581
1719
|
" B"
|
|
1582
1720
|
] })
|
|
1583
1721
|
] }) }),
|
|
1584
|
-
/* @__PURE__ */ p.jsxs(
|
|
1585
|
-
/* @__PURE__ */ p.jsxs(
|
|
1722
|
+
/* @__PURE__ */ p.jsxs(wn, { defaultValue: "response", children: [
|
|
1723
|
+
/* @__PURE__ */ p.jsxs(Lt, { children: [
|
|
1586
1724
|
/* @__PURE__ */ p.jsx(Oe, { value: "response", children: "Response" }),
|
|
1587
1725
|
/* @__PURE__ */ p.jsx(Oe, { value: "headers", children: j.length ? `Headers (${j.length})` : "No headers" })
|
|
1588
1726
|
] }),
|
|
1589
1727
|
/* @__PURE__ */ p.jsx(Ce, { value: "response", children: /* @__PURE__ */ p.jsx(
|
|
1590
|
-
|
|
1728
|
+
Fi,
|
|
1591
1729
|
{
|
|
1592
1730
|
headers: k.data.headers,
|
|
1593
1731
|
body: k.data.body
|
|
@@ -1600,19 +1738,19 @@ const gt = (e) => Math.abs(
|
|
|
1600
1738
|
children: [
|
|
1601
1739
|
/* @__PURE__ */ p.jsx("div", { className: "font-semibold", children: "Key" }),
|
|
1602
1740
|
/* @__PURE__ */ p.jsx("div", { className: "font-semibold", children: "Value" }),
|
|
1603
|
-
j.map(([$,
|
|
1741
|
+
j.map(([$, L]) => /* @__PURE__ */ p.jsxs(Ze, { children: [
|
|
1604
1742
|
/* @__PURE__ */ p.jsx("div", { children: $ }),
|
|
1605
|
-
/* @__PURE__ */ p.jsx("div", { className: "break-words", children:
|
|
1743
|
+
/* @__PURE__ */ p.jsx("div", { className: "break-words", children: L })
|
|
1606
1744
|
] }, $))
|
|
1607
1745
|
]
|
|
1608
1746
|
}
|
|
1609
1747
|
) })
|
|
1610
1748
|
] })
|
|
1611
|
-
] }) : /* @__PURE__ */ p.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ p.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: k.isPending ? /* @__PURE__ */ p.jsx(
|
|
1749
|
+
] }) : /* @__PURE__ */ p.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ p.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: k.isPending ? /* @__PURE__ */ p.jsx(kn, {}) : "Send a request first to see the response here" }) }) })
|
|
1612
1750
|
] }) })
|
|
1613
1751
|
}
|
|
1614
1752
|
);
|
|
1615
|
-
},
|
|
1753
|
+
}, Li = ({
|
|
1616
1754
|
className: e,
|
|
1617
1755
|
size: t = 16
|
|
1618
1756
|
}) => /* @__PURE__ */ p.jsx(
|
|
@@ -1633,37 +1771,37 @@ const gt = (e) => Math.abs(
|
|
|
1633
1771
|
}
|
|
1634
1772
|
)
|
|
1635
1773
|
}
|
|
1636
|
-
),
|
|
1637
|
-
const [t, n] =
|
|
1638
|
-
return /* @__PURE__ */ p.jsxs(
|
|
1639
|
-
/* @__PURE__ */ p.jsx(
|
|
1774
|
+
), Hr = (e) => {
|
|
1775
|
+
const [t, n] = fr(!1);
|
|
1776
|
+
return /* @__PURE__ */ p.jsxs(yi, { onOpenChange: (a) => n(a), children: [
|
|
1777
|
+
/* @__PURE__ */ p.jsx(vi, { asChild: !0, children: e.children ?? /* @__PURE__ */ p.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md bg-primary/80 hover:bg-primary transition text-primary-foreground text-xs", children: [
|
|
1640
1778
|
"Test",
|
|
1641
|
-
/* @__PURE__ */ p.jsx(
|
|
1779
|
+
/* @__PURE__ */ p.jsx(Li, { className: "", size: 14 })
|
|
1642
1780
|
] }) }),
|
|
1643
1781
|
/* @__PURE__ */ p.jsxs(
|
|
1644
|
-
|
|
1782
|
+
wr,
|
|
1645
1783
|
{
|
|
1646
1784
|
className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
|
|
1647
1785
|
"aria-describedby": void 0,
|
|
1648
1786
|
children: [
|
|
1649
|
-
/* @__PURE__ */ p.jsx(
|
|
1650
|
-
t && /* @__PURE__ */ p.jsx(
|
|
1787
|
+
/* @__PURE__ */ p.jsx(ja, { children: /* @__PURE__ */ p.jsx(jr, { children: "Playground" }) }),
|
|
1788
|
+
t && /* @__PURE__ */ p.jsx(_i, { ...e })
|
|
1651
1789
|
]
|
|
1652
1790
|
}
|
|
1653
1791
|
)
|
|
1654
1792
|
] });
|
|
1655
1793
|
};
|
|
1656
|
-
var
|
|
1794
|
+
var jn = (e, t) => {
|
|
1657
1795
|
const n = e[t.name];
|
|
1658
1796
|
return n === void 0 ? (e[t.name] = t.value, e) : Array.isArray(n) ? (n.push(t.value), e) : (e[t.name] = [n, t.value], e);
|
|
1659
|
-
},
|
|
1797
|
+
}, Nn = "", Tn = `
|
|
1660
1798
|
`, O = class {
|
|
1661
1799
|
/**
|
|
1662
1800
|
* Helper object to format and aggragate lines of code.
|
|
1663
1801
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
1664
1802
|
*/
|
|
1665
1803
|
constructor({ indent: e, join: t } = {}) {
|
|
1666
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
1804
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Nn, this.lineJoin = Tn, this.indentLine = (n, a = 0) => `${this.indentationCharacter.repeat(a)}${n}`, this.unshift = (n, a) => {
|
|
1667
1805
|
const s = this.indentLine(n, a);
|
|
1668
1806
|
this.code.unshift(s);
|
|
1669
1807
|
}, this.push = (n, a) => {
|
|
@@ -1676,18 +1814,18 @@ var bn = (e, t) => {
|
|
|
1676
1814
|
return this.postProcessors.reduce((s, i) => i(s), n);
|
|
1677
1815
|
}, this.addPostProcessor = (n) => {
|
|
1678
1816
|
this.postProcessors = [...this.postProcessors, n];
|
|
1679
|
-
}, this.indentationCharacter = e ||
|
|
1817
|
+
}, this.indentationCharacter = e || Nn, this.lineJoin = t ?? Tn;
|
|
1680
1818
|
}
|
|
1681
|
-
},
|
|
1819
|
+
}, Ui = function(e) {
|
|
1682
1820
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
1683
|
-
},
|
|
1821
|
+
}, Mi = function(e) {
|
|
1684
1822
|
var t = typeof e;
|
|
1685
1823
|
return e !== null && (t === "object" || t === "function");
|
|
1686
|
-
},
|
|
1687
|
-
Object.defineProperty(
|
|
1688
|
-
|
|
1689
|
-
const
|
|
1690
|
-
var
|
|
1824
|
+
}, an = {};
|
|
1825
|
+
Object.defineProperty(an, "__esModule", { value: !0 });
|
|
1826
|
+
an.default = (e) => Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
1827
|
+
const Hi = Ui, Bi = Mi, Vi = an.default;
|
|
1828
|
+
var zi = (e, t, n) => {
|
|
1691
1829
|
const a = [];
|
|
1692
1830
|
return function s(i, r, o) {
|
|
1693
1831
|
r = r || {}, r.indent = r.indent || " ", o = o || "";
|
|
@@ -1714,7 +1852,7 @@ var Ti = (e, t, n) => {
|
|
|
1714
1852
|
};
|
|
1715
1853
|
if (a.indexOf(i) !== -1)
|
|
1716
1854
|
return '"[Circular]"';
|
|
1717
|
-
if (i == null || typeof i == "number" || typeof i == "boolean" || typeof i == "function" || typeof i == "symbol" ||
|
|
1855
|
+
if (i == null || typeof i == "number" || typeof i == "boolean" || typeof i == "function" || typeof i == "symbol" || Hi(i))
|
|
1718
1856
|
return String(i);
|
|
1719
1857
|
if (i instanceof Date)
|
|
1720
1858
|
return `new Date('${i.toISOString()}')`;
|
|
@@ -1729,8 +1867,8 @@ var Ti = (e, t, n) => {
|
|
|
1729
1867
|
}).join("") + l.pad + "]";
|
|
1730
1868
|
return a.pop(), c(u);
|
|
1731
1869
|
}
|
|
1732
|
-
if (
|
|
1733
|
-
let u = Object.keys(i).concat(
|
|
1870
|
+
if (Bi(i)) {
|
|
1871
|
+
let u = Object.keys(i).concat(Vi(i));
|
|
1734
1872
|
if (r.filter && (u = u.filter((d) => r.filter(i, d))), u.length === 0)
|
|
1735
1873
|
return "{}";
|
|
1736
1874
|
a.push(i);
|
|
@@ -1745,13 +1883,13 @@ var Ti = (e, t, n) => {
|
|
|
1745
1883
|
` ? "\\n" : "\\r"), r.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
|
|
1746
1884
|
}(e, t, n);
|
|
1747
1885
|
};
|
|
1748
|
-
const Y = /* @__PURE__ */
|
|
1886
|
+
const Y = /* @__PURE__ */ Da(zi);
|
|
1749
1887
|
function ze(e, t = {}) {
|
|
1750
1888
|
const { delimiter: n = '"', escapeChar: a = "\\", escapeNewlines: s = !0 } = t;
|
|
1751
1889
|
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
1752
1890
|
` ? s ? `${a}n` : r : r === "\f" ? `${a}f` : r === "\r" ? s ? `${a}r` : r : r === a ? a + a : r === n ? a + n : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
|
|
1753
1891
|
}
|
|
1754
|
-
var
|
|
1892
|
+
var De = (e) => ze(e, { delimiter: "'" }), G = (e) => ze(e, { delimiter: '"' }), Di = {
|
|
1755
1893
|
info: {
|
|
1756
1894
|
key: "libcurl",
|
|
1757
1895
|
title: "Libcurl",
|
|
@@ -1767,7 +1905,7 @@ var Je = (e) => ze(e, { delimiter: "'" }), G = (e) => ze(e, { delimiter: '"' }),
|
|
|
1767
1905
|
i(`headers = curl_slist_append(headers, "${c}: ${G(n[c])}");`);
|
|
1768
1906
|
}), i("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), i(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), s.text && (r(), i(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), i("CURLcode ret = curl_easy_perform(hnd);"), o();
|
|
1769
1907
|
}
|
|
1770
|
-
},
|
|
1908
|
+
}, Ji = {
|
|
1771
1909
|
info: {
|
|
1772
1910
|
key: "c",
|
|
1773
1911
|
title: "C",
|
|
@@ -1775,30 +1913,30 @@ var Je = (e) => ze(e, { delimiter: "'" }), G = (e) => ze(e, { delimiter: '"' }),
|
|
|
1775
1913
|
cli: "c"
|
|
1776
1914
|
},
|
|
1777
1915
|
clientsById: {
|
|
1778
|
-
libcurl:
|
|
1916
|
+
libcurl: Di
|
|
1779
1917
|
}
|
|
1780
1918
|
}, Z = (e, t) => Object.keys(e).find((n) => n.toLowerCase() === t.toLowerCase()), de = (e, t) => {
|
|
1781
1919
|
const n = Z(e, t);
|
|
1782
1920
|
if (n)
|
|
1783
1921
|
return e[n];
|
|
1784
|
-
},
|
|
1922
|
+
}, ht = (e, t) => !!Z(e, t), Wi = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
1785
1923
|
(t) => e.indexOf(t) > -1
|
|
1786
|
-
),
|
|
1924
|
+
), On = class {
|
|
1787
1925
|
constructor(e) {
|
|
1788
1926
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
1789
1927
|
}
|
|
1790
|
-
},
|
|
1928
|
+
}, Gi = class {
|
|
1791
1929
|
constructor(e) {
|
|
1792
1930
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
1793
1931
|
}
|
|
1794
|
-
},
|
|
1932
|
+
}, Br = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), Vr = (e) => e === void 0 ? !0 : Br(e) === "object" ? Object.keys(e).length === 0 : !1, Cn = (e) => (Object.keys(e).filter((t) => Vr(e[t])).forEach((t) => {
|
|
1795
1933
|
delete e[t];
|
|
1796
1934
|
}), e), tt = (e, t) => {
|
|
1797
1935
|
const n = " ".repeat(e);
|
|
1798
1936
|
return t.replace(/\n/g, `
|
|
1799
1937
|
${n}`);
|
|
1800
|
-
},
|
|
1801
|
-
switch (
|
|
1938
|
+
}, Ut = (e) => {
|
|
1939
|
+
switch (Br(e)) {
|
|
1802
1940
|
case "string":
|
|
1803
1941
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
1804
1942
|
case "file":
|
|
@@ -1811,20 +1949,20 @@ ${n}`);
|
|
|
1811
1949
|
return `#"${e.source}"`;
|
|
1812
1950
|
case "object": {
|
|
1813
1951
|
const t = Object.keys(e).reduce((n, a) => {
|
|
1814
|
-
const s = tt(a.length + 2,
|
|
1952
|
+
const s = tt(a.length + 2, Ut(e[a]));
|
|
1815
1953
|
return `${n}:${a} ${s}
|
|
1816
1954
|
`;
|
|
1817
1955
|
}, "").trim();
|
|
1818
1956
|
return `{${tt(1, t)}}`;
|
|
1819
1957
|
}
|
|
1820
1958
|
case "array": {
|
|
1821
|
-
const t = e.reduce((n, a) => `${n} ${
|
|
1959
|
+
const t = e.reduce((n, a) => `${n} ${Ut(a)}`, "").trim();
|
|
1822
1960
|
return `[${tt(1, t)}]`;
|
|
1823
1961
|
}
|
|
1824
1962
|
default:
|
|
1825
1963
|
return e.toString();
|
|
1826
1964
|
}
|
|
1827
|
-
},
|
|
1965
|
+
}, Qi = {
|
|
1828
1966
|
info: {
|
|
1829
1967
|
key: "clj_http",
|
|
1830
1968
|
title: "clj-http",
|
|
@@ -1843,7 +1981,7 @@ ${n}`);
|
|
|
1843
1981
|
switch (n.mimeType) {
|
|
1844
1982
|
case "application/json":
|
|
1845
1983
|
{
|
|
1846
|
-
c["content-type"] = new
|
|
1984
|
+
c["content-type"] = new On("json"), c["form-params"] = n.jsonObj;
|
|
1847
1985
|
const u = Z(c.headers, "content-type");
|
|
1848
1986
|
u && delete c.headers[u];
|
|
1849
1987
|
}
|
|
@@ -1866,7 +2004,7 @@ ${n}`);
|
|
|
1866
2004
|
if (n.params) {
|
|
1867
2005
|
c.multipart = n.params.map((f) => f.fileName && !f.value ? {
|
|
1868
2006
|
name: f.name,
|
|
1869
|
-
content: new
|
|
2007
|
+
content: new Gi(f.fileName)
|
|
1870
2008
|
} : {
|
|
1871
2009
|
name: f.name,
|
|
1872
2010
|
content: f.value
|
|
@@ -1880,31 +2018,31 @@ ${n}`);
|
|
|
1880
2018
|
switch (de(c.headers, "accept")) {
|
|
1881
2019
|
case "application/json":
|
|
1882
2020
|
{
|
|
1883
|
-
c.accept = new
|
|
2021
|
+
c.accept = new On("json");
|
|
1884
2022
|
const u = Z(c.headers, "accept");
|
|
1885
2023
|
u && delete c.headers[u];
|
|
1886
2024
|
}
|
|
1887
2025
|
break;
|
|
1888
2026
|
}
|
|
1889
2027
|
if (r(`(require '[clj-http.client :as client])
|
|
1890
|
-
`),
|
|
2028
|
+
`), Vr(Cn(c)))
|
|
1891
2029
|
r(`(client/${t} "${a}")`);
|
|
1892
2030
|
else {
|
|
1893
|
-
const u = 11 + t.length + a.length, f = tt(u,
|
|
2031
|
+
const u = 11 + t.length + a.length, f = tt(u, Ut(Cn(c)));
|
|
1894
2032
|
r(`(client/${t} "${a}" ${f})`);
|
|
1895
2033
|
}
|
|
1896
2034
|
return o();
|
|
1897
2035
|
}
|
|
1898
|
-
},
|
|
2036
|
+
}, Ki = {
|
|
1899
2037
|
info: {
|
|
1900
2038
|
key: "clojure",
|
|
1901
2039
|
title: "Clojure",
|
|
1902
2040
|
default: "clj_http"
|
|
1903
2041
|
},
|
|
1904
2042
|
clientsById: {
|
|
1905
|
-
clj_http:
|
|
2043
|
+
clj_http: Qi
|
|
1906
2044
|
}
|
|
1907
|
-
},
|
|
2045
|
+
}, Yi = (e) => {
|
|
1908
2046
|
let t = de(e, "accept-encoding");
|
|
1909
2047
|
if (!t)
|
|
1910
2048
|
return [];
|
|
@@ -1921,7 +2059,7 @@ ${n}`);
|
|
|
1921
2059
|
}
|
|
1922
2060
|
});
|
|
1923
2061
|
}), a;
|
|
1924
|
-
},
|
|
2062
|
+
}, Xi = {
|
|
1925
2063
|
info: {
|
|
1926
2064
|
key: "httpclient",
|
|
1927
2065
|
title: "HttpClient",
|
|
@@ -1937,7 +2075,7 @@ ${n}`);
|
|
|
1937
2075
|
}, { push: r, join: o } = new O({ indent: i.indent });
|
|
1938
2076
|
r("using System.Net.Http.Headers;");
|
|
1939
2077
|
let l = "";
|
|
1940
|
-
const c = !!e.cookie, u =
|
|
2078
|
+
const c = !!e.cookie, u = Yi(e);
|
|
1941
2079
|
(c || u.length) && (l = "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(${l});`), r("var request = new HttpRequestMessage"), r("{");
|
|
1942
2080
|
const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
1943
2081
|
n = n.toUpperCase(), n && f.includes(n) ? n = `HttpMethod.${n[0]}${n.substring(1).toLowerCase()}` : n = `new HttpMethod("${n}")`, r(`Method = ${n},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
|
|
@@ -1974,10 +2112,10 @@ ${n}`);
|
|
|
1974
2112
|
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();
|
|
1975
2113
|
}
|
|
1976
2114
|
};
|
|
1977
|
-
function
|
|
2115
|
+
function Zi(e) {
|
|
1978
2116
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
1979
2117
|
}
|
|
1980
|
-
var
|
|
2118
|
+
var eo = {
|
|
1981
2119
|
info: {
|
|
1982
2120
|
key: "restsharp",
|
|
1983
2121
|
title: "RestSharp",
|
|
@@ -2027,11 +2165,11 @@ var _i = {
|
|
|
2027
2165
|
if (!s.text) break;
|
|
2028
2166
|
r(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
2029
2167
|
}
|
|
2030
|
-
return r(`var response = await client.${
|
|
2168
|
+
return r(`var response = await client.${Zi(e)}Async(request);
|
|
2031
2169
|
`), r(`Console.WriteLine("{0}", response.Content);
|
|
2032
2170
|
`), o();
|
|
2033
2171
|
}
|
|
2034
|
-
},
|
|
2172
|
+
}, to = {
|
|
2035
2173
|
info: {
|
|
2036
2174
|
key: "csharp",
|
|
2037
2175
|
title: "C#",
|
|
@@ -2039,10 +2177,10 @@ var _i = {
|
|
|
2039
2177
|
cli: "dotnet"
|
|
2040
2178
|
},
|
|
2041
2179
|
clientsById: {
|
|
2042
|
-
httpclient:
|
|
2043
|
-
restsharp:
|
|
2180
|
+
httpclient: Xi,
|
|
2181
|
+
restsharp: eo
|
|
2044
2182
|
}
|
|
2045
|
-
},
|
|
2183
|
+
}, no = {
|
|
2046
2184
|
info: {
|
|
2047
2185
|
key: "native",
|
|
2048
2186
|
title: "NewRequest",
|
|
@@ -2060,7 +2198,7 @@ var _i = {
|
|
|
2060
2198
|
r(`req.Header.Add("${y}", "${G(n[y])}")`, m);
|
|
2061
2199
|
}), i()), r(`res, ${d} := ${b}.Do(req)`, m), h(), u && (i(), r("defer res.Body.Close()", m), r(`body, ${d} := io.ReadAll(res.Body)`, m), h()), i(), u && r("fmt.Println(string(body))", m), l && (i(), r("}")), o();
|
|
2062
2200
|
}
|
|
2063
|
-
},
|
|
2201
|
+
}, ro = {
|
|
2064
2202
|
info: {
|
|
2065
2203
|
key: "go",
|
|
2066
2204
|
title: "Go",
|
|
@@ -2068,10 +2206,10 @@ var _i = {
|
|
|
2068
2206
|
cli: "go"
|
|
2069
2207
|
},
|
|
2070
2208
|
clientsById: {
|
|
2071
|
-
native:
|
|
2209
|
+
native: no
|
|
2072
2210
|
}
|
|
2073
|
-
},
|
|
2074
|
-
`,
|
|
2211
|
+
}, Pn = `\r
|
|
2212
|
+
`, ao = {
|
|
2075
2213
|
info: {
|
|
2076
2214
|
key: "http1.1",
|
|
2077
2215
|
title: "HTTP/1.1",
|
|
@@ -2085,7 +2223,7 @@ var _i = {
|
|
|
2085
2223
|
autoContentLength: !0,
|
|
2086
2224
|
autoHost: !0,
|
|
2087
2225
|
...r
|
|
2088
|
-
}, { blank: l, push: c, join: u } = new O({ indent: "", join:
|
|
2226
|
+
}, { blank: l, push: c, join: u } = new O({ indent: "", join: Pn }), f = o.absoluteURI ? t : n.path;
|
|
2089
2227
|
c(`${e} ${f} ${a}`);
|
|
2090
2228
|
const d = Object.keys(s);
|
|
2091
2229
|
if (d.forEach((v) => {
|
|
@@ -2097,18 +2235,18 @@ var _i = {
|
|
|
2097
2235
|
}
|
|
2098
2236
|
l();
|
|
2099
2237
|
const m = u(), h = i.text || "";
|
|
2100
|
-
return `${m}${
|
|
2238
|
+
return `${m}${Pn}${h}`;
|
|
2101
2239
|
}
|
|
2102
|
-
},
|
|
2240
|
+
}, io = {
|
|
2103
2241
|
info: {
|
|
2104
2242
|
key: "http",
|
|
2105
2243
|
title: "HTTP",
|
|
2106
2244
|
default: "http1.1"
|
|
2107
2245
|
},
|
|
2108
2246
|
clientsById: {
|
|
2109
|
-
"http1.1":
|
|
2247
|
+
"http1.1": ao
|
|
2110
2248
|
}
|
|
2111
|
-
},
|
|
2249
|
+
}, oo = {
|
|
2112
2250
|
info: {
|
|
2113
2251
|
key: "asynchttp",
|
|
2114
2252
|
title: "AsyncHttp",
|
|
@@ -2125,7 +2263,7 @@ var _i = {
|
|
|
2125
2263
|
o(`.setHeader("${c}", "${G(t[c])}")`, 1);
|
|
2126
2264
|
}), n.text && o(`.setBody(${JSON.stringify(n.text)})`, 1), o(".execute()", 1), o(".toCompletableFuture()", 1), o(".thenAccept(System.out::println)", 1), o(".join();", 1), r(), o("client.close();"), l();
|
|
2127
2265
|
}
|
|
2128
|
-
},
|
|
2266
|
+
}, so = {
|
|
2129
2267
|
info: {
|
|
2130
2268
|
key: "nethttp",
|
|
2131
2269
|
title: "java.net.http",
|
|
@@ -2147,7 +2285,7 @@ var _i = {
|
|
|
2147
2285
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
2148
2286
|
), r("System.out.println(response.body());"), o();
|
|
2149
2287
|
}
|
|
2150
|
-
},
|
|
2288
|
+
}, lo = {
|
|
2151
2289
|
info: {
|
|
2152
2290
|
key: "okhttp",
|
|
2153
2291
|
title: "OkHttp",
|
|
@@ -2164,7 +2302,7 @@ var _i = {
|
|
|
2164
2302
|
r(`.addHeader("${f}", "${G(a[f])}")`, 1);
|
|
2165
2303
|
}), r(".build();", 1), o(), r("Response response = client.newCall(request).execute();"), l();
|
|
2166
2304
|
}
|
|
2167
|
-
},
|
|
2305
|
+
}, co = {
|
|
2168
2306
|
info: {
|
|
2169
2307
|
key: "unirest",
|
|
2170
2308
|
title: "Unirest",
|
|
@@ -2181,19 +2319,19 @@ var _i = {
|
|
|
2181
2319
|
o(`.header("${c}", "${G(t[c])}")`, 1);
|
|
2182
2320
|
}), n.text && o(`.body(${JSON.stringify(n.text)})`, 1), o(".asString();", 1), r();
|
|
2183
2321
|
}
|
|
2184
|
-
},
|
|
2322
|
+
}, uo = {
|
|
2185
2323
|
info: {
|
|
2186
2324
|
key: "java",
|
|
2187
2325
|
title: "Java",
|
|
2188
2326
|
default: "unirest"
|
|
2189
2327
|
},
|
|
2190
2328
|
clientsById: {
|
|
2191
|
-
asynchttp:
|
|
2192
|
-
nethttp:
|
|
2193
|
-
okhttp:
|
|
2194
|
-
unirest:
|
|
2329
|
+
asynchttp: oo,
|
|
2330
|
+
nethttp: so,
|
|
2331
|
+
okhttp: lo,
|
|
2332
|
+
unirest: co
|
|
2195
2333
|
}
|
|
2196
|
-
},
|
|
2334
|
+
}, po = {
|
|
2197
2335
|
info: {
|
|
2198
2336
|
key: "axios",
|
|
2199
2337
|
title: "Axios",
|
|
@@ -2237,7 +2375,7 @@ var _i = {
|
|
|
2237
2375
|
}).replace('"[form]"', "form");
|
|
2238
2376
|
return l(`const options = ${d};`), o(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
|
|
2239
2377
|
}
|
|
2240
|
-
},
|
|
2378
|
+
}, fo = {
|
|
2241
2379
|
info: {
|
|
2242
2380
|
key: "fetch",
|
|
2243
2381
|
title: "fetch",
|
|
@@ -2290,7 +2428,7 @@ var _i = {
|
|
|
2290
2428
|
})};`
|
|
2291
2429
|
), r(), n.params && n.mimeType === "multipart/form-data" && (l("options.body = form;"), r()), l(`fetch('${a}', options)`), l(".then(response => response.json())", 1), l(".then(response => console.log(response))", 1), l(".catch(err => console.error(err));", 1), o();
|
|
2292
2430
|
}
|
|
2293
|
-
},
|
|
2431
|
+
}, mo = {
|
|
2294
2432
|
info: {
|
|
2295
2433
|
key: "jquery",
|
|
2296
2434
|
title: "jQuery",
|
|
@@ -2322,7 +2460,7 @@ var _i = {
|
|
|
2322
2460
|
break;
|
|
2323
2461
|
if (o("const form = new FormData();"), a.params.forEach((d) => {
|
|
2324
2462
|
o(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
2325
|
-
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]",
|
|
2463
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", ht(n, "content-type") && (f = de(n, "content-type")) != null && f.includes("boundary")) {
|
|
2326
2464
|
const d = Z(n, "content-type");
|
|
2327
2465
|
d && delete c.headers[d];
|
|
2328
2466
|
}
|
|
@@ -2334,7 +2472,7 @@ var _i = {
|
|
|
2334
2472
|
const u = Y(c, { indent: i.indent }).replace("'[form]'", "form");
|
|
2335
2473
|
return o(`const settings = ${u};`), r(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), l();
|
|
2336
2474
|
}
|
|
2337
|
-
},
|
|
2475
|
+
}, ho = {
|
|
2338
2476
|
info: {
|
|
2339
2477
|
key: "xhr",
|
|
2340
2478
|
title: "XMLHttpRequest",
|
|
@@ -2362,7 +2500,7 @@ var _i = {
|
|
|
2362
2500
|
break;
|
|
2363
2501
|
if (o("const data = new FormData();"), e.params.forEach((u) => {
|
|
2364
2502
|
o(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
2365
|
-
}),
|
|
2503
|
+
}), ht(t, "content-type") && (c = de(t, "content-type")) != null && c.includes("boundary")) {
|
|
2366
2504
|
const u = Z(t, "content-type");
|
|
2367
2505
|
u && delete t[u];
|
|
2368
2506
|
}
|
|
@@ -2372,22 +2510,22 @@ var _i = {
|
|
|
2372
2510
|
o(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
|
|
2373
2511
|
}
|
|
2374
2512
|
return o("const xhr = new XMLHttpRequest();"), i.cors && o("xhr.withCredentials = true;"), r(), o("xhr.addEventListener('readystatechange', function () {"), o("if (this.readyState === this.DONE) {", 1), o("console.log(this.responseText);", 2), o("}", 1), o("});"), r(), o(`xhr.open('${n}', '${a}');`), Object.keys(t).forEach((u) => {
|
|
2375
|
-
o(`xhr.setRequestHeader('${u}', '${
|
|
2513
|
+
o(`xhr.setRequestHeader('${u}', '${De(t[u])}');`);
|
|
2376
2514
|
}), r(), o("xhr.send(data);"), l();
|
|
2377
2515
|
}
|
|
2378
|
-
},
|
|
2516
|
+
}, yo = {
|
|
2379
2517
|
info: {
|
|
2380
2518
|
key: "javascript",
|
|
2381
2519
|
title: "JavaScript",
|
|
2382
2520
|
default: "xhr"
|
|
2383
2521
|
},
|
|
2384
2522
|
clientsById: {
|
|
2385
|
-
xhr:
|
|
2386
|
-
axios:
|
|
2387
|
-
fetch:
|
|
2388
|
-
jquery:
|
|
2523
|
+
xhr: ho,
|
|
2524
|
+
axios: po,
|
|
2525
|
+
fetch: fo,
|
|
2526
|
+
jquery: mo
|
|
2389
2527
|
}
|
|
2390
|
-
},
|
|
2528
|
+
}, vo = {
|
|
2391
2529
|
info: {
|
|
2392
2530
|
key: "native",
|
|
2393
2531
|
title: "Native JSON",
|
|
@@ -2421,16 +2559,16 @@ var _i = {
|
|
|
2421
2559
|
}
|
|
2422
2560
|
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, n.indent);
|
|
2423
2561
|
}
|
|
2424
|
-
},
|
|
2562
|
+
}, go = {
|
|
2425
2563
|
info: {
|
|
2426
2564
|
key: "json",
|
|
2427
2565
|
title: "JSON",
|
|
2428
2566
|
default: "native"
|
|
2429
2567
|
},
|
|
2430
2568
|
clientsById: {
|
|
2431
|
-
native:
|
|
2569
|
+
native: vo
|
|
2432
2570
|
}
|
|
2433
|
-
},
|
|
2571
|
+
}, bo = {
|
|
2434
2572
|
info: {
|
|
2435
2573
|
key: "okhttp",
|
|
2436
2574
|
title: "OkHttp",
|
|
@@ -2447,16 +2585,16 @@ var _i = {
|
|
|
2447
2585
|
l(`.addHeader("${f}", "${G(a[f])}")`, 1);
|
|
2448
2586
|
}), l(".build()", 1), r(), l("val response = client.newCall(request).execute()"), o();
|
|
2449
2587
|
}
|
|
2450
|
-
},
|
|
2588
|
+
}, xo = {
|
|
2451
2589
|
info: {
|
|
2452
2590
|
key: "kotlin",
|
|
2453
2591
|
title: "Kotlin",
|
|
2454
2592
|
default: "okhttp"
|
|
2455
2593
|
},
|
|
2456
2594
|
clientsById: {
|
|
2457
|
-
okhttp:
|
|
2595
|
+
okhttp: bo
|
|
2458
2596
|
}
|
|
2459
|
-
},
|
|
2597
|
+
}, ko = {
|
|
2460
2598
|
info: {
|
|
2461
2599
|
key: "axios",
|
|
2462
2600
|
title: "Axios",
|
|
@@ -2490,7 +2628,7 @@ var _i = {
|
|
|
2490
2628
|
const f = Y(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
2491
2629
|
return l(`const options = ${f};`), r(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), o();
|
|
2492
2630
|
}
|
|
2493
|
-
},
|
|
2631
|
+
}, $o = {
|
|
2494
2632
|
info: {
|
|
2495
2633
|
key: "fetch",
|
|
2496
2634
|
title: "Fetch",
|
|
@@ -2550,7 +2688,7 @@ var _i = {
|
|
|
2550
2688
|
});
|
|
2551
2689
|
return c(`const options = ${h};`), l(), o && f("const fs = require('fs');"), n.params && n.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), 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")');
|
|
2552
2690
|
}
|
|
2553
|
-
},
|
|
2691
|
+
}, So = {
|
|
2554
2692
|
info: {
|
|
2555
2693
|
key: "native",
|
|
2556
2694
|
title: "HTTP",
|
|
@@ -2589,7 +2727,7 @@ var _i = {
|
|
|
2589
2727
|
}
|
|
2590
2728
|
return l("req.end();"), o();
|
|
2591
2729
|
}
|
|
2592
|
-
},
|
|
2730
|
+
}, wo = {
|
|
2593
2731
|
info: {
|
|
2594
2732
|
key: "request",
|
|
2595
2733
|
title: "Request",
|
|
@@ -2642,7 +2780,7 @@ var _i = {
|
|
|
2642
2780
|
c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(g)}'), '${t}');`);
|
|
2643
2781
|
}), u(), m((v) => v.replace(/'JAR'/, "jar"))), l && d("const fs = require('fs');"), c(`const options = ${Y(h, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), f();
|
|
2644
2782
|
}
|
|
2645
|
-
},
|
|
2783
|
+
}, jo = {
|
|
2646
2784
|
info: {
|
|
2647
2785
|
key: "unirest",
|
|
2648
2786
|
title: "Unirest",
|
|
@@ -2683,7 +2821,7 @@ var _i = {
|
|
|
2683
2821
|
}
|
|
2684
2822
|
return l && m("const fs = require('fs');"), d("req.end(function (res) {"), d("if (res.error) throw new Error(res.error);", 1), u(), d("console.log(res.body);", 1), d("});"), f();
|
|
2685
2823
|
}
|
|
2686
|
-
},
|
|
2824
|
+
}, No = {
|
|
2687
2825
|
info: {
|
|
2688
2826
|
key: "node",
|
|
2689
2827
|
title: "Node.js",
|
|
@@ -2691,27 +2829,27 @@ var _i = {
|
|
|
2691
2829
|
cli: "node %s"
|
|
2692
2830
|
},
|
|
2693
2831
|
clientsById: {
|
|
2694
|
-
native:
|
|
2695
|
-
request:
|
|
2696
|
-
unirest:
|
|
2697
|
-
axios:
|
|
2698
|
-
fetch:
|
|
2699
|
-
}
|
|
2700
|
-
},
|
|
2701
|
-
const s = `${e} *${t} = `, i =
|
|
2832
|
+
native: So,
|
|
2833
|
+
request: wo,
|
|
2834
|
+
unirest: jo,
|
|
2835
|
+
axios: ko,
|
|
2836
|
+
fetch: $o
|
|
2837
|
+
}
|
|
2838
|
+
}, wt = (e, t, n, a) => {
|
|
2839
|
+
const s = `${e} *${t} = `, i = Mt(n, a ? s.length : void 0);
|
|
2702
2840
|
return `${s}${i};`;
|
|
2703
|
-
},
|
|
2841
|
+
}, Mt = (e, t) => {
|
|
2704
2842
|
const n = t === void 0 ? ", " : `,
|
|
2705
2843
|
${" ".repeat(t)}`;
|
|
2706
2844
|
switch (Object.prototype.toString.call(e)) {
|
|
2707
2845
|
case "[object Number]":
|
|
2708
2846
|
return `@${e}`;
|
|
2709
2847
|
case "[object Array]":
|
|
2710
|
-
return `@[ ${e.map((s) =>
|
|
2848
|
+
return `@[ ${e.map((s) => Mt(s)).join(n)} ]`;
|
|
2711
2849
|
case "[object Object]": {
|
|
2712
2850
|
const a = [];
|
|
2713
2851
|
return Object.keys(e).forEach((s) => {
|
|
2714
|
-
a.push(`@"${s}": ${
|
|
2852
|
+
a.push(`@"${s}": ${Mt(e[s])}`);
|
|
2715
2853
|
}), `@{ ${a.join(n)} }`;
|
|
2716
2854
|
}
|
|
2717
2855
|
case "[object Boolean]":
|
|
@@ -2719,7 +2857,7 @@ var _i = {
|
|
|
2719
2857
|
default:
|
|
2720
2858
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2721
2859
|
}
|
|
2722
|
-
},
|
|
2860
|
+
}, To = {
|
|
2723
2861
|
info: {
|
|
2724
2862
|
key: "nsurlsession",
|
|
2725
2863
|
title: "NSURLSession",
|
|
@@ -2738,7 +2876,7 @@ var _i = {
|
|
|
2738
2876
|
hasHeaders: !1,
|
|
2739
2877
|
hasBody: !1
|
|
2740
2878
|
};
|
|
2741
|
-
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), r(
|
|
2879
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), r(wt("NSDictionary", "headers", e, i.pretty))), t.text || t.jsonObj || t.params)
|
|
2742
2880
|
switch (c.hasBody = !0, t.mimeType) {
|
|
2743
2881
|
case "application/x-www-form-urlencoded":
|
|
2744
2882
|
if ((u = t.params) != null && u.length) {
|
|
@@ -2753,10 +2891,10 @@ var _i = {
|
|
|
2753
2891
|
c.hasBody = !1;
|
|
2754
2892
|
break;
|
|
2755
2893
|
case "application/json":
|
|
2756
|
-
t.jsonObj && (r(
|
|
2894
|
+
t.jsonObj && (r(wt("NSDictionary", "parameters", t.jsonObj, i.pretty)), l(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
2757
2895
|
break;
|
|
2758
2896
|
case "multipart/form-data":
|
|
2759
|
-
r(
|
|
2897
|
+
r(wt("NSArray", "parameters", t.params || [], i.pretty)), r(`NSString *boundary = @"${t.boundary}";`), l(), 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(
|
|
2760
2898
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
2761
2899
|
2
|
|
2762
2900
|
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
@@ -2776,16 +2914,16 @@ var _i = {
|
|
|
2776
2914
|
2
|
|
2777
2915
|
), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), o();
|
|
2778
2916
|
}
|
|
2779
|
-
},
|
|
2917
|
+
}, Oo = {
|
|
2780
2918
|
info: {
|
|
2781
2919
|
key: "objc",
|
|
2782
2920
|
title: "Objective-C",
|
|
2783
2921
|
default: "nsurlsession"
|
|
2784
2922
|
},
|
|
2785
2923
|
clientsById: {
|
|
2786
|
-
nsurlsession:
|
|
2924
|
+
nsurlsession: To
|
|
2787
2925
|
}
|
|
2788
|
-
},
|
|
2926
|
+
}, Co = {
|
|
2789
2927
|
info: {
|
|
2790
2928
|
key: "cohttp",
|
|
2791
2929
|
title: "CoHTTP",
|
|
@@ -2811,16 +2949,16 @@ var _i = {
|
|
|
2811
2949
|
const f = u.length ? "~headers " : "", d = n.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
2812
2950
|
return o(`Client.call ${f}${d}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), c();
|
|
2813
2951
|
}
|
|
2814
|
-
},
|
|
2952
|
+
}, Po = {
|
|
2815
2953
|
info: {
|
|
2816
2954
|
key: "ocaml",
|
|
2817
2955
|
title: "OCaml",
|
|
2818
2956
|
default: "cohttp"
|
|
2819
2957
|
},
|
|
2820
2958
|
clientsById: {
|
|
2821
|
-
cohttp:
|
|
2959
|
+
cohttp: Co
|
|
2822
2960
|
}
|
|
2823
|
-
},
|
|
2961
|
+
}, q = (e, t, n) => {
|
|
2824
2962
|
switch (n = n || "", t = t || "", Object.prototype.toString.call(e)) {
|
|
2825
2963
|
case "[object Boolean]":
|
|
2826
2964
|
return e;
|
|
@@ -2833,7 +2971,7 @@ var _i = {
|
|
|
2833
2971
|
case "[object Number]":
|
|
2834
2972
|
return e.toString();
|
|
2835
2973
|
case "[object Array]": {
|
|
2836
|
-
const a = e.map((s) =>
|
|
2974
|
+
const a = e.map((s) => q(s, `${t}${t}`, t)).join(`,
|
|
2837
2975
|
${t}`);
|
|
2838
2976
|
return `[
|
|
2839
2977
|
${t}${a}
|
|
@@ -2842,7 +2980,7 @@ ${n}]`;
|
|
|
2842
2980
|
case "[object Object]": {
|
|
2843
2981
|
const a = [];
|
|
2844
2982
|
for (const s in e)
|
|
2845
|
-
Object.prototype.hasOwnProperty.call(e, s) && a.push(`${
|
|
2983
|
+
Object.prototype.hasOwnProperty.call(e, s) && a.push(`${q(s, t)} => ${q(e[s], `${t}${t}`, t)}`);
|
|
2846
2984
|
return `[
|
|
2847
2985
|
${t}${a.join(`,
|
|
2848
2986
|
${t}`)}
|
|
@@ -2851,7 +2989,7 @@ ${n}]`;
|
|
|
2851
2989
|
default:
|
|
2852
2990
|
return "null";
|
|
2853
2991
|
}
|
|
2854
|
-
},
|
|
2992
|
+
}, En = [
|
|
2855
2993
|
"ACL",
|
|
2856
2994
|
"BASELINE_CONTROL",
|
|
2857
2995
|
"CHECKIN",
|
|
@@ -2879,7 +3017,7 @@ ${n}]`;
|
|
|
2879
3017
|
"UNLOCK",
|
|
2880
3018
|
"UPDATE",
|
|
2881
3019
|
"VERSION_CONTROL"
|
|
2882
|
-
],
|
|
3020
|
+
], Eo = {
|
|
2883
3021
|
info: {
|
|
2884
3022
|
key: "curl",
|
|
2885
3023
|
title: "cURL",
|
|
@@ -2942,14 +3080,14 @@ ${n}]`;
|
|
|
2942
3080
|
{
|
|
2943
3081
|
escape: !t.jsonObj,
|
|
2944
3082
|
name: "CURLOPT_POSTFIELDS",
|
|
2945
|
-
value: t ? t.jsonObj ? `json_encode(${
|
|
3083
|
+
value: t ? t.jsonObj ? `json_encode(${q(t.jsonObj, c.repeat(2), c)})` : t.text : void 0
|
|
2946
3084
|
}
|
|
2947
3085
|
];
|
|
2948
3086
|
v("curl_setopt_array($curl, [");
|
|
2949
3087
|
const x = new O({ indent: c, join: `
|
|
2950
3088
|
${c}` });
|
|
2951
|
-
y.forEach(({ value: j, name:
|
|
2952
|
-
j != null && x.push(`${
|
|
3089
|
+
y.forEach(({ value: j, name: R, escape: E }) => {
|
|
3090
|
+
j != null && x.push(`${R} => ${E ? JSON.stringify(j) : j},`);
|
|
2953
3091
|
});
|
|
2954
3092
|
const k = i.map((j) => `${encodeURIComponent(j.name)}=${encodeURIComponent(j.value)}`);
|
|
2955
3093
|
k.length && x.push(`CURLOPT_COOKIE => "${k.join("; ")}",`);
|
|
@@ -2957,7 +3095,7 @@ ${c}` });
|
|
|
2957
3095
|
return S.length && (x.push("CURLOPT_HTTPHEADER => ["), x.push(S.join(`,
|
|
2958
3096
|
${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), g(), v("curl_close($curl);"), g(), v("if ($err) {"), v(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !d && l && (g(), v("?>")), b();
|
|
2959
3097
|
}
|
|
2960
|
-
},
|
|
3098
|
+
}, Ro = {
|
|
2961
3099
|
info: {
|
|
2962
3100
|
key: "guzzle",
|
|
2963
3101
|
title: "Guzzle",
|
|
@@ -2977,7 +3115,7 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
2977
3115
|
}, { push: o, blank: l, join: c } = new O({ indent: r.indent }), { code: u, push: f, join: d } = new O({ indent: r.indent });
|
|
2978
3116
|
switch (r.noTags || o(r.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), l(), e.mimeType) {
|
|
2979
3117
|
case "application/x-www-form-urlencoded":
|
|
2980
|
-
f(`'form_params' => ${
|
|
3118
|
+
f(`'form_params' => ${q(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
2981
3119
|
break;
|
|
2982
3120
|
case "multipart/form-data": {
|
|
2983
3121
|
const g = [];
|
|
@@ -2993,22 +3131,22 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
2993
3131
|
name: b.name,
|
|
2994
3132
|
contents: b.value
|
|
2995
3133
|
});
|
|
2996
|
-
}), g.length && (f(`'multipart' => ${
|
|
3134
|
+
}), g.length && (f(`'multipart' => ${q(g, r.indent + r.indent, r.indent)}`, 1), ht(s, "content-type") && (v = de(s, "content-type")) != null && v.indexOf("boundary"))) {
|
|
2997
3135
|
const b = Z(s, "content-type");
|
|
2998
3136
|
b && delete s[b];
|
|
2999
3137
|
}
|
|
3000
3138
|
break;
|
|
3001
3139
|
}
|
|
3002
3140
|
default:
|
|
3003
|
-
e.text && f(`'body' => ${
|
|
3141
|
+
e.text && f(`'body' => ${q(e.text)},`, 1);
|
|
3004
3142
|
}
|
|
3005
3143
|
const m = Object.keys(s).sort().map(function(g) {
|
|
3006
|
-
return `${r.indent}${r.indent}'${g}' => '${
|
|
3144
|
+
return `${r.indent}${r.indent}'${g}' => '${De(s[g])}',`;
|
|
3007
3145
|
}), h = a.map((g) => `${encodeURIComponent(g.name)}=${encodeURIComponent(g.value)}`).join("; ");
|
|
3008
|
-
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${
|
|
3146
|
+
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${De(h)}',`), m.length && (f("'headers' => [", 1), f(m.join(`
|
|
3009
3147
|
`)), f("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), l(), u.length ? (o(`$response = $client->request('${n}', '${t}', [`), o(d()), o("]);")) : o(`$response = $client->request('${n}', '${t}');`), l(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (l(), o("?>")), c();
|
|
3010
3148
|
}
|
|
3011
|
-
},
|
|
3149
|
+
}, Ao = {
|
|
3012
3150
|
info: {
|
|
3013
3151
|
key: "http1",
|
|
3014
3152
|
title: "HTTP v1",
|
|
@@ -3018,19 +3156,19 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3018
3156
|
},
|
|
3019
3157
|
convert: ({ method: e, url: t, postData: n, queryObj: a, headersObj: s, cookiesObj: i }, r = {}) => {
|
|
3020
3158
|
const { closingTag: o = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: f, blank: d, join: m } = new O({ indent: l });
|
|
3021
|
-
switch (c || (f(u ? "<?" : "<?php"), d()),
|
|
3159
|
+
switch (c || (f(u ? "<?" : "<?php"), d()), En.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${q(t)});`), En.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), d(), Object.keys(a).length && (f(`$request->setQueryData(${q(a, l)});`), d()), Object.keys(s).length && (f(`$request->setHeaders(${q(s, l)});`), d()), Object.keys(i).length && (f(`$request->setCookies(${q(i, l)});`), d()), n.mimeType) {
|
|
3022
3160
|
case "application/x-www-form-urlencoded":
|
|
3023
|
-
f(`$request->setContentType(${
|
|
3161
|
+
f(`$request->setContentType(${q(n.mimeType)});`), f(`$request->setPostFields(${q(n.paramsObj, l)});`), d();
|
|
3024
3162
|
break;
|
|
3025
3163
|
case "application/json":
|
|
3026
|
-
f(`$request->setContentType(${
|
|
3164
|
+
f(`$request->setContentType(${q(n.mimeType)});`), f(`$request->setBody(json_encode(${q(n.jsonObj, l)}));`), d();
|
|
3027
3165
|
break;
|
|
3028
3166
|
default:
|
|
3029
|
-
n.text && (f(`$request->setBody(${
|
|
3167
|
+
n.text && (f(`$request->setBody(${q(n.text)});`), d());
|
|
3030
3168
|
}
|
|
3031
3169
|
return f("try {"), f("$response = $request->send();", 1), d(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !c && o && (d(), f("?>")), m();
|
|
3032
3170
|
}
|
|
3033
|
-
},
|
|
3171
|
+
}, qo = {
|
|
3034
3172
|
info: {
|
|
3035
3173
|
key: "http2",
|
|
3036
3174
|
title: "HTTP v2",
|
|
@@ -3044,17 +3182,17 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3044
3182
|
let h = !1;
|
|
3045
3183
|
switch (c || (f(u ? "<?" : "<?php"), d()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), d(), e.mimeType) {
|
|
3046
3184
|
case "application/x-www-form-urlencoded":
|
|
3047
|
-
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${
|
|
3185
|
+
f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${q(e.paramsObj, l)}));`), d(), h = !0;
|
|
3048
3186
|
break;
|
|
3049
3187
|
case "multipart/form-data": {
|
|
3050
3188
|
if (!e.params)
|
|
3051
3189
|
break;
|
|
3052
3190
|
const g = [], b = {};
|
|
3053
|
-
e.params.forEach(({ name: k, fileName: S, value: j, contentType:
|
|
3191
|
+
e.params.forEach(({ name: k, fileName: S, value: j, contentType: R }) => {
|
|
3054
3192
|
if (S) {
|
|
3055
3193
|
g.push({
|
|
3056
3194
|
name: k,
|
|
3057
|
-
type:
|
|
3195
|
+
type: R,
|
|
3058
3196
|
file: S,
|
|
3059
3197
|
data: j
|
|
3060
3198
|
});
|
|
@@ -3062,8 +3200,8 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3062
3200
|
}
|
|
3063
3201
|
j && (b[k] = j);
|
|
3064
3202
|
});
|
|
3065
|
-
const y = Object.keys(b).length ?
|
|
3066
|
-
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${y}, ${x});`),
|
|
3203
|
+
const y = Object.keys(b).length ? q(b, l) : "null", x = g.length ? q(g, l) : "null";
|
|
3204
|
+
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${y}, ${x});`), ht(t, "content-type") && (v = de(t, "content-type")) != null && v.indexOf("boundary")) {
|
|
3067
3205
|
const k = Z(t, "content-type");
|
|
3068
3206
|
k && delete t[k];
|
|
3069
3207
|
}
|
|
@@ -3071,14 +3209,14 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3071
3209
|
break;
|
|
3072
3210
|
}
|
|
3073
3211
|
case "application/json":
|
|
3074
|
-
f("$body = new http\\Message\\Body;"), f(`$body->append(json_encode(${
|
|
3212
|
+
f("$body = new http\\Message\\Body;"), f(`$body->append(json_encode(${q(e.jsonObj, l)}));`), h = !0;
|
|
3075
3213
|
break;
|
|
3076
3214
|
default:
|
|
3077
|
-
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${
|
|
3215
|
+
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${q(e.text)});`), d(), h = !0);
|
|
3078
3216
|
}
|
|
3079
|
-
return f(`$request->setRequestUrl(${
|
|
3217
|
+
return f(`$request->setRequestUrl(${q(i)});`), f(`$request->setRequestMethod(${q(n)});`), h && (f("$request->setBody($body);"), d()), Object.keys(a).length && (f(`$request->setQuery(new http\\QueryString(${q(a, l)}));`), d()), Object.keys(t).length && (f(`$request->setHeaders(${q(t, l)});`), d()), Object.keys(s).length && (d(), f(`$client->setCookies(${q(s, l)});`), d()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), d(), f("echo $response->getBody();"), !c && o && (d(), f("?>")), m();
|
|
3080
3218
|
}
|
|
3081
|
-
},
|
|
3219
|
+
}, Fo = {
|
|
3082
3220
|
info: {
|
|
3083
3221
|
key: "php",
|
|
3084
3222
|
title: "PHP",
|
|
@@ -3086,12 +3224,12 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3086
3224
|
cli: "php %s"
|
|
3087
3225
|
},
|
|
3088
3226
|
clientsById: {
|
|
3089
|
-
curl:
|
|
3090
|
-
guzzle:
|
|
3091
|
-
http1:
|
|
3092
|
-
http2:
|
|
3227
|
+
curl: Eo,
|
|
3228
|
+
guzzle: Ro,
|
|
3229
|
+
http1: Ao,
|
|
3230
|
+
http2: qo
|
|
3093
3231
|
}
|
|
3094
|
-
},
|
|
3232
|
+
}, zr = (e) => ({ method: n, headersObj: a, cookies: s, uriObj: i, fullUrl: r, postData: o, allHeaders: l }) => {
|
|
3095
3233
|
const { push: c, join: u } = new O();
|
|
3096
3234
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(n.toUpperCase()))
|
|
3097
3235
|
return "Method not supported";
|
|
@@ -3103,7 +3241,7 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3103
3241
|
}), d.push("-WebSession $session")), o.text && (d.push(
|
|
3104
3242
|
`-ContentType '${ze(de(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
3105
3243
|
), d.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${n} ${d.join(" ")}`.trim()), u();
|
|
3106
|
-
},
|
|
3244
|
+
}, Io = {
|
|
3107
3245
|
info: {
|
|
3108
3246
|
key: "restmethod",
|
|
3109
3247
|
title: "Invoke-RestMethod",
|
|
@@ -3111,8 +3249,8 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3111
3249
|
description: "Powershell Invoke-RestMethod client",
|
|
3112
3250
|
extname: ".ps1"
|
|
3113
3251
|
},
|
|
3114
|
-
convert:
|
|
3115
|
-
},
|
|
3252
|
+
convert: zr("Invoke-RestMethod")
|
|
3253
|
+
}, _o = {
|
|
3116
3254
|
info: {
|
|
3117
3255
|
key: "webrequest",
|
|
3118
3256
|
title: "Invoke-WebRequest",
|
|
@@ -3120,19 +3258,19 @@ ${c}${c}`), 1), x.push("],")), v(x.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3120
3258
|
description: "Powershell Invoke-WebRequest client",
|
|
3121
3259
|
extname: ".ps1"
|
|
3122
3260
|
},
|
|
3123
|
-
convert:
|
|
3124
|
-
},
|
|
3261
|
+
convert: zr("Invoke-WebRequest")
|
|
3262
|
+
}, Lo = {
|
|
3125
3263
|
info: {
|
|
3126
3264
|
key: "powershell",
|
|
3127
3265
|
title: "Powershell",
|
|
3128
3266
|
default: "webrequest"
|
|
3129
3267
|
},
|
|
3130
3268
|
clientsById: {
|
|
3131
|
-
webrequest:
|
|
3132
|
-
restmethod:
|
|
3269
|
+
webrequest: _o,
|
|
3270
|
+
restmethod: Io
|
|
3133
3271
|
}
|
|
3134
3272
|
};
|
|
3135
|
-
function
|
|
3273
|
+
function Rn(e, t, n, a, s) {
|
|
3136
3274
|
const i = a.repeat(s), r = a.repeat(s - 1), o = n ? `,
|
|
3137
3275
|
${i}` : ", ", l = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
3138
3276
|
return n ? `${l}
|
|
@@ -3146,13 +3284,13 @@ var Ee = (e, t, n) => {
|
|
|
3146
3284
|
case "[object Array]": {
|
|
3147
3285
|
let a = !1;
|
|
3148
3286
|
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (a = Object.keys(i).length > 1), Ee(i, t, n)));
|
|
3149
|
-
return
|
|
3287
|
+
return Rn("array", s, a, t.indent, n);
|
|
3150
3288
|
}
|
|
3151
3289
|
case "[object Object]": {
|
|
3152
3290
|
const a = [];
|
|
3153
3291
|
for (const s in e)
|
|
3154
3292
|
a.push(`"${s}": ${Ee(e[s], t, n)}`);
|
|
3155
|
-
return
|
|
3293
|
+
return Rn("object", a, t.pretty && a.length > 1, t.indent, n);
|
|
3156
3294
|
}
|
|
3157
3295
|
case "[object Null]":
|
|
3158
3296
|
return "None";
|
|
@@ -3161,7 +3299,7 @@ var Ee = (e, t, n) => {
|
|
|
3161
3299
|
default:
|
|
3162
3300
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3163
3301
|
}
|
|
3164
|
-
},
|
|
3302
|
+
}, Uo = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Mo = {
|
|
3165
3303
|
info: {
|
|
3166
3304
|
key: "requests",
|
|
3167
3305
|
title: "Requests",
|
|
@@ -3224,10 +3362,10 @@ var Ee = (e, t, n) => {
|
|
|
3224
3362
|
r(y !== g ? `"${x}": "${G(u[x])}",` : `"${x}": "${G(u[x])}"`, 1), y += 1;
|
|
3225
3363
|
}), r("}"), o();
|
|
3226
3364
|
}
|
|
3227
|
-
let b =
|
|
3365
|
+
let b = Uo.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
3228
3366
|
return h && (v ? b += ", json=payload" : b += ", data=payload"), m && (b += ", files=files"), g > 0 && (b += ", headers=headers"), b += ")", r(b), o(), r("print(response.text)"), l();
|
|
3229
3367
|
}
|
|
3230
|
-
},
|
|
3368
|
+
}, Ho = {
|
|
3231
3369
|
info: {
|
|
3232
3370
|
key: "python",
|
|
3233
3371
|
title: "Python",
|
|
@@ -3235,9 +3373,9 @@ var Ee = (e, t, n) => {
|
|
|
3235
3373
|
cli: "python3 %s"
|
|
3236
3374
|
},
|
|
3237
3375
|
clientsById: {
|
|
3238
|
-
requests:
|
|
3376
|
+
requests: Mo
|
|
3239
3377
|
}
|
|
3240
|
-
},
|
|
3378
|
+
}, Bo = {
|
|
3241
3379
|
info: {
|
|
3242
3380
|
key: "httr",
|
|
3243
3381
|
title: "httr",
|
|
@@ -3270,22 +3408,22 @@ var Ee = (e, t, n) => {
|
|
|
3270
3408
|
r('encode <- "raw"'), o();
|
|
3271
3409
|
break;
|
|
3272
3410
|
}
|
|
3273
|
-
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${G(m)}")` : void 0, g = `content_type("${G(a.mimeType)}")`, b = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, j]) => `'${S}' = '${
|
|
3411
|
+
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${G(m)}")` : void 0, g = `content_type("${G(a.mimeType)}")`, b = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, j]) => `'${S}' = '${De(j)}'`).join(", "), y = b ? `add_headers(${b})` : void 0;
|
|
3274
3412
|
let x = `response <- VERB("${i}", url`;
|
|
3275
3413
|
f && (x += ", body = payload"), n.length && (x += ", query = queryString");
|
|
3276
3414
|
const k = [y, g, v, h].filter((S) => !!S).join(", ");
|
|
3277
3415
|
return k && (x += `, ${k}`), (a.text || a.jsonObj || a.params) && (x += ", encode = encode"), x += ")", r(x), o(), r('content(response, "text")'), l();
|
|
3278
3416
|
}
|
|
3279
|
-
},
|
|
3417
|
+
}, Vo = {
|
|
3280
3418
|
info: {
|
|
3281
3419
|
key: "r",
|
|
3282
3420
|
title: "R",
|
|
3283
3421
|
default: "httr"
|
|
3284
3422
|
},
|
|
3285
3423
|
clientsById: {
|
|
3286
|
-
httr:
|
|
3424
|
+
httr: Bo
|
|
3287
3425
|
}
|
|
3288
|
-
},
|
|
3426
|
+
}, zo = {
|
|
3289
3427
|
info: {
|
|
3290
3428
|
key: "native",
|
|
3291
3429
|
title: "net::http",
|
|
@@ -3313,19 +3451,19 @@ var Ee = (e, t, n) => {
|
|
|
3313
3451
|
c.includes(l) || (i(`class Net::HTTP::${u} < Net::HTTPRequest`), i(` METHOD = '${l.toUpperCase()}'`), i(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), i(" RESPONSE_HAS_BODY = true"), i("end"), r()), i(`url = URI("${n}")`), r(), i("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && i("http.use_ssl = true"), r(), i(`request = Net::HTTP::${u}.new(url)`);
|
|
3314
3452
|
const f = Object.keys(s);
|
|
3315
3453
|
return f.length && f.forEach((d) => {
|
|
3316
|
-
i(`request["${d}"] = '${
|
|
3454
|
+
i(`request["${d}"] = '${De(s[d])}'`);
|
|
3317
3455
|
}), a.text && i(`request.body = ${JSON.stringify(a.text)}`), r(), i("response = http.request(request)"), i("puts response.read_body"), o();
|
|
3318
3456
|
}
|
|
3319
|
-
},
|
|
3457
|
+
}, Do = {
|
|
3320
3458
|
info: {
|
|
3321
3459
|
key: "ruby",
|
|
3322
3460
|
title: "Ruby",
|
|
3323
3461
|
default: "native"
|
|
3324
3462
|
},
|
|
3325
3463
|
clientsById: {
|
|
3326
|
-
native:
|
|
3464
|
+
native: zo
|
|
3327
3465
|
}
|
|
3328
|
-
}, K = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
3466
|
+
}, K = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Jo = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Wo = {
|
|
3329
3467
|
"http1.0": "0",
|
|
3330
3468
|
"url ": "",
|
|
3331
3469
|
cookie: "b",
|
|
@@ -3335,13 +3473,13 @@ var Ee = (e, t, n) => {
|
|
|
3335
3473
|
header: "H",
|
|
3336
3474
|
insecure: "k",
|
|
3337
3475
|
request: "X"
|
|
3338
|
-
},
|
|
3476
|
+
}, Go = (e) => (t) => {
|
|
3339
3477
|
if (e) {
|
|
3340
|
-
const n =
|
|
3478
|
+
const n = Wo[t];
|
|
3341
3479
|
return n ? `-${n}` : "";
|
|
3342
3480
|
}
|
|
3343
3481
|
return `--${t}`;
|
|
3344
|
-
},
|
|
3482
|
+
}, Qo = {
|
|
3345
3483
|
info: {
|
|
3346
3484
|
key: "curl",
|
|
3347
3485
|
title: "cURL",
|
|
@@ -3355,7 +3493,7 @@ var Ee = (e, t, n) => {
|
|
|
3355
3493
|
...typeof o == "string" ? { indent: o } : {},
|
|
3356
3494
|
join: o !== !1 ? ` \\
|
|
3357
3495
|
${o}` : " "
|
|
3358
|
-
}), h =
|
|
3496
|
+
}), h = Go(l);
|
|
3359
3497
|
let v = K(e);
|
|
3360
3498
|
if (d(`curl ${h("request")} ${t}`), u && (v = unescape(v), d(h("globoff"))), d(`${h("url ")}${v}`), n === "HTTP/1.0" && d(h("http1.0")), de(s, "accept-encoding") && d("--compressed"), i.mimeType === "multipart/form-data") {
|
|
3361
3499
|
const b = Z(a, "content-type");
|
|
@@ -3379,15 +3517,15 @@ ${o}` : " "
|
|
|
3379
3517
|
break;
|
|
3380
3518
|
case "application/x-www-form-urlencoded":
|
|
3381
3519
|
i.params ? i.params.forEach((y) => {
|
|
3382
|
-
const x = y.name, k = encodeURIComponent(y.name), S = k !== x, j = S ? k : x,
|
|
3383
|
-
d(`${
|
|
3520
|
+
const x = y.name, k = encodeURIComponent(y.name), S = k !== x, j = S ? k : x, R = c ? "--data-binary" : S ? "--data-urlencode" : h("data");
|
|
3521
|
+
d(`${R} ${K(`${j}=${y.value}`)}`);
|
|
3384
3522
|
}) : d(`${c ? "--data-binary" : h("data")} ${K(i.text)}`);
|
|
3385
3523
|
break;
|
|
3386
3524
|
default:
|
|
3387
3525
|
if (!i.text)
|
|
3388
3526
|
break;
|
|
3389
3527
|
let b = !1;
|
|
3390
|
-
if (
|
|
3528
|
+
if (Wi(i.mimeType) && i.text.length > 20)
|
|
3391
3529
|
try {
|
|
3392
3530
|
const y = JSON.parse(i.text);
|
|
3393
3531
|
b = !0, i.text.indexOf("'") > 0 ? d(
|
|
@@ -3409,7 +3547,7 @@ ${JSON.stringify(y, null, f)}
|
|
|
3409
3547
|
}
|
|
3410
3548
|
return m();
|
|
3411
3549
|
}
|
|
3412
|
-
},
|
|
3550
|
+
}, Ko = {
|
|
3413
3551
|
info: {
|
|
3414
3552
|
key: "httpie",
|
|
3415
3553
|
title: "HTTPie",
|
|
@@ -3458,7 +3596,7 @@ ${o.indent}` : " "
|
|
|
3458
3596
|
}
|
|
3459
3597
|
return c();
|
|
3460
3598
|
}
|
|
3461
|
-
},
|
|
3599
|
+
}, Yo = {
|
|
3462
3600
|
info: {
|
|
3463
3601
|
key: "wget",
|
|
3464
3602
|
title: "Wget",
|
|
@@ -3480,9 +3618,9 @@ ${i.indent}` : " "
|
|
|
3480
3618
|
return i.verbose ? r(`wget ${i.short ? "-v" : "--verbose"}`) : r(`wget ${i.short ? "-q" : "--quiet"}`), r(`--method ${K(e)}`), Object.keys(n).forEach((l) => {
|
|
3481
3619
|
const c = `${l}: ${n[l]}`;
|
|
3482
3620
|
r(`--header ${K(c)}`);
|
|
3483
|
-
}), t.text && r(`--body-data ${
|
|
3621
|
+
}), t.text && r(`--body-data ${Jo(K(t.text))}`), r(i.short ? "-O" : "--output-document"), r(`- ${K(a)}`), o();
|
|
3484
3622
|
}
|
|
3485
|
-
},
|
|
3623
|
+
}, Xo = {
|
|
3486
3624
|
info: {
|
|
3487
3625
|
key: "shell",
|
|
3488
3626
|
title: "Shell",
|
|
@@ -3490,30 +3628,30 @@ ${i.indent}` : " "
|
|
|
3490
3628
|
cli: "%s"
|
|
3491
3629
|
},
|
|
3492
3630
|
clientsById: {
|
|
3493
|
-
curl:
|
|
3494
|
-
httpie:
|
|
3495
|
-
wget:
|
|
3631
|
+
curl: Qo,
|
|
3632
|
+
httpie: Ko,
|
|
3633
|
+
wget: Yo
|
|
3496
3634
|
}
|
|
3497
|
-
},
|
|
3498
|
-
const s =
|
|
3635
|
+
}, An = (e, t) => t.repeat(e), qn = (e, t, n, a) => {
|
|
3636
|
+
const s = An(a, n), i = An(a - 1, n), r = t ? `,
|
|
3499
3637
|
${s}` : ", ";
|
|
3500
3638
|
return t ? `[
|
|
3501
3639
|
${s}${e.join(r)}
|
|
3502
3640
|
${i}]` : `[${e.join(r)}]`;
|
|
3503
|
-
},
|
|
3641
|
+
}, Fn = (e, t, n) => `let ${e} = ${st(t, n)}`, st = (e, t, n) => {
|
|
3504
3642
|
switch (n = n === void 0 ? 1 : n + 1, Object.prototype.toString.call(e)) {
|
|
3505
3643
|
case "[object Number]":
|
|
3506
3644
|
return e;
|
|
3507
3645
|
case "[object Array]": {
|
|
3508
3646
|
let a = !1;
|
|
3509
3647
|
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (a = Object.keys(i).length > 1), st(i, t, n)));
|
|
3510
|
-
return
|
|
3648
|
+
return qn(s, a, t.indent, n);
|
|
3511
3649
|
}
|
|
3512
3650
|
case "[object Object]": {
|
|
3513
3651
|
const a = [];
|
|
3514
3652
|
for (const s in e)
|
|
3515
3653
|
a.push(`"${s}": ${st(e[s], t, n)}`);
|
|
3516
|
-
return
|
|
3654
|
+
return qn(
|
|
3517
3655
|
a,
|
|
3518
3656
|
// @ts-expect-error needs better types
|
|
3519
3657
|
t.pretty && a.length > 1,
|
|
@@ -3527,7 +3665,7 @@ ${i}]` : `[${e.join(r)}]`;
|
|
|
3527
3665
|
default:
|
|
3528
3666
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3529
3667
|
}
|
|
3530
|
-
},
|
|
3668
|
+
}, Zo = {
|
|
3531
3669
|
info: {
|
|
3532
3670
|
key: "urlsession",
|
|
3533
3671
|
title: "URLSession",
|
|
@@ -3554,10 +3692,10 @@ ${i}]` : `[${e.join(r)}]`;
|
|
|
3554
3692
|
}
|
|
3555
3693
|
break;
|
|
3556
3694
|
case "application/json":
|
|
3557
|
-
t.jsonObj && (o(`${
|
|
3695
|
+
t.jsonObj && (o(`${Fn("parameters", t.jsonObj, r)} as [String : Any?]`), l(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), l());
|
|
3558
3696
|
break;
|
|
3559
3697
|
case "multipart/form-data":
|
|
3560
|
-
o(
|
|
3698
|
+
o(Fn("parameters", t.params, r)), l(), o(`let boundary = "${t.boundary}"`), l(), 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("}"), l(), o("let postData = Data(body.utf8)"), l();
|
|
3561
3699
|
break;
|
|
3562
3700
|
default:
|
|
3563
3701
|
o(`let postData = Data("${t.text}".utf8)`), l();
|
|
@@ -3578,122 +3716,122 @@ ${i}]` : `[${e.join(r)}]`;
|
|
|
3578
3716
|
}
|
|
3579
3717
|
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${s}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${st(e, r)}`), u && o("request.httpBody = postData"), l(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), c();
|
|
3580
3718
|
}
|
|
3581
|
-
},
|
|
3719
|
+
}, es = {
|
|
3582
3720
|
info: {
|
|
3583
3721
|
key: "swift",
|
|
3584
3722
|
title: "Swift",
|
|
3585
3723
|
default: "urlsession"
|
|
3586
3724
|
},
|
|
3587
3725
|
clientsById: {
|
|
3588
|
-
urlsession:
|
|
3589
|
-
}
|
|
3590
|
-
},
|
|
3591
|
-
c:
|
|
3592
|
-
clojure:
|
|
3593
|
-
csharp:
|
|
3594
|
-
go:
|
|
3595
|
-
http:
|
|
3596
|
-
java:
|
|
3597
|
-
javascript:
|
|
3598
|
-
json:
|
|
3599
|
-
kotlin:
|
|
3600
|
-
node:
|
|
3601
|
-
objc:
|
|
3602
|
-
ocaml:
|
|
3603
|
-
php:
|
|
3604
|
-
powershell:
|
|
3605
|
-
python:
|
|
3606
|
-
r:
|
|
3607
|
-
ruby:
|
|
3608
|
-
shell:
|
|
3609
|
-
swift:
|
|
3726
|
+
urlsession: Zo
|
|
3727
|
+
}
|
|
3728
|
+
}, ts = {
|
|
3729
|
+
c: Ji,
|
|
3730
|
+
clojure: Ki,
|
|
3731
|
+
csharp: to,
|
|
3732
|
+
go: ro,
|
|
3733
|
+
http: io,
|
|
3734
|
+
java: uo,
|
|
3735
|
+
javascript: yo,
|
|
3736
|
+
json: go,
|
|
3737
|
+
kotlin: xo,
|
|
3738
|
+
node: No,
|
|
3739
|
+
objc: Oo,
|
|
3740
|
+
ocaml: Po,
|
|
3741
|
+
php: Fo,
|
|
3742
|
+
powershell: Lo,
|
|
3743
|
+
python: Ho,
|
|
3744
|
+
r: Vo,
|
|
3745
|
+
ruby: Do,
|
|
3746
|
+
shell: Xo,
|
|
3747
|
+
swift: es
|
|
3610
3748
|
}, lt = { exports: {} };
|
|
3611
3749
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
3612
3750
|
lt.exports;
|
|
3613
3751
|
(function(e, t) {
|
|
3614
3752
|
(function(n) {
|
|
3615
|
-
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, i = typeof
|
|
3753
|
+
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, i = typeof Me == "object" && Me;
|
|
3616
3754
|
(i.global === i || i.window === i || i.self === i) && (n = i);
|
|
3617
3755
|
var r, o = 2147483647, l = 36, c = 1, u = 26, f = 38, d = 700, m = 72, h = 128, v = "-", g = /^xn--/, b = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, x = {
|
|
3618
3756
|
overflow: "Overflow: input needs wider integers to process",
|
|
3619
3757
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3620
3758
|
"invalid-input": "Invalid input"
|
|
3621
|
-
}, k = l - c, S = Math.floor, j = String.fromCharCode,
|
|
3622
|
-
function
|
|
3759
|
+
}, k = l - c, S = Math.floor, j = String.fromCharCode, R;
|
|
3760
|
+
function E(w) {
|
|
3623
3761
|
throw new RangeError(x[w]);
|
|
3624
3762
|
}
|
|
3625
|
-
function
|
|
3626
|
-
for (var C = w.length,
|
|
3627
|
-
|
|
3628
|
-
return
|
|
3763
|
+
function A(w, N) {
|
|
3764
|
+
for (var C = w.length, U = []; C--; )
|
|
3765
|
+
U[C] = N(w[C]);
|
|
3766
|
+
return U;
|
|
3629
3767
|
}
|
|
3630
|
-
function
|
|
3631
|
-
var C = w.split("@"),
|
|
3632
|
-
C.length > 1 && (
|
|
3633
|
-
var
|
|
3634
|
-
return
|
|
3768
|
+
function H(w, N) {
|
|
3769
|
+
var C = w.split("@"), U = "";
|
|
3770
|
+
C.length > 1 && (U = C[0] + "@", w = C[1]), w = w.replace(y, ".");
|
|
3771
|
+
var V = w.split("."), te = A(V, N).join(".");
|
|
3772
|
+
return U + te;
|
|
3635
3773
|
}
|
|
3636
3774
|
function $(w) {
|
|
3637
|
-
for (var N = [], C = 0,
|
|
3638
|
-
|
|
3775
|
+
for (var N = [], C = 0, U = w.length, V, te; C < U; )
|
|
3776
|
+
V = w.charCodeAt(C++), V >= 55296 && V <= 56319 && C < U ? (te = w.charCodeAt(C++), (te & 64512) == 56320 ? N.push(((V & 1023) << 10) + (te & 1023) + 65536) : (N.push(V), C--)) : N.push(V);
|
|
3639
3777
|
return N;
|
|
3640
3778
|
}
|
|
3641
|
-
function
|
|
3642
|
-
return
|
|
3779
|
+
function L(w) {
|
|
3780
|
+
return A(w, function(N) {
|
|
3643
3781
|
var C = "";
|
|
3644
3782
|
return N > 65535 && (N -= 65536, C += j(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), C += j(N), C;
|
|
3645
3783
|
}).join("");
|
|
3646
3784
|
}
|
|
3647
|
-
function
|
|
3785
|
+
function I(w) {
|
|
3648
3786
|
return w - 48 < 10 ? w - 22 : w - 65 < 26 ? w - 65 : w - 97 < 26 ? w - 97 : l;
|
|
3649
3787
|
}
|
|
3650
3788
|
function z(w, N) {
|
|
3651
3789
|
return w + 22 + 75 * (w < 26) - ((N != 0) << 5);
|
|
3652
3790
|
}
|
|
3653
|
-
function
|
|
3654
|
-
var
|
|
3655
|
-
for (w = C ? S(w / d) : w >> 1, w += S(w / N); w > k * u >> 1;
|
|
3791
|
+
function B(w, N, C) {
|
|
3792
|
+
var U = 0;
|
|
3793
|
+
for (w = C ? S(w / d) : w >> 1, w += S(w / N); w > k * u >> 1; U += l)
|
|
3656
3794
|
w = S(w / k);
|
|
3657
|
-
return S(
|
|
3795
|
+
return S(U + (k + 1) * w / (w + f));
|
|
3658
3796
|
}
|
|
3659
|
-
function
|
|
3660
|
-
var N = [], C = w.length,
|
|
3797
|
+
function D(w) {
|
|
3798
|
+
var N = [], C = w.length, U, V = 0, te = h, Q = m, ne, ae, se, fe, X, re, ie, ye, xe;
|
|
3661
3799
|
for (ne = w.lastIndexOf(v), ne < 0 && (ne = 0), ae = 0; ae < ne; ++ae)
|
|
3662
|
-
w.charCodeAt(ae) >= 128 &&
|
|
3800
|
+
w.charCodeAt(ae) >= 128 && E("not-basic"), N.push(w.charCodeAt(ae));
|
|
3663
3801
|
for (se = ne > 0 ? ne + 1 : 0; se < C; ) {
|
|
3664
|
-
for (fe =
|
|
3665
|
-
xe = l - ye, X > S(o / xe) &&
|
|
3666
|
-
|
|
3802
|
+
for (fe = V, X = 1, re = l; se >= C && E("invalid-input"), ie = I(w.charCodeAt(se++)), (ie >= l || ie > S((o - V) / X)) && E("overflow"), V += ie * X, ye = re <= Q ? c : re >= Q + u ? u : re - Q, !(ie < ye); re += l)
|
|
3803
|
+
xe = l - ye, X > S(o / xe) && E("overflow"), X *= xe;
|
|
3804
|
+
U = N.length + 1, Q = B(V - fe, U, fe == 0), S(V / U) > o - te && E("overflow"), te += S(V / U), V %= U, N.splice(V++, 0, te);
|
|
3667
3805
|
}
|
|
3668
|
-
return
|
|
3806
|
+
return L(N);
|
|
3669
3807
|
}
|
|
3670
|
-
function
|
|
3671
|
-
var N, C,
|
|
3808
|
+
function _(w) {
|
|
3809
|
+
var N, C, U, V, te, Q, ne, ae, se, fe, X, re = [], ie, ye, xe, yt;
|
|
3672
3810
|
for (w = $(w), ie = w.length, N = h, C = 0, te = m, Q = 0; Q < ie; ++Q)
|
|
3673
3811
|
X = w[Q], X < 128 && re.push(j(X));
|
|
3674
|
-
for (
|
|
3812
|
+
for (U = V = re.length, V && re.push(v); U < ie; ) {
|
|
3675
3813
|
for (ne = o, Q = 0; Q < ie; ++Q)
|
|
3676
3814
|
X = w[Q], X >= N && X < ne && (ne = X);
|
|
3677
|
-
for (ye =
|
|
3678
|
-
if (X = w[Q], X < N && ++C > o &&
|
|
3815
|
+
for (ye = U + 1, ne - N > S((o - C) / ye) && E("overflow"), C += (ne - N) * ye, N = ne, Q = 0; Q < ie; ++Q)
|
|
3816
|
+
if (X = w[Q], X < N && ++C > o && E("overflow"), X == N) {
|
|
3679
3817
|
for (ae = C, se = l; fe = se <= te ? c : se >= te + u ? u : se - te, !(ae < fe); se += l)
|
|
3680
|
-
|
|
3681
|
-
j(z(fe +
|
|
3682
|
-
), ae = S(
|
|
3683
|
-
re.push(j(z(ae, 0))), te =
|
|
3818
|
+
yt = ae - fe, xe = l - fe, re.push(
|
|
3819
|
+
j(z(fe + yt % xe, 0))
|
|
3820
|
+
), ae = S(yt / xe);
|
|
3821
|
+
re.push(j(z(ae, 0))), te = B(C, ye, U == V), C = 0, ++U;
|
|
3684
3822
|
}
|
|
3685
3823
|
++C, ++N;
|
|
3686
3824
|
}
|
|
3687
3825
|
return re.join("");
|
|
3688
3826
|
}
|
|
3689
3827
|
function he(w) {
|
|
3690
|
-
return
|
|
3691
|
-
return g.test(N) ?
|
|
3828
|
+
return H(w, function(N) {
|
|
3829
|
+
return g.test(N) ? D(N.slice(4).toLowerCase()) : N;
|
|
3692
3830
|
});
|
|
3693
3831
|
}
|
|
3694
3832
|
function pe(w) {
|
|
3695
|
-
return
|
|
3696
|
-
return b.test(N) ? "xn--" +
|
|
3833
|
+
return H(w, function(N) {
|
|
3834
|
+
return b.test(N) ? "xn--" + _(N) : N;
|
|
3697
3835
|
});
|
|
3698
3836
|
}
|
|
3699
3837
|
if (r = {
|
|
@@ -3712,23 +3850,23 @@ lt.exports;
|
|
|
3712
3850
|
*/
|
|
3713
3851
|
ucs2: {
|
|
3714
3852
|
decode: $,
|
|
3715
|
-
encode:
|
|
3853
|
+
encode: L
|
|
3716
3854
|
},
|
|
3717
|
-
decode:
|
|
3718
|
-
encode:
|
|
3855
|
+
decode: D,
|
|
3856
|
+
encode: _,
|
|
3719
3857
|
toASCII: pe,
|
|
3720
3858
|
toUnicode: he
|
|
3721
3859
|
}, a && s)
|
|
3722
3860
|
if (e.exports == a)
|
|
3723
3861
|
s.exports = r;
|
|
3724
3862
|
else
|
|
3725
|
-
for (
|
|
3726
|
-
r.hasOwnProperty(
|
|
3863
|
+
for (R in r)
|
|
3864
|
+
r.hasOwnProperty(R) && (a[R] = r[R]);
|
|
3727
3865
|
else
|
|
3728
3866
|
n.punycode = r;
|
|
3729
|
-
})(
|
|
3867
|
+
})(Me);
|
|
3730
3868
|
})(lt, lt.exports);
|
|
3731
|
-
var
|
|
3869
|
+
var ns = lt.exports, rs = Error, as = EvalError, is = RangeError, os = ReferenceError, Dr = SyntaxError, Ge = TypeError, ss = URIError, ls = function() {
|
|
3732
3870
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3733
3871
|
return !1;
|
|
3734
3872
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3751,54 +3889,54 @@ var Uo = lt.exports, Ho = Error, Mo = EvalError, Bo = RangeError, Vo = Reference
|
|
|
3751
3889
|
return !1;
|
|
3752
3890
|
}
|
|
3753
3891
|
return !0;
|
|
3754
|
-
},
|
|
3755
|
-
return typeof
|
|
3756
|
-
},
|
|
3892
|
+
}, In = typeof Symbol < "u" && Symbol, cs = ls, us = function() {
|
|
3893
|
+
return typeof In != "function" || typeof Symbol != "function" || typeof In("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : cs();
|
|
3894
|
+
}, jt = {
|
|
3757
3895
|
__proto__: null,
|
|
3758
3896
|
foo: {}
|
|
3759
|
-
},
|
|
3760
|
-
return { __proto__:
|
|
3761
|
-
},
|
|
3897
|
+
}, ds = Object, ps = function() {
|
|
3898
|
+
return { __proto__: jt }.foo === jt.foo && !(jt instanceof ds);
|
|
3899
|
+
}, fs = "Function.prototype.bind called on incompatible ", ms = Object.prototype.toString, hs = Math.max, ys = "[object Function]", _n = function(t, n) {
|
|
3762
3900
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
3763
3901
|
a[s] = t[s];
|
|
3764
3902
|
for (var i = 0; i < n.length; i += 1)
|
|
3765
3903
|
a[i + t.length] = n[i];
|
|
3766
3904
|
return a;
|
|
3767
|
-
},
|
|
3905
|
+
}, vs = function(t, n) {
|
|
3768
3906
|
for (var a = [], s = n, i = 0; s < t.length; s += 1, i += 1)
|
|
3769
3907
|
a[i] = t[s];
|
|
3770
3908
|
return a;
|
|
3771
|
-
},
|
|
3909
|
+
}, gs = function(e, t) {
|
|
3772
3910
|
for (var n = "", a = 0; a < e.length; a += 1)
|
|
3773
3911
|
n += e[a], a + 1 < e.length && (n += t);
|
|
3774
3912
|
return n;
|
|
3775
|
-
},
|
|
3913
|
+
}, bs = function(t) {
|
|
3776
3914
|
var n = this;
|
|
3777
|
-
if (typeof n != "function" ||
|
|
3778
|
-
throw new TypeError(
|
|
3779
|
-
for (var a =
|
|
3915
|
+
if (typeof n != "function" || ms.apply(n) !== ys)
|
|
3916
|
+
throw new TypeError(fs + n);
|
|
3917
|
+
for (var a = vs(arguments, 1), s, i = function() {
|
|
3780
3918
|
if (this instanceof s) {
|
|
3781
3919
|
var u = n.apply(
|
|
3782
3920
|
this,
|
|
3783
|
-
|
|
3921
|
+
_n(a, arguments)
|
|
3784
3922
|
);
|
|
3785
3923
|
return Object(u) === u ? u : this;
|
|
3786
3924
|
}
|
|
3787
3925
|
return n.apply(
|
|
3788
3926
|
t,
|
|
3789
|
-
|
|
3927
|
+
_n(a, arguments)
|
|
3790
3928
|
);
|
|
3791
|
-
}, r =
|
|
3929
|
+
}, r = hs(0, n.length - a.length), o = [], l = 0; l < r; l++)
|
|
3792
3930
|
o[l] = "$" + l;
|
|
3793
|
-
if (s = Function("binder", "return function (" +
|
|
3931
|
+
if (s = Function("binder", "return function (" + gs(o, ",") + "){ return binder.apply(this,arguments); }")(i), n.prototype) {
|
|
3794
3932
|
var c = function() {
|
|
3795
3933
|
};
|
|
3796
3934
|
c.prototype = n.prototype, s.prototype = new c(), c.prototype = null;
|
|
3797
3935
|
}
|
|
3798
3936
|
return s;
|
|
3799
|
-
},
|
|
3937
|
+
}, xs = bs, on = Function.prototype.bind || xs, ks = Function.prototype.call, $s = Object.prototype.hasOwnProperty, Ss = on, ws = Ss.call(ks, $s), T, js = rs, Ns = as, Ts = is, Os = os, qe = Dr, Re = Ge, Cs = ss, Jr = Function, Nt = function(e) {
|
|
3800
3938
|
try {
|
|
3801
|
-
return
|
|
3939
|
+
return Jr('"use strict"; return (' + e + ").constructor;")();
|
|
3802
3940
|
} catch {
|
|
3803
3941
|
}
|
|
3804
3942
|
}, Se = Object.getOwnPropertyDescriptor;
|
|
@@ -3808,26 +3946,26 @@ if (Se)
|
|
|
3808
3946
|
} catch {
|
|
3809
3947
|
Se = null;
|
|
3810
3948
|
}
|
|
3811
|
-
var
|
|
3949
|
+
var Tt = function() {
|
|
3812
3950
|
throw new Re();
|
|
3813
|
-
},
|
|
3951
|
+
}, Ps = Se ? function() {
|
|
3814
3952
|
try {
|
|
3815
|
-
return arguments.callee,
|
|
3953
|
+
return arguments.callee, Tt;
|
|
3816
3954
|
} catch {
|
|
3817
3955
|
try {
|
|
3818
3956
|
return Se(arguments, "callee").get;
|
|
3819
3957
|
} catch {
|
|
3820
|
-
return
|
|
3958
|
+
return Tt;
|
|
3821
3959
|
}
|
|
3822
3960
|
}
|
|
3823
|
-
}() :
|
|
3961
|
+
}() : Tt, Ne = us(), Es = ps(), W = Object.getPrototypeOf || (Es ? function(e) {
|
|
3824
3962
|
return e.__proto__;
|
|
3825
|
-
} : null), Pe = {},
|
|
3963
|
+
} : null), Pe = {}, Rs = typeof Uint8Array > "u" || !W ? T : W(Uint8Array), we = {
|
|
3826
3964
|
__proto__: null,
|
|
3827
3965
|
"%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
|
|
3828
3966
|
"%Array%": Array,
|
|
3829
3967
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? T : ArrayBuffer,
|
|
3830
|
-
"%ArrayIteratorPrototype%": Ne &&
|
|
3968
|
+
"%ArrayIteratorPrototype%": Ne && W ? W([][Symbol.iterator]()) : T,
|
|
3831
3969
|
"%AsyncFromSyncIteratorPrototype%": T,
|
|
3832
3970
|
"%AsyncFunction%": Pe,
|
|
3833
3971
|
"%AsyncGenerator%": Pe,
|
|
@@ -3844,24 +3982,24 @@ var wt = function() {
|
|
|
3844
3982
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3845
3983
|
"%encodeURI%": encodeURI,
|
|
3846
3984
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3847
|
-
"%Error%":
|
|
3985
|
+
"%Error%": js,
|
|
3848
3986
|
"%eval%": eval,
|
|
3849
3987
|
// eslint-disable-line no-eval
|
|
3850
|
-
"%EvalError%":
|
|
3988
|
+
"%EvalError%": Ns,
|
|
3851
3989
|
"%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
|
|
3852
3990
|
"%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
|
|
3853
3991
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
|
|
3854
|
-
"%Function%":
|
|
3992
|
+
"%Function%": Jr,
|
|
3855
3993
|
"%GeneratorFunction%": Pe,
|
|
3856
3994
|
"%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
|
|
3857
3995
|
"%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
|
|
3858
3996
|
"%Int32Array%": typeof Int32Array > "u" ? T : Int32Array,
|
|
3859
3997
|
"%isFinite%": isFinite,
|
|
3860
3998
|
"%isNaN%": isNaN,
|
|
3861
|
-
"%IteratorPrototype%": Ne &&
|
|
3999
|
+
"%IteratorPrototype%": Ne && W ? W(W([][Symbol.iterator]())) : T,
|
|
3862
4000
|
"%JSON%": typeof JSON == "object" ? JSON : T,
|
|
3863
4001
|
"%Map%": typeof Map > "u" ? T : Map,
|
|
3864
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !Ne || !
|
|
4002
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Ne || !W ? T : W((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
3865
4003
|
"%Math%": Math,
|
|
3866
4004
|
"%Number%": Number,
|
|
3867
4005
|
"%Object%": Object,
|
|
@@ -3869,53 +4007,53 @@ var wt = function() {
|
|
|
3869
4007
|
"%parseInt%": parseInt,
|
|
3870
4008
|
"%Promise%": typeof Promise > "u" ? T : Promise,
|
|
3871
4009
|
"%Proxy%": typeof Proxy > "u" ? T : Proxy,
|
|
3872
|
-
"%RangeError%":
|
|
3873
|
-
"%ReferenceError%":
|
|
4010
|
+
"%RangeError%": Ts,
|
|
4011
|
+
"%ReferenceError%": Os,
|
|
3874
4012
|
"%Reflect%": typeof Reflect > "u" ? T : Reflect,
|
|
3875
4013
|
"%RegExp%": RegExp,
|
|
3876
4014
|
"%Set%": typeof Set > "u" ? T : Set,
|
|
3877
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !Ne || !
|
|
4015
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Ne || !W ? T : W((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
3878
4016
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? T : SharedArrayBuffer,
|
|
3879
4017
|
"%String%": String,
|
|
3880
|
-
"%StringIteratorPrototype%": Ne &&
|
|
4018
|
+
"%StringIteratorPrototype%": Ne && W ? W(""[Symbol.iterator]()) : T,
|
|
3881
4019
|
"%Symbol%": Ne ? Symbol : T,
|
|
3882
4020
|
"%SyntaxError%": qe,
|
|
3883
|
-
"%ThrowTypeError%":
|
|
3884
|
-
"%TypedArray%":
|
|
4021
|
+
"%ThrowTypeError%": Ps,
|
|
4022
|
+
"%TypedArray%": Rs,
|
|
3885
4023
|
"%TypeError%": Re,
|
|
3886
4024
|
"%Uint8Array%": typeof Uint8Array > "u" ? T : Uint8Array,
|
|
3887
4025
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? T : Uint8ClampedArray,
|
|
3888
4026
|
"%Uint16Array%": typeof Uint16Array > "u" ? T : Uint16Array,
|
|
3889
4027
|
"%Uint32Array%": typeof Uint32Array > "u" ? T : Uint32Array,
|
|
3890
|
-
"%URIError%":
|
|
4028
|
+
"%URIError%": Cs,
|
|
3891
4029
|
"%WeakMap%": typeof WeakMap > "u" ? T : WeakMap,
|
|
3892
4030
|
"%WeakRef%": typeof WeakRef > "u" ? T : WeakRef,
|
|
3893
4031
|
"%WeakSet%": typeof WeakSet > "u" ? T : WeakSet
|
|
3894
4032
|
};
|
|
3895
|
-
if (
|
|
4033
|
+
if (W)
|
|
3896
4034
|
try {
|
|
3897
4035
|
null.error;
|
|
3898
4036
|
} catch (e) {
|
|
3899
|
-
var
|
|
3900
|
-
we["%Error.prototype%"] =
|
|
4037
|
+
var As = W(W(e));
|
|
4038
|
+
we["%Error.prototype%"] = As;
|
|
3901
4039
|
}
|
|
3902
|
-
var
|
|
4040
|
+
var qs = function e(t) {
|
|
3903
4041
|
var n;
|
|
3904
4042
|
if (t === "%AsyncFunction%")
|
|
3905
|
-
n =
|
|
4043
|
+
n = Nt("async function () {}");
|
|
3906
4044
|
else if (t === "%GeneratorFunction%")
|
|
3907
|
-
n =
|
|
4045
|
+
n = Nt("function* () {}");
|
|
3908
4046
|
else if (t === "%AsyncGeneratorFunction%")
|
|
3909
|
-
n =
|
|
4047
|
+
n = Nt("async function* () {}");
|
|
3910
4048
|
else if (t === "%AsyncGenerator%") {
|
|
3911
4049
|
var a = e("%AsyncGeneratorFunction%");
|
|
3912
4050
|
a && (n = a.prototype);
|
|
3913
4051
|
} else if (t === "%AsyncIteratorPrototype%") {
|
|
3914
4052
|
var s = e("%AsyncGenerator%");
|
|
3915
|
-
s &&
|
|
4053
|
+
s && W && (n = W(s.prototype));
|
|
3916
4054
|
}
|
|
3917
4055
|
return we[t] = n, n;
|
|
3918
|
-
},
|
|
4056
|
+
}, Ln = {
|
|
3919
4057
|
__proto__: null,
|
|
3920
4058
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3921
4059
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -3968,21 +4106,21 @@ var vs = function e(t) {
|
|
|
3968
4106
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3969
4107
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3970
4108
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3971
|
-
}, Qe =
|
|
4109
|
+
}, Qe = on, ct = ws, Fs = Qe.call(Function.call, Array.prototype.concat), Is = Qe.call(Function.apply, Array.prototype.splice), Un = Qe.call(Function.call, String.prototype.replace), ut = Qe.call(Function.call, String.prototype.slice), _s = Qe.call(Function.call, RegExp.prototype.exec), Ls = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Us = /\\(\\)?/g, Ms = function(t) {
|
|
3972
4110
|
var n = ut(t, 0, 1), a = ut(t, -1);
|
|
3973
4111
|
if (n === "%" && a !== "%")
|
|
3974
4112
|
throw new qe("invalid intrinsic syntax, expected closing `%`");
|
|
3975
4113
|
if (a === "%" && n !== "%")
|
|
3976
4114
|
throw new qe("invalid intrinsic syntax, expected opening `%`");
|
|
3977
4115
|
var s = [];
|
|
3978
|
-
return
|
|
3979
|
-
s[s.length] = o ?
|
|
4116
|
+
return Un(t, Ls, function(i, r, o, l) {
|
|
4117
|
+
s[s.length] = o ? Un(l, Us, "$1") : r || i;
|
|
3980
4118
|
}), s;
|
|
3981
|
-
},
|
|
4119
|
+
}, Hs = function(t, n) {
|
|
3982
4120
|
var a = t, s;
|
|
3983
|
-
if (ct(
|
|
4121
|
+
if (ct(Ln, a) && (s = Ln[a], a = "%" + s[0] + "%"), ct(we, a)) {
|
|
3984
4122
|
var i = we[a];
|
|
3985
|
-
if (i === Pe && (i =
|
|
4123
|
+
if (i === Pe && (i = qs(a)), typeof i > "u" && !n)
|
|
3986
4124
|
throw new Re("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
3987
4125
|
return {
|
|
3988
4126
|
alias: s,
|
|
@@ -3996,10 +4134,10 @@ var vs = function e(t) {
|
|
|
3996
4134
|
throw new Re("intrinsic name must be a non-empty string");
|
|
3997
4135
|
if (arguments.length > 1 && typeof n != "boolean")
|
|
3998
4136
|
throw new Re('"allowMissing" argument must be a boolean');
|
|
3999
|
-
if (
|
|
4137
|
+
if (_s(/^%?[^%]*%?$/, t) === null)
|
|
4000
4138
|
throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4001
|
-
var a =
|
|
4002
|
-
c && (s = c[0],
|
|
4139
|
+
var a = Ms(t), s = a.length > 0 ? a[0] : "", i = Hs("%" + s + "%", n), r = i.name, o = i.value, l = !1, c = i.alias;
|
|
4140
|
+
c && (s = c[0], Is(a, Fs([0, 1], c)));
|
|
4003
4141
|
for (var u = 1, f = !0; u < a.length; u += 1) {
|
|
4004
4142
|
var d = a[u], m = ut(d, 0, 1), h = ut(d, -1);
|
|
4005
4143
|
if ((m === '"' || m === "'" || m === "`" || h === '"' || h === "'" || h === "`") && m !== h)
|
|
@@ -4021,10 +4159,10 @@ var vs = function e(t) {
|
|
|
4021
4159
|
}
|
|
4022
4160
|
}
|
|
4023
4161
|
return o;
|
|
4024
|
-
},
|
|
4025
|
-
function
|
|
4026
|
-
if (
|
|
4027
|
-
|
|
4162
|
+
}, Wr = { exports: {} }, Ot, Mn;
|
|
4163
|
+
function sn() {
|
|
4164
|
+
if (Mn) return Ot;
|
|
4165
|
+
Mn = 1;
|
|
4028
4166
|
var e = _e, t = e("%Object.defineProperty%", !0) || !1;
|
|
4029
4167
|
if (t)
|
|
4030
4168
|
try {
|
|
@@ -4032,16 +4170,16 @@ function nn() {
|
|
|
4032
4170
|
} catch {
|
|
4033
4171
|
t = !1;
|
|
4034
4172
|
}
|
|
4035
|
-
return
|
|
4173
|
+
return Ot = t, Ot;
|
|
4036
4174
|
}
|
|
4037
|
-
var
|
|
4175
|
+
var Bs = _e, nt = Bs("%Object.getOwnPropertyDescriptor%", !0);
|
|
4038
4176
|
if (nt)
|
|
4039
4177
|
try {
|
|
4040
4178
|
nt([], "length");
|
|
4041
4179
|
} catch {
|
|
4042
4180
|
nt = null;
|
|
4043
4181
|
}
|
|
4044
|
-
var
|
|
4182
|
+
var Gr = nt, Hn = sn(), Vs = Dr, Te = Ge, Bn = Gr, zs = function(t, n, a) {
|
|
4045
4183
|
if (!t || typeof t != "object" && typeof t != "function")
|
|
4046
4184
|
throw new Te("`obj` must be an object or a function`");
|
|
4047
4185
|
if (typeof n != "string" && typeof n != "symbol")
|
|
@@ -4054,9 +4192,9 @@ var Mr = nt, Fn = nn(), Ns = Lr, Te = Ge, In = Mr, Ts = function(t, n, a) {
|
|
|
4054
4192
|
throw new Te("`nonConfigurable`, if provided, must be a boolean or null");
|
|
4055
4193
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
4056
4194
|
throw new Te("`loose`, if provided, must be a boolean");
|
|
4057
|
-
var s = arguments.length > 3 ? arguments[3] : null, i = arguments.length > 4 ? arguments[4] : null, r = arguments.length > 5 ? arguments[5] : null, o = arguments.length > 6 ? arguments[6] : !1, l = !!
|
|
4058
|
-
if (
|
|
4059
|
-
|
|
4195
|
+
var s = arguments.length > 3 ? arguments[3] : null, i = arguments.length > 4 ? arguments[4] : null, r = arguments.length > 5 ? arguments[5] : null, o = arguments.length > 6 ? arguments[6] : !1, l = !!Bn && Bn(t, n);
|
|
4196
|
+
if (Hn)
|
|
4197
|
+
Hn(t, n, {
|
|
4060
4198
|
configurable: r === null && l ? l.configurable : !r,
|
|
4061
4199
|
enumerable: s === null && l ? l.enumerable : !s,
|
|
4062
4200
|
value: a,
|
|
@@ -4065,37 +4203,37 @@ var Mr = nt, Fn = nn(), Ns = Lr, Te = Ge, In = Mr, Ts = function(t, n, a) {
|
|
|
4065
4203
|
else if (o || !s && !i && !r)
|
|
4066
4204
|
t[n] = a;
|
|
4067
4205
|
else
|
|
4068
|
-
throw new
|
|
4069
|
-
},
|
|
4070
|
-
return !!
|
|
4206
|
+
throw new Vs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4207
|
+
}, Ht = sn(), Qr = function() {
|
|
4208
|
+
return !!Ht;
|
|
4071
4209
|
};
|
|
4072
|
-
|
|
4073
|
-
if (!
|
|
4210
|
+
Qr.hasArrayLengthDefineBug = function() {
|
|
4211
|
+
if (!Ht)
|
|
4074
4212
|
return null;
|
|
4075
4213
|
try {
|
|
4076
|
-
return
|
|
4214
|
+
return Ht([], "length", { value: 1 }).length !== 1;
|
|
4077
4215
|
} catch {
|
|
4078
4216
|
return !0;
|
|
4079
4217
|
}
|
|
4080
4218
|
};
|
|
4081
|
-
var
|
|
4219
|
+
var Ds = Qr, Js = _e, Vn = zs, Ws = Ds(), zn = Gr, Dn = Ge, Gs = Js("%Math.floor%"), Qs = function(t, n) {
|
|
4082
4220
|
if (typeof t != "function")
|
|
4083
|
-
throw new
|
|
4084
|
-
if (typeof n != "number" || n < 0 || n > 4294967295 ||
|
|
4085
|
-
throw new
|
|
4221
|
+
throw new Dn("`fn` is not a function");
|
|
4222
|
+
if (typeof n != "number" || n < 0 || n > 4294967295 || Gs(n) !== n)
|
|
4223
|
+
throw new Dn("`length` must be a positive 32-bit integer");
|
|
4086
4224
|
var a = arguments.length > 2 && !!arguments[2], s = !0, i = !0;
|
|
4087
|
-
if ("length" in t &&
|
|
4088
|
-
var r =
|
|
4225
|
+
if ("length" in t && zn) {
|
|
4226
|
+
var r = zn(t, "length");
|
|
4089
4227
|
r && !r.configurable && (s = !1), r && !r.writable && (i = !1);
|
|
4090
4228
|
}
|
|
4091
|
-
return (s || i || !a) && (
|
|
4229
|
+
return (s || i || !a) && (Ws ? Vn(
|
|
4092
4230
|
/** @type {Parameters<define>[0]} */
|
|
4093
4231
|
t,
|
|
4094
4232
|
"length",
|
|
4095
4233
|
n,
|
|
4096
4234
|
!0,
|
|
4097
4235
|
!0
|
|
4098
|
-
) :
|
|
4236
|
+
) : Vn(
|
|
4099
4237
|
/** @type {Parameters<define>[0]} */
|
|
4100
4238
|
t,
|
|
4101
4239
|
"length",
|
|
@@ -4103,7 +4241,7 @@ var Os = Br, Cs = _e, _n = Ts, Ps = Os(), Ln = Mr, Un = Ge, Es = Cs("%Math.floor
|
|
|
4103
4241
|
)), t;
|
|
4104
4242
|
};
|
|
4105
4243
|
(function(e) {
|
|
4106
|
-
var t =
|
|
4244
|
+
var t = on, n = _e, a = Qs, s = Ge, i = n("%Function.prototype.apply%"), r = n("%Function.prototype.call%"), o = n("%Reflect.apply%", !0) || t.call(r, i), l = sn(), c = n("%Math.max%");
|
|
4107
4245
|
e.exports = function(d) {
|
|
4108
4246
|
if (typeof d != "function")
|
|
4109
4247
|
throw new s("a function is required");
|
|
@@ -4118,32 +4256,32 @@ var Os = Br, Cs = _e, _n = Ts, Ps = Os(), Ln = Mr, Un = Ge, Es = Cs("%Math.floor
|
|
|
4118
4256
|
return o(t, i, arguments);
|
|
4119
4257
|
};
|
|
4120
4258
|
l ? l(e.exports, "apply", { value: u }) : e.exports.apply = u;
|
|
4121
|
-
})(
|
|
4122
|
-
var
|
|
4123
|
-
var a =
|
|
4124
|
-
return typeof a == "function" &&
|
|
4259
|
+
})(Wr);
|
|
4260
|
+
var Ks = Wr.exports, Kr = _e, Yr = Ks, Ys = Yr(Kr("String.prototype.indexOf")), Xs = function(t, n) {
|
|
4261
|
+
var a = Kr(t, !!n);
|
|
4262
|
+
return typeof a == "function" && Ys(t, ".prototype.") > -1 ? Yr(a) : a;
|
|
4125
4263
|
};
|
|
4126
|
-
const
|
|
4264
|
+
const Zs = {}, el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4127
4265
|
__proto__: null,
|
|
4128
|
-
default:
|
|
4129
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4130
|
-
var
|
|
4266
|
+
default: Zs
|
|
4267
|
+
}, Symbol.toStringTag, { value: "Module" })), tl = /* @__PURE__ */ Ja(el);
|
|
4268
|
+
var ln = typeof Map == "function" && Map.prototype, Ct = Object.getOwnPropertyDescriptor && ln ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, dt = ln && Ct && typeof Ct.get == "function" ? Ct.get : null, Jn = ln && Map.prototype.forEach, cn = typeof Set == "function" && Set.prototype, Pt = Object.getOwnPropertyDescriptor && cn ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, pt = cn && Pt && typeof Pt.get == "function" ? Pt.get : null, Wn = cn && Set.prototype.forEach, nl = typeof WeakMap == "function" && WeakMap.prototype, He = nl ? WeakMap.prototype.has : null, rl = typeof WeakSet == "function" && WeakSet.prototype, Be = rl ? WeakSet.prototype.has : null, al = typeof WeakRef == "function" && WeakRef.prototype, Gn = al ? WeakRef.prototype.deref : null, il = Boolean.prototype.valueOf, ol = Object.prototype.toString, sl = Function.prototype.toString, ll = String.prototype.match, un = String.prototype.slice, ge = String.prototype.replace, cl = String.prototype.toUpperCase, Qn = String.prototype.toLowerCase, Xr = RegExp.prototype.test, Kn = Array.prototype.concat, ue = Array.prototype.join, ul = Array.prototype.slice, Yn = Math.floor, Bt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Et = Object.getOwnPropertySymbols, Vt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Fe = typeof Symbol == "function" && typeof Symbol.iterator == "object", ee = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Fe || !0) ? Symbol.toStringTag : null, Zr = Object.prototype.propertyIsEnumerable, Xn = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
4131
4269
|
return e.__proto__;
|
|
4132
4270
|
} : null);
|
|
4133
|
-
function
|
|
4134
|
-
if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 ||
|
|
4271
|
+
function Zn(e, t) {
|
|
4272
|
+
if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 || Xr.call(/e/, t))
|
|
4135
4273
|
return t;
|
|
4136
4274
|
var n = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
4137
4275
|
if (typeof e == "number") {
|
|
4138
|
-
var a = e < 0 ? -
|
|
4276
|
+
var a = e < 0 ? -Yn(-e) : Yn(e);
|
|
4139
4277
|
if (a !== e) {
|
|
4140
|
-
var s = String(a), i =
|
|
4278
|
+
var s = String(a), i = un.call(t, s.length + 1);
|
|
4141
4279
|
return ge.call(s, n, "$&_") + "." + ge.call(ge.call(i, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
4142
4280
|
}
|
|
4143
4281
|
}
|
|
4144
4282
|
return ge.call(t, n, "$&_");
|
|
4145
4283
|
}
|
|
4146
|
-
var
|
|
4284
|
+
var zt = tl, er = zt.custom, tr = ta(er) ? er : null, dl = function e(t, n, a, s) {
|
|
4147
4285
|
var i = n || {};
|
|
4148
4286
|
if (ve(i, "quoteStyle") && i.quoteStyle !== "single" && i.quoteStyle !== "double")
|
|
4149
4287
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -4164,165 +4302,165 @@ var Ht = Ls, Gn = Ht.custom, Qn = Gr(Gn) ? Gn : null, Gs = function e(t, n, a, s
|
|
|
4164
4302
|
if (typeof t == "boolean")
|
|
4165
4303
|
return t ? "true" : "false";
|
|
4166
4304
|
if (typeof t == "string")
|
|
4167
|
-
return
|
|
4305
|
+
return ra(t, i);
|
|
4168
4306
|
if (typeof t == "number") {
|
|
4169
4307
|
if (t === 0)
|
|
4170
4308
|
return 1 / 0 / t > 0 ? "0" : "-0";
|
|
4171
4309
|
var l = String(t);
|
|
4172
|
-
return o ?
|
|
4310
|
+
return o ? Zn(t, l) : l;
|
|
4173
4311
|
}
|
|
4174
4312
|
if (typeof t == "bigint") {
|
|
4175
4313
|
var c = String(t) + "n";
|
|
4176
|
-
return o ?
|
|
4314
|
+
return o ? Zn(t, c) : c;
|
|
4177
4315
|
}
|
|
4178
4316
|
var u = typeof i.depth > "u" ? 5 : i.depth;
|
|
4179
4317
|
if (typeof a > "u" && (a = 0), a >= u && u > 0 && typeof t == "object")
|
|
4180
|
-
return
|
|
4181
|
-
var f =
|
|
4318
|
+
return Dt(t) ? "[Array]" : "[Object]";
|
|
4319
|
+
var f = Cl(i, a);
|
|
4182
4320
|
if (typeof s > "u")
|
|
4183
4321
|
s = [];
|
|
4184
|
-
else if (
|
|
4322
|
+
else if (na(s, t) >= 0)
|
|
4185
4323
|
return "[Circular]";
|
|
4186
|
-
function d(
|
|
4187
|
-
if (z && (s =
|
|
4188
|
-
var
|
|
4324
|
+
function d(I, z, B) {
|
|
4325
|
+
if (z && (s = ul.call(s), s.push(z)), B) {
|
|
4326
|
+
var D = {
|
|
4189
4327
|
depth: i.depth
|
|
4190
4328
|
};
|
|
4191
|
-
return ve(i, "quoteStyle") && (
|
|
4329
|
+
return ve(i, "quoteStyle") && (D.quoteStyle = i.quoteStyle), e(I, D, a + 1, s);
|
|
4192
4330
|
}
|
|
4193
|
-
return e(
|
|
4331
|
+
return e(I, i, a + 1, s);
|
|
4194
4332
|
}
|
|
4195
|
-
if (typeof t == "function" && !
|
|
4196
|
-
var m =
|
|
4333
|
+
if (typeof t == "function" && !nr(t)) {
|
|
4334
|
+
var m = xl(t), h = Ke(t, d);
|
|
4197
4335
|
return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + ue.call(h, ", ") + " }" : "");
|
|
4198
4336
|
}
|
|
4199
|
-
if (
|
|
4200
|
-
var v = Fe ? ge.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") :
|
|
4337
|
+
if (ta(t)) {
|
|
4338
|
+
var v = Fe ? ge.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : Vt.call(t);
|
|
4201
4339
|
return typeof t == "object" && !Fe ? Ue(v) : v;
|
|
4202
4340
|
}
|
|
4203
|
-
if (
|
|
4204
|
-
for (var g = "<" +
|
|
4205
|
-
g += " " + b[y].name + "=" +
|
|
4206
|
-
return g += ">", t.childNodes && t.childNodes.length && (g += "..."), g += "</" +
|
|
4341
|
+
if (Nl(t)) {
|
|
4342
|
+
for (var g = "<" + Qn.call(String(t.nodeName)), b = t.attributes || [], y = 0; y < b.length; y++)
|
|
4343
|
+
g += " " + b[y].name + "=" + ea(pl(b[y].value), "double", i);
|
|
4344
|
+
return g += ">", t.childNodes && t.childNodes.length && (g += "..."), g += "</" + Qn.call(String(t.nodeName)) + ">", g;
|
|
4207
4345
|
}
|
|
4208
|
-
if (
|
|
4346
|
+
if (Dt(t)) {
|
|
4209
4347
|
if (t.length === 0)
|
|
4210
4348
|
return "[]";
|
|
4211
4349
|
var x = Ke(t, d);
|
|
4212
|
-
return f && !
|
|
4350
|
+
return f && !Ol(x) ? "[" + Jt(x, f) + "]" : "[ " + ue.call(x, ", ") + " ]";
|
|
4213
4351
|
}
|
|
4214
|
-
if (
|
|
4352
|
+
if (ml(t)) {
|
|
4215
4353
|
var k = Ke(t, d);
|
|
4216
|
-
return !("cause" in Error.prototype) && "cause" in t && !
|
|
4354
|
+
return !("cause" in Error.prototype) && "cause" in t && !Zr.call(t, "cause") ? "{ [" + String(t) + "] " + ue.call(Kn.call("[cause]: " + d(t.cause), k), ", ") + " }" : k.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ue.call(k, ", ") + " }";
|
|
4217
4355
|
}
|
|
4218
4356
|
if (typeof t == "object" && r) {
|
|
4219
|
-
if (
|
|
4220
|
-
return
|
|
4357
|
+
if (tr && typeof t[tr] == "function" && zt)
|
|
4358
|
+
return zt(t, { depth: u - a });
|
|
4221
4359
|
if (r !== "symbol" && typeof t.inspect == "function")
|
|
4222
4360
|
return t.inspect();
|
|
4223
4361
|
}
|
|
4224
|
-
if (
|
|
4362
|
+
if (kl(t)) {
|
|
4225
4363
|
var S = [];
|
|
4226
|
-
return
|
|
4227
|
-
S.push(d(z, t, !0) + " => " + d(
|
|
4228
|
-
}),
|
|
4364
|
+
return Jn && Jn.call(t, function(I, z) {
|
|
4365
|
+
S.push(d(z, t, !0) + " => " + d(I, t));
|
|
4366
|
+
}), rr("Map", dt.call(t), S, f);
|
|
4229
4367
|
}
|
|
4230
|
-
if (
|
|
4368
|
+
if (wl(t)) {
|
|
4231
4369
|
var j = [];
|
|
4232
|
-
return
|
|
4233
|
-
j.push(d(
|
|
4234
|
-
}),
|
|
4235
|
-
}
|
|
4236
|
-
if (
|
|
4237
|
-
return
|
|
4238
|
-
if (
|
|
4239
|
-
return
|
|
4240
|
-
if (
|
|
4241
|
-
return
|
|
4242
|
-
if (
|
|
4370
|
+
return Wn && Wn.call(t, function(I) {
|
|
4371
|
+
j.push(d(I, t));
|
|
4372
|
+
}), rr("Set", pt.call(t), j, f);
|
|
4373
|
+
}
|
|
4374
|
+
if ($l(t))
|
|
4375
|
+
return Rt("WeakMap");
|
|
4376
|
+
if (jl(t))
|
|
4377
|
+
return Rt("WeakSet");
|
|
4378
|
+
if (Sl(t))
|
|
4379
|
+
return Rt("WeakRef");
|
|
4380
|
+
if (yl(t))
|
|
4243
4381
|
return Ue(d(Number(t)));
|
|
4244
|
-
if (
|
|
4245
|
-
return Ue(d(
|
|
4246
|
-
if (
|
|
4247
|
-
return Ue(
|
|
4248
|
-
if (
|
|
4382
|
+
if (gl(t))
|
|
4383
|
+
return Ue(d(Bt.call(t)));
|
|
4384
|
+
if (vl(t))
|
|
4385
|
+
return Ue(il.call(t));
|
|
4386
|
+
if (hl(t))
|
|
4249
4387
|
return Ue(d(String(t)));
|
|
4250
4388
|
if (typeof window < "u" && t === window)
|
|
4251
4389
|
return "{ [object Window] }";
|
|
4252
|
-
if (typeof globalThis < "u" && t === globalThis || typeof
|
|
4390
|
+
if (typeof globalThis < "u" && t === globalThis || typeof Me < "u" && t === Me)
|
|
4253
4391
|
return "{ [object globalThis] }";
|
|
4254
|
-
if (!
|
|
4255
|
-
var
|
|
4256
|
-
return
|
|
4392
|
+
if (!fl(t) && !nr(t)) {
|
|
4393
|
+
var R = Ke(t, d), E = Xn ? Xn(t) === Object.prototype : t instanceof Object || t.constructor === Object, A = t instanceof Object ? "" : "null prototype", H = !E && ee && Object(t) === t && ee in t ? un.call(be(t), 8, -1) : A ? "Object" : "", $ = E || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", L = $ + (H || A ? "[" + ue.call(Kn.call([], H || [], A || []), ": ") + "] " : "");
|
|
4394
|
+
return R.length === 0 ? L + "{}" : f ? L + "{" + Jt(R, f) + "}" : L + "{ " + ue.call(R, ", ") + " }";
|
|
4257
4395
|
}
|
|
4258
4396
|
return String(t);
|
|
4259
4397
|
};
|
|
4260
|
-
function
|
|
4398
|
+
function ea(e, t, n) {
|
|
4261
4399
|
var a = (n.quoteStyle || t) === "double" ? '"' : "'";
|
|
4262
4400
|
return a + e + a;
|
|
4263
4401
|
}
|
|
4264
|
-
function
|
|
4402
|
+
function pl(e) {
|
|
4265
4403
|
return ge.call(String(e), /"/g, """);
|
|
4266
4404
|
}
|
|
4267
|
-
function
|
|
4405
|
+
function Dt(e) {
|
|
4268
4406
|
return be(e) === "[object Array]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4269
4407
|
}
|
|
4270
|
-
function
|
|
4408
|
+
function fl(e) {
|
|
4271
4409
|
return be(e) === "[object Date]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4272
4410
|
}
|
|
4273
|
-
function
|
|
4411
|
+
function nr(e) {
|
|
4274
4412
|
return be(e) === "[object RegExp]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4275
4413
|
}
|
|
4276
|
-
function
|
|
4414
|
+
function ml(e) {
|
|
4277
4415
|
return be(e) === "[object Error]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4278
4416
|
}
|
|
4279
|
-
function
|
|
4417
|
+
function hl(e) {
|
|
4280
4418
|
return be(e) === "[object String]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4281
4419
|
}
|
|
4282
|
-
function
|
|
4420
|
+
function yl(e) {
|
|
4283
4421
|
return be(e) === "[object Number]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4284
4422
|
}
|
|
4285
|
-
function
|
|
4423
|
+
function vl(e) {
|
|
4286
4424
|
return be(e) === "[object Boolean]" && (!ee || !(typeof e == "object" && ee in e));
|
|
4287
4425
|
}
|
|
4288
|
-
function
|
|
4426
|
+
function ta(e) {
|
|
4289
4427
|
if (Fe)
|
|
4290
4428
|
return e && typeof e == "object" && e instanceof Symbol;
|
|
4291
4429
|
if (typeof e == "symbol")
|
|
4292
4430
|
return !0;
|
|
4293
|
-
if (!e || typeof e != "object" || !
|
|
4431
|
+
if (!e || typeof e != "object" || !Vt)
|
|
4294
4432
|
return !1;
|
|
4295
4433
|
try {
|
|
4296
|
-
return
|
|
4434
|
+
return Vt.call(e), !0;
|
|
4297
4435
|
} catch {
|
|
4298
4436
|
}
|
|
4299
4437
|
return !1;
|
|
4300
4438
|
}
|
|
4301
|
-
function
|
|
4302
|
-
if (!e || typeof e != "object" || !
|
|
4439
|
+
function gl(e) {
|
|
4440
|
+
if (!e || typeof e != "object" || !Bt)
|
|
4303
4441
|
return !1;
|
|
4304
4442
|
try {
|
|
4305
|
-
return
|
|
4443
|
+
return Bt.call(e), !0;
|
|
4306
4444
|
} catch {
|
|
4307
4445
|
}
|
|
4308
4446
|
return !1;
|
|
4309
4447
|
}
|
|
4310
|
-
var
|
|
4448
|
+
var bl = Object.prototype.hasOwnProperty || function(e) {
|
|
4311
4449
|
return e in this;
|
|
4312
4450
|
};
|
|
4313
4451
|
function ve(e, t) {
|
|
4314
|
-
return
|
|
4452
|
+
return bl.call(e, t);
|
|
4315
4453
|
}
|
|
4316
4454
|
function be(e) {
|
|
4317
|
-
return
|
|
4455
|
+
return ol.call(e);
|
|
4318
4456
|
}
|
|
4319
|
-
function
|
|
4457
|
+
function xl(e) {
|
|
4320
4458
|
if (e.name)
|
|
4321
4459
|
return e.name;
|
|
4322
|
-
var t =
|
|
4460
|
+
var t = ll.call(sl.call(e), /^function\s*([\w$]+)/);
|
|
4323
4461
|
return t ? t[1] : null;
|
|
4324
4462
|
}
|
|
4325
|
-
function
|
|
4463
|
+
function na(e, t) {
|
|
4326
4464
|
if (e.indexOf)
|
|
4327
4465
|
return e.indexOf(t);
|
|
4328
4466
|
for (var n = 0, a = e.length; n < a; n++)
|
|
@@ -4330,7 +4468,7 @@ function Qr(e, t) {
|
|
|
4330
4468
|
return n;
|
|
4331
4469
|
return -1;
|
|
4332
4470
|
}
|
|
4333
|
-
function
|
|
4471
|
+
function kl(e) {
|
|
4334
4472
|
if (!dt || !e || typeof e != "object")
|
|
4335
4473
|
return !1;
|
|
4336
4474
|
try {
|
|
@@ -4345,11 +4483,11 @@ function al(e) {
|
|
|
4345
4483
|
}
|
|
4346
4484
|
return !1;
|
|
4347
4485
|
}
|
|
4348
|
-
function
|
|
4349
|
-
if (!
|
|
4486
|
+
function $l(e) {
|
|
4487
|
+
if (!He || !e || typeof e != "object")
|
|
4350
4488
|
return !1;
|
|
4351
4489
|
try {
|
|
4352
|
-
|
|
4490
|
+
He.call(e, He);
|
|
4353
4491
|
try {
|
|
4354
4492
|
Be.call(e, Be);
|
|
4355
4493
|
} catch {
|
|
@@ -4360,16 +4498,16 @@ function il(e) {
|
|
|
4360
4498
|
}
|
|
4361
4499
|
return !1;
|
|
4362
4500
|
}
|
|
4363
|
-
function
|
|
4364
|
-
if (!
|
|
4501
|
+
function Sl(e) {
|
|
4502
|
+
if (!Gn || !e || typeof e != "object")
|
|
4365
4503
|
return !1;
|
|
4366
4504
|
try {
|
|
4367
|
-
return
|
|
4505
|
+
return Gn.call(e), !0;
|
|
4368
4506
|
} catch {
|
|
4369
4507
|
}
|
|
4370
4508
|
return !1;
|
|
4371
4509
|
}
|
|
4372
|
-
function
|
|
4510
|
+
function wl(e) {
|
|
4373
4511
|
if (!pt || !e || typeof e != "object")
|
|
4374
4512
|
return !1;
|
|
4375
4513
|
try {
|
|
@@ -4384,13 +4522,13 @@ function sl(e) {
|
|
|
4384
4522
|
}
|
|
4385
4523
|
return !1;
|
|
4386
4524
|
}
|
|
4387
|
-
function
|
|
4525
|
+
function jl(e) {
|
|
4388
4526
|
if (!Be || !e || typeof e != "object")
|
|
4389
4527
|
return !1;
|
|
4390
4528
|
try {
|
|
4391
4529
|
Be.call(e, Be);
|
|
4392
4530
|
try {
|
|
4393
|
-
|
|
4531
|
+
He.call(e, He);
|
|
4394
4532
|
} catch {
|
|
4395
4533
|
return !0;
|
|
4396
4534
|
}
|
|
@@ -4399,18 +4537,18 @@ function ll(e) {
|
|
|
4399
4537
|
}
|
|
4400
4538
|
return !1;
|
|
4401
4539
|
}
|
|
4402
|
-
function
|
|
4540
|
+
function Nl(e) {
|
|
4403
4541
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
4404
4542
|
}
|
|
4405
|
-
function
|
|
4543
|
+
function ra(e, t) {
|
|
4406
4544
|
if (e.length > t.maxStringLength) {
|
|
4407
4545
|
var n = e.length - t.maxStringLength, a = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
4408
|
-
return
|
|
4546
|
+
return ra(un.call(e, 0, t.maxStringLength), t) + a;
|
|
4409
4547
|
}
|
|
4410
|
-
var s = ge.call(ge.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
4411
|
-
return
|
|
4548
|
+
var s = ge.call(ge.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Tl);
|
|
4549
|
+
return ea(s, "single", t);
|
|
4412
4550
|
}
|
|
4413
|
-
function
|
|
4551
|
+
function Tl(e) {
|
|
4414
4552
|
var t = e.charCodeAt(0), n = {
|
|
4415
4553
|
8: "b",
|
|
4416
4554
|
9: "t",
|
|
@@ -4418,26 +4556,26 @@ function ul(e) {
|
|
|
4418
4556
|
12: "f",
|
|
4419
4557
|
13: "r"
|
|
4420
4558
|
}[t];
|
|
4421
|
-
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") +
|
|
4559
|
+
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + cl.call(t.toString(16));
|
|
4422
4560
|
}
|
|
4423
4561
|
function Ue(e) {
|
|
4424
4562
|
return "Object(" + e + ")";
|
|
4425
4563
|
}
|
|
4426
|
-
function
|
|
4564
|
+
function Rt(e) {
|
|
4427
4565
|
return e + " { ? }";
|
|
4428
4566
|
}
|
|
4429
|
-
function
|
|
4430
|
-
var s = a ?
|
|
4567
|
+
function rr(e, t, n, a) {
|
|
4568
|
+
var s = a ? Jt(n, a) : ue.call(n, ", ");
|
|
4431
4569
|
return e + " (" + t + ") {" + s + "}";
|
|
4432
4570
|
}
|
|
4433
|
-
function
|
|
4571
|
+
function Ol(e) {
|
|
4434
4572
|
for (var t = 0; t < e.length; t++)
|
|
4435
|
-
if (
|
|
4573
|
+
if (na(e[t], `
|
|
4436
4574
|
`) >= 0)
|
|
4437
4575
|
return !1;
|
|
4438
4576
|
return !0;
|
|
4439
4577
|
}
|
|
4440
|
-
function
|
|
4578
|
+
function Cl(e, t) {
|
|
4441
4579
|
var n;
|
|
4442
4580
|
if (e.indent === " ")
|
|
4443
4581
|
n = " ";
|
|
@@ -4450,7 +4588,7 @@ function pl(e, t) {
|
|
|
4450
4588
|
prev: ue.call(Array(t + 1), n)
|
|
4451
4589
|
};
|
|
4452
4590
|
}
|
|
4453
|
-
function
|
|
4591
|
+
function Jt(e, t) {
|
|
4454
4592
|
if (e.length === 0)
|
|
4455
4593
|
return "";
|
|
4456
4594
|
var n = `
|
|
@@ -4459,35 +4597,35 @@ function Bt(e, t) {
|
|
|
4459
4597
|
` + t.prev;
|
|
4460
4598
|
}
|
|
4461
4599
|
function Ke(e, t) {
|
|
4462
|
-
var n =
|
|
4600
|
+
var n = Dt(e), a = [];
|
|
4463
4601
|
if (n) {
|
|
4464
4602
|
a.length = e.length;
|
|
4465
4603
|
for (var s = 0; s < e.length; s++)
|
|
4466
4604
|
a[s] = ve(e, s) ? t(e[s], e) : "";
|
|
4467
4605
|
}
|
|
4468
|
-
var i = typeof
|
|
4606
|
+
var i = typeof Et == "function" ? Et(e) : [], r;
|
|
4469
4607
|
if (Fe) {
|
|
4470
4608
|
r = {};
|
|
4471
4609
|
for (var o = 0; o < i.length; o++)
|
|
4472
4610
|
r["$" + i[o]] = i[o];
|
|
4473
4611
|
}
|
|
4474
4612
|
for (var l in e)
|
|
4475
|
-
ve(e, l) && (n && String(Number(l)) === l && l < e.length || Fe && r["$" + l] instanceof Symbol || (
|
|
4476
|
-
if (typeof
|
|
4613
|
+
ve(e, l) && (n && String(Number(l)) === l && l < e.length || Fe && r["$" + l] instanceof Symbol || (Xr.call(/[^\w$]/, l) ? a.push(t(l, e) + ": " + t(e[l], e)) : a.push(l + ": " + t(e[l], e))));
|
|
4614
|
+
if (typeof Et == "function")
|
|
4477
4615
|
for (var c = 0; c < i.length; c++)
|
|
4478
|
-
|
|
4616
|
+
Zr.call(e, i[c]) && a.push("[" + t(i[c]) + "]: " + t(e[i[c]], e));
|
|
4479
4617
|
return a;
|
|
4480
4618
|
}
|
|
4481
|
-
var
|
|
4619
|
+
var aa = _e, Le = Xs, Pl = dl, El = Ge, Ye = aa("%WeakMap%", !0), Xe = aa("%Map%", !0), Rl = Le("WeakMap.prototype.get", !0), Al = Le("WeakMap.prototype.set", !0), ql = Le("WeakMap.prototype.has", !0), Fl = Le("Map.prototype.get", !0), Il = Le("Map.prototype.set", !0), _l = Le("Map.prototype.has", !0), dn = function(e, t) {
|
|
4482
4620
|
for (var n = e, a; (a = n.next) !== null; n = a)
|
|
4483
4621
|
if (a.key === t)
|
|
4484
4622
|
return n.next = a.next, a.next = /** @type {NonNullable<typeof list.next>} */
|
|
4485
4623
|
e.next, e.next = a, a;
|
|
4486
|
-
},
|
|
4487
|
-
var n =
|
|
4624
|
+
}, Ll = function(e, t) {
|
|
4625
|
+
var n = dn(e, t);
|
|
4488
4626
|
return n && n.value;
|
|
4489
|
-
},
|
|
4490
|
-
var a =
|
|
4627
|
+
}, Ul = function(e, t, n) {
|
|
4628
|
+
var a = dn(e, t);
|
|
4491
4629
|
a ? a.value = n : e.next = /** @type {import('.').ListNode<typeof value>} */
|
|
4492
4630
|
{
|
|
4493
4631
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
@@ -4495,60 +4633,60 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4495
4633
|
next: e.next,
|
|
4496
4634
|
value: n
|
|
4497
4635
|
};
|
|
4498
|
-
},
|
|
4499
|
-
return !!
|
|
4500
|
-
},
|
|
4636
|
+
}, Ml = function(e, t) {
|
|
4637
|
+
return !!dn(e, t);
|
|
4638
|
+
}, Hl = function() {
|
|
4501
4639
|
var t, n, a, s = {
|
|
4502
4640
|
assert: function(i) {
|
|
4503
4641
|
if (!s.has(i))
|
|
4504
|
-
throw new
|
|
4642
|
+
throw new El("Side channel does not contain " + Pl(i));
|
|
4505
4643
|
},
|
|
4506
4644
|
get: function(i) {
|
|
4507
4645
|
if (Ye && i && (typeof i == "object" || typeof i == "function")) {
|
|
4508
4646
|
if (t)
|
|
4509
|
-
return
|
|
4647
|
+
return Rl(t, i);
|
|
4510
4648
|
} else if (Xe) {
|
|
4511
4649
|
if (n)
|
|
4512
|
-
return
|
|
4650
|
+
return Fl(n, i);
|
|
4513
4651
|
} else if (a)
|
|
4514
|
-
return
|
|
4652
|
+
return Ll(a, i);
|
|
4515
4653
|
},
|
|
4516
4654
|
has: function(i) {
|
|
4517
4655
|
if (Ye && i && (typeof i == "object" || typeof i == "function")) {
|
|
4518
4656
|
if (t)
|
|
4519
|
-
return
|
|
4657
|
+
return ql(t, i);
|
|
4520
4658
|
} else if (Xe) {
|
|
4521
4659
|
if (n)
|
|
4522
|
-
return
|
|
4660
|
+
return _l(n, i);
|
|
4523
4661
|
} else if (a)
|
|
4524
|
-
return
|
|
4662
|
+
return Ml(a, i);
|
|
4525
4663
|
return !1;
|
|
4526
4664
|
},
|
|
4527
4665
|
set: function(i, r) {
|
|
4528
|
-
Ye && i && (typeof i == "object" || typeof i == "function") ? (t || (t = new Ye()),
|
|
4666
|
+
Ye && i && (typeof i == "object" || typeof i == "function") ? (t || (t = new Ye()), Al(t, i, r)) : Xe ? (n || (n = new Xe()), Il(n, i, r)) : (a || (a = { key: {}, next: null }), Ul(a, i, r));
|
|
4529
4667
|
}
|
|
4530
4668
|
};
|
|
4531
4669
|
return s;
|
|
4532
|
-
},
|
|
4670
|
+
}, Bl = String.prototype.replace, Vl = /%20/g, At = {
|
|
4533
4671
|
RFC1738: "RFC1738",
|
|
4534
4672
|
RFC3986: "RFC3986"
|
|
4535
|
-
},
|
|
4536
|
-
default:
|
|
4673
|
+
}, pn = {
|
|
4674
|
+
default: At.RFC3986,
|
|
4537
4675
|
formatters: {
|
|
4538
4676
|
RFC1738: function(e) {
|
|
4539
|
-
return
|
|
4677
|
+
return Bl.call(e, Vl, "+");
|
|
4540
4678
|
},
|
|
4541
4679
|
RFC3986: function(e) {
|
|
4542
4680
|
return String(e);
|
|
4543
4681
|
}
|
|
4544
4682
|
},
|
|
4545
|
-
RFC1738:
|
|
4546
|
-
RFC3986:
|
|
4547
|
-
},
|
|
4683
|
+
RFC1738: At.RFC1738,
|
|
4684
|
+
RFC3986: At.RFC3986
|
|
4685
|
+
}, zl = pn, qt = Object.prototype.hasOwnProperty, ke = Array.isArray, le = function() {
|
|
4548
4686
|
for (var e = [], t = 0; t < 256; ++t)
|
|
4549
4687
|
e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
|
|
4550
4688
|
return e;
|
|
4551
|
-
}(),
|
|
4689
|
+
}(), Dl = function(t) {
|
|
4552
4690
|
for (; t.length > 1; ) {
|
|
4553
4691
|
var n = t.pop(), a = n.obj[n.prop];
|
|
4554
4692
|
if (ke(a)) {
|
|
@@ -4557,18 +4695,18 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4557
4695
|
n.obj[n.prop] = s;
|
|
4558
4696
|
}
|
|
4559
4697
|
}
|
|
4560
|
-
},
|
|
4698
|
+
}, ia = function(t, n) {
|
|
4561
4699
|
for (var a = n && n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = 0; s < t.length; ++s)
|
|
4562
4700
|
typeof t[s] < "u" && (a[s] = t[s]);
|
|
4563
4701
|
return a;
|
|
4564
|
-
},
|
|
4702
|
+
}, Jl = function e(t, n, a) {
|
|
4565
4703
|
if (!n)
|
|
4566
4704
|
return t;
|
|
4567
4705
|
if (typeof n != "object") {
|
|
4568
4706
|
if (ke(t))
|
|
4569
4707
|
t.push(n);
|
|
4570
4708
|
else if (t && typeof t == "object")
|
|
4571
|
-
(a && (a.plainObjects || a.allowPrototypes) || !
|
|
4709
|
+
(a && (a.plainObjects || a.allowPrototypes) || !qt.call(Object.prototype, n)) && (t[n] = !0);
|
|
4572
4710
|
else
|
|
4573
4711
|
return [t, n];
|
|
4574
4712
|
return t;
|
|
@@ -4576,21 +4714,21 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4576
4714
|
if (!t || typeof t != "object")
|
|
4577
4715
|
return [t].concat(n);
|
|
4578
4716
|
var s = t;
|
|
4579
|
-
return ke(t) && !ke(n) && (s =
|
|
4580
|
-
if (
|
|
4717
|
+
return ke(t) && !ke(n) && (s = ia(t, a)), ke(t) && ke(n) ? (n.forEach(function(i, r) {
|
|
4718
|
+
if (qt.call(t, r)) {
|
|
4581
4719
|
var o = t[r];
|
|
4582
4720
|
o && typeof o == "object" && i && typeof i == "object" ? t[r] = e(o, i, a) : t.push(i);
|
|
4583
4721
|
} else
|
|
4584
4722
|
t[r] = i;
|
|
4585
4723
|
}), t) : Object.keys(n).reduce(function(i, r) {
|
|
4586
4724
|
var o = n[r];
|
|
4587
|
-
return
|
|
4725
|
+
return qt.call(i, r) ? i[r] = e(i[r], o, a) : i[r] = o, i;
|
|
4588
4726
|
}, s);
|
|
4589
|
-
},
|
|
4727
|
+
}, Wl = function(t, n) {
|
|
4590
4728
|
return Object.keys(n).reduce(function(a, s) {
|
|
4591
4729
|
return a[s] = n[s], a;
|
|
4592
4730
|
}, t);
|
|
4593
|
-
},
|
|
4731
|
+
}, Gl = function(e, t, n) {
|
|
4594
4732
|
var a = e.replace(/\+/g, " ");
|
|
4595
4733
|
if (n === "iso-8859-1")
|
|
4596
4734
|
return a.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -4599,7 +4737,7 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4599
4737
|
} catch {
|
|
4600
4738
|
return a;
|
|
4601
4739
|
}
|
|
4602
|
-
},
|
|
4740
|
+
}, Ft = 1024, Ql = function(t, n, a, s, i) {
|
|
4603
4741
|
if (t.length === 0)
|
|
4604
4742
|
return t;
|
|
4605
4743
|
var r = t;
|
|
@@ -4607,10 +4745,10 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4607
4745
|
return escape(r).replace(/%u[0-9a-f]{4}/gi, function(m) {
|
|
4608
4746
|
return "%26%23" + parseInt(m.slice(2), 16) + "%3B";
|
|
4609
4747
|
});
|
|
4610
|
-
for (var o = "", l = 0; l < r.length; l +=
|
|
4611
|
-
for (var c = r.length >=
|
|
4748
|
+
for (var o = "", l = 0; l < r.length; l += Ft) {
|
|
4749
|
+
for (var c = r.length >= Ft ? r.slice(l, l + Ft) : r, u = [], f = 0; f < c.length; ++f) {
|
|
4612
4750
|
var d = c.charCodeAt(f);
|
|
4613
|
-
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || i ===
|
|
4751
|
+
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || i === zl.RFC1738 && (d === 40 || d === 41)) {
|
|
4614
4752
|
u[u.length] = c.charAt(f);
|
|
4615
4753
|
continue;
|
|
4616
4754
|
}
|
|
@@ -4631,38 +4769,38 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4631
4769
|
o += u.join("");
|
|
4632
4770
|
}
|
|
4633
4771
|
return o;
|
|
4634
|
-
},
|
|
4772
|
+
}, Kl = function(t) {
|
|
4635
4773
|
for (var n = [{ obj: { o: t }, prop: "o" }], a = [], s = 0; s < n.length; ++s)
|
|
4636
4774
|
for (var i = n[s], r = i.obj[i.prop], o = Object.keys(r), l = 0; l < o.length; ++l) {
|
|
4637
4775
|
var c = o[l], u = r[c];
|
|
4638
4776
|
typeof u == "object" && u !== null && a.indexOf(u) === -1 && (n.push({ obj: r, prop: c }), a.push(u));
|
|
4639
4777
|
}
|
|
4640
|
-
return
|
|
4641
|
-
},
|
|
4778
|
+
return Dl(n), t;
|
|
4779
|
+
}, Yl = function(t) {
|
|
4642
4780
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
4643
|
-
},
|
|
4781
|
+
}, Xl = function(t) {
|
|
4644
4782
|
return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
|
|
4645
|
-
},
|
|
4783
|
+
}, Zl = function(t, n) {
|
|
4646
4784
|
return [].concat(t, n);
|
|
4647
|
-
},
|
|
4785
|
+
}, ec = function(t, n) {
|
|
4648
4786
|
if (ke(t)) {
|
|
4649
4787
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
4650
4788
|
a.push(n(t[s]));
|
|
4651
4789
|
return a;
|
|
4652
4790
|
}
|
|
4653
4791
|
return n(t);
|
|
4654
|
-
},
|
|
4655
|
-
arrayToObject:
|
|
4656
|
-
assign:
|
|
4657
|
-
combine:
|
|
4658
|
-
compact:
|
|
4659
|
-
decode:
|
|
4660
|
-
encode:
|
|
4661
|
-
isBuffer:
|
|
4662
|
-
isRegExp:
|
|
4663
|
-
maybeMap:
|
|
4664
|
-
merge:
|
|
4665
|
-
},
|
|
4792
|
+
}, oa = {
|
|
4793
|
+
arrayToObject: ia,
|
|
4794
|
+
assign: Wl,
|
|
4795
|
+
combine: Zl,
|
|
4796
|
+
compact: Kl,
|
|
4797
|
+
decode: Gl,
|
|
4798
|
+
encode: Ql,
|
|
4799
|
+
isBuffer: Xl,
|
|
4800
|
+
isRegExp: Yl,
|
|
4801
|
+
maybeMap: ec,
|
|
4802
|
+
merge: Jl
|
|
4803
|
+
}, sa = Hl, rt = oa, Ve = pn, tc = Object.prototype.hasOwnProperty, la = {
|
|
4666
4804
|
brackets: function(t) {
|
|
4667
4805
|
return t + "[]";
|
|
4668
4806
|
},
|
|
@@ -4673,9 +4811,9 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4673
4811
|
repeat: function(t) {
|
|
4674
4812
|
return t;
|
|
4675
4813
|
}
|
|
4676
|
-
}, ce = Array.isArray,
|
|
4677
|
-
|
|
4678
|
-
},
|
|
4814
|
+
}, ce = Array.isArray, nc = Array.prototype.push, ca = function(e, t) {
|
|
4815
|
+
nc.apply(e, ce(t) ? t : [t]);
|
|
4816
|
+
}, rc = Date.prototype.toISOString, ar = Ve.default, J = {
|
|
4679
4817
|
addQueryPrefix: !1,
|
|
4680
4818
|
allowDots: !1,
|
|
4681
4819
|
allowEmptyArrays: !1,
|
|
@@ -4687,64 +4825,64 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4687
4825
|
encodeDotInKeys: !1,
|
|
4688
4826
|
encoder: rt.encode,
|
|
4689
4827
|
encodeValuesOnly: !1,
|
|
4690
|
-
format:
|
|
4691
|
-
formatter: Ve.formatters[
|
|
4828
|
+
format: ar,
|
|
4829
|
+
formatter: Ve.formatters[ar],
|
|
4692
4830
|
// deprecated
|
|
4693
4831
|
indices: !1,
|
|
4694
4832
|
serializeDate: function(t) {
|
|
4695
|
-
return
|
|
4833
|
+
return rc.call(t);
|
|
4696
4834
|
},
|
|
4697
4835
|
skipNulls: !1,
|
|
4698
4836
|
strictNullHandling: !1
|
|
4699
|
-
},
|
|
4837
|
+
}, ac = function(t) {
|
|
4700
4838
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
|
|
4701
|
-
},
|
|
4702
|
-
for (var x = t, k = y, S = 0, j = !1; (k = k.get(
|
|
4703
|
-
var
|
|
4704
|
-
if (S += 1, typeof
|
|
4705
|
-
if (
|
|
4839
|
+
}, It = {}, ic = function e(t, n, a, s, i, r, o, l, c, u, f, d, m, h, v, g, b, y) {
|
|
4840
|
+
for (var x = t, k = y, S = 0, j = !1; (k = k.get(It)) !== void 0 && !j; ) {
|
|
4841
|
+
var R = k.get(t);
|
|
4842
|
+
if (S += 1, typeof R < "u") {
|
|
4843
|
+
if (R === S)
|
|
4706
4844
|
throw new RangeError("Cyclic object value");
|
|
4707
4845
|
j = !0;
|
|
4708
4846
|
}
|
|
4709
|
-
typeof k.get(
|
|
4847
|
+
typeof k.get(It) > "u" && (S = 0);
|
|
4710
4848
|
}
|
|
4711
4849
|
if (typeof u == "function" ? x = u(n, x) : x instanceof Date ? x = m(x) : a === "comma" && ce(x) && (x = rt.maybeMap(x, function(w) {
|
|
4712
4850
|
return w instanceof Date ? m(w) : w;
|
|
4713
4851
|
})), x === null) {
|
|
4714
4852
|
if (r)
|
|
4715
|
-
return c && !g ? c(n,
|
|
4853
|
+
return c && !g ? c(n, J.encoder, b, "key", h) : n;
|
|
4716
4854
|
x = "";
|
|
4717
4855
|
}
|
|
4718
|
-
if (
|
|
4856
|
+
if (ac(x) || rt.isBuffer(x)) {
|
|
4719
4857
|
if (c) {
|
|
4720
|
-
var
|
|
4721
|
-
return [v(
|
|
4858
|
+
var E = g ? n : c(n, J.encoder, b, "key", h);
|
|
4859
|
+
return [v(E) + "=" + v(c(x, J.encoder, b, "value", h))];
|
|
4722
4860
|
}
|
|
4723
4861
|
return [v(n) + "=" + v(String(x))];
|
|
4724
4862
|
}
|
|
4725
|
-
var
|
|
4863
|
+
var A = [];
|
|
4726
4864
|
if (typeof x > "u")
|
|
4727
|
-
return
|
|
4728
|
-
var
|
|
4865
|
+
return A;
|
|
4866
|
+
var H;
|
|
4729
4867
|
if (a === "comma" && ce(x))
|
|
4730
|
-
g && c && (x = rt.maybeMap(x, c)),
|
|
4868
|
+
g && c && (x = rt.maybeMap(x, c)), H = [{ value: x.length > 0 ? x.join(",") || null : void 0 }];
|
|
4731
4869
|
else if (ce(u))
|
|
4732
|
-
|
|
4870
|
+
H = u;
|
|
4733
4871
|
else {
|
|
4734
4872
|
var $ = Object.keys(x);
|
|
4735
|
-
|
|
4873
|
+
H = f ? $.sort(f) : $;
|
|
4736
4874
|
}
|
|
4737
|
-
var
|
|
4875
|
+
var L = l ? n.replace(/\./g, "%2E") : n, I = s && ce(x) && x.length === 1 ? L + "[]" : L;
|
|
4738
4876
|
if (i && ce(x) && x.length === 0)
|
|
4739
|
-
return
|
|
4740
|
-
for (var z = 0; z <
|
|
4741
|
-
var
|
|
4742
|
-
if (!(o &&
|
|
4743
|
-
var
|
|
4877
|
+
return I + "[]";
|
|
4878
|
+
for (var z = 0; z < H.length; ++z) {
|
|
4879
|
+
var B = H[z], D = typeof B == "object" && typeof B.value < "u" ? B.value : x[B];
|
|
4880
|
+
if (!(o && D === null)) {
|
|
4881
|
+
var _ = d && l ? B.replace(/\./g, "%2E") : B, he = ce(x) ? typeof a == "function" ? a(I, _) : I : I + (d ? "." + _ : "[" + _ + "]");
|
|
4744
4882
|
y.set(t, S);
|
|
4745
|
-
var pe =
|
|
4746
|
-
pe.set(
|
|
4747
|
-
|
|
4883
|
+
var pe = sa();
|
|
4884
|
+
pe.set(It, y), ca(A, e(
|
|
4885
|
+
D,
|
|
4748
4886
|
he,
|
|
4749
4887
|
a,
|
|
4750
4888
|
s,
|
|
@@ -4765,63 +4903,63 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4765
4903
|
));
|
|
4766
4904
|
}
|
|
4767
4905
|
}
|
|
4768
|
-
return
|
|
4769
|
-
},
|
|
4906
|
+
return A;
|
|
4907
|
+
}, oc = function(t) {
|
|
4770
4908
|
if (!t)
|
|
4771
|
-
return
|
|
4909
|
+
return J;
|
|
4772
4910
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
4773
4911
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4774
4912
|
if (typeof t.encodeDotInKeys < "u" && typeof t.encodeDotInKeys != "boolean")
|
|
4775
4913
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
4776
4914
|
if (t.encoder !== null && typeof t.encoder < "u" && typeof t.encoder != "function")
|
|
4777
4915
|
throw new TypeError("Encoder has to be a function.");
|
|
4778
|
-
var n = t.charset ||
|
|
4916
|
+
var n = t.charset || J.charset;
|
|
4779
4917
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
4780
4918
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4781
4919
|
var a = Ve.default;
|
|
4782
4920
|
if (typeof t.format < "u") {
|
|
4783
|
-
if (!
|
|
4921
|
+
if (!tc.call(Ve.formatters, t.format))
|
|
4784
4922
|
throw new TypeError("Unknown format option provided.");
|
|
4785
4923
|
a = t.format;
|
|
4786
4924
|
}
|
|
4787
|
-
var s = Ve.formatters[a], i =
|
|
4925
|
+
var s = Ve.formatters[a], i = J.filter;
|
|
4788
4926
|
(typeof t.filter == "function" || ce(t.filter)) && (i = t.filter);
|
|
4789
4927
|
var r;
|
|
4790
|
-
if (t.arrayFormat in
|
|
4928
|
+
if (t.arrayFormat in la ? r = t.arrayFormat : "indices" in t ? r = t.indices ? "indices" : "repeat" : r = J.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
|
|
4791
4929
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4792
|
-
var o = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 :
|
|
4930
|
+
var o = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 : J.allowDots : !!t.allowDots;
|
|
4793
4931
|
return {
|
|
4794
|
-
addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix :
|
|
4932
|
+
addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : J.addQueryPrefix,
|
|
4795
4933
|
allowDots: o,
|
|
4796
|
-
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays :
|
|
4934
|
+
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : J.allowEmptyArrays,
|
|
4797
4935
|
arrayFormat: r,
|
|
4798
4936
|
charset: n,
|
|
4799
|
-
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel :
|
|
4937
|
+
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : J.charsetSentinel,
|
|
4800
4938
|
commaRoundTrip: t.commaRoundTrip,
|
|
4801
|
-
delimiter: typeof t.delimiter > "u" ?
|
|
4802
|
-
encode: typeof t.encode == "boolean" ? t.encode :
|
|
4803
|
-
encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys :
|
|
4804
|
-
encoder: typeof t.encoder == "function" ? t.encoder :
|
|
4805
|
-
encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly :
|
|
4939
|
+
delimiter: typeof t.delimiter > "u" ? J.delimiter : t.delimiter,
|
|
4940
|
+
encode: typeof t.encode == "boolean" ? t.encode : J.encode,
|
|
4941
|
+
encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys : J.encodeDotInKeys,
|
|
4942
|
+
encoder: typeof t.encoder == "function" ? t.encoder : J.encoder,
|
|
4943
|
+
encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : J.encodeValuesOnly,
|
|
4806
4944
|
filter: i,
|
|
4807
4945
|
format: a,
|
|
4808
4946
|
formatter: s,
|
|
4809
|
-
serializeDate: typeof t.serializeDate == "function" ? t.serializeDate :
|
|
4810
|
-
skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls :
|
|
4947
|
+
serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : J.serializeDate,
|
|
4948
|
+
skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : J.skipNulls,
|
|
4811
4949
|
sort: typeof t.sort == "function" ? t.sort : null,
|
|
4812
|
-
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling :
|
|
4950
|
+
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : J.strictNullHandling
|
|
4813
4951
|
};
|
|
4814
|
-
},
|
|
4815
|
-
var n = e, a =
|
|
4952
|
+
}, sc = function(e, t) {
|
|
4953
|
+
var n = e, a = oc(t), s, i;
|
|
4816
4954
|
typeof a.filter == "function" ? (i = a.filter, n = i("", n)) : ce(a.filter) && (i = a.filter, s = i);
|
|
4817
4955
|
var r = [];
|
|
4818
4956
|
if (typeof n != "object" || n === null)
|
|
4819
4957
|
return "";
|
|
4820
|
-
var o =
|
|
4958
|
+
var o = la[a.arrayFormat], l = o === "comma" && a.commaRoundTrip;
|
|
4821
4959
|
s || (s = Object.keys(n)), a.sort && s.sort(a.sort);
|
|
4822
|
-
for (var c =
|
|
4960
|
+
for (var c = sa(), u = 0; u < s.length; ++u) {
|
|
4823
4961
|
var f = s[u];
|
|
4824
|
-
a.skipNulls && n[f] === null ||
|
|
4962
|
+
a.skipNulls && n[f] === null || ca(r, ic(
|
|
4825
4963
|
n[f],
|
|
4826
4964
|
f,
|
|
4827
4965
|
o,
|
|
@@ -4844,7 +4982,7 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4844
4982
|
}
|
|
4845
4983
|
var d = r.join(a.delimiter), m = a.addQueryPrefix === !0 ? "?" : "";
|
|
4846
4984
|
return a.charsetSentinel && (a.charset === "iso-8859-1" ? m += "utf8=%26%2310003%3B&" : m += "utf8=%E2%9C%93&"), d.length > 0 ? m + d : "";
|
|
4847
|
-
}, Ie =
|
|
4985
|
+
}, Ie = oa, Wt = Object.prototype.hasOwnProperty, lc = Array.isArray, M = {
|
|
4848
4986
|
allowDots: !1,
|
|
4849
4987
|
allowEmptyArrays: !1,
|
|
4850
4988
|
allowPrototypes: !1,
|
|
@@ -4863,36 +5001,39 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4863
5001
|
parameterLimit: 1e3,
|
|
4864
5002
|
parseArrays: !0,
|
|
4865
5003
|
plainObjects: !1,
|
|
5004
|
+
strictDepth: !1,
|
|
4866
5005
|
strictNullHandling: !1
|
|
4867
|
-
},
|
|
5006
|
+
}, cc = function(e) {
|
|
4868
5007
|
return e.replace(/&#(\d+);/g, function(t, n) {
|
|
4869
5008
|
return String.fromCharCode(parseInt(n, 10));
|
|
4870
5009
|
});
|
|
4871
|
-
},
|
|
5010
|
+
}, ua = function(e, t) {
|
|
4872
5011
|
return e && typeof e == "string" && t.comma && e.indexOf(",") > -1 ? e.split(",") : e;
|
|
4873
|
-
},
|
|
4874
|
-
var a = { __proto__: null }, s = n.ignoreQueryPrefix ? t.replace(/^\?/, "") : t
|
|
5012
|
+
}, uc = "utf8=%26%2310003%3B", dc = "utf8=%E2%9C%93", pc = function(t, n) {
|
|
5013
|
+
var a = { __proto__: null }, s = n.ignoreQueryPrefix ? t.replace(/^\?/, "") : t;
|
|
5014
|
+
s = s.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
5015
|
+
var i = n.parameterLimit === 1 / 0 ? void 0 : n.parameterLimit, r = s.split(n.delimiter, i), o = -1, l, c = n.charset;
|
|
4875
5016
|
if (n.charsetSentinel)
|
|
4876
5017
|
for (l = 0; l < r.length; ++l)
|
|
4877
|
-
r[l].indexOf("utf8=") === 0 && (r[l] ===
|
|
5018
|
+
r[l].indexOf("utf8=") === 0 && (r[l] === dc ? c = "utf-8" : r[l] === uc && (c = "iso-8859-1"), o = l, l = r.length);
|
|
4878
5019
|
for (l = 0; l < r.length; ++l)
|
|
4879
5020
|
if (l !== o) {
|
|
4880
5021
|
var u = r[l], f = u.indexOf("]="), d = f === -1 ? u.indexOf("=") : f + 1, m, h;
|
|
4881
|
-
d === -1 ? (m = n.decoder(u,
|
|
4882
|
-
|
|
5022
|
+
d === -1 ? (m = n.decoder(u, M.decoder, c, "key"), h = n.strictNullHandling ? null : "") : (m = n.decoder(u.slice(0, d), M.decoder, c, "key"), h = Ie.maybeMap(
|
|
5023
|
+
ua(u.slice(d + 1), n),
|
|
4883
5024
|
function(g) {
|
|
4884
|
-
return n.decoder(g,
|
|
5025
|
+
return n.decoder(g, M.decoder, c, "value");
|
|
4885
5026
|
}
|
|
4886
|
-
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h =
|
|
4887
|
-
var v =
|
|
5027
|
+
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h = cc(h)), u.indexOf("[]=") > -1 && (h = lc(h) ? [h] : h);
|
|
5028
|
+
var v = Wt.call(a, m);
|
|
4888
5029
|
v && n.duplicates === "combine" ? a[m] = Ie.combine(a[m], h) : (!v || n.duplicates === "last") && (a[m] = h);
|
|
4889
5030
|
}
|
|
4890
5031
|
return a;
|
|
4891
|
-
},
|
|
4892
|
-
for (var s = a ? t :
|
|
5032
|
+
}, fc = function(e, t, n, a) {
|
|
5033
|
+
for (var s = a ? t : ua(t, n), i = e.length - 1; i >= 0; --i) {
|
|
4893
5034
|
var r, o = e[i];
|
|
4894
5035
|
if (o === "[]" && n.parseArrays)
|
|
4895
|
-
r = n.allowEmptyArrays && s === "" ? [] : [].concat(s);
|
|
5036
|
+
r = n.allowEmptyArrays && (s === "" || n.strictNullHandling && s === null) ? [] : [].concat(s);
|
|
4896
5037
|
else {
|
|
4897
5038
|
r = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4898
5039
|
var l = o.charAt(0) === "[" && o.charAt(o.length - 1) === "]" ? o.slice(1, -1) : o, c = n.decodeDotInKeys ? l.replace(/%2E/g, ".") : l, u = parseInt(c, 10);
|
|
@@ -4901,24 +5042,29 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4901
5042
|
s = r;
|
|
4902
5043
|
}
|
|
4903
5044
|
return s;
|
|
4904
|
-
},
|
|
5045
|
+
}, mc = function(t, n, a, s) {
|
|
4905
5046
|
if (t) {
|
|
4906
5047
|
var i = a.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, r = /(\[[^[\]]*])/, o = /(\[[^[\]]*])/g, l = a.depth > 0 && r.exec(i), c = l ? i.slice(0, l.index) : i, u = [];
|
|
4907
5048
|
if (c) {
|
|
4908
|
-
if (!a.plainObjects &&
|
|
5049
|
+
if (!a.plainObjects && Wt.call(Object.prototype, c) && !a.allowPrototypes)
|
|
4909
5050
|
return;
|
|
4910
5051
|
u.push(c);
|
|
4911
5052
|
}
|
|
4912
5053
|
for (var f = 0; a.depth > 0 && (l = o.exec(i)) !== null && f < a.depth; ) {
|
|
4913
|
-
if (f += 1, !a.plainObjects &&
|
|
5054
|
+
if (f += 1, !a.plainObjects && Wt.call(Object.prototype, l[1].slice(1, -1)) && !a.allowPrototypes)
|
|
4914
5055
|
return;
|
|
4915
5056
|
u.push(l[1]);
|
|
4916
5057
|
}
|
|
4917
|
-
|
|
5058
|
+
if (l) {
|
|
5059
|
+
if (a.strictDepth === !0)
|
|
5060
|
+
throw new RangeError("Input depth exceeded depth option of " + a.depth + " and strictDepth is true");
|
|
5061
|
+
u.push("[" + i.slice(l.index) + "]");
|
|
5062
|
+
}
|
|
5063
|
+
return fc(u, n, a, s);
|
|
4918
5064
|
}
|
|
4919
|
-
},
|
|
5065
|
+
}, hc = function(t) {
|
|
4920
5066
|
if (!t)
|
|
4921
|
-
return
|
|
5067
|
+
return M;
|
|
4922
5068
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
4923
5069
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4924
5070
|
if (typeof t.decodeDotInKeys < "u" && typeof t.decodeDotInKeys != "boolean")
|
|
@@ -4927,50 +5073,51 @@ var Yr = _e, Le = Fs, fl = Gs, ml = Ge, Ye = Yr("%WeakMap%", !0), Xe = Yr("%Map%
|
|
|
4927
5073
|
throw new TypeError("Decoder has to be a function.");
|
|
4928
5074
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
4929
5075
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4930
|
-
var n = typeof t.charset > "u" ?
|
|
5076
|
+
var n = typeof t.charset > "u" ? M.charset : t.charset, a = typeof t.duplicates > "u" ? M.duplicates : t.duplicates;
|
|
4931
5077
|
if (a !== "combine" && a !== "first" && a !== "last")
|
|
4932
5078
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
4933
|
-
var s = typeof t.allowDots > "u" ? t.decodeDotInKeys === !0 ? !0 :
|
|
5079
|
+
var s = typeof t.allowDots > "u" ? t.decodeDotInKeys === !0 ? !0 : M.allowDots : !!t.allowDots;
|
|
4934
5080
|
return {
|
|
4935
5081
|
allowDots: s,
|
|
4936
|
-
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays :
|
|
4937
|
-
allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes :
|
|
4938
|
-
allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse :
|
|
4939
|
-
arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit :
|
|
5082
|
+
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : M.allowEmptyArrays,
|
|
5083
|
+
allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes : M.allowPrototypes,
|
|
5084
|
+
allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse : M.allowSparse,
|
|
5085
|
+
arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit : M.arrayLimit,
|
|
4940
5086
|
charset: n,
|
|
4941
|
-
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel :
|
|
4942
|
-
comma: typeof t.comma == "boolean" ? t.comma :
|
|
4943
|
-
decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys :
|
|
4944
|
-
decoder: typeof t.decoder == "function" ? t.decoder :
|
|
4945
|
-
delimiter: typeof t.delimiter == "string" || Ie.isRegExp(t.delimiter) ? t.delimiter :
|
|
5087
|
+
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : M.charsetSentinel,
|
|
5088
|
+
comma: typeof t.comma == "boolean" ? t.comma : M.comma,
|
|
5089
|
+
decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys : M.decodeDotInKeys,
|
|
5090
|
+
decoder: typeof t.decoder == "function" ? t.decoder : M.decoder,
|
|
5091
|
+
delimiter: typeof t.delimiter == "string" || Ie.isRegExp(t.delimiter) ? t.delimiter : M.delimiter,
|
|
4946
5092
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
4947
|
-
depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth :
|
|
5093
|
+
depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth : M.depth,
|
|
4948
5094
|
duplicates: a,
|
|
4949
5095
|
ignoreQueryPrefix: t.ignoreQueryPrefix === !0,
|
|
4950
|
-
interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities :
|
|
4951
|
-
parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit :
|
|
5096
|
+
interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities : M.interpretNumericEntities,
|
|
5097
|
+
parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit : M.parameterLimit,
|
|
4952
5098
|
parseArrays: t.parseArrays !== !1,
|
|
4953
|
-
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects :
|
|
4954
|
-
|
|
5099
|
+
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : M.plainObjects,
|
|
5100
|
+
strictDepth: typeof t.strictDepth == "boolean" ? !!t.strictDepth : M.strictDepth,
|
|
5101
|
+
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : M.strictNullHandling
|
|
4955
5102
|
};
|
|
4956
|
-
},
|
|
4957
|
-
var n =
|
|
5103
|
+
}, yc = function(e, t) {
|
|
5104
|
+
var n = hc(t);
|
|
4958
5105
|
if (e === "" || e === null || typeof e > "u")
|
|
4959
5106
|
return n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4960
|
-
for (var a = typeof e == "string" ?
|
|
4961
|
-
var o = i[r], l =
|
|
5107
|
+
for (var a = typeof e == "string" ? pc(e, n) : e, s = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, i = Object.keys(a), r = 0; r < i.length; ++r) {
|
|
5108
|
+
var o = i[r], l = mc(o, a[o], n, typeof e == "string");
|
|
4962
5109
|
s = Ie.merge(s, l, n);
|
|
4963
5110
|
}
|
|
4964
5111
|
return n.allowSparse === !0 ? s : Ie.compact(s);
|
|
4965
|
-
},
|
|
4966
|
-
formats:
|
|
4967
|
-
parse:
|
|
4968
|
-
stringify:
|
|
4969
|
-
},
|
|
5112
|
+
}, vc = sc, gc = yc, bc = pn, at = {
|
|
5113
|
+
formats: bc,
|
|
5114
|
+
parse: gc,
|
|
5115
|
+
stringify: vc
|
|
5116
|
+
}, xc = ns;
|
|
4970
5117
|
function oe() {
|
|
4971
5118
|
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;
|
|
4972
5119
|
}
|
|
4973
|
-
var
|
|
5120
|
+
var kc = /^([a-z0-9.+-]+:)/i, $c = /:[0-9]*$/, Sc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, wc = [
|
|
4974
5121
|
"<",
|
|
4975
5122
|
">",
|
|
4976
5123
|
'"',
|
|
@@ -4980,27 +5127,27 @@ var ac = /^([a-z0-9.+-]+:)/i, ic = /:[0-9]*$/, oc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
4980
5127
|
`
|
|
4981
5128
|
`,
|
|
4982
5129
|
" "
|
|
4983
|
-
],
|
|
5130
|
+
], jc = [
|
|
4984
5131
|
"{",
|
|
4985
5132
|
"}",
|
|
4986
5133
|
"|",
|
|
4987
5134
|
"\\",
|
|
4988
5135
|
"^",
|
|
4989
5136
|
"`"
|
|
4990
|
-
].concat(
|
|
5137
|
+
].concat(wc), Gt = ["'"].concat(jc), ir = [
|
|
4991
5138
|
"%",
|
|
4992
5139
|
"/",
|
|
4993
5140
|
"?",
|
|
4994
5141
|
";",
|
|
4995
5142
|
"#"
|
|
4996
|
-
].concat(
|
|
5143
|
+
].concat(Gt), or = [
|
|
4997
5144
|
"/",
|
|
4998
5145
|
"?",
|
|
4999
5146
|
"#"
|
|
5000
|
-
],
|
|
5147
|
+
], Nc = 255, sr = /^[+a-z0-9A-Z_-]{0,63}$/, Tc = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Oc = {
|
|
5001
5148
|
javascript: !0,
|
|
5002
5149
|
"javascript:": !0
|
|
5003
|
-
},
|
|
5150
|
+
}, Qt = {
|
|
5004
5151
|
javascript: !0,
|
|
5005
5152
|
"javascript:": !0
|
|
5006
5153
|
}, Ae = {
|
|
@@ -5014,8 +5161,8 @@ var ac = /^([a-z0-9.+-]+:)/i, ic = /:[0-9]*$/, oc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5014
5161
|
"ftp:": !0,
|
|
5015
5162
|
"gopher:": !0,
|
|
5016
5163
|
"file:": !0
|
|
5017
|
-
},
|
|
5018
|
-
function
|
|
5164
|
+
}, Kt = at;
|
|
5165
|
+
function fn(e, t, n) {
|
|
5019
5166
|
if (e && typeof e == "object" && e instanceof oe)
|
|
5020
5167
|
return e;
|
|
5021
5168
|
var a = new oe();
|
|
@@ -5028,11 +5175,11 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5028
5175
|
i[0] = i[0].replace(r, "/"), e = i.join(s);
|
|
5029
5176
|
var o = e;
|
|
5030
5177
|
if (o = o.trim(), !n && e.split("#").length === 1) {
|
|
5031
|
-
var l =
|
|
5178
|
+
var l = Sc.exec(o);
|
|
5032
5179
|
if (l)
|
|
5033
|
-
return this.path = o, this.href = o, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query =
|
|
5180
|
+
return this.path = o, this.href = o, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query = Kt.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : t && (this.search = "", this.query = {}), this;
|
|
5034
5181
|
}
|
|
5035
|
-
var c =
|
|
5182
|
+
var c = kc.exec(o);
|
|
5036
5183
|
if (c) {
|
|
5037
5184
|
c = c[0];
|
|
5038
5185
|
var u = c.toLowerCase();
|
|
@@ -5040,17 +5187,17 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5040
5187
|
}
|
|
5041
5188
|
if (n || c || o.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
5042
5189
|
var f = o.substr(0, 2) === "//";
|
|
5043
|
-
f && !(c &&
|
|
5190
|
+
f && !(c && Qt[c]) && (o = o.substr(2), this.slashes = !0);
|
|
5044
5191
|
}
|
|
5045
|
-
if (!
|
|
5046
|
-
for (var d = -1, m = 0; m <
|
|
5047
|
-
var h = o.indexOf(
|
|
5192
|
+
if (!Qt[c] && (f || c && !Ae[c])) {
|
|
5193
|
+
for (var d = -1, m = 0; m < or.length; m++) {
|
|
5194
|
+
var h = o.indexOf(or[m]);
|
|
5048
5195
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5049
5196
|
}
|
|
5050
5197
|
var v, g;
|
|
5051
5198
|
d === -1 ? g = o.lastIndexOf("@") : g = o.lastIndexOf("@", d), g !== -1 && (v = o.slice(0, g), o = o.slice(g + 1), this.auth = decodeURIComponent(v)), d = -1;
|
|
5052
|
-
for (var m = 0; m <
|
|
5053
|
-
var h = o.indexOf(
|
|
5199
|
+
for (var m = 0; m < ir.length; m++) {
|
|
5200
|
+
var h = o.indexOf(ir[m]);
|
|
5054
5201
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5055
5202
|
}
|
|
5056
5203
|
d === -1 && (d = o.length), this.host = o.slice(0, d), o = o.slice(d), this.parseHost(), this.hostname = this.hostname || "";
|
|
@@ -5058,45 +5205,45 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5058
5205
|
if (!b)
|
|
5059
5206
|
for (var y = this.hostname.split(/\./), m = 0, x = y.length; m < x; m++) {
|
|
5060
5207
|
var k = y[m];
|
|
5061
|
-
if (k && !k.match(
|
|
5062
|
-
for (var S = "", j = 0,
|
|
5208
|
+
if (k && !k.match(sr)) {
|
|
5209
|
+
for (var S = "", j = 0, R = k.length; j < R; j++)
|
|
5063
5210
|
k.charCodeAt(j) > 127 ? S += "x" : S += k[j];
|
|
5064
|
-
if (!S.match(
|
|
5065
|
-
var
|
|
5066
|
-
|
|
5211
|
+
if (!S.match(sr)) {
|
|
5212
|
+
var E = y.slice(0, m), A = y.slice(m + 1), H = k.match(Tc);
|
|
5213
|
+
H && (E.push(H[1]), A.unshift(H[2])), A.length && (o = "/" + A.join(".") + o), this.hostname = E.join(".");
|
|
5067
5214
|
break;
|
|
5068
5215
|
}
|
|
5069
5216
|
}
|
|
5070
5217
|
}
|
|
5071
|
-
this.hostname.length >
|
|
5072
|
-
var $ = this.port ? ":" + this.port : "",
|
|
5073
|
-
this.host =
|
|
5074
|
-
}
|
|
5075
|
-
if (!
|
|
5076
|
-
for (var m = 0, x =
|
|
5077
|
-
var
|
|
5078
|
-
if (o.indexOf(
|
|
5079
|
-
var z = encodeURIComponent(
|
|
5080
|
-
z ===
|
|
5218
|
+
this.hostname.length > Nc ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), b || (this.hostname = xc.toASCII(this.hostname));
|
|
5219
|
+
var $ = this.port ? ":" + this.port : "", L = this.hostname || "";
|
|
5220
|
+
this.host = L + $, this.href += this.host, b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), o[0] !== "/" && (o = "/" + o));
|
|
5221
|
+
}
|
|
5222
|
+
if (!Oc[u])
|
|
5223
|
+
for (var m = 0, x = Gt.length; m < x; m++) {
|
|
5224
|
+
var I = Gt[m];
|
|
5225
|
+
if (o.indexOf(I) !== -1) {
|
|
5226
|
+
var z = encodeURIComponent(I);
|
|
5227
|
+
z === I && (z = escape(I)), o = o.split(I).join(z);
|
|
5081
5228
|
}
|
|
5082
5229
|
}
|
|
5083
|
-
var
|
|
5084
|
-
|
|
5085
|
-
var
|
|
5086
|
-
if (
|
|
5087
|
-
var $ = this.pathname || "",
|
|
5088
|
-
this.path = $ +
|
|
5230
|
+
var B = o.indexOf("#");
|
|
5231
|
+
B !== -1 && (this.hash = o.substr(B), o = o.slice(0, B));
|
|
5232
|
+
var D = o.indexOf("?");
|
|
5233
|
+
if (D !== -1 ? (this.search = o.substr(D), this.query = o.substr(D + 1), t && (this.query = Kt.parse(this.query)), o = o.slice(0, D)) : t && (this.search = "", this.query = {}), o && (this.pathname = o), Ae[u] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
5234
|
+
var $ = this.pathname || "", _ = this.search || "";
|
|
5235
|
+
this.path = $ + _;
|
|
5089
5236
|
}
|
|
5090
5237
|
return this.href = this.format(), this;
|
|
5091
5238
|
};
|
|
5092
|
-
function
|
|
5093
|
-
return typeof e == "string" && (e =
|
|
5239
|
+
function Cc(e) {
|
|
5240
|
+
return typeof e == "string" && (e = fn(e)), e instanceof oe ? e.format() : oe.prototype.format.call(e);
|
|
5094
5241
|
}
|
|
5095
5242
|
oe.prototype.format = function() {
|
|
5096
5243
|
var e = this.auth || "";
|
|
5097
5244
|
e && (e = encodeURIComponent(e), e = e.replace(/%3A/i, ":"), e += "@");
|
|
5098
5245
|
var t = this.protocol || "", n = this.pathname || "", a = this.hash || "", s = !1, i = "";
|
|
5099
|
-
this.host ? s = e + this.host : this.hostname && (s = e + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (s += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (i =
|
|
5246
|
+
this.host ? s = e + this.host : this.hostname && (s = e + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (s += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (i = Kt.stringify(this.query, {
|
|
5100
5247
|
arrayFormat: "repeat",
|
|
5101
5248
|
addQueryPrefix: !1
|
|
5102
5249
|
}));
|
|
@@ -5106,7 +5253,7 @@ oe.prototype.format = function() {
|
|
|
5106
5253
|
}), r = r.replace("#", "%23"), t + s + n + r + a;
|
|
5107
5254
|
};
|
|
5108
5255
|
oe.prototype.resolve = function(e) {
|
|
5109
|
-
return this.resolveObject(
|
|
5256
|
+
return this.resolveObject(fn(e, !1, !0)).format();
|
|
5110
5257
|
};
|
|
5111
5258
|
oe.prototype.resolveObject = function(e) {
|
|
5112
5259
|
if (typeof e == "string") {
|
|
@@ -5134,7 +5281,7 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5134
5281
|
}
|
|
5135
5282
|
return n.href = n.format(), n;
|
|
5136
5283
|
}
|
|
5137
|
-
if (n.protocol = e.protocol, !e.host && !
|
|
5284
|
+
if (n.protocol = e.protocol, !e.host && !Qt[e.protocol]) {
|
|
5138
5285
|
for (var x = (e.pathname || "").split("/"); x.length && !(e.host = x.shift()); )
|
|
5139
5286
|
;
|
|
5140
5287
|
e.host || (e.host = ""), e.hostname || (e.hostname = ""), x[0] !== "" && x.unshift(""), x.length < 2 && x.unshift(""), n.pathname = x.join("/");
|
|
@@ -5161,30 +5308,30 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5161
5308
|
}
|
|
5162
5309
|
if (!y.length)
|
|
5163
5310
|
return n.pathname = null, n.search ? n.path = "/" + n.search : n.path = null, n.href = n.format(), n;
|
|
5164
|
-
for (var j = y.slice(-1)[0],
|
|
5165
|
-
j = y[
|
|
5311
|
+
for (var j = y.slice(-1)[0], R = (n.host || e.host || y.length > 1) && (j === "." || j === "..") || j === "", E = 0, A = y.length; A >= 0; A--)
|
|
5312
|
+
j = y[A], j === "." ? y.splice(A, 1) : j === ".." ? (y.splice(A, 1), E++) : E && (y.splice(A, 1), E--);
|
|
5166
5313
|
if (!g && !b)
|
|
5167
|
-
for (;
|
|
5314
|
+
for (; E--; E)
|
|
5168
5315
|
y.unshift("..");
|
|
5169
|
-
g && y[0] !== "" && (!y[0] || y[0].charAt(0) !== "/") && y.unshift(""),
|
|
5170
|
-
var
|
|
5316
|
+
g && y[0] !== "" && (!y[0] || y[0].charAt(0) !== "/") && y.unshift(""), R && y.join("/").substr(-1) !== "/" && y.push("");
|
|
5317
|
+
var H = y[0] === "" || y[0] && y[0].charAt(0) === "/";
|
|
5171
5318
|
if (k) {
|
|
5172
|
-
n.hostname =
|
|
5319
|
+
n.hostname = H ? "" : y.length ? y.shift() : "", n.host = n.hostname;
|
|
5173
5320
|
var S = n.host && n.host.indexOf("@") > 0 ? n.host.split("@") : !1;
|
|
5174
5321
|
S && (n.auth = S.shift(), n.hostname = S.shift(), n.host = n.hostname);
|
|
5175
5322
|
}
|
|
5176
|
-
return g = g || n.host && y.length, g && !
|
|
5323
|
+
return g = g || n.host && y.length, g && !H && y.unshift(""), y.length > 0 ? n.pathname = y.join("/") : (n.pathname = null, n.path = null), (n.pathname !== null || n.search !== null) && (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e.auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(), n;
|
|
5177
5324
|
};
|
|
5178
5325
|
oe.prototype.parseHost = function() {
|
|
5179
|
-
var e = this.host, t =
|
|
5326
|
+
var e = this.host, t = $c.exec(e);
|
|
5180
5327
|
t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
|
|
5181
5328
|
};
|
|
5182
|
-
var
|
|
5329
|
+
var Pc = fn, lr = Cc, Ec = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Rc = class {
|
|
5183
5330
|
constructor(e, t = {}) {
|
|
5184
5331
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
5185
5332
|
harIsAlreadyEncoded: !1,
|
|
5186
5333
|
...t
|
|
5187
|
-
}, this.requests = [],
|
|
5334
|
+
}, this.requests = [], Ec(e) ? this.entries = e.log.entries : this.entries = [
|
|
5188
5335
|
{
|
|
5189
5336
|
request: e
|
|
5190
5337
|
}
|
|
@@ -5219,7 +5366,7 @@ var fc = cn, nr = pc, mc = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5219
5366
|
cookiesObj: {},
|
|
5220
5367
|
allHeaders: {}
|
|
5221
5368
|
};
|
|
5222
|
-
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(
|
|
5369
|
+
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(jn, {})), n.headers && n.headers.length) {
|
|
5223
5370
|
const m = /^HTTP\/2/;
|
|
5224
5371
|
n.headersObj = n.headers.reduce((h, { name: v, value: g }) => {
|
|
5225
5372
|
const b = m.exec(n.httpVersion) ? v.toLocaleLowerCase() : v;
|
|
@@ -5247,17 +5394,17 @@ var fc = cn, nr = pc, mc = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5247
5394
|
`, g = (k) => k.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), b = (k) => k.replace(/\r?\n|\r/g, `\r
|
|
5248
5395
|
`), y = [`--${m}`];
|
|
5249
5396
|
(d = n.postData) == null || d.params.forEach((k, S) => {
|
|
5250
|
-
const j = k.name,
|
|
5251
|
-
|
|
5252
|
-
`Content-Disposition: form-data; name="${g(b(j))}"; filename="${
|
|
5253
|
-
), y.push(`Content-Type: ${
|
|
5397
|
+
const j = k.name, R = k.value || "", E = k.fileName || null, A = k.contentType || "application/octet-stream";
|
|
5398
|
+
E ? (y.push(
|
|
5399
|
+
`Content-Disposition: form-data; name="${g(b(j))}"; filename="${E}"`
|
|
5400
|
+
), y.push(`Content-Type: ${A}`)) : y.push(`Content-Disposition: form-data; name="${g(b(j))}"`), y.push(""), y.push(b(R)), S !== n.postData.params.length - 1 && y.push(`--${m}`);
|
|
5254
5401
|
}), y.push(`--${h}`), n.postData.boundary = m, n.postData.text = y.join(v);
|
|
5255
5402
|
const x = Z(n.headersObj, "content-type") || "content-type";
|
|
5256
5403
|
n.headersObj[x] = `multipart/form-data; boundary=${m}`;
|
|
5257
5404
|
}
|
|
5258
5405
|
break;
|
|
5259
5406
|
case "application/x-www-form-urlencoded":
|
|
5260
|
-
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(
|
|
5407
|
+
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(jn, {}), n.postData.text = at.stringify(n.postData.paramsObj)) : n.postData.text = "";
|
|
5261
5408
|
break;
|
|
5262
5409
|
case "text/json":
|
|
5263
5410
|
case "text/x-json":
|
|
@@ -5274,7 +5421,7 @@ var fc = cn, nr = pc, mc = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5274
5421
|
const s = {
|
|
5275
5422
|
...n.allHeaders,
|
|
5276
5423
|
...n.headersObj
|
|
5277
|
-
}, i =
|
|
5424
|
+
}, i = Pc(n.url, !0, !0);
|
|
5278
5425
|
n.queryObj = {
|
|
5279
5426
|
...n.queryObj,
|
|
5280
5427
|
...i.query
|
|
@@ -5291,11 +5438,11 @@ var fc = cn, nr = pc, mc = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5291
5438
|
query: n.queryObj,
|
|
5292
5439
|
search: r,
|
|
5293
5440
|
path: r ? `${i.pathname}?${r}` : i.pathname
|
|
5294
|
-
}, l =
|
|
5441
|
+
}, l = lr({
|
|
5295
5442
|
...i,
|
|
5296
5443
|
query: null,
|
|
5297
5444
|
search: null
|
|
5298
|
-
}), c =
|
|
5445
|
+
}), c = lr({
|
|
5299
5446
|
...i,
|
|
5300
5447
|
...o
|
|
5301
5448
|
});
|
|
@@ -5309,21 +5456,21 @@ var fc = cn, nr = pc, mc = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5309
5456
|
}
|
|
5310
5457
|
convert(e, t, n) {
|
|
5311
5458
|
this.initCalled || this.init(), !n && t && (n = t);
|
|
5312
|
-
const a =
|
|
5459
|
+
const a = ts[e];
|
|
5313
5460
|
if (!a)
|
|
5314
5461
|
return !1;
|
|
5315
5462
|
const { convert: s } = a.clientsById[t || a.info.default];
|
|
5316
5463
|
return this.requests.map((r) => s(r, n));
|
|
5317
5464
|
}
|
|
5318
5465
|
};
|
|
5319
|
-
const
|
|
5466
|
+
const da = Ea(
|
|
5320
5467
|
void 0
|
|
5321
|
-
),
|
|
5322
|
-
const e =
|
|
5468
|
+
), uu = da.Provider, Ac = () => {
|
|
5469
|
+
const e = Ra(da);
|
|
5323
5470
|
if (!e)
|
|
5324
5471
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
5325
5472
|
return e.config;
|
|
5326
|
-
},
|
|
5473
|
+
}, qc = ({
|
|
5327
5474
|
server: e,
|
|
5328
5475
|
servers: t,
|
|
5329
5476
|
operation: n
|
|
@@ -5341,7 +5488,7 @@ const aa = Oa(
|
|
|
5341
5488
|
isRequired: c.required ?? !1
|
|
5342
5489
|
})), i = (l = n.parameters) == null ? void 0 : l.filter((c) => c.in === "path").map((c) => ({ name: c.name }));
|
|
5343
5490
|
return /* @__PURE__ */ p.jsx(
|
|
5344
|
-
|
|
5491
|
+
Hr,
|
|
5345
5492
|
{
|
|
5346
5493
|
server: e,
|
|
5347
5494
|
servers: t,
|
|
@@ -5352,94 +5499,94 @@ const aa = Oa(
|
|
|
5352
5499
|
pathParams: i
|
|
5353
5500
|
}
|
|
5354
5501
|
);
|
|
5355
|
-
},
|
|
5502
|
+
}, mn = ({ children: e, className: t }) => /* @__PURE__ */ p.jsx(
|
|
5356
5503
|
"div",
|
|
5357
5504
|
{
|
|
5358
|
-
className:
|
|
5505
|
+
className: F(
|
|
5359
5506
|
"rounded-lg overflow-hidden border dark:border-transparent",
|
|
5360
5507
|
t
|
|
5361
5508
|
),
|
|
5362
5509
|
children: e
|
|
5363
5510
|
}
|
|
5364
|
-
),
|
|
5511
|
+
), hn = ({ children: e, className: t }) => /* @__PURE__ */ p.jsx(
|
|
5365
5512
|
"div",
|
|
5366
5513
|
{
|
|
5367
|
-
className:
|
|
5514
|
+
className: F(
|
|
5368
5515
|
"border-b dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
|
|
5369
5516
|
t
|
|
5370
5517
|
),
|
|
5371
5518
|
children: e
|
|
5372
5519
|
}
|
|
5373
|
-
),
|
|
5520
|
+
), yn = ({ children: e, className: t }) => /* @__PURE__ */ p.jsx(
|
|
5374
5521
|
"div",
|
|
5375
5522
|
{
|
|
5376
|
-
className:
|
|
5523
|
+
className: F("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", t),
|
|
5377
5524
|
children: e
|
|
5378
5525
|
}
|
|
5379
|
-
),
|
|
5526
|
+
), pa = ({ children: e, className: t }) => /* @__PURE__ */ p.jsx(
|
|
5380
5527
|
"div",
|
|
5381
5528
|
{
|
|
5382
|
-
className:
|
|
5529
|
+
className: F(
|
|
5383
5530
|
"border-t dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
|
|
5384
5531
|
t
|
|
5385
5532
|
),
|
|
5386
5533
|
children: e
|
|
5387
5534
|
}
|
|
5388
|
-
),
|
|
5389
|
-
function
|
|
5535
|
+
), Fc = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Je = (e, t) => e.example !== void 0 ? e.example : e.default !== void 0 ? e.default : e.examples && Fc(e.examples) ? Object.values(e.examples)[0] : Ic(e);
|
|
5536
|
+
function Ic(e, t) {
|
|
5390
5537
|
const n = Object.entries(e.properties ?? {}).concat(
|
|
5391
5538
|
Object.entries(e.additionalProperties ?? {})
|
|
5392
5539
|
);
|
|
5393
5540
|
if (e.type === "object" && n.length > 0) {
|
|
5394
5541
|
const a = {};
|
|
5395
5542
|
return n.forEach(([s, i]) => {
|
|
5396
|
-
const r =
|
|
5543
|
+
const r = Je(i);
|
|
5397
5544
|
r !== void 0 && (a[s] = r);
|
|
5398
5545
|
}), a;
|
|
5399
5546
|
} else if (e.type === "array" && e.items) {
|
|
5400
|
-
const a =
|
|
5547
|
+
const a = Je(e.items);
|
|
5401
5548
|
return a !== void 0 ? [a] : [];
|
|
5402
5549
|
}
|
|
5403
5550
|
}
|
|
5404
|
-
const
|
|
5551
|
+
const _c = ({ content: e }) => {
|
|
5405
5552
|
var t;
|
|
5406
|
-
return e.length ? /* @__PURE__ */ p.jsx(p.Fragment, { children: /* @__PURE__ */ p.jsxs(
|
|
5407
|
-
/* @__PURE__ */ p.jsx(
|
|
5408
|
-
/* @__PURE__ */ p.jsx(
|
|
5409
|
-
|
|
5553
|
+
return e.length ? /* @__PURE__ */ p.jsx(p.Fragment, { children: /* @__PURE__ */ p.jsxs(mn, { children: [
|
|
5554
|
+
/* @__PURE__ */ p.jsx(hn, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ p.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
5555
|
+
/* @__PURE__ */ p.jsx(yn, { className: "p-0", children: /* @__PURE__ */ p.jsx(
|
|
5556
|
+
We,
|
|
5410
5557
|
{
|
|
5411
5558
|
language: "json",
|
|
5412
5559
|
noBackground: !0,
|
|
5413
5560
|
copyable: !0,
|
|
5414
5561
|
className: "text-xs max-h-[450px] p-2",
|
|
5415
5562
|
code: JSON.stringify(
|
|
5416
|
-
(t = e.at(0)) != null && t.schema ?
|
|
5563
|
+
(t = e.at(0)) != null && t.schema ? Je(e[0].schema) : "",
|
|
5417
5564
|
null,
|
|
5418
5565
|
2
|
|
5419
5566
|
)
|
|
5420
5567
|
}
|
|
5421
5568
|
) })
|
|
5422
5569
|
] }) }) : null;
|
|
5423
|
-
},
|
|
5570
|
+
}, Lc = ({
|
|
5424
5571
|
responses: e,
|
|
5425
5572
|
selectedResponse: t,
|
|
5426
5573
|
onSelectResponse: n
|
|
5427
5574
|
}) => {
|
|
5428
5575
|
var a;
|
|
5429
|
-
return /* @__PURE__ */ p.jsx(
|
|
5430
|
-
|
|
5576
|
+
return /* @__PURE__ */ p.jsx(mn, { children: /* @__PURE__ */ p.jsxs(
|
|
5577
|
+
Ur,
|
|
5431
5578
|
{
|
|
5432
5579
|
defaultValue: (a = e[0]) == null ? void 0 : a.statusCode,
|
|
5433
5580
|
value: t,
|
|
5434
5581
|
onValueChange: (s) => n(s),
|
|
5435
5582
|
children: [
|
|
5436
|
-
/* @__PURE__ */ p.jsxs(
|
|
5583
|
+
/* @__PURE__ */ p.jsxs(hn, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
5437
5584
|
/* @__PURE__ */ p.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
5438
|
-
/* @__PURE__ */ p.jsx(
|
|
5439
|
-
|
|
5585
|
+
/* @__PURE__ */ p.jsx(en, { className: "flex gap-2", children: e.map((s) => /* @__PURE__ */ p.jsx(
|
|
5586
|
+
tn,
|
|
5440
5587
|
{
|
|
5441
5588
|
value: s.statusCode,
|
|
5442
|
-
className:
|
|
5589
|
+
className: F(
|
|
5443
5590
|
"text-xs font-mono px-1.5 py-1 pb-px translate-y-px border-b-2 border-transparent rounded-t cursor-pointer",
|
|
5444
5591
|
"data-[state=active]:text-primary data-[state=active]:dark:text-inherit data-[state=active]:border-primary",
|
|
5445
5592
|
"hover:border-accent-foreground/25"
|
|
@@ -5452,23 +5599,23 @@ const xc = ({ content: e }) => {
|
|
|
5452
5599
|
e.map((s) => {
|
|
5453
5600
|
var r, o;
|
|
5454
5601
|
const i = (o = (r = s.content) == null ? void 0 : r[0]) == null ? void 0 : o.schema;
|
|
5455
|
-
return /* @__PURE__ */ p.jsxs(
|
|
5456
|
-
/* @__PURE__ */ p.jsx(
|
|
5457
|
-
|
|
5602
|
+
return /* @__PURE__ */ p.jsxs(nn, { value: s.statusCode, children: [
|
|
5603
|
+
/* @__PURE__ */ p.jsx(yn, { className: "p-0", children: i ? /* @__PURE__ */ p.jsx(
|
|
5604
|
+
We,
|
|
5458
5605
|
{
|
|
5459
5606
|
language: "json",
|
|
5460
5607
|
noBackground: !0,
|
|
5461
5608
|
className: "text-xs max-h-[450px] p-2",
|
|
5462
|
-
code: JSON.stringify(
|
|
5609
|
+
code: JSON.stringify(Je(i), null, 2)
|
|
5463
5610
|
}
|
|
5464
5611
|
) : /* @__PURE__ */ p.jsx("span", { className: "text-muted-foreground font-mono italic text-xs", children: "Empty Response" }) }),
|
|
5465
|
-
/* @__PURE__ */ p.jsx(
|
|
5612
|
+
/* @__PURE__ */ p.jsx(pa, { className: "flex justify-end text-xs", children: s.description })
|
|
5466
5613
|
] }, s.statusCode);
|
|
5467
5614
|
})
|
|
5468
5615
|
]
|
|
5469
5616
|
}
|
|
5470
5617
|
) });
|
|
5471
|
-
},
|
|
5618
|
+
}, Uc = (e, t) => {
|
|
5472
5619
|
let n;
|
|
5473
5620
|
switch (t) {
|
|
5474
5621
|
case "shell":
|
|
@@ -5509,7 +5656,7 @@ const xc = ({ content: e }) => {
|
|
|
5509
5656
|
break;
|
|
5510
5657
|
}
|
|
5511
5658
|
return n ? n[0] : "";
|
|
5512
|
-
},
|
|
5659
|
+
}, fa = $r(
|
|
5513
5660
|
/* GraphQL */
|
|
5514
5661
|
`
|
|
5515
5662
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -5521,7 +5668,7 @@ const xc = ({ content: e }) => {
|
|
|
5521
5668
|
}
|
|
5522
5669
|
}
|
|
5523
5670
|
`
|
|
5524
|
-
),
|
|
5671
|
+
), Mc = { suspense: !0 }, Hc = {
|
|
5525
5672
|
get: me.green,
|
|
5526
5673
|
post: me.blue,
|
|
5527
5674
|
put: me.yellow,
|
|
@@ -5530,23 +5677,23 @@ const xc = ({ content: e }) => {
|
|
|
5530
5677
|
options: me.indigo,
|
|
5531
5678
|
head: me.gray,
|
|
5532
5679
|
trace: me.gray
|
|
5533
|
-
},
|
|
5680
|
+
}, du = ({
|
|
5534
5681
|
operation: e,
|
|
5535
5682
|
selectedResponse: t,
|
|
5536
5683
|
onSelectResponse: n
|
|
5537
5684
|
}) => {
|
|
5538
5685
|
var h, v, g;
|
|
5539
|
-
const a =
|
|
5540
|
-
query:
|
|
5686
|
+
const a = Ac(), [s] = ci({
|
|
5687
|
+
query: fa,
|
|
5541
5688
|
variables: a,
|
|
5542
|
-
context:
|
|
5543
|
-
}), i =
|
|
5689
|
+
context: Mc
|
|
5690
|
+
}), i = Hc[e.method.toLocaleLowerCase()] ?? me.gray, [r, o] = Wa(), [, l] = mr(), c = r.get("lang") ?? "shell", u = (h = e.requestBody) == null ? void 0 : h.content, f = e.path.split("/").map((b, y, x) => {
|
|
5544
5691
|
const S = b.startsWith("{") && b.endsWith("}") || b.startsWith(":") ? b.replace(/[:{}]/g, "") : void 0;
|
|
5545
5692
|
return (
|
|
5546
5693
|
// eslint-disable-next-line react/no-array-index-key
|
|
5547
5694
|
/* @__PURE__ */ p.jsxs(Ze, { children: [
|
|
5548
5695
|
S ? /* @__PURE__ */ p.jsx(
|
|
5549
|
-
|
|
5696
|
+
rn,
|
|
5550
5697
|
{
|
|
5551
5698
|
name: S,
|
|
5552
5699
|
backgroundOpacity: "0",
|
|
@@ -5558,9 +5705,9 @@ const xc = ({ content: e }) => {
|
|
|
5558
5705
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
5559
5706
|
] }, b + y)
|
|
5560
5707
|
);
|
|
5561
|
-
}), { selectedServer: d } =
|
|
5708
|
+
}), { selectedServer: d } = xr(), m = Aa(() => {
|
|
5562
5709
|
var x, k;
|
|
5563
|
-
const b = (x = u == null ? void 0 : u[0]) != null && x.schema ?
|
|
5710
|
+
const b = (x = u == null ? void 0 : u[0]) != null && x.schema ? Je(u[0].schema) : void 0, y = new Rc({
|
|
5564
5711
|
method: e.method.toLocaleUpperCase(),
|
|
5565
5712
|
url: (d ?? ((k = s.data) == null ? void 0 : k.schema.url) ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
5566
5713
|
postData: b ? {
|
|
@@ -5574,7 +5721,7 @@ const xc = ({ content: e }) => {
|
|
|
5574
5721
|
headersSize: 0,
|
|
5575
5722
|
bodySize: 0
|
|
5576
5723
|
});
|
|
5577
|
-
return
|
|
5724
|
+
return Uc(y, c);
|
|
5578
5725
|
}, [
|
|
5579
5726
|
d,
|
|
5580
5727
|
c,
|
|
@@ -5583,15 +5730,15 @@ const xc = ({ content: e }) => {
|
|
|
5583
5730
|
u
|
|
5584
5731
|
]);
|
|
5585
5732
|
return /* @__PURE__ */ p.jsxs("aside", { className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [
|
|
5586
|
-
/* @__PURE__ */ p.jsxs(
|
|
5587
|
-
/* @__PURE__ */ p.jsxs(
|
|
5733
|
+
/* @__PURE__ */ p.jsxs(mn, { children: [
|
|
5734
|
+
/* @__PURE__ */ p.jsxs(hn, { className: "flex justify-between items-center flex-nowrap py-3 gap-2 text-xs", children: [
|
|
5588
5735
|
/* @__PURE__ */ p.jsxs("span", { className: "font-mono break-words", children: [
|
|
5589
|
-
/* @__PURE__ */ p.jsx("span", { className:
|
|
5736
|
+
/* @__PURE__ */ p.jsx("span", { className: F("font-semibold", i), children: e.method.toLocaleUpperCase() }),
|
|
5590
5737
|
" ",
|
|
5591
5738
|
f
|
|
5592
5739
|
] }),
|
|
5593
5740
|
/* @__PURE__ */ p.jsx(
|
|
5594
|
-
|
|
5741
|
+
qc,
|
|
5595
5742
|
{
|
|
5596
5743
|
server: ((v = s.data) == null ? void 0 : v.schema.url) ?? "",
|
|
5597
5744
|
servers: ((g = s.data) == null ? void 0 : g.schema.servers.map((b) => b.url)) ?? [],
|
|
@@ -5599,8 +5746,8 @@ const xc = ({ content: e }) => {
|
|
|
5599
5746
|
}
|
|
5600
5747
|
)
|
|
5601
5748
|
] }),
|
|
5602
|
-
/* @__PURE__ */ p.jsx(
|
|
5603
|
-
|
|
5749
|
+
/* @__PURE__ */ p.jsx(yn, { className: "max-h-[480px] p-0", children: /* @__PURE__ */ p.jsx(
|
|
5750
|
+
We,
|
|
5604
5751
|
{
|
|
5605
5752
|
language: c,
|
|
5606
5753
|
noBackground: !0,
|
|
@@ -5608,10 +5755,10 @@ const xc = ({ content: e }) => {
|
|
|
5608
5755
|
code: m
|
|
5609
5756
|
}
|
|
5610
5757
|
) }),
|
|
5611
|
-
/* @__PURE__ */ p.jsxs(
|
|
5758
|
+
/* @__PURE__ */ p.jsxs(pa, { className: "flex items-center text-xs gap-2 justify-end py-1", children: [
|
|
5612
5759
|
/* @__PURE__ */ p.jsx("span", { children: "Show example in" }),
|
|
5613
5760
|
/* @__PURE__ */ p.jsx(
|
|
5614
|
-
|
|
5761
|
+
Mr,
|
|
5615
5762
|
{
|
|
5616
5763
|
className: "self-start max-w-[150px]",
|
|
5617
5764
|
value: c,
|
|
@@ -5637,9 +5784,9 @@ const xc = ({ content: e }) => {
|
|
|
5637
5784
|
)
|
|
5638
5785
|
] })
|
|
5639
5786
|
] }),
|
|
5640
|
-
u && /* @__PURE__ */ p.jsx(
|
|
5787
|
+
u && /* @__PURE__ */ p.jsx(_c, { content: u }),
|
|
5641
5788
|
e.responses.length > 0 && /* @__PURE__ */ p.jsx(
|
|
5642
|
-
|
|
5789
|
+
Lc,
|
|
5643
5790
|
{
|
|
5644
5791
|
selectedResponse: t,
|
|
5645
5792
|
onSelectResponse: n,
|
|
@@ -5647,7 +5794,7 @@ const xc = ({ content: e }) => {
|
|
|
5647
5794
|
}
|
|
5648
5795
|
)
|
|
5649
5796
|
] });
|
|
5650
|
-
},
|
|
5797
|
+
}, Bc = $r(`
|
|
5651
5798
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
5652
5799
|
schema(input: $input, type: $type) {
|
|
5653
5800
|
tags {
|
|
@@ -5665,10 +5812,10 @@ const xc = ({ content: e }) => {
|
|
|
5665
5812
|
}
|
|
5666
5813
|
}
|
|
5667
5814
|
}
|
|
5668
|
-
`),
|
|
5669
|
-
const e =
|
|
5670
|
-
return /* @__PURE__ */ p.jsx(
|
|
5671
|
-
},
|
|
5815
|
+
`), Vc = () => {
|
|
5816
|
+
const e = Ga(), t = e instanceof Error ? /* @__PURE__ */ p.jsx(We, { code: e.message }) : "An unknown error occurred";
|
|
5817
|
+
return /* @__PURE__ */ p.jsx(Ta, { category: "Error", title: "An error occurred", message: t });
|
|
5818
|
+
}, zc = {
|
|
5672
5819
|
get: "green",
|
|
5673
5820
|
post: "blue",
|
|
5674
5821
|
put: "yellow",
|
|
@@ -5676,11 +5823,11 @@ const xc = ({ content: e }) => {
|
|
|
5676
5823
|
patch: "purple",
|
|
5677
5824
|
options: "gray",
|
|
5678
5825
|
head: "gray"
|
|
5679
|
-
},
|
|
5680
|
-
const t =
|
|
5826
|
+
}, pu = (e) => {
|
|
5827
|
+
const t = Pa(e.navigationId ?? "/reference"), n = e.server ? new Xa({
|
|
5681
5828
|
url: e.server,
|
|
5682
|
-
exchanges: [
|
|
5683
|
-
}) :
|
|
5829
|
+
exchanges: [Za, ei]
|
|
5830
|
+
}) : ba({ useMemoryClient: e.inMemory ?? !1 });
|
|
5684
5831
|
return {
|
|
5685
5832
|
getHead: () => {
|
|
5686
5833
|
if (e.type === "url" && !e.skipPreload)
|
|
@@ -5705,8 +5852,8 @@ const xc = ({ content: e }) => {
|
|
|
5705
5852
|
...o
|
|
5706
5853
|
}) => {
|
|
5707
5854
|
var u;
|
|
5708
|
-
const l =
|
|
5709
|
-
queryFn: async () => (await n.query(
|
|
5855
|
+
const l = Na(), c = ha({
|
|
5856
|
+
queryFn: async () => (await n.query(fa, {
|
|
5710
5857
|
type: e.type,
|
|
5711
5858
|
input: e.input
|
|
5712
5859
|
})).data,
|
|
@@ -5721,11 +5868,11 @@ const xc = ({ content: e }) => {
|
|
|
5721
5868
|
onClick: l.login,
|
|
5722
5869
|
children: [
|
|
5723
5870
|
"Login to open in Playground ",
|
|
5724
|
-
/* @__PURE__ */ p.jsx(
|
|
5871
|
+
/* @__PURE__ */ p.jsx(va, { size: 16 })
|
|
5725
5872
|
]
|
|
5726
5873
|
}
|
|
5727
5874
|
) : /* @__PURE__ */ p.jsx(
|
|
5728
|
-
|
|
5875
|
+
Hr,
|
|
5729
5876
|
{
|
|
5730
5877
|
url: r ?? "/",
|
|
5731
5878
|
method: i ?? "get",
|
|
@@ -5733,16 +5880,16 @@ const xc = ({ content: e }) => {
|
|
|
5733
5880
|
...o,
|
|
5734
5881
|
children: /* @__PURE__ */ p.jsxs(je, { className: "gap-2 items-center", variant: "outline", children: [
|
|
5735
5882
|
"Open in Playground ",
|
|
5736
|
-
/* @__PURE__ */ p.jsx(
|
|
5883
|
+
/* @__PURE__ */ p.jsx(ga, { size: 16 })
|
|
5737
5884
|
] })
|
|
5738
5885
|
}
|
|
5739
5886
|
);
|
|
5740
5887
|
}
|
|
5741
5888
|
}),
|
|
5742
5889
|
getSidebar: async (a) => {
|
|
5743
|
-
if (!
|
|
5890
|
+
if (!ti({ path: t, end: !1 }, a))
|
|
5744
5891
|
return [];
|
|
5745
|
-
const { data: s } = await n.query(
|
|
5892
|
+
const { data: s } = await n.query(Bc, {
|
|
5746
5893
|
input: e.input,
|
|
5747
5894
|
type: e.type
|
|
5748
5895
|
});
|
|
@@ -5758,7 +5905,7 @@ const xc = ({ content: e }) => {
|
|
|
5758
5905
|
href: `#${o.slug}`,
|
|
5759
5906
|
badge: {
|
|
5760
5907
|
label: o.method,
|
|
5761
|
-
color:
|
|
5908
|
+
color: zc[o.method.toLowerCase()]
|
|
5762
5909
|
}
|
|
5763
5910
|
}))
|
|
5764
5911
|
}));
|
|
@@ -5771,12 +5918,12 @@ const xc = ({ content: e }) => {
|
|
|
5771
5918
|
getRoutes: () => [
|
|
5772
5919
|
{
|
|
5773
5920
|
async lazy() {
|
|
5774
|
-
const { OpenApiRoute: a } = await import("./Route-
|
|
5921
|
+
const { OpenApiRoute: a } = await import("./Route-Dq6zv0Pi.js");
|
|
5775
5922
|
return {
|
|
5776
5923
|
element: /* @__PURE__ */ p.jsx(a, { client: n, config: e })
|
|
5777
5924
|
};
|
|
5778
5925
|
},
|
|
5779
|
-
errorElement: /* @__PURE__ */ p.jsx(
|
|
5926
|
+
errorElement: /* @__PURE__ */ p.jsx(Vc, {}),
|
|
5780
5927
|
children: [
|
|
5781
5928
|
{
|
|
5782
5929
|
path: t,
|
|
@@ -5784,7 +5931,7 @@ const xc = ({ content: e }) => {
|
|
|
5784
5931
|
{
|
|
5785
5932
|
index: !0,
|
|
5786
5933
|
async lazy() {
|
|
5787
|
-
const { OperationList: a } = await import("./OperationList-
|
|
5934
|
+
const { OperationList: a } = await import("./OperationList-BO-ES1C5.js");
|
|
5788
5935
|
return { element: /* @__PURE__ */ p.jsx(a, {}) };
|
|
5789
5936
|
}
|
|
5790
5937
|
}
|
|
@@ -5796,20 +5943,22 @@ const xc = ({ content: e }) => {
|
|
|
5796
5943
|
};
|
|
5797
5944
|
};
|
|
5798
5945
|
export {
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5946
|
+
rn as C,
|
|
5947
|
+
uu as O,
|
|
5948
|
+
Mr as S,
|
|
5949
|
+
wn as T,
|
|
5950
|
+
Ac as a,
|
|
5951
|
+
ot as b,
|
|
5952
|
+
Nr as c,
|
|
5953
|
+
Tr as d,
|
|
5954
|
+
Or as e,
|
|
5955
|
+
lu as f,
|
|
5956
|
+
$r as g,
|
|
5957
|
+
Lt as h,
|
|
5958
|
+
Oe as i,
|
|
5959
|
+
Ce as j,
|
|
5960
|
+
du as k,
|
|
5961
|
+
pu as o,
|
|
5962
|
+
ci as u
|
|
5814
5963
|
};
|
|
5815
|
-
//# sourceMappingURL=index-
|
|
5964
|
+
//# sourceMappingURL=index-DNfiZTPV.js.map
|