zudoku 0.16.3 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +2 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/validate.d.ts +44 -44
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -2
- package/dist/lib/authentication/state.d.ts +1 -1
- package/dist/lib/authentication/state.js +5 -3
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
- package/dist/lib/authentication/use-broadcast/shared.js +243 -0
- package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
- package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
- package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
- package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
- package/dist/lib/components/ClientOnly.d.ts +4 -2
- package/dist/lib/components/ClientOnly.js +1 -1
- package/dist/lib/components/ClientOnly.js.map +1 -1
- package/dist/lib/components/Header.js +3 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
- package/dist/lib/components/{DevPortal.js → Zudoku.js} +11 -11
- package/dist/lib/components/Zudoku.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +4 -4
- package/dist/lib/components/context/ZudokuContext.js +1 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -7
- package/dist/lib/components/index.js +2 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +5 -5
- package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -2
- package/dist/lib/core/ZudokuContext.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +12 -12
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -9
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +2 -2
- package/dist/lib/plugins/markdown/index.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/Sidecar.js +28 -24
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +2 -2
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +2 -2
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/ui/ActionButton.d.ts +3 -1
- package/dist/lib/util/useOnScreen.d.ts +4 -0
- package/dist/lib/util/useOnScreen.js +19 -0
- package/dist/lib/util/useOnScreen.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +0 -6
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{AnchorLink-BbB2q-jx.js → AnchorLink-DYbUOP9U.js} +2 -2
- package/lib/{AnchorLink-BbB2q-jx.js.map → AnchorLink-DYbUOP9U.js.map} +1 -1
- package/lib/{AuthenticationPlugin-C9BHGXlE.js → AuthenticationPlugin-bqGAKfot.js} +3 -3
- package/lib/{AuthenticationPlugin-C9BHGXlE.js.map → AuthenticationPlugin-bqGAKfot.js.map} +1 -1
- package/lib/{ClientOnly-CVN6leDu.js → ClientOnly-E7hGysn1.js} +4 -4
- package/lib/ClientOnly-E7hGysn1.js.map +1 -0
- package/lib/{Markdown-BDcCAWwm.js → Markdown-D6UxMbZm.js} +2 -2
- package/lib/{Markdown-BDcCAWwm.js.map → Markdown-D6UxMbZm.js.map} +1 -1
- package/lib/{MdxPage-DKMH_t0f.js → MdxPage-DRKqyn2b.js} +5 -5
- package/lib/{MdxPage-DKMH_t0f.js.map → MdxPage-DRKqyn2b.js.map} +1 -1
- package/lib/{OperationList-BjppA5yM.js → OperationList-BHUBGM0c.js} +5 -5
- package/lib/{OperationList-BjppA5yM.js.map → OperationList-BHUBGM0c.js.map} +1 -1
- package/lib/{Route-D_djzMv3.js → Route-B0XuN1oC.js} +3 -3
- package/lib/{Route-D_djzMv3.js.map → Route-B0XuN1oC.js.map} +1 -1
- package/lib/{Select-Bagt3Bme.js → Select-DYKDahHt.js} +3 -3
- package/lib/{Select-Bagt3Bme.js.map → Select-DYKDahHt.js.map} +1 -1
- package/lib/{SlotletProvider-Da7eFgd2.js → SlotletProvider-mhjLPG44.js} +4 -4
- package/lib/{SlotletProvider-Da7eFgd2.js.map → SlotletProvider-mhjLPG44.js.map} +1 -1
- package/lib/{hook-sn0zMTkE.js → hook-CjQERPa7.js} +3 -3
- package/lib/{hook-sn0zMTkE.js.map → hook-CjQERPa7.js.map} +1 -1
- package/lib/{index-_gtpPhlu.js → index-BRg5pi5D.js} +1190 -1165
- package/lib/index-BRg5pi5D.js.map +1 -0
- package/lib/{index-CRo94sKK.js → index-DM9hrcCG.js} +4 -4
- package/lib/{index-CRo94sKK.js.map → index-DM9hrcCG.js.map} +1 -1
- package/lib/state-BsPrOUAh.js +252 -0
- package/lib/state-BsPrOUAh.js.map +1 -0
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/{useExposedProps-ChOIUaS4.js → useExposedProps-BxyHjPNN.js} +2 -2
- package/lib/{useExposedProps-ChOIUaS4.js.map → useExposedProps-BxyHjPNN.js.map} +1 -1
- package/lib/{ZudokuContext-BKXGJTmu.js → utils-DNAltzXc.js} +153 -152
- package/lib/utils-DNAltzXc.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 +4 -4
- package/lib/zudoku.components.js +672 -650
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +2 -2
- package/src/app/main.tsx +4 -4
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/state.ts +12 -5
- package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
- package/src/lib/authentication/use-broadcast/shared.ts +372 -0
- package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
- package/src/lib/components/ClientOnly.tsx +6 -3
- package/src/lib/components/Header.tsx +26 -20
- package/src/lib/components/Zudoku.tsx +113 -0
- package/src/lib/components/context/ZudokuContext.ts +3 -3
- package/src/lib/components/context/ZudokuProvider.tsx +2 -2
- package/src/lib/components/index.ts +2 -3
- package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +5 -5
- package/src/lib/core/plugins.ts +12 -16
- package/src/lib/plugins/api-keys/index.tsx +9 -9
- package/src/lib/plugins/custom-pages/index.tsx +2 -2
- package/src/lib/plugins/markdown/index.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +2 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +65 -51
- package/src/lib/plugins/openapi/index.tsx +2 -4
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/plugins/search-inkeep/index.tsx +2 -2
- package/src/lib/ui/ActionButton.tsx +1 -1
- package/src/lib/util/useOnScreen.ts +32 -0
- package/dist/lib/components/DevPortal.js.map +0 -1
- package/dist/lib/core/DevPortalContext.js.map +0 -1
- package/lib/ClientOnly-CVN6leDu.js.map +0 -1
- package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
- package/lib/index-_gtpPhlu.js.map +0 -1
- package/lib/state-CsuHT8ZO.js +0 -183
- package/lib/state-CsuHT8ZO.js.map +0 -1
- package/src/lib/components/DevPortal.tsx +0 -111
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { j as p } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { D as Vr,
|
|
2
|
+
import { D as Vr, z as zr, E as Jr } from "./utils-DNAltzXc.js";
|
|
3
3
|
import { XIcon as Wr, EraserIcon as ur, ChevronsUpDownIcon as Dr, LogInIcon as Gr, CirclePlayIcon as Qr } from "lucide-react";
|
|
4
4
|
import { createClient as Kr } from "zudoku/openapi-worker";
|
|
5
|
-
import { u as Yr } from "./hook-
|
|
5
|
+
import { u as Yr } from "./hook-CjQERPa7.js";
|
|
6
6
|
import { C as Xr } from "./CategoryHeading-Bb9dqxD3.js";
|
|
7
|
-
import { P as Zr, H as ea, a as ta, S as
|
|
7
|
+
import { P as Zr, H as ea, a as ta, S as Ge } from "./Markdown-D6UxMbZm.js";
|
|
8
8
|
import { Button as je } from "./ui/Button.js";
|
|
9
9
|
import { VisuallyHidden as na } from "@radix-ui/react-visually-hidden";
|
|
10
10
|
import * as re from "react";
|
|
11
|
-
import { useRef as
|
|
11
|
+
import { useRef as mt, useEffect as ht, useState as Je, useTransition as dr, Fragment as tt, useLayoutEffect as ra, createContext as aa, useContext as ia, useMemo as oa } from "react";
|
|
12
12
|
import { D as sa, b as la, a as ca, c as ua } from "./Dialog-k70Qfukb.js";
|
|
13
|
-
import { u as da, S as hn, a as yn, b as vn, c as gn, e as
|
|
13
|
+
import { u as da, S as hn, a as yn, b as vn, c as gn, e as bt } from "./Select-DYKDahHt.js";
|
|
14
14
|
import { b as Xt, C as $e, u as pa, a as fa, F as ma } from "./index.esm-C5mr_sKO.js";
|
|
15
|
-
import { a as pr } from "./state-
|
|
15
|
+
import { a as pr } from "./state-BsPrOUAh.js";
|
|
16
16
|
import { S as bn, B as kn } from "./Spinner-ChOGyPls.js";
|
|
17
17
|
import { Callout as ha } from "./ui/Callout.js";
|
|
18
|
-
import { Card as
|
|
19
|
-
import { Tabs as xn, TabsList as $n, TabsTrigger as
|
|
18
|
+
import { Card as Lt, CardHeader as ya, CardTitle as va, CardContent as ga } from "./ui/Card.js";
|
|
19
|
+
import { Tabs as xn, TabsList as $n, TabsTrigger as Le, TabsContent as Ue } from "./ui/Tabs.js";
|
|
20
20
|
import { c as ee } from "./cn-BmFQLtkS.js";
|
|
21
21
|
import { Input as st } from "./ui/Input.js";
|
|
22
22
|
import { Slot as ba } from "@radix-ui/react-slot";
|
|
23
23
|
import { g as ka, c as Be, a as xa } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
24
24
|
import { _ as $a } from "./__vite-browser-external-BYRIRx8p.js";
|
|
25
|
-
import { b as Sa, d as wa } from "./index-
|
|
26
|
-
import { o as Sn, s as
|
|
25
|
+
import { b as Sa, d as wa } from "./index-DM9hrcCG.js";
|
|
26
|
+
import { o as Sn, s as Ut, t as ja, a as Na, c as Ta, C as Oa, b as Ca, f as Pa } from "./urql-core-35Qt_U4i.js";
|
|
27
27
|
import { T as me } from "./SidebarBadge-Bbt92M5K.js";
|
|
28
28
|
import * as Zt from "@radix-ui/react-collapsible";
|
|
29
|
-
import * as
|
|
29
|
+
import * as Ye from "@radix-ui/react-tabs";
|
|
30
30
|
import { b as Ea } from "./router-BsfSoK2j.js";
|
|
31
|
-
var fr = {},
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
var fr = {}, yt = re.createContext(fr), Mc = yt.Provider;
|
|
32
|
+
yt.Consumer;
|
|
33
|
+
yt.displayName = "UrqlContext";
|
|
34
34
|
var Ra = () => {
|
|
35
|
-
var e = re.useContext(
|
|
35
|
+
var e = re.useContext(yt);
|
|
36
36
|
if (e === fr && process.env.NODE_ENV !== "production") {
|
|
37
37
|
var t = "No client has been specified using urql's Provider. please create a client and add a Provider.";
|
|
38
38
|
throw console.error(t), new Error(t);
|
|
@@ -45,7 +45,7 @@ var Ra = () => {
|
|
|
45
45
|
data: void 0,
|
|
46
46
|
extensions: void 0,
|
|
47
47
|
operation: void 0
|
|
48
|
-
}, Fa = (e, t) => e === t || !(!e || !t || e.key !== t.key),
|
|
48
|
+
}, Fa = (e, t) => e === t || !(!e || !t || e.key !== t.key), kt = (e, t) => {
|
|
49
49
|
var n = {
|
|
50
50
|
...e,
|
|
51
51
|
...t,
|
|
@@ -53,60 +53,60 @@ var Ra = () => {
|
|
|
53
53
|
fetching: !!t.fetching,
|
|
54
54
|
stale: !!t.stale
|
|
55
55
|
};
|
|
56
|
-
return ((
|
|
57
|
-
for (var i in
|
|
56
|
+
return ((a, s) => {
|
|
57
|
+
for (var i in a)
|
|
58
58
|
if (!(i in s))
|
|
59
59
|
return !0;
|
|
60
|
-
for (var
|
|
61
|
-
if (
|
|
60
|
+
for (var r in s)
|
|
61
|
+
if (r === "operation" ? !Fa(a[r], s[r]) : a[r] !== s[r])
|
|
62
62
|
return !0;
|
|
63
63
|
return !1;
|
|
64
64
|
})(e, n) ? n : e;
|
|
65
65
|
}, qa = (e, t) => {
|
|
66
|
-
for (var n = 0,
|
|
66
|
+
for (var n = 0, a = t.length; n < a; n++)
|
|
67
67
|
if (e[n] !== t[n])
|
|
68
68
|
return !0;
|
|
69
69
|
return !1;
|
|
70
|
-
},
|
|
70
|
+
}, xt = re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
71
71
|
function wn(e, t) {
|
|
72
|
-
process.env.NODE_ENV !== "production" &&
|
|
72
|
+
process.env.NODE_ENV !== "production" && xt && xt.ReactCurrentOwner && xt.ReactCurrentOwner.current ? Promise.resolve(t).then(e) : e(t);
|
|
73
73
|
}
|
|
74
74
|
function Ia(e, t) {
|
|
75
75
|
var n = re.useRef(void 0);
|
|
76
76
|
return re.useMemo(() => {
|
|
77
|
-
var
|
|
78
|
-
return n.current !== void 0 && n.current.key ===
|
|
77
|
+
var a = Ta(e, t);
|
|
78
|
+
return n.current !== void 0 && n.current.key === a.key ? n.current : (n.current = a, a);
|
|
79
79
|
}, [e, t]);
|
|
80
80
|
}
|
|
81
81
|
var _a = (e) => {
|
|
82
82
|
if (!e._react) {
|
|
83
83
|
var t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
|
|
84
|
-
e.operations$ &&
|
|
85
|
-
|
|
84
|
+
e.operations$ && Ut((a) => {
|
|
85
|
+
a.kind === "teardown" && t.has(a.key) && (t.delete(a.key), n.delete(a.key));
|
|
86
86
|
})(e.operations$), e._react = {
|
|
87
|
-
get: (
|
|
88
|
-
set(
|
|
89
|
-
t.delete(
|
|
87
|
+
get: (a) => n.get(a),
|
|
88
|
+
set(a, s) {
|
|
89
|
+
t.delete(a), n.set(a, s);
|
|
90
90
|
},
|
|
91
|
-
dispose(
|
|
92
|
-
t.add(
|
|
91
|
+
dispose(a) {
|
|
92
|
+
t.add(a);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
return e._react;
|
|
97
|
-
},
|
|
98
|
-
function
|
|
99
|
-
var t = Ra(), n = _a(t),
|
|
97
|
+
}, La = (e, t) => t && t.suspense !== void 0 ? !!t.suspense : e.suspense;
|
|
98
|
+
function Ua(e) {
|
|
99
|
+
var t = Ra(), n = _a(t), a = La(t, e.context), s = Ia(e.query, e.variables), i = re.useMemo(() => {
|
|
100
100
|
if (e.pause)
|
|
101
101
|
return null;
|
|
102
102
|
var d = t.executeQuery(s, {
|
|
103
103
|
requestPolicy: e.requestPolicy,
|
|
104
104
|
...e.context
|
|
105
105
|
});
|
|
106
|
-
return
|
|
106
|
+
return a ? Sn((m) => {
|
|
107
107
|
n.set(s.key, m);
|
|
108
108
|
})(d) : d;
|
|
109
|
-
}, [n, t, s,
|
|
109
|
+
}, [n, t, s, a, e.pause, e.requestPolicy, e.context]), r = re.useCallback((d, m) => {
|
|
110
110
|
if (!d)
|
|
111
111
|
return {
|
|
112
112
|
fetching: !1
|
|
@@ -116,12 +116,12 @@ function La(e) {
|
|
|
116
116
|
if (m && h != null && "then" in h)
|
|
117
117
|
throw h;
|
|
118
118
|
} else {
|
|
119
|
-
var
|
|
120
|
-
h =
|
|
121
|
-
})(ja(() => m && !
|
|
119
|
+
var y, g = Ut((v) => {
|
|
120
|
+
h = v, y && y(h);
|
|
121
|
+
})(ja(() => m && !y || !h)(d));
|
|
122
122
|
if (h == null && m) {
|
|
123
|
-
var b = new Promise((
|
|
124
|
-
|
|
123
|
+
var b = new Promise((v) => {
|
|
124
|
+
y = v;
|
|
125
125
|
});
|
|
126
126
|
throw n.set(s.key, b), b;
|
|
127
127
|
} else
|
|
@@ -130,27 +130,27 @@ function La(e) {
|
|
|
130
130
|
return h || {
|
|
131
131
|
fetching: !0
|
|
132
132
|
};
|
|
133
|
-
}, [n, s]), o = [t, s, e.requestPolicy, e.context, e.pause], [l, c] = re.useState(() => [i,
|
|
134
|
-
i !== l[0] && qa(l[2], o) && c([i, u =
|
|
135
|
-
var d = l[0], m = l[2][1], h = !1,
|
|
136
|
-
h = !0, wn(c, (
|
|
137
|
-
var k =
|
|
138
|
-
return
|
|
133
|
+
}, [n, s]), o = [t, s, e.requestPolicy, e.context, e.pause], [l, c] = re.useState(() => [i, kt(Aa, r(i, a)), o]), u = l[1];
|
|
134
|
+
i !== l[0] && qa(l[2], o) && c([i, u = kt(l[1], r(i, a)), o]), re.useEffect(() => {
|
|
135
|
+
var d = l[0], m = l[2][1], h = !1, y = (b) => {
|
|
136
|
+
h = !0, wn(c, (v) => {
|
|
137
|
+
var k = kt(v[1], b);
|
|
138
|
+
return v[1] !== k ? [v[0], k, v[2]] : v;
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
141
|
if (d) {
|
|
142
|
-
var g =
|
|
143
|
-
|
|
142
|
+
var g = Ut(y)(Na(() => {
|
|
143
|
+
y({
|
|
144
144
|
fetching: !1
|
|
145
145
|
});
|
|
146
146
|
})(d));
|
|
147
|
-
return h ||
|
|
147
|
+
return h || y({
|
|
148
148
|
fetching: !0
|
|
149
149
|
}), () => {
|
|
150
150
|
n.dispose(m.key), g.unsubscribe();
|
|
151
151
|
};
|
|
152
152
|
} else
|
|
153
|
-
|
|
153
|
+
y({
|
|
154
154
|
fetching: !1
|
|
155
155
|
});
|
|
156
156
|
}, [n, l[0], l[2][1]]);
|
|
@@ -160,10 +160,10 @@ function La(e) {
|
|
|
160
160
|
...e.context,
|
|
161
161
|
...d
|
|
162
162
|
};
|
|
163
|
-
wn(c, (h) => [
|
|
164
|
-
n.set(s.key,
|
|
163
|
+
wn(c, (h) => [a ? Sn((y) => {
|
|
164
|
+
n.set(s.key, y);
|
|
165
165
|
})(t.executeQuery(s, m)) : t.executeQuery(s, m), h[1], o]);
|
|
166
|
-
}, [t, n, s,
|
|
166
|
+
}, [t, n, s, a, e.requestPolicy, e.context, e.pause]);
|
|
167
167
|
return [u, f];
|
|
168
168
|
}
|
|
169
169
|
const Ha = {
|
|
@@ -957,12 +957,12 @@ const Wa = ({
|
|
|
957
957
|
n && /* @__PURE__ */ p.jsx(Xr, { children: n }),
|
|
958
958
|
e && /* @__PURE__ */ p.jsx(ea, { level: 1, className: "flex gap-3.5 items-center", children: e }),
|
|
959
959
|
/* @__PURE__ */ p.jsx("p", { children: t })
|
|
960
|
-
] }),
|
|
960
|
+
] }), $t = (e) => Math.abs(
|
|
961
961
|
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
962
|
-
),
|
|
963
|
-
const n = (3 *
|
|
964
|
-
return `${n}deg ${
|
|
965
|
-
},
|
|
962
|
+
), St = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, n) => `${$t(t) + $t(n)}`)) : $t(e), Da = (e, t = {}) => {
|
|
963
|
+
const n = (3 * St(e) + 2 * St(e) + St(e)) % 360, { saturation: a = 75, lightness: s = 60 } = t;
|
|
964
|
+
return `${n}deg ${a}% ${s}%`;
|
|
965
|
+
}, wt = "data-linked-param", Ga = (e) => {
|
|
966
966
|
const [t] = ta();
|
|
967
967
|
return Da(
|
|
968
968
|
e,
|
|
@@ -972,34 +972,34 @@ const Wa = ({
|
|
|
972
972
|
name: e,
|
|
973
973
|
className: t,
|
|
974
974
|
backgroundOpacity: n = "100%",
|
|
975
|
-
borderOpacity:
|
|
975
|
+
borderOpacity: a = "100%",
|
|
976
976
|
slug: s,
|
|
977
977
|
children: i,
|
|
978
|
-
onClick:
|
|
978
|
+
onClick: r
|
|
979
979
|
}) => {
|
|
980
|
-
const o =
|
|
981
|
-
return
|
|
980
|
+
const o = mt(null), l = e.replace(/[{}]/g, ""), c = s == null ? void 0 : s.replace(/[{}]/g, ""), u = Ga(l), f = `hsl(${u} / ${a})`, d = `hsl(${u} / ${n})`;
|
|
981
|
+
return ht(() => {
|
|
982
982
|
if (!c || !o.current) return;
|
|
983
983
|
const m = () => {
|
|
984
|
-
document.querySelectorAll(`[${
|
|
985
|
-
|
|
984
|
+
document.querySelectorAll(`[${wt}="${c}"]`).forEach((y) => {
|
|
985
|
+
y instanceof HTMLElement && (y.dataset.active = "true");
|
|
986
986
|
});
|
|
987
987
|
}, h = () => {
|
|
988
|
-
document.querySelectorAll(`[${
|
|
989
|
-
|
|
988
|
+
document.querySelectorAll(`[${wt}="${c}"]`).forEach((y) => {
|
|
989
|
+
y instanceof HTMLElement && (y.dataset.active = "false");
|
|
990
990
|
});
|
|
991
991
|
};
|
|
992
992
|
return o.current.addEventListener("mouseenter", m), o.current.addEventListener("mouseleave", h), () => {
|
|
993
|
-
var
|
|
994
|
-
(
|
|
993
|
+
var y, g;
|
|
994
|
+
(y = o.current) == null || y.removeEventListener("mouseenter", m), (g = o.current) == null || g.removeEventListener("mouseleave", h);
|
|
995
995
|
};
|
|
996
996
|
}, [c]), /* @__PURE__ */ p.jsxs(
|
|
997
997
|
"span",
|
|
998
998
|
{
|
|
999
999
|
className: ee("inline-flex relative rounded group", t),
|
|
1000
|
-
[
|
|
1000
|
+
[wt]: c,
|
|
1001
1001
|
ref: o,
|
|
1002
|
-
onClick:
|
|
1002
|
+
onClick: r,
|
|
1003
1003
|
children: [
|
|
1004
1004
|
/* @__PURE__ */ p.jsx(
|
|
1005
1005
|
"span",
|
|
@@ -1013,12 +1013,12 @@ const Wa = ({
|
|
|
1013
1013
|
}
|
|
1014
1014
|
);
|
|
1015
1015
|
}, Qa = (e, t, n) => {
|
|
1016
|
-
const
|
|
1016
|
+
const a = t.replace(/(:\w+|\{\w+})/g, (i) => {
|
|
1017
1017
|
var l;
|
|
1018
|
-
const
|
|
1019
|
-
return ((l = n.pathParams.find((c) => c.name ===
|
|
1018
|
+
const r = i.replace(/[:{}]/g, "");
|
|
1019
|
+
return ((l = n.pathParams.find((c) => c.name === r)) == null ? void 0 : l.value) ?? i;
|
|
1020
1020
|
}), s = new URL(
|
|
1021
|
-
|
|
1021
|
+
a.replace(/^\//, ""),
|
|
1022
1022
|
e.endsWith("/") ? e : `${e}/`
|
|
1023
1023
|
);
|
|
1024
1024
|
return n.queryParams.filter((i) => i.active).forEach((i) => {
|
|
@@ -1028,12 +1028,12 @@ const Wa = ({
|
|
|
1028
1028
|
control: e,
|
|
1029
1029
|
register: t
|
|
1030
1030
|
}) => {
|
|
1031
|
-
const { fields: n, append:
|
|
1031
|
+
const { fields: n, append: a, remove: s } = Xt({
|
|
1032
1032
|
control: e,
|
|
1033
1033
|
name: "headers"
|
|
1034
1034
|
});
|
|
1035
1035
|
return /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1036
|
-
/* @__PURE__ */ p.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ p.jsx("tbody", { children: n.map((i,
|
|
1036
|
+
/* @__PURE__ */ p.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ p.jsx("tbody", { children: n.map((i, r) => /* @__PURE__ */ p.jsxs(
|
|
1037
1037
|
"tr",
|
|
1038
1038
|
{
|
|
1039
1039
|
className: "group has-[:focus]:bg-muted/50 hover:bg-muted/50",
|
|
@@ -1041,7 +1041,7 @@ const Wa = ({
|
|
|
1041
1041
|
/* @__PURE__ */ p.jsx("td", { className: "flex gap-2 items-center", children: /* @__PURE__ */ p.jsx(
|
|
1042
1042
|
st,
|
|
1043
1043
|
{
|
|
1044
|
-
...t(`headers.${
|
|
1044
|
+
...t(`headers.${r}.name`),
|
|
1045
1045
|
placeholder: "Name",
|
|
1046
1046
|
className: "border-0 shadow-none text-xs font-mono",
|
|
1047
1047
|
autoComplete: "off"
|
|
@@ -1053,7 +1053,7 @@ const Wa = ({
|
|
|
1053
1053
|
{
|
|
1054
1054
|
placeholder: "Value",
|
|
1055
1055
|
className: "border-0 shadow-none text-xs font-mono",
|
|
1056
|
-
...t(`headers.${
|
|
1056
|
+
...t(`headers.${r}.value`),
|
|
1057
1057
|
autoComplete: "off"
|
|
1058
1058
|
}
|
|
1059
1059
|
),
|
|
@@ -1064,7 +1064,7 @@ const Wa = ({
|
|
|
1064
1064
|
variant: "ghost",
|
|
1065
1065
|
className: "text-muted-foreground opacity-0 group-hover:opacity-100",
|
|
1066
1066
|
onClick: () => {
|
|
1067
|
-
s(
|
|
1067
|
+
s(r);
|
|
1068
1068
|
},
|
|
1069
1069
|
type: "button",
|
|
1070
1070
|
children: /* @__PURE__ */ p.jsx(Wr, { size: 16 })
|
|
@@ -1079,7 +1079,7 @@ const Wa = ({
|
|
|
1079
1079
|
je,
|
|
1080
1080
|
{
|
|
1081
1081
|
className: "",
|
|
1082
|
-
onClick: () =>
|
|
1082
|
+
onClick: () => a({ name: "", value: "" }),
|
|
1083
1083
|
type: "button",
|
|
1084
1084
|
children: "Add header"
|
|
1085
1085
|
}
|
|
@@ -1092,12 +1092,12 @@ const Wa = ({
|
|
|
1092
1092
|
control: e,
|
|
1093
1093
|
name: "pathParams"
|
|
1094
1094
|
});
|
|
1095
|
-
return /* @__PURE__ */ p.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ p.jsx("tbody", { children: t.map((n,
|
|
1095
|
+
return /* @__PURE__ */ p.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ p.jsx("tbody", { children: t.map((n, a) => /* @__PURE__ */ p.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
1096
1096
|
/* @__PURE__ */ p.jsx("td", { children: /* @__PURE__ */ p.jsx(
|
|
1097
1097
|
$e,
|
|
1098
1098
|
{
|
|
1099
1099
|
control: e,
|
|
1100
|
-
name: `pathParams.${
|
|
1100
|
+
name: `pathParams.${a}.value`,
|
|
1101
1101
|
render: ({ field: s }) => /* @__PURE__ */ p.jsxs("div", { children: [
|
|
1102
1102
|
/* @__PURE__ */ p.jsx(
|
|
1103
1103
|
en,
|
|
@@ -1121,7 +1121,7 @@ const Wa = ({
|
|
|
1121
1121
|
$e,
|
|
1122
1122
|
{
|
|
1123
1123
|
control: e,
|
|
1124
|
-
name: `pathParams.${
|
|
1124
|
+
name: `pathParams.${a}.value`,
|
|
1125
1125
|
render: ({ field: s }) => /* @__PURE__ */ p.jsx(
|
|
1126
1126
|
st,
|
|
1127
1127
|
{
|
|
@@ -1136,7 +1136,7 @@ const Wa = ({
|
|
|
1136
1136
|
$e,
|
|
1137
1137
|
{
|
|
1138
1138
|
control: e,
|
|
1139
|
-
name: `pathParams.${
|
|
1139
|
+
name: `pathParams.${a}.value`,
|
|
1140
1140
|
render: ({ field: s }) => /* @__PURE__ */ p.jsx(
|
|
1141
1141
|
je,
|
|
1142
1142
|
{
|
|
@@ -1158,12 +1158,12 @@ const Wa = ({
|
|
|
1158
1158
|
] }) })
|
|
1159
1159
|
] }, n.id)) }) });
|
|
1160
1160
|
}, Xa = (e, t) => {
|
|
1161
|
-
const n = re.forwardRef(({ className:
|
|
1161
|
+
const n = re.forwardRef(({ className: a, asChild: s, ...i }, r) => {
|
|
1162
1162
|
const o = s ? ba : e;
|
|
1163
1163
|
return re.createElement(o, {
|
|
1164
1164
|
...i,
|
|
1165
|
-
ref:
|
|
1166
|
-
className: ee(t,
|
|
1165
|
+
ref: r,
|
|
1166
|
+
className: ee(t, a)
|
|
1167
1167
|
});
|
|
1168
1168
|
});
|
|
1169
1169
|
return n.displayName = `VariantComponent(${e})`, n;
|
|
@@ -1177,10 +1177,10 @@ const Wa = ({
|
|
|
1177
1177
|
const { fields: n } = Xt({
|
|
1178
1178
|
control: e,
|
|
1179
1179
|
name: "queryParams"
|
|
1180
|
-
}),
|
|
1180
|
+
}), a = pa(), s = t.map((o) => !!o.isRequired), r = a.watch("identity") !== nt;
|
|
1181
1181
|
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(
|
|
1182
1182
|
// TODO remove this hack for Accu or make it more generic
|
|
1183
|
-
(o) => !(
|
|
1183
|
+
(o) => !(r && o.name === "apikey")
|
|
1184
1184
|
).map((o, l) => /* @__PURE__ */ p.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
1185
1185
|
/* @__PURE__ */ p.jsx("td", { className: "text-center", children: /* @__PURE__ */ p.jsx(
|
|
1186
1186
|
$e,
|
|
@@ -1227,7 +1227,7 @@ const Wa = ({
|
|
|
1227
1227
|
{
|
|
1228
1228
|
...c,
|
|
1229
1229
|
onChange: (u) => {
|
|
1230
|
-
c.onChange(u.target.value), u.target.value.length > 0 &&
|
|
1230
|
+
c.onChange(u.target.value), u.target.value.length > 0 && a.setValue(`queryParams.${l}.active`, !0);
|
|
1231
1231
|
},
|
|
1232
1232
|
placeholder: "Enter value",
|
|
1233
1233
|
className: "w-full border-0 shadow-none text-xs font-mono"
|
|
@@ -1265,7 +1265,7 @@ const Wa = ({
|
|
|
1265
1265
|
value: e,
|
|
1266
1266
|
onChange: t,
|
|
1267
1267
|
className: n,
|
|
1268
|
-
options:
|
|
1268
|
+
options: a,
|
|
1269
1269
|
showChevrons: s = !0
|
|
1270
1270
|
}) => /* @__PURE__ */ p.jsxs("div", { className: "grid", children: [
|
|
1271
1271
|
/* @__PURE__ */ p.jsx(
|
|
@@ -1278,7 +1278,7 @@ const Wa = ({
|
|
|
1278
1278
|
),
|
|
1279
1279
|
value: e,
|
|
1280
1280
|
onChange: t,
|
|
1281
|
-
children:
|
|
1281
|
+
children: a.map((i) => /* @__PURE__ */ p.jsx("option", { value: i.value, children: i.label }, i.value))
|
|
1282
1282
|
}
|
|
1283
1283
|
),
|
|
1284
1284
|
/* @__PURE__ */ p.jsx(
|
|
@@ -1302,7 +1302,7 @@ const Wa = ({
|
|
|
1302
1302
|
"application/xml": "xml",
|
|
1303
1303
|
"application/xhtml+xml": "xhtml"
|
|
1304
1304
|
}).find(
|
|
1305
|
-
([
|
|
1305
|
+
([a]) => e.includes(a)
|
|
1306
1306
|
)) == null ? void 0 : n[1];
|
|
1307
1307
|
}, ni = (e) => {
|
|
1308
1308
|
const t = e.get("Content-Type") || "";
|
|
@@ -1317,24 +1317,24 @@ const Wa = ({
|
|
|
1317
1317
|
body: e = "",
|
|
1318
1318
|
headers: t
|
|
1319
1319
|
}) => {
|
|
1320
|
-
const n = ni(t),
|
|
1321
|
-
|
|
1320
|
+
const n = ni(t), a = ri(e), s = a || e, [i, r] = Je(
|
|
1321
|
+
a ? "formatted" : "raw"
|
|
1322
1322
|
);
|
|
1323
1323
|
return /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1324
|
-
/* @__PURE__ */ p.jsx(
|
|
1325
|
-
|
|
1324
|
+
/* @__PURE__ */ p.jsx(Lt, { className: "shadow-none", children: /* @__PURE__ */ p.jsx(
|
|
1325
|
+
Ge,
|
|
1326
1326
|
{
|
|
1327
|
-
language: i === "raw" ?
|
|
1327
|
+
language: i === "raw" ? a ? "plain" : n : "json",
|
|
1328
1328
|
noBackground: !0,
|
|
1329
1329
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1330
1330
|
code: i === "raw" ? e : s
|
|
1331
1331
|
}
|
|
1332
1332
|
) }),
|
|
1333
|
-
|
|
1333
|
+
a && /* @__PURE__ */ p.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ p.jsx(
|
|
1334
1334
|
hr,
|
|
1335
1335
|
{
|
|
1336
1336
|
value: i,
|
|
1337
|
-
onChange: (o) =>
|
|
1337
|
+
onChange: (o) => r(o.target.value),
|
|
1338
1338
|
options: [
|
|
1339
1339
|
{ value: "formatted", label: "Formatted" },
|
|
1340
1340
|
{ value: "raw", label: "Raw" }
|
|
@@ -1342,7 +1342,7 @@ const Wa = ({
|
|
|
1342
1342
|
}
|
|
1343
1343
|
) })
|
|
1344
1344
|
] });
|
|
1345
|
-
},
|
|
1345
|
+
}, nt = "__none", ii = {
|
|
1346
1346
|
200: "OK",
|
|
1347
1347
|
201: "Created",
|
|
1348
1348
|
202: "Accepted",
|
|
@@ -1357,49 +1357,49 @@ const Wa = ({
|
|
|
1357
1357
|
server: e,
|
|
1358
1358
|
servers: t,
|
|
1359
1359
|
url: n,
|
|
1360
|
-
method:
|
|
1360
|
+
method: a,
|
|
1361
1361
|
headers: s = [],
|
|
1362
1362
|
queryParams: i = [],
|
|
1363
|
-
pathParams:
|
|
1363
|
+
pathParams: r = [],
|
|
1364
1364
|
defaultBody: o = ""
|
|
1365
1365
|
}) => {
|
|
1366
|
-
var R,
|
|
1367
|
-
const { selectedServer: l, setSelectedServer: c } = pr(), [, u] = dr(), { register: f, control: d, handleSubmit: m, watch: h, setValue:
|
|
1366
|
+
var R, U;
|
|
1367
|
+
const { selectedServer: l, setSelectedServer: c } = pr(), [, u] = dr(), { register: f, control: d, handleSubmit: m, watch: h, setValue: y, ...g } = fa({
|
|
1368
1368
|
defaultValues: {
|
|
1369
1369
|
body: o,
|
|
1370
|
-
queryParams: i.map((
|
|
1371
|
-
name:
|
|
1372
|
-
value:
|
|
1373
|
-
active:
|
|
1370
|
+
queryParams: i.map(($) => ({
|
|
1371
|
+
name: $.name,
|
|
1372
|
+
value: $.defaultValue ?? "",
|
|
1373
|
+
active: $.defaultActive ?? !1
|
|
1374
1374
|
})),
|
|
1375
|
-
pathParams:
|
|
1376
|
-
name:
|
|
1377
|
-
value:
|
|
1375
|
+
pathParams: r.map(($) => ({
|
|
1376
|
+
name: $.name,
|
|
1377
|
+
value: $.defaultValue ?? ""
|
|
1378
1378
|
})),
|
|
1379
|
-
headers: s.map((
|
|
1380
|
-
name:
|
|
1381
|
-
value:
|
|
1379
|
+
headers: s.map(($) => ({
|
|
1380
|
+
name: $.name,
|
|
1381
|
+
value: $.defaultValue ?? ""
|
|
1382
1382
|
})),
|
|
1383
|
-
identity:
|
|
1383
|
+
identity: nt
|
|
1384
1384
|
}
|
|
1385
|
-
}), b = h(),
|
|
1386
|
-
|
|
1385
|
+
}), b = h(), v = Vr(), k = mt(!1);
|
|
1386
|
+
ht(() => {
|
|
1387
1387
|
var I;
|
|
1388
1388
|
if (k.current) return;
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
}, [
|
|
1392
|
-
const
|
|
1393
|
-
mutationFn: async (
|
|
1389
|
+
const $ = (I = v.data) == null ? void 0 : I.at(0);
|
|
1390
|
+
$ && (y("identity", $.id), k.current = !0);
|
|
1391
|
+
}, [y, v.data]);
|
|
1392
|
+
const x = da({
|
|
1393
|
+
mutationFn: async ($) => {
|
|
1394
1394
|
var H, V;
|
|
1395
|
-
const I = Qa(l ?? e, n,
|
|
1396
|
-
method:
|
|
1395
|
+
const I = Qa(l ?? e, n, $), F = performance.now(), M = new Request(I, {
|
|
1396
|
+
method: a.toUpperCase(),
|
|
1397
1397
|
headers: Object.fromEntries(
|
|
1398
|
-
|
|
1398
|
+
$.headers.filter((q) => q.name).map((q) => [q.name, q.value])
|
|
1399
1399
|
),
|
|
1400
|
-
body:
|
|
1400
|
+
body: $.body ? $.body : void 0
|
|
1401
1401
|
});
|
|
1402
|
-
|
|
1402
|
+
$.identity !== nt && ((V = (H = v.data) == null ? void 0 : H.find((q) => q.id === $.identity)) == null || V.authorizeRequest(M));
|
|
1403
1403
|
try {
|
|
1404
1404
|
const q = await fetch(M, {
|
|
1405
1405
|
signal: AbortSignal.timeout(5e3)
|
|
@@ -1417,42 +1417,42 @@ const Wa = ({
|
|
|
1417
1417
|
) : q;
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
}), S = n.split("/").map((
|
|
1420
|
+
}), S = n.split("/").map(($, I, F) => {
|
|
1421
1421
|
var he;
|
|
1422
|
-
const M =
|
|
1422
|
+
const M = $.startsWith("{") && $.endsWith("}") || $.startsWith(":"), H = $.replace(/[:{}]/g, ""), V = (he = b.pathParams.find((pe) => pe.name === H)) == null ? void 0 : he.value, q = V ? /* @__PURE__ */ p.jsx(en, { backgroundOpacity: "25%", name: $, slug: $, children: encodeURIComponent(V) }) : /* @__PURE__ */ p.jsx(
|
|
1423
1423
|
"span",
|
|
1424
1424
|
{
|
|
1425
1425
|
className: "underline decoration-wavy decoration-red-500",
|
|
1426
1426
|
title: `Missing value for path parameter \`${H}\``,
|
|
1427
|
-
children:
|
|
1427
|
+
children: $
|
|
1428
1428
|
}
|
|
1429
1429
|
);
|
|
1430
1430
|
return (
|
|
1431
1431
|
// eslint-disable-next-line react/no-array-index-key
|
|
1432
|
-
/* @__PURE__ */ p.jsxs(
|
|
1433
|
-
M ? q :
|
|
1432
|
+
/* @__PURE__ */ p.jsxs(tt, { children: [
|
|
1433
|
+
M ? q : $,
|
|
1434
1434
|
I < F.length - 1 && "/",
|
|
1435
1435
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
1436
|
-
] },
|
|
1436
|
+
] }, $ + I)
|
|
1437
1437
|
);
|
|
1438
|
-
}), j = Array.from(((R =
|
|
1439
|
-
|
|
1438
|
+
}), j = Array.from(((R = x.data) == null ? void 0 : R.headers.entries()) ?? []), E = b.queryParams.filter(($) => $.active).map(($, I, F) => /* @__PURE__ */ p.jsxs(tt, { children: [
|
|
1439
|
+
$.name,
|
|
1440
1440
|
"=",
|
|
1441
|
-
encodeURIComponent(
|
|
1441
|
+
encodeURIComponent($.value).replaceAll("%20", "+"),
|
|
1442
1442
|
I < F.length - 1 && "&",
|
|
1443
1443
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
1444
|
-
] },
|
|
1444
|
+
] }, $.name)), C = /* @__PURE__ */ p.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: t && t.length > 1 ? /* @__PURE__ */ p.jsxs(
|
|
1445
1445
|
hn,
|
|
1446
1446
|
{
|
|
1447
|
-
onValueChange: (
|
|
1447
|
+
onValueChange: ($) => {
|
|
1448
1448
|
u(() => {
|
|
1449
|
-
c(
|
|
1449
|
+
c($);
|
|
1450
1450
|
});
|
|
1451
1451
|
},
|
|
1452
1452
|
value: l,
|
|
1453
1453
|
children: [
|
|
1454
1454
|
/* @__PURE__ */ p.jsx(yn, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ p.jsx(vn, {}) }),
|
|
1455
|
-
/* @__PURE__ */ p.jsx(gn, { children: t.map((
|
|
1455
|
+
/* @__PURE__ */ p.jsx(gn, { children: t.map(($) => /* @__PURE__ */ p.jsx(bt, { value: $, children: $.replace(/^https?:\/\//, "") }, $)) })
|
|
1456
1456
|
]
|
|
1457
1457
|
}
|
|
1458
1458
|
) : /* @__PURE__ */ p.jsx("span", { children: e.replace(/^https?:\/\//, "") }) });
|
|
@@ -1463,15 +1463,15 @@ const Wa = ({
|
|
|
1463
1463
|
control: d,
|
|
1464
1464
|
handleSubmit: m,
|
|
1465
1465
|
watch: h,
|
|
1466
|
-
setValue:
|
|
1466
|
+
setValue: y,
|
|
1467
1467
|
...g,
|
|
1468
|
-
children: /* @__PURE__ */ p.jsx("form", { onSubmit: m((
|
|
1468
|
+
children: /* @__PURE__ */ p.jsx("form", { onSubmit: m(($) => x.mutateAsync($)), children: /* @__PURE__ */ p.jsxs("div", { className: "grid grid-cols-[8fr_7fr] text-sm h-full", children: [
|
|
1469
1469
|
/* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
1470
1470
|
/* @__PURE__ */ p.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1471
1471
|
/* @__PURE__ */ p.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1472
|
-
/* @__PURE__ */ p.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children:
|
|
1472
|
+
/* @__PURE__ */ p.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: a.toUpperCase() }),
|
|
1473
1473
|
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
|
|
1474
|
-
|
|
1474
|
+
C,
|
|
1475
1475
|
S,
|
|
1476
1476
|
E.length > 0 ? "?" : "",
|
|
1477
1477
|
E
|
|
@@ -1482,22 +1482,22 @@ const Wa = ({
|
|
|
1482
1482
|
/* @__PURE__ */ p.jsxs(
|
|
1483
1483
|
xn,
|
|
1484
1484
|
{
|
|
1485
|
-
defaultValue: i.length +
|
|
1485
|
+
defaultValue: i.length + r.length > 0 ? "parameters" : "headers",
|
|
1486
1486
|
children: [
|
|
1487
1487
|
/* @__PURE__ */ p.jsxs("div", { className: "flex flex-wrap gap-1 justify-between", children: [
|
|
1488
1488
|
/* @__PURE__ */ p.jsxs($n, { children: [
|
|
1489
|
-
i.length +
|
|
1490
|
-
/* @__PURE__ */ p.jsxs(
|
|
1489
|
+
i.length + r.length > 0 && /* @__PURE__ */ p.jsx(Le, { value: "parameters", children: "Parameters" }),
|
|
1490
|
+
/* @__PURE__ */ p.jsxs(Le, { value: "headers", children: [
|
|
1491
1491
|
"Headers",
|
|
1492
1492
|
" ",
|
|
1493
1493
|
b.headers.length > 0 && `(${b.headers.length})`
|
|
1494
1494
|
] }),
|
|
1495
1495
|
/* @__PURE__ */ p.jsx(
|
|
1496
|
-
|
|
1496
|
+
Le,
|
|
1497
1497
|
{
|
|
1498
1498
|
value: "body",
|
|
1499
1499
|
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1500
|
-
|
|
1500
|
+
a.toUpperCase()
|
|
1501
1501
|
),
|
|
1502
1502
|
children: "Body"
|
|
1503
1503
|
}
|
|
@@ -1508,23 +1508,23 @@ const Wa = ({
|
|
|
1508
1508
|
/* @__PURE__ */ p.jsxs(
|
|
1509
1509
|
hn,
|
|
1510
1510
|
{
|
|
1511
|
-
onValueChange: (
|
|
1511
|
+
onValueChange: ($) => y("identity", $),
|
|
1512
1512
|
value: b.identity,
|
|
1513
1513
|
defaultValue: b.identity,
|
|
1514
1514
|
children: [
|
|
1515
|
-
/* @__PURE__ */ p.jsx(yn, { className: "w-[180px] flex", children:
|
|
1515
|
+
/* @__PURE__ */ p.jsx(yn, { className: "w-[180px] flex", children: v.isPending ? /* @__PURE__ */ p.jsx(bn, {}) : /* @__PURE__ */ p.jsx(vn, {}) }),
|
|
1516
1516
|
/* @__PURE__ */ p.jsxs(gn, { align: "center", children: [
|
|
1517
|
-
/* @__PURE__ */ p.jsx(
|
|
1518
|
-
(
|
|
1517
|
+
/* @__PURE__ */ p.jsx(bt, { value: nt, children: "None" }),
|
|
1518
|
+
(U = v.data) == null ? void 0 : U.map(($) => /* @__PURE__ */ p.jsx(bt, { value: $.id, children: $.label }, $.id))
|
|
1519
1519
|
] })
|
|
1520
1520
|
]
|
|
1521
1521
|
}
|
|
1522
1522
|
)
|
|
1523
1523
|
] })
|
|
1524
1524
|
] }),
|
|
1525
|
-
/* @__PURE__ */ p.jsx(
|
|
1526
|
-
/* @__PURE__ */ p.jsxs(
|
|
1527
|
-
|
|
1525
|
+
/* @__PURE__ */ p.jsx(Ue, { value: "headers", children: /* @__PURE__ */ p.jsx(Ka, { control: d, register: f }) }),
|
|
1526
|
+
/* @__PURE__ */ p.jsxs(Ue, { value: "parameters", children: [
|
|
1527
|
+
r.length > 0 && /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1528
1528
|
/* @__PURE__ */ p.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1529
1529
|
/* @__PURE__ */ p.jsx(Ya, { control: d })
|
|
1530
1530
|
] }),
|
|
@@ -1533,7 +1533,7 @@ const Wa = ({
|
|
|
1533
1533
|
/* @__PURE__ */ p.jsx(ei, { control: d, queryParams: i })
|
|
1534
1534
|
] })
|
|
1535
1535
|
] }),
|
|
1536
|
-
/* @__PURE__ */ p.jsx(
|
|
1536
|
+
/* @__PURE__ */ p.jsx(Ue, { value: "body", children: /* @__PURE__ */ p.jsx(
|
|
1537
1537
|
"textarea",
|
|
1538
1538
|
{
|
|
1539
1539
|
...f("body"),
|
|
@@ -1544,63 +1544,63 @@ const Wa = ({
|
|
|
1544
1544
|
}
|
|
1545
1545
|
)
|
|
1546
1546
|
] }),
|
|
1547
|
-
/* @__PURE__ */ p.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children:
|
|
1548
|
-
b.pathParams.some((
|
|
1549
|
-
/* @__PURE__ */ p.jsxs(
|
|
1547
|
+
/* @__PURE__ */ p.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children: x.error ? /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1548
|
+
b.pathParams.some(($) => $.value === "") && /* @__PURE__ */ p.jsx(ha, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1549
|
+
/* @__PURE__ */ p.jsxs(Lt, { children: [
|
|
1550
1550
|
/* @__PURE__ */ p.jsx(ya, { children: /* @__PURE__ */ p.jsx(va, { children: "Request failed" }) }),
|
|
1551
1551
|
/* @__PURE__ */ p.jsxs(ga, { children: [
|
|
1552
1552
|
"Error:",
|
|
1553
1553
|
" ",
|
|
1554
|
-
|
|
1554
|
+
x.error.message || String(x.error) || "Unexpected error"
|
|
1555
1555
|
] })
|
|
1556
1556
|
] })
|
|
1557
|
-
] }) :
|
|
1557
|
+
] }) : x.data ? /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1558
1558
|
/* @__PURE__ */ p.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ p.jsxs("div", { className: "flex text-xs gap-6", children: [
|
|
1559
1559
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
1560
1560
|
"Status: ",
|
|
1561
|
-
|
|
1561
|
+
x.data.status,
|
|
1562
1562
|
" ",
|
|
1563
|
-
ii[
|
|
1563
|
+
ii[x.data.status] ?? ""
|
|
1564
1564
|
] }),
|
|
1565
1565
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
1566
1566
|
"Time: ",
|
|
1567
|
-
|
|
1567
|
+
x.data.time.toFixed(0),
|
|
1568
1568
|
"ms"
|
|
1569
1569
|
] }),
|
|
1570
1570
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
1571
1571
|
"Size: ",
|
|
1572
|
-
|
|
1572
|
+
x.data.size,
|
|
1573
1573
|
" B"
|
|
1574
1574
|
] })
|
|
1575
1575
|
] }) }),
|
|
1576
1576
|
/* @__PURE__ */ p.jsxs(xn, { defaultValue: "response", children: [
|
|
1577
1577
|
/* @__PURE__ */ p.jsxs($n, { children: [
|
|
1578
|
-
/* @__PURE__ */ p.jsx(
|
|
1579
|
-
/* @__PURE__ */ p.jsx(
|
|
1578
|
+
/* @__PURE__ */ p.jsx(Le, { value: "response", children: "Response" }),
|
|
1579
|
+
/* @__PURE__ */ p.jsx(Le, { value: "headers", children: j.length ? `Headers (${j.length})` : "No headers" })
|
|
1580
1580
|
] }),
|
|
1581
|
-
/* @__PURE__ */ p.jsx(
|
|
1581
|
+
/* @__PURE__ */ p.jsx(Ue, { value: "response", children: /* @__PURE__ */ p.jsx(
|
|
1582
1582
|
ai,
|
|
1583
1583
|
{
|
|
1584
|
-
headers:
|
|
1585
|
-
body:
|
|
1584
|
+
headers: x.data.headers,
|
|
1585
|
+
body: x.data.body
|
|
1586
1586
|
}
|
|
1587
1587
|
) }),
|
|
1588
|
-
/* @__PURE__ */ p.jsx(
|
|
1589
|
-
|
|
1588
|
+
/* @__PURE__ */ p.jsx(Ue, { value: "headers", children: /* @__PURE__ */ p.jsxs(
|
|
1589
|
+
Lt,
|
|
1590
1590
|
{
|
|
1591
1591
|
className: "max-h-[calc(83.333vh-140px)] overflow-y-auto grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4",
|
|
1592
1592
|
children: [
|
|
1593
1593
|
/* @__PURE__ */ p.jsx("div", { className: "font-semibold", children: "Key" }),
|
|
1594
1594
|
/* @__PURE__ */ p.jsx("div", { className: "font-semibold", children: "Value" }),
|
|
1595
|
-
j.map(([
|
|
1596
|
-
/* @__PURE__ */ p.jsx("div", { children:
|
|
1595
|
+
j.map(([$, I]) => /* @__PURE__ */ p.jsxs(tt, { children: [
|
|
1596
|
+
/* @__PURE__ */ p.jsx("div", { children: $ }),
|
|
1597
1597
|
/* @__PURE__ */ p.jsx("div", { className: "break-words", children: I })
|
|
1598
|
-
] },
|
|
1598
|
+
] }, $))
|
|
1599
1599
|
]
|
|
1600
1600
|
}
|
|
1601
1601
|
) })
|
|
1602
1602
|
] })
|
|
1603
|
-
] }) : /* @__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:
|
|
1603
|
+
] }) : /* @__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: x.isPending ? /* @__PURE__ */ p.jsx(bn, {}) : "Send a request first to see the response here" }) }) })
|
|
1604
1604
|
] }) })
|
|
1605
1605
|
}
|
|
1606
1606
|
);
|
|
@@ -1626,8 +1626,8 @@ const Wa = ({
|
|
|
1626
1626
|
)
|
|
1627
1627
|
}
|
|
1628
1628
|
), yr = (e) => {
|
|
1629
|
-
const [t, n] =
|
|
1630
|
-
return /* @__PURE__ */ p.jsxs(sa, { onOpenChange: (
|
|
1629
|
+
const [t, n] = Je(!1);
|
|
1630
|
+
return /* @__PURE__ */ p.jsxs(sa, { onOpenChange: (a) => n(a), children: [
|
|
1631
1631
|
/* @__PURE__ */ p.jsx(la, { 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: [
|
|
1632
1632
|
"Test",
|
|
1633
1633
|
/* @__PURE__ */ p.jsx(si, { className: "", size: 14 })
|
|
@@ -1655,11 +1655,11 @@ var jn = (e, t) => {
|
|
|
1655
1655
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
1656
1656
|
*/
|
|
1657
1657
|
constructor({ indent: e, join: t } = {}) {
|
|
1658
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter = Nn, this.lineJoin = Tn, this.indentLine = (n,
|
|
1659
|
-
const s = this.indentLine(n,
|
|
1658
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Nn, this.lineJoin = Tn, this.indentLine = (n, a = 0) => `${this.indentationCharacter.repeat(a)}${n}`, this.unshift = (n, a) => {
|
|
1659
|
+
const s = this.indentLine(n, a);
|
|
1660
1660
|
this.code.unshift(s);
|
|
1661
|
-
}, this.push = (n,
|
|
1662
|
-
const s = this.indentLine(n,
|
|
1661
|
+
}, this.push = (n, a) => {
|
|
1662
|
+
const s = this.indentLine(n, a);
|
|
1663
1663
|
this.code.push(s);
|
|
1664
1664
|
}, this.blank = () => {
|
|
1665
1665
|
this.code.push("");
|
|
@@ -1680,17 +1680,17 @@ Object.defineProperty(tn, "__esModule", { value: !0 });
|
|
|
1680
1680
|
tn.default = (e) => Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
1681
1681
|
const ui = li, di = ci, pi = tn.default;
|
|
1682
1682
|
var fi = (e, t, n) => {
|
|
1683
|
-
const
|
|
1684
|
-
return function s(i,
|
|
1685
|
-
|
|
1683
|
+
const a = [];
|
|
1684
|
+
return function s(i, r, o) {
|
|
1685
|
+
r = r || {}, r.indent = r.indent || " ", o = o || "";
|
|
1686
1686
|
let l;
|
|
1687
|
-
|
|
1687
|
+
r.inlineCharacterLimit === void 0 ? l = {
|
|
1688
1688
|
newLine: `
|
|
1689
1689
|
`,
|
|
1690
1690
|
newLineOrSpace: `
|
|
1691
1691
|
`,
|
|
1692
1692
|
pad: o,
|
|
1693
|
-
indent: o +
|
|
1693
|
+
indent: o + r.indent
|
|
1694
1694
|
} : l = {
|
|
1695
1695
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
1696
1696
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
@@ -1698,13 +1698,13 @@ var fi = (e, t, n) => {
|
|
|
1698
1698
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
1699
1699
|
};
|
|
1700
1700
|
const c = (u) => {
|
|
1701
|
-
if (
|
|
1701
|
+
if (r.inlineCharacterLimit === void 0)
|
|
1702
1702
|
return u;
|
|
1703
1703
|
const f = u.replace(new RegExp(l.newLine, "g"), "").replace(new RegExp(l.newLineOrSpace, "g"), " ").replace(new RegExp(l.pad + "|" + l.indent, "g"), "");
|
|
1704
|
-
return f.length <=
|
|
1705
|
-
`).replace(new RegExp(l.pad, "g"), o).replace(new RegExp(l.indent, "g"), o +
|
|
1704
|
+
return f.length <= r.inlineCharacterLimit ? f : u.replace(new RegExp(l.newLine + "|" + l.newLineOrSpace, "g"), `
|
|
1705
|
+
`).replace(new RegExp(l.pad, "g"), o).replace(new RegExp(l.indent, "g"), o + r.indent);
|
|
1706
1706
|
};
|
|
1707
|
-
if (
|
|
1707
|
+
if (a.indexOf(i) !== -1)
|
|
1708
1708
|
return '"[Circular]"';
|
|
1709
1709
|
if (i == null || typeof i == "number" || typeof i == "boolean" || typeof i == "function" || typeof i == "symbol" || ui(i))
|
|
1710
1710
|
return String(i);
|
|
@@ -1713,37 +1713,37 @@ var fi = (e, t, n) => {
|
|
|
1713
1713
|
if (Array.isArray(i)) {
|
|
1714
1714
|
if (i.length === 0)
|
|
1715
1715
|
return "[]";
|
|
1716
|
-
|
|
1716
|
+
a.push(i);
|
|
1717
1717
|
const u = "[" + l.newLine + i.map((f, d) => {
|
|
1718
1718
|
const m = i.length - 1 === d ? l.newLine : "," + l.newLineOrSpace;
|
|
1719
|
-
let h = s(f,
|
|
1720
|
-
return
|
|
1719
|
+
let h = s(f, r, o + r.indent);
|
|
1720
|
+
return r.transform && (h = r.transform(i, d, h)), l.indent + h + m;
|
|
1721
1721
|
}).join("") + l.pad + "]";
|
|
1722
|
-
return
|
|
1722
|
+
return a.pop(), c(u);
|
|
1723
1723
|
}
|
|
1724
1724
|
if (di(i)) {
|
|
1725
1725
|
let u = Object.keys(i).concat(pi(i));
|
|
1726
|
-
if (
|
|
1726
|
+
if (r.filter && (u = u.filter((d) => r.filter(i, d))), u.length === 0)
|
|
1727
1727
|
return "{}";
|
|
1728
|
-
|
|
1728
|
+
a.push(i);
|
|
1729
1729
|
const f = "{" + l.newLine + u.map((d, m) => {
|
|
1730
|
-
const h = u.length - 1 === m ? l.newLine : "," + l.newLineOrSpace,
|
|
1731
|
-
let
|
|
1732
|
-
return
|
|
1730
|
+
const h = u.length - 1 === m ? l.newLine : "," + l.newLineOrSpace, y = typeof d == "symbol", g = !y && /^[a-z$_][a-z$_0-9]*$/i.test(d), b = y || g ? d : s(d, r);
|
|
1731
|
+
let v = s(i[d], r, o + r.indent);
|
|
1732
|
+
return r.transform && (v = r.transform(i, d, v)), l.indent + String(b) + ": " + v + h;
|
|
1733
1733
|
}).join("") + l.pad + "}";
|
|
1734
|
-
return
|
|
1734
|
+
return a.pop(), c(f);
|
|
1735
1735
|
}
|
|
1736
1736
|
return i = String(i).replace(/[\r\n]/g, (u) => u === `
|
|
1737
|
-
` ? "\\n" : "\\r"),
|
|
1737
|
+
` ? "\\n" : "\\r"), r.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
|
|
1738
1738
|
}(e, t, n);
|
|
1739
1739
|
};
|
|
1740
1740
|
const Q = /* @__PURE__ */ ka(fi);
|
|
1741
|
-
function
|
|
1742
|
-
const { delimiter: n = '"', escapeChar:
|
|
1743
|
-
return [...e.toString()].map((
|
|
1744
|
-
` ? s ? `${
|
|
1741
|
+
function We(e, t = {}) {
|
|
1742
|
+
const { delimiter: n = '"', escapeChar: a = "\\", escapeNewlines: s = !0 } = t;
|
|
1743
|
+
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
1744
|
+
` ? 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("");
|
|
1745
1745
|
}
|
|
1746
|
-
var
|
|
1746
|
+
var De = (e) => We(e, { delimiter: "'" }), W = (e) => We(e, { delimiter: '"' }), mi = {
|
|
1747
1747
|
info: {
|
|
1748
1748
|
key: "libcurl",
|
|
1749
1749
|
title: "Libcurl",
|
|
@@ -1751,13 +1751,13 @@ var We = (e) => Je(e, { delimiter: "'" }), W = (e) => Je(e, { delimiter: '"' }),
|
|
|
1751
1751
|
description: "Simple REST and HTTP API Client for C",
|
|
1752
1752
|
extname: ".c"
|
|
1753
1753
|
},
|
|
1754
|
-
convert: ({ method: e, fullUrl: t, headersObj: n, allHeaders:
|
|
1755
|
-
const { push: i, blank:
|
|
1756
|
-
i("CURL *hnd = curl_easy_init();"),
|
|
1754
|
+
convert: ({ method: e, fullUrl: t, headersObj: n, allHeaders: a, postData: s }) => {
|
|
1755
|
+
const { push: i, blank: r, join: o } = new O();
|
|
1756
|
+
i("CURL *hnd = curl_easy_init();"), r(), i(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), i("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), i(`curl_easy_setopt(hnd, CURLOPT_URL, "${t}");`);
|
|
1757
1757
|
const l = Object.keys(n);
|
|
1758
|
-
return l.length && (
|
|
1758
|
+
return l.length && (r(), i("struct curl_slist *headers = NULL;"), l.forEach((c) => {
|
|
1759
1759
|
i(`headers = curl_slist_append(headers, "${c}: ${W(n[c])}");`);
|
|
1760
|
-
}), i("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")),
|
|
1760
|
+
}), 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();
|
|
1761
1761
|
}
|
|
1762
1762
|
}, hi = {
|
|
1763
1763
|
info: {
|
|
@@ -1773,7 +1773,7 @@ var We = (e) => Je(e, { delimiter: "'" }), W = (e) => Je(e, { delimiter: '"' }),
|
|
|
1773
1773
|
const n = Y(e, t);
|
|
1774
1774
|
if (n)
|
|
1775
1775
|
return e[n];
|
|
1776
|
-
},
|
|
1776
|
+
}, vt = (e, t) => !!Y(e, t), yi = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
1777
1777
|
(t) => e.indexOf(t) > -1
|
|
1778
1778
|
), On = class {
|
|
1779
1779
|
constructor(e) {
|
|
@@ -1785,11 +1785,11 @@ var We = (e) => Je(e, { delimiter: "'" }), W = (e) => Je(e, { delimiter: '"' }),
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}, vr = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), gr = (e) => e === void 0 ? !0 : vr(e) === "object" ? Object.keys(e).length === 0 : !1, Cn = (e) => (Object.keys(e).filter((t) => gr(e[t])).forEach((t) => {
|
|
1787
1787
|
delete e[t];
|
|
1788
|
-
}), e),
|
|
1788
|
+
}), e), rt = (e, t) => {
|
|
1789
1789
|
const n = " ".repeat(e);
|
|
1790
1790
|
return t.replace(/\n/g, `
|
|
1791
1791
|
${n}`);
|
|
1792
|
-
},
|
|
1792
|
+
}, Ht = (e) => {
|
|
1793
1793
|
switch (vr(e)) {
|
|
1794
1794
|
case "string":
|
|
1795
1795
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
@@ -1802,16 +1802,16 @@ ${n}`);
|
|
|
1802
1802
|
case "regexp":
|
|
1803
1803
|
return `#"${e.source}"`;
|
|
1804
1804
|
case "object": {
|
|
1805
|
-
const t = Object.keys(e).reduce((n,
|
|
1806
|
-
const s =
|
|
1807
|
-
return `${n}:${
|
|
1805
|
+
const t = Object.keys(e).reduce((n, a) => {
|
|
1806
|
+
const s = rt(a.length + 2, Ht(e[a]));
|
|
1807
|
+
return `${n}:${a} ${s}
|
|
1808
1808
|
`;
|
|
1809
1809
|
}, "").trim();
|
|
1810
|
-
return `{${
|
|
1810
|
+
return `{${rt(1, t)}}`;
|
|
1811
1811
|
}
|
|
1812
1812
|
case "array": {
|
|
1813
|
-
const t = e.reduce((n,
|
|
1814
|
-
return `[${
|
|
1813
|
+
const t = e.reduce((n, a) => `${n} ${Ht(a)}`, "").trim();
|
|
1814
|
+
return `[${rt(1, t)}]`;
|
|
1815
1815
|
}
|
|
1816
1816
|
default:
|
|
1817
1817
|
return e.toString();
|
|
@@ -1824,10 +1824,10 @@ ${n}`);
|
|
|
1824
1824
|
description: "An idiomatic clojure http client wrapping the apache client.",
|
|
1825
1825
|
extname: ".clj"
|
|
1826
1826
|
},
|
|
1827
|
-
convert: ({ queryObj: e, method: t, postData: n, url:
|
|
1828
|
-
const { push:
|
|
1827
|
+
convert: ({ queryObj: e, method: t, postData: n, url: a, allHeaders: s }, i) => {
|
|
1828
|
+
const { push: r, join: o } = new O({ indent: i == null ? void 0 : i.indent }), l = ["get", "post", "put", "delete", "patch", "head", "options"];
|
|
1829
1829
|
if (t = t.toLowerCase(), !l.includes(t))
|
|
1830
|
-
return
|
|
1830
|
+
return r("Method not supported"), o();
|
|
1831
1831
|
const c = {
|
|
1832
1832
|
headers: s,
|
|
1833
1833
|
"query-params": e
|
|
@@ -1878,12 +1878,12 @@ ${n}`);
|
|
|
1878
1878
|
}
|
|
1879
1879
|
break;
|
|
1880
1880
|
}
|
|
1881
|
-
if (
|
|
1881
|
+
if (r(`(require '[clj-http.client :as client])
|
|
1882
1882
|
`), gr(Cn(c)))
|
|
1883
|
-
|
|
1883
|
+
r(`(client/${t} "${a}")`);
|
|
1884
1884
|
else {
|
|
1885
|
-
const u = 11 + t.length +
|
|
1886
|
-
|
|
1885
|
+
const u = 11 + t.length + a.length, f = rt(u, Ht(Cn(c)));
|
|
1886
|
+
r(`(client/${t} "${a}" ${f})`);
|
|
1887
1887
|
}
|
|
1888
1888
|
return o();
|
|
1889
1889
|
}
|
|
@@ -1903,16 +1903,16 @@ ${n}`);
|
|
|
1903
1903
|
const n = {
|
|
1904
1904
|
gzip: "DecompressionMethods.GZip",
|
|
1905
1905
|
deflate: "DecompressionMethods.Deflate"
|
|
1906
|
-
},
|
|
1906
|
+
}, a = [];
|
|
1907
1907
|
return typeof t == "string" && (t = [t]), t.forEach((s) => {
|
|
1908
1908
|
s.split(",").forEach((i) => {
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1911
|
-
const o = n[
|
|
1912
|
-
o &&
|
|
1909
|
+
const r = /\s*([^;\s]+)/.exec(i);
|
|
1910
|
+
if (r) {
|
|
1911
|
+
const o = n[r[1]];
|
|
1912
|
+
o && a.push(o);
|
|
1913
1913
|
}
|
|
1914
1914
|
});
|
|
1915
|
-
}),
|
|
1915
|
+
}), a;
|
|
1916
1916
|
}, xi = {
|
|
1917
1917
|
info: {
|
|
1918
1918
|
key: "httpclient",
|
|
@@ -1921,20 +1921,20 @@ ${n}`);
|
|
|
1921
1921
|
description: ".NET Standard HTTP Client",
|
|
1922
1922
|
extname: ".cs"
|
|
1923
1923
|
},
|
|
1924
|
-
convert: ({ allHeaders: e, postData: t, method: n, fullUrl:
|
|
1924
|
+
convert: ({ allHeaders: e, postData: t, method: n, fullUrl: a }, s) => {
|
|
1925
1925
|
var m, h;
|
|
1926
1926
|
const i = {
|
|
1927
1927
|
indent: " ",
|
|
1928
1928
|
...s
|
|
1929
|
-
}, { push:
|
|
1930
|
-
|
|
1929
|
+
}, { push: r, join: o } = new O({ indent: i.indent });
|
|
1930
|
+
r("using System.Net.Http.Headers;");
|
|
1931
1931
|
let l = "";
|
|
1932
1932
|
const c = !!e.cookie, u = ki(e);
|
|
1933
|
-
(c || u.length) && (l = "clientHandler",
|
|
1933
|
+
(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("{");
|
|
1934
1934
|
const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
1935
|
-
n = n.toUpperCase(), n && f.includes(n) ? n = `HttpMethod.${n[0]}${n.substring(1).toLowerCase()}` : n = `new HttpMethod("${n}")`,
|
|
1936
|
-
const d = Object.keys(e).filter((
|
|
1937
|
-
switch (
|
|
1935
|
+
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);
|
|
1936
|
+
const d = Object.keys(e).filter((y) => {
|
|
1937
|
+
switch (y.toLowerCase()) {
|
|
1938
1938
|
case "content-type":
|
|
1939
1939
|
case "content-length":
|
|
1940
1940
|
case "accept-encoding":
|
|
@@ -1943,27 +1943,27 @@ ${n}`);
|
|
|
1943
1943
|
return !0;
|
|
1944
1944
|
}
|
|
1945
1945
|
});
|
|
1946
|
-
if (d.length && (
|
|
1947
|
-
|
|
1948
|
-
}),
|
|
1949
|
-
const
|
|
1950
|
-
switch (
|
|
1946
|
+
if (d.length && (r("Headers =", 1), r("{", 1), d.forEach((y) => {
|
|
1947
|
+
r(`{ "${y}", "${W(e[y])}" },`, 2);
|
|
1948
|
+
}), r("},", 1)), t.text) {
|
|
1949
|
+
const y = t.mimeType;
|
|
1950
|
+
switch (y) {
|
|
1951
1951
|
case "application/x-www-form-urlencoded":
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
}),
|
|
1952
|
+
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (m = t.params) == null || m.forEach((g) => {
|
|
1953
|
+
r(`{ "${g.name}", "${g.value}" },`, 2);
|
|
1954
|
+
}), r("}),", 1);
|
|
1955
1955
|
break;
|
|
1956
1956
|
case "multipart/form-data":
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
}),
|
|
1957
|
+
r("Content = new MultipartFormDataContent", 1), r("{", 1), (h = t.params) == null || h.forEach((g) => {
|
|
1958
|
+
r(`new StringContent(${JSON.stringify(g.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), g.contentType && r(`ContentType = new MediaTypeHeaderValue("${g.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${g.name}",`, 5), g.fileName && r(`FileName = "${g.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
|
|
1959
|
+
}), r("},", 1);
|
|
1960
1960
|
break;
|
|
1961
1961
|
default:
|
|
1962
|
-
|
|
1962
|
+
r(`Content = new StringContent(${JSON.stringify(t.text || "")})`, 1), r("{", 1), r("Headers =", 2), r("{", 2), r(`ContentType = new MediaTypeHeaderValue("${y}")`, 3), r("}", 2), r("}", 1);
|
|
1963
1963
|
break;
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
|
-
return
|
|
1966
|
+
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();
|
|
1967
1967
|
}
|
|
1968
1968
|
};
|
|
1969
1969
|
function $i(e) {
|
|
@@ -1978,49 +1978,49 @@ var Si = {
|
|
|
1978
1978
|
extname: ".cs",
|
|
1979
1979
|
installation: "dotnet add package RestSharp"
|
|
1980
1980
|
},
|
|
1981
|
-
convert: ({ method: e, fullUrl: t, headersObj: n, cookies:
|
|
1982
|
-
const { push:
|
|
1981
|
+
convert: ({ method: e, fullUrl: t, headersObj: n, cookies: a, postData: s, uriObj: i }) => {
|
|
1982
|
+
const { push: r, join: o } = new O();
|
|
1983
1983
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
|
|
1984
1984
|
e.toUpperCase()
|
|
1985
1985
|
))
|
|
1986
1986
|
return "Method not supported";
|
|
1987
|
-
|
|
1987
|
+
r(`using RestSharp;
|
|
1988
1988
|
|
|
1989
|
-
`),
|
|
1989
|
+
`), r(`var options = new RestClientOptions("${t}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
|
|
1990
1990
|
const c = s.mimeType && s.mimeType === "multipart/form-data";
|
|
1991
|
-
switch (c &&
|
|
1991
|
+
switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(n).forEach((u) => {
|
|
1992
1992
|
if (s.mimeType && u.toLowerCase() === "content-type" && s.text) {
|
|
1993
|
-
c && s.boundary &&
|
|
1993
|
+
c && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
|
|
1994
1994
|
return;
|
|
1995
1995
|
}
|
|
1996
|
-
|
|
1997
|
-
}),
|
|
1998
|
-
|
|
1996
|
+
r(`request.AddHeader("${u}", "${W(n[u])}");`);
|
|
1997
|
+
}), a.forEach(({ name: u, value: f }) => {
|
|
1998
|
+
r(`request.AddCookie("${u}", "${W(f)}", "${i.pathname}", "${i.host}");`);
|
|
1999
1999
|
}), s.mimeType) {
|
|
2000
2000
|
case "multipart/form-data":
|
|
2001
2001
|
if (!s.params) break;
|
|
2002
2002
|
s.params.forEach((u) => {
|
|
2003
|
-
u.fileName ?
|
|
2003
|
+
u.fileName ? r(`request.AddFile("${u.name}", "${u.fileName}");`) : r(`request.AddParameter("${u.name}", "${u.value}");`);
|
|
2004
2004
|
});
|
|
2005
2005
|
break;
|
|
2006
2006
|
case "application/x-www-form-urlencoded":
|
|
2007
2007
|
if (!s.params) break;
|
|
2008
2008
|
s.params.forEach((u) => {
|
|
2009
|
-
|
|
2009
|
+
r(`request.AddParameter("${u.name}", "${u.value}");`);
|
|
2010
2010
|
});
|
|
2011
2011
|
break;
|
|
2012
2012
|
case "application/json": {
|
|
2013
2013
|
if (!s.text) break;
|
|
2014
2014
|
const u = JSON.stringify(s.text);
|
|
2015
|
-
|
|
2015
|
+
r(`request.AddJsonBody(${u}, false);`);
|
|
2016
2016
|
break;
|
|
2017
2017
|
}
|
|
2018
2018
|
default:
|
|
2019
2019
|
if (!s.text) break;
|
|
2020
|
-
|
|
2020
|
+
r(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
2021
2021
|
}
|
|
2022
|
-
return
|
|
2023
|
-
`),
|
|
2022
|
+
return r(`var response = await client.${$i(e)}Async(request);
|
|
2023
|
+
`), r(`Console.WriteLine("{0}", response.Content);
|
|
2024
2024
|
`), o();
|
|
2025
2025
|
}
|
|
2026
2026
|
}, wi = {
|
|
@@ -2042,15 +2042,15 @@ var Si = {
|
|
|
2042
2042
|
description: "Golang HTTP client request",
|
|
2043
2043
|
extname: ".go"
|
|
2044
2044
|
},
|
|
2045
|
-
convert: ({ postData: e, method: t, allHeaders: n, fullUrl:
|
|
2046
|
-
const { blank: i, push:
|
|
2047
|
-
c && (
|
|
2045
|
+
convert: ({ postData: e, method: t, allHeaders: n, fullUrl: a }, s = {}) => {
|
|
2046
|
+
const { blank: i, push: r, join: o } = new O({ indent: " " }), { showBoilerplate: l = !0, checkErrors: c = !1, printBody: u = !0, timeout: f = -1 } = s, d = c ? "err" : "_", m = l ? 1 : 0, h = () => {
|
|
2047
|
+
c && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
|
|
2048
2048
|
};
|
|
2049
|
-
l && (
|
|
2050
|
-
const
|
|
2051
|
-
return g && (
|
|
2052
|
-
|
|
2053
|
-
}), i()),
|
|
2049
|
+
l && (r("package main"), i(), r("import ("), r('"fmt"', m), f > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), u && r('"io"', m), r(")"), i(), r("func main() {"), i());
|
|
2050
|
+
const y = f > 0, g = y, b = g ? "client" : "http.DefaultClient";
|
|
2051
|
+
return g && (r("client := http.Client{", m), y && r(`Timeout: time.Duration(${f} * time.Second),`, m + 1), r("}", m), i()), r(`url := "${a}"`, m), i(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), i(), r(`req, ${d} := http.NewRequest("${t}", url, payload)`, m), i()) : (r(`req, ${d} := http.NewRequest("${t}", url, nil)`, m), i()), h(), Object.keys(n).length && (Object.keys(n).forEach((v) => {
|
|
2052
|
+
r(`req.Header.Add("${v}", "${W(n[v])}")`, m);
|
|
2053
|
+
}), 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();
|
|
2054
2054
|
}
|
|
2055
2055
|
}, Ni = {
|
|
2056
2056
|
info: {
|
|
@@ -2071,18 +2071,18 @@ var Si = {
|
|
|
2071
2071
|
description: "HTTP/1.1 request string in accordance with RFC 7230",
|
|
2072
2072
|
extname: null
|
|
2073
2073
|
},
|
|
2074
|
-
convert: ({ method: e, fullUrl: t, uriObj: n, httpVersion:
|
|
2074
|
+
convert: ({ method: e, fullUrl: t, uriObj: n, httpVersion: a, allHeaders: s, postData: i }, r) => {
|
|
2075
2075
|
const o = {
|
|
2076
2076
|
absoluteURI: !1,
|
|
2077
2077
|
autoContentLength: !0,
|
|
2078
2078
|
autoHost: !0,
|
|
2079
|
-
...
|
|
2079
|
+
...r
|
|
2080
2080
|
}, { blank: l, push: c, join: u } = new O({ indent: "", join: Pn }), f = o.absoluteURI ? t : n.path;
|
|
2081
|
-
c(`${e} ${f} ${
|
|
2081
|
+
c(`${e} ${f} ${a}`);
|
|
2082
2082
|
const d = Object.keys(s);
|
|
2083
|
-
if (d.forEach((
|
|
2084
|
-
const g =
|
|
2085
|
-
c(`${g}: ${s[
|
|
2083
|
+
if (d.forEach((y) => {
|
|
2084
|
+
const g = y.toLowerCase().replace(/(^|-)(\w)/g, (b) => b.toUpperCase());
|
|
2085
|
+
c(`${g}: ${s[y]}`);
|
|
2086
2086
|
}), o.autoHost && !d.includes("host") && c(`Host: ${n.host}`), o.autoContentLength && i.text && !d.includes("content-length")) {
|
|
2087
2087
|
const g = new TextEncoder().encode(i.text).length.toString();
|
|
2088
2088
|
c(`Content-Length: ${g}`);
|
|
@@ -2108,14 +2108,14 @@ var Si = {
|
|
|
2108
2108
|
description: "Asynchronous Http and WebSocket Client library for Java",
|
|
2109
2109
|
extname: ".java"
|
|
2110
2110
|
},
|
|
2111
|
-
convert: ({ method: e, allHeaders: t, postData: n, fullUrl:
|
|
2111
|
+
convert: ({ method: e, allHeaders: t, postData: n, fullUrl: a }, s) => {
|
|
2112
2112
|
const i = {
|
|
2113
2113
|
indent: " ",
|
|
2114
2114
|
...s
|
|
2115
|
-
}, { blank:
|
|
2116
|
-
return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${
|
|
2115
|
+
}, { blank: r, push: o, join: l } = new O({ indent: i.indent });
|
|
2116
|
+
return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(t).forEach((c) => {
|
|
2117
2117
|
o(`.setHeader("${c}", "${W(t[c])}")`, 1);
|
|
2118
|
-
}), n.text && o(`.setBody(${JSON.stringify(n.text)})`, 1), o(".execute()", 1), o(".toCompletableFuture()", 1), o(".thenAccept(System.out::println)", 1), o(".join();", 1),
|
|
2118
|
+
}), 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();
|
|
2119
2119
|
}
|
|
2120
2120
|
}, Pi = {
|
|
2121
2121
|
info: {
|
|
@@ -2125,19 +2125,19 @@ var Si = {
|
|
|
2125
2125
|
description: "Java Standardized HTTP Client API",
|
|
2126
2126
|
extname: ".java"
|
|
2127
2127
|
},
|
|
2128
|
-
convert: ({ allHeaders: e, fullUrl: t, method: n, postData:
|
|
2128
|
+
convert: ({ allHeaders: e, fullUrl: t, method: n, postData: a }, s) => {
|
|
2129
2129
|
const i = {
|
|
2130
2130
|
indent: " ",
|
|
2131
2131
|
...s
|
|
2132
|
-
}, { push:
|
|
2133
|
-
return
|
|
2134
|
-
|
|
2135
|
-
}),
|
|
2136
|
-
`.method("${n.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(
|
|
2132
|
+
}, { push: r, join: o } = new O({ indent: i.indent });
|
|
2133
|
+
return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${t}"))`, 2), Object.keys(e).forEach((l) => {
|
|
2134
|
+
r(`.header("${l}", "${W(e[l])}")`, 2);
|
|
2135
|
+
}), a.text ? r(
|
|
2136
|
+
`.method("${n.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(a.text)}))`,
|
|
2137
2137
|
2
|
|
2138
|
-
) :
|
|
2138
|
+
) : r(`.method("${n.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`, 2), r(".build();", 2), r(
|
|
2139
2139
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
2140
|
-
),
|
|
2140
|
+
), r("System.out.println(response.body());"), o();
|
|
2141
2141
|
}
|
|
2142
2142
|
}, Ei = {
|
|
2143
2143
|
info: {
|
|
@@ -2147,14 +2147,14 @@ var Si = {
|
|
|
2147
2147
|
description: "An HTTP Request Client Library",
|
|
2148
2148
|
extname: ".java"
|
|
2149
2149
|
},
|
|
2150
|
-
convert: ({ postData: e, method: t, fullUrl: n, allHeaders:
|
|
2150
|
+
convert: ({ postData: e, method: t, fullUrl: n, allHeaders: a }, s) => {
|
|
2151
2151
|
const i = {
|
|
2152
2152
|
indent: " ",
|
|
2153
2153
|
...s
|
|
2154
|
-
}, { push:
|
|
2155
|
-
return
|
|
2156
|
-
|
|
2157
|
-
}),
|
|
2154
|
+
}, { push: r, blank: o, join: l } = new O({ indent: i.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
2155
|
+
return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? r(`.${t.toLowerCase()}(body)`, 1) : r(`.${t.toLowerCase()}(null)`, 1) : r(`.${t.toLowerCase()}()`, 1) : e.text ? r(`.method("${t.toUpperCase()}", body)`, 1) : r(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((f) => {
|
|
2156
|
+
r(`.addHeader("${f}", "${W(a[f])}")`, 1);
|
|
2157
|
+
}), r(".build();", 1), o(), r("Response response = client.newCall(request).execute();"), l();
|
|
2158
2158
|
}
|
|
2159
2159
|
}, Ri = {
|
|
2160
2160
|
info: {
|
|
@@ -2164,14 +2164,14 @@ var Si = {
|
|
|
2164
2164
|
description: "Lightweight HTTP Request Client Library",
|
|
2165
2165
|
extname: ".java"
|
|
2166
2166
|
},
|
|
2167
|
-
convert: ({ method: e, allHeaders: t, postData: n, fullUrl:
|
|
2167
|
+
convert: ({ method: e, allHeaders: t, postData: n, fullUrl: a }, s) => {
|
|
2168
2168
|
const i = {
|
|
2169
2169
|
indent: " ",
|
|
2170
2170
|
...s
|
|
2171
|
-
}, { join:
|
|
2172
|
-
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${
|
|
2171
|
+
}, { join: r, push: o } = new O({ indent: i.indent });
|
|
2172
|
+
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : o(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(t).forEach((c) => {
|
|
2173
2173
|
o(`.header("${c}", "${W(t[c])}")`, 1);
|
|
2174
|
-
}), n.text && o(`.body(${JSON.stringify(n.text)})`, 1), o(".asString();", 1),
|
|
2174
|
+
}), n.text && o(`.body(${JSON.stringify(n.text)})`, 1), o(".asString();", 1), r();
|
|
2175
2175
|
}
|
|
2176
2176
|
}, Ai = {
|
|
2177
2177
|
info: {
|
|
@@ -2194,17 +2194,17 @@ var Si = {
|
|
|
2194
2194
|
extname: ".js",
|
|
2195
2195
|
installation: "npm install axios --save"
|
|
2196
2196
|
},
|
|
2197
|
-
convert: ({ allHeaders: e, method: t, url: n, queryObj:
|
|
2198
|
-
const
|
|
2197
|
+
convert: ({ allHeaders: e, method: t, url: n, queryObj: a, postData: s }, i) => {
|
|
2198
|
+
const r = {
|
|
2199
2199
|
indent: " ",
|
|
2200
2200
|
...i
|
|
2201
|
-
}, { blank: o, push: l, join: c, addPostProcessor: u } = new O({ indent:
|
|
2201
|
+
}, { blank: o, push: l, join: c, addPostProcessor: u } = new O({ indent: r.indent });
|
|
2202
2202
|
l("import axios from 'axios';"), o();
|
|
2203
2203
|
const f = {
|
|
2204
2204
|
method: t,
|
|
2205
2205
|
url: n
|
|
2206
2206
|
};
|
|
2207
|
-
switch (Object.keys(
|
|
2207
|
+
switch (Object.keys(a).length && (f.params = a), Object.keys(e).length && (f.headers = e), s.mimeType) {
|
|
2208
2208
|
case "application/x-www-form-urlencoded":
|
|
2209
2209
|
s.params && (l("const encodedParams = new URLSearchParams();"), s.params.forEach((m) => {
|
|
2210
2210
|
l(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
@@ -2237,12 +2237,12 @@ var Si = {
|
|
|
2237
2237
|
description: "Perform asynchronous HTTP requests with the Fetch API",
|
|
2238
2238
|
extname: ".js"
|
|
2239
2239
|
},
|
|
2240
|
-
convert: ({ method: e, allHeaders: t, postData: n, fullUrl:
|
|
2240
|
+
convert: ({ method: e, allHeaders: t, postData: n, fullUrl: a }, s) => {
|
|
2241
2241
|
const i = {
|
|
2242
2242
|
indent: " ",
|
|
2243
2243
|
credentials: null,
|
|
2244
2244
|
...s
|
|
2245
|
-
}, { blank:
|
|
2245
|
+
}, { blank: r, join: o, push: l } = new O({ indent: i.indent }), c = {
|
|
2246
2246
|
method: e
|
|
2247
2247
|
};
|
|
2248
2248
|
switch (Object.keys(t).length && (c.headers = t), i.credentials !== null && (c.credentials = i.credentials), n.mimeType) {
|
|
@@ -2258,7 +2258,7 @@ var Si = {
|
|
|
2258
2258
|
const u = Y(t, "content-type");
|
|
2259
2259
|
u && delete t[u], l("const form = new FormData();"), n.params.forEach((f) => {
|
|
2260
2260
|
l(`form.append('${f.name}', '${f.value || f.fileName || ""}');`);
|
|
2261
|
-
}),
|
|
2261
|
+
}), r();
|
|
2262
2262
|
break;
|
|
2263
2263
|
default:
|
|
2264
2264
|
n.text && (c.body = n.text);
|
|
@@ -2280,7 +2280,7 @@ var Si = {
|
|
|
2280
2280
|
return d;
|
|
2281
2281
|
}
|
|
2282
2282
|
})};`
|
|
2283
|
-
),
|
|
2283
|
+
), 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();
|
|
2284
2284
|
}
|
|
2285
2285
|
}, Ii = {
|
|
2286
2286
|
info: {
|
|
@@ -2290,41 +2290,41 @@ var Si = {
|
|
|
2290
2290
|
description: "Perform an asynchronous HTTP (Ajax) requests with jQuery",
|
|
2291
2291
|
extname: ".js"
|
|
2292
2292
|
},
|
|
2293
|
-
convert: ({ fullUrl: e, method: t, allHeaders: n, postData:
|
|
2293
|
+
convert: ({ fullUrl: e, method: t, allHeaders: n, postData: a }, s) => {
|
|
2294
2294
|
var f;
|
|
2295
2295
|
const i = {
|
|
2296
2296
|
indent: " ",
|
|
2297
2297
|
...s
|
|
2298
|
-
}, { blank:
|
|
2298
|
+
}, { blank: r, push: o, join: l } = new O({ indent: i.indent }), c = {
|
|
2299
2299
|
async: !0,
|
|
2300
2300
|
crossDomain: !0,
|
|
2301
2301
|
url: e,
|
|
2302
2302
|
method: t,
|
|
2303
2303
|
headers: n
|
|
2304
2304
|
};
|
|
2305
|
-
switch (
|
|
2305
|
+
switch (a.mimeType) {
|
|
2306
2306
|
case "application/x-www-form-urlencoded":
|
|
2307
|
-
c.data =
|
|
2307
|
+
c.data = a.paramsObj ? a.paramsObj : a.text;
|
|
2308
2308
|
break;
|
|
2309
2309
|
case "application/json":
|
|
2310
|
-
c.processData = !1, c.data =
|
|
2310
|
+
c.processData = !1, c.data = a.text;
|
|
2311
2311
|
break;
|
|
2312
2312
|
case "multipart/form-data":
|
|
2313
|
-
if (!
|
|
2313
|
+
if (!a.params)
|
|
2314
2314
|
break;
|
|
2315
|
-
if (o("const form = new FormData();"),
|
|
2315
|
+
if (o("const form = new FormData();"), a.params.forEach((d) => {
|
|
2316
2316
|
o(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
2317
|
-
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]",
|
|
2317
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", vt(n, "content-type") && (f = de(n, "content-type")) != null && f.includes("boundary")) {
|
|
2318
2318
|
const d = Y(n, "content-type");
|
|
2319
2319
|
d && delete c.headers[d];
|
|
2320
2320
|
}
|
|
2321
|
-
|
|
2321
|
+
r();
|
|
2322
2322
|
break;
|
|
2323
2323
|
default:
|
|
2324
|
-
|
|
2324
|
+
a.text && (c.data = a.text);
|
|
2325
2325
|
}
|
|
2326
2326
|
const u = Q(c, { indent: i.indent }).replace("'[form]'", "form");
|
|
2327
|
-
return o(`const settings = ${u};`),
|
|
2327
|
+
return o(`const settings = ${u};`), r(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), l();
|
|
2328
2328
|
}
|
|
2329
2329
|
}, _i = {
|
|
2330
2330
|
info: {
|
|
@@ -2334,40 +2334,40 @@ var Si = {
|
|
|
2334
2334
|
description: "W3C Standard API that provides scripted client functionality",
|
|
2335
2335
|
extname: ".js"
|
|
2336
2336
|
},
|
|
2337
|
-
convert: ({ postData: e, allHeaders: t, method: n, fullUrl:
|
|
2337
|
+
convert: ({ postData: e, allHeaders: t, method: n, fullUrl: a }, s) => {
|
|
2338
2338
|
var c;
|
|
2339
2339
|
const i = {
|
|
2340
2340
|
indent: " ",
|
|
2341
2341
|
cors: !0,
|
|
2342
2342
|
...s
|
|
2343
|
-
}, { blank:
|
|
2343
|
+
}, { blank: r, push: o, join: l } = new O({ indent: i.indent });
|
|
2344
2344
|
switch (e.mimeType) {
|
|
2345
2345
|
case "application/json":
|
|
2346
2346
|
o(
|
|
2347
2347
|
`const data = JSON.stringify(${Q(e.jsonObj, {
|
|
2348
2348
|
indent: i.indent
|
|
2349
2349
|
})});`
|
|
2350
|
-
),
|
|
2350
|
+
), r();
|
|
2351
2351
|
break;
|
|
2352
2352
|
case "multipart/form-data":
|
|
2353
2353
|
if (!e.params)
|
|
2354
2354
|
break;
|
|
2355
2355
|
if (o("const data = new FormData();"), e.params.forEach((u) => {
|
|
2356
2356
|
o(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
2357
|
-
}),
|
|
2357
|
+
}), vt(t, "content-type") && (c = de(t, "content-type")) != null && c.includes("boundary")) {
|
|
2358
2358
|
const u = Y(t, "content-type");
|
|
2359
2359
|
u && delete t[u];
|
|
2360
2360
|
}
|
|
2361
|
-
|
|
2361
|
+
r();
|
|
2362
2362
|
break;
|
|
2363
2363
|
default:
|
|
2364
|
-
o(`const data = ${e.text ? `'${e.text}'` : "null"};`),
|
|
2364
|
+
o(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
|
|
2365
2365
|
}
|
|
2366
|
-
return o("const xhr = new XMLHttpRequest();"), i.cors && o("xhr.withCredentials = true;"),
|
|
2367
|
-
o(`xhr.setRequestHeader('${u}', '${
|
|
2368
|
-
}),
|
|
2366
|
+
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) => {
|
|
2367
|
+
o(`xhr.setRequestHeader('${u}', '${De(t[u])}');`);
|
|
2368
|
+
}), r(), o("xhr.send(data);"), l();
|
|
2369
2369
|
}
|
|
2370
|
-
},
|
|
2370
|
+
}, Li = {
|
|
2371
2371
|
info: {
|
|
2372
2372
|
key: "javascript",
|
|
2373
2373
|
title: "JavaScript",
|
|
@@ -2379,7 +2379,7 @@ var Si = {
|
|
|
2379
2379
|
fetch: qi,
|
|
2380
2380
|
jquery: Ii
|
|
2381
2381
|
}
|
|
2382
|
-
},
|
|
2382
|
+
}, Ui = {
|
|
2383
2383
|
info: {
|
|
2384
2384
|
key: "native",
|
|
2385
2385
|
title: "Native JSON",
|
|
@@ -2392,13 +2392,13 @@ var Si = {
|
|
|
2392
2392
|
indent: " ",
|
|
2393
2393
|
...t
|
|
2394
2394
|
};
|
|
2395
|
-
let
|
|
2395
|
+
let a = "";
|
|
2396
2396
|
switch (e.mimeType) {
|
|
2397
2397
|
case "application/x-www-form-urlencoded":
|
|
2398
|
-
|
|
2398
|
+
a = e.paramsObj ? e.paramsObj : e.text;
|
|
2399
2399
|
break;
|
|
2400
2400
|
case "application/json":
|
|
2401
|
-
e.jsonObj && (
|
|
2401
|
+
e.jsonObj && (a = e.jsonObj);
|
|
2402
2402
|
break;
|
|
2403
2403
|
case "multipart/form-data":
|
|
2404
2404
|
if (!e.params)
|
|
@@ -2406,12 +2406,12 @@ var Si = {
|
|
|
2406
2406
|
const s = {};
|
|
2407
2407
|
e.params.forEach((i) => {
|
|
2408
2408
|
s[i.name] = i.value;
|
|
2409
|
-
}),
|
|
2409
|
+
}), a = s;
|
|
2410
2410
|
break;
|
|
2411
2411
|
default:
|
|
2412
|
-
e.text && (
|
|
2412
|
+
e.text && (a = e.text);
|
|
2413
2413
|
}
|
|
2414
|
-
return typeof
|
|
2414
|
+
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, n.indent);
|
|
2415
2415
|
}
|
|
2416
2416
|
}, Hi = {
|
|
2417
2417
|
info: {
|
|
@@ -2420,7 +2420,7 @@ var Si = {
|
|
|
2420
2420
|
default: "native"
|
|
2421
2421
|
},
|
|
2422
2422
|
clientsById: {
|
|
2423
|
-
native:
|
|
2423
|
+
native: Ui
|
|
2424
2424
|
}
|
|
2425
2425
|
}, Bi = {
|
|
2426
2426
|
info: {
|
|
@@ -2430,14 +2430,14 @@ var Si = {
|
|
|
2430
2430
|
description: "An HTTP Request Client Library",
|
|
2431
2431
|
extname: ".kt"
|
|
2432
2432
|
},
|
|
2433
|
-
convert: ({ postData: e, fullUrl: t, method: n, allHeaders:
|
|
2433
|
+
convert: ({ postData: e, fullUrl: t, method: n, allHeaders: a }, s) => {
|
|
2434
2434
|
const i = {
|
|
2435
2435
|
indent: " ",
|
|
2436
2436
|
...s
|
|
2437
|
-
}, { blank:
|
|
2438
|
-
return l("val client = OkHttpClient()"),
|
|
2439
|
-
l(`.addHeader("${f}", "${W(
|
|
2440
|
-
}), l(".build()", 1),
|
|
2437
|
+
}, { blank: r, join: o, push: l } = new O({ indent: i.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
2438
|
+
return l("val client = OkHttpClient()"), r(), e.text && (e.boundary ? l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : l(`val mediaType = MediaType.parse("${e.mimeType}")`), l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), l("val request = Request.Builder()"), l(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? l(`.${n.toLowerCase()}(body)`, 1) : l(`.${n.toLowerCase()}(null)`, 1) : l(`.${n.toLowerCase()}()`, 1) : e.text ? l(`.method("${n.toUpperCase()}", body)`, 1) : l(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((f) => {
|
|
2439
|
+
l(`.addHeader("${f}", "${W(a[f])}")`, 1);
|
|
2440
|
+
}), l(".build()", 1), r(), l("val response = client.newCall(request).execute()"), o();
|
|
2441
2441
|
}
|
|
2442
2442
|
}, Mi = {
|
|
2443
2443
|
info: {
|
|
@@ -2457,30 +2457,30 @@ var Si = {
|
|
|
2457
2457
|
extname: ".cjs",
|
|
2458
2458
|
installation: "npm install axios --save"
|
|
2459
2459
|
},
|
|
2460
|
-
convert: ({ method: e, fullUrl: t, allHeaders: n, postData:
|
|
2460
|
+
convert: ({ method: e, fullUrl: t, allHeaders: n, postData: a }, s) => {
|
|
2461
2461
|
const i = {
|
|
2462
2462
|
indent: " ",
|
|
2463
2463
|
...s
|
|
2464
|
-
}, { blank:
|
|
2464
|
+
}, { blank: r, join: o, push: l, addPostProcessor: c } = new O({ indent: i.indent });
|
|
2465
2465
|
l("const axios = require('axios');");
|
|
2466
2466
|
const u = {
|
|
2467
2467
|
method: e,
|
|
2468
2468
|
url: t
|
|
2469
2469
|
};
|
|
2470
|
-
switch (Object.keys(n).length && (u.headers = n),
|
|
2470
|
+
switch (Object.keys(n).length && (u.headers = n), a.mimeType) {
|
|
2471
2471
|
case "application/x-www-form-urlencoded":
|
|
2472
|
-
|
|
2472
|
+
a.params && (l("const { URLSearchParams } = require('url');"), r(), l("const encodedParams = new URLSearchParams();"), a.params.forEach((d) => {
|
|
2473
2473
|
l(`encodedParams.set('${d.name}', '${d.value}');`);
|
|
2474
|
-
}),
|
|
2474
|
+
}), r(), u.data = "encodedParams,", c((d) => d.replace(/'encodedParams,'/, "encodedParams,")));
|
|
2475
2475
|
break;
|
|
2476
2476
|
case "application/json":
|
|
2477
|
-
|
|
2477
|
+
r(), a.jsonObj && (u.data = a.jsonObj);
|
|
2478
2478
|
break;
|
|
2479
2479
|
default:
|
|
2480
|
-
|
|
2480
|
+
r(), a.text && (u.data = a.text);
|
|
2481
2481
|
}
|
|
2482
2482
|
const f = Q(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
2483
|
-
return l(`const options = ${f};`),
|
|
2483
|
+
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();
|
|
2484
2484
|
}
|
|
2485
2485
|
}, zi = {
|
|
2486
2486
|
info: {
|
|
@@ -2491,21 +2491,21 @@ var Si = {
|
|
|
2491
2491
|
extname: ".cjs",
|
|
2492
2492
|
installation: "npm install node-fetch@2 --save"
|
|
2493
2493
|
},
|
|
2494
|
-
convert: ({ method: e, fullUrl: t, postData: n, headersObj:
|
|
2495
|
-
var
|
|
2496
|
-
const
|
|
2494
|
+
convert: ({ method: e, fullUrl: t, postData: n, headersObj: a, cookies: s }, i) => {
|
|
2495
|
+
var y;
|
|
2496
|
+
const r = {
|
|
2497
2497
|
indent: " ",
|
|
2498
2498
|
...i
|
|
2499
2499
|
};
|
|
2500
2500
|
let o = !1;
|
|
2501
|
-
const { blank: l, push: c, join: u, unshift: f } = new O({ indent:
|
|
2501
|
+
const { blank: l, push: c, join: u, unshift: f } = new O({ indent: r.indent });
|
|
2502
2502
|
c("const fetch = require('node-fetch');");
|
|
2503
2503
|
const d = t, m = {
|
|
2504
2504
|
method: e
|
|
2505
2505
|
};
|
|
2506
|
-
switch (Object.keys(
|
|
2506
|
+
switch (Object.keys(a).length && (m.headers = a), n.mimeType) {
|
|
2507
2507
|
case "application/x-www-form-urlencoded":
|
|
2508
|
-
f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), l(), (
|
|
2508
|
+
f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), l(), (y = n.params) == null || y.forEach((b) => {
|
|
2509
2509
|
c(`encodedParams.set('${b.name}', '${b.value}');`);
|
|
2510
2510
|
}), m.body = "encodedParams";
|
|
2511
2511
|
break;
|
|
@@ -2515,8 +2515,8 @@ var Si = {
|
|
|
2515
2515
|
case "multipart/form-data":
|
|
2516
2516
|
if (!n.params)
|
|
2517
2517
|
break;
|
|
2518
|
-
const g = Y(
|
|
2519
|
-
g && delete
|
|
2518
|
+
const g = Y(a, "content-type");
|
|
2519
|
+
g && delete a[g], f("const FormData = require('form-data');"), c("const formData = new FormData();"), l(), n.params.forEach((b) => {
|
|
2520
2520
|
if (!b.fileName && !b.fileName && !b.contentType) {
|
|
2521
2521
|
c(`formData.append('${b.name}', '${b.value}');`);
|
|
2522
2522
|
return;
|
|
@@ -2528,7 +2528,7 @@ var Si = {
|
|
|
2528
2528
|
n.text && (m.body = n.text);
|
|
2529
2529
|
}
|
|
2530
2530
|
if (s.length) {
|
|
2531
|
-
const g = s.map(({ name: b, value:
|
|
2531
|
+
const g = s.map(({ name: b, value: v }) => `${encodeURIComponent(b)}=${encodeURIComponent(v)}`).join("; ");
|
|
2532
2532
|
m.headers || (m.headers = {}), m.headers.cookie = g;
|
|
2533
2533
|
}
|
|
2534
2534
|
l(), c(`const url = '${d}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
|
|
@@ -2538,7 +2538,7 @@ var Si = {
|
|
|
2538
2538
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
2539
2539
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
2540
2540
|
// in a `JSON.stringify` call.
|
|
2541
|
-
transform: (g, b,
|
|
2541
|
+
transform: (g, b, v) => b === "body" && n.mimeType === "application/json" ? `JSON.stringify(${v})` : v
|
|
2542
2542
|
});
|
|
2543
2543
|
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")');
|
|
2544
2544
|
}
|
|
@@ -2550,34 +2550,34 @@ var Si = {
|
|
|
2550
2550
|
description: "Node.js native HTTP interface",
|
|
2551
2551
|
extname: ".cjs"
|
|
2552
2552
|
},
|
|
2553
|
-
convert: ({ uriObj: e, method: t, allHeaders: n, postData:
|
|
2553
|
+
convert: ({ uriObj: e, method: t, allHeaders: n, postData: a }, s = {}) => {
|
|
2554
2554
|
var f;
|
|
2555
|
-
const { indent: i = " " } = s, { blank:
|
|
2555
|
+
const { indent: i = " " } = s, { blank: r, join: o, push: l, unshift: c } = new O({ indent: i }), u = {
|
|
2556
2556
|
method: t,
|
|
2557
2557
|
hostname: e.hostname,
|
|
2558
2558
|
port: e.port,
|
|
2559
2559
|
path: e.path,
|
|
2560
2560
|
headers: n
|
|
2561
2561
|
};
|
|
2562
|
-
switch (l(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`),
|
|
2562
|
+
switch (l(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), l(`const options = ${Q(u, { indent: i })};`), r(), l("const req = http.request(options, function (res) {"), l("const chunks = [];", 1), r(), l("res.on('data', function (chunk) {", 1), l("chunks.push(chunk);", 2), l("});", 1), r(), l("res.on('end', function () {", 1), l("const body = Buffer.concat(chunks);", 2), l("console.log(body.toString());", 2), l("});", 1), l("});"), r(), a.mimeType) {
|
|
2563
2563
|
case "application/x-www-form-urlencoded":
|
|
2564
|
-
|
|
2565
|
-
`req.write(qs.stringify(${Q(
|
|
2564
|
+
a.paramsObj && (c("const qs = require('querystring');"), l(
|
|
2565
|
+
`req.write(qs.stringify(${Q(a.paramsObj, {
|
|
2566
2566
|
indent: " ",
|
|
2567
2567
|
inlineCharacterLimit: 80
|
|
2568
2568
|
})}));`
|
|
2569
2569
|
));
|
|
2570
2570
|
break;
|
|
2571
2571
|
case "application/json":
|
|
2572
|
-
|
|
2573
|
-
`req.write(JSON.stringify(${Q(
|
|
2572
|
+
a.jsonObj && l(
|
|
2573
|
+
`req.write(JSON.stringify(${Q(a.jsonObj, {
|
|
2574
2574
|
indent: " ",
|
|
2575
2575
|
inlineCharacterLimit: 80
|
|
2576
2576
|
})}));`
|
|
2577
2577
|
);
|
|
2578
2578
|
break;
|
|
2579
2579
|
default:
|
|
2580
|
-
|
|
2580
|
+
a.text && l(`req.write(${Q(a.text, { indent: i })});`);
|
|
2581
2581
|
}
|
|
2582
2582
|
return l("req.end();"), o();
|
|
2583
2583
|
}
|
|
@@ -2590,10 +2590,10 @@ var Si = {
|
|
|
2590
2590
|
extname: ".cjs",
|
|
2591
2591
|
installation: "npm install request --save"
|
|
2592
2592
|
},
|
|
2593
|
-
convert: ({ method: e, url: t, fullUrl: n, postData:
|
|
2593
|
+
convert: ({ method: e, url: t, fullUrl: n, postData: a, headersObj: s, cookies: i }, r) => {
|
|
2594
2594
|
const o = {
|
|
2595
2595
|
indent: " ",
|
|
2596
|
-
...
|
|
2596
|
+
...r
|
|
2597
2597
|
};
|
|
2598
2598
|
let l = !1;
|
|
2599
2599
|
const { push: c, blank: u, join: f, unshift: d, addPostProcessor: m } = new O({ indent: o.indent });
|
|
@@ -2602,37 +2602,37 @@ var Si = {
|
|
|
2602
2602
|
method: e,
|
|
2603
2603
|
url: n
|
|
2604
2604
|
};
|
|
2605
|
-
switch (Object.keys(s).length && (h.headers = s),
|
|
2605
|
+
switch (Object.keys(s).length && (h.headers = s), a.mimeType) {
|
|
2606
2606
|
case "application/x-www-form-urlencoded":
|
|
2607
|
-
h.form =
|
|
2607
|
+
h.form = a.paramsObj;
|
|
2608
2608
|
break;
|
|
2609
2609
|
case "application/json":
|
|
2610
|
-
|
|
2610
|
+
a.jsonObj && (h.body = a.jsonObj, h.json = !0);
|
|
2611
2611
|
break;
|
|
2612
2612
|
case "multipart/form-data":
|
|
2613
|
-
if (!
|
|
2613
|
+
if (!a.params)
|
|
2614
2614
|
break;
|
|
2615
|
-
h.formData = {},
|
|
2616
|
-
if (!
|
|
2617
|
-
h.formData[
|
|
2615
|
+
h.formData = {}, a.params.forEach((y) => {
|
|
2616
|
+
if (!y.fileName && !y.fileName && !y.contentType) {
|
|
2617
|
+
h.formData[y.name] = y.value;
|
|
2618
2618
|
return;
|
|
2619
2619
|
}
|
|
2620
2620
|
let g = {};
|
|
2621
|
-
|
|
2622
|
-
value: `fs.createReadStream(${
|
|
2621
|
+
y.fileName ? (l = !0, g = {
|
|
2622
|
+
value: `fs.createReadStream(${y.fileName})`,
|
|
2623
2623
|
options: {
|
|
2624
|
-
filename:
|
|
2625
|
-
contentType:
|
|
2624
|
+
filename: y.fileName,
|
|
2625
|
+
contentType: y.contentType ? y.contentType : null
|
|
2626
2626
|
}
|
|
2627
|
-
}) :
|
|
2628
|
-
}), m((
|
|
2627
|
+
}) : y.value && (g.value = y.value), h.formData[y.name] = g;
|
|
2628
|
+
}), m((y) => y.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
|
|
2629
2629
|
break;
|
|
2630
2630
|
default:
|
|
2631
|
-
|
|
2631
|
+
a.text && (h.body = a.text);
|
|
2632
2632
|
}
|
|
2633
|
-
return i.length && (h.jar = "JAR", c("const jar = request.jar();"), i.forEach(({ name:
|
|
2634
|
-
c(`jar.setCookie(request.cookie('${encodeURIComponent(
|
|
2635
|
-
}), u(), m((
|
|
2633
|
+
return i.length && (h.jar = "JAR", c("const jar = request.jar();"), i.forEach(({ name: y, value: g }) => {
|
|
2634
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent(y)}=${encodeURIComponent(g)}'), '${t}');`);
|
|
2635
|
+
}), u(), m((y) => y.replace(/'JAR'/, "jar"))), l && d("const fs = require('fs');"), c(`const options = ${Q(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();
|
|
2636
2636
|
}
|
|
2637
2637
|
}, Di = {
|
|
2638
2638
|
info: {
|
|
@@ -2642,10 +2642,10 @@ var Si = {
|
|
|
2642
2642
|
description: "Lightweight HTTP Request Client Library",
|
|
2643
2643
|
extname: ".cjs"
|
|
2644
2644
|
},
|
|
2645
|
-
convert: ({ method: e, url: t, cookies: n, queryObj:
|
|
2645
|
+
convert: ({ method: e, url: t, cookies: n, queryObj: a, postData: s, headersObj: i }, r) => {
|
|
2646
2646
|
const o = {
|
|
2647
2647
|
indent: " ",
|
|
2648
|
-
...
|
|
2648
|
+
...r
|
|
2649
2649
|
};
|
|
2650
2650
|
let l = !1;
|
|
2651
2651
|
const { addPostProcessor: c, blank: u, join: f, push: d, unshift: m } = new O({
|
|
@@ -2653,7 +2653,7 @@ var Si = {
|
|
|
2653
2653
|
});
|
|
2654
2654
|
switch (d("const unirest = require('unirest');"), u(), d(`const req = unirest('${e}', '${t}');`), u(), n.length && (d("const CookieJar = unirest.jar();"), n.forEach((h) => {
|
|
2655
2655
|
d(`CookieJar.add('${encodeURIComponent(h.name)}=${encodeURIComponent(h.value)}', '${t}');`);
|
|
2656
|
-
}), d("req.jar(CookieJar);"), u()), Object.keys(
|
|
2656
|
+
}), d("req.jar(CookieJar);"), u()), Object.keys(a).length && (d(`req.query(${Q(a, { indent: o.indent })});`), u()), Object.keys(i).length && (d(`req.headers(${Q(i, { indent: o.indent })});`), u()), s.mimeType) {
|
|
2657
2657
|
case "application/x-www-form-urlencoded":
|
|
2658
2658
|
s.paramsObj && (d(`req.form(${Q(s.paramsObj, { indent: o.indent })});`), u());
|
|
2659
2659
|
break;
|
|
@@ -2664,9 +2664,9 @@ var Si = {
|
|
|
2664
2664
|
if (!s.params)
|
|
2665
2665
|
break;
|
|
2666
2666
|
const h = [];
|
|
2667
|
-
s.params.forEach((
|
|
2667
|
+
s.params.forEach((y) => {
|
|
2668
2668
|
const g = {};
|
|
2669
|
-
|
|
2669
|
+
y.fileName && !y.value ? (l = !0, g.body = `fs.createReadStream('${y.fileName}')`, c((b) => b.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : y.value && (g.body = y.value), g.body && (y.contentType && (g["content-type"] = y.contentType), h.push(g));
|
|
2670
2670
|
}), d(`req.multipart(${Q(h, { indent: o.indent })});`), u();
|
|
2671
2671
|
break;
|
|
2672
2672
|
}
|
|
@@ -2689,22 +2689,22 @@ var Si = {
|
|
|
2689
2689
|
axios: Vi,
|
|
2690
2690
|
fetch: zi
|
|
2691
2691
|
}
|
|
2692
|
-
},
|
|
2693
|
-
const s = `${e} *${t} = `, i =
|
|
2692
|
+
}, jt = (e, t, n, a) => {
|
|
2693
|
+
const s = `${e} *${t} = `, i = Bt(n, a ? s.length : void 0);
|
|
2694
2694
|
return `${s}${i};`;
|
|
2695
|
-
},
|
|
2695
|
+
}, Bt = (e, t) => {
|
|
2696
2696
|
const n = t === void 0 ? ", " : `,
|
|
2697
2697
|
${" ".repeat(t)}`;
|
|
2698
2698
|
switch (Object.prototype.toString.call(e)) {
|
|
2699
2699
|
case "[object Number]":
|
|
2700
2700
|
return `@${e}`;
|
|
2701
2701
|
case "[object Array]":
|
|
2702
|
-
return `@[ ${e.map((s) =>
|
|
2702
|
+
return `@[ ${e.map((s) => Bt(s)).join(n)} ]`;
|
|
2703
2703
|
case "[object Object]": {
|
|
2704
|
-
const
|
|
2704
|
+
const a = [];
|
|
2705
2705
|
return Object.keys(e).forEach((s) => {
|
|
2706
|
-
|
|
2707
|
-
}), `@{ ${
|
|
2706
|
+
a.push(`@"${s}": ${Bt(e[s])}`);
|
|
2707
|
+
}), `@{ ${a.join(n)} }`;
|
|
2708
2708
|
}
|
|
2709
2709
|
case "[object Boolean]":
|
|
2710
2710
|
return e ? "@YES" : "@NO";
|
|
@@ -2719,54 +2719,54 @@ var Si = {
|
|
|
2719
2719
|
description: "Foundation's NSURLSession request",
|
|
2720
2720
|
extname: ".m"
|
|
2721
2721
|
},
|
|
2722
|
-
convert: ({ allHeaders: e, postData: t, method: n, fullUrl:
|
|
2722
|
+
convert: ({ allHeaders: e, postData: t, method: n, fullUrl: a }, s) => {
|
|
2723
2723
|
var u;
|
|
2724
2724
|
const i = {
|
|
2725
2725
|
indent: " ",
|
|
2726
2726
|
pretty: !0,
|
|
2727
2727
|
timeout: 10,
|
|
2728
2728
|
...s
|
|
2729
|
-
}, { push:
|
|
2729
|
+
}, { push: r, join: o, blank: l } = new O({ indent: i.indent }), c = {
|
|
2730
2730
|
hasHeaders: !1,
|
|
2731
2731
|
hasBody: !1
|
|
2732
2732
|
};
|
|
2733
|
-
if (
|
|
2733
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), r(jt("NSDictionary", "headers", e, i.pretty))), t.text || t.jsonObj || t.params)
|
|
2734
2734
|
switch (c.hasBody = !0, t.mimeType) {
|
|
2735
2735
|
case "application/x-www-form-urlencoded":
|
|
2736
2736
|
if ((u = t.params) != null && u.length) {
|
|
2737
2737
|
l();
|
|
2738
2738
|
const [f, ...d] = t.params;
|
|
2739
|
-
|
|
2739
|
+
r(
|
|
2740
2740
|
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${f.name}=${f.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
2741
2741
|
), d.forEach(({ name: m, value: h }) => {
|
|
2742
|
-
|
|
2742
|
+
r(`[postData appendData:[@"&${m}=${h}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
2743
2743
|
});
|
|
2744
2744
|
} else
|
|
2745
2745
|
c.hasBody = !1;
|
|
2746
2746
|
break;
|
|
2747
2747
|
case "application/json":
|
|
2748
|
-
t.jsonObj && (
|
|
2748
|
+
t.jsonObj && (r(jt("NSDictionary", "parameters", t.jsonObj, i.pretty)), l(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
2749
2749
|
break;
|
|
2750
2750
|
case "multipart/form-data":
|
|
2751
|
-
|
|
2751
|
+
r(jt("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(
|
|
2752
2752
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
2753
2753
|
2
|
|
2754
|
-
),
|
|
2754
|
+
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
2755
2755
|
'[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];',
|
|
2756
2756
|
2
|
|
2757
|
-
),
|
|
2757
|
+
), r("if (error) {", 2), r('NSLog(@"%@", error);', 3), r("}", 2), r("} else {", 1), r('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"\\r\\n\\r\\n", param[@"name"]];', 2), r('[body appendFormat:@"%@", param[@"value"]];', 2), r("}", 1), r("}"), r('[body appendFormat:@"\\r\\n--%@--\\r\\n", boundary];'), r("NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];");
|
|
2758
2758
|
break;
|
|
2759
2759
|
default:
|
|
2760
|
-
l(),
|
|
2760
|
+
l(), r(
|
|
2761
2761
|
`NSData *postData = [[NSData alloc] initWithData:[@"${t.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
2762
2762
|
);
|
|
2763
2763
|
}
|
|
2764
|
-
return l(),
|
|
2764
|
+
return l(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${a}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${i.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${n}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), l(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
|
|
2765
2765
|
" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
|
|
2766
|
-
),
|
|
2766
|
+
), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
|
|
2767
2767
|
" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
|
|
2768
2768
|
2
|
|
2769
|
-
),
|
|
2769
|
+
), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), o();
|
|
2770
2770
|
}
|
|
2771
2771
|
}, Ki = {
|
|
2772
2772
|
info: {
|
|
@@ -2786,11 +2786,11 @@ var Si = {
|
|
|
2786
2786
|
extname: ".ml",
|
|
2787
2787
|
installation: "opam install cohttp-lwt-unix cohttp-async"
|
|
2788
2788
|
},
|
|
2789
|
-
convert: ({ fullUrl: e, allHeaders: t, postData: n, method:
|
|
2789
|
+
convert: ({ fullUrl: e, allHeaders: t, postData: n, method: a }, s) => {
|
|
2790
2790
|
const i = {
|
|
2791
2791
|
indent: " ",
|
|
2792
2792
|
...s
|
|
2793
|
-
},
|
|
2793
|
+
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: l, join: c } = new O({ indent: i.indent });
|
|
2794
2794
|
o("open Cohttp_lwt_unix"), o("open Cohttp"), o("open Lwt"), l(), o(`let uri = Uri.of_string "${e}" in`);
|
|
2795
2795
|
const u = Object.keys(t);
|
|
2796
2796
|
u.length === 1 ? o(
|
|
@@ -2800,7 +2800,7 @@ var Si = {
|
|
|
2800
2800
|
) : u.length > 1 && (o("let headers = Header.add_list (Header.init ()) ["), u.forEach((h) => {
|
|
2801
2801
|
o(`("${h}", "${W(t[h])}");`, 1);
|
|
2802
2802
|
}), o("] in")), n.text && o(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(n.text)} in`), l();
|
|
2803
|
-
const f = u.length ? "~headers " : "", d = n.text ? "~body " : "", m =
|
|
2803
|
+
const f = u.length ? "~headers " : "", d = n.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
2804
2804
|
return o(`Client.call ${f}${d}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), c();
|
|
2805
2805
|
}
|
|
2806
2806
|
}, Xi = {
|
|
@@ -2821,22 +2821,22 @@ var Si = {
|
|
|
2821
2821
|
case "[object Undefined]":
|
|
2822
2822
|
return "null";
|
|
2823
2823
|
case "[object String]":
|
|
2824
|
-
return `'${
|
|
2824
|
+
return `'${We(e, { delimiter: "'", escapeNewlines: !1 })}'`;
|
|
2825
2825
|
case "[object Number]":
|
|
2826
2826
|
return e.toString();
|
|
2827
2827
|
case "[object Array]": {
|
|
2828
|
-
const
|
|
2828
|
+
const a = e.map((s) => A(s, `${t}${t}`, t)).join(`,
|
|
2829
2829
|
${t}`);
|
|
2830
2830
|
return `[
|
|
2831
|
-
${t}${
|
|
2831
|
+
${t}${a}
|
|
2832
2832
|
${n}]`;
|
|
2833
2833
|
}
|
|
2834
2834
|
case "[object Object]": {
|
|
2835
|
-
const
|
|
2835
|
+
const a = [];
|
|
2836
2836
|
for (const s in e)
|
|
2837
|
-
Object.prototype.hasOwnProperty.call(e, s) &&
|
|
2837
|
+
Object.prototype.hasOwnProperty.call(e, s) && a.push(`${A(s, t)} => ${A(e[s], `${t}${t}`, t)}`);
|
|
2838
2838
|
return `[
|
|
2839
|
-
${t}${
|
|
2839
|
+
${t}${a.join(`,
|
|
2840
2840
|
${t}`)}
|
|
2841
2841
|
${n}]`;
|
|
2842
2842
|
}
|
|
@@ -2879,7 +2879,7 @@ ${n}]`;
|
|
|
2879
2879
|
description: "PHP with ext-curl",
|
|
2880
2880
|
extname: ".php"
|
|
2881
2881
|
},
|
|
2882
|
-
convert: ({ uriObj: e, postData: t, fullUrl: n, method:
|
|
2882
|
+
convert: ({ uriObj: e, postData: t, fullUrl: n, method: a, httpVersion: s, cookies: i, headersObj: r }, o = {}) => {
|
|
2883
2883
|
const {
|
|
2884
2884
|
closingTag: l = !1,
|
|
2885
2885
|
indent: c = " ",
|
|
@@ -2888,9 +2888,9 @@ ${n}]`;
|
|
|
2888
2888
|
noTags: d = !1,
|
|
2889
2889
|
shortTags: m = !1,
|
|
2890
2890
|
timeout: h = 30
|
|
2891
|
-
} = o, { push:
|
|
2892
|
-
d || (
|
|
2893
|
-
const
|
|
2891
|
+
} = o, { push: y, blank: g, join: b } = new O({ indent: c });
|
|
2892
|
+
d || (y(m ? "<?" : "<?php"), g()), y("$curl = curl_init();"), g();
|
|
2893
|
+
const v = [
|
|
2894
2894
|
{
|
|
2895
2895
|
escape: !0,
|
|
2896
2896
|
name: "CURLOPT_PORT",
|
|
@@ -2929,7 +2929,7 @@ ${n}]`;
|
|
|
2929
2929
|
{
|
|
2930
2930
|
escape: !0,
|
|
2931
2931
|
name: "CURLOPT_CUSTOMREQUEST",
|
|
2932
|
-
value:
|
|
2932
|
+
value: a
|
|
2933
2933
|
},
|
|
2934
2934
|
{
|
|
2935
2935
|
escape: !t.jsonObj,
|
|
@@ -2937,17 +2937,17 @@ ${n}]`;
|
|
|
2937
2937
|
value: t ? t.jsonObj ? `json_encode(${A(t.jsonObj, c.repeat(2), c)})` : t.text : void 0
|
|
2938
2938
|
}
|
|
2939
2939
|
];
|
|
2940
|
-
|
|
2940
|
+
y("curl_setopt_array($curl, [");
|
|
2941
2941
|
const k = new O({ indent: c, join: `
|
|
2942
2942
|
${c}` });
|
|
2943
|
-
|
|
2944
|
-
j != null && k.push(`${E} => ${
|
|
2943
|
+
v.forEach(({ value: j, name: E, escape: C }) => {
|
|
2944
|
+
j != null && k.push(`${E} => ${C ? JSON.stringify(j) : j},`);
|
|
2945
2945
|
});
|
|
2946
|
-
const
|
|
2947
|
-
|
|
2948
|
-
const S = Object.keys(
|
|
2946
|
+
const x = i.map((j) => `${encodeURIComponent(j.name)}=${encodeURIComponent(j.value)}`);
|
|
2947
|
+
x.length && k.push(`CURLOPT_COOKIE => "${x.join("; ")}",`);
|
|
2948
|
+
const S = Object.keys(r).sort().map((j) => `"${j}: ${W(r[j])}"`);
|
|
2949
2949
|
return S.length && (k.push("CURLOPT_HTTPHEADER => ["), k.push(S.join(`,
|
|
2950
|
-
${c}${c}`), 1), k.push("],")),
|
|
2950
|
+
${c}${c}`), 1), k.push("],")), y(k.join(), 1), y("]);"), g(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), g(), y("curl_close($curl);"), g(), y("if ($err) {"), y(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !d && l && (g(), y("?>")), b();
|
|
2951
2951
|
}
|
|
2952
2952
|
}, eo = {
|
|
2953
2953
|
info: {
|
|
@@ -2958,34 +2958,34 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
2958
2958
|
extname: ".php",
|
|
2959
2959
|
installation: "composer require guzzlehttp/guzzle"
|
|
2960
2960
|
},
|
|
2961
|
-
convert: ({ postData: e, fullUrl: t, method: n, cookies:
|
|
2962
|
-
var
|
|
2963
|
-
const
|
|
2961
|
+
convert: ({ postData: e, fullUrl: t, method: n, cookies: a, headersObj: s }, i) => {
|
|
2962
|
+
var y;
|
|
2963
|
+
const r = {
|
|
2964
2964
|
closingTag: !1,
|
|
2965
2965
|
indent: " ",
|
|
2966
2966
|
noTags: !1,
|
|
2967
2967
|
shortTags: !1,
|
|
2968
2968
|
...i
|
|
2969
|
-
}, { push: o, blank: l, join: c } = new O({ indent:
|
|
2970
|
-
switch (
|
|
2969
|
+
}, { push: o, blank: l, join: c } = new O({ indent: r.indent }), { code: u, push: f, join: d } = new O({ indent: r.indent });
|
|
2970
|
+
switch (r.noTags || o(r.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), l(), e.mimeType) {
|
|
2971
2971
|
case "application/x-www-form-urlencoded":
|
|
2972
|
-
f(`'form_params' => ${A(e.paramsObj,
|
|
2972
|
+
f(`'form_params' => ${A(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
2973
2973
|
break;
|
|
2974
2974
|
case "multipart/form-data": {
|
|
2975
2975
|
const g = [];
|
|
2976
2976
|
if (e.params && e.params.forEach((b) => {
|
|
2977
2977
|
if (b.fileName) {
|
|
2978
|
-
const
|
|
2978
|
+
const v = {
|
|
2979
2979
|
name: b.name,
|
|
2980
2980
|
filename: b.fileName,
|
|
2981
2981
|
contents: b.value
|
|
2982
2982
|
};
|
|
2983
|
-
b.contentType && (
|
|
2983
|
+
b.contentType && (v.headers = { "Content-Type": b.contentType }), g.push(v);
|
|
2984
2984
|
} else b.value && g.push({
|
|
2985
2985
|
name: b.name,
|
|
2986
2986
|
contents: b.value
|
|
2987
2987
|
});
|
|
2988
|
-
}), g.length && (f(`'multipart' => ${A(g,
|
|
2988
|
+
}), g.length && (f(`'multipart' => ${A(g, r.indent + r.indent, r.indent)}`, 1), vt(s, "content-type") && (y = de(s, "content-type")) != null && y.indexOf("boundary"))) {
|
|
2989
2989
|
const b = Y(s, "content-type");
|
|
2990
2990
|
b && delete s[b];
|
|
2991
2991
|
}
|
|
@@ -2995,10 +2995,10 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
2995
2995
|
e.text && f(`'body' => ${A(e.text)},`, 1);
|
|
2996
2996
|
}
|
|
2997
2997
|
const m = Object.keys(s).sort().map(function(g) {
|
|
2998
|
-
return `${
|
|
2999
|
-
}), h =
|
|
3000
|
-
return h.length && m.push(`${
|
|
3001
|
-
`)), 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();"), !
|
|
2998
|
+
return `${r.indent}${r.indent}'${g}' => '${De(s[g])}',`;
|
|
2999
|
+
}), h = a.map((g) => `${encodeURIComponent(g.name)}=${encodeURIComponent(g.value)}`).join("; ");
|
|
3000
|
+
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${De(h)}',`), m.length && (f("'headers' => [", 1), f(m.join(`
|
|
3001
|
+
`)), 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();
|
|
3002
3002
|
}
|
|
3003
3003
|
}, to = {
|
|
3004
3004
|
info: {
|
|
@@ -3008,9 +3008,9 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3008
3008
|
description: "PHP with pecl/http v1",
|
|
3009
3009
|
extname: ".php"
|
|
3010
3010
|
},
|
|
3011
|
-
convert: ({ method: e, url: t, postData: n, queryObj:
|
|
3012
|
-
const { closingTag: o = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } =
|
|
3013
|
-
switch (c || (f(u ? "<?" : "<?php"), d()), En.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${A(t)});`), En.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), d(), Object.keys(
|
|
3011
|
+
convert: ({ method: e, url: t, postData: n, queryObj: a, headersObj: s, cookiesObj: i }, r = {}) => {
|
|
3012
|
+
const { closingTag: o = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: f, blank: d, join: m } = new O({ indent: l });
|
|
3013
|
+
switch (c || (f(u ? "<?" : "<?php"), d()), En.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${A(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(${A(a, l)});`), d()), Object.keys(s).length && (f(`$request->setHeaders(${A(s, l)});`), d()), Object.keys(i).length && (f(`$request->setCookies(${A(i, l)});`), d()), n.mimeType) {
|
|
3014
3014
|
case "application/x-www-form-urlencoded":
|
|
3015
3015
|
f(`$request->setContentType(${A(n.mimeType)});`), f(`$request->setPostFields(${A(n.paramsObj, l)});`), d();
|
|
3016
3016
|
break;
|
|
@@ -3030,9 +3030,9 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3030
3030
|
description: "PHP with pecl/http v2",
|
|
3031
3031
|
extname: ".php"
|
|
3032
3032
|
},
|
|
3033
|
-
convert: ({ postData: e, headersObj: t, method: n, queryObj:
|
|
3034
|
-
var
|
|
3035
|
-
const { closingTag: o = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } =
|
|
3033
|
+
convert: ({ postData: e, headersObj: t, method: n, queryObj: a, cookiesObj: s, url: i }, r = {}) => {
|
|
3034
|
+
var y;
|
|
3035
|
+
const { closingTag: o = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: f, blank: d, join: m } = new O({ indent: l });
|
|
3036
3036
|
let h = !1;
|
|
3037
3037
|
switch (c || (f(u ? "<?" : "<?php"), d()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), d(), e.mimeType) {
|
|
3038
3038
|
case "application/x-www-form-urlencoded":
|
|
@@ -3042,22 +3042,22 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3042
3042
|
if (!e.params)
|
|
3043
3043
|
break;
|
|
3044
3044
|
const g = [], b = {};
|
|
3045
|
-
e.params.forEach(({ name:
|
|
3045
|
+
e.params.forEach(({ name: x, fileName: S, value: j, contentType: E }) => {
|
|
3046
3046
|
if (S) {
|
|
3047
3047
|
g.push({
|
|
3048
|
-
name:
|
|
3048
|
+
name: x,
|
|
3049
3049
|
type: E,
|
|
3050
3050
|
file: S,
|
|
3051
3051
|
data: j
|
|
3052
3052
|
});
|
|
3053
3053
|
return;
|
|
3054
3054
|
}
|
|
3055
|
-
j && (b[
|
|
3055
|
+
j && (b[x] = j);
|
|
3056
3056
|
});
|
|
3057
|
-
const
|
|
3058
|
-
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${
|
|
3059
|
-
const
|
|
3060
|
-
|
|
3057
|
+
const v = Object.keys(b).length ? A(b, l) : "null", k = g.length ? A(g, l) : "null";
|
|
3058
|
+
if (f("$body = new http\\Message\\Body;"), f(`$body->addForm(${v}, ${k});`), vt(t, "content-type") && (y = de(t, "content-type")) != null && y.indexOf("boundary")) {
|
|
3059
|
+
const x = Y(t, "content-type");
|
|
3060
|
+
x && delete t[x];
|
|
3061
3061
|
}
|
|
3062
3062
|
d(), h = !0;
|
|
3063
3063
|
break;
|
|
@@ -3068,7 +3068,7 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3068
3068
|
default:
|
|
3069
3069
|
e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${A(e.text)});`), d(), h = !0);
|
|
3070
3070
|
}
|
|
3071
|
-
return f(`$request->setRequestUrl(${A(i)});`), f(`$request->setRequestMethod(${A(n)});`), h && (f("$request->setBody($body);"), d()), Object.keys(
|
|
3071
|
+
return f(`$request->setRequestUrl(${A(i)});`), f(`$request->setRequestMethod(${A(n)});`), h && (f("$request->setBody($body);"), d()), Object.keys(a).length && (f(`$request->setQuery(new http\\QueryString(${A(a, l)}));`), d()), Object.keys(t).length && (f(`$request->setHeaders(${A(t, l)});`), d()), Object.keys(s).length && (d(), f(`$client->setCookies(${A(s, l)});`), d()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), d(), f("echo $response->getBody();"), !c && o && (d(), f("?>")), m();
|
|
3072
3072
|
}
|
|
3073
3073
|
}, ro = {
|
|
3074
3074
|
info: {
|
|
@@ -3083,18 +3083,18 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3083
3083
|
http1: to,
|
|
3084
3084
|
http2: no
|
|
3085
3085
|
}
|
|
3086
|
-
}, br = (e) => ({ method: n, headersObj:
|
|
3086
|
+
}, br = (e) => ({ method: n, headersObj: a, cookies: s, uriObj: i, fullUrl: r, postData: o, allHeaders: l }) => {
|
|
3087
3087
|
const { push: c, join: u } = new O();
|
|
3088
3088
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(n.toUpperCase()))
|
|
3089
3089
|
return "Method not supported";
|
|
3090
|
-
const d = [], m = Object.keys(
|
|
3090
|
+
const d = [], m = Object.keys(a);
|
|
3091
3091
|
return m.length && (c("$headers=@{}"), m.forEach((h) => {
|
|
3092
|
-
h !== "connection" && c(`$headers.Add("${h}", "${
|
|
3092
|
+
h !== "connection" && c(`$headers.Add("${h}", "${We(a[h], { escapeChar: "`" })}")`);
|
|
3093
3093
|
}), d.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((h) => {
|
|
3094
3094
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${h.name}'`), c(`$cookie.Value = '${h.value}'`), c(`$cookie.Domain = '${i.host}'`), c("$session.Cookies.Add($cookie)");
|
|
3095
3095
|
}), d.push("-WebSession $session")), o.text && (d.push(
|
|
3096
|
-
`-ContentType '${
|
|
3097
|
-
), d.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${
|
|
3096
|
+
`-ContentType '${We(de(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
3097
|
+
), d.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${n} ${d.join(" ")}`.trim()), u();
|
|
3098
3098
|
}, ao = {
|
|
3099
3099
|
info: {
|
|
3100
3100
|
key: "restmethod",
|
|
@@ -3124,27 +3124,27 @@ ${c}${c}`), 1), k.push("],")), v(k.join(), 1), v("]);"), g(), v("$response = cur
|
|
|
3124
3124
|
restmethod: ao
|
|
3125
3125
|
}
|
|
3126
3126
|
};
|
|
3127
|
-
function Rn(e, t, n,
|
|
3128
|
-
const i =
|
|
3127
|
+
function Rn(e, t, n, a, s) {
|
|
3128
|
+
const i = a.repeat(s), r = a.repeat(s - 1), o = n ? `,
|
|
3129
3129
|
${i}` : ", ", l = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
3130
3130
|
return n ? `${l}
|
|
3131
3131
|
${i}${t.join(o)}
|
|
3132
|
-
${
|
|
3132
|
+
${r}${c}` : e === "object" && t.length > 0 ? `${l} ${t.join(o)} ${c}` : `${l}${t.join(o)}${c}`;
|
|
3133
3133
|
}
|
|
3134
3134
|
var Ce = (e, t, n) => {
|
|
3135
3135
|
switch (n = n === void 0 ? 1 : n + 1, Object.prototype.toString.call(e)) {
|
|
3136
3136
|
case "[object Number]":
|
|
3137
3137
|
return e;
|
|
3138
3138
|
case "[object Array]": {
|
|
3139
|
-
let
|
|
3140
|
-
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (
|
|
3141
|
-
return Rn("array", s,
|
|
3139
|
+
let a = !1;
|
|
3140
|
+
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (a = Object.keys(i).length > 1), Ce(i, t, n)));
|
|
3141
|
+
return Rn("array", s, a, t.indent, n);
|
|
3142
3142
|
}
|
|
3143
3143
|
case "[object Object]": {
|
|
3144
|
-
const
|
|
3144
|
+
const a = [];
|
|
3145
3145
|
for (const s in e)
|
|
3146
|
-
|
|
3147
|
-
return Rn("object",
|
|
3146
|
+
a.push(`"${s}": ${Ce(e[s], t, n)}`);
|
|
3147
|
+
return Rn("object", a, t.pretty && a.length > 1, t.indent, n);
|
|
3148
3148
|
}
|
|
3149
3149
|
case "[object Null]":
|
|
3150
3150
|
return "None";
|
|
@@ -3162,62 +3162,62 @@ var Ce = (e, t, n) => {
|
|
|
3162
3162
|
extname: ".py",
|
|
3163
3163
|
installation: "python -m pip install requests"
|
|
3164
3164
|
},
|
|
3165
|
-
convert: ({ fullUrl: e, postData: t, allHeaders: n, method:
|
|
3165
|
+
convert: ({ fullUrl: e, postData: t, allHeaders: n, method: a }, s) => {
|
|
3166
3166
|
const i = {
|
|
3167
3167
|
indent: " ",
|
|
3168
3168
|
pretty: !0,
|
|
3169
3169
|
...s
|
|
3170
|
-
}, { push:
|
|
3171
|
-
|
|
3170
|
+
}, { push: r, blank: o, join: l, addPostProcessor: c } = new O({ indent: i.indent });
|
|
3171
|
+
r("import requests"), o(), r(`url = "${e}"`), o();
|
|
3172
3172
|
const u = n;
|
|
3173
3173
|
let f = {};
|
|
3174
3174
|
const d = {};
|
|
3175
|
-
let m = !1, h = !1,
|
|
3175
|
+
let m = !1, h = !1, y = !1;
|
|
3176
3176
|
switch (t.mimeType) {
|
|
3177
3177
|
case "application/json":
|
|
3178
|
-
t.jsonObj && (
|
|
3178
|
+
t.jsonObj && (r(`payload = ${Ce(t.jsonObj, i)}`), y = !0, h = !0);
|
|
3179
3179
|
break;
|
|
3180
3180
|
case "multipart/form-data":
|
|
3181
3181
|
if (!t.params)
|
|
3182
3182
|
break;
|
|
3183
|
-
if (f = {}, t.params.forEach((
|
|
3184
|
-
|
|
3183
|
+
if (f = {}, t.params.forEach((v) => {
|
|
3184
|
+
v.fileName ? (v.contentType ? d[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : d[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, m = !0) : (f[v.name] = v.value, h = !0);
|
|
3185
3185
|
}), m) {
|
|
3186
|
-
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3186
|
+
r(`files = ${Ce(d, i)}`), h && r(`payload = ${Ce(f, i)}`);
|
|
3187
|
+
const v = Y(u, "content-type");
|
|
3188
|
+
v && delete u[v];
|
|
3189
3189
|
} else {
|
|
3190
|
-
const
|
|
3191
|
-
|
|
3190
|
+
const v = JSON.stringify(t.text);
|
|
3191
|
+
v && (r(`payload = ${v}`), h = !0);
|
|
3192
3192
|
}
|
|
3193
3193
|
c(
|
|
3194
|
-
(
|
|
3194
|
+
(v) => v.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
|
|
3195
3195
|
);
|
|
3196
3196
|
break;
|
|
3197
3197
|
default: {
|
|
3198
3198
|
if (t.mimeType === "application/x-www-form-urlencoded" && t.paramsObj) {
|
|
3199
|
-
|
|
3199
|
+
r(`payload = ${Ce(t.paramsObj, i)}`), h = !0;
|
|
3200
3200
|
break;
|
|
3201
3201
|
}
|
|
3202
|
-
const
|
|
3203
|
-
|
|
3202
|
+
const v = JSON.stringify(t.text);
|
|
3203
|
+
v && (r(`payload = ${v}`), h = !0);
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
3206
|
const g = Object.keys(u).length;
|
|
3207
3207
|
if (g === 0 && (h || m))
|
|
3208
3208
|
o();
|
|
3209
3209
|
else if (g === 1)
|
|
3210
|
-
Object.keys(u).forEach((
|
|
3211
|
-
|
|
3210
|
+
Object.keys(u).forEach((v) => {
|
|
3211
|
+
r(`headers = {"${v}": "${W(u[v])}"}`), o();
|
|
3212
3212
|
});
|
|
3213
3213
|
else if (g > 1) {
|
|
3214
|
-
let
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
}),
|
|
3214
|
+
let v = 1;
|
|
3215
|
+
r("headers = {"), Object.keys(u).forEach((k) => {
|
|
3216
|
+
r(v !== g ? `"${k}": "${W(u[k])}",` : `"${k}": "${W(u[k])}"`, 1), v += 1;
|
|
3217
|
+
}), r("}"), o();
|
|
3218
3218
|
}
|
|
3219
|
-
let b = so.includes(
|
|
3220
|
-
return h && (
|
|
3219
|
+
let b = so.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
3220
|
+
return h && (y ? b += ", json=payload" : b += ", data=payload"), m && (b += ", files=files"), g > 0 && (b += ", headers=headers"), b += ")", r(b), o(), r("print(response.text)"), l();
|
|
3221
3221
|
}
|
|
3222
3222
|
}, co = {
|
|
3223
3223
|
info: {
|
|
@@ -3237,36 +3237,36 @@ var Ce = (e, t, n) => {
|
|
|
3237
3237
|
description: "httr: Tools for Working with URLs and HTTP",
|
|
3238
3238
|
extname: ".r"
|
|
3239
3239
|
},
|
|
3240
|
-
convert: ({ url: e, queryObj: t, queryString: n, postData:
|
|
3241
|
-
const { push:
|
|
3242
|
-
|
|
3240
|
+
convert: ({ url: e, queryObj: t, queryString: n, postData: a, allHeaders: s, method: i }) => {
|
|
3241
|
+
const { push: r, blank: o, join: l } = new O();
|
|
3242
|
+
r("library(httr)"), o(), r(`url <- "${e}"`), o();
|
|
3243
3243
|
const c = t;
|
|
3244
3244
|
delete t.key;
|
|
3245
3245
|
const u = Object.keys(c).length;
|
|
3246
|
-
n.length === 1 ? (
|
|
3247
|
-
j !== u - 1 ?
|
|
3248
|
-
}),
|
|
3249
|
-
const f = JSON.stringify(
|
|
3250
|
-
if (f && (
|
|
3251
|
-
switch (
|
|
3246
|
+
n.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), o()) : n.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((S, j) => {
|
|
3247
|
+
j !== u - 1 ? r(` ${S} = "${c[S].toString()}",`) : r(` ${S} = "${c[S].toString()}"`);
|
|
3248
|
+
}), r(")"), o());
|
|
3249
|
+
const f = JSON.stringify(a.text);
|
|
3250
|
+
if (f && (r(`payload <- ${f}`), o()), a.text || a.jsonObj || a.params)
|
|
3251
|
+
switch (a.mimeType) {
|
|
3252
3252
|
case "application/x-www-form-urlencoded":
|
|
3253
|
-
|
|
3253
|
+
r('encode <- "form"'), o();
|
|
3254
3254
|
break;
|
|
3255
3255
|
case "application/json":
|
|
3256
|
-
|
|
3256
|
+
r('encode <- "json"'), o();
|
|
3257
3257
|
break;
|
|
3258
3258
|
case "multipart/form-data":
|
|
3259
|
-
|
|
3259
|
+
r('encode <- "multipart"'), o();
|
|
3260
3260
|
break;
|
|
3261
3261
|
default:
|
|
3262
|
-
|
|
3262
|
+
r('encode <- "raw"'), o();
|
|
3263
3263
|
break;
|
|
3264
3264
|
}
|
|
3265
|
-
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0,
|
|
3265
|
+
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, y = m ? `accept("${W(m)}")` : void 0, g = `content_type("${W(a.mimeType)}")`, b = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, j]) => `'${S}' = '${De(j)}'`).join(", "), v = b ? `add_headers(${b})` : void 0;
|
|
3266
3266
|
let k = `response <- VERB("${i}", url`;
|
|
3267
3267
|
f && (k += ", body = payload"), n.length && (k += ", query = queryString");
|
|
3268
|
-
const
|
|
3269
|
-
return
|
|
3268
|
+
const x = [v, g, y, h].filter((S) => !!S).join(", ");
|
|
3269
|
+
return x && (k += `, ${x}`), (a.text || a.jsonObj || a.params) && (k += ", encode = encode"), k += ")", r(k), o(), r('content(response, "text")'), l();
|
|
3270
3270
|
}
|
|
3271
3271
|
}, po = {
|
|
3272
3272
|
info: {
|
|
@@ -3285,9 +3285,9 @@ var Ce = (e, t, n) => {
|
|
|
3285
3285
|
description: "Ruby HTTP client",
|
|
3286
3286
|
extname: ".rb"
|
|
3287
3287
|
},
|
|
3288
|
-
convert: ({ uriObj: e, method: t, fullUrl: n, postData:
|
|
3289
|
-
const { push: i, blank:
|
|
3290
|
-
i("require 'uri'"), i("require 'net/http'"),
|
|
3288
|
+
convert: ({ uriObj: e, method: t, fullUrl: n, postData: a, allHeaders: s }) => {
|
|
3289
|
+
const { push: i, blank: r, join: o } = new O();
|
|
3290
|
+
i("require 'uri'"), i("require 'net/http'"), r();
|
|
3291
3291
|
const l = t.toUpperCase(), c = [
|
|
3292
3292
|
"GET",
|
|
3293
3293
|
"POST",
|
|
@@ -3302,11 +3302,11 @@ var Ce = (e, t, n) => {
|
|
|
3302
3302
|
"MOVE",
|
|
3303
3303
|
"TRACE"
|
|
3304
3304
|
], u = l.charAt(0) + l.substring(1).toLowerCase();
|
|
3305
|
-
c.includes(l) || (i(`class Net::HTTP::${u} < Net::HTTPRequest`), i(` METHOD = '${l.toUpperCase()}'`), i(` REQUEST_HAS_BODY = '${
|
|
3305
|
+
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)`);
|
|
3306
3306
|
const f = Object.keys(s);
|
|
3307
3307
|
return f.length && f.forEach((d) => {
|
|
3308
|
-
i(`request["${d}"] = '${
|
|
3309
|
-
}),
|
|
3308
|
+
i(`request["${d}"] = '${De(s[d])}'`);
|
|
3309
|
+
}), a.text && i(`request.body = ${JSON.stringify(a.text)}`), r(), i("response = http.request(request)"), i("puts response.read_body"), o();
|
|
3310
3310
|
}
|
|
3311
3311
|
}, mo = {
|
|
3312
3312
|
info: {
|
|
@@ -3341,38 +3341,38 @@ var Ce = (e, t, n) => {
|
|
|
3341
3341
|
description: "cURL is a command line tool and library for transferring data with URL syntax",
|
|
3342
3342
|
extname: ".sh"
|
|
3343
3343
|
},
|
|
3344
|
-
convert: ({ fullUrl: e, method: t, httpVersion: n, headersObj:
|
|
3344
|
+
convert: ({ fullUrl: e, method: t, httpVersion: n, headersObj: a, allHeaders: s, postData: i }, r = {}) => {
|
|
3345
3345
|
var g;
|
|
3346
|
-
const { indent: o = " ", short: l = !1, binary: c = !1, globOff: u = !1 } =
|
|
3346
|
+
const { indent: o = " ", short: l = !1, binary: c = !1, globOff: u = !1 } = r, f = " ", { push: d, join: m } = new O({
|
|
3347
3347
|
...typeof o == "string" ? { indent: o } : {},
|
|
3348
3348
|
join: o !== !1 ? ` \\
|
|
3349
3349
|
${o}` : " "
|
|
3350
3350
|
}), h = vo(l);
|
|
3351
|
-
let
|
|
3352
|
-
if (d(`curl ${h("request")} ${t}`), u && (
|
|
3353
|
-
const b = Y(
|
|
3351
|
+
let y = G(e);
|
|
3352
|
+
if (d(`curl ${h("request")} ${t}`), u && (y = unescape(y), d(h("globoff"))), d(`${h("url ")}${y}`), n === "HTTP/1.0" && d(h("http1.0")), de(s, "accept-encoding") && d("--compressed"), i.mimeType === "multipart/form-data") {
|
|
3353
|
+
const b = Y(a, "content-type");
|
|
3354
3354
|
if (b) {
|
|
3355
|
-
const
|
|
3356
|
-
if (b &&
|
|
3357
|
-
const k = String(
|
|
3358
|
-
|
|
3355
|
+
const v = a[b];
|
|
3356
|
+
if (b && v) {
|
|
3357
|
+
const k = String(v).replace(/; boundary.+?(?=(;|$))/, "");
|
|
3358
|
+
a[b] = k, s[b] = k;
|
|
3359
3359
|
}
|
|
3360
3360
|
}
|
|
3361
3361
|
}
|
|
3362
|
-
switch (Object.keys(
|
|
3363
|
-
const
|
|
3364
|
-
d(`${h("header")} ${G(
|
|
3362
|
+
switch (Object.keys(a).sort().forEach((b) => {
|
|
3363
|
+
const v = `${b}: ${a[b]}`;
|
|
3364
|
+
d(`${h("header")} ${G(v)}`);
|
|
3365
3365
|
}), s.cookie && d(`${h("cookie")} ${G(s.cookie)}`), i.mimeType) {
|
|
3366
3366
|
case "multipart/form-data":
|
|
3367
|
-
(g = i.params) == null || g.forEach((
|
|
3367
|
+
(g = i.params) == null || g.forEach((v) => {
|
|
3368
3368
|
let k = "";
|
|
3369
|
-
|
|
3369
|
+
v.fileName ? k = `${v.name}='@${v.fileName}'` : k = G(`${v.name}=${v.value}`), d(`${h("form")} ${k}`);
|
|
3370
3370
|
});
|
|
3371
3371
|
break;
|
|
3372
3372
|
case "application/x-www-form-urlencoded":
|
|
3373
|
-
i.params ? i.params.forEach((
|
|
3374
|
-
const k =
|
|
3375
|
-
d(`${E} ${G(`${j}=${
|
|
3373
|
+
i.params ? i.params.forEach((v) => {
|
|
3374
|
+
const k = v.name, x = encodeURIComponent(v.name), S = x !== k, j = S ? x : k, E = c ? "--data-binary" : S ? "--data-urlencode" : h("data");
|
|
3375
|
+
d(`${E} ${G(`${j}=${v.value}`)}`);
|
|
3376
3376
|
}) : d(`${c ? "--data-binary" : h("data")} ${G(i.text)}`);
|
|
3377
3377
|
break;
|
|
3378
3378
|
default:
|
|
@@ -3381,18 +3381,18 @@ ${o}` : " "
|
|
|
3381
3381
|
let b = !1;
|
|
3382
3382
|
if (yi(i.mimeType) && i.text.length > 20)
|
|
3383
3383
|
try {
|
|
3384
|
-
const
|
|
3384
|
+
const v = JSON.parse(i.text);
|
|
3385
3385
|
b = !0, i.text.indexOf("'") > 0 ? d(
|
|
3386
3386
|
`${c ? "--data-binary" : h("data")} @- <<EOF
|
|
3387
3387
|
${JSON.stringify(
|
|
3388
|
-
|
|
3388
|
+
v,
|
|
3389
3389
|
null,
|
|
3390
3390
|
f
|
|
3391
3391
|
)}
|
|
3392
3392
|
EOF`
|
|
3393
3393
|
) : d(
|
|
3394
3394
|
`${c ? "--data-binary" : h("data")} '
|
|
3395
|
-
${JSON.stringify(
|
|
3395
|
+
${JSON.stringify(v, null, f)}
|
|
3396
3396
|
'`
|
|
3397
3397
|
);
|
|
3398
3398
|
} catch {
|
|
@@ -3410,7 +3410,7 @@ ${JSON.stringify(y, null, f)}
|
|
|
3410
3410
|
extname: ".sh",
|
|
3411
3411
|
installation: "brew install httpie"
|
|
3412
3412
|
},
|
|
3413
|
-
convert: ({ allHeaders: e, postData: t, queryObj: n, fullUrl:
|
|
3413
|
+
convert: ({ allHeaders: e, postData: t, queryObj: n, fullUrl: a, method: s, url: i }, r) => {
|
|
3414
3414
|
const o = {
|
|
3415
3415
|
body: !1,
|
|
3416
3416
|
cert: !1,
|
|
@@ -3424,7 +3424,7 @@ ${JSON.stringify(y, null, f)}
|
|
|
3424
3424
|
timeout: !1,
|
|
3425
3425
|
verbose: !1,
|
|
3426
3426
|
verify: !1,
|
|
3427
|
-
...
|
|
3427
|
+
...r
|
|
3428
3428
|
}, { push: l, join: c, unshift: u } = new O({
|
|
3429
3429
|
indent: o.indent,
|
|
3430
3430
|
// @ts-expect-error SEEMS LEGIT
|
|
@@ -3434,17 +3434,17 @@ ${o.indent}` : " "
|
|
|
3434
3434
|
let f = !1;
|
|
3435
3435
|
const d = [];
|
|
3436
3436
|
o.headers && d.push(o.short ? "-h" : "--headers"), o.body && d.push(o.short ? "-b" : "--body"), o.verbose && d.push(o.short ? "-v" : "--verbose"), o.print && d.push(`${o.short ? "-p" : "--print"}=${o.print}`), o.verify && d.push(`--verify=${o.verify}`), o.cert && d.push(`--cert=${o.cert}`), o.pretty && d.push(`--pretty=${o.pretty}`), o.style && d.push(`--style=${o.style}`), o.timeout && d.push(`--timeout=${o.timeout}`), o.queryParams && Object.keys(n).forEach((h) => {
|
|
3437
|
-
const
|
|
3438
|
-
Array.isArray(
|
|
3437
|
+
const y = n[h];
|
|
3438
|
+
Array.isArray(y) ? y.forEach((g) => {
|
|
3439
3439
|
l(`${h}==${G(g)}`);
|
|
3440
|
-
}) : l(`${h}==${G(
|
|
3440
|
+
}) : l(`${h}==${G(y)}`);
|
|
3441
3441
|
}), Object.keys(e).sort().forEach((h) => {
|
|
3442
3442
|
l(`${h}:${G(e[h])}`);
|
|
3443
3443
|
}), t.mimeType === "application/x-www-form-urlencoded" ? t.params && t.params.length && (d.push(o.short ? "-f" : "--form"), t.params.forEach((h) => {
|
|
3444
3444
|
l(`${h.name}=${G(h.value)}`);
|
|
3445
3445
|
})) : f = !0;
|
|
3446
3446
|
const m = d.length ? `${d.join(" ")} ` : "";
|
|
3447
|
-
if (i = G(o.queryParams ? i :
|
|
3447
|
+
if (i = G(o.queryParams ? i : a), u(`http ${m}${s} ${i}`), f && t.text) {
|
|
3448
3448
|
const h = G(t.text);
|
|
3449
3449
|
u(`echo ${h} | `);
|
|
3450
3450
|
}
|
|
@@ -3458,21 +3458,21 @@ ${o.indent}` : " "
|
|
|
3458
3458
|
description: "a free software package for retrieving files using HTTP, HTTPS",
|
|
3459
3459
|
extname: ".sh"
|
|
3460
3460
|
},
|
|
3461
|
-
convert: ({ method: e, postData: t, allHeaders: n, fullUrl:
|
|
3461
|
+
convert: ({ method: e, postData: t, allHeaders: n, fullUrl: a }, s) => {
|
|
3462
3462
|
const i = {
|
|
3463
3463
|
indent: " ",
|
|
3464
3464
|
short: !1,
|
|
3465
3465
|
verbose: !1,
|
|
3466
3466
|
...s
|
|
3467
|
-
}, { push:
|
|
3467
|
+
}, { push: r, join: o } = new O({
|
|
3468
3468
|
...typeof i.indent == "string" ? { indent: i.indent } : {},
|
|
3469
3469
|
join: i.indent !== !1 ? ` \\
|
|
3470
3470
|
${i.indent}` : " "
|
|
3471
3471
|
});
|
|
3472
|
-
return i.verbose ?
|
|
3472
|
+
return i.verbose ? r(`wget ${i.short ? "-v" : "--verbose"}`) : r(`wget ${i.short ? "-q" : "--quiet"}`), r(`--method ${G(e)}`), Object.keys(n).forEach((l) => {
|
|
3473
3473
|
const c = `${l}: ${n[l]}`;
|
|
3474
|
-
|
|
3475
|
-
}), t.text &&
|
|
3474
|
+
r(`--header ${G(c)}`);
|
|
3475
|
+
}), t.text && r(`--body-data ${ho(G(t.text))}`), r(i.short ? "-O" : "--output-document"), r(`- ${G(a)}`), o();
|
|
3476
3476
|
}
|
|
3477
3477
|
}, xo = {
|
|
3478
3478
|
info: {
|
|
@@ -3486,29 +3486,29 @@ ${i.indent}` : " "
|
|
|
3486
3486
|
httpie: bo,
|
|
3487
3487
|
wget: ko
|
|
3488
3488
|
}
|
|
3489
|
-
}, An = (e, t) => t.repeat(e), Fn = (e, t, n,
|
|
3490
|
-
const s = An(
|
|
3489
|
+
}, An = (e, t) => t.repeat(e), Fn = (e, t, n, a) => {
|
|
3490
|
+
const s = An(a, n), i = An(a - 1, n), r = t ? `,
|
|
3491
3491
|
${s}` : ", ";
|
|
3492
3492
|
return t ? `[
|
|
3493
|
-
${s}${e.join(
|
|
3494
|
-
${i}]` : `[${e.join(
|
|
3493
|
+
${s}${e.join(r)}
|
|
3494
|
+
${i}]` : `[${e.join(r)}]`;
|
|
3495
3495
|
}, qn = (e, t, n) => `let ${e} = ${lt(t, n)}`, lt = (e, t, n) => {
|
|
3496
3496
|
switch (n = n === void 0 ? 1 : n + 1, Object.prototype.toString.call(e)) {
|
|
3497
3497
|
case "[object Number]":
|
|
3498
3498
|
return e;
|
|
3499
3499
|
case "[object Array]": {
|
|
3500
|
-
let
|
|
3501
|
-
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (
|
|
3502
|
-
return Fn(s,
|
|
3500
|
+
let a = !1;
|
|
3501
|
+
const s = e.map((i) => (Object.prototype.toString.call(i) === "[object Object]" && (a = Object.keys(i).length > 1), lt(i, t, n)));
|
|
3502
|
+
return Fn(s, a, t.indent, n);
|
|
3503
3503
|
}
|
|
3504
3504
|
case "[object Object]": {
|
|
3505
|
-
const
|
|
3505
|
+
const a = [];
|
|
3506
3506
|
for (const s in e)
|
|
3507
|
-
|
|
3507
|
+
a.push(`"${s}": ${lt(e[s], t, n)}`);
|
|
3508
3508
|
return Fn(
|
|
3509
|
-
|
|
3509
|
+
a,
|
|
3510
3510
|
// @ts-expect-error needs better types
|
|
3511
|
-
t.pretty &&
|
|
3511
|
+
t.pretty && a.length > 1,
|
|
3512
3512
|
// @ts-expect-error needs better types
|
|
3513
3513
|
t.indent,
|
|
3514
3514
|
n
|
|
@@ -3527,14 +3527,14 @@ ${i}]` : `[${e.join(a)}]`;
|
|
|
3527
3527
|
description: "Foundation's URLSession request",
|
|
3528
3528
|
extname: ".swift"
|
|
3529
3529
|
},
|
|
3530
|
-
convert: ({ allHeaders: e, postData: t, uriObj: n, queryObj:
|
|
3530
|
+
convert: ({ allHeaders: e, postData: t, uriObj: n, queryObj: a, method: s }, i) => {
|
|
3531
3531
|
var d;
|
|
3532
|
-
const
|
|
3532
|
+
const r = {
|
|
3533
3533
|
indent: " ",
|
|
3534
3534
|
pretty: !0,
|
|
3535
3535
|
timeout: 10,
|
|
3536
3536
|
...i
|
|
3537
|
-
}, { push: o, blank: l, join: c } = new O({ indent:
|
|
3537
|
+
}, { push: o, blank: l, join: c } = new O({ indent: r.indent });
|
|
3538
3538
|
o("import Foundation"), l();
|
|
3539
3539
|
const u = t.text || t.jsonObj || t.params;
|
|
3540
3540
|
if (u)
|
|
@@ -3542,33 +3542,33 @@ ${i}]` : `[${e.join(a)}]`;
|
|
|
3542
3542
|
case "application/x-www-form-urlencoded":
|
|
3543
3543
|
if ((d = t.params) != null && d.length) {
|
|
3544
3544
|
const m = t.params.map((h) => `"${h.name}": "${h.value}"`);
|
|
3545
|
-
|
|
3545
|
+
r.pretty ? (o("let parameters = ["), m.forEach((h) => o(`${h},`, 1)), o("]")) : o(`let parameters = [${m.join(", ")}]`), o('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), o("let postData = Data(joinedParameters.utf8)"), l();
|
|
3546
3546
|
}
|
|
3547
3547
|
break;
|
|
3548
3548
|
case "application/json":
|
|
3549
|
-
t.jsonObj && (o(`${qn("parameters", t.jsonObj,
|
|
3549
|
+
t.jsonObj && (o(`${qn("parameters", t.jsonObj, r)} as [String : Any?]`), l(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), l());
|
|
3550
3550
|
break;
|
|
3551
3551
|
case "multipart/form-data":
|
|
3552
|
-
o(qn("parameters", t.params,
|
|
3552
|
+
o(qn("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();
|
|
3553
3553
|
break;
|
|
3554
3554
|
default:
|
|
3555
3555
|
o(`let postData = Data("${t.text}".utf8)`), l();
|
|
3556
3556
|
}
|
|
3557
3557
|
o(`let url = URL(string: "${n.href}")!`);
|
|
3558
|
-
const f =
|
|
3558
|
+
const f = a ? Object.entries(a) : [];
|
|
3559
3559
|
return f.length < 1 ? o("var request = URLRequest(url: url)") : (o("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), o("let queryItems: [URLQueryItem] = ["), f.forEach((m) => {
|
|
3560
|
-
const h = m[0],
|
|
3561
|
-
switch (Object.prototype.toString.call(
|
|
3560
|
+
const h = m[0], y = m[1];
|
|
3561
|
+
switch (Object.prototype.toString.call(y)) {
|
|
3562
3562
|
case "[object String]":
|
|
3563
|
-
o(`URLQueryItem(name: "${h}", value: "${
|
|
3563
|
+
o(`URLQueryItem(name: "${h}", value: "${y}"),`, 1);
|
|
3564
3564
|
break;
|
|
3565
3565
|
case "[object Array]":
|
|
3566
|
-
|
|
3566
|
+
y.forEach((g) => {
|
|
3567
3567
|
o(`URLQueryItem(name: "${h}", value: "${g}"),`, 1);
|
|
3568
3568
|
});
|
|
3569
3569
|
break;
|
|
3570
3570
|
}
|
|
3571
|
-
}), 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 = ${
|
|
3571
|
+
}), 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 = ${lt(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();
|
|
3572
3572
|
}
|
|
3573
3573
|
}, So = {
|
|
3574
3574
|
info: {
|
|
@@ -3586,7 +3586,7 @@ ${i}]` : `[${e.join(a)}]`;
|
|
|
3586
3586
|
go: Ni,
|
|
3587
3587
|
http: Oi,
|
|
3588
3588
|
java: Ai,
|
|
3589
|
-
javascript:
|
|
3589
|
+
javascript: Li,
|
|
3590
3590
|
json: Hi,
|
|
3591
3591
|
kotlin: Mi,
|
|
3592
3592
|
node: Gi,
|
|
@@ -3604,36 +3604,36 @@ ${i}]` : `[${e.join(a)}]`;
|
|
|
3604
3604
|
ct.exports;
|
|
3605
3605
|
(function(e, t) {
|
|
3606
3606
|
(function(n) {
|
|
3607
|
-
var
|
|
3607
|
+
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, i = typeof Be == "object" && Be;
|
|
3608
3608
|
(i.global === i || i.window === i || i.self === i) && (n = i);
|
|
3609
|
-
var
|
|
3609
|
+
var r, o = 2147483647, l = 36, c = 1, u = 26, f = 38, d = 700, m = 72, h = 128, y = "-", g = /^xn--/, b = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, k = {
|
|
3610
3610
|
overflow: "Overflow: input needs wider integers to process",
|
|
3611
3611
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3612
3612
|
"invalid-input": "Invalid input"
|
|
3613
|
-
},
|
|
3614
|
-
function
|
|
3613
|
+
}, x = l - c, S = Math.floor, j = String.fromCharCode, E;
|
|
3614
|
+
function C(w) {
|
|
3615
3615
|
throw new RangeError(k[w]);
|
|
3616
3616
|
}
|
|
3617
3617
|
function R(w, N) {
|
|
3618
|
-
for (var
|
|
3619
|
-
_[
|
|
3618
|
+
for (var P = w.length, _ = []; P--; )
|
|
3619
|
+
_[P] = N(w[P]);
|
|
3620
3620
|
return _;
|
|
3621
3621
|
}
|
|
3622
|
-
function
|
|
3623
|
-
var
|
|
3624
|
-
|
|
3622
|
+
function U(w, N) {
|
|
3623
|
+
var P = w.split("@"), _ = "";
|
|
3624
|
+
P.length > 1 && (_ = P[0] + "@", w = P[1]), w = w.replace(v, ".");
|
|
3625
3625
|
var B = w.split("."), Z = R(B, N).join(".");
|
|
3626
3626
|
return _ + Z;
|
|
3627
3627
|
}
|
|
3628
|
-
function
|
|
3629
|
-
for (var N = [],
|
|
3630
|
-
B = w.charCodeAt(
|
|
3628
|
+
function $(w) {
|
|
3629
|
+
for (var N = [], P = 0, _ = w.length, B, Z; P < _; )
|
|
3630
|
+
B = w.charCodeAt(P++), B >= 55296 && B <= 56319 && P < _ ? (Z = w.charCodeAt(P++), (Z & 64512) == 56320 ? N.push(((B & 1023) << 10) + (Z & 1023) + 65536) : (N.push(B), P--)) : N.push(B);
|
|
3631
3631
|
return N;
|
|
3632
3632
|
}
|
|
3633
3633
|
function I(w) {
|
|
3634
3634
|
return R(w, function(N) {
|
|
3635
|
-
var
|
|
3636
|
-
return N > 65535 && (N -= 65536,
|
|
3635
|
+
var P = "";
|
|
3636
|
+
return N > 65535 && (N -= 65536, P += j(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), P += j(N), P;
|
|
3637
3637
|
}).join("");
|
|
3638
3638
|
}
|
|
3639
3639
|
function F(w) {
|
|
@@ -3642,53 +3642,53 @@ ct.exports;
|
|
|
3642
3642
|
function M(w, N) {
|
|
3643
3643
|
return w + 22 + 75 * (w < 26) - ((N != 0) << 5);
|
|
3644
3644
|
}
|
|
3645
|
-
function H(w, N,
|
|
3645
|
+
function H(w, N, P) {
|
|
3646
3646
|
var _ = 0;
|
|
3647
|
-
for (w =
|
|
3648
|
-
w = S(w /
|
|
3649
|
-
return S(_ + (
|
|
3647
|
+
for (w = P ? S(w / d) : w >> 1, w += S(w / N); w > x * u >> 1; _ += l)
|
|
3648
|
+
w = S(w / x);
|
|
3649
|
+
return S(_ + (x + 1) * w / (w + f));
|
|
3650
3650
|
}
|
|
3651
3651
|
function V(w) {
|
|
3652
|
-
var N = [],
|
|
3653
|
-
for (te = w.lastIndexOf(
|
|
3654
|
-
w.charCodeAt(ae) >= 128 &&
|
|
3655
|
-
for (se = te > 0 ? te + 1 : 0; se <
|
|
3656
|
-
for (fe = B, K = 1, ne = l; se >=
|
|
3657
|
-
ke = l - ye, K > S(o / ke) &&
|
|
3658
|
-
_ = N.length + 1, D = H(B - fe, _, fe == 0), S(B / _) > o - Z &&
|
|
3652
|
+
var N = [], P = w.length, _, B = 0, Z = h, D = m, te, ae, se, fe, K, ne, ie, ye, ke;
|
|
3653
|
+
for (te = w.lastIndexOf(y), te < 0 && (te = 0), ae = 0; ae < te; ++ae)
|
|
3654
|
+
w.charCodeAt(ae) >= 128 && C("not-basic"), N.push(w.charCodeAt(ae));
|
|
3655
|
+
for (se = te > 0 ? te + 1 : 0; se < P; ) {
|
|
3656
|
+
for (fe = B, K = 1, ne = l; se >= P && C("invalid-input"), ie = F(w.charCodeAt(se++)), (ie >= l || ie > S((o - B) / K)) && C("overflow"), B += ie * K, ye = ne <= D ? c : ne >= D + u ? u : ne - D, !(ie < ye); ne += l)
|
|
3657
|
+
ke = l - ye, K > S(o / ke) && C("overflow"), K *= ke;
|
|
3658
|
+
_ = N.length + 1, D = H(B - fe, _, fe == 0), S(B / _) > o - Z && C("overflow"), Z += S(B / _), B %= _, N.splice(B++, 0, Z);
|
|
3659
3659
|
}
|
|
3660
3660
|
return I(N);
|
|
3661
3661
|
}
|
|
3662
3662
|
function q(w) {
|
|
3663
|
-
var N,
|
|
3664
|
-
for (w =
|
|
3663
|
+
var N, P, _, B, Z, D, te, ae, se, fe, K, ne = [], ie, ye, ke, gt;
|
|
3664
|
+
for (w = $(w), ie = w.length, N = h, P = 0, Z = m, D = 0; D < ie; ++D)
|
|
3665
3665
|
K = w[D], K < 128 && ne.push(j(K));
|
|
3666
|
-
for (_ = B = ne.length, B && ne.push(
|
|
3666
|
+
for (_ = B = ne.length, B && ne.push(y); _ < ie; ) {
|
|
3667
3667
|
for (te = o, D = 0; D < ie; ++D)
|
|
3668
3668
|
K = w[D], K >= N && K < te && (te = K);
|
|
3669
|
-
for (ye = _ + 1, te - N > S((o -
|
|
3670
|
-
if (K = w[D], K < N && ++
|
|
3671
|
-
for (ae =
|
|
3672
|
-
|
|
3673
|
-
j(M(fe +
|
|
3674
|
-
), ae = S(
|
|
3675
|
-
ne.push(j(M(ae, 0))), Z = H(
|
|
3669
|
+
for (ye = _ + 1, te - N > S((o - P) / ye) && C("overflow"), P += (te - N) * ye, N = te, D = 0; D < ie; ++D)
|
|
3670
|
+
if (K = w[D], K < N && ++P > o && C("overflow"), K == N) {
|
|
3671
|
+
for (ae = P, se = l; fe = se <= Z ? c : se >= Z + u ? u : se - Z, !(ae < fe); se += l)
|
|
3672
|
+
gt = ae - fe, ke = l - fe, ne.push(
|
|
3673
|
+
j(M(fe + gt % ke, 0))
|
|
3674
|
+
), ae = S(gt / ke);
|
|
3675
|
+
ne.push(j(M(ae, 0))), Z = H(P, ye, _ == B), P = 0, ++_;
|
|
3676
3676
|
}
|
|
3677
|
-
++
|
|
3677
|
+
++P, ++N;
|
|
3678
3678
|
}
|
|
3679
3679
|
return ne.join("");
|
|
3680
3680
|
}
|
|
3681
3681
|
function he(w) {
|
|
3682
|
-
return
|
|
3682
|
+
return U(w, function(N) {
|
|
3683
3683
|
return g.test(N) ? V(N.slice(4).toLowerCase()) : N;
|
|
3684
3684
|
});
|
|
3685
3685
|
}
|
|
3686
3686
|
function pe(w) {
|
|
3687
|
-
return
|
|
3687
|
+
return U(w, function(N) {
|
|
3688
3688
|
return b.test(N) ? "xn--" + q(N) : N;
|
|
3689
3689
|
});
|
|
3690
3690
|
}
|
|
3691
|
-
if (
|
|
3691
|
+
if (r = {
|
|
3692
3692
|
/**
|
|
3693
3693
|
* A string representing the current Punycode.js version number.
|
|
3694
3694
|
* @memberOf punycode
|
|
@@ -3703,30 +3703,30 @@ ct.exports;
|
|
|
3703
3703
|
* @type Object
|
|
3704
3704
|
*/
|
|
3705
3705
|
ucs2: {
|
|
3706
|
-
decode:
|
|
3706
|
+
decode: $,
|
|
3707
3707
|
encode: I
|
|
3708
3708
|
},
|
|
3709
3709
|
decode: V,
|
|
3710
3710
|
encode: q,
|
|
3711
3711
|
toASCII: pe,
|
|
3712
3712
|
toUnicode: he
|
|
3713
|
-
},
|
|
3714
|
-
if (e.exports ==
|
|
3715
|
-
s.exports =
|
|
3713
|
+
}, a && s)
|
|
3714
|
+
if (e.exports == a)
|
|
3715
|
+
s.exports = r;
|
|
3716
3716
|
else
|
|
3717
|
-
for (E in
|
|
3718
|
-
|
|
3717
|
+
for (E in r)
|
|
3718
|
+
r.hasOwnProperty(E) && (a[E] = r[E]);
|
|
3719
3719
|
else
|
|
3720
|
-
n.punycode =
|
|
3720
|
+
n.punycode = r;
|
|
3721
3721
|
})(Be);
|
|
3722
3722
|
})(ct, ct.exports);
|
|
3723
|
-
var jo = ct.exports, No = Error, To = EvalError, Oo = RangeError, Co = ReferenceError, kr = SyntaxError,
|
|
3723
|
+
var jo = ct.exports, No = Error, To = EvalError, Oo = RangeError, Co = ReferenceError, kr = SyntaxError, Qe = TypeError, Po = URIError, Eo = function() {
|
|
3724
3724
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3725
3725
|
return !1;
|
|
3726
3726
|
if (typeof Symbol.iterator == "symbol")
|
|
3727
3727
|
return !0;
|
|
3728
|
-
var t = {}, n = Symbol("test"),
|
|
3729
|
-
if (typeof n == "string" || Object.prototype.toString.call(n) !== "[object Symbol]" || Object.prototype.toString.call(
|
|
3728
|
+
var t = {}, n = Symbol("test"), a = Object(n);
|
|
3729
|
+
if (typeof n == "string" || Object.prototype.toString.call(n) !== "[object Symbol]" || Object.prototype.toString.call(a) !== "[object Symbol]")
|
|
3730
3730
|
return !1;
|
|
3731
3731
|
var s = 42;
|
|
3732
3732
|
t[n] = s;
|
|
@@ -3738,49 +3738,49 @@ var jo = ct.exports, No = Error, To = EvalError, Oo = RangeError, Co = Reference
|
|
|
3738
3738
|
if (i.length !== 1 || i[0] !== n || !Object.prototype.propertyIsEnumerable.call(t, n))
|
|
3739
3739
|
return !1;
|
|
3740
3740
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
3741
|
-
var
|
|
3742
|
-
if (
|
|
3741
|
+
var r = Object.getOwnPropertyDescriptor(t, n);
|
|
3742
|
+
if (r.value !== s || r.enumerable !== !0)
|
|
3743
3743
|
return !1;
|
|
3744
3744
|
}
|
|
3745
3745
|
return !0;
|
|
3746
3746
|
}, In = typeof Symbol < "u" && Symbol, Ro = Eo, Ao = function() {
|
|
3747
3747
|
return typeof In != "function" || typeof Symbol != "function" || typeof In("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ro();
|
|
3748
|
-
},
|
|
3748
|
+
}, Nt = {
|
|
3749
3749
|
__proto__: null,
|
|
3750
3750
|
foo: {}
|
|
3751
3751
|
}, Fo = Object, qo = function() {
|
|
3752
|
-
return { __proto__:
|
|
3753
|
-
}, Io = "Function.prototype.bind called on incompatible ", _o = Object.prototype.toString,
|
|
3754
|
-
for (var
|
|
3755
|
-
|
|
3752
|
+
return { __proto__: Nt }.foo === Nt.foo && !(Nt instanceof Fo);
|
|
3753
|
+
}, Io = "Function.prototype.bind called on incompatible ", _o = Object.prototype.toString, Lo = Math.max, Uo = "[object Function]", _n = function(t, n) {
|
|
3754
|
+
for (var a = [], s = 0; s < t.length; s += 1)
|
|
3755
|
+
a[s] = t[s];
|
|
3756
3756
|
for (var i = 0; i < n.length; i += 1)
|
|
3757
|
-
|
|
3758
|
-
return
|
|
3757
|
+
a[i + t.length] = n[i];
|
|
3758
|
+
return a;
|
|
3759
3759
|
}, Ho = function(t, n) {
|
|
3760
|
-
for (var
|
|
3761
|
-
|
|
3762
|
-
return
|
|
3760
|
+
for (var a = [], s = n, i = 0; s < t.length; s += 1, i += 1)
|
|
3761
|
+
a[i] = t[s];
|
|
3762
|
+
return a;
|
|
3763
3763
|
}, Bo = function(e, t) {
|
|
3764
|
-
for (var n = "",
|
|
3765
|
-
n += e[
|
|
3764
|
+
for (var n = "", a = 0; a < e.length; a += 1)
|
|
3765
|
+
n += e[a], a + 1 < e.length && (n += t);
|
|
3766
3766
|
return n;
|
|
3767
3767
|
}, Mo = function(t) {
|
|
3768
3768
|
var n = this;
|
|
3769
|
-
if (typeof n != "function" || _o.apply(n) !==
|
|
3769
|
+
if (typeof n != "function" || _o.apply(n) !== Uo)
|
|
3770
3770
|
throw new TypeError(Io + n);
|
|
3771
|
-
for (var
|
|
3771
|
+
for (var a = Ho(arguments, 1), s, i = function() {
|
|
3772
3772
|
if (this instanceof s) {
|
|
3773
3773
|
var u = n.apply(
|
|
3774
3774
|
this,
|
|
3775
|
-
_n(
|
|
3775
|
+
_n(a, arguments)
|
|
3776
3776
|
);
|
|
3777
3777
|
return Object(u) === u ? u : this;
|
|
3778
3778
|
}
|
|
3779
3779
|
return n.apply(
|
|
3780
3780
|
t,
|
|
3781
|
-
_n(
|
|
3781
|
+
_n(a, arguments)
|
|
3782
3782
|
);
|
|
3783
|
-
},
|
|
3783
|
+
}, r = Lo(0, n.length - a.length), o = [], l = 0; l < r; l++)
|
|
3784
3784
|
o[l] = "$" + l;
|
|
3785
3785
|
if (s = Function("binder", "return function (" + Bo(o, ",") + "){ return binder.apply(this,arguments); }")(i), n.prototype) {
|
|
3786
3786
|
var c = function() {
|
|
@@ -3788,7 +3788,7 @@ var jo = ct.exports, No = Error, To = EvalError, Oo = RangeError, Co = Reference
|
|
|
3788
3788
|
c.prototype = n.prototype, s.prototype = new c(), c.prototype = null;
|
|
3789
3789
|
}
|
|
3790
3790
|
return s;
|
|
3791
|
-
}, Vo = Mo, nn = Function.prototype.bind || Vo, zo = Function.prototype.call, Jo = Object.prototype.hasOwnProperty, Wo = nn, Do = Wo.call(zo, Jo), T, Go = No, Qo = To, Ko = Oo, Yo = Co, Ae = kr, Pe =
|
|
3791
|
+
}, Vo = Mo, nn = Function.prototype.bind || Vo, zo = Function.prototype.call, Jo = Object.prototype.hasOwnProperty, Wo = nn, Do = Wo.call(zo, Jo), T, Go = No, Qo = To, Ko = Oo, Yo = Co, Ae = kr, Pe = Qe, Xo = Po, xr = Function, Tt = function(e) {
|
|
3792
3792
|
try {
|
|
3793
3793
|
return xr('"use strict"; return (' + e + ").constructor;")();
|
|
3794
3794
|
} catch {
|
|
@@ -3800,19 +3800,19 @@ if (Se)
|
|
|
3800
3800
|
} catch {
|
|
3801
3801
|
Se = null;
|
|
3802
3802
|
}
|
|
3803
|
-
var
|
|
3803
|
+
var Ot = function() {
|
|
3804
3804
|
throw new Pe();
|
|
3805
3805
|
}, Zo = Se ? function() {
|
|
3806
3806
|
try {
|
|
3807
|
-
return arguments.callee,
|
|
3807
|
+
return arguments.callee, Ot;
|
|
3808
3808
|
} catch {
|
|
3809
3809
|
try {
|
|
3810
3810
|
return Se(arguments, "callee").get;
|
|
3811
3811
|
} catch {
|
|
3812
|
-
return
|
|
3812
|
+
return Ot;
|
|
3813
3813
|
}
|
|
3814
3814
|
}
|
|
3815
|
-
}() :
|
|
3815
|
+
}() : Ot, Ne = Ao(), es = qo(), J = Object.getPrototypeOf || (es ? function(e) {
|
|
3816
3816
|
return e.__proto__;
|
|
3817
3817
|
} : null), Oe = {}, ts = typeof Uint8Array > "u" || !J ? T : J(Uint8Array), we = {
|
|
3818
3818
|
__proto__: null,
|
|
@@ -3894,20 +3894,20 @@ if (J)
|
|
|
3894
3894
|
var rs = function e(t) {
|
|
3895
3895
|
var n;
|
|
3896
3896
|
if (t === "%AsyncFunction%")
|
|
3897
|
-
n =
|
|
3897
|
+
n = Tt("async function () {}");
|
|
3898
3898
|
else if (t === "%GeneratorFunction%")
|
|
3899
|
-
n =
|
|
3899
|
+
n = Tt("function* () {}");
|
|
3900
3900
|
else if (t === "%AsyncGeneratorFunction%")
|
|
3901
|
-
n =
|
|
3901
|
+
n = Tt("async function* () {}");
|
|
3902
3902
|
else if (t === "%AsyncGenerator%") {
|
|
3903
|
-
var
|
|
3904
|
-
|
|
3903
|
+
var a = e("%AsyncGeneratorFunction%");
|
|
3904
|
+
a && (n = a.prototype);
|
|
3905
3905
|
} else if (t === "%AsyncIteratorPrototype%") {
|
|
3906
3906
|
var s = e("%AsyncGenerator%");
|
|
3907
3907
|
s && J && (n = J(s.prototype));
|
|
3908
3908
|
}
|
|
3909
3909
|
return we[t] = n, n;
|
|
3910
|
-
},
|
|
3910
|
+
}, Ln = {
|
|
3911
3911
|
__proto__: null,
|
|
3912
3912
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3913
3913
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -3960,25 +3960,25 @@ var rs = function e(t) {
|
|
|
3960
3960
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3961
3961
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3962
3962
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3963
|
-
},
|
|
3964
|
-
var n = dt(t, 0, 1),
|
|
3965
|
-
if (n === "%" &&
|
|
3963
|
+
}, Ke = nn, ut = Do, as = Ke.call(Function.call, Array.prototype.concat), is = Ke.call(Function.apply, Array.prototype.splice), Un = Ke.call(Function.call, String.prototype.replace), dt = Ke.call(Function.call, String.prototype.slice), os = Ke.call(Function.call, RegExp.prototype.exec), ss = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ls = /\\(\\)?/g, cs = function(t) {
|
|
3964
|
+
var n = dt(t, 0, 1), a = dt(t, -1);
|
|
3965
|
+
if (n === "%" && a !== "%")
|
|
3966
3966
|
throw new Ae("invalid intrinsic syntax, expected closing `%`");
|
|
3967
|
-
if (
|
|
3967
|
+
if (a === "%" && n !== "%")
|
|
3968
3968
|
throw new Ae("invalid intrinsic syntax, expected opening `%`");
|
|
3969
3969
|
var s = [];
|
|
3970
|
-
return
|
|
3971
|
-
s[s.length] = o ?
|
|
3970
|
+
return Un(t, ss, function(i, r, o, l) {
|
|
3971
|
+
s[s.length] = o ? Un(l, ls, "$1") : r || i;
|
|
3972
3972
|
}), s;
|
|
3973
3973
|
}, us = function(t, n) {
|
|
3974
|
-
var
|
|
3975
|
-
if (ut(
|
|
3976
|
-
var i = we[
|
|
3977
|
-
if (i === Oe && (i = rs(
|
|
3974
|
+
var a = t, s;
|
|
3975
|
+
if (ut(Ln, a) && (s = Ln[a], a = "%" + s[0] + "%"), ut(we, a)) {
|
|
3976
|
+
var i = we[a];
|
|
3977
|
+
if (i === Oe && (i = rs(a)), typeof i > "u" && !n)
|
|
3978
3978
|
throw new Pe("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
3979
3979
|
return {
|
|
3980
3980
|
alias: s,
|
|
3981
|
-
name:
|
|
3981
|
+
name: a,
|
|
3982
3982
|
value: i
|
|
3983
3983
|
};
|
|
3984
3984
|
}
|
|
@@ -3990,32 +3990,32 @@ var rs = function e(t) {
|
|
|
3990
3990
|
throw new Pe('"allowMissing" argument must be a boolean');
|
|
3991
3991
|
if (os(/^%?[^%]*%?$/, t) === null)
|
|
3992
3992
|
throw new Ae("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3993
|
-
var
|
|
3994
|
-
c && (s = c[0], is(
|
|
3995
|
-
for (var u = 1, f = !0; u <
|
|
3996
|
-
var d =
|
|
3993
|
+
var a = cs(t), s = a.length > 0 ? a[0] : "", i = us("%" + s + "%", n), r = i.name, o = i.value, l = !1, c = i.alias;
|
|
3994
|
+
c && (s = c[0], is(a, as([0, 1], c)));
|
|
3995
|
+
for (var u = 1, f = !0; u < a.length; u += 1) {
|
|
3996
|
+
var d = a[u], m = dt(d, 0, 1), h = dt(d, -1);
|
|
3997
3997
|
if ((m === '"' || m === "'" || m === "`" || h === '"' || h === "'" || h === "`") && m !== h)
|
|
3998
3998
|
throw new Ae("property names with quotes must have matching quotes");
|
|
3999
|
-
if ((d === "constructor" || !f) && (l = !0), s += "." + d,
|
|
4000
|
-
o = we[
|
|
3999
|
+
if ((d === "constructor" || !f) && (l = !0), s += "." + d, r = "%" + s + "%", ut(we, r))
|
|
4000
|
+
o = we[r];
|
|
4001
4001
|
else if (o != null) {
|
|
4002
4002
|
if (!(d in o)) {
|
|
4003
4003
|
if (!n)
|
|
4004
4004
|
throw new Pe("base intrinsic for " + t + " exists, but the property is not available.");
|
|
4005
4005
|
return;
|
|
4006
4006
|
}
|
|
4007
|
-
if (Se && u + 1 >=
|
|
4008
|
-
var
|
|
4009
|
-
f = !!
|
|
4007
|
+
if (Se && u + 1 >= a.length) {
|
|
4008
|
+
var y = Se(o, d);
|
|
4009
|
+
f = !!y, f && "get" in y && !("originalValue" in y.get) ? o = y.get : o = o[d];
|
|
4010
4010
|
} else
|
|
4011
4011
|
f = ut(o, d), o = o[d];
|
|
4012
|
-
f && !l && (we[
|
|
4012
|
+
f && !l && (we[r] = o);
|
|
4013
4013
|
}
|
|
4014
4014
|
}
|
|
4015
4015
|
return o;
|
|
4016
|
-
}, $r = { exports: {} },
|
|
4016
|
+
}, $r = { exports: {} }, Ct, Hn;
|
|
4017
4017
|
function rn() {
|
|
4018
|
-
if (Hn) return
|
|
4018
|
+
if (Hn) return Ct;
|
|
4019
4019
|
Hn = 1;
|
|
4020
4020
|
var e = Ie, t = e("%Object.defineProperty%", !0) || !1;
|
|
4021
4021
|
if (t)
|
|
@@ -4024,16 +4024,16 @@ function rn() {
|
|
|
4024
4024
|
} catch {
|
|
4025
4025
|
t = !1;
|
|
4026
4026
|
}
|
|
4027
|
-
return
|
|
4027
|
+
return Ct = t, Ct;
|
|
4028
4028
|
}
|
|
4029
|
-
var ds = Ie,
|
|
4030
|
-
if (
|
|
4029
|
+
var ds = Ie, at = ds("%Object.getOwnPropertyDescriptor%", !0);
|
|
4030
|
+
if (at)
|
|
4031
4031
|
try {
|
|
4032
|
-
|
|
4032
|
+
at([], "length");
|
|
4033
4033
|
} catch {
|
|
4034
|
-
|
|
4034
|
+
at = null;
|
|
4035
4035
|
}
|
|
4036
|
-
var Sr =
|
|
4036
|
+
var Sr = at, Bn = rn(), ps = kr, Te = Qe, Mn = Sr, fs = function(t, n, a) {
|
|
4037
4037
|
if (!t || typeof t != "object" && typeof t != "function")
|
|
4038
4038
|
throw new Te("`obj` must be an object or a function`");
|
|
4039
4039
|
if (typeof n != "string" && typeof n != "symbol")
|
|
@@ -4046,41 +4046,41 @@ var Sr = rt, Bn = rn(), ps = kr, Te = Ge, Mn = Sr, fs = function(t, n, r) {
|
|
|
4046
4046
|
throw new Te("`nonConfigurable`, if provided, must be a boolean or null");
|
|
4047
4047
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
4048
4048
|
throw new Te("`loose`, if provided, must be a boolean");
|
|
4049
|
-
var s = arguments.length > 3 ? arguments[3] : null, i = arguments.length > 4 ? arguments[4] : null,
|
|
4049
|
+
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 = !!Mn && Mn(t, n);
|
|
4050
4050
|
if (Bn)
|
|
4051
4051
|
Bn(t, n, {
|
|
4052
|
-
configurable:
|
|
4052
|
+
configurable: r === null && l ? l.configurable : !r,
|
|
4053
4053
|
enumerable: s === null && l ? l.enumerable : !s,
|
|
4054
|
-
value:
|
|
4054
|
+
value: a,
|
|
4055
4055
|
writable: i === null && l ? l.writable : !i
|
|
4056
4056
|
});
|
|
4057
|
-
else if (o || !s && !i && !
|
|
4058
|
-
t[n] =
|
|
4057
|
+
else if (o || !s && !i && !r)
|
|
4058
|
+
t[n] = a;
|
|
4059
4059
|
else
|
|
4060
4060
|
throw new ps("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4061
|
-
},
|
|
4062
|
-
return !!
|
|
4061
|
+
}, Mt = rn(), wr = function() {
|
|
4062
|
+
return !!Mt;
|
|
4063
4063
|
};
|
|
4064
4064
|
wr.hasArrayLengthDefineBug = function() {
|
|
4065
|
-
if (!
|
|
4065
|
+
if (!Mt)
|
|
4066
4066
|
return null;
|
|
4067
4067
|
try {
|
|
4068
|
-
return
|
|
4068
|
+
return Mt([], "length", { value: 1 }).length !== 1;
|
|
4069
4069
|
} catch {
|
|
4070
4070
|
return !0;
|
|
4071
4071
|
}
|
|
4072
4072
|
};
|
|
4073
|
-
var ms = wr, hs = Ie, Vn = fs, ys = ms(), zn = Sr, Jn =
|
|
4073
|
+
var ms = wr, hs = Ie, Vn = fs, ys = ms(), zn = Sr, Jn = Qe, vs = hs("%Math.floor%"), gs = function(t, n) {
|
|
4074
4074
|
if (typeof t != "function")
|
|
4075
4075
|
throw new Jn("`fn` is not a function");
|
|
4076
4076
|
if (typeof n != "number" || n < 0 || n > 4294967295 || vs(n) !== n)
|
|
4077
4077
|
throw new Jn("`length` must be a positive 32-bit integer");
|
|
4078
|
-
var
|
|
4078
|
+
var a = arguments.length > 2 && !!arguments[2], s = !0, i = !0;
|
|
4079
4079
|
if ("length" in t && zn) {
|
|
4080
|
-
var
|
|
4081
|
-
|
|
4080
|
+
var r = zn(t, "length");
|
|
4081
|
+
r && !r.configurable && (s = !1), r && !r.writable && (i = !1);
|
|
4082
4082
|
}
|
|
4083
|
-
return (s || i || !
|
|
4083
|
+
return (s || i || !a) && (ys ? Vn(
|
|
4084
4084
|
/** @type {Parameters<define>[0]} */
|
|
4085
4085
|
t,
|
|
4086
4086
|
"length",
|
|
@@ -4095,12 +4095,12 @@ var ms = wr, hs = Ie, Vn = fs, ys = ms(), zn = Sr, Jn = Ge, vs = hs("%Math.floor
|
|
|
4095
4095
|
)), t;
|
|
4096
4096
|
};
|
|
4097
4097
|
(function(e) {
|
|
4098
|
-
var t = nn, n = Ie,
|
|
4098
|
+
var t = nn, n = Ie, a = gs, s = Qe, i = n("%Function.prototype.apply%"), r = n("%Function.prototype.call%"), o = n("%Reflect.apply%", !0) || t.call(r, i), l = rn(), c = n("%Math.max%");
|
|
4099
4099
|
e.exports = function(d) {
|
|
4100
4100
|
if (typeof d != "function")
|
|
4101
4101
|
throw new s("a function is required");
|
|
4102
|
-
var m = o(t,
|
|
4103
|
-
return
|
|
4102
|
+
var m = o(t, r, arguments);
|
|
4103
|
+
return a(
|
|
4104
4104
|
m,
|
|
4105
4105
|
1 + c(0, d.length - (arguments.length - 1)),
|
|
4106
4106
|
!0
|
|
@@ -4112,11 +4112,11 @@ var ms = wr, hs = Ie, Vn = fs, ys = ms(), zn = Sr, Jn = Ge, vs = hs("%Math.floor
|
|
|
4112
4112
|
l ? l(e.exports, "apply", { value: u }) : e.exports.apply = u;
|
|
4113
4113
|
})($r);
|
|
4114
4114
|
var bs = $r.exports, jr = Ie, Nr = bs, ks = Nr(jr("String.prototype.indexOf")), xs = function(t, n) {
|
|
4115
|
-
var
|
|
4116
|
-
return typeof
|
|
4115
|
+
var a = jr(t, !!n);
|
|
4116
|
+
return typeof a == "function" && ks(t, ".prototype.") > -1 ? Nr(a) : a;
|
|
4117
4117
|
};
|
|
4118
4118
|
const $s = /* @__PURE__ */ xa($a);
|
|
4119
|
-
var an = typeof Map == "function" && Map.prototype,
|
|
4119
|
+
var an = typeof Map == "function" && Map.prototype, Pt = Object.getOwnPropertyDescriptor && an ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, pt = an && Pt && typeof Pt.get == "function" ? Pt.get : null, Wn = an && Map.prototype.forEach, on = typeof Set == "function" && Set.prototype, Et = Object.getOwnPropertyDescriptor && on ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ft = on && Et && typeof Et.get == "function" ? Et.get : null, Dn = on && Set.prototype.forEach, Ss = typeof WeakMap == "function" && WeakMap.prototype, Me = Ss ? WeakMap.prototype.has : null, ws = typeof WeakSet == "function" && WeakSet.prototype, Ve = ws ? WeakSet.prototype.has : null, js = typeof WeakRef == "function" && WeakRef.prototype, Gn = js ? WeakRef.prototype.deref : null, Ns = Boolean.prototype.valueOf, Ts = Object.prototype.toString, Os = Function.prototype.toString, Cs = String.prototype.match, sn = String.prototype.slice, ge = String.prototype.replace, Ps = String.prototype.toUpperCase, Qn = String.prototype.toLowerCase, Tr = RegExp.prototype.test, Kn = Array.prototype.concat, ue = Array.prototype.join, Es = Array.prototype.slice, Yn = Math.floor, Vt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Rt = Object.getOwnPropertySymbols, zt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Fe = typeof Symbol == "function" && typeof Symbol.iterator == "object", X = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Fe || !0) ? Symbol.toStringTag : null, Or = Object.prototype.propertyIsEnumerable, Xn = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
4120
4120
|
return e.__proto__;
|
|
4121
4121
|
} : null);
|
|
4122
4122
|
function Zn(e, t) {
|
|
@@ -4124,22 +4124,22 @@ function Zn(e, t) {
|
|
|
4124
4124
|
return t;
|
|
4125
4125
|
var n = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
4126
4126
|
if (typeof e == "number") {
|
|
4127
|
-
var
|
|
4128
|
-
if (
|
|
4129
|
-
var s = String(
|
|
4127
|
+
var a = e < 0 ? -Yn(-e) : Yn(e);
|
|
4128
|
+
if (a !== e) {
|
|
4129
|
+
var s = String(a), i = sn.call(t, s.length + 1);
|
|
4130
4130
|
return ge.call(s, n, "$&_") + "." + ge.call(ge.call(i, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
4131
4131
|
}
|
|
4132
4132
|
}
|
|
4133
4133
|
return ge.call(t, n, "$&_");
|
|
4134
4134
|
}
|
|
4135
|
-
var
|
|
4135
|
+
var Jt = $s, er = Jt.custom, tr = Pr(er) ? er : null, Rs = function e(t, n, a, s) {
|
|
4136
4136
|
var i = n || {};
|
|
4137
4137
|
if (ve(i, "quoteStyle") && i.quoteStyle !== "single" && i.quoteStyle !== "double")
|
|
4138
4138
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
4139
4139
|
if (ve(i, "maxStringLength") && (typeof i.maxStringLength == "number" ? i.maxStringLength < 0 && i.maxStringLength !== 1 / 0 : i.maxStringLength !== null))
|
|
4140
4140
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
4141
|
-
var
|
|
4142
|
-
if (typeof
|
|
4141
|
+
var r = ve(i, "customInspect") ? i.customInspect : !0;
|
|
4142
|
+
if (typeof r != "boolean" && r !== "symbol")
|
|
4143
4143
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
4144
4144
|
if (ve(i, "indent") && i.indent !== null && i.indent !== " " && !(parseInt(i.indent, 10) === i.indent && i.indent > 0))
|
|
4145
4145
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
@@ -4165,9 +4165,9 @@ var Vt = $s, er = Vt.custom, tr = Pr(er) ? er : null, Rs = function e(t, n, r, s
|
|
|
4165
4165
|
return o ? Zn(t, c) : c;
|
|
4166
4166
|
}
|
|
4167
4167
|
var u = typeof i.depth > "u" ? 5 : i.depth;
|
|
4168
|
-
if (typeof
|
|
4169
|
-
return
|
|
4170
|
-
var f = Ks(i,
|
|
4168
|
+
if (typeof a > "u" && (a = 0), a >= u && u > 0 && typeof t == "object")
|
|
4169
|
+
return Wt(t) ? "[Array]" : "[Object]";
|
|
4170
|
+
var f = Ks(i, a);
|
|
4171
4171
|
if (typeof s > "u")
|
|
4172
4172
|
s = [];
|
|
4173
4173
|
else if (Er(s, t) >= 0)
|
|
@@ -4177,37 +4177,37 @@ var Vt = $s, er = Vt.custom, tr = Pr(er) ? er : null, Rs = function e(t, n, r, s
|
|
|
4177
4177
|
var V = {
|
|
4178
4178
|
depth: i.depth
|
|
4179
4179
|
};
|
|
4180
|
-
return ve(i, "quoteStyle") && (V.quoteStyle = i.quoteStyle), e(F, V,
|
|
4180
|
+
return ve(i, "quoteStyle") && (V.quoteStyle = i.quoteStyle), e(F, V, a + 1, s);
|
|
4181
4181
|
}
|
|
4182
|
-
return e(F, i,
|
|
4182
|
+
return e(F, i, a + 1, s);
|
|
4183
4183
|
}
|
|
4184
4184
|
if (typeof t == "function" && !nr(t)) {
|
|
4185
|
-
var m = Bs(t), h =
|
|
4185
|
+
var m = Bs(t), h = Xe(t, d);
|
|
4186
4186
|
return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + ue.call(h, ", ") + " }" : "");
|
|
4187
4187
|
}
|
|
4188
4188
|
if (Pr(t)) {
|
|
4189
|
-
var
|
|
4190
|
-
return typeof t == "object" && !Fe ? He(
|
|
4189
|
+
var y = Fe ? ge.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : zt.call(t);
|
|
4190
|
+
return typeof t == "object" && !Fe ? He(y) : y;
|
|
4191
4191
|
}
|
|
4192
4192
|
if (Ds(t)) {
|
|
4193
|
-
for (var g = "<" + Qn.call(String(t.nodeName)), b = t.attributes || [],
|
|
4194
|
-
g += " " + b[
|
|
4193
|
+
for (var g = "<" + Qn.call(String(t.nodeName)), b = t.attributes || [], v = 0; v < b.length; v++)
|
|
4194
|
+
g += " " + b[v].name + "=" + Cr(As(b[v].value), "double", i);
|
|
4195
4195
|
return g += ">", t.childNodes && t.childNodes.length && (g += "..."), g += "</" + Qn.call(String(t.nodeName)) + ">", g;
|
|
4196
4196
|
}
|
|
4197
|
-
if (
|
|
4197
|
+
if (Wt(t)) {
|
|
4198
4198
|
if (t.length === 0)
|
|
4199
4199
|
return "[]";
|
|
4200
|
-
var k =
|
|
4201
|
-
return f && !Qs(k) ? "[" +
|
|
4200
|
+
var k = Xe(t, d);
|
|
4201
|
+
return f && !Qs(k) ? "[" + Dt(k, f) + "]" : "[ " + ue.call(k, ", ") + " ]";
|
|
4202
4202
|
}
|
|
4203
4203
|
if (qs(t)) {
|
|
4204
|
-
var
|
|
4205
|
-
return !("cause" in Error.prototype) && "cause" in t && !Or.call(t, "cause") ? "{ [" + String(t) + "] " + ue.call(Kn.call("[cause]: " + d(t.cause),
|
|
4204
|
+
var x = Xe(t, d);
|
|
4205
|
+
return !("cause" in Error.prototype) && "cause" in t && !Or.call(t, "cause") ? "{ [" + String(t) + "] " + ue.call(Kn.call("[cause]: " + d(t.cause), x), ", ") + " }" : x.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ue.call(x, ", ") + " }";
|
|
4206
4206
|
}
|
|
4207
|
-
if (typeof t == "object" &&
|
|
4208
|
-
if (tr && typeof t[tr] == "function" &&
|
|
4209
|
-
return
|
|
4210
|
-
if (
|
|
4207
|
+
if (typeof t == "object" && r) {
|
|
4208
|
+
if (tr && typeof t[tr] == "function" && Jt)
|
|
4209
|
+
return Jt(t, { depth: u - a });
|
|
4210
|
+
if (r !== "symbol" && typeof t.inspect == "function")
|
|
4211
4211
|
return t.inspect();
|
|
4212
4212
|
}
|
|
4213
4213
|
if (Ms(t)) {
|
|
@@ -4223,16 +4223,16 @@ var Vt = $s, er = Vt.custom, tr = Pr(er) ? er : null, Rs = function e(t, n, r, s
|
|
|
4223
4223
|
}), rr("Set", ft.call(t), j, f);
|
|
4224
4224
|
}
|
|
4225
4225
|
if (Vs(t))
|
|
4226
|
-
return
|
|
4226
|
+
return At("WeakMap");
|
|
4227
4227
|
if (Ws(t))
|
|
4228
|
-
return
|
|
4228
|
+
return At("WeakSet");
|
|
4229
4229
|
if (zs(t))
|
|
4230
|
-
return
|
|
4230
|
+
return At("WeakRef");
|
|
4231
4231
|
if (_s(t))
|
|
4232
4232
|
return He(d(Number(t)));
|
|
4233
|
-
if (Ls(t))
|
|
4234
|
-
return He(d(Bt.call(t)));
|
|
4235
4233
|
if (Us(t))
|
|
4234
|
+
return He(d(Vt.call(t)));
|
|
4235
|
+
if (Ls(t))
|
|
4236
4236
|
return He(Ns.call(t));
|
|
4237
4237
|
if (Is(t))
|
|
4238
4238
|
return He(d(String(t)));
|
|
@@ -4241,19 +4241,19 @@ var Vt = $s, er = Vt.custom, tr = Pr(er) ? er : null, Rs = function e(t, n, r, s
|
|
|
4241
4241
|
if (typeof globalThis < "u" && t === globalThis || typeof Be < "u" && t === Be)
|
|
4242
4242
|
return "{ [object globalThis] }";
|
|
4243
4243
|
if (!Fs(t) && !nr(t)) {
|
|
4244
|
-
var E =
|
|
4245
|
-
return E.length === 0 ? I + "{}" : f ? I + "{" +
|
|
4244
|
+
var E = Xe(t, d), C = Xn ? Xn(t) === Object.prototype : t instanceof Object || t.constructor === Object, R = t instanceof Object ? "" : "null prototype", U = !C && X && Object(t) === t && X in t ? sn.call(be(t), 8, -1) : R ? "Object" : "", $ = C || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", I = $ + (U || R ? "[" + ue.call(Kn.call([], U || [], R || []), ": ") + "] " : "");
|
|
4245
|
+
return E.length === 0 ? I + "{}" : f ? I + "{" + Dt(E, f) + "}" : I + "{ " + ue.call(E, ", ") + " }";
|
|
4246
4246
|
}
|
|
4247
4247
|
return String(t);
|
|
4248
4248
|
};
|
|
4249
4249
|
function Cr(e, t, n) {
|
|
4250
|
-
var
|
|
4251
|
-
return
|
|
4250
|
+
var a = (n.quoteStyle || t) === "double" ? '"' : "'";
|
|
4251
|
+
return a + e + a;
|
|
4252
4252
|
}
|
|
4253
4253
|
function As(e) {
|
|
4254
4254
|
return ge.call(String(e), /"/g, """);
|
|
4255
4255
|
}
|
|
4256
|
-
function
|
|
4256
|
+
function Wt(e) {
|
|
4257
4257
|
return be(e) === "[object Array]" && (!X || !(typeof e == "object" && X in e));
|
|
4258
4258
|
}
|
|
4259
4259
|
function Fs(e) {
|
|
@@ -4271,7 +4271,7 @@ function Is(e) {
|
|
|
4271
4271
|
function _s(e) {
|
|
4272
4272
|
return be(e) === "[object Number]" && (!X || !(typeof e == "object" && X in e));
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4274
|
+
function Ls(e) {
|
|
4275
4275
|
return be(e) === "[object Boolean]" && (!X || !(typeof e == "object" && X in e));
|
|
4276
4276
|
}
|
|
4277
4277
|
function Pr(e) {
|
|
@@ -4279,19 +4279,19 @@ function Pr(e) {
|
|
|
4279
4279
|
return e && typeof e == "object" && e instanceof Symbol;
|
|
4280
4280
|
if (typeof e == "symbol")
|
|
4281
4281
|
return !0;
|
|
4282
|
-
if (!e || typeof e != "object" || !
|
|
4282
|
+
if (!e || typeof e != "object" || !zt)
|
|
4283
4283
|
return !1;
|
|
4284
4284
|
try {
|
|
4285
|
-
return
|
|
4285
|
+
return zt.call(e), !0;
|
|
4286
4286
|
} catch {
|
|
4287
4287
|
}
|
|
4288
4288
|
return !1;
|
|
4289
4289
|
}
|
|
4290
|
-
function
|
|
4291
|
-
if (!e || typeof e != "object" || !
|
|
4290
|
+
function Us(e) {
|
|
4291
|
+
if (!e || typeof e != "object" || !Vt)
|
|
4292
4292
|
return !1;
|
|
4293
4293
|
try {
|
|
4294
|
-
return
|
|
4294
|
+
return Vt.call(e), !0;
|
|
4295
4295
|
} catch {
|
|
4296
4296
|
}
|
|
4297
4297
|
return !1;
|
|
@@ -4314,7 +4314,7 @@ function Bs(e) {
|
|
|
4314
4314
|
function Er(e, t) {
|
|
4315
4315
|
if (e.indexOf)
|
|
4316
4316
|
return e.indexOf(t);
|
|
4317
|
-
for (var n = 0,
|
|
4317
|
+
for (var n = 0, a = e.length; n < a; n++)
|
|
4318
4318
|
if (e[n] === t)
|
|
4319
4319
|
return n;
|
|
4320
4320
|
return -1;
|
|
@@ -4393,8 +4393,8 @@ function Ds(e) {
|
|
|
4393
4393
|
}
|
|
4394
4394
|
function Rr(e, t) {
|
|
4395
4395
|
if (e.length > t.maxStringLength) {
|
|
4396
|
-
var n = e.length - t.maxStringLength,
|
|
4397
|
-
return Rr(sn.call(e, 0, t.maxStringLength), t) +
|
|
4396
|
+
var n = e.length - t.maxStringLength, a = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
4397
|
+
return Rr(sn.call(e, 0, t.maxStringLength), t) + a;
|
|
4398
4398
|
}
|
|
4399
4399
|
var s = ge.call(ge.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Gs);
|
|
4400
4400
|
return Cr(s, "single", t);
|
|
@@ -4412,11 +4412,11 @@ function Gs(e) {
|
|
|
4412
4412
|
function He(e) {
|
|
4413
4413
|
return "Object(" + e + ")";
|
|
4414
4414
|
}
|
|
4415
|
-
function
|
|
4415
|
+
function At(e) {
|
|
4416
4416
|
return e + " { ? }";
|
|
4417
4417
|
}
|
|
4418
|
-
function rr(e, t, n,
|
|
4419
|
-
var s =
|
|
4418
|
+
function rr(e, t, n, a) {
|
|
4419
|
+
var s = a ? Dt(n, a) : ue.call(n, ", ");
|
|
4420
4420
|
return e + " (" + t + ") {" + s + "}";
|
|
4421
4421
|
}
|
|
4422
4422
|
function Qs(e) {
|
|
@@ -4439,7 +4439,7 @@ function Ks(e, t) {
|
|
|
4439
4439
|
prev: ue.call(Array(t + 1), n)
|
|
4440
4440
|
};
|
|
4441
4441
|
}
|
|
4442
|
-
function
|
|
4442
|
+
function Dt(e, t) {
|
|
4443
4443
|
if (e.length === 0)
|
|
4444
4444
|
return "";
|
|
4445
4445
|
var n = `
|
|
@@ -4447,37 +4447,37 @@ function Jt(e, t) {
|
|
|
4447
4447
|
return n + ue.call(e, "," + n) + `
|
|
4448
4448
|
` + t.prev;
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4451
|
-
var n =
|
|
4450
|
+
function Xe(e, t) {
|
|
4451
|
+
var n = Wt(e), a = [];
|
|
4452
4452
|
if (n) {
|
|
4453
|
-
|
|
4453
|
+
a.length = e.length;
|
|
4454
4454
|
for (var s = 0; s < e.length; s++)
|
|
4455
|
-
|
|
4455
|
+
a[s] = ve(e, s) ? t(e[s], e) : "";
|
|
4456
4456
|
}
|
|
4457
|
-
var i = typeof
|
|
4457
|
+
var i = typeof Rt == "function" ? Rt(e) : [], r;
|
|
4458
4458
|
if (Fe) {
|
|
4459
|
-
|
|
4459
|
+
r = {};
|
|
4460
4460
|
for (var o = 0; o < i.length; o++)
|
|
4461
|
-
|
|
4461
|
+
r["$" + i[o]] = i[o];
|
|
4462
4462
|
}
|
|
4463
4463
|
for (var l in e)
|
|
4464
|
-
ve(e, l) && (n && String(Number(l)) === l && l < e.length || Fe &&
|
|
4465
|
-
if (typeof
|
|
4464
|
+
ve(e, l) && (n && String(Number(l)) === l && l < e.length || Fe && r["$" + l] instanceof Symbol || (Tr.call(/[^\w$]/, l) ? a.push(t(l, e) + ": " + t(e[l], e)) : a.push(l + ": " + t(e[l], e))));
|
|
4465
|
+
if (typeof Rt == "function")
|
|
4466
4466
|
for (var c = 0; c < i.length; c++)
|
|
4467
|
-
Or.call(e, i[c]) &&
|
|
4468
|
-
return
|
|
4467
|
+
Or.call(e, i[c]) && a.push("[" + t(i[c]) + "]: " + t(e[i[c]], e));
|
|
4468
|
+
return a;
|
|
4469
4469
|
}
|
|
4470
|
-
var Ar = Ie, _e = xs, Ys = Rs, Xs =
|
|
4471
|
-
for (var n = e,
|
|
4472
|
-
if (
|
|
4473
|
-
return n.next =
|
|
4474
|
-
e.next, e.next =
|
|
4470
|
+
var Ar = Ie, _e = xs, Ys = Rs, Xs = Qe, Ze = Ar("%WeakMap%", !0), et = Ar("%Map%", !0), Zs = _e("WeakMap.prototype.get", !0), el = _e("WeakMap.prototype.set", !0), tl = _e("WeakMap.prototype.has", !0), nl = _e("Map.prototype.get", !0), rl = _e("Map.prototype.set", !0), al = _e("Map.prototype.has", !0), ln = function(e, t) {
|
|
4471
|
+
for (var n = e, a; (a = n.next) !== null; n = a)
|
|
4472
|
+
if (a.key === t)
|
|
4473
|
+
return n.next = a.next, a.next = /** @type {NonNullable<typeof list.next>} */
|
|
4474
|
+
e.next, e.next = a, a;
|
|
4475
4475
|
}, il = function(e, t) {
|
|
4476
4476
|
var n = ln(e, t);
|
|
4477
4477
|
return n && n.value;
|
|
4478
4478
|
}, ol = function(e, t, n) {
|
|
4479
|
-
var
|
|
4480
|
-
|
|
4479
|
+
var a = ln(e, t);
|
|
4480
|
+
a ? a.value = n : e.next = /** @type {import('.').ListNode<typeof value>} */
|
|
4481
4481
|
{
|
|
4482
4482
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
4483
4483
|
key: t,
|
|
@@ -4487,42 +4487,42 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4487
4487
|
}, sl = function(e, t) {
|
|
4488
4488
|
return !!ln(e, t);
|
|
4489
4489
|
}, ll = function() {
|
|
4490
|
-
var t, n,
|
|
4490
|
+
var t, n, a, s = {
|
|
4491
4491
|
assert: function(i) {
|
|
4492
4492
|
if (!s.has(i))
|
|
4493
4493
|
throw new Xs("Side channel does not contain " + Ys(i));
|
|
4494
4494
|
},
|
|
4495
4495
|
get: function(i) {
|
|
4496
|
-
if (
|
|
4496
|
+
if (Ze && i && (typeof i == "object" || typeof i == "function")) {
|
|
4497
4497
|
if (t)
|
|
4498
4498
|
return Zs(t, i);
|
|
4499
|
-
} else if (
|
|
4499
|
+
} else if (et) {
|
|
4500
4500
|
if (n)
|
|
4501
4501
|
return nl(n, i);
|
|
4502
|
-
} else if (
|
|
4503
|
-
return il(
|
|
4502
|
+
} else if (a)
|
|
4503
|
+
return il(a, i);
|
|
4504
4504
|
},
|
|
4505
4505
|
has: function(i) {
|
|
4506
|
-
if (
|
|
4506
|
+
if (Ze && i && (typeof i == "object" || typeof i == "function")) {
|
|
4507
4507
|
if (t)
|
|
4508
4508
|
return tl(t, i);
|
|
4509
|
-
} else if (
|
|
4509
|
+
} else if (et) {
|
|
4510
4510
|
if (n)
|
|
4511
4511
|
return al(n, i);
|
|
4512
|
-
} else if (
|
|
4513
|
-
return sl(
|
|
4512
|
+
} else if (a)
|
|
4513
|
+
return sl(a, i);
|
|
4514
4514
|
return !1;
|
|
4515
4515
|
},
|
|
4516
|
-
set: function(i,
|
|
4517
|
-
|
|
4516
|
+
set: function(i, r) {
|
|
4517
|
+
Ze && i && (typeof i == "object" || typeof i == "function") ? (t || (t = new Ze()), el(t, i, r)) : et ? (n || (n = new et()), rl(n, i, r)) : (a || (a = { key: {}, next: null }), ol(a, i, r));
|
|
4518
4518
|
}
|
|
4519
4519
|
};
|
|
4520
4520
|
return s;
|
|
4521
|
-
}, cl = String.prototype.replace, ul = /%20/g,
|
|
4521
|
+
}, cl = String.prototype.replace, ul = /%20/g, Ft = {
|
|
4522
4522
|
RFC1738: "RFC1738",
|
|
4523
4523
|
RFC3986: "RFC3986"
|
|
4524
4524
|
}, cn = {
|
|
4525
|
-
default:
|
|
4525
|
+
default: Ft.RFC3986,
|
|
4526
4526
|
formatters: {
|
|
4527
4527
|
RFC1738: function(e) {
|
|
4528
4528
|
return cl.call(e, ul, "+");
|
|
@@ -4531,33 +4531,33 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4531
4531
|
return String(e);
|
|
4532
4532
|
}
|
|
4533
4533
|
},
|
|
4534
|
-
RFC1738:
|
|
4535
|
-
RFC3986:
|
|
4536
|
-
}, dl = cn,
|
|
4534
|
+
RFC1738: Ft.RFC1738,
|
|
4535
|
+
RFC3986: Ft.RFC3986
|
|
4536
|
+
}, dl = cn, qt = Object.prototype.hasOwnProperty, xe = Array.isArray, le = function() {
|
|
4537
4537
|
for (var e = [], t = 0; t < 256; ++t)
|
|
4538
4538
|
e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
|
|
4539
4539
|
return e;
|
|
4540
4540
|
}(), pl = function(t) {
|
|
4541
4541
|
for (; t.length > 1; ) {
|
|
4542
|
-
var n = t.pop(),
|
|
4543
|
-
if (xe(
|
|
4544
|
-
for (var s = [], i = 0; i <
|
|
4545
|
-
typeof
|
|
4542
|
+
var n = t.pop(), a = n.obj[n.prop];
|
|
4543
|
+
if (xe(a)) {
|
|
4544
|
+
for (var s = [], i = 0; i < a.length; ++i)
|
|
4545
|
+
typeof a[i] < "u" && s.push(a[i]);
|
|
4546
4546
|
n.obj[n.prop] = s;
|
|
4547
4547
|
}
|
|
4548
4548
|
}
|
|
4549
4549
|
}, Fr = function(t, n) {
|
|
4550
|
-
for (var
|
|
4551
|
-
typeof t[s] < "u" && (
|
|
4552
|
-
return
|
|
4553
|
-
}, fl = function e(t, n,
|
|
4550
|
+
for (var a = n && n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = 0; s < t.length; ++s)
|
|
4551
|
+
typeof t[s] < "u" && (a[s] = t[s]);
|
|
4552
|
+
return a;
|
|
4553
|
+
}, fl = function e(t, n, a) {
|
|
4554
4554
|
if (!n)
|
|
4555
4555
|
return t;
|
|
4556
4556
|
if (typeof n != "object") {
|
|
4557
4557
|
if (xe(t))
|
|
4558
4558
|
t.push(n);
|
|
4559
4559
|
else if (t && typeof t == "object")
|
|
4560
|
-
(
|
|
4560
|
+
(a && (a.plainObjects || a.allowPrototypes) || !qt.call(Object.prototype, n)) && (t[n] = !0);
|
|
4561
4561
|
else
|
|
4562
4562
|
return [t, n];
|
|
4563
4563
|
return t;
|
|
@@ -4565,39 +4565,39 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4565
4565
|
if (!t || typeof t != "object")
|
|
4566
4566
|
return [t].concat(n);
|
|
4567
4567
|
var s = t;
|
|
4568
|
-
return xe(t) && !xe(n) && (s = Fr(t,
|
|
4569
|
-
if (
|
|
4570
|
-
var o = t[
|
|
4571
|
-
o && typeof o == "object" && i && typeof i == "object" ? t[
|
|
4568
|
+
return xe(t) && !xe(n) && (s = Fr(t, a)), xe(t) && xe(n) ? (n.forEach(function(i, r) {
|
|
4569
|
+
if (qt.call(t, r)) {
|
|
4570
|
+
var o = t[r];
|
|
4571
|
+
o && typeof o == "object" && i && typeof i == "object" ? t[r] = e(o, i, a) : t.push(i);
|
|
4572
4572
|
} else
|
|
4573
|
-
t[
|
|
4574
|
-
}), t) : Object.keys(n).reduce(function(i,
|
|
4575
|
-
var o = n[
|
|
4576
|
-
return
|
|
4573
|
+
t[r] = i;
|
|
4574
|
+
}), t) : Object.keys(n).reduce(function(i, r) {
|
|
4575
|
+
var o = n[r];
|
|
4576
|
+
return qt.call(i, r) ? i[r] = e(i[r], o, a) : i[r] = o, i;
|
|
4577
4577
|
}, s);
|
|
4578
4578
|
}, ml = function(t, n) {
|
|
4579
|
-
return Object.keys(n).reduce(function(
|
|
4580
|
-
return
|
|
4579
|
+
return Object.keys(n).reduce(function(a, s) {
|
|
4580
|
+
return a[s] = n[s], a;
|
|
4581
4581
|
}, t);
|
|
4582
4582
|
}, hl = function(e, t, n) {
|
|
4583
|
-
var
|
|
4583
|
+
var a = e.replace(/\+/g, " ");
|
|
4584
4584
|
if (n === "iso-8859-1")
|
|
4585
|
-
return
|
|
4585
|
+
return a.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
4586
4586
|
try {
|
|
4587
|
-
return decodeURIComponent(
|
|
4587
|
+
return decodeURIComponent(a);
|
|
4588
4588
|
} catch {
|
|
4589
|
-
return
|
|
4589
|
+
return a;
|
|
4590
4590
|
}
|
|
4591
|
-
},
|
|
4591
|
+
}, It = 1024, yl = function(t, n, a, s, i) {
|
|
4592
4592
|
if (t.length === 0)
|
|
4593
4593
|
return t;
|
|
4594
|
-
var
|
|
4595
|
-
if (typeof t == "symbol" ?
|
|
4596
|
-
return escape(
|
|
4594
|
+
var r = t;
|
|
4595
|
+
if (typeof t == "symbol" ? r = Symbol.prototype.toString.call(t) : typeof t != "string" && (r = String(t)), a === "iso-8859-1")
|
|
4596
|
+
return escape(r).replace(/%u[0-9a-f]{4}/gi, function(m) {
|
|
4597
4597
|
return "%26%23" + parseInt(m.slice(2), 16) + "%3B";
|
|
4598
4598
|
});
|
|
4599
|
-
for (var o = "", l = 0; l <
|
|
4600
|
-
for (var c =
|
|
4599
|
+
for (var o = "", l = 0; l < r.length; l += It) {
|
|
4600
|
+
for (var c = r.length >= It ? r.slice(l, l + It) : r, u = [], f = 0; f < c.length; ++f) {
|
|
4601
4601
|
var d = c.charCodeAt(f);
|
|
4602
4602
|
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || i === dl.RFC1738 && (d === 40 || d === 41)) {
|
|
4603
4603
|
u[u.length] = c.charAt(f);
|
|
@@ -4621,10 +4621,10 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4621
4621
|
}
|
|
4622
4622
|
return o;
|
|
4623
4623
|
}, vl = function(t) {
|
|
4624
|
-
for (var n = [{ obj: { o: t }, prop: "o" }],
|
|
4625
|
-
for (var i = n[s],
|
|
4626
|
-
var c = o[l], u =
|
|
4627
|
-
typeof u == "object" && u !== null &&
|
|
4624
|
+
for (var n = [{ obj: { o: t }, prop: "o" }], a = [], s = 0; s < n.length; ++s)
|
|
4625
|
+
for (var i = n[s], r = i.obj[i.prop], o = Object.keys(r), l = 0; l < o.length; ++l) {
|
|
4626
|
+
var c = o[l], u = r[c];
|
|
4627
|
+
typeof u == "object" && u !== null && a.indexOf(u) === -1 && (n.push({ obj: r, prop: c }), a.push(u));
|
|
4628
4628
|
}
|
|
4629
4629
|
return pl(n), t;
|
|
4630
4630
|
}, gl = function(t) {
|
|
@@ -4635,9 +4635,9 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4635
4635
|
return [].concat(t, n);
|
|
4636
4636
|
}, xl = function(t, n) {
|
|
4637
4637
|
if (xe(t)) {
|
|
4638
|
-
for (var
|
|
4639
|
-
|
|
4640
|
-
return
|
|
4638
|
+
for (var a = [], s = 0; s < t.length; s += 1)
|
|
4639
|
+
a.push(n(t[s]));
|
|
4640
|
+
return a;
|
|
4641
4641
|
}
|
|
4642
4642
|
return n(t);
|
|
4643
4643
|
}, qr = {
|
|
@@ -4651,7 +4651,7 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4651
4651
|
isRegExp: gl,
|
|
4652
4652
|
maybeMap: xl,
|
|
4653
4653
|
merge: fl
|
|
4654
|
-
}, Ir = ll,
|
|
4654
|
+
}, Ir = ll, it = qr, ze = cn, $l = Object.prototype.hasOwnProperty, _r = {
|
|
4655
4655
|
brackets: function(t) {
|
|
4656
4656
|
return t + "[]";
|
|
4657
4657
|
},
|
|
@@ -4662,7 +4662,7 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4662
4662
|
repeat: function(t) {
|
|
4663
4663
|
return t;
|
|
4664
4664
|
}
|
|
4665
|
-
}, ce = Array.isArray, Sl = Array.prototype.push,
|
|
4665
|
+
}, ce = Array.isArray, Sl = Array.prototype.push, Lr = function(e, t) {
|
|
4666
4666
|
Sl.apply(e, ce(t) ? t : [t]);
|
|
4667
4667
|
}, wl = Date.prototype.toISOString, ar = ze.default, z = {
|
|
4668
4668
|
addQueryPrefix: !1,
|
|
@@ -4674,7 +4674,7 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4674
4674
|
delimiter: "&",
|
|
4675
4675
|
encode: !0,
|
|
4676
4676
|
encodeDotInKeys: !1,
|
|
4677
|
-
encoder:
|
|
4677
|
+
encoder: it.encode,
|
|
4678
4678
|
encodeValuesOnly: !1,
|
|
4679
4679
|
format: ar,
|
|
4680
4680
|
formatter: ze.formatters[ar],
|
|
@@ -4687,67 +4687,67 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4687
4687
|
strictNullHandling: !1
|
|
4688
4688
|
}, jl = function(t) {
|
|
4689
4689
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
|
|
4690
|
-
},
|
|
4691
|
-
for (var k = t,
|
|
4692
|
-
var E =
|
|
4690
|
+
}, _t = {}, Nl = function e(t, n, a, s, i, r, o, l, c, u, f, d, m, h, y, g, b, v) {
|
|
4691
|
+
for (var k = t, x = v, S = 0, j = !1; (x = x.get(_t)) !== void 0 && !j; ) {
|
|
4692
|
+
var E = x.get(t);
|
|
4693
4693
|
if (S += 1, typeof E < "u") {
|
|
4694
4694
|
if (E === S)
|
|
4695
4695
|
throw new RangeError("Cyclic object value");
|
|
4696
4696
|
j = !0;
|
|
4697
4697
|
}
|
|
4698
|
-
typeof
|
|
4698
|
+
typeof x.get(_t) > "u" && (S = 0);
|
|
4699
4699
|
}
|
|
4700
|
-
if (typeof u == "function" ? k = u(n, k) : k instanceof Date ? k = m(k) :
|
|
4700
|
+
if (typeof u == "function" ? k = u(n, k) : k instanceof Date ? k = m(k) : a === "comma" && ce(k) && (k = it.maybeMap(k, function(w) {
|
|
4701
4701
|
return w instanceof Date ? m(w) : w;
|
|
4702
4702
|
})), k === null) {
|
|
4703
|
-
if (
|
|
4703
|
+
if (r)
|
|
4704
4704
|
return c && !g ? c(n, z.encoder, b, "key", h) : n;
|
|
4705
4705
|
k = "";
|
|
4706
4706
|
}
|
|
4707
|
-
if (jl(k) ||
|
|
4707
|
+
if (jl(k) || it.isBuffer(k)) {
|
|
4708
4708
|
if (c) {
|
|
4709
|
-
var
|
|
4710
|
-
return [
|
|
4709
|
+
var C = g ? n : c(n, z.encoder, b, "key", h);
|
|
4710
|
+
return [y(C) + "=" + y(c(k, z.encoder, b, "value", h))];
|
|
4711
4711
|
}
|
|
4712
|
-
return [
|
|
4712
|
+
return [y(n) + "=" + y(String(k))];
|
|
4713
4713
|
}
|
|
4714
4714
|
var R = [];
|
|
4715
4715
|
if (typeof k > "u")
|
|
4716
4716
|
return R;
|
|
4717
|
-
var
|
|
4718
|
-
if (
|
|
4719
|
-
g && c && (k =
|
|
4717
|
+
var U;
|
|
4718
|
+
if (a === "comma" && ce(k))
|
|
4719
|
+
g && c && (k = it.maybeMap(k, c)), U = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
|
|
4720
4720
|
else if (ce(u))
|
|
4721
|
-
|
|
4721
|
+
U = u;
|
|
4722
4722
|
else {
|
|
4723
|
-
var
|
|
4724
|
-
|
|
4723
|
+
var $ = Object.keys(k);
|
|
4724
|
+
U = f ? $.sort(f) : $;
|
|
4725
4725
|
}
|
|
4726
4726
|
var I = l ? n.replace(/\./g, "%2E") : n, F = s && ce(k) && k.length === 1 ? I + "[]" : I;
|
|
4727
4727
|
if (i && ce(k) && k.length === 0)
|
|
4728
4728
|
return F + "[]";
|
|
4729
|
-
for (var M = 0; M <
|
|
4730
|
-
var H =
|
|
4729
|
+
for (var M = 0; M < U.length; ++M) {
|
|
4730
|
+
var H = U[M], V = typeof H == "object" && typeof H.value < "u" ? H.value : k[H];
|
|
4731
4731
|
if (!(o && V === null)) {
|
|
4732
|
-
var q = d && l ? H.replace(/\./g, "%2E") : H, he = ce(k) ? typeof
|
|
4733
|
-
|
|
4732
|
+
var q = d && l ? H.replace(/\./g, "%2E") : H, he = ce(k) ? typeof a == "function" ? a(F, q) : F : F + (d ? "." + q : "[" + q + "]");
|
|
4733
|
+
v.set(t, S);
|
|
4734
4734
|
var pe = Ir();
|
|
4735
|
-
pe.set(
|
|
4735
|
+
pe.set(_t, v), Lr(R, e(
|
|
4736
4736
|
V,
|
|
4737
4737
|
he,
|
|
4738
|
-
|
|
4738
|
+
a,
|
|
4739
4739
|
s,
|
|
4740
4740
|
i,
|
|
4741
|
-
|
|
4741
|
+
r,
|
|
4742
4742
|
o,
|
|
4743
4743
|
l,
|
|
4744
|
-
|
|
4744
|
+
a === "comma" && g && ce(k) ? null : c,
|
|
4745
4745
|
u,
|
|
4746
4746
|
f,
|
|
4747
4747
|
d,
|
|
4748
4748
|
m,
|
|
4749
4749
|
h,
|
|
4750
|
-
|
|
4750
|
+
y,
|
|
4751
4751
|
g,
|
|
4752
4752
|
b,
|
|
4753
4753
|
pe
|
|
@@ -4767,23 +4767,23 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4767
4767
|
var n = t.charset || z.charset;
|
|
4768
4768
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
4769
4769
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4770
|
-
var
|
|
4770
|
+
var a = ze.default;
|
|
4771
4771
|
if (typeof t.format < "u") {
|
|
4772
4772
|
if (!$l.call(ze.formatters, t.format))
|
|
4773
4773
|
throw new TypeError("Unknown format option provided.");
|
|
4774
|
-
|
|
4774
|
+
a = t.format;
|
|
4775
4775
|
}
|
|
4776
|
-
var s = ze.formatters[
|
|
4776
|
+
var s = ze.formatters[a], i = z.filter;
|
|
4777
4777
|
(typeof t.filter == "function" || ce(t.filter)) && (i = t.filter);
|
|
4778
|
-
var
|
|
4779
|
-
if (t.arrayFormat in _r ?
|
|
4778
|
+
var r;
|
|
4779
|
+
if (t.arrayFormat in _r ? r = t.arrayFormat : "indices" in t ? r = t.indices ? "indices" : "repeat" : r = z.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
|
|
4780
4780
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4781
4781
|
var o = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 : z.allowDots : !!t.allowDots;
|
|
4782
4782
|
return {
|
|
4783
4783
|
addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : z.addQueryPrefix,
|
|
4784
4784
|
allowDots: o,
|
|
4785
4785
|
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : z.allowEmptyArrays,
|
|
4786
|
-
arrayFormat:
|
|
4786
|
+
arrayFormat: r,
|
|
4787
4787
|
charset: n,
|
|
4788
4788
|
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : z.charsetSentinel,
|
|
4789
4789
|
commaRoundTrip: t.commaRoundTrip,
|
|
@@ -4793,7 +4793,7 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4793
4793
|
encoder: typeof t.encoder == "function" ? t.encoder : z.encoder,
|
|
4794
4794
|
encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : z.encodeValuesOnly,
|
|
4795
4795
|
filter: i,
|
|
4796
|
-
format:
|
|
4796
|
+
format: a,
|
|
4797
4797
|
formatter: s,
|
|
4798
4798
|
serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : z.serializeDate,
|
|
4799
4799
|
skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : z.skipNulls,
|
|
@@ -4801,39 +4801,39 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4801
4801
|
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : z.strictNullHandling
|
|
4802
4802
|
};
|
|
4803
4803
|
}, Ol = function(e, t) {
|
|
4804
|
-
var n = e,
|
|
4805
|
-
typeof
|
|
4806
|
-
var
|
|
4804
|
+
var n = e, a = Tl(t), s, i;
|
|
4805
|
+
typeof a.filter == "function" ? (i = a.filter, n = i("", n)) : ce(a.filter) && (i = a.filter, s = i);
|
|
4806
|
+
var r = [];
|
|
4807
4807
|
if (typeof n != "object" || n === null)
|
|
4808
4808
|
return "";
|
|
4809
|
-
var o = _r[
|
|
4810
|
-
s || (s = Object.keys(n)),
|
|
4809
|
+
var o = _r[a.arrayFormat], l = o === "comma" && a.commaRoundTrip;
|
|
4810
|
+
s || (s = Object.keys(n)), a.sort && s.sort(a.sort);
|
|
4811
4811
|
for (var c = Ir(), u = 0; u < s.length; ++u) {
|
|
4812
4812
|
var f = s[u];
|
|
4813
|
-
|
|
4813
|
+
a.skipNulls && n[f] === null || Lr(r, Nl(
|
|
4814
4814
|
n[f],
|
|
4815
4815
|
f,
|
|
4816
4816
|
o,
|
|
4817
4817
|
l,
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4818
|
+
a.allowEmptyArrays,
|
|
4819
|
+
a.strictNullHandling,
|
|
4820
|
+
a.skipNulls,
|
|
4821
|
+
a.encodeDotInKeys,
|
|
4822
|
+
a.encode ? a.encoder : null,
|
|
4823
|
+
a.filter,
|
|
4824
|
+
a.sort,
|
|
4825
|
+
a.allowDots,
|
|
4826
|
+
a.serializeDate,
|
|
4827
|
+
a.format,
|
|
4828
|
+
a.formatter,
|
|
4829
|
+
a.encodeValuesOnly,
|
|
4830
|
+
a.charset,
|
|
4831
4831
|
c
|
|
4832
4832
|
));
|
|
4833
4833
|
}
|
|
4834
|
-
var d =
|
|
4835
|
-
return
|
|
4836
|
-
}, qe = qr,
|
|
4834
|
+
var d = r.join(a.delimiter), m = a.addQueryPrefix === !0 ? "?" : "";
|
|
4835
|
+
return a.charsetSentinel && (a.charset === "iso-8859-1" ? m += "utf8=%26%2310003%3B&" : m += "utf8=%E2%9C%93&"), d.length > 0 ? m + d : "";
|
|
4836
|
+
}, qe = qr, Gt = Object.prototype.hasOwnProperty, Cl = Array.isArray, L = {
|
|
4837
4837
|
allowDots: !1,
|
|
4838
4838
|
allowEmptyArrays: !1,
|
|
4839
4839
|
allowPrototypes: !1,
|
|
@@ -4858,64 +4858,64 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4858
4858
|
return e.replace(/&#(\d+);/g, function(t, n) {
|
|
4859
4859
|
return String.fromCharCode(parseInt(n, 10));
|
|
4860
4860
|
});
|
|
4861
|
-
},
|
|
4861
|
+
}, Ur = function(e, t) {
|
|
4862
4862
|
return e && typeof e == "string" && t.comma && e.indexOf(",") > -1 ? e.split(",") : e;
|
|
4863
4863
|
}, El = "utf8=%26%2310003%3B", Rl = "utf8=%E2%9C%93", Al = function(t, n) {
|
|
4864
|
-
var
|
|
4864
|
+
var a = { __proto__: null }, s = n.ignoreQueryPrefix ? t.replace(/^\?/, "") : t;
|
|
4865
4865
|
s = s.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
4866
|
-
var i = n.parameterLimit === 1 / 0 ? void 0 : n.parameterLimit,
|
|
4866
|
+
var i = n.parameterLimit === 1 / 0 ? void 0 : n.parameterLimit, r = s.split(n.delimiter, i), o = -1, l, c = n.charset;
|
|
4867
4867
|
if (n.charsetSentinel)
|
|
4868
|
-
for (l = 0; l <
|
|
4869
|
-
|
|
4870
|
-
for (l = 0; l <
|
|
4868
|
+
for (l = 0; l < r.length; ++l)
|
|
4869
|
+
r[l].indexOf("utf8=") === 0 && (r[l] === Rl ? c = "utf-8" : r[l] === El && (c = "iso-8859-1"), o = l, l = r.length);
|
|
4870
|
+
for (l = 0; l < r.length; ++l)
|
|
4871
4871
|
if (l !== o) {
|
|
4872
|
-
var u =
|
|
4873
|
-
d === -1 ? (m = n.decoder(u,
|
|
4874
|
-
|
|
4872
|
+
var u = r[l], f = u.indexOf("]="), d = f === -1 ? u.indexOf("=") : f + 1, m, h;
|
|
4873
|
+
d === -1 ? (m = n.decoder(u, L.decoder, c, "key"), h = n.strictNullHandling ? null : "") : (m = n.decoder(u.slice(0, d), L.decoder, c, "key"), h = qe.maybeMap(
|
|
4874
|
+
Ur(u.slice(d + 1), n),
|
|
4875
4875
|
function(g) {
|
|
4876
|
-
return n.decoder(g,
|
|
4876
|
+
return n.decoder(g, L.decoder, c, "value");
|
|
4877
4877
|
}
|
|
4878
4878
|
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h = Pl(h)), u.indexOf("[]=") > -1 && (h = Cl(h) ? [h] : h);
|
|
4879
|
-
var
|
|
4880
|
-
|
|
4879
|
+
var y = Gt.call(a, m);
|
|
4880
|
+
y && n.duplicates === "combine" ? a[m] = qe.combine(a[m], h) : (!y || n.duplicates === "last") && (a[m] = h);
|
|
4881
4881
|
}
|
|
4882
|
-
return
|
|
4883
|
-
}, Fl = function(e, t, n,
|
|
4884
|
-
for (var s =
|
|
4885
|
-
var
|
|
4882
|
+
return a;
|
|
4883
|
+
}, Fl = function(e, t, n, a) {
|
|
4884
|
+
for (var s = a ? t : Ur(t, n), i = e.length - 1; i >= 0; --i) {
|
|
4885
|
+
var r, o = e[i];
|
|
4886
4886
|
if (o === "[]" && n.parseArrays)
|
|
4887
|
-
|
|
4887
|
+
r = n.allowEmptyArrays && (s === "" || n.strictNullHandling && s === null) ? [] : [].concat(s);
|
|
4888
4888
|
else {
|
|
4889
|
-
|
|
4889
|
+
r = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4890
4890
|
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);
|
|
4891
|
-
!n.parseArrays && c === "" ?
|
|
4891
|
+
!n.parseArrays && c === "" ? r = { 0: s } : !isNaN(u) && o !== c && String(u) === c && u >= 0 && n.parseArrays && u <= n.arrayLimit ? (r = [], r[u] = s) : c !== "__proto__" && (r[c] = s);
|
|
4892
4892
|
}
|
|
4893
|
-
s =
|
|
4893
|
+
s = r;
|
|
4894
4894
|
}
|
|
4895
4895
|
return s;
|
|
4896
|
-
}, ql = function(t, n,
|
|
4896
|
+
}, ql = function(t, n, a, s) {
|
|
4897
4897
|
if (t) {
|
|
4898
|
-
var i =
|
|
4898
|
+
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 = [];
|
|
4899
4899
|
if (c) {
|
|
4900
|
-
if (!
|
|
4900
|
+
if (!a.plainObjects && Gt.call(Object.prototype, c) && !a.allowPrototypes)
|
|
4901
4901
|
return;
|
|
4902
4902
|
u.push(c);
|
|
4903
4903
|
}
|
|
4904
|
-
for (var f = 0;
|
|
4905
|
-
if (f += 1, !
|
|
4904
|
+
for (var f = 0; a.depth > 0 && (l = o.exec(i)) !== null && f < a.depth; ) {
|
|
4905
|
+
if (f += 1, !a.plainObjects && Gt.call(Object.prototype, l[1].slice(1, -1)) && !a.allowPrototypes)
|
|
4906
4906
|
return;
|
|
4907
4907
|
u.push(l[1]);
|
|
4908
4908
|
}
|
|
4909
4909
|
if (l) {
|
|
4910
|
-
if (
|
|
4911
|
-
throw new RangeError("Input depth exceeded depth option of " +
|
|
4910
|
+
if (a.strictDepth === !0)
|
|
4911
|
+
throw new RangeError("Input depth exceeded depth option of " + a.depth + " and strictDepth is true");
|
|
4912
4912
|
u.push("[" + i.slice(l.index) + "]");
|
|
4913
4913
|
}
|
|
4914
|
-
return Fl(u, n,
|
|
4914
|
+
return Fl(u, n, a, s);
|
|
4915
4915
|
}
|
|
4916
4916
|
}, Il = function(t) {
|
|
4917
4917
|
if (!t)
|
|
4918
|
-
return
|
|
4918
|
+
return L;
|
|
4919
4919
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
4920
4920
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4921
4921
|
if (typeof t.decodeDotInKeys < "u" && typeof t.decodeDotInKeys != "boolean")
|
|
@@ -4924,46 +4924,46 @@ var Ar = Ie, _e = xs, Ys = Rs, Xs = Ge, Xe = Ar("%WeakMap%", !0), Ze = Ar("%Map%
|
|
|
4924
4924
|
throw new TypeError("Decoder has to be a function.");
|
|
4925
4925
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
4926
4926
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4927
|
-
var n = typeof t.charset > "u" ?
|
|
4928
|
-
if (
|
|
4927
|
+
var n = typeof t.charset > "u" ? L.charset : t.charset, a = typeof t.duplicates > "u" ? L.duplicates : t.duplicates;
|
|
4928
|
+
if (a !== "combine" && a !== "first" && a !== "last")
|
|
4929
4929
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
4930
|
-
var s = typeof t.allowDots > "u" ? t.decodeDotInKeys === !0 ? !0 :
|
|
4930
|
+
var s = typeof t.allowDots > "u" ? t.decodeDotInKeys === !0 ? !0 : L.allowDots : !!t.allowDots;
|
|
4931
4931
|
return {
|
|
4932
4932
|
allowDots: s,
|
|
4933
|
-
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays :
|
|
4934
|
-
allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes :
|
|
4935
|
-
allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse :
|
|
4936
|
-
arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit :
|
|
4933
|
+
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : L.allowEmptyArrays,
|
|
4934
|
+
allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes : L.allowPrototypes,
|
|
4935
|
+
allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse : L.allowSparse,
|
|
4936
|
+
arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit : L.arrayLimit,
|
|
4937
4937
|
charset: n,
|
|
4938
|
-
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel :
|
|
4939
|
-
comma: typeof t.comma == "boolean" ? t.comma :
|
|
4940
|
-
decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys :
|
|
4941
|
-
decoder: typeof t.decoder == "function" ? t.decoder :
|
|
4942
|
-
delimiter: typeof t.delimiter == "string" || qe.isRegExp(t.delimiter) ? t.delimiter :
|
|
4938
|
+
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : L.charsetSentinel,
|
|
4939
|
+
comma: typeof t.comma == "boolean" ? t.comma : L.comma,
|
|
4940
|
+
decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys : L.decodeDotInKeys,
|
|
4941
|
+
decoder: typeof t.decoder == "function" ? t.decoder : L.decoder,
|
|
4942
|
+
delimiter: typeof t.delimiter == "string" || qe.isRegExp(t.delimiter) ? t.delimiter : L.delimiter,
|
|
4943
4943
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
4944
|
-
depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth :
|
|
4945
|
-
duplicates:
|
|
4944
|
+
depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth : L.depth,
|
|
4945
|
+
duplicates: a,
|
|
4946
4946
|
ignoreQueryPrefix: t.ignoreQueryPrefix === !0,
|
|
4947
|
-
interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities :
|
|
4948
|
-
parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit :
|
|
4947
|
+
interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities : L.interpretNumericEntities,
|
|
4948
|
+
parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit : L.parameterLimit,
|
|
4949
4949
|
parseArrays: t.parseArrays !== !1,
|
|
4950
|
-
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects :
|
|
4951
|
-
strictDepth: typeof t.strictDepth == "boolean" ? !!t.strictDepth :
|
|
4952
|
-
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling :
|
|
4950
|
+
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : L.plainObjects,
|
|
4951
|
+
strictDepth: typeof t.strictDepth == "boolean" ? !!t.strictDepth : L.strictDepth,
|
|
4952
|
+
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : L.strictNullHandling
|
|
4953
4953
|
};
|
|
4954
4954
|
}, _l = function(e, t) {
|
|
4955
4955
|
var n = Il(t);
|
|
4956
4956
|
if (e === "" || e === null || typeof e > "u")
|
|
4957
4957
|
return n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4958
|
-
for (var
|
|
4959
|
-
var o = i[
|
|
4958
|
+
for (var a = typeof e == "string" ? Al(e, n) : e, s = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, i = Object.keys(a), r = 0; r < i.length; ++r) {
|
|
4959
|
+
var o = i[r], l = ql(o, a[o], n, typeof e == "string");
|
|
4960
4960
|
s = qe.merge(s, l, n);
|
|
4961
4961
|
}
|
|
4962
4962
|
return n.allowSparse === !0 ? s : qe.compact(s);
|
|
4963
|
-
},
|
|
4963
|
+
}, Ll = Ol, Ul = _l, Hl = cn, ot = {
|
|
4964
4964
|
formats: Hl,
|
|
4965
|
-
parse:
|
|
4966
|
-
stringify:
|
|
4965
|
+
parse: Ul,
|
|
4966
|
+
stringify: Ll
|
|
4967
4967
|
}, Bl = jo;
|
|
4968
4968
|
function oe() {
|
|
4969
4969
|
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;
|
|
@@ -4985,20 +4985,20 @@ var Ml = /^([a-z0-9.+-]+:)/i, Vl = /:[0-9]*$/, zl = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
4985
4985
|
"\\",
|
|
4986
4986
|
"^",
|
|
4987
4987
|
"`"
|
|
4988
|
-
].concat(Jl),
|
|
4988
|
+
].concat(Jl), Qt = ["'"].concat(Wl), ir = [
|
|
4989
4989
|
"%",
|
|
4990
4990
|
"/",
|
|
4991
4991
|
"?",
|
|
4992
4992
|
";",
|
|
4993
4993
|
"#"
|
|
4994
|
-
].concat(
|
|
4994
|
+
].concat(Qt), or = [
|
|
4995
4995
|
"/",
|
|
4996
4996
|
"?",
|
|
4997
4997
|
"#"
|
|
4998
4998
|
], Dl = 255, sr = /^[+a-z0-9A-Z_-]{0,63}$/, Gl = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Ql = {
|
|
4999
4999
|
javascript: !0,
|
|
5000
5000
|
"javascript:": !0
|
|
5001
|
-
},
|
|
5001
|
+
}, Kt = {
|
|
5002
5002
|
javascript: !0,
|
|
5003
5003
|
"javascript:": !0
|
|
5004
5004
|
}, Ee = {
|
|
@@ -5012,23 +5012,23 @@ var Ml = /^([a-z0-9.+-]+:)/i, Vl = /:[0-9]*$/, zl = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5012
5012
|
"ftp:": !0,
|
|
5013
5013
|
"gopher:": !0,
|
|
5014
5014
|
"file:": !0
|
|
5015
|
-
},
|
|
5015
|
+
}, Yt = ot;
|
|
5016
5016
|
function un(e, t, n) {
|
|
5017
5017
|
if (e && typeof e == "object" && e instanceof oe)
|
|
5018
5018
|
return e;
|
|
5019
|
-
var
|
|
5020
|
-
return
|
|
5019
|
+
var a = new oe();
|
|
5020
|
+
return a.parse(e, t, n), a;
|
|
5021
5021
|
}
|
|
5022
5022
|
oe.prototype.parse = function(e, t, n) {
|
|
5023
5023
|
if (typeof e != "string")
|
|
5024
5024
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
|
|
5025
|
-
var
|
|
5026
|
-
i[0] = i[0].replace(
|
|
5025
|
+
var a = e.indexOf("?"), s = a !== -1 && a < e.indexOf("#") ? "?" : "#", i = e.split(s), r = /\\/g;
|
|
5026
|
+
i[0] = i[0].replace(r, "/"), e = i.join(s);
|
|
5027
5027
|
var o = e;
|
|
5028
5028
|
if (o = o.trim(), !n && e.split("#").length === 1) {
|
|
5029
5029
|
var l = zl.exec(o);
|
|
5030
5030
|
if (l)
|
|
5031
|
-
return this.path = o, this.href = o, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query =
|
|
5031
|
+
return this.path = o, this.href = o, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query = Yt.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : t && (this.search = "", this.query = {}), this;
|
|
5032
5032
|
}
|
|
5033
5033
|
var c = Ml.exec(o);
|
|
5034
5034
|
if (c) {
|
|
@@ -5038,15 +5038,15 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5038
5038
|
}
|
|
5039
5039
|
if (n || c || o.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
5040
5040
|
var f = o.substr(0, 2) === "//";
|
|
5041
|
-
f && !(c &&
|
|
5041
|
+
f && !(c && Kt[c]) && (o = o.substr(2), this.slashes = !0);
|
|
5042
5042
|
}
|
|
5043
|
-
if (!
|
|
5043
|
+
if (!Kt[c] && (f || c && !Ee[c])) {
|
|
5044
5044
|
for (var d = -1, m = 0; m < or.length; m++) {
|
|
5045
5045
|
var h = o.indexOf(or[m]);
|
|
5046
5046
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5047
5047
|
}
|
|
5048
|
-
var
|
|
5049
|
-
d === -1 ? g = o.lastIndexOf("@") : g = o.lastIndexOf("@", d), g !== -1 && (
|
|
5048
|
+
var y, g;
|
|
5049
|
+
d === -1 ? g = o.lastIndexOf("@") : g = o.lastIndexOf("@", d), g !== -1 && (y = o.slice(0, g), o = o.slice(g + 1), this.auth = decodeURIComponent(y)), d = -1;
|
|
5050
5050
|
for (var m = 0; m < ir.length; m++) {
|
|
5051
5051
|
var h = o.indexOf(ir[m]);
|
|
5052
5052
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
@@ -5054,25 +5054,25 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5054
5054
|
d === -1 && (d = o.length), this.host = o.slice(0, d), o = o.slice(d), this.parseHost(), this.hostname = this.hostname || "";
|
|
5055
5055
|
var b = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
5056
5056
|
if (!b)
|
|
5057
|
-
for (var
|
|
5058
|
-
var
|
|
5059
|
-
if (
|
|
5060
|
-
for (var S = "", j = 0, E =
|
|
5061
|
-
|
|
5057
|
+
for (var v = this.hostname.split(/\./), m = 0, k = v.length; m < k; m++) {
|
|
5058
|
+
var x = v[m];
|
|
5059
|
+
if (x && !x.match(sr)) {
|
|
5060
|
+
for (var S = "", j = 0, E = x.length; j < E; j++)
|
|
5061
|
+
x.charCodeAt(j) > 127 ? S += "x" : S += x[j];
|
|
5062
5062
|
if (!S.match(sr)) {
|
|
5063
|
-
var
|
|
5064
|
-
|
|
5063
|
+
var C = v.slice(0, m), R = v.slice(m + 1), U = x.match(Gl);
|
|
5064
|
+
U && (C.push(U[1]), R.unshift(U[2])), R.length && (o = "/" + R.join(".") + o), this.hostname = C.join(".");
|
|
5065
5065
|
break;
|
|
5066
5066
|
}
|
|
5067
5067
|
}
|
|
5068
5068
|
}
|
|
5069
5069
|
this.hostname.length > Dl ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), b || (this.hostname = Bl.toASCII(this.hostname));
|
|
5070
|
-
var
|
|
5071
|
-
this.host = I +
|
|
5070
|
+
var $ = this.port ? ":" + this.port : "", I = this.hostname || "";
|
|
5071
|
+
this.host = I + $, this.href += this.host, b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), o[0] !== "/" && (o = "/" + o));
|
|
5072
5072
|
}
|
|
5073
5073
|
if (!Ql[u])
|
|
5074
|
-
for (var m = 0, k =
|
|
5075
|
-
var F =
|
|
5074
|
+
for (var m = 0, k = Qt.length; m < k; m++) {
|
|
5075
|
+
var F = Qt[m];
|
|
5076
5076
|
if (o.indexOf(F) !== -1) {
|
|
5077
5077
|
var M = encodeURIComponent(F);
|
|
5078
5078
|
M === F && (M = escape(F)), o = o.split(F).join(M);
|
|
@@ -5081,9 +5081,9 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5081
5081
|
var H = o.indexOf("#");
|
|
5082
5082
|
H !== -1 && (this.hash = o.substr(H), o = o.slice(0, H));
|
|
5083
5083
|
var V = o.indexOf("?");
|
|
5084
|
-
if (V !== -1 ? (this.search = o.substr(V), this.query = o.substr(V + 1), t && (this.query =
|
|
5085
|
-
var
|
|
5086
|
-
this.path =
|
|
5084
|
+
if (V !== -1 ? (this.search = o.substr(V), this.query = o.substr(V + 1), t && (this.query = Yt.parse(this.query)), o = o.slice(0, V)) : t && (this.search = "", this.query = {}), o && (this.pathname = o), Ee[u] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
5085
|
+
var $ = this.pathname || "", q = this.search || "";
|
|
5086
|
+
this.path = $ + q;
|
|
5087
5087
|
}
|
|
5088
5088
|
return this.href = this.format(), this;
|
|
5089
5089
|
};
|
|
@@ -5093,15 +5093,15 @@ function Kl(e) {
|
|
|
5093
5093
|
oe.prototype.format = function() {
|
|
5094
5094
|
var e = this.auth || "";
|
|
5095
5095
|
e && (e = encodeURIComponent(e), e = e.replace(/%3A/i, ":"), e += "@");
|
|
5096
|
-
var t = this.protocol || "", n = this.pathname || "",
|
|
5097
|
-
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 =
|
|
5096
|
+
var t = this.protocol || "", n = this.pathname || "", a = this.hash || "", s = !1, i = "";
|
|
5097
|
+
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 = Yt.stringify(this.query, {
|
|
5098
5098
|
arrayFormat: "repeat",
|
|
5099
5099
|
addQueryPrefix: !1
|
|
5100
5100
|
}));
|
|
5101
|
-
var
|
|
5102
|
-
return t && t.substr(-1) !== ":" && (t += ":"), this.slashes || (!t || Ee[t]) && s !== !1 ? (s = "//" + (s || ""), n && n.charAt(0) !== "/" && (n = "/" + n)) : s || (s = ""),
|
|
5101
|
+
var r = this.search || i && "?" + i || "";
|
|
5102
|
+
return t && t.substr(-1) !== ":" && (t += ":"), this.slashes || (!t || Ee[t]) && s !== !1 ? (s = "//" + (s || ""), n && n.charAt(0) !== "/" && (n = "/" + n)) : s || (s = ""), a && a.charAt(0) !== "#" && (a = "#" + a), r && r.charAt(0) !== "?" && (r = "?" + r), n = n.replace(/[?#]/g, function(o) {
|
|
5103
5103
|
return encodeURIComponent(o);
|
|
5104
|
-
}),
|
|
5104
|
+
}), r = r.replace("#", "%23"), t + s + n + r + a;
|
|
5105
5105
|
};
|
|
5106
5106
|
oe.prototype.resolve = function(e) {
|
|
5107
5107
|
return this.resolveObject(un(e, !1, !0)).format();
|
|
@@ -5111,15 +5111,15 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5111
5111
|
var t = new oe();
|
|
5112
5112
|
t.parse(e, !1, !0), e = t;
|
|
5113
5113
|
}
|
|
5114
|
-
for (var n = new oe(),
|
|
5115
|
-
var i =
|
|
5114
|
+
for (var n = new oe(), a = Object.keys(this), s = 0; s < a.length; s++) {
|
|
5115
|
+
var i = a[s];
|
|
5116
5116
|
n[i] = this[i];
|
|
5117
5117
|
}
|
|
5118
5118
|
if (n.hash = e.hash, e.href === "")
|
|
5119
5119
|
return n.href = n.format(), n;
|
|
5120
5120
|
if (e.slashes && !e.protocol) {
|
|
5121
|
-
for (var
|
|
5122
|
-
var l =
|
|
5121
|
+
for (var r = Object.keys(e), o = 0; o < r.length; o++) {
|
|
5122
|
+
var l = r[o];
|
|
5123
5123
|
l !== "protocol" && (n[l] = e[l]);
|
|
5124
5124
|
}
|
|
5125
5125
|
return Ee[n.protocol] && n.hostname && !n.pathname && (n.pathname = "/", n.path = n.pathname), n.href = n.format(), n;
|
|
@@ -5132,7 +5132,7 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5132
5132
|
}
|
|
5133
5133
|
return n.href = n.format(), n;
|
|
5134
5134
|
}
|
|
5135
|
-
if (n.protocol = e.protocol, !e.host && !
|
|
5135
|
+
if (n.protocol = e.protocol, !e.host && !Kt[e.protocol]) {
|
|
5136
5136
|
for (var k = (e.pathname || "").split("/"); k.length && !(e.host = k.shift()); )
|
|
5137
5137
|
;
|
|
5138
5138
|
e.host || (e.host = ""), e.hostname || (e.hostname = ""), k[0] !== "" && k.unshift(""), k.length < 2 && k.unshift(""), n.pathname = k.join("/");
|
|
@@ -5144,34 +5144,34 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5144
5144
|
}
|
|
5145
5145
|
return n.slashes = n.slashes || e.slashes, n.href = n.format(), n;
|
|
5146
5146
|
}
|
|
5147
|
-
var h = n.pathname && n.pathname.charAt(0) === "/",
|
|
5148
|
-
if (
|
|
5149
|
-
n.host = e.host || e.host === "" ? e.host : n.host, n.hostname = e.hostname || e.hostname === "" ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
|
|
5147
|
+
var h = n.pathname && n.pathname.charAt(0) === "/", y = e.host || e.pathname && e.pathname.charAt(0) === "/", g = y || h || n.host && e.pathname, b = g, v = n.pathname && n.pathname.split("/") || [], k = e.pathname && e.pathname.split("/") || [], x = n.protocol && !Ee[n.protocol];
|
|
5148
|
+
if (x && (n.hostname = "", n.port = null, n.host && (v[0] === "" ? v[0] = n.host : v.unshift(n.host)), n.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && (k[0] === "" ? k[0] = e.host : k.unshift(e.host)), e.host = null), g = g && (k[0] === "" || v[0] === "")), y)
|
|
5149
|
+
n.host = e.host || e.host === "" ? e.host : n.host, n.hostname = e.hostname || e.hostname === "" ? e.hostname : n.hostname, n.search = e.search, n.query = e.query, v = k;
|
|
5150
5150
|
else if (k.length)
|
|
5151
|
-
|
|
5151
|
+
v || (v = []), v.pop(), v = v.concat(k), n.search = e.search, n.query = e.query;
|
|
5152
5152
|
else if (e.search != null) {
|
|
5153
|
-
if (
|
|
5154
|
-
n.host =
|
|
5153
|
+
if (x) {
|
|
5154
|
+
n.host = v.shift(), n.hostname = n.host;
|
|
5155
5155
|
var S = n.host && n.host.indexOf("@") > 0 ? n.host.split("@") : !1;
|
|
5156
5156
|
S && (n.auth = S.shift(), n.hostname = S.shift(), n.host = n.hostname);
|
|
5157
5157
|
}
|
|
5158
5158
|
return n.search = e.search, n.query = e.query, (n.pathname !== null || n.search !== null) && (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.href = n.format(), n;
|
|
5159
5159
|
}
|
|
5160
|
-
if (!
|
|
5160
|
+
if (!v.length)
|
|
5161
5161
|
return n.pathname = null, n.search ? n.path = "/" + n.search : n.path = null, n.href = n.format(), n;
|
|
5162
|
-
for (var j =
|
|
5163
|
-
j =
|
|
5162
|
+
for (var j = v.slice(-1)[0], E = (n.host || e.host || v.length > 1) && (j === "." || j === "..") || j === "", C = 0, R = v.length; R >= 0; R--)
|
|
5163
|
+
j = v[R], j === "." ? v.splice(R, 1) : j === ".." ? (v.splice(R, 1), C++) : C && (v.splice(R, 1), C--);
|
|
5164
5164
|
if (!g && !b)
|
|
5165
|
-
for (;
|
|
5166
|
-
|
|
5167
|
-
g &&
|
|
5168
|
-
var
|
|
5169
|
-
if (
|
|
5170
|
-
n.hostname =
|
|
5165
|
+
for (; C--; C)
|
|
5166
|
+
v.unshift("..");
|
|
5167
|
+
g && v[0] !== "" && (!v[0] || v[0].charAt(0) !== "/") && v.unshift(""), E && v.join("/").substr(-1) !== "/" && v.push("");
|
|
5168
|
+
var U = v[0] === "" || v[0] && v[0].charAt(0) === "/";
|
|
5169
|
+
if (x) {
|
|
5170
|
+
n.hostname = U ? "" : v.length ? v.shift() : "", n.host = n.hostname;
|
|
5171
5171
|
var S = n.host && n.host.indexOf("@") > 0 ? n.host.split("@") : !1;
|
|
5172
5172
|
S && (n.auth = S.shift(), n.hostname = S.shift(), n.host = n.hostname);
|
|
5173
5173
|
}
|
|
5174
|
-
return g = g || n.host &&
|
|
5174
|
+
return g = g || n.host && v.length, g && !U && v.unshift(""), v.length > 0 ? n.pathname = v.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;
|
|
5175
5175
|
};
|
|
5176
5176
|
oe.prototype.parseHost = function() {
|
|
5177
5177
|
var e = this.host, t = Vl.exec(e);
|
|
@@ -5219,8 +5219,8 @@ var Yl = un, lr = Kl, Xl = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5219
5219
|
};
|
|
5220
5220
|
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(jn, {})), n.headers && n.headers.length) {
|
|
5221
5221
|
const m = /^HTTP\/2/;
|
|
5222
|
-
n.headersObj = n.headers.reduce((h, { name:
|
|
5223
|
-
const b = m.exec(n.httpVersion) ?
|
|
5222
|
+
n.headersObj = n.headers.reduce((h, { name: y, value: g }) => {
|
|
5223
|
+
const b = m.exec(n.httpVersion) ? y.toLocaleLowerCase() : y;
|
|
5224
5224
|
return {
|
|
5225
5225
|
...h,
|
|
5226
5226
|
[b]: g
|
|
@@ -5228,34 +5228,34 @@ var Yl = un, lr = Kl, Xl = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5228
5228
|
}, {});
|
|
5229
5229
|
}
|
|
5230
5230
|
n.cookies && n.cookies.length && (n.cookiesObj = n.cookies.reduceRight(
|
|
5231
|
-
(m, { name: h, value:
|
|
5231
|
+
(m, { name: h, value: y }) => ({
|
|
5232
5232
|
...m,
|
|
5233
|
-
[h]:
|
|
5233
|
+
[h]: y
|
|
5234
5234
|
}),
|
|
5235
5235
|
{}
|
|
5236
5236
|
));
|
|
5237
|
-
const
|
|
5238
|
-
switch (
|
|
5237
|
+
const a = (u = n.cookies) == null ? void 0 : u.map(({ name: m, value: h }) => t.harIsAlreadyEncoded ? `${m}=${h}` : `${encodeURIComponent(m)}=${encodeURIComponent(h)}`);
|
|
5238
|
+
switch (a != null && a.length && (n.allHeaders.cookie = a.join("; ")), n.postData.mimeType) {
|
|
5239
5239
|
case "multipart/mixed":
|
|
5240
5240
|
case "multipart/related":
|
|
5241
5241
|
case "multipart/form-data":
|
|
5242
5242
|
case "multipart/alternative":
|
|
5243
5243
|
if (n.postData.text = "", n.postData.mimeType = "multipart/form-data", (f = n.postData) != null && f.params) {
|
|
5244
|
-
const m = "---011000010111000001101001", h = `${m}--`,
|
|
5245
|
-
`, g = (
|
|
5246
|
-
`),
|
|
5247
|
-
(d = n.postData) == null || d.params.forEach((
|
|
5248
|
-
const j =
|
|
5249
|
-
|
|
5250
|
-
`Content-Disposition: form-data; name="${g(b(j))}"; filename="${
|
|
5251
|
-
),
|
|
5252
|
-
}),
|
|
5244
|
+
const m = "---011000010111000001101001", h = `${m}--`, y = `\r
|
|
5245
|
+
`, g = (x) => x.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), b = (x) => x.replace(/\r?\n|\r/g, `\r
|
|
5246
|
+
`), v = [`--${m}`];
|
|
5247
|
+
(d = n.postData) == null || d.params.forEach((x, S) => {
|
|
5248
|
+
const j = x.name, E = x.value || "", C = x.fileName || null, R = x.contentType || "application/octet-stream";
|
|
5249
|
+
C ? (v.push(
|
|
5250
|
+
`Content-Disposition: form-data; name="${g(b(j))}"; filename="${C}"`
|
|
5251
|
+
), v.push(`Content-Type: ${R}`)) : v.push(`Content-Disposition: form-data; name="${g(b(j))}"`), v.push(""), v.push(b(E)), S !== n.postData.params.length - 1 && v.push(`--${m}`);
|
|
5252
|
+
}), v.push(`--${h}`), n.postData.boundary = m, n.postData.text = v.join(y);
|
|
5253
5253
|
const k = Y(n.headersObj, "content-type") || "content-type";
|
|
5254
5254
|
n.headersObj[k] = `multipart/form-data; boundary=${m}`;
|
|
5255
5255
|
}
|
|
5256
5256
|
break;
|
|
5257
5257
|
case "application/x-www-form-urlencoded":
|
|
5258
|
-
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(jn, {}), n.postData.text =
|
|
5258
|
+
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(jn, {}), n.postData.text = ot.stringify(n.postData.paramsObj)) : n.postData.text = "";
|
|
5259
5259
|
break;
|
|
5260
5260
|
case "text/json":
|
|
5261
5261
|
case "text/x-json":
|
|
@@ -5277,18 +5277,18 @@ var Yl = un, lr = Kl, Xl = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5277
5277
|
...n.queryObj,
|
|
5278
5278
|
...i.query
|
|
5279
5279
|
};
|
|
5280
|
-
let
|
|
5281
|
-
t.harIsAlreadyEncoded ?
|
|
5280
|
+
let r;
|
|
5281
|
+
t.harIsAlreadyEncoded ? r = ot.stringify(n.queryObj, {
|
|
5282
5282
|
encode: !1,
|
|
5283
5283
|
indices: !1
|
|
5284
|
-
}) :
|
|
5284
|
+
}) : r = ot.stringify(n.queryObj, {
|
|
5285
5285
|
indices: !1
|
|
5286
5286
|
});
|
|
5287
5287
|
const o = {
|
|
5288
5288
|
...i,
|
|
5289
5289
|
query: n.queryObj,
|
|
5290
|
-
search:
|
|
5291
|
-
path:
|
|
5290
|
+
search: r,
|
|
5291
|
+
path: r ? `${i.pathname}?${r}` : i.pathname
|
|
5292
5292
|
}, l = lr({
|
|
5293
5293
|
...i,
|
|
5294
5294
|
query: null,
|
|
@@ -5307,19 +5307,34 @@ var Yl = un, lr = Kl, Xl = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5307
5307
|
}
|
|
5308
5308
|
convert(e, t, n) {
|
|
5309
5309
|
this.initCalled || this.init(), !n && t && (n = t);
|
|
5310
|
-
const
|
|
5311
|
-
if (!
|
|
5310
|
+
const a = wo[e];
|
|
5311
|
+
if (!a)
|
|
5312
5312
|
return !1;
|
|
5313
|
-
const { convert: s } =
|
|
5314
|
-
return this.requests.map((
|
|
5313
|
+
const { convert: s } = a.clientsById[t || a.info.default];
|
|
5314
|
+
return this.requests.map((r) => s(r, n));
|
|
5315
5315
|
}
|
|
5316
5316
|
};
|
|
5317
|
-
const ec =
|
|
5317
|
+
const ec = ({
|
|
5318
|
+
rootMargin: e = "0px",
|
|
5319
|
+
threshold: t
|
|
5320
|
+
} = {}) => {
|
|
5321
|
+
const [n, a] = Je(!1), s = mt(null);
|
|
5322
|
+
return ht(() => {
|
|
5323
|
+
const i = new IntersectionObserver(
|
|
5324
|
+
([o]) => {
|
|
5325
|
+
o && a(o.isIntersecting);
|
|
5326
|
+
},
|
|
5327
|
+
{ rootMargin: e, threshold: t }
|
|
5328
|
+
), r = s.current;
|
|
5329
|
+
if (r)
|
|
5330
|
+
return i.observe(r), () => i.unobserve(r);
|
|
5331
|
+
}, [e, t]), [s, n];
|
|
5332
|
+
}, tc = Zt.Root, cr = Zt.CollapsibleTrigger, nc = Zt.CollapsibleContent, rc = typeof window < "u" ? ra : ht, dn = ({
|
|
5318
5333
|
children: e,
|
|
5319
5334
|
maxHeight: t = 250
|
|
5320
5335
|
}) => {
|
|
5321
|
-
const n =
|
|
5322
|
-
return
|
|
5336
|
+
const n = mt(null), [a, s] = Je(!1), [i, r] = Je(!1);
|
|
5337
|
+
return rc(() => {
|
|
5323
5338
|
const o = n.current;
|
|
5324
5339
|
if (!o) return;
|
|
5325
5340
|
s(o.scrollHeight > t);
|
|
@@ -5328,25 +5343,25 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5328
5343
|
});
|
|
5329
5344
|
return l.observe(o), () => l.disconnect();
|
|
5330
5345
|
}, [t]), /* @__PURE__ */ p.jsxs(
|
|
5331
|
-
|
|
5346
|
+
tc,
|
|
5332
5347
|
{
|
|
5333
5348
|
className: "group",
|
|
5334
5349
|
open: i,
|
|
5335
|
-
onOpenChange:
|
|
5350
|
+
onOpenChange: r,
|
|
5336
5351
|
style: { "--max-height": `${t}px` },
|
|
5337
5352
|
children: [
|
|
5338
5353
|
/* @__PURE__ */ p.jsxs(
|
|
5339
|
-
|
|
5354
|
+
nc,
|
|
5340
5355
|
{
|
|
5341
5356
|
forceMount: !0,
|
|
5342
5357
|
className: ee(
|
|
5343
5358
|
"relative overflow-hidden",
|
|
5344
|
-
!i &&
|
|
5359
|
+
!i && a && "max-h-[--max-height]"
|
|
5345
5360
|
),
|
|
5346
5361
|
children: [
|
|
5347
|
-
!i &&
|
|
5362
|
+
!i && a && /* @__PURE__ */ p.jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10" }),
|
|
5348
5363
|
/* @__PURE__ */ p.jsx("div", { ref: n, children: e }),
|
|
5349
|
-
!i &&
|
|
5364
|
+
!i && a && /* @__PURE__ */ p.jsx(
|
|
5350
5365
|
cr,
|
|
5351
5366
|
{
|
|
5352
5367
|
className: "absolute inset-0 grid place-items-center z-10",
|
|
@@ -5357,7 +5372,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5357
5372
|
]
|
|
5358
5373
|
}
|
|
5359
5374
|
),
|
|
5360
|
-
|
|
5375
|
+
a && /* @__PURE__ */ p.jsx(
|
|
5361
5376
|
"div",
|
|
5362
5377
|
{
|
|
5363
5378
|
className: ee("flex justify-center w-full mb-2", !i && "hidden"),
|
|
@@ -5369,18 +5384,18 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5369
5384
|
);
|
|
5370
5385
|
}, Hr = aa(
|
|
5371
5386
|
void 0
|
|
5372
|
-
),
|
|
5387
|
+
), Vc = Hr.Provider, ac = () => {
|
|
5373
5388
|
const e = ia(Hr);
|
|
5374
5389
|
if (!e)
|
|
5375
5390
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
5376
5391
|
return e.config;
|
|
5377
|
-
},
|
|
5392
|
+
}, ic = ({
|
|
5378
5393
|
server: e,
|
|
5379
5394
|
servers: t,
|
|
5380
5395
|
operation: n
|
|
5381
5396
|
}) => {
|
|
5382
|
-
var
|
|
5383
|
-
const
|
|
5397
|
+
var r, o, l;
|
|
5398
|
+
const a = (r = n.parameters) == null ? void 0 : r.filter((c) => c.in === "header").map((c) => {
|
|
5384
5399
|
var u, f;
|
|
5385
5400
|
return {
|
|
5386
5401
|
name: c.name,
|
|
@@ -5398,7 +5413,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5398
5413
|
servers: t,
|
|
5399
5414
|
method: n.method,
|
|
5400
5415
|
url: n.path,
|
|
5401
|
-
headers:
|
|
5416
|
+
headers: a,
|
|
5402
5417
|
queryParams: s,
|
|
5403
5418
|
pathParams: i
|
|
5404
5419
|
}
|
|
@@ -5446,8 +5461,8 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5446
5461
|
if (e.properties || e.type === "object") {
|
|
5447
5462
|
const n = {};
|
|
5448
5463
|
if (e.properties)
|
|
5449
|
-
for (const [
|
|
5450
|
-
n[
|
|
5464
|
+
for (const [a, s] of Object.entries(e.properties))
|
|
5465
|
+
n[a] = Re(s, a);
|
|
5451
5466
|
return n;
|
|
5452
5467
|
}
|
|
5453
5468
|
if (e.type === "array")
|
|
@@ -5470,14 +5485,14 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5470
5485
|
default:
|
|
5471
5486
|
return {};
|
|
5472
5487
|
}
|
|
5473
|
-
},
|
|
5474
|
-
var
|
|
5488
|
+
}, oc = ({ content: e }) => {
|
|
5489
|
+
var a, s;
|
|
5475
5490
|
if (!e.length) return null;
|
|
5476
|
-
const t = e.at(0), n = ((s = (
|
|
5491
|
+
const t = e.at(0), n = ((s = (a = t == null ? void 0 : t.examples) == null ? void 0 : a.at(0)) == null ? void 0 : s.value) ?? (t != null && t.schema ? Re(t.schema) : "");
|
|
5477
5492
|
return /* @__PURE__ */ p.jsx(p.Fragment, { children: /* @__PURE__ */ p.jsxs(pn, { children: [
|
|
5478
5493
|
/* @__PURE__ */ p.jsx(fn, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ p.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
5479
5494
|
/* @__PURE__ */ p.jsx(mn, { className: "p-0", children: /* @__PURE__ */ p.jsx(dn, { children: /* @__PURE__ */ p.jsx(
|
|
5480
|
-
|
|
5495
|
+
Ge,
|
|
5481
5496
|
{
|
|
5482
5497
|
language: n ? "json" : "plain",
|
|
5483
5498
|
noBackground: !0,
|
|
@@ -5487,23 +5502,23 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5487
5502
|
}
|
|
5488
5503
|
) }) })
|
|
5489
5504
|
] }) });
|
|
5490
|
-
},
|
|
5505
|
+
}, sc = ({
|
|
5491
5506
|
responses: e,
|
|
5492
5507
|
selectedResponse: t,
|
|
5493
5508
|
onSelectResponse: n
|
|
5494
5509
|
}) => {
|
|
5495
|
-
var
|
|
5510
|
+
var a;
|
|
5496
5511
|
return /* @__PURE__ */ p.jsx(pn, { children: /* @__PURE__ */ p.jsxs(
|
|
5497
|
-
|
|
5512
|
+
Ye.Root,
|
|
5498
5513
|
{
|
|
5499
|
-
defaultValue: (
|
|
5514
|
+
defaultValue: (a = e[0]) == null ? void 0 : a.statusCode,
|
|
5500
5515
|
value: t,
|
|
5501
5516
|
onValueChange: (s) => n(s),
|
|
5502
5517
|
children: [
|
|
5503
5518
|
/* @__PURE__ */ p.jsxs(fn, { className: "text-xs flex flex-col gap-2 pb-0", children: [
|
|
5504
5519
|
/* @__PURE__ */ p.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
5505
|
-
/* @__PURE__ */ p.jsx(
|
|
5506
|
-
|
|
5520
|
+
/* @__PURE__ */ p.jsx(Ye.List, { className: "flex gap-2", children: e.map((s) => /* @__PURE__ */ p.jsx(
|
|
5521
|
+
Ye.Trigger,
|
|
5507
5522
|
{
|
|
5508
5523
|
value: s.statusCode,
|
|
5509
5524
|
className: ee(
|
|
@@ -5518,15 +5533,15 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5518
5533
|
] }),
|
|
5519
5534
|
e.map((s) => {
|
|
5520
5535
|
var o, l, c;
|
|
5521
|
-
const i = (o = s.content) == null ? void 0 : o.at(0),
|
|
5522
|
-
return /* @__PURE__ */ p.jsxs(
|
|
5536
|
+
const i = (o = s.content) == null ? void 0 : o.at(0), r = ((c = (l = i == null ? void 0 : i.examples) == null ? void 0 : l.at(0)) == null ? void 0 : c.value) ?? (i != null && i.schema ? Re(i.schema) : "");
|
|
5537
|
+
return /* @__PURE__ */ p.jsxs(Ye.Content, { value: s.statusCode, children: [
|
|
5523
5538
|
/* @__PURE__ */ p.jsx(mn, { className: "p-0", children: /* @__PURE__ */ p.jsx(dn, { children: /* @__PURE__ */ p.jsx(
|
|
5524
|
-
|
|
5539
|
+
Ge,
|
|
5525
5540
|
{
|
|
5526
|
-
language:
|
|
5541
|
+
language: r ? "json" : "plain",
|
|
5527
5542
|
noBackground: !0,
|
|
5528
5543
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
5529
|
-
code:
|
|
5544
|
+
code: r ? JSON.stringify(r, null, 2) : "Empty response"
|
|
5530
5545
|
}
|
|
5531
5546
|
) }) }),
|
|
5532
5547
|
/* @__PURE__ */ p.jsx(Br, { className: "flex justify-end text-xs", children: s.description })
|
|
@@ -5535,7 +5550,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5535
5550
|
]
|
|
5536
5551
|
}
|
|
5537
5552
|
) });
|
|
5538
|
-
},
|
|
5553
|
+
}, lc = (e, t) => {
|
|
5539
5554
|
let n;
|
|
5540
5555
|
switch (t) {
|
|
5541
5556
|
case "shell":
|
|
@@ -5588,7 +5603,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5588
5603
|
}
|
|
5589
5604
|
}
|
|
5590
5605
|
`
|
|
5591
|
-
),
|
|
5606
|
+
), cc = { suspense: !0 }, uc = {
|
|
5592
5607
|
get: me.green,
|
|
5593
5608
|
post: me.blue,
|
|
5594
5609
|
put: me.yellow,
|
|
@@ -5597,41 +5612,53 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5597
5612
|
options: me.indigo,
|
|
5598
5613
|
head: me.gray,
|
|
5599
5614
|
trace: me.gray
|
|
5600
|
-
},
|
|
5615
|
+
}, dc = [
|
|
5616
|
+
{ value: "shell", label: "cURL" },
|
|
5617
|
+
{ value: "js", label: "JavaScript" },
|
|
5618
|
+
{ value: "python", label: "Python" },
|
|
5619
|
+
{ value: "java", label: "Java" },
|
|
5620
|
+
{ value: "go", label: "Go" },
|
|
5621
|
+
{ value: "csharp", label: "C#" },
|
|
5622
|
+
{ value: "kotlin", label: "Kotlin" },
|
|
5623
|
+
{ value: "objc", label: "Objective-C" },
|
|
5624
|
+
{ value: "php", label: "PHP" },
|
|
5625
|
+
{ value: "ruby", label: "Ruby" },
|
|
5626
|
+
{ value: "swift", label: "Swift" }
|
|
5627
|
+
], zc = ({
|
|
5601
5628
|
operation: e,
|
|
5602
5629
|
selectedResponse: t,
|
|
5603
5630
|
onSelectResponse: n
|
|
5604
5631
|
}) => {
|
|
5605
|
-
var
|
|
5606
|
-
const
|
|
5632
|
+
var g, b, v, k;
|
|
5633
|
+
const a = ac(), [s] = Ua({
|
|
5607
5634
|
query: Mr,
|
|
5608
|
-
variables:
|
|
5609
|
-
context:
|
|
5610
|
-
}), i =
|
|
5611
|
-
const
|
|
5635
|
+
variables: a,
|
|
5636
|
+
context: cc
|
|
5637
|
+
}), i = uc[e.method.toLocaleLowerCase()] ?? me.gray, [r, o] = Sa(), [, l] = dr(), c = r.get("lang") ?? "shell", u = (g = e.requestBody) == null ? void 0 : g.content, f = e.path.split("/").map((x, S, j) => {
|
|
5638
|
+
const C = x.startsWith("{") && x.endsWith("}") || x.startsWith(":") ? x.replace(/[:{}]/g, "") : void 0;
|
|
5612
5639
|
return (
|
|
5613
5640
|
// eslint-disable-next-line react/no-array-index-key
|
|
5614
|
-
/* @__PURE__ */ p.jsxs(
|
|
5615
|
-
|
|
5641
|
+
/* @__PURE__ */ p.jsxs(tt, { children: [
|
|
5642
|
+
C ? /* @__PURE__ */ p.jsx(
|
|
5616
5643
|
en,
|
|
5617
5644
|
{
|
|
5618
|
-
name:
|
|
5645
|
+
name: C,
|
|
5619
5646
|
backgroundOpacity: "0",
|
|
5620
|
-
slug: `${e.slug}-${
|
|
5621
|
-
children:
|
|
5647
|
+
slug: `${e.slug}-${C.toLocaleLowerCase()}`,
|
|
5648
|
+
children: x
|
|
5622
5649
|
}
|
|
5623
|
-
) :
|
|
5624
|
-
|
|
5650
|
+
) : x,
|
|
5651
|
+
S < j.length - 1 ? "/" : null,
|
|
5625
5652
|
/* @__PURE__ */ p.jsx("wbr", {})
|
|
5626
|
-
] },
|
|
5653
|
+
] }, x + S)
|
|
5627
5654
|
);
|
|
5628
5655
|
}), { selectedServer: d } = pr(), m = oa(() => {
|
|
5629
|
-
var
|
|
5630
|
-
const
|
|
5656
|
+
var j, E;
|
|
5657
|
+
const x = (j = u == null ? void 0 : u[0]) != null && j.schema ? Re(u[0].schema) : void 0, S = new Zl({
|
|
5631
5658
|
method: e.method.toLocaleUpperCase(),
|
|
5632
|
-
url: (d ?? ((
|
|
5633
|
-
postData:
|
|
5634
|
-
text: JSON.stringify(
|
|
5659
|
+
url: (d ?? ((E = s.data) == null ? void 0 : E.schema.url) ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
5660
|
+
postData: x ? {
|
|
5661
|
+
text: JSON.stringify(x, null, 2),
|
|
5635
5662
|
mimeType: "application/json"
|
|
5636
5663
|
} : {},
|
|
5637
5664
|
headers: [],
|
|
@@ -5641,80 +5668,78 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5641
5668
|
headersSize: 0,
|
|
5642
5669
|
bodySize: 0
|
|
5643
5670
|
});
|
|
5644
|
-
return
|
|
5671
|
+
return lc(S, c);
|
|
5645
5672
|
}, [
|
|
5646
|
-
|
|
5647
|
-
c,
|
|
5673
|
+
u,
|
|
5648
5674
|
e.method,
|
|
5649
5675
|
e.path,
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5676
|
+
d,
|
|
5677
|
+
(b = s.data) == null ? void 0 : b.schema.url,
|
|
5678
|
+
c
|
|
5679
|
+
]), [h, y] = ec({ rootMargin: "200px 0px 200px 0px" });
|
|
5680
|
+
return /* @__PURE__ */ p.jsxs(
|
|
5681
|
+
"aside",
|
|
5682
|
+
{
|
|
5683
|
+
ref: h,
|
|
5684
|
+
className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
|
|
5685
|
+
children: [
|
|
5686
|
+
/* @__PURE__ */ p.jsxs(pn, { children: [
|
|
5687
|
+
/* @__PURE__ */ p.jsxs(fn, { className: "flex justify-between items-center flex-nowrap py-3 gap-2 text-xs", children: [
|
|
5688
|
+
/* @__PURE__ */ p.jsxs("span", { className: "font-mono break-words", children: [
|
|
5689
|
+
/* @__PURE__ */ p.jsx("span", { className: ee("font-semibold", i), children: e.method.toLocaleUpperCase() }),
|
|
5690
|
+
" ",
|
|
5691
|
+
f
|
|
5692
|
+
] }),
|
|
5693
|
+
y && /* @__PURE__ */ p.jsx(
|
|
5694
|
+
ic,
|
|
5695
|
+
{
|
|
5696
|
+
server: ((v = s.data) == null ? void 0 : v.schema.url) ?? "",
|
|
5697
|
+
servers: ((k = s.data) == null ? void 0 : k.schema.servers.map((x) => x.url)) ?? [],
|
|
5698
|
+
operation: e
|
|
5699
|
+
}
|
|
5700
|
+
)
|
|
5701
|
+
] }),
|
|
5702
|
+
y && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
5703
|
+
/* @__PURE__ */ p.jsx(mn, { className: "p-0", children: /* @__PURE__ */ p.jsx(dn, { children: /* @__PURE__ */ p.jsx(
|
|
5704
|
+
Ge,
|
|
5705
|
+
{
|
|
5706
|
+
language: c,
|
|
5707
|
+
noBackground: !0,
|
|
5708
|
+
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
5709
|
+
code: m
|
|
5710
|
+
}
|
|
5711
|
+
) }) }),
|
|
5712
|
+
/* @__PURE__ */ p.jsxs(Br, { className: "flex items-center text-xs gap-2 justify-end py-1", children: [
|
|
5713
|
+
/* @__PURE__ */ p.jsx("span", { children: "Show example in" }),
|
|
5714
|
+
/* @__PURE__ */ p.jsx(
|
|
5715
|
+
hr,
|
|
5716
|
+
{
|
|
5717
|
+
className: "self-start max-w-[150px]",
|
|
5718
|
+
value: c,
|
|
5719
|
+
onChange: (x) => {
|
|
5720
|
+
l(() => {
|
|
5721
|
+
o((S) => (S.set("lang", x.target.value), S));
|
|
5722
|
+
});
|
|
5723
|
+
},
|
|
5724
|
+
options: dc
|
|
5725
|
+
}
|
|
5726
|
+
)
|
|
5727
|
+
] })
|
|
5728
|
+
] })
|
|
5659
5729
|
] }),
|
|
5660
|
-
/* @__PURE__ */ p.jsx(
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
server: ((v = s.data) == null ? void 0 : v.schema.url) ?? "",
|
|
5664
|
-
servers: ((g = s.data) == null ? void 0 : g.schema.servers.map((b) => b.url)) ?? [],
|
|
5665
|
-
operation: e
|
|
5666
|
-
}
|
|
5667
|
-
)
|
|
5668
|
-
] }),
|
|
5669
|
-
/* @__PURE__ */ p.jsx(mn, { className: "p-0", children: /* @__PURE__ */ p.jsx(dn, { children: /* @__PURE__ */ p.jsx(
|
|
5670
|
-
De,
|
|
5671
|
-
{
|
|
5672
|
-
language: c,
|
|
5673
|
-
noBackground: !0,
|
|
5674
|
-
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
5675
|
-
code: m
|
|
5676
|
-
}
|
|
5677
|
-
) }) }),
|
|
5678
|
-
/* @__PURE__ */ p.jsxs(Br, { className: "flex items-center text-xs gap-2 justify-end py-1", children: [
|
|
5679
|
-
/* @__PURE__ */ p.jsx("span", { children: "Show example in" }),
|
|
5680
|
-
/* @__PURE__ */ p.jsx(
|
|
5681
|
-
hr,
|
|
5730
|
+
y && u && /* @__PURE__ */ p.jsx(oc, { content: u }),
|
|
5731
|
+
y && e.responses.length > 0 && /* @__PURE__ */ p.jsx(
|
|
5732
|
+
sc,
|
|
5682
5733
|
{
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
l(() => {
|
|
5687
|
-
o((y) => (y.set("lang", b.target.value), y));
|
|
5688
|
-
});
|
|
5689
|
-
},
|
|
5690
|
-
options: [
|
|
5691
|
-
{ value: "shell", label: "cURL" },
|
|
5692
|
-
{ value: "js", label: "JavaScript" },
|
|
5693
|
-
{ value: "python", label: "Python" },
|
|
5694
|
-
{ value: "java", label: "Java" },
|
|
5695
|
-
{ value: "go", label: "Go" },
|
|
5696
|
-
{ value: "csharp", label: "C#" },
|
|
5697
|
-
{ value: "kotlin", label: "Kotlin" },
|
|
5698
|
-
{ value: "objc", label: "Objective-C" },
|
|
5699
|
-
{ value: "php", label: "PHP" },
|
|
5700
|
-
{ value: "ruby", label: "Ruby" },
|
|
5701
|
-
{ value: "swift", label: "Swift" }
|
|
5702
|
-
]
|
|
5734
|
+
selectedResponse: t,
|
|
5735
|
+
onSelectResponse: n,
|
|
5736
|
+
responses: e.responses
|
|
5703
5737
|
}
|
|
5704
5738
|
)
|
|
5705
|
-
]
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
oc,
|
|
5710
|
-
{
|
|
5711
|
-
selectedResponse: t,
|
|
5712
|
-
onSelectResponse: n,
|
|
5713
|
-
responses: e.responses
|
|
5714
|
-
}
|
|
5715
|
-
)
|
|
5716
|
-
] });
|
|
5717
|
-
}, uc = mr(`
|
|
5739
|
+
]
|
|
5740
|
+
}
|
|
5741
|
+
);
|
|
5742
|
+
}, pc = mr(`
|
|
5718
5743
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
5719
5744
|
schema(input: $input, type: $type) {
|
|
5720
5745
|
tags {
|
|
@@ -5732,10 +5757,10 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5732
5757
|
}
|
|
5733
5758
|
}
|
|
5734
5759
|
}
|
|
5735
|
-
`),
|
|
5736
|
-
const e = wa(), t = e instanceof Error ? /* @__PURE__ */ p.jsx(
|
|
5760
|
+
`), fc = () => {
|
|
5761
|
+
const e = wa(), t = e instanceof Error ? /* @__PURE__ */ p.jsx(Ge, { code: e.message }) : "An unknown error occurred";
|
|
5737
5762
|
return /* @__PURE__ */ p.jsx(Wa, { category: "Error", title: "An error occurred", message: t });
|
|
5738
|
-
},
|
|
5763
|
+
}, mc = {
|
|
5739
5764
|
get: "green",
|
|
5740
5765
|
post: "blue",
|
|
5741
5766
|
put: "yellow",
|
|
@@ -5743,7 +5768,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5743
5768
|
patch: "purple",
|
|
5744
5769
|
options: "gray",
|
|
5745
5770
|
head: "gray"
|
|
5746
|
-
},
|
|
5771
|
+
}, Jc = (e) => {
|
|
5747
5772
|
const t = zr(e.navigationId ?? "/reference"), n = e.server ? new Oa({
|
|
5748
5773
|
url: e.server,
|
|
5749
5774
|
exchanges: [Ca, Pa]
|
|
@@ -5765,10 +5790,10 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5765
5790
|
},
|
|
5766
5791
|
getMdxComponents: () => ({
|
|
5767
5792
|
OpenPlaygroundButton: ({
|
|
5768
|
-
requireAuth:
|
|
5793
|
+
requireAuth: a,
|
|
5769
5794
|
server: s,
|
|
5770
5795
|
method: i,
|
|
5771
|
-
url:
|
|
5796
|
+
url: r,
|
|
5772
5797
|
...o
|
|
5773
5798
|
}) => {
|
|
5774
5799
|
var u;
|
|
@@ -5780,7 +5805,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5780
5805
|
enabled: !s,
|
|
5781
5806
|
queryKey: ["playground-server"]
|
|
5782
5807
|
});
|
|
5783
|
-
return
|
|
5808
|
+
return a && !l.isAuthenticated ? /* @__PURE__ */ p.jsxs(
|
|
5784
5809
|
je,
|
|
5785
5810
|
{
|
|
5786
5811
|
className: "gap-2 items-center",
|
|
@@ -5794,7 +5819,7 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5794
5819
|
) : /* @__PURE__ */ p.jsx(
|
|
5795
5820
|
yr,
|
|
5796
5821
|
{
|
|
5797
|
-
url:
|
|
5822
|
+
url: r ?? "/",
|
|
5798
5823
|
method: i ?? "get",
|
|
5799
5824
|
server: s ?? ((u = c.data) == null ? void 0 : u.schema.url) ?? "https://example.com",
|
|
5800
5825
|
...o,
|
|
@@ -5806,26 +5831,26 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5806
5831
|
);
|
|
5807
5832
|
}
|
|
5808
5833
|
}),
|
|
5809
|
-
getSidebar: async (
|
|
5810
|
-
if (!Ea({ path: t, end: !1 },
|
|
5834
|
+
getSidebar: async (a) => {
|
|
5835
|
+
if (!Ea({ path: t, end: !1 }, a))
|
|
5811
5836
|
return [];
|
|
5812
|
-
const { data: s } = await n.query(
|
|
5837
|
+
const { data: s } = await n.query(pc, {
|
|
5813
5838
|
input: e.input,
|
|
5814
5839
|
type: e.type
|
|
5815
5840
|
});
|
|
5816
5841
|
if (!s) return [];
|
|
5817
|
-
const i = s.schema.tags.filter((
|
|
5842
|
+
const i = s.schema.tags.filter((r) => r.operations.length > 0).map((r) => ({
|
|
5818
5843
|
type: "category",
|
|
5819
|
-
label:
|
|
5844
|
+
label: r.name || "Other endpoints",
|
|
5820
5845
|
collapsible: !0,
|
|
5821
5846
|
collapsed: !1,
|
|
5822
|
-
items:
|
|
5847
|
+
items: r.operations.map((o) => ({
|
|
5823
5848
|
type: "link",
|
|
5824
5849
|
label: o.summary ?? o.path,
|
|
5825
5850
|
href: `#${o.slug}`,
|
|
5826
5851
|
badge: {
|
|
5827
5852
|
label: o.method,
|
|
5828
|
-
color:
|
|
5853
|
+
color: mc[o.method.toLowerCase()]
|
|
5829
5854
|
}
|
|
5830
5855
|
}))
|
|
5831
5856
|
}));
|
|
@@ -5838,12 +5863,12 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5838
5863
|
getRoutes: () => [
|
|
5839
5864
|
{
|
|
5840
5865
|
async lazy() {
|
|
5841
|
-
const { OpenApiRoute:
|
|
5866
|
+
const { OpenApiRoute: a } = await import("./Route-B0XuN1oC.js");
|
|
5842
5867
|
return {
|
|
5843
|
-
element: /* @__PURE__ */ p.jsx(
|
|
5868
|
+
element: /* @__PURE__ */ p.jsx(a, { client: n, config: e })
|
|
5844
5869
|
};
|
|
5845
5870
|
},
|
|
5846
|
-
errorElement: /* @__PURE__ */ p.jsx(
|
|
5871
|
+
errorElement: /* @__PURE__ */ p.jsx(fc, {}),
|
|
5847
5872
|
children: [
|
|
5848
5873
|
{
|
|
5849
5874
|
path: t,
|
|
@@ -5851,8 +5876,8 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5851
5876
|
{
|
|
5852
5877
|
index: !0,
|
|
5853
5878
|
async lazy() {
|
|
5854
|
-
const { OperationList:
|
|
5855
|
-
return { element: /* @__PURE__ */ p.jsx(
|
|
5879
|
+
const { OperationList: a } = await import("./OperationList-BHUBGM0c.js");
|
|
5880
|
+
return { element: /* @__PURE__ */ p.jsx(a, {}) };
|
|
5856
5881
|
}
|
|
5857
5882
|
}
|
|
5858
5883
|
]
|
|
@@ -5865,13 +5890,13 @@ const ec = Zt.Root, cr = Zt.CollapsibleTrigger, tc = Zt.CollapsibleContent, nc =
|
|
|
5865
5890
|
export {
|
|
5866
5891
|
en as C,
|
|
5867
5892
|
Wa as E,
|
|
5868
|
-
|
|
5893
|
+
Vc as O,
|
|
5869
5894
|
hr as S,
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5895
|
+
ac as a,
|
|
5896
|
+
zc as b,
|
|
5897
|
+
Mc as f,
|
|
5873
5898
|
mr as g,
|
|
5874
|
-
|
|
5875
|
-
|
|
5899
|
+
Jc as o,
|
|
5900
|
+
Ua as u
|
|
5876
5901
|
};
|
|
5877
|
-
//# sourceMappingURL=index-
|
|
5902
|
+
//# sourceMappingURL=index-BRg5pi5D.js.map
|