zudoku 0.3.0-dev.83 → 0.3.0-dev.85
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/cli.js +5 -1
- package/dist/app/demo.js +5 -4
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +3 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +5 -4
- package/dist/app/standalone.js.map +1 -1
- package/dist/config/validators/ResolvedSidebarSchema.d.ts +18 -0
- package/dist/config/validators/ResolvedSidebarSchema.js +76 -0
- package/dist/config/validators/ResolvedSidebarSchema.js.map +1 -0
- package/dist/config/validators/SidebarSchema.d.ts +177 -0
- package/dist/config/validators/SidebarSchema.js +71 -0
- package/dist/config/validators/SidebarSchema.js.map +1 -0
- package/dist/config/validators/validate.d.ts +411 -59
- package/dist/config/validators/validate.js +22 -4
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/components/DevPortal.js +1 -1
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Header.js +5 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +5 -5
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/DevPortalProvider.d.ts +9 -3
- package/dist/lib/components/context/DevPortalProvider.js +11 -23
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/context/ThemeContext.d.ts +1 -4
- package/dist/lib/components/context/ThemeContext.js +3 -29
- package/dist/lib/components/context/ThemeContext.js.map +1 -1
- package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
- package/dist/lib/components/context/ThemeProvider.js +23 -0
- package/dist/lib/components/context/ThemeProvider.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
- package/dist/lib/components/navigation/Sidebar.js +12 -0
- package/dist/lib/components/navigation/Sidebar.js.map +1 -0
- package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
- package/dist/lib/components/navigation/SidebarBadge.js +24 -0
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
- package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
- package/dist/lib/components/navigation/SidebarCategory.js +33 -0
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
- package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
- package/dist/lib/components/navigation/SidebarItem.js +42 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
- package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +16 -0
- package/dist/lib/components/navigation/utils.js +85 -0
- package/dist/lib/components/navigation/utils.js.map +1 -0
- package/dist/lib/core/DevPortalContext.d.ts +9 -32
- package/dist/lib/core/DevPortalContext.js +8 -5
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +6 -8
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +5 -36
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.js +6 -1
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +3 -2
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +6 -3
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +12 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +14 -11
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +31 -17
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +3 -0
- package/dist/vite/plugin-sidebar.js +23 -0
- package/dist/vite/plugin-sidebar.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-XS0DoAhE.js → AuthenticationPlugin-DgwV0hVu.js} +7 -7
- package/lib/{AuthenticationPlugin-XS0DoAhE.js.map → AuthenticationPlugin-DgwV0hVu.js.map} +1 -1
- package/lib/{CategoryHeading-DCmchnA1.js → CategoryHeading-BWq12Bfa.js} +3 -3
- package/lib/{CategoryHeading-DCmchnA1.js.map → CategoryHeading-BWq12Bfa.js.map} +1 -1
- package/lib/{Combination-C442XfGG.js → Combination-DkycFHkm.js} +4 -4
- package/lib/{Combination-C442XfGG.js.map → Combination-DkycFHkm.js.map} +1 -1
- package/lib/{DevPortalProvider-BWeAysxF.js → DevPortalProvider-CTxoCHIT.js} +375 -417
- package/lib/DevPortalProvider-CTxoCHIT.js.map +1 -0
- package/lib/DeveloperHint-BQSFXH01.js +10 -0
- package/lib/{DeveloperHint-DQVwIery.js.map → DeveloperHint-BQSFXH01.js.map} +1 -1
- package/lib/{Input-3IEt27jb.js → Input-BclXSY0g.js} +5 -5
- package/lib/{Input-3IEt27jb.js.map → Input-BclXSY0g.js.map} +1 -1
- package/lib/{Markdown-QsZ-PHET.js → Markdown-B_Gax7at.js} +1136 -1152
- package/lib/{Markdown-QsZ-PHET.js.map → Markdown-B_Gax7at.js.map} +1 -1
- package/lib/{MdxPage-CA1WmW14.js → MdxPage-Crlr0GmN.js} +67 -81
- package/lib/MdxPage-Crlr0GmN.js.map +1 -0
- package/lib/{OperationList-CHK_erYP.js → OperationList-CMH3DPpj.js} +145 -129
- package/lib/OperationList-CMH3DPpj.js.map +1 -0
- package/lib/Route-CwXfyIUw.js +14 -0
- package/lib/{Route-D70pGn9n.js.map → Route-CwXfyIUw.js.map} +1 -1
- package/lib/{SlotletProvider-B71hNEUL.js → SlotletProvider-CzMAO73_.js} +12 -12
- package/lib/{SlotletProvider-B71hNEUL.js.map → SlotletProvider-CzMAO73_.js.map} +1 -1
- package/lib/Spinner-fF-Xv-gw.js +274 -0
- package/lib/Spinner-fF-Xv-gw.js.map +1 -0
- package/lib/index-7kcHaXD6.js +1771 -0
- package/lib/index-7kcHaXD6.js.map +1 -0
- package/lib/{index-Bl6YeerK.js → index-DUrF63A6.js} +1028 -1044
- package/lib/index-DUrF63A6.js.map +1 -0
- package/lib/{index-BH-Ub36F.js → index-DkuZvRNP.js} +4 -4
- package/lib/{index-BH-Ub36F.js.map → index-DkuZvRNP.js.map} +1 -1
- package/lib/joinPath-VeNuJa7y.js +8 -0
- package/lib/joinPath-VeNuJa7y.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/{AnchorLink-BZcpTwOs.js → utils-CzT_9Tsn.js} +258 -214
- package/lib/utils-CzT_9Tsn.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +1229 -1227
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +19 -19
- package/lib/zudoku.plugin-custom-page.js +2 -2
- package/lib/zudoku.plugin-markdown.js +21 -38
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +4 -1
- package/src/app/demo.tsx +5 -4
- package/src/app/main.css +2 -2
- package/src/app/main.tsx +3 -1
- package/src/app/standalone.tsx +5 -4
- package/src/lib/components/DevPortal.tsx +1 -1
- package/src/lib/components/Header.tsx +21 -19
- package/src/lib/components/Layout.tsx +2 -2
- package/src/lib/components/TopNavigation.tsx +5 -5
- package/src/lib/components/context/DevPortalProvider.ts +11 -28
- package/src/lib/components/context/ThemeContext.tsx +3 -41
- package/src/lib/components/context/ThemeProvider.tsx +27 -0
- package/src/lib/components/navigation/{SideNavigation.tsx → Sidebar.tsx} +7 -7
- package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
- package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
- package/src/lib/components/navigation/SidebarItem.tsx +96 -0
- package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
- package/src/lib/components/navigation/utils.ts +120 -0
- package/src/lib/core/DevPortalContext.ts +12 -44
- package/src/lib/core/plugins.ts +6 -13
- package/src/lib/plugins/markdown/MdxPage.tsx +14 -50
- package/src/lib/plugins/markdown/generateRoutes.tsx +29 -57
- package/src/lib/plugins/openapi/OperationListItem.tsx +5 -6
- package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
- package/src/lib/plugins/openapi/SchemaListView.tsx +18 -2
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +16 -7
- package/src/lib/plugins/openapi/Sidecar.tsx +15 -2
- package/src/lib/plugins/openapi/index.tsx +17 -23
- package/src/lib/plugins/openapi/interfaces.ts +1 -1
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +39 -18
- package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
- package/dist/lib/components/navigation/SideNavigation.js +0 -12
- package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
- package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
- package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -9
- package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
- package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -9
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -28
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
- package/dist/lib/components/navigation/util.d.ts +0 -8
- package/dist/lib/components/navigation/util.js +0 -15
- package/dist/lib/components/navigation/util.js.map +0 -1
- package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
- package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
- package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
- package/dist/lib/util/traverseNavigation.d.ts +0 -6
- package/dist/lib/util/traverseNavigation.js +0 -30
- package/dist/lib/util/traverseNavigation.js.map +0 -1
- package/lib/AnchorLink-BZcpTwOs.js.map +0 -1
- package/lib/DevPortalProvider-BWeAysxF.js.map +0 -1
- package/lib/DeveloperHint-DQVwIery.js +0 -10
- package/lib/MdxPage-CA1WmW14.js.map +0 -1
- package/lib/OperationList-CHK_erYP.js.map +0 -1
- package/lib/Route-D70pGn9n.js +0 -13
- package/lib/Spinner-Coi7ORUV.js +0 -244
- package/lib/Spinner-Coi7ORUV.js.map +0 -1
- package/lib/index-Bl6YeerK.js.map +0 -1
- package/lib/index-Dt-pU7Vu.js +0 -916
- package/lib/index-Dt-pU7Vu.js.map +0 -1
- package/lib/jsx-runtime-CJBdjYYx.js +0 -1526
- package/lib/jsx-runtime-CJBdjYYx.js.map +0 -1
- package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -72
- package/src/lib/components/navigation/SideNavigationItem.tsx +0 -148
- package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -42
- package/src/lib/components/navigation/util.ts +0 -38
- package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/lib/util/traverseNavigation.ts +0 -55
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { j as f
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { j as f } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import { u as Pa, C as Ea, c as Ra, f as Aa } from "./urql-DrBfkb92.js";
|
|
3
|
+
import { v as Fa, w as qa } from "./DevPortalProvider-CTxoCHIT.js";
|
|
4
|
+
import { createClient as Ia } from "zudoku/openapi-worker";
|
|
5
|
+
import { a as cr, u as Yt, P as me, d as be, R as _a, S as ur, h as La, e as Ua, F as Ma, D as Ha, q as Ba, m as Da, o as dr, n as rt, k as Va, B as qe, p as za } from "./Combination-DkycFHkm.js";
|
|
6
|
+
import { L as Wa, e as Ja, g as Ga } from "./index-7kcHaXD6.js";
|
|
7
|
+
import { C as Ka } from "./CategoryHeading-BWq12Bfa.js";
|
|
8
|
+
import { c as Ke, P as Qa, H as Ya, a as A, u as Xa, g as Za, S as Qe } from "./Markdown-B_Gax7at.js";
|
|
9
|
+
import { j as eo } from "./joinPath-VeNuJa7y.js";
|
|
10
|
+
import { g as Xt, h as kn, C as Se, I as fr, i as to, u as no, a as ro, F as ao, S as oo, b as io, c as so, d as lo, f as $n, V as co } from "./Input-BclXSY0g.js";
|
|
10
11
|
import * as N from "react";
|
|
11
|
-
import { useRef as
|
|
12
|
-
import { P as
|
|
13
|
-
import { a as
|
|
14
|
-
import { m as
|
|
12
|
+
import { useRef as pr, useEffect as mr, useState as Zt, Fragment as at, createContext as uo, useContext as fo, useTransition as po, useMemo as mo } from "react";
|
|
13
|
+
import { P as gt, c as hr, R as ho, I as yo, a as Sn, T as pe } from "./Spinner-fF-Xv-gw.js";
|
|
14
|
+
import { a as go, c as ot, g as vo } from "./_commonjsHelpers-BVfed4GL.js";
|
|
15
|
+
import { m as bo } from "./router-BiRCp01d.js";
|
|
15
16
|
/**
|
|
16
17
|
* @license lucide-react v0.378.0 - ISC
|
|
17
18
|
*
|
|
18
19
|
* This source code is licensed under the ISC license.
|
|
19
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
21
|
*/
|
|
21
|
-
const
|
|
22
|
+
const xo = Ke("ChevronsUpDown", [
|
|
22
23
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
23
24
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
24
25
|
]);
|
|
@@ -28,7 +29,7 @@ const vo = Ge("ChevronsUpDown", [
|
|
|
28
29
|
* This source code is licensed under the ISC license.
|
|
29
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
31
|
*/
|
|
31
|
-
const
|
|
32
|
+
const yr = Ke("CirclePlay", [
|
|
32
33
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
33
34
|
["polygon", { points: "10 8 16 12 10 16 10 8", key: "1cimsy" }]
|
|
34
35
|
]);
|
|
@@ -38,7 +39,7 @@ const hr = Ge("CirclePlay", [
|
|
|
38
39
|
* This source code is licensed under the ISC license.
|
|
39
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
41
|
*/
|
|
41
|
-
const
|
|
42
|
+
const gr = Ke("Eraser", [
|
|
42
43
|
[
|
|
43
44
|
"path",
|
|
44
45
|
{
|
|
@@ -55,7 +56,7 @@ const yr = Ge("Eraser", [
|
|
|
55
56
|
* This source code is licensed under the ISC license.
|
|
56
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
58
|
*/
|
|
58
|
-
const
|
|
59
|
+
const ko = Ke("LogIn", [
|
|
59
60
|
["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }],
|
|
60
61
|
["polyline", { points: "10 17 15 12 10 7", key: "1ail0h" }],
|
|
61
62
|
["line", { x1: "15", x2: "3", y1: "12", y2: "12", key: "v6grx8" }]
|
|
@@ -66,10 +67,10 @@ const bo = Ge("LogIn", [
|
|
|
66
67
|
* This source code is licensed under the ISC license.
|
|
67
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
69
|
*/
|
|
69
|
-
const
|
|
70
|
+
const vr = Ke("X", [
|
|
70
71
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
71
72
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
72
|
-
]),
|
|
73
|
+
]), $o = {
|
|
73
74
|
kind: "Document",
|
|
74
75
|
definitions: [
|
|
75
76
|
{
|
|
@@ -214,7 +215,7 @@ const gr = Ge("X", [
|
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
217
|
]
|
|
217
|
-
},
|
|
218
|
+
}, So = {
|
|
218
219
|
kind: "Document",
|
|
219
220
|
definitions: [
|
|
220
221
|
{
|
|
@@ -458,7 +459,7 @@ const gr = Ge("X", [
|
|
|
458
459
|
}
|
|
459
460
|
}
|
|
460
461
|
]
|
|
461
|
-
},
|
|
462
|
+
}, wo = {
|
|
462
463
|
kind: "Document",
|
|
463
464
|
definitions: [
|
|
464
465
|
{
|
|
@@ -524,7 +525,7 @@ const gr = Ge("X", [
|
|
|
524
525
|
}
|
|
525
526
|
}
|
|
526
527
|
]
|
|
527
|
-
},
|
|
528
|
+
}, jo = {
|
|
528
529
|
kind: "Document",
|
|
529
530
|
definitions: [
|
|
530
531
|
{
|
|
@@ -640,53 +641,26 @@ const gr = Ge("X", [
|
|
|
640
641
|
}
|
|
641
642
|
}
|
|
642
643
|
]
|
|
643
|
-
},
|
|
644
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
645
|
-
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
|
|
646
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n":
|
|
647
|
-
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n":
|
|
644
|
+
}, No = {
|
|
645
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": $o,
|
|
646
|
+
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": So,
|
|
647
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n": wo,
|
|
648
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": jo
|
|
648
649
|
};
|
|
649
|
-
function
|
|
650
|
-
return
|
|
650
|
+
function br(e) {
|
|
651
|
+
return No[e] ?? {};
|
|
651
652
|
}
|
|
652
|
-
const
|
|
653
|
-
get: "text-green-600",
|
|
654
|
-
post: "text-sky-600",
|
|
655
|
-
put: "text-yellow-600",
|
|
656
|
-
delete: "text-red-600",
|
|
657
|
-
patch: "text-purple-600",
|
|
658
|
-
options: "text-indigo-600",
|
|
659
|
-
head: "text-gray-600",
|
|
660
|
-
trace: "text-gray-600"
|
|
661
|
-
}, No = {
|
|
662
|
-
get: "bg-green-400 dark:bg-green-800",
|
|
663
|
-
post: "bg-sky-400 dark:bg-sky-800",
|
|
664
|
-
put: "bg-yellow-400 dark:bg-yellow-800",
|
|
665
|
-
delete: "bg-red-400 dark:bg-red-800",
|
|
666
|
-
patch: "bg-purple-400 dark:bg-purple-600",
|
|
667
|
-
options: "bg-indigo-400 dark:bg-indigo-600",
|
|
668
|
-
head: "bg-gray-400 dark:bg-gray-600",
|
|
669
|
-
trace: "bg-gray-400 dark:bg-gray-600"
|
|
670
|
-
}, To = ({ method: e }) => /* @__PURE__ */ f.jsx(
|
|
671
|
-
"span",
|
|
672
|
-
{
|
|
673
|
-
className: A(
|
|
674
|
-
"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1",
|
|
675
|
-
No[e]
|
|
676
|
-
),
|
|
677
|
-
children: e
|
|
678
|
-
}
|
|
679
|
-
), Oo = ({
|
|
653
|
+
const To = ({
|
|
680
654
|
title: e = "An error occurred",
|
|
681
655
|
message: t,
|
|
682
656
|
category: n
|
|
683
|
-
}) => /* @__PURE__ */ f.jsxs("div", { className:
|
|
684
|
-
n && /* @__PURE__ */ f.jsx(
|
|
685
|
-
e && /* @__PURE__ */ f.jsx(
|
|
657
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: Qa + " h-full pt-[--padding-content-top]", children: [
|
|
658
|
+
n && /* @__PURE__ */ f.jsx(Ka, { children: n }),
|
|
659
|
+
e && /* @__PURE__ */ f.jsx(Ya, { level: 1, className: "flex gap-3.5 items-center", children: e }),
|
|
686
660
|
/* @__PURE__ */ f.jsx("p", { children: t }),
|
|
687
|
-
/* @__PURE__ */ f.jsx(
|
|
661
|
+
/* @__PURE__ */ f.jsx(Wa, { to: "/", children: "Go back home" })
|
|
688
662
|
] });
|
|
689
|
-
var
|
|
663
|
+
var en = "Dialog", [xr, Eu] = cr(en), [Oo, ie] = xr(en), kr = (e) => {
|
|
690
664
|
const {
|
|
691
665
|
__scopeDialog: t,
|
|
692
666
|
children: n,
|
|
@@ -694,20 +668,20 @@ var Zt = "Dialog", [br, Pu] = lr(Zt), [Co, ie] = br(Zt), xr = (e) => {
|
|
|
694
668
|
defaultOpen: s,
|
|
695
669
|
onOpenChange: o,
|
|
696
670
|
modal: r = !0
|
|
697
|
-
} = e, i = N.useRef(null), l = N.useRef(null), [c = !1, u] =
|
|
671
|
+
} = e, i = N.useRef(null), l = N.useRef(null), [c = !1, u] = dr({
|
|
698
672
|
prop: a,
|
|
699
673
|
defaultProp: s,
|
|
700
674
|
onChange: o
|
|
701
675
|
});
|
|
702
676
|
return /* @__PURE__ */ f.jsx(
|
|
703
|
-
|
|
677
|
+
Oo,
|
|
704
678
|
{
|
|
705
679
|
scope: t,
|
|
706
680
|
triggerRef: i,
|
|
707
681
|
contentRef: l,
|
|
708
|
-
contentId:
|
|
709
|
-
titleId:
|
|
710
|
-
descriptionId:
|
|
682
|
+
contentId: rt(),
|
|
683
|
+
titleId: rt(),
|
|
684
|
+
descriptionId: rt(),
|
|
711
685
|
open: c,
|
|
712
686
|
onOpenChange: u,
|
|
713
687
|
onOpenToggle: N.useCallback(() => u((p) => !p), [u]),
|
|
@@ -716,50 +690,50 @@ var Zt = "Dialog", [br, Pu] = lr(Zt), [Co, ie] = br(Zt), xr = (e) => {
|
|
|
716
690
|
}
|
|
717
691
|
);
|
|
718
692
|
};
|
|
719
|
-
|
|
720
|
-
var
|
|
693
|
+
kr.displayName = en;
|
|
694
|
+
var $r = "DialogTrigger", Sr = N.forwardRef(
|
|
721
695
|
(e, t) => {
|
|
722
|
-
const { __scopeDialog: n, ...a } = e, s = ie(
|
|
696
|
+
const { __scopeDialog: n, ...a } = e, s = ie($r, n), o = Yt(t, s.triggerRef);
|
|
723
697
|
return /* @__PURE__ */ f.jsx(
|
|
724
|
-
|
|
698
|
+
me.button,
|
|
725
699
|
{
|
|
726
700
|
type: "button",
|
|
727
701
|
"aria-haspopup": "dialog",
|
|
728
702
|
"aria-expanded": s.open,
|
|
729
703
|
"aria-controls": s.contentId,
|
|
730
|
-
"data-state":
|
|
704
|
+
"data-state": rn(s.open),
|
|
731
705
|
...a,
|
|
732
706
|
ref: o,
|
|
733
|
-
onClick:
|
|
707
|
+
onClick: be(e.onClick, s.onOpenToggle)
|
|
734
708
|
}
|
|
735
709
|
);
|
|
736
710
|
}
|
|
737
711
|
);
|
|
738
|
-
|
|
739
|
-
var
|
|
712
|
+
Sr.displayName = $r;
|
|
713
|
+
var tn = "DialogPortal", [Co, wr] = xr(tn, {
|
|
740
714
|
forceMount: void 0
|
|
741
|
-
}),
|
|
742
|
-
const { __scopeDialog: t, forceMount: n, children: a, container: s } = e, o = ie(
|
|
743
|
-
return /* @__PURE__ */ f.jsx(
|
|
715
|
+
}), jr = (e) => {
|
|
716
|
+
const { __scopeDialog: t, forceMount: n, children: a, container: s } = e, o = ie(tn, t);
|
|
717
|
+
return /* @__PURE__ */ f.jsx(Co, { scope: t, forceMount: n, children: N.Children.map(a, (r) => /* @__PURE__ */ f.jsx(gt, { present: n || o.open, children: /* @__PURE__ */ f.jsx(Da, { asChild: !0, container: s, children: r }) })) });
|
|
744
718
|
};
|
|
745
|
-
|
|
746
|
-
var
|
|
719
|
+
jr.displayName = tn;
|
|
720
|
+
var ut = "DialogOverlay", Nr = N.forwardRef(
|
|
747
721
|
(e, t) => {
|
|
748
|
-
const n =
|
|
749
|
-
return o.modal ? /* @__PURE__ */ f.jsx(
|
|
722
|
+
const n = wr(ut, e.__scopeDialog), { forceMount: a = n.forceMount, ...s } = e, o = ie(ut, e.__scopeDialog);
|
|
723
|
+
return o.modal ? /* @__PURE__ */ f.jsx(gt, { present: a || o.open, children: /* @__PURE__ */ f.jsx(Po, { ...s, ref: t }) }) : null;
|
|
750
724
|
}
|
|
751
725
|
);
|
|
752
|
-
|
|
753
|
-
var
|
|
726
|
+
Nr.displayName = ut;
|
|
727
|
+
var Po = N.forwardRef(
|
|
754
728
|
(e, t) => {
|
|
755
|
-
const { __scopeDialog: n, ...a } = e, s = ie(
|
|
729
|
+
const { __scopeDialog: n, ...a } = e, s = ie(ut, n);
|
|
756
730
|
return (
|
|
757
731
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
758
732
|
// ie. when `Overlay` and `Content` are siblings
|
|
759
|
-
/* @__PURE__ */ f.jsx(
|
|
760
|
-
|
|
733
|
+
/* @__PURE__ */ f.jsx(_a, { as: ur, allowPinchZoom: !0, shards: [s.contentRef], children: /* @__PURE__ */ f.jsx(
|
|
734
|
+
me.div,
|
|
761
735
|
{
|
|
762
|
-
"data-state":
|
|
736
|
+
"data-state": rn(s.open),
|
|
763
737
|
...a,
|
|
764
738
|
ref: t,
|
|
765
739
|
style: { pointerEvents: "auto", ...a.style }
|
|
@@ -767,46 +741,46 @@ var Eo = N.forwardRef(
|
|
|
767
741
|
) })
|
|
768
742
|
);
|
|
769
743
|
}
|
|
770
|
-
),
|
|
744
|
+
), Ne = "DialogContent", Tr = N.forwardRef(
|
|
771
745
|
(e, t) => {
|
|
772
|
-
const n =
|
|
773
|
-
return /* @__PURE__ */ f.jsx(
|
|
746
|
+
const n = wr(Ne, e.__scopeDialog), { forceMount: a = n.forceMount, ...s } = e, o = ie(Ne, e.__scopeDialog);
|
|
747
|
+
return /* @__PURE__ */ f.jsx(gt, { present: a || o.open, children: o.modal ? /* @__PURE__ */ f.jsx(Eo, { ...s, ref: t }) : /* @__PURE__ */ f.jsx(Ro, { ...s, ref: t }) });
|
|
774
748
|
}
|
|
775
749
|
);
|
|
776
|
-
|
|
777
|
-
var
|
|
750
|
+
Tr.displayName = Ne;
|
|
751
|
+
var Eo = N.forwardRef(
|
|
778
752
|
(e, t) => {
|
|
779
|
-
const n = ie(
|
|
753
|
+
const n = ie(Ne, e.__scopeDialog), a = N.useRef(null), s = Yt(t, n.contentRef, a);
|
|
780
754
|
return N.useEffect(() => {
|
|
781
755
|
const o = a.current;
|
|
782
|
-
if (o) return
|
|
756
|
+
if (o) return La(o);
|
|
783
757
|
}, []), /* @__PURE__ */ f.jsx(
|
|
784
|
-
|
|
758
|
+
Or,
|
|
785
759
|
{
|
|
786
760
|
...e,
|
|
787
761
|
ref: s,
|
|
788
762
|
trapFocus: n.open,
|
|
789
763
|
disableOutsidePointerEvents: !0,
|
|
790
|
-
onCloseAutoFocus:
|
|
764
|
+
onCloseAutoFocus: be(e.onCloseAutoFocus, (o) => {
|
|
791
765
|
var r;
|
|
792
766
|
o.preventDefault(), (r = n.triggerRef.current) == null || r.focus();
|
|
793
767
|
}),
|
|
794
|
-
onPointerDownOutside:
|
|
768
|
+
onPointerDownOutside: be(e.onPointerDownOutside, (o) => {
|
|
795
769
|
const r = o.detail.originalEvent, i = r.button === 0 && r.ctrlKey === !0;
|
|
796
770
|
(r.button === 2 || i) && o.preventDefault();
|
|
797
771
|
}),
|
|
798
|
-
onFocusOutside:
|
|
772
|
+
onFocusOutside: be(
|
|
799
773
|
e.onFocusOutside,
|
|
800
774
|
(o) => o.preventDefault()
|
|
801
775
|
)
|
|
802
776
|
}
|
|
803
777
|
);
|
|
804
778
|
}
|
|
805
|
-
),
|
|
779
|
+
), Ro = N.forwardRef(
|
|
806
780
|
(e, t) => {
|
|
807
|
-
const n = ie(
|
|
781
|
+
const n = ie(Ne, e.__scopeDialog), a = N.useRef(!1), s = N.useRef(!1);
|
|
808
782
|
return /* @__PURE__ */ f.jsx(
|
|
809
|
-
|
|
783
|
+
Or,
|
|
810
784
|
{
|
|
811
785
|
...e,
|
|
812
786
|
ref: t,
|
|
@@ -825,12 +799,12 @@ var Ro = N.forwardRef(
|
|
|
825
799
|
}
|
|
826
800
|
);
|
|
827
801
|
}
|
|
828
|
-
),
|
|
802
|
+
), Or = N.forwardRef(
|
|
829
803
|
(e, t) => {
|
|
830
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: o, ...r } = e, i = ie(
|
|
831
|
-
return
|
|
804
|
+
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: o, ...r } = e, i = ie(Ne, n), l = N.useRef(null), c = Yt(t, l);
|
|
805
|
+
return Ua(), /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
832
806
|
/* @__PURE__ */ f.jsx(
|
|
833
|
-
|
|
807
|
+
Ma,
|
|
834
808
|
{
|
|
835
809
|
asChild: !0,
|
|
836
810
|
loop: !0,
|
|
@@ -838,13 +812,13 @@ var Ro = N.forwardRef(
|
|
|
838
812
|
onMountAutoFocus: s,
|
|
839
813
|
onUnmountAutoFocus: o,
|
|
840
814
|
children: /* @__PURE__ */ f.jsx(
|
|
841
|
-
|
|
815
|
+
Ha,
|
|
842
816
|
{
|
|
843
817
|
role: "dialog",
|
|
844
818
|
id: i.contentId,
|
|
845
819
|
"aria-describedby": i.descriptionId,
|
|
846
820
|
"aria-labelledby": i.titleId,
|
|
847
|
-
"data-state":
|
|
821
|
+
"data-state": rn(i.open),
|
|
848
822
|
...r,
|
|
849
823
|
ref: c,
|
|
850
824
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -853,49 +827,49 @@ var Ro = N.forwardRef(
|
|
|
853
827
|
}
|
|
854
828
|
),
|
|
855
829
|
/* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
856
|
-
/* @__PURE__ */ f.jsx(
|
|
857
|
-
/* @__PURE__ */ f.jsx(
|
|
830
|
+
/* @__PURE__ */ f.jsx(Ao, { titleId: i.titleId }),
|
|
831
|
+
/* @__PURE__ */ f.jsx(qo, { contentRef: l, descriptionId: i.descriptionId })
|
|
858
832
|
] })
|
|
859
833
|
] });
|
|
860
834
|
}
|
|
861
|
-
),
|
|
835
|
+
), nn = "DialogTitle", Cr = N.forwardRef(
|
|
862
836
|
(e, t) => {
|
|
863
|
-
const { __scopeDialog: n, ...a } = e, s = ie(
|
|
864
|
-
return /* @__PURE__ */ f.jsx(
|
|
837
|
+
const { __scopeDialog: n, ...a } = e, s = ie(nn, n);
|
|
838
|
+
return /* @__PURE__ */ f.jsx(me.h2, { id: s.titleId, ...a, ref: t });
|
|
865
839
|
}
|
|
866
840
|
);
|
|
867
|
-
|
|
868
|
-
var
|
|
841
|
+
Cr.displayName = nn;
|
|
842
|
+
var Pr = "DialogDescription", Er = N.forwardRef(
|
|
869
843
|
(e, t) => {
|
|
870
|
-
const { __scopeDialog: n, ...a } = e, s = ie(
|
|
871
|
-
return /* @__PURE__ */ f.jsx(
|
|
844
|
+
const { __scopeDialog: n, ...a } = e, s = ie(Pr, n);
|
|
845
|
+
return /* @__PURE__ */ f.jsx(me.p, { id: s.descriptionId, ...a, ref: t });
|
|
872
846
|
}
|
|
873
847
|
);
|
|
874
|
-
|
|
875
|
-
var
|
|
848
|
+
Er.displayName = Pr;
|
|
849
|
+
var Rr = "DialogClose", Ar = N.forwardRef(
|
|
876
850
|
(e, t) => {
|
|
877
|
-
const { __scopeDialog: n, ...a } = e, s = ie(
|
|
851
|
+
const { __scopeDialog: n, ...a } = e, s = ie(Rr, n);
|
|
878
852
|
return /* @__PURE__ */ f.jsx(
|
|
879
|
-
|
|
853
|
+
me.button,
|
|
880
854
|
{
|
|
881
855
|
type: "button",
|
|
882
856
|
...a,
|
|
883
857
|
ref: t,
|
|
884
|
-
onClick:
|
|
858
|
+
onClick: be(e.onClick, () => s.onOpenChange(!1))
|
|
885
859
|
}
|
|
886
860
|
);
|
|
887
861
|
}
|
|
888
862
|
);
|
|
889
|
-
|
|
890
|
-
function
|
|
863
|
+
Ar.displayName = Rr;
|
|
864
|
+
function rn(e) {
|
|
891
865
|
return e ? "open" : "closed";
|
|
892
866
|
}
|
|
893
|
-
var
|
|
894
|
-
contentName:
|
|
895
|
-
titleName:
|
|
867
|
+
var Fr = "DialogTitleWarning", [Ru, qr] = Ba(Fr, {
|
|
868
|
+
contentName: Ne,
|
|
869
|
+
titleName: nn,
|
|
896
870
|
docsSlug: "dialog"
|
|
897
|
-
}),
|
|
898
|
-
const t = Fr
|
|
871
|
+
}), Ao = ({ titleId: e }) => {
|
|
872
|
+
const t = qr(Fr), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
899
873
|
|
|
900
874
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
901
875
|
|
|
@@ -903,16 +877,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
903
877
|
return N.useEffect(() => {
|
|
904
878
|
e && (document.getElementById(e) || console.error(n));
|
|
905
879
|
}, [n, e]), null;
|
|
906
|
-
},
|
|
907
|
-
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
880
|
+
}, Fo = "DialogDescriptionWarning", qo = ({ contentRef: e, descriptionId: t }) => {
|
|
881
|
+
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qr(Fo).contentName}}.`;
|
|
908
882
|
return N.useEffect(() => {
|
|
909
883
|
var o;
|
|
910
884
|
const s = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
911
885
|
t && s && (document.getElementById(t) || console.warn(a));
|
|
912
886
|
}, [a, e, t]), null;
|
|
913
|
-
},
|
|
914
|
-
const
|
|
915
|
-
|
|
887
|
+
}, Io = kr, _o = Sr, Lo = jr, Ir = Nr, _r = Tr, Lr = Cr, Ur = Er, Uo = Ar;
|
|
888
|
+
const Mo = Io, Ho = _o, Bo = Lo, Mr = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
889
|
+
Ir,
|
|
916
890
|
{
|
|
917
891
|
ref: n,
|
|
918
892
|
className: A(
|
|
@@ -922,11 +896,11 @@ const Ho = _o, Bo = Lo, Do = Uo, Ur = N.forwardRef(({ className: e, ...t }, n) =
|
|
|
922
896
|
...t
|
|
923
897
|
}
|
|
924
898
|
));
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
/* @__PURE__ */ f.jsx(
|
|
899
|
+
Mr.displayName = Ir.displayName;
|
|
900
|
+
const Hr = N.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ f.jsxs(Bo, { children: [
|
|
901
|
+
/* @__PURE__ */ f.jsx(Mr, {}),
|
|
928
902
|
/* @__PURE__ */ f.jsxs(
|
|
929
|
-
|
|
903
|
+
_r,
|
|
930
904
|
{
|
|
931
905
|
ref: a,
|
|
932
906
|
className: A(
|
|
@@ -936,17 +910,17 @@ const Mr = N.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__
|
|
|
936
910
|
...n,
|
|
937
911
|
children: [
|
|
938
912
|
t,
|
|
939
|
-
/* @__PURE__ */ f.jsxs(
|
|
940
|
-
/* @__PURE__ */ f.jsx(
|
|
913
|
+
/* @__PURE__ */ f.jsxs(Uo, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
914
|
+
/* @__PURE__ */ f.jsx(vr, { className: "h-4 w-4" }),
|
|
941
915
|
/* @__PURE__ */ f.jsx("span", { className: "sr-only", children: "Close" })
|
|
942
916
|
] })
|
|
943
917
|
]
|
|
944
918
|
}
|
|
945
919
|
)
|
|
946
920
|
] }));
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
921
|
+
Hr.displayName = _r.displayName;
|
|
922
|
+
const Br = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
923
|
+
Lr,
|
|
950
924
|
{
|
|
951
925
|
ref: n,
|
|
952
926
|
className: A(
|
|
@@ -956,17 +930,17 @@ const Hr = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
956
930
|
...t
|
|
957
931
|
}
|
|
958
932
|
));
|
|
959
|
-
|
|
960
|
-
const
|
|
961
|
-
|
|
933
|
+
Br.displayName = Lr.displayName;
|
|
934
|
+
const Do = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
935
|
+
Ur,
|
|
962
936
|
{
|
|
963
937
|
ref: n,
|
|
964
938
|
className: A("text-sm text-muted-foreground", e),
|
|
965
939
|
...t
|
|
966
940
|
}
|
|
967
941
|
));
|
|
968
|
-
|
|
969
|
-
const
|
|
942
|
+
Do.displayName = Ur.displayName;
|
|
943
|
+
const an = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
970
944
|
"div",
|
|
971
945
|
{
|
|
972
946
|
ref: n,
|
|
@@ -977,7 +951,7 @@ const rn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
977
951
|
...t
|
|
978
952
|
}
|
|
979
953
|
));
|
|
980
|
-
|
|
954
|
+
an.displayName = "Card";
|
|
981
955
|
const Vo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
982
956
|
"div",
|
|
983
957
|
{
|
|
@@ -987,7 +961,7 @@ const Vo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
987
961
|
}
|
|
988
962
|
));
|
|
989
963
|
Vo.displayName = "CardHeader";
|
|
990
|
-
const
|
|
964
|
+
const zo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
991
965
|
"h3",
|
|
992
966
|
{
|
|
993
967
|
ref: n,
|
|
@@ -995,8 +969,8 @@ const Wo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
995
969
|
...t
|
|
996
970
|
}
|
|
997
971
|
));
|
|
998
|
-
|
|
999
|
-
const
|
|
972
|
+
zo.displayName = "CardTitle";
|
|
973
|
+
const Wo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1000
974
|
"p",
|
|
1001
975
|
{
|
|
1002
976
|
ref: n,
|
|
@@ -1004,10 +978,10 @@ const Jo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
1004
978
|
...t
|
|
1005
979
|
}
|
|
1006
980
|
));
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
const
|
|
981
|
+
Wo.displayName = "CardDescription";
|
|
982
|
+
const Jo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx("div", { ref: n, className: A("p-6 pt-0", e), ...t }));
|
|
983
|
+
Jo.displayName = "CardContent";
|
|
984
|
+
const Go = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1011
985
|
"div",
|
|
1012
986
|
{
|
|
1013
987
|
ref: n,
|
|
@@ -1015,10 +989,10 @@ const Ko = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
1015
989
|
...t
|
|
1016
990
|
}
|
|
1017
991
|
));
|
|
1018
|
-
|
|
1019
|
-
var
|
|
1020
|
-
|
|
1021
|
-
]),
|
|
992
|
+
Go.displayName = "CardFooter";
|
|
993
|
+
var on = "Tabs", [Ko, Au] = cr(on, [
|
|
994
|
+
hr
|
|
995
|
+
]), Dr = hr(), [Qo, sn] = Ko(on), Vr = N.forwardRef(
|
|
1022
996
|
(e, t) => {
|
|
1023
997
|
const {
|
|
1024
998
|
__scopeTabs: n,
|
|
@@ -1029,23 +1003,23 @@ var an = "Tabs", [Qo, Ru] = lr(an, [
|
|
|
1029
1003
|
dir: i,
|
|
1030
1004
|
activationMode: l = "automatic",
|
|
1031
1005
|
...c
|
|
1032
|
-
} = e, u =
|
|
1006
|
+
} = e, u = Va(i), [p, d] = dr({
|
|
1033
1007
|
prop: a,
|
|
1034
1008
|
onChange: s,
|
|
1035
1009
|
defaultProp: o
|
|
1036
1010
|
});
|
|
1037
1011
|
return /* @__PURE__ */ f.jsx(
|
|
1038
|
-
|
|
1012
|
+
Qo,
|
|
1039
1013
|
{
|
|
1040
1014
|
scope: n,
|
|
1041
|
-
baseId:
|
|
1015
|
+
baseId: rt(),
|
|
1042
1016
|
value: p,
|
|
1043
1017
|
onValueChange: d,
|
|
1044
1018
|
orientation: r,
|
|
1045
1019
|
dir: u,
|
|
1046
1020
|
activationMode: l,
|
|
1047
1021
|
children: /* @__PURE__ */ f.jsx(
|
|
1048
|
-
|
|
1022
|
+
me.div,
|
|
1049
1023
|
{
|
|
1050
1024
|
dir: u,
|
|
1051
1025
|
"data-orientation": r,
|
|
@@ -1057,12 +1031,12 @@ var an = "Tabs", [Qo, Ru] = lr(an, [
|
|
|
1057
1031
|
);
|
|
1058
1032
|
}
|
|
1059
1033
|
);
|
|
1060
|
-
|
|
1061
|
-
var zr = "TabsList",
|
|
1034
|
+
Vr.displayName = on;
|
|
1035
|
+
var zr = "TabsList", Wr = N.forwardRef(
|
|
1062
1036
|
(e, t) => {
|
|
1063
|
-
const { __scopeTabs: n, loop: a = !0, ...s } = e, o =
|
|
1037
|
+
const { __scopeTabs: n, loop: a = !0, ...s } = e, o = sn(zr, n), r = Dr(n);
|
|
1064
1038
|
return /* @__PURE__ */ f.jsx(
|
|
1065
|
-
|
|
1039
|
+
ho,
|
|
1066
1040
|
{
|
|
1067
1041
|
asChild: !0,
|
|
1068
1042
|
...r,
|
|
@@ -1070,7 +1044,7 @@ var zr = "TabsList", Vr = N.forwardRef(
|
|
|
1070
1044
|
dir: o.dir,
|
|
1071
1045
|
loop: a,
|
|
1072
1046
|
children: /* @__PURE__ */ f.jsx(
|
|
1073
|
-
|
|
1047
|
+
me.div,
|
|
1074
1048
|
{
|
|
1075
1049
|
role: "tablist",
|
|
1076
1050
|
"aria-orientation": o.orientation,
|
|
@@ -1082,19 +1056,19 @@ var zr = "TabsList", Vr = N.forwardRef(
|
|
|
1082
1056
|
);
|
|
1083
1057
|
}
|
|
1084
1058
|
);
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1059
|
+
Wr.displayName = zr;
|
|
1060
|
+
var Jr = "TabsTrigger", Gr = N.forwardRef(
|
|
1087
1061
|
(e, t) => {
|
|
1088
|
-
const { __scopeTabs: n, value: a, disabled: s = !1, ...o } = e, r =
|
|
1062
|
+
const { __scopeTabs: n, value: a, disabled: s = !1, ...o } = e, r = sn(Jr, n), i = Dr(n), l = Yr(r.baseId, a), c = Xr(r.baseId, a), u = a === r.value;
|
|
1089
1063
|
return /* @__PURE__ */ f.jsx(
|
|
1090
|
-
|
|
1064
|
+
yo,
|
|
1091
1065
|
{
|
|
1092
1066
|
asChild: !0,
|
|
1093
1067
|
...i,
|
|
1094
1068
|
focusable: !s,
|
|
1095
1069
|
active: u,
|
|
1096
1070
|
children: /* @__PURE__ */ f.jsx(
|
|
1097
|
-
|
|
1071
|
+
me.button,
|
|
1098
1072
|
{
|
|
1099
1073
|
type: "button",
|
|
1100
1074
|
role: "tab",
|
|
@@ -1106,13 +1080,13 @@ var Wr = "TabsTrigger", Jr = N.forwardRef(
|
|
|
1106
1080
|
id: l,
|
|
1107
1081
|
...o,
|
|
1108
1082
|
ref: t,
|
|
1109
|
-
onMouseDown:
|
|
1083
|
+
onMouseDown: be(e.onMouseDown, (p) => {
|
|
1110
1084
|
!s && p.button === 0 && p.ctrlKey === !1 ? r.onValueChange(a) : p.preventDefault();
|
|
1111
1085
|
}),
|
|
1112
|
-
onKeyDown:
|
|
1086
|
+
onKeyDown: be(e.onKeyDown, (p) => {
|
|
1113
1087
|
[" ", "Enter"].includes(p.key) && r.onValueChange(a);
|
|
1114
1088
|
}),
|
|
1115
|
-
onFocus:
|
|
1089
|
+
onFocus: be(e.onFocus, () => {
|
|
1116
1090
|
const p = r.activationMode !== "manual";
|
|
1117
1091
|
!u && !s && p && r.onValueChange(a);
|
|
1118
1092
|
})
|
|
@@ -1122,15 +1096,15 @@ var Wr = "TabsTrigger", Jr = N.forwardRef(
|
|
|
1122
1096
|
);
|
|
1123
1097
|
}
|
|
1124
1098
|
);
|
|
1125
|
-
|
|
1126
|
-
var
|
|
1099
|
+
Gr.displayName = Jr;
|
|
1100
|
+
var Kr = "TabsContent", Qr = N.forwardRef(
|
|
1127
1101
|
(e, t) => {
|
|
1128
|
-
const { __scopeTabs: n, value: a, forceMount: s, children: o, ...r } = e, i =
|
|
1102
|
+
const { __scopeTabs: n, value: a, forceMount: s, children: o, ...r } = e, i = sn(Kr, n), l = Yr(i.baseId, a), c = Xr(i.baseId, a), u = a === i.value, p = N.useRef(u);
|
|
1129
1103
|
return N.useEffect(() => {
|
|
1130
1104
|
const d = requestAnimationFrame(() => p.current = !1);
|
|
1131
1105
|
return () => cancelAnimationFrame(d);
|
|
1132
|
-
}, []), /* @__PURE__ */ f.jsx(
|
|
1133
|
-
|
|
1106
|
+
}, []), /* @__PURE__ */ f.jsx(gt, { present: s || u, children: ({ present: d }) => /* @__PURE__ */ f.jsx(
|
|
1107
|
+
me.div,
|
|
1134
1108
|
{
|
|
1135
1109
|
"data-state": u ? "active" : "inactive",
|
|
1136
1110
|
"data-orientation": i.orientation,
|
|
@@ -1150,16 +1124,16 @@ var Gr = "TabsContent", Kr = N.forwardRef(
|
|
|
1150
1124
|
) });
|
|
1151
1125
|
}
|
|
1152
1126
|
);
|
|
1153
|
-
|
|
1154
|
-
function
|
|
1127
|
+
Qr.displayName = Kr;
|
|
1128
|
+
function Yr(e, t) {
|
|
1155
1129
|
return `${e}-trigger-${t}`;
|
|
1156
1130
|
}
|
|
1157
|
-
function
|
|
1131
|
+
function Xr(e, t) {
|
|
1158
1132
|
return `${e}-content-${t}`;
|
|
1159
1133
|
}
|
|
1160
|
-
var
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1134
|
+
var Yo = Vr, Zr = Wr, ea = Gr, ta = Qr;
|
|
1135
|
+
const wn = Yo, _t = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1136
|
+
Zr,
|
|
1163
1137
|
{
|
|
1164
1138
|
ref: n,
|
|
1165
1139
|
className: A(
|
|
@@ -1169,9 +1143,9 @@ const Sn = Xo, It = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
|
1169
1143
|
...t
|
|
1170
1144
|
}
|
|
1171
1145
|
));
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1146
|
+
_t.displayName = Zr.displayName;
|
|
1147
|
+
const Ce = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1148
|
+
ea,
|
|
1175
1149
|
{
|
|
1176
1150
|
ref: n,
|
|
1177
1151
|
className: A(
|
|
@@ -1181,9 +1155,9 @@ const Oe = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
1181
1155
|
...t
|
|
1182
1156
|
}
|
|
1183
1157
|
));
|
|
1184
|
-
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1158
|
+
Ce.displayName = ea.displayName;
|
|
1159
|
+
const Pe = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1160
|
+
ta,
|
|
1187
1161
|
{
|
|
1188
1162
|
ref: n,
|
|
1189
1163
|
className: A(
|
|
@@ -1193,8 +1167,8 @@ const Ce = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
1193
1167
|
...t
|
|
1194
1168
|
}
|
|
1195
1169
|
));
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1170
|
+
Pe.displayName = ta.displayName;
|
|
1171
|
+
const Xo = async (e, t, n = 5e3) => {
|
|
1198
1172
|
const a = new AbortController(), s = a.signal, o = fetch(e, { ...t, signal: s }), r = new Promise((i, l) => {
|
|
1199
1173
|
const c = setTimeout(() => {
|
|
1200
1174
|
a.abort("Request timed out"), l(new Error("Request timed out"));
|
|
@@ -1202,18 +1176,18 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1202
1176
|
o.finally(() => clearTimeout(c));
|
|
1203
1177
|
});
|
|
1204
1178
|
return Promise.race([o, r]);
|
|
1205
|
-
},
|
|
1179
|
+
}, kt = (e) => Math.abs(
|
|
1206
1180
|
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
1207
|
-
),
|
|
1208
|
-
const n = (3 *
|
|
1181
|
+
), $t = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, n) => `${kt(t) + kt(n)}`)) : kt(e), Zo = (e, t = {}) => {
|
|
1182
|
+
const n = (3 * $t(e) + 2 * $t(e) + $t(e)) % 360, { saturation: a = 75, lightness: s = 60 } = t;
|
|
1209
1183
|
return `${n}deg ${a}% ${s}%`;
|
|
1210
|
-
},
|
|
1211
|
-
const [t] =
|
|
1212
|
-
return
|
|
1184
|
+
}, St = "data-linked-param", ei = (e) => {
|
|
1185
|
+
const [t] = Xa();
|
|
1186
|
+
return Zo(
|
|
1213
1187
|
e,
|
|
1214
1188
|
t ? void 0 : { saturation: 85, lightness: 50 }
|
|
1215
1189
|
);
|
|
1216
|
-
},
|
|
1190
|
+
}, ln = ({
|
|
1217
1191
|
name: e,
|
|
1218
1192
|
className: t,
|
|
1219
1193
|
backgroundOpacity: n = "100%",
|
|
@@ -1222,15 +1196,15 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1222
1196
|
children: o,
|
|
1223
1197
|
onClick: r
|
|
1224
1198
|
}) => {
|
|
1225
|
-
const i =
|
|
1226
|
-
return
|
|
1199
|
+
const i = pr(null), l = e.replace(/[{}]/g, ""), c = s == null ? void 0 : s.replace(/[{}]/g, ""), u = ei(l), p = `hsl(${u} / ${a})`, d = `hsl(${u} / ${n})`;
|
|
1200
|
+
return mr(() => {
|
|
1227
1201
|
if (!c || !i.current) return;
|
|
1228
1202
|
const m = () => {
|
|
1229
|
-
document.querySelectorAll(`[${
|
|
1203
|
+
document.querySelectorAll(`[${St}="${c}"]`).forEach((y) => {
|
|
1230
1204
|
y instanceof HTMLElement && (y.dataset.active = "true");
|
|
1231
1205
|
});
|
|
1232
1206
|
}, h = () => {
|
|
1233
|
-
document.querySelectorAll(`[${
|
|
1207
|
+
document.querySelectorAll(`[${St}="${c}"]`).forEach((y) => {
|
|
1234
1208
|
y instanceof HTMLElement && (y.dataset.active = "false");
|
|
1235
1209
|
});
|
|
1236
1210
|
};
|
|
@@ -1242,7 +1216,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1242
1216
|
"span",
|
|
1243
1217
|
{
|
|
1244
1218
|
className: A("inline-flex relative rounded group", t),
|
|
1245
|
-
[
|
|
1219
|
+
[St]: c,
|
|
1246
1220
|
ref: i,
|
|
1247
1221
|
onClick: r,
|
|
1248
1222
|
children: [
|
|
@@ -1257,7 +1231,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1257
1231
|
]
|
|
1258
1232
|
}
|
|
1259
1233
|
);
|
|
1260
|
-
},
|
|
1234
|
+
}, ti = (e, t, n) => {
|
|
1261
1235
|
const a = t.replace(
|
|
1262
1236
|
/\{(\w+)}/g,
|
|
1263
1237
|
(o, r) => {
|
|
@@ -1268,9 +1242,9 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1268
1242
|
return n.queryParams.filter((o) => o.active).forEach((o) => {
|
|
1269
1243
|
s.searchParams.set(o.name, o.value);
|
|
1270
1244
|
}), s;
|
|
1271
|
-
},
|
|
1245
|
+
}, ni = (e, t) => {
|
|
1272
1246
|
const n = N.forwardRef(({ className: a, asChild: s, ...o }, r) => {
|
|
1273
|
-
const i = s ?
|
|
1247
|
+
const i = s ? ur : e;
|
|
1274
1248
|
return N.createElement(i, {
|
|
1275
1249
|
...o,
|
|
1276
1250
|
ref: r,
|
|
@@ -1278,17 +1252,17 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1278
1252
|
});
|
|
1279
1253
|
});
|
|
1280
1254
|
return n.displayName = `VariantComponent(${e})`, n;
|
|
1281
|
-
},
|
|
1255
|
+
}, Lt = ni(
|
|
1282
1256
|
"input",
|
|
1283
1257
|
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
1284
|
-
),
|
|
1258
|
+
), ri = ({
|
|
1285
1259
|
control: e,
|
|
1286
1260
|
register: t
|
|
1287
1261
|
}) => {
|
|
1288
|
-
const { fields: n, append: a, remove: s } =
|
|
1262
|
+
const { fields: n, append: a, remove: s } = Xt({
|
|
1289
1263
|
control: e,
|
|
1290
1264
|
name: "headers"
|
|
1291
|
-
}), o =
|
|
1265
|
+
}), o = kn({ name: "identity", control: e }), r = kn({ name: "headers", control: e }), i = o !== Be;
|
|
1292
1266
|
return /* @__PURE__ */ f.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto]", children: [
|
|
1293
1267
|
n.map((l, c) => {
|
|
1294
1268
|
var p;
|
|
@@ -1304,7 +1278,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1304
1278
|
children: [
|
|
1305
1279
|
/* @__PURE__ */ f.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
1306
1280
|
/* @__PURE__ */ f.jsx(
|
|
1307
|
-
|
|
1281
|
+
Lt,
|
|
1308
1282
|
{
|
|
1309
1283
|
...t(`headers.${c}.name`),
|
|
1310
1284
|
placeholder: "Name",
|
|
@@ -1312,10 +1286,10 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1312
1286
|
autoComplete: "off"
|
|
1313
1287
|
}
|
|
1314
1288
|
),
|
|
1315
|
-
u && /* @__PURE__ */ f.jsx(
|
|
1289
|
+
u && /* @__PURE__ */ f.jsx(Za, { size: 16, className: "text-amber-500" })
|
|
1316
1290
|
] }),
|
|
1317
1291
|
/* @__PURE__ */ f.jsx(
|
|
1318
|
-
|
|
1292
|
+
Lt,
|
|
1319
1293
|
{
|
|
1320
1294
|
placeholder: "Value",
|
|
1321
1295
|
className: "peer",
|
|
@@ -1331,17 +1305,17 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1331
1305
|
s(c);
|
|
1332
1306
|
},
|
|
1333
1307
|
type: "button",
|
|
1334
|
-
children: /* @__PURE__ */ f.jsx(
|
|
1308
|
+
children: /* @__PURE__ */ f.jsx(vr, { size: 16 })
|
|
1335
1309
|
}
|
|
1336
1310
|
),
|
|
1337
|
-
/* @__PURE__ */ f.jsx("div", { className: "col-span-full border-b
|
|
1311
|
+
/* @__PURE__ */ f.jsx("div", { className: "col-span-full border-b" })
|
|
1338
1312
|
]
|
|
1339
1313
|
},
|
|
1340
1314
|
l.id
|
|
1341
1315
|
);
|
|
1342
1316
|
}),
|
|
1343
1317
|
/* @__PURE__ */ f.jsx(
|
|
1344
|
-
|
|
1318
|
+
qe,
|
|
1345
1319
|
{
|
|
1346
1320
|
className: "col-span-full mt-4",
|
|
1347
1321
|
onClick: () => a({ name: "", value: "" }),
|
|
@@ -1350,22 +1324,22 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1350
1324
|
}
|
|
1351
1325
|
)
|
|
1352
1326
|
] });
|
|
1353
|
-
},
|
|
1327
|
+
}, ai = ({
|
|
1354
1328
|
control: e
|
|
1355
1329
|
}) => {
|
|
1356
|
-
const { fields: t } =
|
|
1330
|
+
const { fields: t } = Xt({
|
|
1357
1331
|
control: e,
|
|
1358
1332
|
name: "pathParams"
|
|
1359
1333
|
});
|
|
1360
1334
|
return /* @__PURE__ */ f.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ f.jsx("tbody", { children: t.map((n, a) => /* @__PURE__ */ f.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
1361
1335
|
/* @__PURE__ */ f.jsx("td", { children: /* @__PURE__ */ f.jsx(
|
|
1362
|
-
|
|
1336
|
+
Se,
|
|
1363
1337
|
{
|
|
1364
1338
|
control: e,
|
|
1365
1339
|
name: `pathParams.${a}.value`,
|
|
1366
1340
|
render: ({ field: s }) => /* @__PURE__ */ f.jsxs("div", { children: [
|
|
1367
1341
|
/* @__PURE__ */ f.jsx(
|
|
1368
|
-
|
|
1342
|
+
ln,
|
|
1369
1343
|
{
|
|
1370
1344
|
slug: n.name,
|
|
1371
1345
|
name: n.name,
|
|
@@ -1383,12 +1357,12 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1383
1357
|
) }),
|
|
1384
1358
|
/* @__PURE__ */ f.jsx("td", { children: /* @__PURE__ */ f.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1385
1359
|
/* @__PURE__ */ f.jsx(
|
|
1386
|
-
|
|
1360
|
+
Se,
|
|
1387
1361
|
{
|
|
1388
1362
|
control: e,
|
|
1389
1363
|
name: `pathParams.${a}.value`,
|
|
1390
1364
|
render: ({ field: s }) => /* @__PURE__ */ f.jsx(
|
|
1391
|
-
|
|
1365
|
+
fr,
|
|
1392
1366
|
{
|
|
1393
1367
|
...s,
|
|
1394
1368
|
placeholder: "Enter value",
|
|
@@ -1400,12 +1374,12 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1400
1374
|
}
|
|
1401
1375
|
),
|
|
1402
1376
|
/* @__PURE__ */ f.jsx(
|
|
1403
|
-
|
|
1377
|
+
Se,
|
|
1404
1378
|
{
|
|
1405
1379
|
control: e,
|
|
1406
1380
|
name: `pathParams.${a}.value`,
|
|
1407
1381
|
render: ({ field: s }) => /* @__PURE__ */ f.jsx(
|
|
1408
|
-
|
|
1382
|
+
qe,
|
|
1409
1383
|
{
|
|
1410
1384
|
size: "icon",
|
|
1411
1385
|
type: "button",
|
|
@@ -1417,27 +1391,27 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1417
1391
|
),
|
|
1418
1392
|
title: "Clear value",
|
|
1419
1393
|
onClick: () => s.onChange(""),
|
|
1420
|
-
children: /* @__PURE__ */ f.jsx(
|
|
1394
|
+
children: /* @__PURE__ */ f.jsx(gr, { size: 16 })
|
|
1421
1395
|
}
|
|
1422
1396
|
)
|
|
1423
1397
|
}
|
|
1424
1398
|
)
|
|
1425
1399
|
] }) })
|
|
1426
1400
|
] }, n.id)) }) });
|
|
1427
|
-
},
|
|
1401
|
+
}, oi = ({
|
|
1428
1402
|
control: e,
|
|
1429
1403
|
queryParams: t
|
|
1430
1404
|
}) => {
|
|
1431
|
-
const { fields: n } =
|
|
1405
|
+
const { fields: n } = Xt({
|
|
1432
1406
|
control: e,
|
|
1433
1407
|
name: "queryParams"
|
|
1434
|
-
}), a =
|
|
1408
|
+
}), a = to(), s = t.map((i) => !!i.isRequired), r = a.watch("identity") !== Be;
|
|
1435
1409
|
return /* @__PURE__ */ f.jsx("div", { className: "", children: /* @__PURE__ */ f.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ f.jsx("tbody", { children: n.filter(
|
|
1436
1410
|
// TODO remove this hack for Accu or make it more generic
|
|
1437
1411
|
(i) => !(r && i.name === "apikey")
|
|
1438
1412
|
).map((i, l) => /* @__PURE__ */ f.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
1439
1413
|
/* @__PURE__ */ f.jsx("td", { className: "text-center", children: /* @__PURE__ */ f.jsx(
|
|
1440
|
-
|
|
1414
|
+
Se,
|
|
1441
1415
|
{
|
|
1442
1416
|
control: e,
|
|
1443
1417
|
name: `queryParams.${l}.active`,
|
|
@@ -1453,10 +1427,10 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1453
1427
|
}
|
|
1454
1428
|
) }),
|
|
1455
1429
|
/* @__PURE__ */ f.jsx("td", { children: /* @__PURE__ */ f.jsx(
|
|
1456
|
-
|
|
1430
|
+
Se,
|
|
1457
1431
|
{
|
|
1458
1432
|
control: e,
|
|
1459
|
-
render: ({ field: c }) => /* @__PURE__ */ f.jsx(
|
|
1433
|
+
render: ({ field: c }) => /* @__PURE__ */ f.jsx(Lt, { asChild: !0, children: /* @__PURE__ */ f.jsxs(
|
|
1460
1434
|
"label",
|
|
1461
1435
|
{
|
|
1462
1436
|
className: "flex items-center cursor-pointer",
|
|
@@ -1473,11 +1447,11 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1473
1447
|
) }),
|
|
1474
1448
|
/* @__PURE__ */ f.jsx("td", { children: /* @__PURE__ */ f.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1475
1449
|
/* @__PURE__ */ f.jsx(
|
|
1476
|
-
|
|
1450
|
+
Se,
|
|
1477
1451
|
{
|
|
1478
1452
|
control: e,
|
|
1479
1453
|
render: ({ field: c }) => /* @__PURE__ */ f.jsx(
|
|
1480
|
-
|
|
1454
|
+
fr,
|
|
1481
1455
|
{
|
|
1482
1456
|
...c,
|
|
1483
1457
|
onChange: (u) => {
|
|
@@ -1491,11 +1465,11 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1491
1465
|
}
|
|
1492
1466
|
),
|
|
1493
1467
|
/* @__PURE__ */ f.jsx(
|
|
1494
|
-
|
|
1468
|
+
Se,
|
|
1495
1469
|
{
|
|
1496
1470
|
control: e,
|
|
1497
1471
|
render: ({ field: c }) => /* @__PURE__ */ f.jsx(
|
|
1498
|
-
|
|
1472
|
+
qe,
|
|
1499
1473
|
{
|
|
1500
1474
|
size: "icon",
|
|
1501
1475
|
type: "button",
|
|
@@ -1507,7 +1481,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1507
1481
|
),
|
|
1508
1482
|
title: "Clear value",
|
|
1509
1483
|
onClick: () => c.onChange(""),
|
|
1510
|
-
children: /* @__PURE__ */ f.jsx(
|
|
1484
|
+
children: /* @__PURE__ */ f.jsx(gr, { size: 16 })
|
|
1511
1485
|
}
|
|
1512
1486
|
),
|
|
1513
1487
|
name: `queryParams.${l}.value`
|
|
@@ -1515,7 +1489,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1515
1489
|
)
|
|
1516
1490
|
] }) })
|
|
1517
1491
|
] }, i.id)) }) }) });
|
|
1518
|
-
},
|
|
1492
|
+
}, na = ({
|
|
1519
1493
|
value: e,
|
|
1520
1494
|
onChange: t,
|
|
1521
1495
|
className: n,
|
|
@@ -1533,8 +1507,8 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1533
1507
|
children: a.map((s) => /* @__PURE__ */ f.jsx("option", { value: s.value, children: s.label }, s.value))
|
|
1534
1508
|
}
|
|
1535
1509
|
),
|
|
1536
|
-
/* @__PURE__ */ f.jsx("div", { className: "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none", children: /* @__PURE__ */ f.jsx(
|
|
1537
|
-
] }),
|
|
1510
|
+
/* @__PURE__ */ f.jsx("div", { className: "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none", children: /* @__PURE__ */ f.jsx(xo, { size: 14 }) })
|
|
1511
|
+
] }), ii = (e) => {
|
|
1538
1512
|
var n;
|
|
1539
1513
|
return (n = Object.entries({
|
|
1540
1514
|
"application/json": "json",
|
|
@@ -1547,25 +1521,25 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1547
1521
|
}).find(
|
|
1548
1522
|
([a]) => e.includes(a)
|
|
1549
1523
|
)) == null ? void 0 : n[1];
|
|
1550
|
-
},
|
|
1524
|
+
}, si = (e) => {
|
|
1551
1525
|
const t = e.get("Content-Type") || "";
|
|
1552
|
-
return
|
|
1553
|
-
},
|
|
1526
|
+
return ii(t);
|
|
1527
|
+
}, li = (e) => {
|
|
1554
1528
|
try {
|
|
1555
1529
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
1556
1530
|
} catch {
|
|
1557
1531
|
return null;
|
|
1558
1532
|
}
|
|
1559
|
-
},
|
|
1533
|
+
}, ci = ({
|
|
1560
1534
|
body: e = "",
|
|
1561
1535
|
headers: t
|
|
1562
1536
|
}) => {
|
|
1563
|
-
const n =
|
|
1537
|
+
const n = si(t), a = li(e), s = a || e, [o, r] = Zt(
|
|
1564
1538
|
a ? "formatted" : "raw"
|
|
1565
1539
|
);
|
|
1566
1540
|
return /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1567
|
-
/* @__PURE__ */ f.jsx(
|
|
1568
|
-
|
|
1541
|
+
/* @__PURE__ */ f.jsx(an, { className: "shadow-none", children: /* @__PURE__ */ f.jsx(
|
|
1542
|
+
Qe,
|
|
1569
1543
|
{
|
|
1570
1544
|
language: o === "raw" ? a ? "plain" : n : "json",
|
|
1571
1545
|
noBackground: !0,
|
|
@@ -1575,7 +1549,7 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1575
1549
|
}
|
|
1576
1550
|
) }),
|
|
1577
1551
|
a && /* @__PURE__ */ f.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ f.jsx(
|
|
1578
|
-
|
|
1552
|
+
na,
|
|
1579
1553
|
{
|
|
1580
1554
|
value: o,
|
|
1581
1555
|
onChange: (i) => r(i.target.value),
|
|
@@ -1586,8 +1560,8 @@ const Zo = async (e, t, n = 5e3) => {
|
|
|
1586
1560
|
}
|
|
1587
1561
|
) })
|
|
1588
1562
|
] });
|
|
1589
|
-
},
|
|
1590
|
-
function
|
|
1563
|
+
}, Be = "__none";
|
|
1564
|
+
function ui(e) {
|
|
1591
1565
|
var n;
|
|
1592
1566
|
return (n = Object.entries({
|
|
1593
1567
|
"application/json": "json",
|
|
@@ -1602,7 +1576,7 @@ function di(e) {
|
|
|
1602
1576
|
([a]) => e.includes(a)
|
|
1603
1577
|
)) == null ? void 0 : n[1];
|
|
1604
1578
|
}
|
|
1605
|
-
const
|
|
1579
|
+
const di = {
|
|
1606
1580
|
200: "OK",
|
|
1607
1581
|
201: "Created",
|
|
1608
1582
|
202: "Accepted",
|
|
@@ -1613,7 +1587,7 @@ const fi = {
|
|
|
1613
1587
|
404: "Not Found",
|
|
1614
1588
|
405: "Method Not Allowed",
|
|
1615
1589
|
500: "Internal Server Error"
|
|
1616
|
-
},
|
|
1590
|
+
}, fi = ({
|
|
1617
1591
|
server: e,
|
|
1618
1592
|
url: t,
|
|
1619
1593
|
method: n,
|
|
@@ -1623,7 +1597,7 @@ const fi = {
|
|
|
1623
1597
|
defaultBody: r = ""
|
|
1624
1598
|
}) => {
|
|
1625
1599
|
var w, S, j;
|
|
1626
|
-
const { register: i, control: l, handleSubmit: c, watch: u, setValue: p, ...d } =
|
|
1600
|
+
const { register: i, control: l, handleSubmit: c, watch: u, setValue: p, ...d } = no({
|
|
1627
1601
|
defaultValues: {
|
|
1628
1602
|
body: r,
|
|
1629
1603
|
queryParams: s.map((k) => ({
|
|
@@ -1639,29 +1613,29 @@ const fi = {
|
|
|
1639
1613
|
name: k.name,
|
|
1640
1614
|
value: k.defaultValue ?? ""
|
|
1641
1615
|
})),
|
|
1642
|
-
identity:
|
|
1616
|
+
identity: Be
|
|
1643
1617
|
}
|
|
1644
|
-
}), m = u(), h =
|
|
1645
|
-
|
|
1618
|
+
}), m = u(), h = Fa(), y = pr(!1);
|
|
1619
|
+
mr(() => {
|
|
1646
1620
|
var O;
|
|
1647
1621
|
if (y.current) return;
|
|
1648
1622
|
const k = (O = h.data) == null ? void 0 : O.at(0);
|
|
1649
1623
|
k && (p("identity", k.id), y.current = !0);
|
|
1650
1624
|
}, [p, h.data]);
|
|
1651
|
-
const v =
|
|
1625
|
+
const v = ro({
|
|
1652
1626
|
mutationFn: async (k) => {
|
|
1653
1627
|
var L, H;
|
|
1654
|
-
const O =
|
|
1628
|
+
const O = ti(e, t, k), R = performance.now(), I = new Request(O, {
|
|
1655
1629
|
method: n.toUpperCase(),
|
|
1656
1630
|
headers: Object.fromEntries(
|
|
1657
1631
|
k.headers.filter((B) => B.name).map((B) => [B.name, B.value])
|
|
1658
1632
|
)
|
|
1659
1633
|
});
|
|
1660
|
-
k.identity !==
|
|
1661
|
-
const
|
|
1634
|
+
k.identity !== Be && ((H = (L = h.data) == null ? void 0 : L.find((B) => B.id === k.identity)) == null || H.authorizeRequest(I));
|
|
1635
|
+
const V = await Xo(I), Q = performance.now() - R, q = await V.text();
|
|
1662
1636
|
return {
|
|
1663
|
-
status:
|
|
1664
|
-
headers:
|
|
1637
|
+
status: V.status,
|
|
1638
|
+
headers: V.headers,
|
|
1665
1639
|
size: q.length,
|
|
1666
1640
|
body: q,
|
|
1667
1641
|
time: Q
|
|
@@ -1669,27 +1643,27 @@ const fi = {
|
|
|
1669
1643
|
}
|
|
1670
1644
|
}), x = t.split("/").map((k, O, R) => {
|
|
1671
1645
|
var L;
|
|
1672
|
-
const I = k.startsWith("{") && k.endsWith("}"),
|
|
1646
|
+
const I = k.startsWith("{") && k.endsWith("}"), V = k.replace(/[{}]/g, ""), Q = (L = m.pathParams.find((H) => H.name === V)) == null ? void 0 : L.value, q = Q ? /* @__PURE__ */ f.jsx(ln, { backgroundOpacity: "25%", name: k, slug: k, children: encodeURIComponent(Q) }) : /* @__PURE__ */ f.jsx(
|
|
1673
1647
|
"span",
|
|
1674
1648
|
{
|
|
1675
1649
|
className: "underline decoration-wavy decoration-red-500",
|
|
1676
|
-
title: `Missing value for path parameter \`${
|
|
1650
|
+
title: `Missing value for path parameter \`${V}\``,
|
|
1677
1651
|
children: k
|
|
1678
1652
|
}
|
|
1679
1653
|
);
|
|
1680
1654
|
return (
|
|
1681
1655
|
// eslint-disable-next-line react/no-array-index-key
|
|
1682
|
-
/* @__PURE__ */ f.jsxs(
|
|
1656
|
+
/* @__PURE__ */ f.jsxs(at, { children: [
|
|
1683
1657
|
I ? q : k,
|
|
1684
1658
|
O < R.length - 1 && "/",
|
|
1685
1659
|
/* @__PURE__ */ f.jsx("wbr", {})
|
|
1686
1660
|
] }, k + O)
|
|
1687
1661
|
);
|
|
1688
1662
|
});
|
|
1689
|
-
|
|
1663
|
+
ui(
|
|
1690
1664
|
((w = v.data) == null ? void 0 : w.headers.get("Content-Type")) ?? ""
|
|
1691
1665
|
);
|
|
1692
|
-
const g = Array.from(((S = v.data) == null ? void 0 : S.headers.entries()) ?? []), b = m.queryParams.filter((k) => k.active).map((k, O, R) => /* @__PURE__ */ f.jsxs(
|
|
1666
|
+
const g = Array.from(((S = v.data) == null ? void 0 : S.headers.entries()) ?? []), b = m.queryParams.filter((k) => k.active).map((k, O, R) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
1693
1667
|
k.name,
|
|
1694
1668
|
"=",
|
|
1695
1669
|
encodeURIComponent(k.value).replaceAll("%20", "+"),
|
|
@@ -1697,7 +1671,7 @@ const fi = {
|
|
|
1697
1671
|
/* @__PURE__ */ f.jsx("wbr", {})
|
|
1698
1672
|
] }, k.name));
|
|
1699
1673
|
return /* @__PURE__ */ f.jsx(
|
|
1700
|
-
|
|
1674
|
+
ao,
|
|
1701
1675
|
{
|
|
1702
1676
|
register: i,
|
|
1703
1677
|
control: l,
|
|
@@ -1708,7 +1682,7 @@ const fi = {
|
|
|
1708
1682
|
children: /* @__PURE__ */ f.jsx("form", { onSubmit: c((k) => v.mutateAsync(k)), children: /* @__PURE__ */ f.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
1709
1683
|
/* @__PURE__ */ f.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: [
|
|
1710
1684
|
/* @__PURE__ */ f.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1711
|
-
/* @__PURE__ */ f.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md
|
|
1685
|
+
/* @__PURE__ */ f.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1712
1686
|
/* @__PURE__ */ f.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: n.toUpperCase() }),
|
|
1713
1687
|
/* @__PURE__ */ f.jsxs("div", { className: "p-2 font-mono text-xs", children: [
|
|
1714
1688
|
x,
|
|
@@ -1716,23 +1690,23 @@ const fi = {
|
|
|
1716
1690
|
b
|
|
1717
1691
|
] })
|
|
1718
1692
|
] }),
|
|
1719
|
-
/* @__PURE__ */ f.jsx(
|
|
1693
|
+
/* @__PURE__ */ f.jsx(qe, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
|
|
1720
1694
|
] }),
|
|
1721
1695
|
/* @__PURE__ */ f.jsxs(
|
|
1722
|
-
|
|
1696
|
+
wn,
|
|
1723
1697
|
{
|
|
1724
1698
|
defaultValue: o.length > 0 ? "parameters" : "headers",
|
|
1725
1699
|
children: [
|
|
1726
1700
|
/* @__PURE__ */ f.jsxs("div", { className: "flex justify-between", children: [
|
|
1727
|
-
/* @__PURE__ */ f.jsxs(
|
|
1728
|
-
s.length + o.length > 0 && /* @__PURE__ */ f.jsx(
|
|
1729
|
-
/* @__PURE__ */ f.jsxs(
|
|
1701
|
+
/* @__PURE__ */ f.jsxs(_t, { children: [
|
|
1702
|
+
s.length + o.length > 0 && /* @__PURE__ */ f.jsx(Ce, { value: "parameters", children: "Parameters" }),
|
|
1703
|
+
/* @__PURE__ */ f.jsxs(Ce, { value: "headers", children: [
|
|
1730
1704
|
"Headers",
|
|
1731
1705
|
" ",
|
|
1732
1706
|
m.headers.length > 0 && `(${m.headers.length})`
|
|
1733
1707
|
] }),
|
|
1734
1708
|
/* @__PURE__ */ f.jsx(
|
|
1735
|
-
|
|
1709
|
+
Ce,
|
|
1736
1710
|
{
|
|
1737
1711
|
value: "body",
|
|
1738
1712
|
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
@@ -1745,34 +1719,34 @@ const fi = {
|
|
|
1745
1719
|
/* @__PURE__ */ f.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
1746
1720
|
"Auth:",
|
|
1747
1721
|
/* @__PURE__ */ f.jsxs(
|
|
1748
|
-
|
|
1722
|
+
oo,
|
|
1749
1723
|
{
|
|
1750
1724
|
onValueChange: (k) => p("identity", k),
|
|
1751
1725
|
value: m.identity,
|
|
1752
1726
|
defaultValue: m.identity,
|
|
1753
1727
|
children: [
|
|
1754
|
-
/* @__PURE__ */ f.jsx(
|
|
1755
|
-
/* @__PURE__ */ f.jsxs(
|
|
1756
|
-
/* @__PURE__ */ f.jsx(
|
|
1757
|
-
(j = h.data) == null ? void 0 : j.map((k) => /* @__PURE__ */ f.jsx(
|
|
1728
|
+
/* @__PURE__ */ f.jsx(io, { className: "w-[180px] flex", children: h.isPending ? /* @__PURE__ */ f.jsx(Sn, {}) : /* @__PURE__ */ f.jsx(so, {}) }),
|
|
1729
|
+
/* @__PURE__ */ f.jsxs(lo, { align: "center", children: [
|
|
1730
|
+
/* @__PURE__ */ f.jsx($n, { value: Be, children: "None" }),
|
|
1731
|
+
(j = h.data) == null ? void 0 : j.map((k) => /* @__PURE__ */ f.jsx($n, { value: k.id, children: k.label }, k.id))
|
|
1758
1732
|
] })
|
|
1759
1733
|
]
|
|
1760
1734
|
}
|
|
1761
1735
|
)
|
|
1762
1736
|
] })
|
|
1763
1737
|
] }),
|
|
1764
|
-
/* @__PURE__ */ f.jsx(
|
|
1765
|
-
/* @__PURE__ */ f.jsxs(
|
|
1738
|
+
/* @__PURE__ */ f.jsx(Pe, { value: "headers", children: /* @__PURE__ */ f.jsx(ri, { control: l, register: i }) }),
|
|
1739
|
+
/* @__PURE__ */ f.jsxs(Pe, { value: "parameters", children: [
|
|
1766
1740
|
o.length > 0 && /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1767
1741
|
/* @__PURE__ */ f.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1768
|
-
/* @__PURE__ */ f.jsx(
|
|
1742
|
+
/* @__PURE__ */ f.jsx(ai, { control: l })
|
|
1769
1743
|
] }),
|
|
1770
1744
|
s.length > 0 && /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1771
1745
|
/* @__PURE__ */ f.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1772
|
-
/* @__PURE__ */ f.jsx(
|
|
1746
|
+
/* @__PURE__ */ f.jsx(oi, { control: l, queryParams: s })
|
|
1773
1747
|
] })
|
|
1774
1748
|
] }),
|
|
1775
|
-
/* @__PURE__ */ f.jsx(
|
|
1749
|
+
/* @__PURE__ */ f.jsx(Pe, { value: "body", children: /* @__PURE__ */ f.jsx(
|
|
1776
1750
|
"textarea",
|
|
1777
1751
|
{
|
|
1778
1752
|
...i("body"),
|
|
@@ -1793,7 +1767,7 @@ const fi = {
|
|
|
1793
1767
|
"Status: ",
|
|
1794
1768
|
v.data.status,
|
|
1795
1769
|
" ",
|
|
1796
|
-
|
|
1770
|
+
di[v.data.status] ?? ""
|
|
1797
1771
|
] }),
|
|
1798
1772
|
/* @__PURE__ */ f.jsxs("div", { children: [
|
|
1799
1773
|
"Time: ",
|
|
@@ -1806,65 +1780,65 @@ const fi = {
|
|
|
1806
1780
|
" B"
|
|
1807
1781
|
] })
|
|
1808
1782
|
] }) }),
|
|
1809
|
-
/* @__PURE__ */ f.jsxs(
|
|
1810
|
-
/* @__PURE__ */ f.jsxs(
|
|
1811
|
-
/* @__PURE__ */ f.jsx(
|
|
1812
|
-
/* @__PURE__ */ f.jsx(
|
|
1783
|
+
/* @__PURE__ */ f.jsxs(wn, { defaultValue: "response", children: [
|
|
1784
|
+
/* @__PURE__ */ f.jsxs(_t, { children: [
|
|
1785
|
+
/* @__PURE__ */ f.jsx(Ce, { value: "response", children: "Response" }),
|
|
1786
|
+
/* @__PURE__ */ f.jsx(Ce, { value: "headers", children: g.length ? `Headers (${g.length})` : "No headers" })
|
|
1813
1787
|
] }),
|
|
1814
|
-
/* @__PURE__ */ f.jsx(
|
|
1815
|
-
|
|
1788
|
+
/* @__PURE__ */ f.jsx(Pe, { value: "response", children: /* @__PURE__ */ f.jsx(
|
|
1789
|
+
ci,
|
|
1816
1790
|
{
|
|
1817
1791
|
headers: v.data.headers,
|
|
1818
1792
|
body: v.data.body
|
|
1819
1793
|
}
|
|
1820
1794
|
) }),
|
|
1821
|
-
/* @__PURE__ */ f.jsx(
|
|
1795
|
+
/* @__PURE__ */ f.jsx(Pe, { value: "headers", children: /* @__PURE__ */ f.jsxs(an, { className: "grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4", children: [
|
|
1822
1796
|
/* @__PURE__ */ f.jsx("div", { className: "font-semibold", children: "Key" }),
|
|
1823
1797
|
/* @__PURE__ */ f.jsx("div", { className: "font-semibold", children: "Value" }),
|
|
1824
|
-
g.map(([k, O]) => /* @__PURE__ */ f.jsxs(
|
|
1798
|
+
g.map(([k, O]) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
1825
1799
|
/* @__PURE__ */ f.jsx("div", { children: k }),
|
|
1826
1800
|
/* @__PURE__ */ f.jsx("div", { className: "break-words", children: O })
|
|
1827
1801
|
] }, k))
|
|
1828
1802
|
] }) })
|
|
1829
1803
|
] })
|
|
1830
|
-
] }) : /* @__PURE__ */ f.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ f.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: v.isPending ? /* @__PURE__ */ f.jsx(
|
|
1804
|
+
] }) : /* @__PURE__ */ f.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ f.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: v.isPending ? /* @__PURE__ */ f.jsx(Sn, {}) : "Send a request first to see the response here" }) }) })
|
|
1831
1805
|
] }) })
|
|
1832
1806
|
}
|
|
1833
1807
|
);
|
|
1834
|
-
},
|
|
1835
|
-
const [t, n] =
|
|
1836
|
-
return /* @__PURE__ */ f.jsxs(
|
|
1837
|
-
/* @__PURE__ */ f.jsx(
|
|
1838
|
-
|
|
1808
|
+
}, ra = (e) => {
|
|
1809
|
+
const [t, n] = Zt(!1);
|
|
1810
|
+
return /* @__PURE__ */ f.jsxs(Mo, { onOpenChange: (a) => n(a), children: [
|
|
1811
|
+
/* @__PURE__ */ f.jsx(Ho, { asChild: !0, children: e.children ?? /* @__PURE__ */ f.jsx(
|
|
1812
|
+
yr,
|
|
1839
1813
|
{
|
|
1840
1814
|
className: "cursor-pointer text-primary hover:text-primary/80",
|
|
1841
1815
|
size: 16
|
|
1842
1816
|
}
|
|
1843
1817
|
) }),
|
|
1844
1818
|
/* @__PURE__ */ f.jsxs(
|
|
1845
|
-
|
|
1819
|
+
Hr,
|
|
1846
1820
|
{
|
|
1847
1821
|
className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
|
|
1848
1822
|
"aria-describedby": void 0,
|
|
1849
1823
|
children: [
|
|
1850
|
-
/* @__PURE__ */ f.jsx(
|
|
1851
|
-
t && /* @__PURE__ */ f.jsx(
|
|
1824
|
+
/* @__PURE__ */ f.jsx(co, { children: /* @__PURE__ */ f.jsx(Br, { children: "Playground" }) }),
|
|
1825
|
+
t && /* @__PURE__ */ f.jsx(fi, { ...e })
|
|
1852
1826
|
]
|
|
1853
1827
|
}
|
|
1854
1828
|
)
|
|
1855
1829
|
] });
|
|
1856
1830
|
};
|
|
1857
|
-
var
|
|
1831
|
+
var jn = (e, t) => {
|
|
1858
1832
|
const n = e[t.name];
|
|
1859
1833
|
return n === void 0 ? (e[t.name] = t.value, e) : Array.isArray(n) ? (n.push(t.value), e) : (e[t.name] = [n, t.value], e);
|
|
1860
|
-
},
|
|
1834
|
+
}, Nn = "", Tn = `
|
|
1861
1835
|
`, P = class {
|
|
1862
1836
|
/**
|
|
1863
1837
|
* Helper object to format and aggragate lines of code.
|
|
1864
1838
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
1865
1839
|
*/
|
|
1866
1840
|
constructor({ indent: e, join: t } = {}) {
|
|
1867
|
-
this.postProcessors = [], this.code = [], this.indentationCharacter =
|
|
1841
|
+
this.postProcessors = [], this.code = [], this.indentationCharacter = Nn, this.lineJoin = Tn, this.indentLine = (n, a = 0) => `${this.indentationCharacter.repeat(a)}${n}`, this.unshift = (n, a) => {
|
|
1868
1842
|
const s = this.indentLine(n, a);
|
|
1869
1843
|
this.code.unshift(s);
|
|
1870
1844
|
}, this.push = (n, a) => {
|
|
@@ -1877,18 +1851,18 @@ var wn = (e, t) => {
|
|
|
1877
1851
|
return this.postProcessors.reduce((s, o) => o(s), n);
|
|
1878
1852
|
}, this.addPostProcessor = (n) => {
|
|
1879
1853
|
this.postProcessors = [...this.postProcessors, n];
|
|
1880
|
-
}, this.indentationCharacter = e ||
|
|
1854
|
+
}, this.indentationCharacter = e || Nn, this.lineJoin = t ?? Tn;
|
|
1881
1855
|
}
|
|
1882
|
-
},
|
|
1856
|
+
}, pi = function(e) {
|
|
1883
1857
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
1884
|
-
},
|
|
1858
|
+
}, mi = function(e) {
|
|
1885
1859
|
var t = typeof e;
|
|
1886
1860
|
return e !== null && (t === "object" || t === "function");
|
|
1887
|
-
},
|
|
1888
|
-
Object.defineProperty(
|
|
1889
|
-
|
|
1890
|
-
const
|
|
1891
|
-
var
|
|
1861
|
+
}, cn = {};
|
|
1862
|
+
Object.defineProperty(cn, "__esModule", { value: !0 });
|
|
1863
|
+
cn.default = (e) => Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
1864
|
+
const hi = pi, yi = mi, gi = cn.default;
|
|
1865
|
+
var vi = (e, t, n) => {
|
|
1892
1866
|
const a = [];
|
|
1893
1867
|
return function s(o, r, i) {
|
|
1894
1868
|
r = r || {}, r.indent = r.indent || " ", i = i || "";
|
|
@@ -1915,7 +1889,7 @@ var bi = (e, t, n) => {
|
|
|
1915
1889
|
};
|
|
1916
1890
|
if (a.indexOf(o) !== -1)
|
|
1917
1891
|
return '"[Circular]"';
|
|
1918
|
-
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" ||
|
|
1892
|
+
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" || hi(o))
|
|
1919
1893
|
return String(o);
|
|
1920
1894
|
if (o instanceof Date)
|
|
1921
1895
|
return `new Date('${o.toISOString()}')`;
|
|
@@ -1930,8 +1904,8 @@ var bi = (e, t, n) => {
|
|
|
1930
1904
|
}).join("") + l.pad + "]";
|
|
1931
1905
|
return a.pop(), c(u);
|
|
1932
1906
|
}
|
|
1933
|
-
if (
|
|
1934
|
-
let u = Object.keys(o).concat(
|
|
1907
|
+
if (yi(o)) {
|
|
1908
|
+
let u = Object.keys(o).concat(gi(o));
|
|
1935
1909
|
if (r.filter && (u = u.filter((d) => r.filter(o, d))), u.length === 0)
|
|
1936
1910
|
return "{}";
|
|
1937
1911
|
a.push(o);
|
|
@@ -1946,13 +1920,13 @@ var bi = (e, t, n) => {
|
|
|
1946
1920
|
` ? "\\n" : "\\r"), r.singleQuotes === !1 ? (o = o.replace(/"/g, '\\"'), `"${o}"`) : (o = o.replace(/\\?'/g, "\\'"), `'${o}'`);
|
|
1947
1921
|
}(e, t, n);
|
|
1948
1922
|
};
|
|
1949
|
-
const K = /* @__PURE__ */
|
|
1950
|
-
function
|
|
1923
|
+
const K = /* @__PURE__ */ go(vi);
|
|
1924
|
+
function We(e, t = {}) {
|
|
1951
1925
|
const { delimiter: n = '"', escapeChar: a = "\\", escapeNewlines: s = !0 } = t;
|
|
1952
1926
|
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
1953
1927
|
` ? 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("");
|
|
1954
1928
|
}
|
|
1955
|
-
var
|
|
1929
|
+
var Je = (e) => We(e, { delimiter: "'" }), W = (e) => We(e, { delimiter: '"' }), bi = {
|
|
1956
1930
|
info: {
|
|
1957
1931
|
key: "libcurl",
|
|
1958
1932
|
title: "Libcurl",
|
|
@@ -1968,7 +1942,7 @@ var We = (e) => Ve(e, { delimiter: "'" }), W = (e) => Ve(e, { delimiter: '"' }),
|
|
|
1968
1942
|
o(`headers = curl_slist_append(headers, "${c}: ${W(n[c])}");`);
|
|
1969
1943
|
}), o("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), o(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), s.text && (r(), o(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), o("CURLcode ret = curl_easy_perform(hnd);"), i();
|
|
1970
1944
|
}
|
|
1971
|
-
},
|
|
1945
|
+
}, xi = {
|
|
1972
1946
|
info: {
|
|
1973
1947
|
key: "c",
|
|
1974
1948
|
title: "C",
|
|
@@ -1976,30 +1950,30 @@ var We = (e) => Ve(e, { delimiter: "'" }), W = (e) => Ve(e, { delimiter: '"' }),
|
|
|
1976
1950
|
cli: "c"
|
|
1977
1951
|
},
|
|
1978
1952
|
clientsById: {
|
|
1979
|
-
libcurl:
|
|
1953
|
+
libcurl: bi
|
|
1980
1954
|
}
|
|
1981
1955
|
}, X = (e, t) => Object.keys(e).find((n) => n.toLowerCase() === t.toLowerCase()), de = (e, t) => {
|
|
1982
1956
|
const n = X(e, t);
|
|
1983
1957
|
if (n)
|
|
1984
1958
|
return e[n];
|
|
1985
|
-
},
|
|
1959
|
+
}, vt = (e, t) => !!X(e, t), ki = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
1986
1960
|
(t) => e.indexOf(t) > -1
|
|
1987
|
-
),
|
|
1961
|
+
), On = class {
|
|
1988
1962
|
constructor(e) {
|
|
1989
1963
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
1990
1964
|
}
|
|
1991
|
-
},
|
|
1965
|
+
}, $i = class {
|
|
1992
1966
|
constructor(e) {
|
|
1993
1967
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
1994
1968
|
}
|
|
1995
|
-
},
|
|
1969
|
+
}, aa = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), oa = (e) => e === void 0 ? !0 : aa(e) === "object" ? Object.keys(e).length === 0 : !1, Cn = (e) => (Object.keys(e).filter((t) => oa(e[t])).forEach((t) => {
|
|
1996
1970
|
delete e[t];
|
|
1997
|
-
}), e),
|
|
1971
|
+
}), e), it = (e, t) => {
|
|
1998
1972
|
const n = " ".repeat(e);
|
|
1999
1973
|
return t.replace(/\n/g, `
|
|
2000
1974
|
${n}`);
|
|
2001
|
-
},
|
|
2002
|
-
switch (
|
|
1975
|
+
}, Ut = (e) => {
|
|
1976
|
+
switch (aa(e)) {
|
|
2003
1977
|
case "string":
|
|
2004
1978
|
return `"${e.replace(/"/g, '\\"')}"`;
|
|
2005
1979
|
case "file":
|
|
@@ -2012,20 +1986,20 @@ ${n}`);
|
|
|
2012
1986
|
return `#"${e.source}"`;
|
|
2013
1987
|
case "object": {
|
|
2014
1988
|
const t = Object.keys(e).reduce((n, a) => {
|
|
2015
|
-
const s =
|
|
1989
|
+
const s = it(a.length + 2, Ut(e[a]));
|
|
2016
1990
|
return `${n}:${a} ${s}
|
|
2017
1991
|
`;
|
|
2018
1992
|
}, "").trim();
|
|
2019
|
-
return `{${
|
|
1993
|
+
return `{${it(1, t)}}`;
|
|
2020
1994
|
}
|
|
2021
1995
|
case "array": {
|
|
2022
|
-
const t = e.reduce((n, a) => `${n} ${
|
|
2023
|
-
return `[${
|
|
1996
|
+
const t = e.reduce((n, a) => `${n} ${Ut(a)}`, "").trim();
|
|
1997
|
+
return `[${it(1, t)}]`;
|
|
2024
1998
|
}
|
|
2025
1999
|
default:
|
|
2026
2000
|
return e.toString();
|
|
2027
2001
|
}
|
|
2028
|
-
},
|
|
2002
|
+
}, Si = {
|
|
2029
2003
|
info: {
|
|
2030
2004
|
key: "clj_http",
|
|
2031
2005
|
title: "clj-http",
|
|
@@ -2044,7 +2018,7 @@ ${n}`);
|
|
|
2044
2018
|
switch (n.mimeType) {
|
|
2045
2019
|
case "application/json":
|
|
2046
2020
|
{
|
|
2047
|
-
c["content-type"] = new
|
|
2021
|
+
c["content-type"] = new On("json"), c["form-params"] = n.jsonObj;
|
|
2048
2022
|
const u = X(c.headers, "content-type");
|
|
2049
2023
|
u && delete c.headers[u];
|
|
2050
2024
|
}
|
|
@@ -2067,7 +2041,7 @@ ${n}`);
|
|
|
2067
2041
|
if (n.params) {
|
|
2068
2042
|
c.multipart = n.params.map((p) => p.fileName && !p.value ? {
|
|
2069
2043
|
name: p.name,
|
|
2070
|
-
content: new
|
|
2044
|
+
content: new $i(p.fileName)
|
|
2071
2045
|
} : {
|
|
2072
2046
|
name: p.name,
|
|
2073
2047
|
content: p.value
|
|
@@ -2081,31 +2055,31 @@ ${n}`);
|
|
|
2081
2055
|
switch (de(c.headers, "accept")) {
|
|
2082
2056
|
case "application/json":
|
|
2083
2057
|
{
|
|
2084
|
-
c.accept = new
|
|
2058
|
+
c.accept = new On("json");
|
|
2085
2059
|
const u = X(c.headers, "accept");
|
|
2086
2060
|
u && delete c.headers[u];
|
|
2087
2061
|
}
|
|
2088
2062
|
break;
|
|
2089
2063
|
}
|
|
2090
2064
|
if (r(`(require '[clj-http.client :as client])
|
|
2091
|
-
`),
|
|
2065
|
+
`), oa(Cn(c)))
|
|
2092
2066
|
r(`(client/${t} "${a}")`);
|
|
2093
2067
|
else {
|
|
2094
|
-
const u = 11 + t.length + a.length, p =
|
|
2068
|
+
const u = 11 + t.length + a.length, p = it(u, Ut(Cn(c)));
|
|
2095
2069
|
r(`(client/${t} "${a}" ${p})`);
|
|
2096
2070
|
}
|
|
2097
2071
|
return i();
|
|
2098
2072
|
}
|
|
2099
|
-
},
|
|
2073
|
+
}, wi = {
|
|
2100
2074
|
info: {
|
|
2101
2075
|
key: "clojure",
|
|
2102
2076
|
title: "Clojure",
|
|
2103
2077
|
default: "clj_http"
|
|
2104
2078
|
},
|
|
2105
2079
|
clientsById: {
|
|
2106
|
-
clj_http:
|
|
2080
|
+
clj_http: Si
|
|
2107
2081
|
}
|
|
2108
|
-
},
|
|
2082
|
+
}, ji = (e) => {
|
|
2109
2083
|
let t = de(e, "accept-encoding");
|
|
2110
2084
|
if (!t)
|
|
2111
2085
|
return [];
|
|
@@ -2122,7 +2096,7 @@ ${n}`);
|
|
|
2122
2096
|
}
|
|
2123
2097
|
});
|
|
2124
2098
|
}), a;
|
|
2125
|
-
},
|
|
2099
|
+
}, Ni = {
|
|
2126
2100
|
info: {
|
|
2127
2101
|
key: "httpclient",
|
|
2128
2102
|
title: "HttpClient",
|
|
@@ -2138,7 +2112,7 @@ ${n}`);
|
|
|
2138
2112
|
}, { push: r, join: i } = new P({ indent: o.indent });
|
|
2139
2113
|
r("using System.Net.Http.Headers;");
|
|
2140
2114
|
let l = "";
|
|
2141
|
-
const c = !!e.cookie, u =
|
|
2115
|
+
const c = !!e.cookie, u = ji(e);
|
|
2142
2116
|
(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("{");
|
|
2143
2117
|
const p = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
2144
2118
|
n = n.toUpperCase(), n && p.includes(n) ? n = `HttpMethod.${n[0]}${n.substring(1).toLowerCase()}` : n = `new HttpMethod("${n}")`, r(`Method = ${n},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
|
|
@@ -2175,10 +2149,10 @@ ${n}`);
|
|
|
2175
2149
|
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("}"), i();
|
|
2176
2150
|
}
|
|
2177
2151
|
};
|
|
2178
|
-
function
|
|
2152
|
+
function Ti(e) {
|
|
2179
2153
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
2180
2154
|
}
|
|
2181
|
-
var
|
|
2155
|
+
var Oi = {
|
|
2182
2156
|
info: {
|
|
2183
2157
|
key: "restsharp",
|
|
2184
2158
|
title: "RestSharp",
|
|
@@ -2228,11 +2202,11 @@ var Ci = {
|
|
|
2228
2202
|
if (!s.text) break;
|
|
2229
2203
|
r(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
2230
2204
|
}
|
|
2231
|
-
return r(`var response = await client.${
|
|
2205
|
+
return r(`var response = await client.${Ti(e)}Async(request);
|
|
2232
2206
|
`), r(`Console.WriteLine("{0}", response.Content);
|
|
2233
2207
|
`), i();
|
|
2234
2208
|
}
|
|
2235
|
-
},
|
|
2209
|
+
}, Ci = {
|
|
2236
2210
|
info: {
|
|
2237
2211
|
key: "csharp",
|
|
2238
2212
|
title: "C#",
|
|
@@ -2240,10 +2214,10 @@ var Ci = {
|
|
|
2240
2214
|
cli: "dotnet"
|
|
2241
2215
|
},
|
|
2242
2216
|
clientsById: {
|
|
2243
|
-
httpclient:
|
|
2244
|
-
restsharp:
|
|
2217
|
+
httpclient: Ni,
|
|
2218
|
+
restsharp: Oi
|
|
2245
2219
|
}
|
|
2246
|
-
},
|
|
2220
|
+
}, Pi = {
|
|
2247
2221
|
info: {
|
|
2248
2222
|
key: "native",
|
|
2249
2223
|
title: "NewRequest",
|
|
@@ -2261,7 +2235,7 @@ var Ci = {
|
|
|
2261
2235
|
r(`req.Header.Add("${g}", "${W(n[g])}")`, m);
|
|
2262
2236
|
}), o()), r(`res, ${d} := ${x}.Do(req)`, m), h(), u && (o(), r("defer res.Body.Close()", m), r(`body, ${d} := io.ReadAll(res.Body)`, m), h()), o(), u && r("fmt.Println(string(body))", m), l && (o(), r("}")), i();
|
|
2263
2237
|
}
|
|
2264
|
-
},
|
|
2238
|
+
}, Ei = {
|
|
2265
2239
|
info: {
|
|
2266
2240
|
key: "go",
|
|
2267
2241
|
title: "Go",
|
|
@@ -2269,10 +2243,10 @@ var Ci = {
|
|
|
2269
2243
|
cli: "go"
|
|
2270
2244
|
},
|
|
2271
2245
|
clientsById: {
|
|
2272
|
-
native:
|
|
2246
|
+
native: Pi
|
|
2273
2247
|
}
|
|
2274
|
-
},
|
|
2275
|
-
`,
|
|
2248
|
+
}, Pn = `\r
|
|
2249
|
+
`, Ri = {
|
|
2276
2250
|
info: {
|
|
2277
2251
|
key: "http1.1",
|
|
2278
2252
|
title: "HTTP/1.1",
|
|
@@ -2286,7 +2260,7 @@ var Ci = {
|
|
|
2286
2260
|
autoContentLength: !0,
|
|
2287
2261
|
autoHost: !0,
|
|
2288
2262
|
...r
|
|
2289
|
-
}, { blank: l, push: c, join: u } = new P({ indent: "", join:
|
|
2263
|
+
}, { blank: l, push: c, join: u } = new P({ indent: "", join: Pn }), p = i.absoluteURI ? t : n.path;
|
|
2290
2264
|
c(`${e} ${p} ${a}`);
|
|
2291
2265
|
const d = Object.keys(s);
|
|
2292
2266
|
if (d.forEach((y) => {
|
|
@@ -2298,18 +2272,18 @@ var Ci = {
|
|
|
2298
2272
|
}
|
|
2299
2273
|
l();
|
|
2300
2274
|
const m = u(), h = o.text || "";
|
|
2301
|
-
return `${m}${
|
|
2275
|
+
return `${m}${Pn}${h}`;
|
|
2302
2276
|
}
|
|
2303
|
-
},
|
|
2277
|
+
}, Ai = {
|
|
2304
2278
|
info: {
|
|
2305
2279
|
key: "http",
|
|
2306
2280
|
title: "HTTP",
|
|
2307
2281
|
default: "http1.1"
|
|
2308
2282
|
},
|
|
2309
2283
|
clientsById: {
|
|
2310
|
-
"http1.1":
|
|
2284
|
+
"http1.1": Ri
|
|
2311
2285
|
}
|
|
2312
|
-
},
|
|
2286
|
+
}, Fi = {
|
|
2313
2287
|
info: {
|
|
2314
2288
|
key: "asynchttp",
|
|
2315
2289
|
title: "AsyncHttp",
|
|
@@ -2326,7 +2300,7 @@ var Ci = {
|
|
|
2326
2300
|
i(`.setHeader("${c}", "${W(t[c])}")`, 1);
|
|
2327
2301
|
}), n.text && i(`.setBody(${JSON.stringify(n.text)})`, 1), i(".execute()", 1), i(".toCompletableFuture()", 1), i(".thenAccept(System.out::println)", 1), i(".join();", 1), r(), i("client.close();"), l();
|
|
2328
2302
|
}
|
|
2329
|
-
},
|
|
2303
|
+
}, qi = {
|
|
2330
2304
|
info: {
|
|
2331
2305
|
key: "nethttp",
|
|
2332
2306
|
title: "java.net.http",
|
|
@@ -2348,7 +2322,7 @@ var Ci = {
|
|
|
2348
2322
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
2349
2323
|
), r("System.out.println(response.body());"), i();
|
|
2350
2324
|
}
|
|
2351
|
-
},
|
|
2325
|
+
}, Ii = {
|
|
2352
2326
|
info: {
|
|
2353
2327
|
key: "okhttp",
|
|
2354
2328
|
title: "OkHttp",
|
|
@@ -2365,7 +2339,7 @@ var Ci = {
|
|
|
2365
2339
|
r(`.addHeader("${p}", "${W(a[p])}")`, 1);
|
|
2366
2340
|
}), r(".build();", 1), i(), r("Response response = client.newCall(request).execute();"), l();
|
|
2367
2341
|
}
|
|
2368
|
-
},
|
|
2342
|
+
}, _i = {
|
|
2369
2343
|
info: {
|
|
2370
2344
|
key: "unirest",
|
|
2371
2345
|
title: "Unirest",
|
|
@@ -2382,19 +2356,19 @@ var Ci = {
|
|
|
2382
2356
|
i(`.header("${c}", "${W(t[c])}")`, 1);
|
|
2383
2357
|
}), n.text && i(`.body(${JSON.stringify(n.text)})`, 1), i(".asString();", 1), r();
|
|
2384
2358
|
}
|
|
2385
|
-
},
|
|
2359
|
+
}, Li = {
|
|
2386
2360
|
info: {
|
|
2387
2361
|
key: "java",
|
|
2388
2362
|
title: "Java",
|
|
2389
2363
|
default: "unirest"
|
|
2390
2364
|
},
|
|
2391
2365
|
clientsById: {
|
|
2392
|
-
asynchttp:
|
|
2393
|
-
nethttp:
|
|
2394
|
-
okhttp:
|
|
2395
|
-
unirest:
|
|
2366
|
+
asynchttp: Fi,
|
|
2367
|
+
nethttp: qi,
|
|
2368
|
+
okhttp: Ii,
|
|
2369
|
+
unirest: _i
|
|
2396
2370
|
}
|
|
2397
|
-
},
|
|
2371
|
+
}, Ui = {
|
|
2398
2372
|
info: {
|
|
2399
2373
|
key: "axios",
|
|
2400
2374
|
title: "Axios",
|
|
@@ -2438,7 +2412,7 @@ var Ci = {
|
|
|
2438
2412
|
}).replace('"[form]"', "form");
|
|
2439
2413
|
return l(`const options = ${d};`), i(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
|
|
2440
2414
|
}
|
|
2441
|
-
},
|
|
2415
|
+
}, Mi = {
|
|
2442
2416
|
info: {
|
|
2443
2417
|
key: "fetch",
|
|
2444
2418
|
title: "fetch",
|
|
@@ -2491,7 +2465,7 @@ var Ci = {
|
|
|
2491
2465
|
})};`
|
|
2492
2466
|
), 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), i();
|
|
2493
2467
|
}
|
|
2494
|
-
},
|
|
2468
|
+
}, Hi = {
|
|
2495
2469
|
info: {
|
|
2496
2470
|
key: "jquery",
|
|
2497
2471
|
title: "jQuery",
|
|
@@ -2523,7 +2497,7 @@ var Ci = {
|
|
|
2523
2497
|
break;
|
|
2524
2498
|
if (i("const form = new FormData();"), a.params.forEach((d) => {
|
|
2525
2499
|
i(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
2526
|
-
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]",
|
|
2500
|
+
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", vt(n, "content-type") && (p = de(n, "content-type")) != null && p.includes("boundary")) {
|
|
2527
2501
|
const d = X(n, "content-type");
|
|
2528
2502
|
d && delete c.headers[d];
|
|
2529
2503
|
}
|
|
@@ -2535,7 +2509,7 @@ var Ci = {
|
|
|
2535
2509
|
const u = K(c, { indent: o.indent }).replace("'[form]'", "form");
|
|
2536
2510
|
return i(`const settings = ${u};`), r(), i("$.ajax(settings).done(function (response) {"), i("console.log(response);", 1), i("});"), l();
|
|
2537
2511
|
}
|
|
2538
|
-
},
|
|
2512
|
+
}, Bi = {
|
|
2539
2513
|
info: {
|
|
2540
2514
|
key: "xhr",
|
|
2541
2515
|
title: "XMLHttpRequest",
|
|
@@ -2563,7 +2537,7 @@ var Ci = {
|
|
|
2563
2537
|
break;
|
|
2564
2538
|
if (i("const data = new FormData();"), e.params.forEach((u) => {
|
|
2565
2539
|
i(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
2566
|
-
}),
|
|
2540
|
+
}), vt(t, "content-type") && (c = de(t, "content-type")) != null && c.includes("boundary")) {
|
|
2567
2541
|
const u = X(t, "content-type");
|
|
2568
2542
|
u && delete t[u];
|
|
2569
2543
|
}
|
|
@@ -2573,20 +2547,20 @@ var Ci = {
|
|
|
2573
2547
|
i(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
|
|
2574
2548
|
}
|
|
2575
2549
|
return i("const xhr = new XMLHttpRequest();"), o.cors && i("xhr.withCredentials = true;"), r(), i("xhr.addEventListener('readystatechange', function () {"), i("if (this.readyState === this.DONE) {", 1), i("console.log(this.responseText);", 2), i("}", 1), i("});"), r(), i(`xhr.open('${n}', '${a}');`), Object.keys(t).forEach((u) => {
|
|
2576
|
-
i(`xhr.setRequestHeader('${u}', '${
|
|
2550
|
+
i(`xhr.setRequestHeader('${u}', '${Je(t[u])}');`);
|
|
2577
2551
|
}), r(), i("xhr.send(data);"), l();
|
|
2578
2552
|
}
|
|
2579
|
-
},
|
|
2553
|
+
}, Di = {
|
|
2580
2554
|
info: {
|
|
2581
2555
|
key: "javascript",
|
|
2582
2556
|
title: "JavaScript",
|
|
2583
2557
|
default: "xhr"
|
|
2584
2558
|
},
|
|
2585
2559
|
clientsById: {
|
|
2586
|
-
xhr:
|
|
2587
|
-
axios:
|
|
2588
|
-
fetch:
|
|
2589
|
-
jquery:
|
|
2560
|
+
xhr: Bi,
|
|
2561
|
+
axios: Ui,
|
|
2562
|
+
fetch: Mi,
|
|
2563
|
+
jquery: Hi
|
|
2590
2564
|
}
|
|
2591
2565
|
}, Vi = {
|
|
2592
2566
|
info: {
|
|
@@ -2622,7 +2596,7 @@ var Ci = {
|
|
|
2622
2596
|
}
|
|
2623
2597
|
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, n.indent);
|
|
2624
2598
|
}
|
|
2625
|
-
},
|
|
2599
|
+
}, zi = {
|
|
2626
2600
|
info: {
|
|
2627
2601
|
key: "json",
|
|
2628
2602
|
title: "JSON",
|
|
@@ -2631,7 +2605,7 @@ var Ci = {
|
|
|
2631
2605
|
clientsById: {
|
|
2632
2606
|
native: Vi
|
|
2633
2607
|
}
|
|
2634
|
-
},
|
|
2608
|
+
}, Wi = {
|
|
2635
2609
|
info: {
|
|
2636
2610
|
key: "okhttp",
|
|
2637
2611
|
title: "OkHttp",
|
|
@@ -2648,16 +2622,16 @@ var Ci = {
|
|
|
2648
2622
|
l(`.addHeader("${p}", "${W(a[p])}")`, 1);
|
|
2649
2623
|
}), l(".build()", 1), r(), l("val response = client.newCall(request).execute()"), i();
|
|
2650
2624
|
}
|
|
2651
|
-
},
|
|
2625
|
+
}, Ji = {
|
|
2652
2626
|
info: {
|
|
2653
2627
|
key: "kotlin",
|
|
2654
2628
|
title: "Kotlin",
|
|
2655
2629
|
default: "okhttp"
|
|
2656
2630
|
},
|
|
2657
2631
|
clientsById: {
|
|
2658
|
-
okhttp:
|
|
2632
|
+
okhttp: Wi
|
|
2659
2633
|
}
|
|
2660
|
-
},
|
|
2634
|
+
}, Gi = {
|
|
2661
2635
|
info: {
|
|
2662
2636
|
key: "axios",
|
|
2663
2637
|
title: "Axios",
|
|
@@ -2691,7 +2665,7 @@ var Ci = {
|
|
|
2691
2665
|
const p = K(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
2692
2666
|
return l(`const options = ${p};`), 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), i();
|
|
2693
2667
|
}
|
|
2694
|
-
},
|
|
2668
|
+
}, Ki = {
|
|
2695
2669
|
info: {
|
|
2696
2670
|
key: "fetch",
|
|
2697
2671
|
title: "Fetch",
|
|
@@ -2751,7 +2725,7 @@ var Ci = {
|
|
|
2751
2725
|
});
|
|
2752
2726
|
return c(`const options = ${h};`), l(), i && p("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")');
|
|
2753
2727
|
}
|
|
2754
|
-
},
|
|
2728
|
+
}, Qi = {
|
|
2755
2729
|
info: {
|
|
2756
2730
|
key: "native",
|
|
2757
2731
|
title: "HTTP",
|
|
@@ -2790,7 +2764,7 @@ var Ci = {
|
|
|
2790
2764
|
}
|
|
2791
2765
|
return l("req.end();"), i();
|
|
2792
2766
|
}
|
|
2793
|
-
},
|
|
2767
|
+
}, Yi = {
|
|
2794
2768
|
info: {
|
|
2795
2769
|
key: "request",
|
|
2796
2770
|
title: "Request",
|
|
@@ -2843,7 +2817,7 @@ var Ci = {
|
|
|
2843
2817
|
c(`jar.setCookie(request.cookie('${encodeURIComponent(y)}=${encodeURIComponent(v)}'), '${t}');`);
|
|
2844
2818
|
}), u(), m((y) => y.replace(/'JAR'/, "jar"))), l && d("const fs = require('fs');"), c(`const options = ${K(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("});"), p();
|
|
2845
2819
|
}
|
|
2846
|
-
},
|
|
2820
|
+
}, Xi = {
|
|
2847
2821
|
info: {
|
|
2848
2822
|
key: "unirest",
|
|
2849
2823
|
title: "Unirest",
|
|
@@ -2884,7 +2858,7 @@ var Ci = {
|
|
|
2884
2858
|
}
|
|
2885
2859
|
return l && m("const fs = require('fs');"), d("req.end(function (res) {"), d("if (res.error) throw new Error(res.error);", 1), u(), d("console.log(res.body);", 1), d("});"), p();
|
|
2886
2860
|
}
|
|
2887
|
-
},
|
|
2861
|
+
}, Zi = {
|
|
2888
2862
|
info: {
|
|
2889
2863
|
key: "node",
|
|
2890
2864
|
title: "Node.js",
|
|
@@ -2892,27 +2866,27 @@ var Ci = {
|
|
|
2892
2866
|
cli: "node %s"
|
|
2893
2867
|
},
|
|
2894
2868
|
clientsById: {
|
|
2895
|
-
native:
|
|
2896
|
-
request:
|
|
2897
|
-
unirest:
|
|
2898
|
-
axios:
|
|
2899
|
-
fetch:
|
|
2900
|
-
}
|
|
2901
|
-
},
|
|
2902
|
-
const s = `${e} *${t} = `, o =
|
|
2869
|
+
native: Qi,
|
|
2870
|
+
request: Yi,
|
|
2871
|
+
unirest: Xi,
|
|
2872
|
+
axios: Gi,
|
|
2873
|
+
fetch: Ki
|
|
2874
|
+
}
|
|
2875
|
+
}, wt = (e, t, n, a) => {
|
|
2876
|
+
const s = `${e} *${t} = `, o = Mt(n, a ? s.length : void 0);
|
|
2903
2877
|
return `${s}${o};`;
|
|
2904
|
-
},
|
|
2878
|
+
}, Mt = (e, t) => {
|
|
2905
2879
|
const n = t === void 0 ? ", " : `,
|
|
2906
2880
|
${" ".repeat(t)}`;
|
|
2907
2881
|
switch (Object.prototype.toString.call(e)) {
|
|
2908
2882
|
case "[object Number]":
|
|
2909
2883
|
return `@${e}`;
|
|
2910
2884
|
case "[object Array]":
|
|
2911
|
-
return `@[ ${e.map((s) =>
|
|
2885
|
+
return `@[ ${e.map((s) => Mt(s)).join(n)} ]`;
|
|
2912
2886
|
case "[object Object]": {
|
|
2913
2887
|
const a = [];
|
|
2914
2888
|
return Object.keys(e).forEach((s) => {
|
|
2915
|
-
a.push(`@"${s}": ${
|
|
2889
|
+
a.push(`@"${s}": ${Mt(e[s])}`);
|
|
2916
2890
|
}), `@{ ${a.join(n)} }`;
|
|
2917
2891
|
}
|
|
2918
2892
|
case "[object Boolean]":
|
|
@@ -2920,7 +2894,7 @@ var Ci = {
|
|
|
2920
2894
|
default:
|
|
2921
2895
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2922
2896
|
}
|
|
2923
|
-
},
|
|
2897
|
+
}, es = {
|
|
2924
2898
|
info: {
|
|
2925
2899
|
key: "nsurlsession",
|
|
2926
2900
|
title: "NSURLSession",
|
|
@@ -2939,7 +2913,7 @@ var Ci = {
|
|
|
2939
2913
|
hasHeaders: !1,
|
|
2940
2914
|
hasBody: !1
|
|
2941
2915
|
};
|
|
2942
|
-
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), r(
|
|
2916
|
+
if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), r(wt("NSDictionary", "headers", e, o.pretty))), t.text || t.jsonObj || t.params)
|
|
2943
2917
|
switch (c.hasBody = !0, t.mimeType) {
|
|
2944
2918
|
case "application/x-www-form-urlencoded":
|
|
2945
2919
|
if ((u = t.params) != null && u.length) {
|
|
@@ -2954,10 +2928,10 @@ var Ci = {
|
|
|
2954
2928
|
c.hasBody = !1;
|
|
2955
2929
|
break;
|
|
2956
2930
|
case "application/json":
|
|
2957
|
-
t.jsonObj && (r(
|
|
2931
|
+
t.jsonObj && (r(wt("NSDictionary", "parameters", t.jsonObj, o.pretty)), l(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
|
|
2958
2932
|
break;
|
|
2959
2933
|
case "multipart/form-data":
|
|
2960
|
-
r(
|
|
2934
|
+
r(wt("NSArray", "parameters", t.params || [], o.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(
|
|
2961
2935
|
'[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
|
|
2962
2936
|
2
|
|
2963
2937
|
), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
|
|
@@ -2977,16 +2951,16 @@ var Ci = {
|
|
|
2977
2951
|
2
|
|
2978
2952
|
), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), i();
|
|
2979
2953
|
}
|
|
2980
|
-
},
|
|
2954
|
+
}, ts = {
|
|
2981
2955
|
info: {
|
|
2982
2956
|
key: "objc",
|
|
2983
2957
|
title: "Objective-C",
|
|
2984
2958
|
default: "nsurlsession"
|
|
2985
2959
|
},
|
|
2986
2960
|
clientsById: {
|
|
2987
|
-
nsurlsession:
|
|
2961
|
+
nsurlsession: es
|
|
2988
2962
|
}
|
|
2989
|
-
},
|
|
2963
|
+
}, ns = {
|
|
2990
2964
|
info: {
|
|
2991
2965
|
key: "cohttp",
|
|
2992
2966
|
title: "CoHTTP",
|
|
@@ -3012,14 +2986,14 @@ var Ci = {
|
|
|
3012
2986
|
const p = u.length ? "~headers " : "", d = n.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
3013
2987
|
return i(`Client.call ${p}${d}${m} uri`), i(">>= fun (res, body_stream) ->"), i("(* Do stuff with the result *)", 1), c();
|
|
3014
2988
|
}
|
|
3015
|
-
},
|
|
2989
|
+
}, rs = {
|
|
3016
2990
|
info: {
|
|
3017
2991
|
key: "ocaml",
|
|
3018
2992
|
title: "OCaml",
|
|
3019
2993
|
default: "cohttp"
|
|
3020
2994
|
},
|
|
3021
2995
|
clientsById: {
|
|
3022
|
-
cohttp:
|
|
2996
|
+
cohttp: ns
|
|
3023
2997
|
}
|
|
3024
2998
|
}, F = (e, t, n) => {
|
|
3025
2999
|
switch (n = n || "", t = t || "", Object.prototype.toString.call(e)) {
|
|
@@ -3030,7 +3004,7 @@ var Ci = {
|
|
|
3030
3004
|
case "[object Undefined]":
|
|
3031
3005
|
return "null";
|
|
3032
3006
|
case "[object String]":
|
|
3033
|
-
return `'${
|
|
3007
|
+
return `'${We(e, { delimiter: "'", escapeNewlines: !1 })}'`;
|
|
3034
3008
|
case "[object Number]":
|
|
3035
3009
|
return e.toString();
|
|
3036
3010
|
case "[object Array]": {
|
|
@@ -3052,7 +3026,7 @@ ${n}]`;
|
|
|
3052
3026
|
default:
|
|
3053
3027
|
return "null";
|
|
3054
3028
|
}
|
|
3055
|
-
},
|
|
3029
|
+
}, En = [
|
|
3056
3030
|
"ACL",
|
|
3057
3031
|
"BASELINE_CONTROL",
|
|
3058
3032
|
"CHECKIN",
|
|
@@ -3080,7 +3054,7 @@ ${n}]`;
|
|
|
3080
3054
|
"UNLOCK",
|
|
3081
3055
|
"UPDATE",
|
|
3082
3056
|
"VERSION_CONTROL"
|
|
3083
|
-
],
|
|
3057
|
+
], as = {
|
|
3084
3058
|
info: {
|
|
3085
3059
|
key: "curl",
|
|
3086
3060
|
title: "cURL",
|
|
@@ -3158,7 +3132,7 @@ ${c}` });
|
|
|
3158
3132
|
return S.length && (b.push("CURLOPT_HTTPHEADER => ["), b.push(S.join(`,
|
|
3159
3133
|
${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), v(), y("curl_close($curl);"), v(), y("if ($err) {"), y(p ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !d && l && (v(), y("?>")), x();
|
|
3160
3134
|
}
|
|
3161
|
-
},
|
|
3135
|
+
}, os = {
|
|
3162
3136
|
info: {
|
|
3163
3137
|
key: "guzzle",
|
|
3164
3138
|
title: "Guzzle",
|
|
@@ -3194,7 +3168,7 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3194
3168
|
name: x.name,
|
|
3195
3169
|
contents: x.value
|
|
3196
3170
|
});
|
|
3197
|
-
}), v.length && (p(`'multipart' => ${F(v, r.indent + r.indent, r.indent)}`, 1),
|
|
3171
|
+
}), v.length && (p(`'multipart' => ${F(v, r.indent + r.indent, r.indent)}`, 1), vt(s, "content-type") && (y = de(s, "content-type")) != null && y.indexOf("boundary"))) {
|
|
3198
3172
|
const x = X(s, "content-type");
|
|
3199
3173
|
x && delete s[x];
|
|
3200
3174
|
}
|
|
@@ -3204,12 +3178,12 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3204
3178
|
e.text && p(`'body' => ${F(e.text)},`, 1);
|
|
3205
3179
|
}
|
|
3206
3180
|
const m = Object.keys(s).sort().map(function(v) {
|
|
3207
|
-
return `${r.indent}${r.indent}'${v}' => '${
|
|
3181
|
+
return `${r.indent}${r.indent}'${v}' => '${Je(s[v])}',`;
|
|
3208
3182
|
}), h = a.map((v) => `${encodeURIComponent(v.name)}=${encodeURIComponent(v.value)}`).join("; ");
|
|
3209
|
-
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${
|
|
3183
|
+
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${Je(h)}',`), m.length && (p("'headers' => [", 1), p(m.join(`
|
|
3210
3184
|
`)), p("],", 1)), i("$client = new \\GuzzleHttp\\Client();"), l(), u.length ? (i(`$response = $client->request('${n}', '${t}', [`), i(d()), i("]);")) : i(`$response = $client->request('${n}', '${t}');`), l(), i("echo $response->getBody();"), !r.noTags && r.closingTag && (l(), i("?>")), c();
|
|
3211
3185
|
}
|
|
3212
|
-
},
|
|
3186
|
+
}, is = {
|
|
3213
3187
|
info: {
|
|
3214
3188
|
key: "http1",
|
|
3215
3189
|
title: "HTTP v1",
|
|
@@ -3219,7 +3193,7 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3219
3193
|
},
|
|
3220
3194
|
convert: ({ method: e, url: t, postData: n, queryObj: a, headersObj: s, cookiesObj: o }, r = {}) => {
|
|
3221
3195
|
const { closingTag: i = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: m } = new P({ indent: l });
|
|
3222
|
-
switch (c || (p(u ? "<?" : "<?php"), d()),
|
|
3196
|
+
switch (c || (p(u ? "<?" : "<?php"), d()), En.includes(e.toUpperCase()) || p(`HttpRequest::methodRegister('${e}');`), p("$request = new HttpRequest();"), p(`$request->setUrl(${F(t)});`), En.includes(e.toUpperCase()) ? p(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : p(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), d(), Object.keys(a).length && (p(`$request->setQueryData(${F(a, l)});`), d()), Object.keys(s).length && (p(`$request->setHeaders(${F(s, l)});`), d()), Object.keys(o).length && (p(`$request->setCookies(${F(o, l)});`), d()), n.mimeType) {
|
|
3223
3197
|
case "application/x-www-form-urlencoded":
|
|
3224
3198
|
p(`$request->setContentType(${F(n.mimeType)});`), p(`$request->setPostFields(${F(n.paramsObj, l)});`), d();
|
|
3225
3199
|
break;
|
|
@@ -3231,7 +3205,7 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3231
3205
|
}
|
|
3232
3206
|
return p("try {"), p("$response = $request->send();", 1), d(), p("echo $response->getBody();", 1), p("} catch (HttpException $ex) {"), p("echo $ex;", 1), p("}"), !c && i && (d(), p("?>")), m();
|
|
3233
3207
|
}
|
|
3234
|
-
},
|
|
3208
|
+
}, ss = {
|
|
3235
3209
|
info: {
|
|
3236
3210
|
key: "http2",
|
|
3237
3211
|
title: "HTTP v2",
|
|
@@ -3264,7 +3238,7 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3264
3238
|
j && (x[w] = j);
|
|
3265
3239
|
});
|
|
3266
3240
|
const g = Object.keys(x).length ? F(x, l) : "null", b = v.length ? F(v, l) : "null";
|
|
3267
|
-
if (p("$body = new http\\Message\\Body;"), p(`$body->addForm(${g}, ${b});`),
|
|
3241
|
+
if (p("$body = new http\\Message\\Body;"), p(`$body->addForm(${g}, ${b});`), vt(t, "content-type") && (y = de(t, "content-type")) != null && y.indexOf("boundary")) {
|
|
3268
3242
|
const w = X(t, "content-type");
|
|
3269
3243
|
w && delete t[w];
|
|
3270
3244
|
}
|
|
@@ -3279,7 +3253,7 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3279
3253
|
}
|
|
3280
3254
|
return p(`$request->setRequestUrl(${F(o)});`), p(`$request->setRequestMethod(${F(n)});`), h && (p("$request->setBody($body);"), d()), Object.keys(a).length && (p(`$request->setQuery(new http\\QueryString(${F(a, l)}));`), d()), Object.keys(t).length && (p(`$request->setHeaders(${F(t, l)});`), d()), Object.keys(s).length && (d(), p(`$client->setCookies(${F(s, l)});`), d()), p("$client->enqueue($request)->send();"), p("$response = $client->getResponse();"), d(), p("echo $response->getBody();"), !c && i && (d(), p("?>")), m();
|
|
3281
3255
|
}
|
|
3282
|
-
},
|
|
3256
|
+
}, ls = {
|
|
3283
3257
|
info: {
|
|
3284
3258
|
key: "php",
|
|
3285
3259
|
title: "PHP",
|
|
@@ -3287,24 +3261,24 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3287
3261
|
cli: "php %s"
|
|
3288
3262
|
},
|
|
3289
3263
|
clientsById: {
|
|
3290
|
-
curl:
|
|
3291
|
-
guzzle:
|
|
3292
|
-
http1:
|
|
3293
|
-
http2:
|
|
3264
|
+
curl: as,
|
|
3265
|
+
guzzle: os,
|
|
3266
|
+
http1: is,
|
|
3267
|
+
http2: ss
|
|
3294
3268
|
}
|
|
3295
|
-
},
|
|
3269
|
+
}, ia = (e) => ({ method: n, headersObj: a, cookies: s, uriObj: o, fullUrl: r, postData: i, allHeaders: l }) => {
|
|
3296
3270
|
const { push: c, join: u } = new P();
|
|
3297
3271
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(n.toUpperCase()))
|
|
3298
3272
|
return "Method not supported";
|
|
3299
3273
|
const d = [], m = Object.keys(a);
|
|
3300
3274
|
return m.length && (c("$headers=@{}"), m.forEach((h) => {
|
|
3301
|
-
h !== "connection" && c(`$headers.Add("${h}", "${
|
|
3275
|
+
h !== "connection" && c(`$headers.Add("${h}", "${We(a[h], { escapeChar: "`" })}")`);
|
|
3302
3276
|
}), d.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((h) => {
|
|
3303
3277
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${h.name}'`), c(`$cookie.Value = '${h.value}'`), c(`$cookie.Domain = '${o.host}'`), c("$session.Cookies.Add($cookie)");
|
|
3304
3278
|
}), d.push("-WebSession $session")), i.text && (d.push(
|
|
3305
|
-
`-ContentType '${
|
|
3279
|
+
`-ContentType '${We(de(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
3306
3280
|
), d.push(`-Body '${i.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${n} ${d.join(" ")}`.trim()), u();
|
|
3307
|
-
},
|
|
3281
|
+
}, cs = {
|
|
3308
3282
|
info: {
|
|
3309
3283
|
key: "restmethod",
|
|
3310
3284
|
title: "Invoke-RestMethod",
|
|
@@ -3312,8 +3286,8 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3312
3286
|
description: "Powershell Invoke-RestMethod client",
|
|
3313
3287
|
extname: ".ps1"
|
|
3314
3288
|
},
|
|
3315
|
-
convert:
|
|
3316
|
-
},
|
|
3289
|
+
convert: ia("Invoke-RestMethod")
|
|
3290
|
+
}, us = {
|
|
3317
3291
|
info: {
|
|
3318
3292
|
key: "webrequest",
|
|
3319
3293
|
title: "Invoke-WebRequest",
|
|
@@ -3321,39 +3295,39 @@ ${c}${c}`), 1), b.push("],")), y(b.join(), 1), y("]);"), v(), y("$response = cur
|
|
|
3321
3295
|
description: "Powershell Invoke-WebRequest client",
|
|
3322
3296
|
extname: ".ps1"
|
|
3323
3297
|
},
|
|
3324
|
-
convert:
|
|
3325
|
-
},
|
|
3298
|
+
convert: ia("Invoke-WebRequest")
|
|
3299
|
+
}, ds = {
|
|
3326
3300
|
info: {
|
|
3327
3301
|
key: "powershell",
|
|
3328
3302
|
title: "Powershell",
|
|
3329
3303
|
default: "webrequest"
|
|
3330
3304
|
},
|
|
3331
3305
|
clientsById: {
|
|
3332
|
-
webrequest:
|
|
3333
|
-
restmethod:
|
|
3306
|
+
webrequest: us,
|
|
3307
|
+
restmethod: cs
|
|
3334
3308
|
}
|
|
3335
3309
|
};
|
|
3336
|
-
function
|
|
3310
|
+
function Rn(e, t, n, a, s) {
|
|
3337
3311
|
const o = a.repeat(s), r = a.repeat(s - 1), i = n ? `,
|
|
3338
3312
|
${o}` : ", ", l = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
|
|
3339
3313
|
return n ? `${l}
|
|
3340
3314
|
${o}${t.join(i)}
|
|
3341
3315
|
${r}${c}` : e === "object" && t.length > 0 ? `${l} ${t.join(i)} ${c}` : `${l}${t.join(i)}${c}`;
|
|
3342
3316
|
}
|
|
3343
|
-
var
|
|
3317
|
+
var Re = (e, t, n) => {
|
|
3344
3318
|
switch (n = n === void 0 ? 1 : n + 1, Object.prototype.toString.call(e)) {
|
|
3345
3319
|
case "[object Number]":
|
|
3346
3320
|
return e;
|
|
3347
3321
|
case "[object Array]": {
|
|
3348
3322
|
let a = !1;
|
|
3349
|
-
const s = e.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (a = Object.keys(o).length > 1),
|
|
3350
|
-
return
|
|
3323
|
+
const s = e.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (a = Object.keys(o).length > 1), Re(o, t, n)));
|
|
3324
|
+
return Rn("array", s, a, t.indent, n);
|
|
3351
3325
|
}
|
|
3352
3326
|
case "[object Object]": {
|
|
3353
3327
|
const a = [];
|
|
3354
3328
|
for (const s in e)
|
|
3355
|
-
a.push(`"${s}": ${
|
|
3356
|
-
return
|
|
3329
|
+
a.push(`"${s}": ${Re(e[s], t, n)}`);
|
|
3330
|
+
return Rn("object", a, t.pretty && a.length > 1, t.indent, n);
|
|
3357
3331
|
}
|
|
3358
3332
|
case "[object Null]":
|
|
3359
3333
|
return "None";
|
|
@@ -3362,7 +3336,7 @@ var Ee = (e, t, n) => {
|
|
|
3362
3336
|
default:
|
|
3363
3337
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3364
3338
|
}
|
|
3365
|
-
},
|
|
3339
|
+
}, fs = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], ps = {
|
|
3366
3340
|
info: {
|
|
3367
3341
|
key: "requests",
|
|
3368
3342
|
title: "Requests",
|
|
@@ -3384,7 +3358,7 @@ var Ee = (e, t, n) => {
|
|
|
3384
3358
|
let m = !1, h = !1, y = !1;
|
|
3385
3359
|
switch (t.mimeType) {
|
|
3386
3360
|
case "application/json":
|
|
3387
|
-
t.jsonObj && (r(`payload = ${
|
|
3361
|
+
t.jsonObj && (r(`payload = ${Re(t.jsonObj, o)}`), y = !0, h = !0);
|
|
3388
3362
|
break;
|
|
3389
3363
|
case "multipart/form-data":
|
|
3390
3364
|
if (!t.params)
|
|
@@ -3392,7 +3366,7 @@ var Ee = (e, t, n) => {
|
|
|
3392
3366
|
if (p = {}, t.params.forEach((g) => {
|
|
3393
3367
|
g.fileName ? (g.contentType ? d[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'), '${g.contentType}')` : d[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'))`, m = !0) : (p[g.name] = g.value, h = !0);
|
|
3394
3368
|
}), m) {
|
|
3395
|
-
r(`files = ${
|
|
3369
|
+
r(`files = ${Re(d, o)}`), h && r(`payload = ${Re(p, o)}`);
|
|
3396
3370
|
const g = X(u, "content-type");
|
|
3397
3371
|
g && delete u[g];
|
|
3398
3372
|
} else {
|
|
@@ -3405,7 +3379,7 @@ var Ee = (e, t, n) => {
|
|
|
3405
3379
|
break;
|
|
3406
3380
|
default: {
|
|
3407
3381
|
if (t.mimeType === "application/x-www-form-urlencoded" && t.paramsObj) {
|
|
3408
|
-
r(`payload = ${
|
|
3382
|
+
r(`payload = ${Re(t.paramsObj, o)}`), h = !0;
|
|
3409
3383
|
break;
|
|
3410
3384
|
}
|
|
3411
3385
|
const g = JSON.stringify(t.text);
|
|
@@ -3425,10 +3399,10 @@ var Ee = (e, t, n) => {
|
|
|
3425
3399
|
r(g !== v ? `"${b}": "${W(u[b])}",` : `"${b}": "${W(u[b])}"`, 1), g += 1;
|
|
3426
3400
|
}), r("}"), i();
|
|
3427
3401
|
}
|
|
3428
|
-
let x =
|
|
3402
|
+
let x = fs.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
3429
3403
|
return h && (y ? x += ", json=payload" : x += ", data=payload"), m && (x += ", files=files"), v > 0 && (x += ", headers=headers"), x += ")", r(x), i(), r("print(response.text)"), l();
|
|
3430
3404
|
}
|
|
3431
|
-
},
|
|
3405
|
+
}, ms = {
|
|
3432
3406
|
info: {
|
|
3433
3407
|
key: "python",
|
|
3434
3408
|
title: "Python",
|
|
@@ -3436,9 +3410,9 @@ var Ee = (e, t, n) => {
|
|
|
3436
3410
|
cli: "python3 %s"
|
|
3437
3411
|
},
|
|
3438
3412
|
clientsById: {
|
|
3439
|
-
requests:
|
|
3413
|
+
requests: ps
|
|
3440
3414
|
}
|
|
3441
|
-
},
|
|
3415
|
+
}, hs = {
|
|
3442
3416
|
info: {
|
|
3443
3417
|
key: "httr",
|
|
3444
3418
|
title: "httr",
|
|
@@ -3471,22 +3445,22 @@ var Ee = (e, t, n) => {
|
|
|
3471
3445
|
r('encode <- "raw"'), i();
|
|
3472
3446
|
break;
|
|
3473
3447
|
}
|
|
3474
|
-
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, v = `content_type("${W(a.mimeType)}")`, x = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, j]) => `'${S}' = '${
|
|
3448
|
+
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, v = `content_type("${W(a.mimeType)}")`, x = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, j]) => `'${S}' = '${Je(j)}'`).join(", "), g = x ? `add_headers(${x})` : void 0;
|
|
3475
3449
|
let b = `response <- VERB("${o}", url`;
|
|
3476
3450
|
p && (b += ", body = payload"), n.length && (b += ", query = queryString");
|
|
3477
3451
|
const w = [g, v, y, h].filter((S) => !!S).join(", ");
|
|
3478
3452
|
return w && (b += `, ${w}`), (a.text || a.jsonObj || a.params) && (b += ", encode = encode"), b += ")", r(b), i(), r('content(response, "text")'), l();
|
|
3479
3453
|
}
|
|
3480
|
-
},
|
|
3454
|
+
}, ys = {
|
|
3481
3455
|
info: {
|
|
3482
3456
|
key: "r",
|
|
3483
3457
|
title: "R",
|
|
3484
3458
|
default: "httr"
|
|
3485
3459
|
},
|
|
3486
3460
|
clientsById: {
|
|
3487
|
-
httr:
|
|
3461
|
+
httr: hs
|
|
3488
3462
|
}
|
|
3489
|
-
},
|
|
3463
|
+
}, gs = {
|
|
3490
3464
|
info: {
|
|
3491
3465
|
key: "native",
|
|
3492
3466
|
title: "net::http",
|
|
@@ -3514,19 +3488,19 @@ var Ee = (e, t, n) => {
|
|
|
3514
3488
|
c.includes(l) || (o(`class Net::HTTP::${u} < Net::HTTPRequest`), o(` METHOD = '${l.toUpperCase()}'`), o(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), o(" RESPONSE_HAS_BODY = true"), o("end"), r()), o(`url = URI("${n}")`), r(), o("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && o("http.use_ssl = true"), r(), o(`request = Net::HTTP::${u}.new(url)`);
|
|
3515
3489
|
const p = Object.keys(s);
|
|
3516
3490
|
return p.length && p.forEach((d) => {
|
|
3517
|
-
o(`request["${d}"] = '${
|
|
3491
|
+
o(`request["${d}"] = '${Je(s[d])}'`);
|
|
3518
3492
|
}), a.text && o(`request.body = ${JSON.stringify(a.text)}`), r(), o("response = http.request(request)"), o("puts response.read_body"), i();
|
|
3519
3493
|
}
|
|
3520
|
-
},
|
|
3494
|
+
}, vs = {
|
|
3521
3495
|
info: {
|
|
3522
3496
|
key: "ruby",
|
|
3523
3497
|
title: "Ruby",
|
|
3524
3498
|
default: "native"
|
|
3525
3499
|
},
|
|
3526
3500
|
clientsById: {
|
|
3527
|
-
native:
|
|
3501
|
+
native: gs
|
|
3528
3502
|
}
|
|
3529
|
-
}, G = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
3503
|
+
}, G = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, bs = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), xs = {
|
|
3530
3504
|
"http1.0": "0",
|
|
3531
3505
|
"url ": "",
|
|
3532
3506
|
cookie: "b",
|
|
@@ -3536,13 +3510,13 @@ var Ee = (e, t, n) => {
|
|
|
3536
3510
|
header: "H",
|
|
3537
3511
|
insecure: "k",
|
|
3538
3512
|
request: "X"
|
|
3539
|
-
},
|
|
3513
|
+
}, ks = (e) => (t) => {
|
|
3540
3514
|
if (e) {
|
|
3541
|
-
const n =
|
|
3515
|
+
const n = xs[t];
|
|
3542
3516
|
return n ? `-${n}` : "";
|
|
3543
3517
|
}
|
|
3544
3518
|
return `--${t}`;
|
|
3545
|
-
},
|
|
3519
|
+
}, $s = {
|
|
3546
3520
|
info: {
|
|
3547
3521
|
key: "curl",
|
|
3548
3522
|
title: "cURL",
|
|
@@ -3556,7 +3530,7 @@ var Ee = (e, t, n) => {
|
|
|
3556
3530
|
...typeof i == "string" ? { indent: i } : {},
|
|
3557
3531
|
join: i !== !1 ? ` \\
|
|
3558
3532
|
${i}` : " "
|
|
3559
|
-
}), h =
|
|
3533
|
+
}), h = ks(l);
|
|
3560
3534
|
let y = G(e);
|
|
3561
3535
|
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"), o.mimeType === "multipart/form-data") {
|
|
3562
3536
|
const x = X(a, "content-type");
|
|
@@ -3588,7 +3562,7 @@ ${i}` : " "
|
|
|
3588
3562
|
if (!o.text)
|
|
3589
3563
|
break;
|
|
3590
3564
|
let x = !1;
|
|
3591
|
-
if (
|
|
3565
|
+
if (ki(o.mimeType) && o.text.length > 20)
|
|
3592
3566
|
try {
|
|
3593
3567
|
const g = JSON.parse(o.text);
|
|
3594
3568
|
x = !0, o.text.indexOf("'") > 0 ? d(
|
|
@@ -3610,7 +3584,7 @@ ${JSON.stringify(g, null, p)}
|
|
|
3610
3584
|
}
|
|
3611
3585
|
return m();
|
|
3612
3586
|
}
|
|
3613
|
-
},
|
|
3587
|
+
}, Ss = {
|
|
3614
3588
|
info: {
|
|
3615
3589
|
key: "httpie",
|
|
3616
3590
|
title: "HTTPie",
|
|
@@ -3659,7 +3633,7 @@ ${i.indent}` : " "
|
|
|
3659
3633
|
}
|
|
3660
3634
|
return c();
|
|
3661
3635
|
}
|
|
3662
|
-
},
|
|
3636
|
+
}, ws = {
|
|
3663
3637
|
info: {
|
|
3664
3638
|
key: "wget",
|
|
3665
3639
|
title: "Wget",
|
|
@@ -3681,9 +3655,9 @@ ${o.indent}` : " "
|
|
|
3681
3655
|
return o.verbose ? r(`wget ${o.short ? "-v" : "--verbose"}`) : r(`wget ${o.short ? "-q" : "--quiet"}`), r(`--method ${G(e)}`), Object.keys(n).forEach((l) => {
|
|
3682
3656
|
const c = `${l}: ${n[l]}`;
|
|
3683
3657
|
r(`--header ${G(c)}`);
|
|
3684
|
-
}), t.text && r(`--body-data ${
|
|
3658
|
+
}), t.text && r(`--body-data ${bs(G(t.text))}`), r(o.short ? "-O" : "--output-document"), r(`- ${G(a)}`), i();
|
|
3685
3659
|
}
|
|
3686
|
-
},
|
|
3660
|
+
}, js = {
|
|
3687
3661
|
info: {
|
|
3688
3662
|
key: "shell",
|
|
3689
3663
|
title: "Shell",
|
|
@@ -3691,30 +3665,30 @@ ${o.indent}` : " "
|
|
|
3691
3665
|
cli: "%s"
|
|
3692
3666
|
},
|
|
3693
3667
|
clientsById: {
|
|
3694
|
-
curl:
|
|
3695
|
-
httpie:
|
|
3696
|
-
wget:
|
|
3668
|
+
curl: $s,
|
|
3669
|
+
httpie: Ss,
|
|
3670
|
+
wget: ws
|
|
3697
3671
|
}
|
|
3698
|
-
},
|
|
3699
|
-
const s =
|
|
3672
|
+
}, An = (e, t) => t.repeat(e), Fn = (e, t, n, a) => {
|
|
3673
|
+
const s = An(a, n), o = An(a - 1, n), r = t ? `,
|
|
3700
3674
|
${s}` : ", ";
|
|
3701
3675
|
return t ? `[
|
|
3702
3676
|
${s}${e.join(r)}
|
|
3703
3677
|
${o}]` : `[${e.join(r)}]`;
|
|
3704
|
-
},
|
|
3678
|
+
}, qn = (e, t, n) => `let ${e} = ${dt(t, n)}`, dt = (e, t, n) => {
|
|
3705
3679
|
switch (n = n === void 0 ? 1 : n + 1, Object.prototype.toString.call(e)) {
|
|
3706
3680
|
case "[object Number]":
|
|
3707
3681
|
return e;
|
|
3708
3682
|
case "[object Array]": {
|
|
3709
3683
|
let a = !1;
|
|
3710
|
-
const s = e.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (a = Object.keys(o).length > 1),
|
|
3711
|
-
return
|
|
3684
|
+
const s = e.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (a = Object.keys(o).length > 1), dt(o, t, n)));
|
|
3685
|
+
return Fn(s, a, t.indent, n);
|
|
3712
3686
|
}
|
|
3713
3687
|
case "[object Object]": {
|
|
3714
3688
|
const a = [];
|
|
3715
3689
|
for (const s in e)
|
|
3716
|
-
a.push(`"${s}": ${
|
|
3717
|
-
return
|
|
3690
|
+
a.push(`"${s}": ${dt(e[s], t, n)}`);
|
|
3691
|
+
return Fn(
|
|
3718
3692
|
a,
|
|
3719
3693
|
// @ts-expect-error needs better types
|
|
3720
3694
|
t.pretty && a.length > 1,
|
|
@@ -3728,7 +3702,7 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3728
3702
|
default:
|
|
3729
3703
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3730
3704
|
}
|
|
3731
|
-
},
|
|
3705
|
+
}, Ns = {
|
|
3732
3706
|
info: {
|
|
3733
3707
|
key: "urlsession",
|
|
3734
3708
|
title: "URLSession",
|
|
@@ -3755,10 +3729,10 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3755
3729
|
}
|
|
3756
3730
|
break;
|
|
3757
3731
|
case "application/json":
|
|
3758
|
-
t.jsonObj && (i(`${
|
|
3732
|
+
t.jsonObj && (i(`${qn("parameters", t.jsonObj, r)} as [String : Any?]`), l(), i("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), l());
|
|
3759
3733
|
break;
|
|
3760
3734
|
case "multipart/form-data":
|
|
3761
|
-
i(
|
|
3735
|
+
i(qn("parameters", t.params, r)), l(), i(`let boundary = "${t.boundary}"`), l(), i('var body = ""'), i("for param in parameters {"), i('let paramName = param["name"]!', 1), i('body += "--\\(boundary)\\r\\n"', 1), i('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), i('if let filename = param["fileName"] {', 1), i('let contentType = param["contentType"]!', 2), i("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), i('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), i('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), i("body += fileContent", 2), i('} else if let paramValue = param["value"] {', 1), i('body += "\\r\\n\\r\\n\\(paramValue)"', 2), i("}", 1), i("}"), l(), i("let postData = Data(body.utf8)"), l();
|
|
3762
3736
|
break;
|
|
3763
3737
|
default:
|
|
3764
3738
|
i(`let postData = Data("${t.text}".utf8)`), l();
|
|
@@ -3777,43 +3751,43 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3777
3751
|
});
|
|
3778
3752
|
break;
|
|
3779
3753
|
}
|
|
3780
|
-
}), i("]"), i("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), i("var request = URLRequest(url: components.url!)")), i(`request.httpMethod = "${s}"`), i(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && i(`request.allHTTPHeaderFields = ${
|
|
3754
|
+
}), i("]"), i("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), i("var request = URLRequest(url: components.url!)")), i(`request.httpMethod = "${s}"`), i(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && i(`request.allHTTPHeaderFields = ${dt(e, r)}`), u && i("request.httpBody = postData"), l(), i("let (data, _) = try await URLSession.shared.data(for: request)"), i("print(String(decoding: data, as: UTF8.self))"), c();
|
|
3781
3755
|
}
|
|
3782
|
-
},
|
|
3756
|
+
}, Ts = {
|
|
3783
3757
|
info: {
|
|
3784
3758
|
key: "swift",
|
|
3785
3759
|
title: "Swift",
|
|
3786
3760
|
default: "urlsession"
|
|
3787
3761
|
},
|
|
3788
3762
|
clientsById: {
|
|
3789
|
-
urlsession:
|
|
3790
|
-
}
|
|
3791
|
-
},
|
|
3792
|
-
c:
|
|
3793
|
-
clojure:
|
|
3794
|
-
csharp:
|
|
3795
|
-
go:
|
|
3796
|
-
http:
|
|
3797
|
-
java:
|
|
3798
|
-
javascript:
|
|
3799
|
-
json:
|
|
3800
|
-
kotlin:
|
|
3801
|
-
node:
|
|
3802
|
-
objc:
|
|
3803
|
-
ocaml:
|
|
3804
|
-
php:
|
|
3805
|
-
powershell:
|
|
3806
|
-
python:
|
|
3807
|
-
r:
|
|
3808
|
-
ruby:
|
|
3809
|
-
shell:
|
|
3810
|
-
swift:
|
|
3811
|
-
},
|
|
3763
|
+
urlsession: Ns
|
|
3764
|
+
}
|
|
3765
|
+
}, Os = {
|
|
3766
|
+
c: xi,
|
|
3767
|
+
clojure: wi,
|
|
3768
|
+
csharp: Ci,
|
|
3769
|
+
go: Ei,
|
|
3770
|
+
http: Ai,
|
|
3771
|
+
java: Li,
|
|
3772
|
+
javascript: Di,
|
|
3773
|
+
json: zi,
|
|
3774
|
+
kotlin: Ji,
|
|
3775
|
+
node: Zi,
|
|
3776
|
+
objc: ts,
|
|
3777
|
+
ocaml: rs,
|
|
3778
|
+
php: ls,
|
|
3779
|
+
powershell: ds,
|
|
3780
|
+
python: ms,
|
|
3781
|
+
r: ys,
|
|
3782
|
+
ruby: vs,
|
|
3783
|
+
shell: js,
|
|
3784
|
+
swift: Ts
|
|
3785
|
+
}, ft = { exports: {} };
|
|
3812
3786
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
3813
|
-
|
|
3787
|
+
ft.exports;
|
|
3814
3788
|
(function(e, t) {
|
|
3815
3789
|
(function(n) {
|
|
3816
|
-
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, o = typeof
|
|
3790
|
+
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, o = typeof ot == "object" && ot;
|
|
3817
3791
|
(o.global === o || o.window === o || o.self === o) && (n = o);
|
|
3818
3792
|
var r, i = 2147483647, l = 36, c = 1, u = 26, p = 38, d = 700, m = 72, h = 128, y = "-", v = /^xn--/, x = /[^\x20-\x7E]/, g = /[\x2E\u3002\uFF0E\uFF61]/g, b = {
|
|
3819
3793
|
overflow: "Overflow: input needs wider integers to process",
|
|
@@ -3834,7 +3808,7 @@ dt.exports;
|
|
|
3834
3808
|
var U = $.split("."), ee = R(U, T).join(".");
|
|
3835
3809
|
return _ + ee;
|
|
3836
3810
|
}
|
|
3837
|
-
function
|
|
3811
|
+
function V($) {
|
|
3838
3812
|
for (var T = [], E = 0, _ = $.length, U, ee; E < _; )
|
|
3839
3813
|
U = $.charCodeAt(E++), U >= 55296 && U <= 56319 && E < _ ? (ee = $.charCodeAt(E++), (ee & 64512) == 56320 ? T.push(((U & 1023) << 10) + (ee & 1023) + 65536) : (T.push(U), E--)) : T.push(U);
|
|
3840
3814
|
return T;
|
|
@@ -3858,43 +3832,43 @@ dt.exports;
|
|
|
3858
3832
|
return S(_ + (w + 1) * $ / ($ + p));
|
|
3859
3833
|
}
|
|
3860
3834
|
function B($) {
|
|
3861
|
-
var T = [], E = $.length, _, U = 0, ee = h, J = m, te, re, se, fe, Y, ne, ae,
|
|
3835
|
+
var T = [], E = $.length, _, U = 0, ee = h, J = m, te, re, se, fe, Y, ne, ae, ye, ke;
|
|
3862
3836
|
for (te = $.lastIndexOf(y), te < 0 && (te = 0), re = 0; re < te; ++re)
|
|
3863
3837
|
$.charCodeAt(re) >= 128 && O("not-basic"), T.push($.charCodeAt(re));
|
|
3864
3838
|
for (se = te > 0 ? te + 1 : 0; se < E; ) {
|
|
3865
|
-
for (fe = U, Y = 1, ne = l; se >= E && O("invalid-input"), ae = q($.charCodeAt(se++)), (ae >= l || ae > S((i - U) / Y)) && O("overflow"), U += ae * Y,
|
|
3866
|
-
|
|
3839
|
+
for (fe = U, Y = 1, ne = l; se >= E && O("invalid-input"), ae = q($.charCodeAt(se++)), (ae >= l || ae > S((i - U) / Y)) && O("overflow"), U += ae * Y, ye = ne <= J ? c : ne >= J + u ? u : ne - J, !(ae < ye); ne += l)
|
|
3840
|
+
ke = l - ye, Y > S(i / ke) && O("overflow"), Y *= ke;
|
|
3867
3841
|
_ = T.length + 1, J = H(U - fe, _, fe == 0), S(U / _) > i - ee && O("overflow"), ee += S(U / _), U %= _, T.splice(U++, 0, ee);
|
|
3868
3842
|
}
|
|
3869
3843
|
return Q(T);
|
|
3870
3844
|
}
|
|
3871
|
-
function
|
|
3872
|
-
var T, E, _, U, ee, J, te, re, se, fe, Y, ne = [], ae,
|
|
3873
|
-
for ($ =
|
|
3845
|
+
function he($) {
|
|
3846
|
+
var T, E, _, U, ee, J, te, re, se, fe, Y, ne = [], ae, ye, ke, xt;
|
|
3847
|
+
for ($ = V($), ae = $.length, T = h, E = 0, ee = m, J = 0; J < ae; ++J)
|
|
3874
3848
|
Y = $[J], Y < 128 && ne.push(j(Y));
|
|
3875
3849
|
for (_ = U = ne.length, U && ne.push(y); _ < ae; ) {
|
|
3876
3850
|
for (te = i, J = 0; J < ae; ++J)
|
|
3877
3851
|
Y = $[J], Y >= T && Y < te && (te = Y);
|
|
3878
|
-
for (
|
|
3852
|
+
for (ye = _ + 1, te - T > S((i - E) / ye) && O("overflow"), E += (te - T) * ye, T = te, J = 0; J < ae; ++J)
|
|
3879
3853
|
if (Y = $[J], Y < T && ++E > i && O("overflow"), Y == T) {
|
|
3880
3854
|
for (re = E, se = l; fe = se <= ee ? c : se >= ee + u ? u : se - ee, !(re < fe); se += l)
|
|
3881
|
-
|
|
3882
|
-
j(L(fe +
|
|
3883
|
-
), re = S(
|
|
3884
|
-
ne.push(j(L(re, 0))), ee = H(E,
|
|
3855
|
+
xt = re - fe, ke = l - fe, ne.push(
|
|
3856
|
+
j(L(fe + xt % ke, 0))
|
|
3857
|
+
), re = S(xt / ke);
|
|
3858
|
+
ne.push(j(L(re, 0))), ee = H(E, ye, _ == U), E = 0, ++_;
|
|
3885
3859
|
}
|
|
3886
3860
|
++E, ++T;
|
|
3887
3861
|
}
|
|
3888
3862
|
return ne.join("");
|
|
3889
3863
|
}
|
|
3890
|
-
function
|
|
3864
|
+
function bt($) {
|
|
3891
3865
|
return I($, function(T) {
|
|
3892
3866
|
return v.test(T) ? B(T.slice(4).toLowerCase()) : T;
|
|
3893
3867
|
});
|
|
3894
3868
|
}
|
|
3895
|
-
function
|
|
3869
|
+
function Ze($) {
|
|
3896
3870
|
return I($, function(T) {
|
|
3897
|
-
return x.test(T) ? "xn--" +
|
|
3871
|
+
return x.test(T) ? "xn--" + he(T) : T;
|
|
3898
3872
|
});
|
|
3899
3873
|
}
|
|
3900
3874
|
if (r = {
|
|
@@ -3912,13 +3886,13 @@ dt.exports;
|
|
|
3912
3886
|
* @type Object
|
|
3913
3887
|
*/
|
|
3914
3888
|
ucs2: {
|
|
3915
|
-
decode:
|
|
3889
|
+
decode: V,
|
|
3916
3890
|
encode: Q
|
|
3917
3891
|
},
|
|
3918
3892
|
decode: B,
|
|
3919
|
-
encode:
|
|
3920
|
-
toASCII:
|
|
3921
|
-
toUnicode:
|
|
3893
|
+
encode: he,
|
|
3894
|
+
toASCII: Ze,
|
|
3895
|
+
toUnicode: bt
|
|
3922
3896
|
}, a && s)
|
|
3923
3897
|
if (e.exports == a)
|
|
3924
3898
|
s.exports = r;
|
|
@@ -3927,9 +3901,9 @@ dt.exports;
|
|
|
3927
3901
|
r.hasOwnProperty(k) && (a[k] = r[k]);
|
|
3928
3902
|
else
|
|
3929
3903
|
n.punycode = r;
|
|
3930
|
-
})(
|
|
3931
|
-
})(
|
|
3932
|
-
var
|
|
3904
|
+
})(ot);
|
|
3905
|
+
})(ft, ft.exports);
|
|
3906
|
+
var Cs = ft.exports, Ps = Error, Es = EvalError, Rs = RangeError, As = ReferenceError, sa = SyntaxError, Ye = TypeError, Fs = URIError, qs = function() {
|
|
3933
3907
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3934
3908
|
return !1;
|
|
3935
3909
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3952,14 +3926,14 @@ var Ps = dt.exports, Es = Error, Rs = EvalError, As = RangeError, Fs = Reference
|
|
|
3952
3926
|
return !1;
|
|
3953
3927
|
}
|
|
3954
3928
|
return !0;
|
|
3955
|
-
},
|
|
3956
|
-
return typeof
|
|
3957
|
-
},
|
|
3929
|
+
}, In = typeof Symbol < "u" && Symbol, Is = qs, _s = function() {
|
|
3930
|
+
return typeof In != "function" || typeof Symbol != "function" || typeof In("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Is();
|
|
3931
|
+
}, jt = {
|
|
3958
3932
|
__proto__: null,
|
|
3959
3933
|
foo: {}
|
|
3960
|
-
},
|
|
3961
|
-
return { __proto__:
|
|
3962
|
-
},
|
|
3934
|
+
}, Ls = Object, Us = function() {
|
|
3935
|
+
return { __proto__: jt }.foo === jt.foo && !(jt instanceof Ls);
|
|
3936
|
+
}, Ms = "Function.prototype.bind called on incompatible ", Hs = Object.prototype.toString, Bs = Math.max, Ds = "[object Function]", _n = function(t, n) {
|
|
3963
3937
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
3964
3938
|
a[s] = t[s];
|
|
3965
3939
|
for (var o = 0; o < n.length; o += 1)
|
|
@@ -3969,71 +3943,71 @@ var Ps = dt.exports, Es = Error, Rs = EvalError, As = RangeError, Fs = Reference
|
|
|
3969
3943
|
for (var a = [], s = n, o = 0; s < t.length; s += 1, o += 1)
|
|
3970
3944
|
a[o] = t[s];
|
|
3971
3945
|
return a;
|
|
3972
|
-
},
|
|
3946
|
+
}, zs = function(e, t) {
|
|
3973
3947
|
for (var n = "", a = 0; a < e.length; a += 1)
|
|
3974
3948
|
n += e[a], a + 1 < e.length && (n += t);
|
|
3975
3949
|
return n;
|
|
3976
|
-
},
|
|
3950
|
+
}, Ws = function(t) {
|
|
3977
3951
|
var n = this;
|
|
3978
|
-
if (typeof n != "function" ||
|
|
3979
|
-
throw new TypeError(
|
|
3952
|
+
if (typeof n != "function" || Hs.apply(n) !== Ds)
|
|
3953
|
+
throw new TypeError(Ms + n);
|
|
3980
3954
|
for (var a = Vs(arguments, 1), s, o = function() {
|
|
3981
3955
|
if (this instanceof s) {
|
|
3982
3956
|
var u = n.apply(
|
|
3983
3957
|
this,
|
|
3984
|
-
|
|
3958
|
+
_n(a, arguments)
|
|
3985
3959
|
);
|
|
3986
3960
|
return Object(u) === u ? u : this;
|
|
3987
3961
|
}
|
|
3988
3962
|
return n.apply(
|
|
3989
3963
|
t,
|
|
3990
|
-
|
|
3964
|
+
_n(a, arguments)
|
|
3991
3965
|
);
|
|
3992
|
-
}, r =
|
|
3966
|
+
}, r = Bs(0, n.length - a.length), i = [], l = 0; l < r; l++)
|
|
3993
3967
|
i[l] = "$" + l;
|
|
3994
|
-
if (s = Function("binder", "return function (" +
|
|
3968
|
+
if (s = Function("binder", "return function (" + zs(i, ",") + "){ return binder.apply(this,arguments); }")(o), n.prototype) {
|
|
3995
3969
|
var c = function() {
|
|
3996
3970
|
};
|
|
3997
3971
|
c.prototype = n.prototype, s.prototype = new c(), c.prototype = null;
|
|
3998
3972
|
}
|
|
3999
3973
|
return s;
|
|
4000
|
-
},
|
|
3974
|
+
}, Js = Ws, un = Function.prototype.bind || Js, Gs = Function.prototype.call, Ks = Object.prototype.hasOwnProperty, Qs = un, Ys = Qs.call(Gs, Ks), C, Xs = Ps, Zs = Es, el = Rs, tl = As, Ie = sa, Ae = Ye, nl = Fs, la = Function, Nt = function(e) {
|
|
4001
3975
|
try {
|
|
4002
|
-
return
|
|
3976
|
+
return la('"use strict"; return (' + e + ").constructor;")();
|
|
4003
3977
|
} catch {
|
|
4004
3978
|
}
|
|
4005
|
-
},
|
|
4006
|
-
if (
|
|
3979
|
+
}, we = Object.getOwnPropertyDescriptor;
|
|
3980
|
+
if (we)
|
|
4007
3981
|
try {
|
|
4008
|
-
|
|
3982
|
+
we({}, "");
|
|
4009
3983
|
} catch {
|
|
4010
|
-
|
|
3984
|
+
we = null;
|
|
4011
3985
|
}
|
|
4012
|
-
var
|
|
4013
|
-
throw new
|
|
4014
|
-
},
|
|
3986
|
+
var Tt = function() {
|
|
3987
|
+
throw new Ae();
|
|
3988
|
+
}, rl = we ? function() {
|
|
4015
3989
|
try {
|
|
4016
|
-
return arguments.callee,
|
|
3990
|
+
return arguments.callee, Tt;
|
|
4017
3991
|
} catch {
|
|
4018
3992
|
try {
|
|
4019
|
-
return
|
|
3993
|
+
return we(arguments, "callee").get;
|
|
4020
3994
|
} catch {
|
|
4021
|
-
return
|
|
3995
|
+
return Tt;
|
|
4022
3996
|
}
|
|
4023
3997
|
}
|
|
4024
|
-
}() :
|
|
3998
|
+
}() : Tt, Te = _s(), al = Us(), z = Object.getPrototypeOf || (al ? function(e) {
|
|
4025
3999
|
return e.__proto__;
|
|
4026
|
-
} : null),
|
|
4000
|
+
} : null), Ee = {}, ol = typeof Uint8Array > "u" || !z ? C : z(Uint8Array), je = {
|
|
4027
4001
|
__proto__: null,
|
|
4028
4002
|
"%AggregateError%": typeof AggregateError > "u" ? C : AggregateError,
|
|
4029
4003
|
"%Array%": Array,
|
|
4030
4004
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? C : ArrayBuffer,
|
|
4031
|
-
"%ArrayIteratorPrototype%":
|
|
4005
|
+
"%ArrayIteratorPrototype%": Te && z ? z([][Symbol.iterator]()) : C,
|
|
4032
4006
|
"%AsyncFromSyncIteratorPrototype%": C,
|
|
4033
|
-
"%AsyncFunction%":
|
|
4034
|
-
"%AsyncGenerator%":
|
|
4035
|
-
"%AsyncGeneratorFunction%":
|
|
4036
|
-
"%AsyncIteratorPrototype%":
|
|
4007
|
+
"%AsyncFunction%": Ee,
|
|
4008
|
+
"%AsyncGenerator%": Ee,
|
|
4009
|
+
"%AsyncGeneratorFunction%": Ee,
|
|
4010
|
+
"%AsyncIteratorPrototype%": Ee,
|
|
4037
4011
|
"%Atomics%": typeof Atomics > "u" ? C : Atomics,
|
|
4038
4012
|
"%BigInt%": typeof BigInt > "u" ? C : BigInt,
|
|
4039
4013
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? C : BigInt64Array,
|
|
@@ -4045,24 +4019,24 @@ var Nt = function() {
|
|
|
4045
4019
|
"%decodeURIComponent%": decodeURIComponent,
|
|
4046
4020
|
"%encodeURI%": encodeURI,
|
|
4047
4021
|
"%encodeURIComponent%": encodeURIComponent,
|
|
4048
|
-
"%Error%":
|
|
4022
|
+
"%Error%": Xs,
|
|
4049
4023
|
"%eval%": eval,
|
|
4050
4024
|
// eslint-disable-line no-eval
|
|
4051
|
-
"%EvalError%":
|
|
4025
|
+
"%EvalError%": Zs,
|
|
4052
4026
|
"%Float32Array%": typeof Float32Array > "u" ? C : Float32Array,
|
|
4053
4027
|
"%Float64Array%": typeof Float64Array > "u" ? C : Float64Array,
|
|
4054
4028
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? C : FinalizationRegistry,
|
|
4055
|
-
"%Function%":
|
|
4056
|
-
"%GeneratorFunction%":
|
|
4029
|
+
"%Function%": la,
|
|
4030
|
+
"%GeneratorFunction%": Ee,
|
|
4057
4031
|
"%Int8Array%": typeof Int8Array > "u" ? C : Int8Array,
|
|
4058
4032
|
"%Int16Array%": typeof Int16Array > "u" ? C : Int16Array,
|
|
4059
4033
|
"%Int32Array%": typeof Int32Array > "u" ? C : Int32Array,
|
|
4060
4034
|
"%isFinite%": isFinite,
|
|
4061
4035
|
"%isNaN%": isNaN,
|
|
4062
|
-
"%IteratorPrototype%":
|
|
4036
|
+
"%IteratorPrototype%": Te && z ? z(z([][Symbol.iterator]())) : C,
|
|
4063
4037
|
"%JSON%": typeof JSON == "object" ? JSON : C,
|
|
4064
4038
|
"%Map%": typeof Map > "u" ? C : Map,
|
|
4065
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
4039
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Te || !z ? C : z((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
4066
4040
|
"%Math%": Math,
|
|
4067
4041
|
"%Number%": Number,
|
|
4068
4042
|
"%Object%": Object,
|
|
@@ -4070,53 +4044,53 @@ var Nt = function() {
|
|
|
4070
4044
|
"%parseInt%": parseInt,
|
|
4071
4045
|
"%Promise%": typeof Promise > "u" ? C : Promise,
|
|
4072
4046
|
"%Proxy%": typeof Proxy > "u" ? C : Proxy,
|
|
4073
|
-
"%RangeError%":
|
|
4074
|
-
"%ReferenceError%":
|
|
4047
|
+
"%RangeError%": el,
|
|
4048
|
+
"%ReferenceError%": tl,
|
|
4075
4049
|
"%Reflect%": typeof Reflect > "u" ? C : Reflect,
|
|
4076
4050
|
"%RegExp%": RegExp,
|
|
4077
4051
|
"%Set%": typeof Set > "u" ? C : Set,
|
|
4078
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
4052
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Te || !z ? C : z((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
4079
4053
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? C : SharedArrayBuffer,
|
|
4080
4054
|
"%String%": String,
|
|
4081
|
-
"%StringIteratorPrototype%":
|
|
4082
|
-
"%Symbol%":
|
|
4083
|
-
"%SyntaxError%":
|
|
4084
|
-
"%ThrowTypeError%":
|
|
4085
|
-
"%TypedArray%":
|
|
4086
|
-
"%TypeError%":
|
|
4055
|
+
"%StringIteratorPrototype%": Te && z ? z(""[Symbol.iterator]()) : C,
|
|
4056
|
+
"%Symbol%": Te ? Symbol : C,
|
|
4057
|
+
"%SyntaxError%": Ie,
|
|
4058
|
+
"%ThrowTypeError%": rl,
|
|
4059
|
+
"%TypedArray%": ol,
|
|
4060
|
+
"%TypeError%": Ae,
|
|
4087
4061
|
"%Uint8Array%": typeof Uint8Array > "u" ? C : Uint8Array,
|
|
4088
4062
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? C : Uint8ClampedArray,
|
|
4089
4063
|
"%Uint16Array%": typeof Uint16Array > "u" ? C : Uint16Array,
|
|
4090
4064
|
"%Uint32Array%": typeof Uint32Array > "u" ? C : Uint32Array,
|
|
4091
|
-
"%URIError%":
|
|
4065
|
+
"%URIError%": nl,
|
|
4092
4066
|
"%WeakMap%": typeof WeakMap > "u" ? C : WeakMap,
|
|
4093
4067
|
"%WeakRef%": typeof WeakRef > "u" ? C : WeakRef,
|
|
4094
4068
|
"%WeakSet%": typeof WeakSet > "u" ? C : WeakSet
|
|
4095
4069
|
};
|
|
4096
|
-
if (
|
|
4070
|
+
if (z)
|
|
4097
4071
|
try {
|
|
4098
4072
|
null.error;
|
|
4099
4073
|
} catch (e) {
|
|
4100
|
-
var
|
|
4101
|
-
|
|
4074
|
+
var il = z(z(e));
|
|
4075
|
+
je["%Error.prototype%"] = il;
|
|
4102
4076
|
}
|
|
4103
|
-
var
|
|
4077
|
+
var sl = function e(t) {
|
|
4104
4078
|
var n;
|
|
4105
4079
|
if (t === "%AsyncFunction%")
|
|
4106
|
-
n =
|
|
4080
|
+
n = Nt("async function () {}");
|
|
4107
4081
|
else if (t === "%GeneratorFunction%")
|
|
4108
|
-
n =
|
|
4082
|
+
n = Nt("function* () {}");
|
|
4109
4083
|
else if (t === "%AsyncGeneratorFunction%")
|
|
4110
|
-
n =
|
|
4084
|
+
n = Nt("async function* () {}");
|
|
4111
4085
|
else if (t === "%AsyncGenerator%") {
|
|
4112
4086
|
var a = e("%AsyncGeneratorFunction%");
|
|
4113
4087
|
a && (n = a.prototype);
|
|
4114
4088
|
} else if (t === "%AsyncIteratorPrototype%") {
|
|
4115
4089
|
var s = e("%AsyncGenerator%");
|
|
4116
|
-
s &&
|
|
4090
|
+
s && z && (n = z(s.prototype));
|
|
4117
4091
|
}
|
|
4118
|
-
return
|
|
4119
|
-
},
|
|
4092
|
+
return je[t] = n, n;
|
|
4093
|
+
}, Ln = {
|
|
4120
4094
|
__proto__: null,
|
|
4121
4095
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
4122
4096
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -4169,95 +4143,95 @@ var ll = function e(t) {
|
|
|
4169
4143
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4170
4144
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4171
4145
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4172
|
-
},
|
|
4173
|
-
var n =
|
|
4146
|
+
}, Xe = un, pt = Ys, ll = Xe.call(Function.call, Array.prototype.concat), cl = Xe.call(Function.apply, Array.prototype.splice), Un = Xe.call(Function.call, String.prototype.replace), mt = Xe.call(Function.call, String.prototype.slice), ul = Xe.call(Function.call, RegExp.prototype.exec), dl = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, fl = /\\(\\)?/g, pl = function(t) {
|
|
4147
|
+
var n = mt(t, 0, 1), a = mt(t, -1);
|
|
4174
4148
|
if (n === "%" && a !== "%")
|
|
4175
|
-
throw new
|
|
4149
|
+
throw new Ie("invalid intrinsic syntax, expected closing `%`");
|
|
4176
4150
|
if (a === "%" && n !== "%")
|
|
4177
|
-
throw new
|
|
4151
|
+
throw new Ie("invalid intrinsic syntax, expected opening `%`");
|
|
4178
4152
|
var s = [];
|
|
4179
|
-
return
|
|
4180
|
-
s[s.length] = i ?
|
|
4153
|
+
return Un(t, dl, function(o, r, i, l) {
|
|
4154
|
+
s[s.length] = i ? Un(l, fl, "$1") : r || o;
|
|
4181
4155
|
}), s;
|
|
4182
|
-
},
|
|
4156
|
+
}, ml = function(t, n) {
|
|
4183
4157
|
var a = t, s;
|
|
4184
|
-
if (
|
|
4185
|
-
var o =
|
|
4186
|
-
if (o ===
|
|
4187
|
-
throw new
|
|
4158
|
+
if (pt(Ln, a) && (s = Ln[a], a = "%" + s[0] + "%"), pt(je, a)) {
|
|
4159
|
+
var o = je[a];
|
|
4160
|
+
if (o === Ee && (o = sl(a)), typeof o > "u" && !n)
|
|
4161
|
+
throw new Ae("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
4188
4162
|
return {
|
|
4189
4163
|
alias: s,
|
|
4190
4164
|
name: a,
|
|
4191
4165
|
value: o
|
|
4192
4166
|
};
|
|
4193
4167
|
}
|
|
4194
|
-
throw new
|
|
4195
|
-
},
|
|
4168
|
+
throw new Ie("intrinsic " + t + " does not exist!");
|
|
4169
|
+
}, Ue = function(t, n) {
|
|
4196
4170
|
if (typeof t != "string" || t.length === 0)
|
|
4197
|
-
throw new
|
|
4171
|
+
throw new Ae("intrinsic name must be a non-empty string");
|
|
4198
4172
|
if (arguments.length > 1 && typeof n != "boolean")
|
|
4199
|
-
throw new
|
|
4200
|
-
if (
|
|
4201
|
-
throw new
|
|
4202
|
-
var a =
|
|
4203
|
-
c && (s = c[0],
|
|
4173
|
+
throw new Ae('"allowMissing" argument must be a boolean');
|
|
4174
|
+
if (ul(/^%?[^%]*%?$/, t) === null)
|
|
4175
|
+
throw new Ie("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4176
|
+
var a = pl(t), s = a.length > 0 ? a[0] : "", o = ml("%" + s + "%", n), r = o.name, i = o.value, l = !1, c = o.alias;
|
|
4177
|
+
c && (s = c[0], cl(a, ll([0, 1], c)));
|
|
4204
4178
|
for (var u = 1, p = !0; u < a.length; u += 1) {
|
|
4205
|
-
var d = a[u], m =
|
|
4179
|
+
var d = a[u], m = mt(d, 0, 1), h = mt(d, -1);
|
|
4206
4180
|
if ((m === '"' || m === "'" || m === "`" || h === '"' || h === "'" || h === "`") && m !== h)
|
|
4207
|
-
throw new
|
|
4208
|
-
if ((d === "constructor" || !p) && (l = !0), s += "." + d, r = "%" + s + "%",
|
|
4209
|
-
i =
|
|
4181
|
+
throw new Ie("property names with quotes must have matching quotes");
|
|
4182
|
+
if ((d === "constructor" || !p) && (l = !0), s += "." + d, r = "%" + s + "%", pt(je, r))
|
|
4183
|
+
i = je[r];
|
|
4210
4184
|
else if (i != null) {
|
|
4211
4185
|
if (!(d in i)) {
|
|
4212
4186
|
if (!n)
|
|
4213
|
-
throw new
|
|
4187
|
+
throw new Ae("base intrinsic for " + t + " exists, but the property is not available.");
|
|
4214
4188
|
return;
|
|
4215
4189
|
}
|
|
4216
|
-
if (
|
|
4217
|
-
var y =
|
|
4190
|
+
if (we && u + 1 >= a.length) {
|
|
4191
|
+
var y = we(i, d);
|
|
4218
4192
|
p = !!y, p && "get" in y && !("originalValue" in y.get) ? i = y.get : i = i[d];
|
|
4219
4193
|
} else
|
|
4220
|
-
p =
|
|
4221
|
-
p && !l && (
|
|
4194
|
+
p = pt(i, d), i = i[d];
|
|
4195
|
+
p && !l && (je[r] = i);
|
|
4222
4196
|
}
|
|
4223
4197
|
}
|
|
4224
4198
|
return i;
|
|
4225
|
-
},
|
|
4226
|
-
function
|
|
4227
|
-
if (
|
|
4228
|
-
|
|
4229
|
-
var e =
|
|
4199
|
+
}, ca = { exports: {} }, Ot, Mn;
|
|
4200
|
+
function dn() {
|
|
4201
|
+
if (Mn) return Ot;
|
|
4202
|
+
Mn = 1;
|
|
4203
|
+
var e = Ue, t = e("%Object.defineProperty%", !0) || !1;
|
|
4230
4204
|
if (t)
|
|
4231
4205
|
try {
|
|
4232
4206
|
t({}, "a", { value: 1 });
|
|
4233
4207
|
} catch {
|
|
4234
4208
|
t = !1;
|
|
4235
4209
|
}
|
|
4236
|
-
return
|
|
4210
|
+
return Ot = t, Ot;
|
|
4237
4211
|
}
|
|
4238
|
-
var
|
|
4239
|
-
if (
|
|
4212
|
+
var hl = Ue, st = hl("%Object.getOwnPropertyDescriptor%", !0);
|
|
4213
|
+
if (st)
|
|
4240
4214
|
try {
|
|
4241
|
-
|
|
4215
|
+
st([], "length");
|
|
4242
4216
|
} catch {
|
|
4243
|
-
|
|
4217
|
+
st = null;
|
|
4244
4218
|
}
|
|
4245
|
-
var
|
|
4219
|
+
var ua = st, Hn = dn(), yl = sa, Oe = Ye, Bn = ua, gl = function(t, n, a) {
|
|
4246
4220
|
if (!t || typeof t != "object" && typeof t != "function")
|
|
4247
|
-
throw new
|
|
4221
|
+
throw new Oe("`obj` must be an object or a function`");
|
|
4248
4222
|
if (typeof n != "string" && typeof n != "symbol")
|
|
4249
|
-
throw new
|
|
4223
|
+
throw new Oe("`property` must be a string or a symbol`");
|
|
4250
4224
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
4251
|
-
throw new
|
|
4225
|
+
throw new Oe("`nonEnumerable`, if provided, must be a boolean or null");
|
|
4252
4226
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
4253
|
-
throw new
|
|
4227
|
+
throw new Oe("`nonWritable`, if provided, must be a boolean or null");
|
|
4254
4228
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
4255
|
-
throw new
|
|
4229
|
+
throw new Oe("`nonConfigurable`, if provided, must be a boolean or null");
|
|
4256
4230
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
4257
|
-
throw new
|
|
4258
|
-
var s = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, r = arguments.length > 5 ? arguments[5] : null, i = arguments.length > 6 ? arguments[6] : !1, l = !!
|
|
4259
|
-
if (
|
|
4260
|
-
|
|
4231
|
+
throw new Oe("`loose`, if provided, must be a boolean");
|
|
4232
|
+
var s = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, r = arguments.length > 5 ? arguments[5] : null, i = arguments.length > 6 ? arguments[6] : !1, l = !!Bn && Bn(t, n);
|
|
4233
|
+
if (Hn)
|
|
4234
|
+
Hn(t, n, {
|
|
4261
4235
|
configurable: r === null && l ? l.configurable : !r,
|
|
4262
4236
|
enumerable: s === null && l ? l.enumerable : !s,
|
|
4263
4237
|
value: a,
|
|
@@ -4266,37 +4240,37 @@ var ca = it, Mn = un(), gl = ia, Te = Qe, Hn = ca, vl = function(t, n, a) {
|
|
|
4266
4240
|
else if (i || !s && !o && !r)
|
|
4267
4241
|
t[n] = a;
|
|
4268
4242
|
else
|
|
4269
|
-
throw new
|
|
4270
|
-
},
|
|
4271
|
-
return !!
|
|
4243
|
+
throw new yl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4244
|
+
}, Ht = dn(), da = function() {
|
|
4245
|
+
return !!Ht;
|
|
4272
4246
|
};
|
|
4273
|
-
|
|
4274
|
-
if (!
|
|
4247
|
+
da.hasArrayLengthDefineBug = function() {
|
|
4248
|
+
if (!Ht)
|
|
4275
4249
|
return null;
|
|
4276
4250
|
try {
|
|
4277
|
-
return
|
|
4251
|
+
return Ht([], "length", { value: 1 }).length !== 1;
|
|
4278
4252
|
} catch {
|
|
4279
4253
|
return !0;
|
|
4280
4254
|
}
|
|
4281
4255
|
};
|
|
4282
|
-
var
|
|
4256
|
+
var vl = da, bl = Ue, Dn = gl, xl = vl(), Vn = ua, zn = Ye, kl = bl("%Math.floor%"), $l = function(t, n) {
|
|
4283
4257
|
if (typeof t != "function")
|
|
4284
4258
|
throw new zn("`fn` is not a function");
|
|
4285
|
-
if (typeof n != "number" || n < 0 || n > 4294967295 ||
|
|
4259
|
+
if (typeof n != "number" || n < 0 || n > 4294967295 || kl(n) !== n)
|
|
4286
4260
|
throw new zn("`length` must be a positive 32-bit integer");
|
|
4287
4261
|
var a = arguments.length > 2 && !!arguments[2], s = !0, o = !0;
|
|
4288
|
-
if ("length" in t &&
|
|
4289
|
-
var r =
|
|
4262
|
+
if ("length" in t && Vn) {
|
|
4263
|
+
var r = Vn(t, "length");
|
|
4290
4264
|
r && !r.configurable && (s = !1), r && !r.writable && (o = !1);
|
|
4291
4265
|
}
|
|
4292
|
-
return (s || o || !a) && (
|
|
4266
|
+
return (s || o || !a) && (xl ? Dn(
|
|
4293
4267
|
/** @type {Parameters<define>[0]} */
|
|
4294
4268
|
t,
|
|
4295
4269
|
"length",
|
|
4296
4270
|
n,
|
|
4297
4271
|
!0,
|
|
4298
4272
|
!0
|
|
4299
|
-
) :
|
|
4273
|
+
) : Dn(
|
|
4300
4274
|
/** @type {Parameters<define>[0]} */
|
|
4301
4275
|
t,
|
|
4302
4276
|
"length",
|
|
@@ -4304,7 +4278,7 @@ var bl = ua, xl = Le, Bn = vl, kl = bl(), Dn = ca, zn = Qe, $l = xl("%Math.floor
|
|
|
4304
4278
|
)), t;
|
|
4305
4279
|
};
|
|
4306
4280
|
(function(e) {
|
|
4307
|
-
var t =
|
|
4281
|
+
var t = un, n = Ue, a = $l, s = Ye, o = n("%Function.prototype.apply%"), r = n("%Function.prototype.call%"), i = n("%Reflect.apply%", !0) || t.call(r, o), l = dn(), c = n("%Math.max%");
|
|
4308
4282
|
e.exports = function(d) {
|
|
4309
4283
|
if (typeof d != "function")
|
|
4310
4284
|
throw new s("a function is required");
|
|
@@ -4319,43 +4293,43 @@ var bl = ua, xl = Le, Bn = vl, kl = bl(), Dn = ca, zn = Qe, $l = xl("%Math.floor
|
|
|
4319
4293
|
return i(t, o, arguments);
|
|
4320
4294
|
};
|
|
4321
4295
|
l ? l(e.exports, "apply", { value: u }) : e.exports.apply = u;
|
|
4322
|
-
})(
|
|
4323
|
-
var
|
|
4324
|
-
var a =
|
|
4325
|
-
return typeof a == "function" &&
|
|
4296
|
+
})(ca);
|
|
4297
|
+
var Sl = ca.exports, fa = Ue, pa = Sl, wl = pa(fa("String.prototype.indexOf")), jl = function(t, n) {
|
|
4298
|
+
var a = fa(t, !!n);
|
|
4299
|
+
return typeof a == "function" && wl(t, ".prototype.") > -1 ? pa(a) : a;
|
|
4326
4300
|
};
|
|
4327
|
-
const
|
|
4301
|
+
const Nl = {}, Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4328
4302
|
__proto__: null,
|
|
4329
|
-
default:
|
|
4330
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4331
|
-
var
|
|
4303
|
+
default: Nl
|
|
4304
|
+
}, Symbol.toStringTag, { value: "Module" })), Ol = /* @__PURE__ */ vo(Tl);
|
|
4305
|
+
var fn = typeof Map == "function" && Map.prototype, Ct = Object.getOwnPropertyDescriptor && fn ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ht = fn && Ct && typeof Ct.get == "function" ? Ct.get : null, Wn = fn && Map.prototype.forEach, pn = typeof Set == "function" && Set.prototype, Pt = Object.getOwnPropertyDescriptor && pn ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, yt = pn && Pt && typeof Pt.get == "function" ? Pt.get : null, Jn = pn && Set.prototype.forEach, Cl = typeof WeakMap == "function" && WeakMap.prototype, De = Cl ? WeakMap.prototype.has : null, Pl = typeof WeakSet == "function" && WeakSet.prototype, Ve = Pl ? WeakSet.prototype.has : null, El = typeof WeakRef == "function" && WeakRef.prototype, Gn = El ? WeakRef.prototype.deref : null, Rl = Boolean.prototype.valueOf, Al = Object.prototype.toString, Fl = Function.prototype.toString, ql = String.prototype.match, mn = String.prototype.slice, ve = String.prototype.replace, Il = String.prototype.toUpperCase, Kn = String.prototype.toLowerCase, ma = RegExp.prototype.test, Qn = Array.prototype.concat, ue = Array.prototype.join, _l = Array.prototype.slice, Yn = Math.floor, Bt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Et = Object.getOwnPropertySymbols, Dt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, _e = typeof Symbol == "function" && typeof Symbol.iterator == "object", Z = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === _e || !0) ? Symbol.toStringTag : null, ha = Object.prototype.propertyIsEnumerable, Xn = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
4332
4306
|
return e.__proto__;
|
|
4333
4307
|
} : null);
|
|
4334
|
-
function
|
|
4335
|
-
if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 ||
|
|
4308
|
+
function Zn(e, t) {
|
|
4309
|
+
if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 || ma.call(/e/, t))
|
|
4336
4310
|
return t;
|
|
4337
4311
|
var n = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
4338
4312
|
if (typeof e == "number") {
|
|
4339
|
-
var a = e < 0 ? -
|
|
4313
|
+
var a = e < 0 ? -Yn(-e) : Yn(e);
|
|
4340
4314
|
if (a !== e) {
|
|
4341
|
-
var s = String(a), o =
|
|
4342
|
-
return
|
|
4315
|
+
var s = String(a), o = mn.call(t, s.length + 1);
|
|
4316
|
+
return ve.call(s, n, "$&_") + "." + ve.call(ve.call(o, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
4343
4317
|
}
|
|
4344
4318
|
}
|
|
4345
|
-
return
|
|
4319
|
+
return ve.call(t, n, "$&_");
|
|
4346
4320
|
}
|
|
4347
|
-
var
|
|
4321
|
+
var Vt = Ol, er = Vt.custom, tr = ga(er) ? er : null, Ll = function e(t, n, a, s) {
|
|
4348
4322
|
var o = n || {};
|
|
4349
|
-
if (
|
|
4323
|
+
if (ge(o, "quoteStyle") && o.quoteStyle !== "single" && o.quoteStyle !== "double")
|
|
4350
4324
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
4351
|
-
if (
|
|
4325
|
+
if (ge(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
|
|
4352
4326
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
4353
|
-
var r =
|
|
4327
|
+
var r = ge(o, "customInspect") ? o.customInspect : !0;
|
|
4354
4328
|
if (typeof r != "boolean" && r !== "symbol")
|
|
4355
4329
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
4356
|
-
if (
|
|
4330
|
+
if (ge(o, "indent") && o.indent !== null && o.indent !== " " && !(parseInt(o.indent, 10) === o.indent && o.indent > 0))
|
|
4357
4331
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
4358
|
-
if (
|
|
4332
|
+
if (ge(o, "numericSeparator") && typeof o.numericSeparator != "boolean")
|
|
4359
4333
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
4360
4334
|
var i = o.numericSeparator;
|
|
4361
4335
|
if (typeof t > "u")
|
|
@@ -4365,165 +4339,165 @@ var Dt = Cl, Zn = Dt.custom, er = ya(Zn) ? Zn : null, Ul = function e(t, n, a, s
|
|
|
4365
4339
|
if (typeof t == "boolean")
|
|
4366
4340
|
return t ? "true" : "false";
|
|
4367
4341
|
if (typeof t == "string")
|
|
4368
|
-
return
|
|
4342
|
+
return ba(t, o);
|
|
4369
4343
|
if (typeof t == "number") {
|
|
4370
4344
|
if (t === 0)
|
|
4371
4345
|
return 1 / 0 / t > 0 ? "0" : "-0";
|
|
4372
4346
|
var l = String(t);
|
|
4373
|
-
return i ?
|
|
4347
|
+
return i ? Zn(t, l) : l;
|
|
4374
4348
|
}
|
|
4375
4349
|
if (typeof t == "bigint") {
|
|
4376
4350
|
var c = String(t) + "n";
|
|
4377
|
-
return i ?
|
|
4351
|
+
return i ? Zn(t, c) : c;
|
|
4378
4352
|
}
|
|
4379
4353
|
var u = typeof o.depth > "u" ? 5 : o.depth;
|
|
4380
4354
|
if (typeof a > "u" && (a = 0), a >= u && u > 0 && typeof t == "object")
|
|
4381
4355
|
return zt(t) ? "[Array]" : "[Object]";
|
|
4382
|
-
var p =
|
|
4356
|
+
var p = nc(o, a);
|
|
4383
4357
|
if (typeof s > "u")
|
|
4384
4358
|
s = [];
|
|
4385
|
-
else if (
|
|
4359
|
+
else if (va(s, t) >= 0)
|
|
4386
4360
|
return "[Circular]";
|
|
4387
4361
|
function d(q, L, H) {
|
|
4388
|
-
if (L && (s =
|
|
4362
|
+
if (L && (s = _l.call(s), s.push(L)), H) {
|
|
4389
4363
|
var B = {
|
|
4390
4364
|
depth: o.depth
|
|
4391
4365
|
};
|
|
4392
|
-
return
|
|
4366
|
+
return ge(o, "quoteStyle") && (B.quoteStyle = o.quoteStyle), e(q, B, a + 1, s);
|
|
4393
4367
|
}
|
|
4394
4368
|
return e(q, o, a + 1, s);
|
|
4395
4369
|
}
|
|
4396
|
-
if (typeof t == "function" && !
|
|
4397
|
-
var m =
|
|
4370
|
+
if (typeof t == "function" && !nr(t)) {
|
|
4371
|
+
var m = Jl(t), h = et(t, d);
|
|
4398
4372
|
return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + ue.call(h, ", ") + " }" : "");
|
|
4399
4373
|
}
|
|
4400
|
-
if (
|
|
4401
|
-
var y =
|
|
4402
|
-
return typeof t == "object" && !
|
|
4374
|
+
if (ga(t)) {
|
|
4375
|
+
var y = _e ? ve.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : Dt.call(t);
|
|
4376
|
+
return typeof t == "object" && !_e ? He(y) : y;
|
|
4403
4377
|
}
|
|
4404
|
-
if (
|
|
4405
|
-
for (var v = "<" +
|
|
4406
|
-
v += " " + x[g].name + "=" +
|
|
4407
|
-
return v += ">", t.childNodes && t.childNodes.length && (v += "..."), v += "</" +
|
|
4378
|
+
if (Zl(t)) {
|
|
4379
|
+
for (var v = "<" + Kn.call(String(t.nodeName)), x = t.attributes || [], g = 0; g < x.length; g++)
|
|
4380
|
+
v += " " + x[g].name + "=" + ya(Ul(x[g].value), "double", o);
|
|
4381
|
+
return v += ">", t.childNodes && t.childNodes.length && (v += "..."), v += "</" + Kn.call(String(t.nodeName)) + ">", v;
|
|
4408
4382
|
}
|
|
4409
4383
|
if (zt(t)) {
|
|
4410
4384
|
if (t.length === 0)
|
|
4411
4385
|
return "[]";
|
|
4412
|
-
var b =
|
|
4413
|
-
return p && !
|
|
4386
|
+
var b = et(t, d);
|
|
4387
|
+
return p && !tc(b) ? "[" + Wt(b, p) + "]" : "[ " + ue.call(b, ", ") + " ]";
|
|
4414
4388
|
}
|
|
4415
|
-
if (
|
|
4416
|
-
var w =
|
|
4417
|
-
return !("cause" in Error.prototype) && "cause" in t && !
|
|
4389
|
+
if (Hl(t)) {
|
|
4390
|
+
var w = et(t, d);
|
|
4391
|
+
return !("cause" in Error.prototype) && "cause" in t && !ha.call(t, "cause") ? "{ [" + String(t) + "] " + ue.call(Qn.call("[cause]: " + d(t.cause), w), ", ") + " }" : w.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ue.call(w, ", ") + " }";
|
|
4418
4392
|
}
|
|
4419
4393
|
if (typeof t == "object" && r) {
|
|
4420
|
-
if (
|
|
4421
|
-
return
|
|
4394
|
+
if (tr && typeof t[tr] == "function" && Vt)
|
|
4395
|
+
return Vt(t, { depth: u - a });
|
|
4422
4396
|
if (r !== "symbol" && typeof t.inspect == "function")
|
|
4423
4397
|
return t.inspect();
|
|
4424
4398
|
}
|
|
4425
|
-
if (
|
|
4399
|
+
if (Gl(t)) {
|
|
4426
4400
|
var S = [];
|
|
4427
|
-
return
|
|
4401
|
+
return Wn && Wn.call(t, function(q, L) {
|
|
4428
4402
|
S.push(d(L, t, !0) + " => " + d(q, t));
|
|
4429
|
-
}),
|
|
4403
|
+
}), rr("Map", ht.call(t), S, p);
|
|
4430
4404
|
}
|
|
4431
|
-
if (
|
|
4405
|
+
if (Yl(t)) {
|
|
4432
4406
|
var j = [];
|
|
4433
|
-
return
|
|
4407
|
+
return Jn && Jn.call(t, function(q) {
|
|
4434
4408
|
j.push(d(q, t));
|
|
4435
|
-
}),
|
|
4409
|
+
}), rr("Set", yt.call(t), j, p);
|
|
4436
4410
|
}
|
|
4411
|
+
if (Kl(t))
|
|
4412
|
+
return Rt("WeakMap");
|
|
4413
|
+
if (Xl(t))
|
|
4414
|
+
return Rt("WeakSet");
|
|
4437
4415
|
if (Ql(t))
|
|
4438
|
-
return
|
|
4439
|
-
if (
|
|
4440
|
-
return
|
|
4441
|
-
if (Yl(t))
|
|
4442
|
-
return Et("WeakRef");
|
|
4416
|
+
return Rt("WeakRef");
|
|
4417
|
+
if (Dl(t))
|
|
4418
|
+
return He(d(Number(t)));
|
|
4443
4419
|
if (zl(t))
|
|
4444
|
-
return
|
|
4445
|
-
if (Wl(t))
|
|
4446
|
-
return Me(d(Ht.call(t)));
|
|
4420
|
+
return He(d(Bt.call(t)));
|
|
4447
4421
|
if (Vl(t))
|
|
4448
|
-
return
|
|
4449
|
-
if (
|
|
4450
|
-
return
|
|
4422
|
+
return He(Rl.call(t));
|
|
4423
|
+
if (Bl(t))
|
|
4424
|
+
return He(d(String(t)));
|
|
4451
4425
|
if (typeof window < "u" && t === window)
|
|
4452
4426
|
return "{ [object Window] }";
|
|
4453
|
-
if (t ===
|
|
4427
|
+
if (t === ot)
|
|
4454
4428
|
return "{ [object globalThis] }";
|
|
4455
|
-
if (!
|
|
4456
|
-
var k =
|
|
4457
|
-
return k.length === 0 ? Q + "{}" : p ? Q + "{" +
|
|
4429
|
+
if (!Ml(t) && !nr(t)) {
|
|
4430
|
+
var k = et(t, d), O = Xn ? Xn(t) === Object.prototype : t instanceof Object || t.constructor === Object, R = t instanceof Object ? "" : "null prototype", I = !O && Z && Object(t) === t && Z in t ? mn.call(xe(t), 8, -1) : R ? "Object" : "", V = O || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Q = V + (I || R ? "[" + ue.call(Qn.call([], I || [], R || []), ": ") + "] " : "");
|
|
4431
|
+
return k.length === 0 ? Q + "{}" : p ? Q + "{" + Wt(k, p) + "}" : Q + "{ " + ue.call(k, ", ") + " }";
|
|
4458
4432
|
}
|
|
4459
4433
|
return String(t);
|
|
4460
4434
|
};
|
|
4461
|
-
function
|
|
4435
|
+
function ya(e, t, n) {
|
|
4462
4436
|
var a = (n.quoteStyle || t) === "double" ? '"' : "'";
|
|
4463
4437
|
return a + e + a;
|
|
4464
4438
|
}
|
|
4465
|
-
function
|
|
4466
|
-
return
|
|
4439
|
+
function Ul(e) {
|
|
4440
|
+
return ve.call(String(e), /"/g, """);
|
|
4467
4441
|
}
|
|
4468
4442
|
function zt(e) {
|
|
4469
|
-
return
|
|
4443
|
+
return xe(e) === "[object Array]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4470
4444
|
}
|
|
4471
|
-
function
|
|
4472
|
-
return
|
|
4445
|
+
function Ml(e) {
|
|
4446
|
+
return xe(e) === "[object Date]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4447
|
+
}
|
|
4448
|
+
function nr(e) {
|
|
4449
|
+
return xe(e) === "[object RegExp]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4473
4450
|
}
|
|
4474
|
-
function
|
|
4475
|
-
return
|
|
4451
|
+
function Hl(e) {
|
|
4452
|
+
return xe(e) === "[object Error]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4476
4453
|
}
|
|
4477
4454
|
function Bl(e) {
|
|
4478
|
-
return
|
|
4455
|
+
return xe(e) === "[object String]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4479
4456
|
}
|
|
4480
4457
|
function Dl(e) {
|
|
4481
|
-
return
|
|
4482
|
-
}
|
|
4483
|
-
function zl(e) {
|
|
4484
|
-
return be(e) === "[object Number]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4458
|
+
return xe(e) === "[object Number]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4485
4459
|
}
|
|
4486
4460
|
function Vl(e) {
|
|
4487
|
-
return
|
|
4461
|
+
return xe(e) === "[object Boolean]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4488
4462
|
}
|
|
4489
|
-
function
|
|
4490
|
-
if (
|
|
4463
|
+
function ga(e) {
|
|
4464
|
+
if (_e)
|
|
4491
4465
|
return e && typeof e == "object" && e instanceof Symbol;
|
|
4492
4466
|
if (typeof e == "symbol")
|
|
4493
4467
|
return !0;
|
|
4494
|
-
if (!e || typeof e != "object" || !
|
|
4468
|
+
if (!e || typeof e != "object" || !Dt)
|
|
4495
4469
|
return !1;
|
|
4496
4470
|
try {
|
|
4497
|
-
return
|
|
4471
|
+
return Dt.call(e), !0;
|
|
4498
4472
|
} catch {
|
|
4499
4473
|
}
|
|
4500
4474
|
return !1;
|
|
4501
4475
|
}
|
|
4502
|
-
function
|
|
4503
|
-
if (!e || typeof e != "object" || !
|
|
4476
|
+
function zl(e) {
|
|
4477
|
+
if (!e || typeof e != "object" || !Bt)
|
|
4504
4478
|
return !1;
|
|
4505
4479
|
try {
|
|
4506
|
-
return
|
|
4480
|
+
return Bt.call(e), !0;
|
|
4507
4481
|
} catch {
|
|
4508
4482
|
}
|
|
4509
4483
|
return !1;
|
|
4510
4484
|
}
|
|
4511
|
-
var
|
|
4485
|
+
var Wl = Object.prototype.hasOwnProperty || function(e) {
|
|
4512
4486
|
return e in this;
|
|
4513
4487
|
};
|
|
4514
|
-
function
|
|
4515
|
-
return
|
|
4488
|
+
function ge(e, t) {
|
|
4489
|
+
return Wl.call(e, t);
|
|
4516
4490
|
}
|
|
4517
|
-
function
|
|
4518
|
-
return
|
|
4491
|
+
function xe(e) {
|
|
4492
|
+
return Al.call(e);
|
|
4519
4493
|
}
|
|
4520
|
-
function
|
|
4494
|
+
function Jl(e) {
|
|
4521
4495
|
if (e.name)
|
|
4522
4496
|
return e.name;
|
|
4523
|
-
var t =
|
|
4497
|
+
var t = ql.call(Fl.call(e), /^function\s*([\w$]+)/);
|
|
4524
4498
|
return t ? t[1] : null;
|
|
4525
4499
|
}
|
|
4526
|
-
function
|
|
4500
|
+
function va(e, t) {
|
|
4527
4501
|
if (e.indexOf)
|
|
4528
4502
|
return e.indexOf(t);
|
|
4529
4503
|
for (var n = 0, a = e.length; n < a; n++)
|
|
@@ -4531,13 +4505,13 @@ function ga(e, t) {
|
|
|
4531
4505
|
return n;
|
|
4532
4506
|
return -1;
|
|
4533
4507
|
}
|
|
4534
|
-
function
|
|
4535
|
-
if (!
|
|
4508
|
+
function Gl(e) {
|
|
4509
|
+
if (!ht || !e || typeof e != "object")
|
|
4536
4510
|
return !1;
|
|
4537
4511
|
try {
|
|
4538
|
-
|
|
4512
|
+
ht.call(e);
|
|
4539
4513
|
try {
|
|
4540
|
-
|
|
4514
|
+
yt.call(e);
|
|
4541
4515
|
} catch {
|
|
4542
4516
|
return !0;
|
|
4543
4517
|
}
|
|
@@ -4546,13 +4520,13 @@ function Kl(e) {
|
|
|
4546
4520
|
}
|
|
4547
4521
|
return !1;
|
|
4548
4522
|
}
|
|
4549
|
-
function
|
|
4550
|
-
if (!
|
|
4523
|
+
function Kl(e) {
|
|
4524
|
+
if (!De || !e || typeof e != "object")
|
|
4551
4525
|
return !1;
|
|
4552
4526
|
try {
|
|
4553
|
-
|
|
4527
|
+
De.call(e, De);
|
|
4554
4528
|
try {
|
|
4555
|
-
|
|
4529
|
+
Ve.call(e, Ve);
|
|
4556
4530
|
} catch {
|
|
4557
4531
|
return !0;
|
|
4558
4532
|
}
|
|
@@ -4561,22 +4535,22 @@ function Ql(e) {
|
|
|
4561
4535
|
}
|
|
4562
4536
|
return !1;
|
|
4563
4537
|
}
|
|
4564
|
-
function
|
|
4565
|
-
if (!
|
|
4538
|
+
function Ql(e) {
|
|
4539
|
+
if (!Gn || !e || typeof e != "object")
|
|
4566
4540
|
return !1;
|
|
4567
4541
|
try {
|
|
4568
|
-
return
|
|
4542
|
+
return Gn.call(e), !0;
|
|
4569
4543
|
} catch {
|
|
4570
4544
|
}
|
|
4571
4545
|
return !1;
|
|
4572
4546
|
}
|
|
4573
|
-
function
|
|
4574
|
-
if (!
|
|
4547
|
+
function Yl(e) {
|
|
4548
|
+
if (!yt || !e || typeof e != "object")
|
|
4575
4549
|
return !1;
|
|
4576
4550
|
try {
|
|
4577
|
-
|
|
4551
|
+
yt.call(e);
|
|
4578
4552
|
try {
|
|
4579
|
-
|
|
4553
|
+
ht.call(e);
|
|
4580
4554
|
} catch {
|
|
4581
4555
|
return !0;
|
|
4582
4556
|
}
|
|
@@ -4585,13 +4559,13 @@ function Xl(e) {
|
|
|
4585
4559
|
}
|
|
4586
4560
|
return !1;
|
|
4587
4561
|
}
|
|
4588
|
-
function
|
|
4589
|
-
if (!
|
|
4562
|
+
function Xl(e) {
|
|
4563
|
+
if (!Ve || !e || typeof e != "object")
|
|
4590
4564
|
return !1;
|
|
4591
4565
|
try {
|
|
4592
|
-
|
|
4566
|
+
Ve.call(e, Ve);
|
|
4593
4567
|
try {
|
|
4594
|
-
|
|
4568
|
+
De.call(e, De);
|
|
4595
4569
|
} catch {
|
|
4596
4570
|
return !0;
|
|
4597
4571
|
}
|
|
@@ -4600,18 +4574,18 @@ function Zl(e) {
|
|
|
4600
4574
|
}
|
|
4601
4575
|
return !1;
|
|
4602
4576
|
}
|
|
4603
|
-
function
|
|
4577
|
+
function Zl(e) {
|
|
4604
4578
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
4605
4579
|
}
|
|
4606
|
-
function
|
|
4580
|
+
function ba(e, t) {
|
|
4607
4581
|
if (e.length > t.maxStringLength) {
|
|
4608
4582
|
var n = e.length - t.maxStringLength, a = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
4609
|
-
return
|
|
4583
|
+
return ba(mn.call(e, 0, t.maxStringLength), t) + a;
|
|
4610
4584
|
}
|
|
4611
|
-
var s =
|
|
4612
|
-
return
|
|
4585
|
+
var s = ve.call(ve.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, ec);
|
|
4586
|
+
return ya(s, "single", t);
|
|
4613
4587
|
}
|
|
4614
|
-
function
|
|
4588
|
+
function ec(e) {
|
|
4615
4589
|
var t = e.charCodeAt(0), n = {
|
|
4616
4590
|
8: "b",
|
|
4617
4591
|
9: "t",
|
|
@@ -4619,26 +4593,26 @@ function tc(e) {
|
|
|
4619
4593
|
12: "f",
|
|
4620
4594
|
13: "r"
|
|
4621
4595
|
}[t];
|
|
4622
|
-
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") +
|
|
4596
|
+
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + Il.call(t.toString(16));
|
|
4623
4597
|
}
|
|
4624
|
-
function
|
|
4598
|
+
function He(e) {
|
|
4625
4599
|
return "Object(" + e + ")";
|
|
4626
4600
|
}
|
|
4627
|
-
function
|
|
4601
|
+
function Rt(e) {
|
|
4628
4602
|
return e + " { ? }";
|
|
4629
4603
|
}
|
|
4630
|
-
function
|
|
4631
|
-
var s = a ?
|
|
4604
|
+
function rr(e, t, n, a) {
|
|
4605
|
+
var s = a ? Wt(n, a) : ue.call(n, ", ");
|
|
4632
4606
|
return e + " (" + t + ") {" + s + "}";
|
|
4633
4607
|
}
|
|
4634
|
-
function
|
|
4608
|
+
function tc(e) {
|
|
4635
4609
|
for (var t = 0; t < e.length; t++)
|
|
4636
|
-
if (
|
|
4610
|
+
if (va(e[t], `
|
|
4637
4611
|
`) >= 0)
|
|
4638
4612
|
return !1;
|
|
4639
4613
|
return !0;
|
|
4640
4614
|
}
|
|
4641
|
-
function
|
|
4615
|
+
function nc(e, t) {
|
|
4642
4616
|
var n;
|
|
4643
4617
|
if (e.indent === " ")
|
|
4644
4618
|
n = " ";
|
|
@@ -4651,7 +4625,7 @@ function rc(e, t) {
|
|
|
4651
4625
|
prev: ue.call(Array(t + 1), n)
|
|
4652
4626
|
};
|
|
4653
4627
|
}
|
|
4654
|
-
function
|
|
4628
|
+
function Wt(e, t) {
|
|
4655
4629
|
if (e.length === 0)
|
|
4656
4630
|
return "";
|
|
4657
4631
|
var n = `
|
|
@@ -4659,36 +4633,36 @@ function Vt(e, t) {
|
|
|
4659
4633
|
return n + ue.call(e, "," + n) + `
|
|
4660
4634
|
` + t.prev;
|
|
4661
4635
|
}
|
|
4662
|
-
function
|
|
4636
|
+
function et(e, t) {
|
|
4663
4637
|
var n = zt(e), a = [];
|
|
4664
4638
|
if (n) {
|
|
4665
4639
|
a.length = e.length;
|
|
4666
4640
|
for (var s = 0; s < e.length; s++)
|
|
4667
|
-
a[s] =
|
|
4641
|
+
a[s] = ge(e, s) ? t(e[s], e) : "";
|
|
4668
4642
|
}
|
|
4669
|
-
var o = typeof
|
|
4670
|
-
if (
|
|
4643
|
+
var o = typeof Et == "function" ? Et(e) : [], r;
|
|
4644
|
+
if (_e) {
|
|
4671
4645
|
r = {};
|
|
4672
4646
|
for (var i = 0; i < o.length; i++)
|
|
4673
4647
|
r["$" + o[i]] = o[i];
|
|
4674
4648
|
}
|
|
4675
4649
|
for (var l in e)
|
|
4676
|
-
|
|
4677
|
-
if (typeof
|
|
4650
|
+
ge(e, l) && (n && String(Number(l)) === l && l < e.length || _e && r["$" + l] instanceof Symbol || (ma.call(/[^\w$]/, l) ? a.push(t(l, e) + ": " + t(e[l], e)) : a.push(l + ": " + t(e[l], e))));
|
|
4651
|
+
if (typeof Et == "function")
|
|
4678
4652
|
for (var c = 0; c < o.length; c++)
|
|
4679
|
-
|
|
4653
|
+
ha.call(e, o[c]) && a.push("[" + t(o[c]) + "]: " + t(e[o[c]], e));
|
|
4680
4654
|
return a;
|
|
4681
4655
|
}
|
|
4682
|
-
var
|
|
4656
|
+
var xa = Ue, Me = jl, rc = Ll, ac = Ye, tt = xa("%WeakMap%", !0), nt = xa("%Map%", !0), oc = Me("WeakMap.prototype.get", !0), ic = Me("WeakMap.prototype.set", !0), sc = Me("WeakMap.prototype.has", !0), lc = Me("Map.prototype.get", !0), cc = Me("Map.prototype.set", !0), uc = Me("Map.prototype.has", !0), hn = function(e, t) {
|
|
4683
4657
|
for (var n = e, a; (a = n.next) !== null; n = a)
|
|
4684
4658
|
if (a.key === t)
|
|
4685
4659
|
return n.next = a.next, a.next = /** @type {NonNullable<typeof list.next>} */
|
|
4686
4660
|
e.next, e.next = a, a;
|
|
4687
|
-
},
|
|
4688
|
-
var n =
|
|
4661
|
+
}, dc = function(e, t) {
|
|
4662
|
+
var n = hn(e, t);
|
|
4689
4663
|
return n && n.value;
|
|
4690
|
-
},
|
|
4691
|
-
var a =
|
|
4664
|
+
}, fc = function(e, t, n) {
|
|
4665
|
+
var a = hn(e, t);
|
|
4692
4666
|
a ? a.value = n : e.next = /** @type {import('.').ListNode<typeof value>} */
|
|
4693
4667
|
{
|
|
4694
4668
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
@@ -4696,80 +4670,80 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4696
4670
|
next: e.next,
|
|
4697
4671
|
value: n
|
|
4698
4672
|
};
|
|
4699
|
-
},
|
|
4700
|
-
return !!
|
|
4701
|
-
},
|
|
4673
|
+
}, pc = function(e, t) {
|
|
4674
|
+
return !!hn(e, t);
|
|
4675
|
+
}, mc = function() {
|
|
4702
4676
|
var t, n, a, s = {
|
|
4703
4677
|
assert: function(o) {
|
|
4704
4678
|
if (!s.has(o))
|
|
4705
|
-
throw new
|
|
4679
|
+
throw new ac("Side channel does not contain " + rc(o));
|
|
4706
4680
|
},
|
|
4707
4681
|
get: function(o) {
|
|
4708
|
-
if (
|
|
4682
|
+
if (tt && o && (typeof o == "object" || typeof o == "function")) {
|
|
4709
4683
|
if (t)
|
|
4710
|
-
return
|
|
4711
|
-
} else if (
|
|
4684
|
+
return oc(t, o);
|
|
4685
|
+
} else if (nt) {
|
|
4712
4686
|
if (n)
|
|
4713
|
-
return
|
|
4687
|
+
return lc(n, o);
|
|
4714
4688
|
} else if (a)
|
|
4715
|
-
return
|
|
4689
|
+
return dc(a, o);
|
|
4716
4690
|
},
|
|
4717
4691
|
has: function(o) {
|
|
4718
|
-
if (
|
|
4692
|
+
if (tt && o && (typeof o == "object" || typeof o == "function")) {
|
|
4719
4693
|
if (t)
|
|
4720
|
-
return
|
|
4721
|
-
} else if (
|
|
4694
|
+
return sc(t, o);
|
|
4695
|
+
} else if (nt) {
|
|
4722
4696
|
if (n)
|
|
4723
|
-
return
|
|
4697
|
+
return uc(n, o);
|
|
4724
4698
|
} else if (a)
|
|
4725
|
-
return
|
|
4699
|
+
return pc(a, o);
|
|
4726
4700
|
return !1;
|
|
4727
4701
|
},
|
|
4728
4702
|
set: function(o, r) {
|
|
4729
|
-
|
|
4703
|
+
tt && o && (typeof o == "object" || typeof o == "function") ? (t || (t = new tt()), ic(t, o, r)) : nt ? (n || (n = new nt()), cc(n, o, r)) : (a || (a = { key: {}, next: null }), fc(a, o, r));
|
|
4730
4704
|
}
|
|
4731
4705
|
};
|
|
4732
4706
|
return s;
|
|
4733
|
-
},
|
|
4707
|
+
}, hc = String.prototype.replace, yc = /%20/g, At = {
|
|
4734
4708
|
RFC1738: "RFC1738",
|
|
4735
4709
|
RFC3986: "RFC3986"
|
|
4736
|
-
},
|
|
4737
|
-
default:
|
|
4710
|
+
}, yn = {
|
|
4711
|
+
default: At.RFC3986,
|
|
4738
4712
|
formatters: {
|
|
4739
4713
|
RFC1738: function(e) {
|
|
4740
|
-
return
|
|
4714
|
+
return hc.call(e, yc, "+");
|
|
4741
4715
|
},
|
|
4742
4716
|
RFC3986: function(e) {
|
|
4743
4717
|
return String(e);
|
|
4744
4718
|
}
|
|
4745
4719
|
},
|
|
4746
|
-
RFC1738:
|
|
4747
|
-
RFC3986:
|
|
4748
|
-
},
|
|
4720
|
+
RFC1738: At.RFC1738,
|
|
4721
|
+
RFC3986: At.RFC3986
|
|
4722
|
+
}, gc = yn, Ft = Object.prototype.hasOwnProperty, $e = Array.isArray, le = function() {
|
|
4749
4723
|
for (var e = [], t = 0; t < 256; ++t)
|
|
4750
4724
|
e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
|
|
4751
4725
|
return e;
|
|
4752
|
-
}(),
|
|
4726
|
+
}(), vc = function(t) {
|
|
4753
4727
|
for (; t.length > 1; ) {
|
|
4754
4728
|
var n = t.pop(), a = n.obj[n.prop];
|
|
4755
|
-
if (
|
|
4729
|
+
if ($e(a)) {
|
|
4756
4730
|
for (var s = [], o = 0; o < a.length; ++o)
|
|
4757
4731
|
typeof a[o] < "u" && s.push(a[o]);
|
|
4758
4732
|
n.obj[n.prop] = s;
|
|
4759
4733
|
}
|
|
4760
4734
|
}
|
|
4761
|
-
},
|
|
4735
|
+
}, ka = function(t, n) {
|
|
4762
4736
|
for (var a = n && n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = 0; s < t.length; ++s)
|
|
4763
4737
|
typeof t[s] < "u" && (a[s] = t[s]);
|
|
4764
4738
|
return a;
|
|
4765
|
-
},
|
|
4739
|
+
}, bc = function e(t, n, a) {
|
|
4766
4740
|
if (!n)
|
|
4767
4741
|
return t;
|
|
4768
4742
|
if (typeof n != "object") {
|
|
4769
|
-
if (
|
|
4743
|
+
if ($e(t))
|
|
4770
4744
|
t.push(n);
|
|
4771
4745
|
else if (t && typeof t == "object")
|
|
4772
|
-
(a && (a.plainObjects || a.allowPrototypes) || !
|
|
4746
|
+
(a && (a.plainObjects || a.allowPrototypes) || !Ft.call(Object.prototype, n)) && (t[n] = !0);
|
|
4773
4747
|
else
|
|
4774
4748
|
return [t, n];
|
|
4775
4749
|
return t;
|
|
@@ -4777,21 +4751,21 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4777
4751
|
if (!t || typeof t != "object")
|
|
4778
4752
|
return [t].concat(n);
|
|
4779
4753
|
var s = t;
|
|
4780
|
-
return
|
|
4781
|
-
if (
|
|
4754
|
+
return $e(t) && !$e(n) && (s = ka(t, a)), $e(t) && $e(n) ? (n.forEach(function(o, r) {
|
|
4755
|
+
if (Ft.call(t, r)) {
|
|
4782
4756
|
var i = t[r];
|
|
4783
4757
|
i && typeof i == "object" && o && typeof o == "object" ? t[r] = e(i, o, a) : t.push(o);
|
|
4784
4758
|
} else
|
|
4785
4759
|
t[r] = o;
|
|
4786
4760
|
}), t) : Object.keys(n).reduce(function(o, r) {
|
|
4787
4761
|
var i = n[r];
|
|
4788
|
-
return
|
|
4762
|
+
return Ft.call(o, r) ? o[r] = e(o[r], i, a) : o[r] = i, o;
|
|
4789
4763
|
}, s);
|
|
4790
|
-
},
|
|
4764
|
+
}, xc = function(t, n) {
|
|
4791
4765
|
return Object.keys(n).reduce(function(a, s) {
|
|
4792
4766
|
return a[s] = n[s], a;
|
|
4793
4767
|
}, t);
|
|
4794
|
-
},
|
|
4768
|
+
}, kc = function(e, t, n) {
|
|
4795
4769
|
var a = e.replace(/\+/g, " ");
|
|
4796
4770
|
if (n === "iso-8859-1")
|
|
4797
4771
|
return a.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -4800,7 +4774,7 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4800
4774
|
} catch {
|
|
4801
4775
|
return a;
|
|
4802
4776
|
}
|
|
4803
|
-
},
|
|
4777
|
+
}, qt = 1024, $c = function(t, n, a, s, o) {
|
|
4804
4778
|
if (t.length === 0)
|
|
4805
4779
|
return t;
|
|
4806
4780
|
var r = t;
|
|
@@ -4808,10 +4782,10 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4808
4782
|
return escape(r).replace(/%u[0-9a-f]{4}/gi, function(m) {
|
|
4809
4783
|
return "%26%23" + parseInt(m.slice(2), 16) + "%3B";
|
|
4810
4784
|
});
|
|
4811
|
-
for (var i = "", l = 0; l < r.length; l +=
|
|
4812
|
-
for (var c = r.length >=
|
|
4785
|
+
for (var i = "", l = 0; l < r.length; l += qt) {
|
|
4786
|
+
for (var c = r.length >= qt ? r.slice(l, l + qt) : r, u = [], p = 0; p < c.length; ++p) {
|
|
4813
4787
|
var d = c.charCodeAt(p);
|
|
4814
|
-
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o ===
|
|
4788
|
+
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o === gc.RFC1738 && (d === 40 || d === 41)) {
|
|
4815
4789
|
u[u.length] = c.charAt(p);
|
|
4816
4790
|
continue;
|
|
4817
4791
|
}
|
|
@@ -4832,38 +4806,38 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4832
4806
|
i += u.join("");
|
|
4833
4807
|
}
|
|
4834
4808
|
return i;
|
|
4835
|
-
},
|
|
4809
|
+
}, Sc = function(t) {
|
|
4836
4810
|
for (var n = [{ obj: { o: t }, prop: "o" }], a = [], s = 0; s < n.length; ++s)
|
|
4837
4811
|
for (var o = n[s], r = o.obj[o.prop], i = Object.keys(r), l = 0; l < i.length; ++l) {
|
|
4838
4812
|
var c = i[l], u = r[c];
|
|
4839
4813
|
typeof u == "object" && u !== null && a.indexOf(u) === -1 && (n.push({ obj: r, prop: c }), a.push(u));
|
|
4840
4814
|
}
|
|
4841
|
-
return
|
|
4842
|
-
},
|
|
4815
|
+
return vc(n), t;
|
|
4816
|
+
}, wc = function(t) {
|
|
4843
4817
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
4844
|
-
},
|
|
4818
|
+
}, jc = function(t) {
|
|
4845
4819
|
return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
|
|
4846
|
-
},
|
|
4820
|
+
}, Nc = function(t, n) {
|
|
4847
4821
|
return [].concat(t, n);
|
|
4848
|
-
},
|
|
4849
|
-
if (
|
|
4822
|
+
}, Tc = function(t, n) {
|
|
4823
|
+
if ($e(t)) {
|
|
4850
4824
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
4851
4825
|
a.push(n(t[s]));
|
|
4852
4826
|
return a;
|
|
4853
4827
|
}
|
|
4854
4828
|
return n(t);
|
|
4855
|
-
},
|
|
4856
|
-
arrayToObject:
|
|
4857
|
-
assign:
|
|
4858
|
-
combine:
|
|
4859
|
-
compact:
|
|
4860
|
-
decode:
|
|
4861
|
-
encode:
|
|
4862
|
-
isBuffer:
|
|
4863
|
-
isRegExp:
|
|
4864
|
-
maybeMap:
|
|
4865
|
-
merge:
|
|
4866
|
-
},
|
|
4829
|
+
}, $a = {
|
|
4830
|
+
arrayToObject: ka,
|
|
4831
|
+
assign: xc,
|
|
4832
|
+
combine: Nc,
|
|
4833
|
+
compact: Sc,
|
|
4834
|
+
decode: kc,
|
|
4835
|
+
encode: $c,
|
|
4836
|
+
isBuffer: jc,
|
|
4837
|
+
isRegExp: wc,
|
|
4838
|
+
maybeMap: Tc,
|
|
4839
|
+
merge: bc
|
|
4840
|
+
}, Sa = mc, lt = $a, ze = yn, Oc = Object.prototype.hasOwnProperty, wa = {
|
|
4867
4841
|
brackets: function(t) {
|
|
4868
4842
|
return t + "[]";
|
|
4869
4843
|
},
|
|
@@ -4874,9 +4848,9 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4874
4848
|
repeat: function(t) {
|
|
4875
4849
|
return t;
|
|
4876
4850
|
}
|
|
4877
|
-
}, ce = Array.isArray,
|
|
4878
|
-
|
|
4879
|
-
},
|
|
4851
|
+
}, ce = Array.isArray, Cc = Array.prototype.push, ja = function(e, t) {
|
|
4852
|
+
Cc.apply(e, ce(t) ? t : [t]);
|
|
4853
|
+
}, Pc = Date.prototype.toISOString, ar = ze.default, D = {
|
|
4880
4854
|
addQueryPrefix: !1,
|
|
4881
4855
|
allowDots: !1,
|
|
4882
4856
|
allowEmptyArrays: !1,
|
|
@@ -4886,37 +4860,37 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4886
4860
|
delimiter: "&",
|
|
4887
4861
|
encode: !0,
|
|
4888
4862
|
encodeDotInKeys: !1,
|
|
4889
|
-
encoder:
|
|
4863
|
+
encoder: lt.encode,
|
|
4890
4864
|
encodeValuesOnly: !1,
|
|
4891
|
-
format:
|
|
4892
|
-
formatter: ze.formatters[
|
|
4865
|
+
format: ar,
|
|
4866
|
+
formatter: ze.formatters[ar],
|
|
4893
4867
|
// deprecated
|
|
4894
4868
|
indices: !1,
|
|
4895
4869
|
serializeDate: function(t) {
|
|
4896
|
-
return
|
|
4870
|
+
return Pc.call(t);
|
|
4897
4871
|
},
|
|
4898
4872
|
skipNulls: !1,
|
|
4899
4873
|
strictNullHandling: !1
|
|
4900
|
-
},
|
|
4874
|
+
}, Ec = function(t) {
|
|
4901
4875
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
|
|
4902
|
-
},
|
|
4903
|
-
for (var b = t, w = g, S = 0, j = !1; (w = w.get(
|
|
4876
|
+
}, It = {}, Rc = function e(t, n, a, s, o, r, i, l, c, u, p, d, m, h, y, v, x, g) {
|
|
4877
|
+
for (var b = t, w = g, S = 0, j = !1; (w = w.get(It)) !== void 0 && !j; ) {
|
|
4904
4878
|
var k = w.get(t);
|
|
4905
4879
|
if (S += 1, typeof k < "u") {
|
|
4906
4880
|
if (k === S)
|
|
4907
4881
|
throw new RangeError("Cyclic object value");
|
|
4908
4882
|
j = !0;
|
|
4909
4883
|
}
|
|
4910
|
-
typeof w.get(
|
|
4884
|
+
typeof w.get(It) > "u" && (S = 0);
|
|
4911
4885
|
}
|
|
4912
|
-
if (typeof u == "function" ? b = u(n, b) : b instanceof Date ? b = m(b) : a === "comma" && ce(b) && (b =
|
|
4886
|
+
if (typeof u == "function" ? b = u(n, b) : b instanceof Date ? b = m(b) : a === "comma" && ce(b) && (b = lt.maybeMap(b, function($) {
|
|
4913
4887
|
return $ instanceof Date ? m($) : $;
|
|
4914
4888
|
})), b === null) {
|
|
4915
4889
|
if (r)
|
|
4916
4890
|
return c && !v ? c(n, D.encoder, x, "key", h) : n;
|
|
4917
4891
|
b = "";
|
|
4918
4892
|
}
|
|
4919
|
-
if (
|
|
4893
|
+
if (Ec(b) || lt.isBuffer(b)) {
|
|
4920
4894
|
if (c) {
|
|
4921
4895
|
var O = v ? n : c(n, D.encoder, x, "key", h);
|
|
4922
4896
|
return [y(O) + "=" + y(c(b, D.encoder, x, "value", h))];
|
|
@@ -4928,12 +4902,12 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4928
4902
|
return R;
|
|
4929
4903
|
var I;
|
|
4930
4904
|
if (a === "comma" && ce(b))
|
|
4931
|
-
v && c && (b =
|
|
4905
|
+
v && c && (b = lt.maybeMap(b, c)), I = [{ value: b.length > 0 ? b.join(",") || null : void 0 }];
|
|
4932
4906
|
else if (ce(u))
|
|
4933
4907
|
I = u;
|
|
4934
4908
|
else {
|
|
4935
|
-
var
|
|
4936
|
-
I = p ?
|
|
4909
|
+
var V = Object.keys(b);
|
|
4910
|
+
I = p ? V.sort(p) : V;
|
|
4937
4911
|
}
|
|
4938
4912
|
var Q = l ? n.replace(/\./g, "%2E") : n, q = s && ce(b) && b.length === 1 ? Q + "[]" : Q;
|
|
4939
4913
|
if (o && ce(b) && b.length === 0)
|
|
@@ -4941,12 +4915,12 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4941
4915
|
for (var L = 0; L < I.length; ++L) {
|
|
4942
4916
|
var H = I[L], B = typeof H == "object" && typeof H.value < "u" ? H.value : b[H];
|
|
4943
4917
|
if (!(i && B === null)) {
|
|
4944
|
-
var
|
|
4918
|
+
var he = d && l ? H.replace(/\./g, "%2E") : H, bt = ce(b) ? typeof a == "function" ? a(q, he) : q : q + (d ? "." + he : "[" + he + "]");
|
|
4945
4919
|
g.set(t, S);
|
|
4946
|
-
var
|
|
4947
|
-
|
|
4920
|
+
var Ze = Sa();
|
|
4921
|
+
Ze.set(It, g), ja(R, e(
|
|
4948
4922
|
B,
|
|
4949
|
-
|
|
4923
|
+
bt,
|
|
4950
4924
|
a,
|
|
4951
4925
|
s,
|
|
4952
4926
|
o,
|
|
@@ -4962,12 +4936,12 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4962
4936
|
y,
|
|
4963
4937
|
v,
|
|
4964
4938
|
x,
|
|
4965
|
-
|
|
4939
|
+
Ze
|
|
4966
4940
|
));
|
|
4967
4941
|
}
|
|
4968
4942
|
}
|
|
4969
4943
|
return R;
|
|
4970
|
-
},
|
|
4944
|
+
}, Ac = function(t) {
|
|
4971
4945
|
if (!t)
|
|
4972
4946
|
return D;
|
|
4973
4947
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
@@ -4981,14 +4955,14 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
4981
4955
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4982
4956
|
var a = ze.default;
|
|
4983
4957
|
if (typeof t.format < "u") {
|
|
4984
|
-
if (!
|
|
4958
|
+
if (!Oc.call(ze.formatters, t.format))
|
|
4985
4959
|
throw new TypeError("Unknown format option provided.");
|
|
4986
4960
|
a = t.format;
|
|
4987
4961
|
}
|
|
4988
4962
|
var s = ze.formatters[a], o = D.filter;
|
|
4989
4963
|
(typeof t.filter == "function" || ce(t.filter)) && (o = t.filter);
|
|
4990
4964
|
var r;
|
|
4991
|
-
if (t.arrayFormat in
|
|
4965
|
+
if (t.arrayFormat in wa ? r = t.arrayFormat : "indices" in t ? r = t.indices ? "indices" : "repeat" : r = D.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
|
|
4992
4966
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4993
4967
|
var i = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 : D.allowDots : !!t.allowDots;
|
|
4994
4968
|
return {
|
|
@@ -5012,17 +4986,17 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5012
4986
|
sort: typeof t.sort == "function" ? t.sort : null,
|
|
5013
4987
|
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : D.strictNullHandling
|
|
5014
4988
|
};
|
|
5015
|
-
},
|
|
5016
|
-
var n = e, a =
|
|
4989
|
+
}, Fc = function(e, t) {
|
|
4990
|
+
var n = e, a = Ac(t), s, o;
|
|
5017
4991
|
typeof a.filter == "function" ? (o = a.filter, n = o("", n)) : ce(a.filter) && (o = a.filter, s = o);
|
|
5018
4992
|
var r = [];
|
|
5019
4993
|
if (typeof n != "object" || n === null)
|
|
5020
4994
|
return "";
|
|
5021
|
-
var i =
|
|
4995
|
+
var i = wa[a.arrayFormat], l = i === "comma" && a.commaRoundTrip;
|
|
5022
4996
|
s || (s = Object.keys(n)), a.sort && s.sort(a.sort);
|
|
5023
|
-
for (var c =
|
|
4997
|
+
for (var c = Sa(), u = 0; u < s.length; ++u) {
|
|
5024
4998
|
var p = s[u];
|
|
5025
|
-
a.skipNulls && n[p] === null ||
|
|
4999
|
+
a.skipNulls && n[p] === null || ja(r, Rc(
|
|
5026
5000
|
n[p],
|
|
5027
5001
|
p,
|
|
5028
5002
|
i,
|
|
@@ -5045,7 +5019,7 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5045
5019
|
}
|
|
5046
5020
|
var d = r.join(a.delimiter), m = a.addQueryPrefix === !0 ? "?" : "";
|
|
5047
5021
|
return a.charsetSentinel && (a.charset === "iso-8859-1" ? m += "utf8=%26%2310003%3B&" : m += "utf8=%E2%9C%93&"), d.length > 0 ? m + d : "";
|
|
5048
|
-
},
|
|
5022
|
+
}, Le = $a, Jt = Object.prototype.hasOwnProperty, qc = Array.isArray, M = {
|
|
5049
5023
|
allowDots: !1,
|
|
5050
5024
|
allowEmptyArrays: !1,
|
|
5051
5025
|
allowPrototypes: !1,
|
|
@@ -5055,7 +5029,7 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5055
5029
|
charsetSentinel: !1,
|
|
5056
5030
|
comma: !1,
|
|
5057
5031
|
decodeDotInKeys: !1,
|
|
5058
|
-
decoder:
|
|
5032
|
+
decoder: Le.decode,
|
|
5059
5033
|
delimiter: "&",
|
|
5060
5034
|
depth: 5,
|
|
5061
5035
|
duplicates: "combine",
|
|
@@ -5065,32 +5039,32 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5065
5039
|
parseArrays: !0,
|
|
5066
5040
|
plainObjects: !1,
|
|
5067
5041
|
strictNullHandling: !1
|
|
5068
|
-
},
|
|
5042
|
+
}, Ic = function(e) {
|
|
5069
5043
|
return e.replace(/&#(\d+);/g, function(t, n) {
|
|
5070
5044
|
return String.fromCharCode(parseInt(n, 10));
|
|
5071
5045
|
});
|
|
5072
|
-
},
|
|
5046
|
+
}, Na = function(e, t) {
|
|
5073
5047
|
return e && typeof e == "string" && t.comma && e.indexOf(",") > -1 ? e.split(",") : e;
|
|
5074
|
-
},
|
|
5048
|
+
}, _c = "utf8=%26%2310003%3B", Lc = "utf8=%E2%9C%93", Uc = function(t, n) {
|
|
5075
5049
|
var a = { __proto__: null }, s = n.ignoreQueryPrefix ? t.replace(/^\?/, "") : t, o = n.parameterLimit === 1 / 0 ? void 0 : n.parameterLimit, r = s.split(n.delimiter, o), i = -1, l, c = n.charset;
|
|
5076
5050
|
if (n.charsetSentinel)
|
|
5077
5051
|
for (l = 0; l < r.length; ++l)
|
|
5078
|
-
r[l].indexOf("utf8=") === 0 && (r[l] ===
|
|
5052
|
+
r[l].indexOf("utf8=") === 0 && (r[l] === Lc ? c = "utf-8" : r[l] === _c && (c = "iso-8859-1"), i = l, l = r.length);
|
|
5079
5053
|
for (l = 0; l < r.length; ++l)
|
|
5080
5054
|
if (l !== i) {
|
|
5081
5055
|
var u = r[l], p = u.indexOf("]="), d = p === -1 ? u.indexOf("=") : p + 1, m, h;
|
|
5082
|
-
d === -1 ? (m = n.decoder(u, M.decoder, c, "key"), h = n.strictNullHandling ? null : "") : (m = n.decoder(u.slice(0, d), M.decoder, c, "key"), h =
|
|
5083
|
-
|
|
5056
|
+
d === -1 ? (m = n.decoder(u, M.decoder, c, "key"), h = n.strictNullHandling ? null : "") : (m = n.decoder(u.slice(0, d), M.decoder, c, "key"), h = Le.maybeMap(
|
|
5057
|
+
Na(u.slice(d + 1), n),
|
|
5084
5058
|
function(v) {
|
|
5085
5059
|
return n.decoder(v, M.decoder, c, "value");
|
|
5086
5060
|
}
|
|
5087
|
-
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h =
|
|
5088
|
-
var y =
|
|
5089
|
-
y && n.duplicates === "combine" ? a[m] =
|
|
5061
|
+
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h = Ic(h)), u.indexOf("[]=") > -1 && (h = qc(h) ? [h] : h);
|
|
5062
|
+
var y = Jt.call(a, m);
|
|
5063
|
+
y && n.duplicates === "combine" ? a[m] = Le.combine(a[m], h) : (!y || n.duplicates === "last") && (a[m] = h);
|
|
5090
5064
|
}
|
|
5091
5065
|
return a;
|
|
5092
|
-
},
|
|
5093
|
-
for (var s = a ? t :
|
|
5066
|
+
}, Mc = function(e, t, n, a) {
|
|
5067
|
+
for (var s = a ? t : Na(t, n), o = e.length - 1; o >= 0; --o) {
|
|
5094
5068
|
var r, i = e[o];
|
|
5095
5069
|
if (i === "[]" && n.parseArrays)
|
|
5096
5070
|
r = n.allowEmptyArrays && s === "" ? [] : [].concat(s);
|
|
@@ -5102,22 +5076,22 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5102
5076
|
s = r;
|
|
5103
5077
|
}
|
|
5104
5078
|
return s;
|
|
5105
|
-
},
|
|
5079
|
+
}, Hc = function(t, n, a, s) {
|
|
5106
5080
|
if (t) {
|
|
5107
5081
|
var o = a.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, r = /(\[[^[\]]*])/, i = /(\[[^[\]]*])/g, l = a.depth > 0 && r.exec(o), c = l ? o.slice(0, l.index) : o, u = [];
|
|
5108
5082
|
if (c) {
|
|
5109
|
-
if (!a.plainObjects &&
|
|
5083
|
+
if (!a.plainObjects && Jt.call(Object.prototype, c) && !a.allowPrototypes)
|
|
5110
5084
|
return;
|
|
5111
5085
|
u.push(c);
|
|
5112
5086
|
}
|
|
5113
5087
|
for (var p = 0; a.depth > 0 && (l = i.exec(o)) !== null && p < a.depth; ) {
|
|
5114
|
-
if (p += 1, !a.plainObjects &&
|
|
5088
|
+
if (p += 1, !a.plainObjects && Jt.call(Object.prototype, l[1].slice(1, -1)) && !a.allowPrototypes)
|
|
5115
5089
|
return;
|
|
5116
5090
|
u.push(l[1]);
|
|
5117
5091
|
}
|
|
5118
|
-
return l && u.push("[" + o.slice(l.index) + "]"),
|
|
5092
|
+
return l && u.push("[" + o.slice(l.index) + "]"), Mc(u, n, a, s);
|
|
5119
5093
|
}
|
|
5120
|
-
},
|
|
5094
|
+
}, Bc = function(t) {
|
|
5121
5095
|
if (!t)
|
|
5122
5096
|
return M;
|
|
5123
5097
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
@@ -5143,7 +5117,7 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5143
5117
|
comma: typeof t.comma == "boolean" ? t.comma : M.comma,
|
|
5144
5118
|
decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys : M.decodeDotInKeys,
|
|
5145
5119
|
decoder: typeof t.decoder == "function" ? t.decoder : M.decoder,
|
|
5146
|
-
delimiter: typeof t.delimiter == "string" ||
|
|
5120
|
+
delimiter: typeof t.delimiter == "string" || Le.isRegExp(t.delimiter) ? t.delimiter : M.delimiter,
|
|
5147
5121
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
5148
5122
|
depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth : M.depth,
|
|
5149
5123
|
duplicates: a,
|
|
@@ -5154,24 +5128,24 @@ var ba = Le, Ue = Nl, ac = Ul, oc = Qe, et = ba("%WeakMap%", !0), tt = ba("%Map%
|
|
|
5154
5128
|
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : M.plainObjects,
|
|
5155
5129
|
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : M.strictNullHandling
|
|
5156
5130
|
};
|
|
5157
|
-
},
|
|
5158
|
-
var n =
|
|
5131
|
+
}, Dc = function(e, t) {
|
|
5132
|
+
var n = Bc(t);
|
|
5159
5133
|
if (e === "" || e === null || typeof e > "u")
|
|
5160
5134
|
return n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
5161
|
-
for (var a = typeof e == "string" ?
|
|
5162
|
-
var i = o[r], l =
|
|
5163
|
-
s =
|
|
5164
|
-
}
|
|
5165
|
-
return n.allowSparse === !0 ? s :
|
|
5166
|
-
}, Vc =
|
|
5167
|
-
formats:
|
|
5168
|
-
parse:
|
|
5135
|
+
for (var a = typeof e == "string" ? Uc(e, n) : e, s = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = Object.keys(a), r = 0; r < o.length; ++r) {
|
|
5136
|
+
var i = o[r], l = Hc(i, a[i], n, typeof e == "string");
|
|
5137
|
+
s = Le.merge(s, l, n);
|
|
5138
|
+
}
|
|
5139
|
+
return n.allowSparse === !0 ? s : Le.compact(s);
|
|
5140
|
+
}, Vc = Fc, zc = Dc, Wc = yn, ct = {
|
|
5141
|
+
formats: Wc,
|
|
5142
|
+
parse: zc,
|
|
5169
5143
|
stringify: Vc
|
|
5170
|
-
},
|
|
5144
|
+
}, Jc = Cs;
|
|
5171
5145
|
function oe() {
|
|
5172
5146
|
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;
|
|
5173
5147
|
}
|
|
5174
|
-
var
|
|
5148
|
+
var Gc = /^([a-z0-9.+-]+:)/i, Kc = /:[0-9]*$/, Qc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, Yc = [
|
|
5175
5149
|
"<",
|
|
5176
5150
|
">",
|
|
5177
5151
|
'"',
|
|
@@ -5181,30 +5155,30 @@ var Kc = /^([a-z0-9.+-]+:)/i, Qc = /:[0-9]*$/, Yc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5181
5155
|
`
|
|
5182
5156
|
`,
|
|
5183
5157
|
" "
|
|
5184
|
-
],
|
|
5158
|
+
], Xc = [
|
|
5185
5159
|
"{",
|
|
5186
5160
|
"}",
|
|
5187
5161
|
"|",
|
|
5188
5162
|
"\\",
|
|
5189
5163
|
"^",
|
|
5190
5164
|
"`"
|
|
5191
|
-
].concat(
|
|
5165
|
+
].concat(Yc), Gt = ["'"].concat(Xc), or = [
|
|
5192
5166
|
"%",
|
|
5193
5167
|
"/",
|
|
5194
5168
|
"?",
|
|
5195
5169
|
";",
|
|
5196
5170
|
"#"
|
|
5197
|
-
].concat(
|
|
5171
|
+
].concat(Gt), ir = [
|
|
5198
5172
|
"/",
|
|
5199
5173
|
"?",
|
|
5200
5174
|
"#"
|
|
5201
|
-
],
|
|
5175
|
+
], Zc = 255, sr = /^[+a-z0-9A-Z_-]{0,63}$/, eu = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, tu = {
|
|
5202
5176
|
javascript: !0,
|
|
5203
5177
|
"javascript:": !0
|
|
5204
|
-
},
|
|
5178
|
+
}, Kt = {
|
|
5205
5179
|
javascript: !0,
|
|
5206
5180
|
"javascript:": !0
|
|
5207
|
-
},
|
|
5181
|
+
}, Fe = {
|
|
5208
5182
|
http: !0,
|
|
5209
5183
|
https: !0,
|
|
5210
5184
|
ftp: !0,
|
|
@@ -5215,8 +5189,8 @@ var Kc = /^([a-z0-9.+-]+:)/i, Qc = /:[0-9]*$/, Yc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5215
5189
|
"ftp:": !0,
|
|
5216
5190
|
"gopher:": !0,
|
|
5217
5191
|
"file:": !0
|
|
5218
|
-
},
|
|
5219
|
-
function
|
|
5192
|
+
}, Qt = ct;
|
|
5193
|
+
function gn(e, t, n) {
|
|
5220
5194
|
if (e && typeof e == "object" && e instanceof oe)
|
|
5221
5195
|
return e;
|
|
5222
5196
|
var a = new oe();
|
|
@@ -5229,11 +5203,11 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5229
5203
|
o[0] = o[0].replace(r, "/"), e = o.join(s);
|
|
5230
5204
|
var i = e;
|
|
5231
5205
|
if (i = i.trim(), !n && e.split("#").length === 1) {
|
|
5232
|
-
var l =
|
|
5206
|
+
var l = Qc.exec(i);
|
|
5233
5207
|
if (l)
|
|
5234
|
-
return this.path = i, this.href = i, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query =
|
|
5208
|
+
return this.path = i, this.href = i, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query = Qt.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : t && (this.search = "", this.query = {}), this;
|
|
5235
5209
|
}
|
|
5236
|
-
var c =
|
|
5210
|
+
var c = Gc.exec(i);
|
|
5237
5211
|
if (c) {
|
|
5238
5212
|
c = c[0];
|
|
5239
5213
|
var u = c.toLowerCase();
|
|
@@ -5241,17 +5215,17 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5241
5215
|
}
|
|
5242
5216
|
if (n || c || i.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
5243
5217
|
var p = i.substr(0, 2) === "//";
|
|
5244
|
-
p && !(c &&
|
|
5218
|
+
p && !(c && Kt[c]) && (i = i.substr(2), this.slashes = !0);
|
|
5245
5219
|
}
|
|
5246
|
-
if (!
|
|
5247
|
-
for (var d = -1, m = 0; m <
|
|
5248
|
-
var h = i.indexOf(
|
|
5220
|
+
if (!Kt[c] && (p || c && !Fe[c])) {
|
|
5221
|
+
for (var d = -1, m = 0; m < ir.length; m++) {
|
|
5222
|
+
var h = i.indexOf(ir[m]);
|
|
5249
5223
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5250
5224
|
}
|
|
5251
5225
|
var y, v;
|
|
5252
5226
|
d === -1 ? v = i.lastIndexOf("@") : v = i.lastIndexOf("@", d), v !== -1 && (y = i.slice(0, v), i = i.slice(v + 1), this.auth = decodeURIComponent(y)), d = -1;
|
|
5253
|
-
for (var m = 0; m <
|
|
5254
|
-
var h = i.indexOf(
|
|
5227
|
+
for (var m = 0; m < or.length; m++) {
|
|
5228
|
+
var h = i.indexOf(or[m]);
|
|
5255
5229
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5256
5230
|
}
|
|
5257
5231
|
d === -1 && (d = i.length), this.host = i.slice(0, d), i = i.slice(d), this.parseHost(), this.hostname = this.hostname || "";
|
|
@@ -5259,23 +5233,23 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5259
5233
|
if (!x)
|
|
5260
5234
|
for (var g = this.hostname.split(/\./), m = 0, b = g.length; m < b; m++) {
|
|
5261
5235
|
var w = g[m];
|
|
5262
|
-
if (w && !w.match(
|
|
5236
|
+
if (w && !w.match(sr)) {
|
|
5263
5237
|
for (var S = "", j = 0, k = w.length; j < k; j++)
|
|
5264
5238
|
w.charCodeAt(j) > 127 ? S += "x" : S += w[j];
|
|
5265
|
-
if (!S.match(
|
|
5266
|
-
var O = g.slice(0, m), R = g.slice(m + 1), I = w.match(
|
|
5239
|
+
if (!S.match(sr)) {
|
|
5240
|
+
var O = g.slice(0, m), R = g.slice(m + 1), I = w.match(eu);
|
|
5267
5241
|
I && (O.push(I[1]), R.unshift(I[2])), R.length && (i = "/" + R.join(".") + i), this.hostname = O.join(".");
|
|
5268
5242
|
break;
|
|
5269
5243
|
}
|
|
5270
5244
|
}
|
|
5271
5245
|
}
|
|
5272
|
-
this.hostname.length >
|
|
5273
|
-
var
|
|
5274
|
-
this.host = Q +
|
|
5246
|
+
this.hostname.length > Zc ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), x || (this.hostname = Jc.toASCII(this.hostname));
|
|
5247
|
+
var V = this.port ? ":" + this.port : "", Q = this.hostname || "";
|
|
5248
|
+
this.host = Q + V, this.href += this.host, x && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), i[0] !== "/" && (i = "/" + i));
|
|
5275
5249
|
}
|
|
5276
|
-
if (!
|
|
5277
|
-
for (var m = 0, b =
|
|
5278
|
-
var q =
|
|
5250
|
+
if (!tu[u])
|
|
5251
|
+
for (var m = 0, b = Gt.length; m < b; m++) {
|
|
5252
|
+
var q = Gt[m];
|
|
5279
5253
|
if (i.indexOf(q) !== -1) {
|
|
5280
5254
|
var L = encodeURIComponent(q);
|
|
5281
5255
|
L === q && (L = escape(q)), i = i.split(q).join(L);
|
|
@@ -5284,30 +5258,30 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5284
5258
|
var H = i.indexOf("#");
|
|
5285
5259
|
H !== -1 && (this.hash = i.substr(H), i = i.slice(0, H));
|
|
5286
5260
|
var B = i.indexOf("?");
|
|
5287
|
-
if (B !== -1 ? (this.search = i.substr(B), this.query = i.substr(B + 1), t && (this.query =
|
|
5288
|
-
var
|
|
5289
|
-
this.path =
|
|
5261
|
+
if (B !== -1 ? (this.search = i.substr(B), this.query = i.substr(B + 1), t && (this.query = Qt.parse(this.query)), i = i.slice(0, B)) : t && (this.search = "", this.query = {}), i && (this.pathname = i), Fe[u] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
5262
|
+
var V = this.pathname || "", he = this.search || "";
|
|
5263
|
+
this.path = V + he;
|
|
5290
5264
|
}
|
|
5291
5265
|
return this.href = this.format(), this;
|
|
5292
5266
|
};
|
|
5293
|
-
function
|
|
5294
|
-
return typeof e == "string" && (e =
|
|
5267
|
+
function nu(e) {
|
|
5268
|
+
return typeof e == "string" && (e = gn(e)), e instanceof oe ? e.format() : oe.prototype.format.call(e);
|
|
5295
5269
|
}
|
|
5296
5270
|
oe.prototype.format = function() {
|
|
5297
5271
|
var e = this.auth || "";
|
|
5298
5272
|
e && (e = encodeURIComponent(e), e = e.replace(/%3A/i, ":"), e += "@");
|
|
5299
5273
|
var t = this.protocol || "", n = this.pathname || "", a = this.hash || "", s = !1, o = "";
|
|
5300
|
-
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 && (o =
|
|
5274
|
+
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 && (o = Qt.stringify(this.query, {
|
|
5301
5275
|
arrayFormat: "repeat",
|
|
5302
5276
|
addQueryPrefix: !1
|
|
5303
5277
|
}));
|
|
5304
5278
|
var r = this.search || o && "?" + o || "";
|
|
5305
|
-
return t && t.substr(-1) !== ":" && (t += ":"), this.slashes || (!t ||
|
|
5279
|
+
return t && t.substr(-1) !== ":" && (t += ":"), this.slashes || (!t || Fe[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(i) {
|
|
5306
5280
|
return encodeURIComponent(i);
|
|
5307
5281
|
}), r = r.replace("#", "%23"), t + s + n + r + a;
|
|
5308
5282
|
};
|
|
5309
5283
|
oe.prototype.resolve = function(e) {
|
|
5310
|
-
return this.resolveObject(
|
|
5284
|
+
return this.resolveObject(gn(e, !1, !0)).format();
|
|
5311
5285
|
};
|
|
5312
5286
|
oe.prototype.resolveObject = function(e) {
|
|
5313
5287
|
if (typeof e == "string") {
|
|
@@ -5325,17 +5299,17 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5325
5299
|
var l = r[i];
|
|
5326
5300
|
l !== "protocol" && (n[l] = e[l]);
|
|
5327
5301
|
}
|
|
5328
|
-
return
|
|
5302
|
+
return Fe[n.protocol] && n.hostname && !n.pathname && (n.pathname = "/", n.path = n.pathname), n.href = n.format(), n;
|
|
5329
5303
|
}
|
|
5330
5304
|
if (e.protocol && e.protocol !== n.protocol) {
|
|
5331
|
-
if (!
|
|
5305
|
+
if (!Fe[e.protocol]) {
|
|
5332
5306
|
for (var c = Object.keys(e), u = 0; u < c.length; u++) {
|
|
5333
5307
|
var p = c[u];
|
|
5334
5308
|
n[p] = e[p];
|
|
5335
5309
|
}
|
|
5336
5310
|
return n.href = n.format(), n;
|
|
5337
5311
|
}
|
|
5338
|
-
if (n.protocol = e.protocol, !e.host && !
|
|
5312
|
+
if (n.protocol = e.protocol, !e.host && !Kt[e.protocol]) {
|
|
5339
5313
|
for (var b = (e.pathname || "").split("/"); b.length && !(e.host = b.shift()); )
|
|
5340
5314
|
;
|
|
5341
5315
|
e.host || (e.host = ""), e.hostname || (e.hostname = ""), b[0] !== "" && b.unshift(""), b.length < 2 && b.unshift(""), n.pathname = b.join("/");
|
|
@@ -5347,7 +5321,7 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5347
5321
|
}
|
|
5348
5322
|
return n.slashes = n.slashes || e.slashes, n.href = n.format(), n;
|
|
5349
5323
|
}
|
|
5350
|
-
var h = n.pathname && n.pathname.charAt(0) === "/", y = e.host || e.pathname && e.pathname.charAt(0) === "/", v = y || h || n.host && e.pathname, x = v, g = n.pathname && n.pathname.split("/") || [], b = e.pathname && e.pathname.split("/") || [], w = n.protocol && !
|
|
5324
|
+
var h = n.pathname && n.pathname.charAt(0) === "/", y = e.host || e.pathname && e.pathname.charAt(0) === "/", v = y || h || n.host && e.pathname, x = v, g = n.pathname && n.pathname.split("/") || [], b = e.pathname && e.pathname.split("/") || [], w = n.protocol && !Fe[n.protocol];
|
|
5351
5325
|
if (w && (n.hostname = "", n.port = null, n.host && (g[0] === "" ? g[0] = n.host : g.unshift(n.host)), n.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && (b[0] === "" ? b[0] = e.host : b.unshift(e.host)), e.host = null), v = v && (b[0] === "" || g[0] === "")), y)
|
|
5352
5326
|
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, g = b;
|
|
5353
5327
|
else if (b.length)
|
|
@@ -5377,15 +5351,15 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5377
5351
|
return v = v || n.host && g.length, v && !I && g.unshift(""), g.length > 0 ? n.pathname = g.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;
|
|
5378
5352
|
};
|
|
5379
5353
|
oe.prototype.parseHost = function() {
|
|
5380
|
-
var e = this.host, t =
|
|
5354
|
+
var e = this.host, t = Kc.exec(e);
|
|
5381
5355
|
t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
|
|
5382
5356
|
};
|
|
5383
|
-
var
|
|
5357
|
+
var ru = gn, lr = nu, au = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), ou = class {
|
|
5384
5358
|
constructor(e, t = {}) {
|
|
5385
5359
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
5386
5360
|
harIsAlreadyEncoded: !1,
|
|
5387
5361
|
...t
|
|
5388
|
-
}, this.requests = [],
|
|
5362
|
+
}, this.requests = [], au(e) ? this.entries = e.log.entries : this.entries = [
|
|
5389
5363
|
{
|
|
5390
5364
|
request: e
|
|
5391
5365
|
}
|
|
@@ -5420,7 +5394,7 @@ var au = yn, sr = ru, ou = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5420
5394
|
cookiesObj: {},
|
|
5421
5395
|
allHeaders: {}
|
|
5422
5396
|
};
|
|
5423
|
-
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(
|
|
5397
|
+
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(jn, {})), n.headers && n.headers.length) {
|
|
5424
5398
|
const m = /^HTTP\/2/;
|
|
5425
5399
|
n.headersObj = n.headers.reduce((h, { name: y, value: v }) => {
|
|
5426
5400
|
const x = m.exec(n.httpVersion) ? y.toLocaleLowerCase() : y;
|
|
@@ -5458,7 +5432,7 @@ var au = yn, sr = ru, ou = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5458
5432
|
}
|
|
5459
5433
|
break;
|
|
5460
5434
|
case "application/x-www-form-urlencoded":
|
|
5461
|
-
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(
|
|
5435
|
+
n.postData.params ? (n.postData.paramsObj = n.postData.params.reduce(jn, {}), n.postData.text = ct.stringify(n.postData.paramsObj)) : n.postData.text = "";
|
|
5462
5436
|
break;
|
|
5463
5437
|
case "text/json":
|
|
5464
5438
|
case "text/x-json":
|
|
@@ -5475,16 +5449,16 @@ var au = yn, sr = ru, ou = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5475
5449
|
const s = {
|
|
5476
5450
|
...n.allHeaders,
|
|
5477
5451
|
...n.headersObj
|
|
5478
|
-
}, o =
|
|
5452
|
+
}, o = ru(n.url, !0, !0);
|
|
5479
5453
|
n.queryObj = {
|
|
5480
5454
|
...n.queryObj,
|
|
5481
5455
|
...o.query
|
|
5482
5456
|
};
|
|
5483
5457
|
let r;
|
|
5484
|
-
t.harIsAlreadyEncoded ? r =
|
|
5458
|
+
t.harIsAlreadyEncoded ? r = ct.stringify(n.queryObj, {
|
|
5485
5459
|
encode: !1,
|
|
5486
5460
|
indices: !1
|
|
5487
|
-
}) : r =
|
|
5461
|
+
}) : r = ct.stringify(n.queryObj, {
|
|
5488
5462
|
indices: !1
|
|
5489
5463
|
});
|
|
5490
5464
|
const i = {
|
|
@@ -5492,11 +5466,11 @@ var au = yn, sr = ru, ou = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5492
5466
|
query: n.queryObj,
|
|
5493
5467
|
search: r,
|
|
5494
5468
|
path: r ? `${o.pathname}?${r}` : o.pathname
|
|
5495
|
-
}, l =
|
|
5469
|
+
}, l = lr({
|
|
5496
5470
|
...o,
|
|
5497
5471
|
query: null,
|
|
5498
5472
|
search: null
|
|
5499
|
-
}), c =
|
|
5473
|
+
}), c = lr({
|
|
5500
5474
|
...o,
|
|
5501
5475
|
...i
|
|
5502
5476
|
});
|
|
@@ -5510,21 +5484,21 @@ var au = yn, sr = ru, ou = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5510
5484
|
}
|
|
5511
5485
|
convert(e, t, n) {
|
|
5512
5486
|
this.initCalled || this.init(), !n && t && (n = t);
|
|
5513
|
-
const a =
|
|
5487
|
+
const a = Os[e];
|
|
5514
5488
|
if (!a)
|
|
5515
5489
|
return !1;
|
|
5516
5490
|
const { convert: s } = a.clientsById[t || a.info.default];
|
|
5517
5491
|
return this.requests.map((r) => s(r, n));
|
|
5518
5492
|
}
|
|
5519
5493
|
};
|
|
5520
|
-
const
|
|
5494
|
+
const Ta = uo(
|
|
5521
5495
|
void 0
|
|
5522
|
-
),
|
|
5523
|
-
const e =
|
|
5496
|
+
), Fu = Ta.Provider, iu = () => {
|
|
5497
|
+
const e = fo(Ta);
|
|
5524
5498
|
if (!e)
|
|
5525
5499
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
5526
5500
|
return e.config;
|
|
5527
|
-
},
|
|
5501
|
+
}, su = ({
|
|
5528
5502
|
server: e,
|
|
5529
5503
|
operation: t
|
|
5530
5504
|
}) => {
|
|
@@ -5541,7 +5515,7 @@ const Na = lo(
|
|
|
5541
5515
|
isRequired: l.required ?? !1
|
|
5542
5516
|
})), s = (i = t.parameters) == null ? void 0 : i.filter((l) => l.in === "path").map((l) => ({ name: l.name }));
|
|
5543
5517
|
return /* @__PURE__ */ f.jsx(
|
|
5544
|
-
|
|
5518
|
+
ra,
|
|
5545
5519
|
{
|
|
5546
5520
|
server: e,
|
|
5547
5521
|
method: t.method,
|
|
@@ -5551,7 +5525,7 @@ const Na = lo(
|
|
|
5551
5525
|
pathParams: s
|
|
5552
5526
|
}
|
|
5553
5527
|
);
|
|
5554
|
-
},
|
|
5528
|
+
}, vn = ({ children: e, className: t }) => /* @__PURE__ */ f.jsx(
|
|
5555
5529
|
"div",
|
|
5556
5530
|
{
|
|
5557
5531
|
className: A(
|
|
@@ -5560,7 +5534,7 @@ const Na = lo(
|
|
|
5560
5534
|
),
|
|
5561
5535
|
children: e
|
|
5562
5536
|
}
|
|
5563
|
-
),
|
|
5537
|
+
), bn = ({ children: e, className: t }) => /* @__PURE__ */ f.jsx(
|
|
5564
5538
|
"div",
|
|
5565
5539
|
{
|
|
5566
5540
|
className: A(
|
|
@@ -5569,13 +5543,13 @@ const Na = lo(
|
|
|
5569
5543
|
),
|
|
5570
5544
|
children: e
|
|
5571
5545
|
}
|
|
5572
|
-
),
|
|
5546
|
+
), xn = ({ children: e, className: t }) => /* @__PURE__ */ f.jsx(
|
|
5573
5547
|
"div",
|
|
5574
5548
|
{
|
|
5575
5549
|
className: A("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", t),
|
|
5576
5550
|
children: e
|
|
5577
5551
|
}
|
|
5578
|
-
),
|
|
5552
|
+
), Oa = ({ children: e, className: t }) => /* @__PURE__ */ f.jsx(
|
|
5579
5553
|
"div",
|
|
5580
5554
|
{
|
|
5581
5555
|
className: A(
|
|
@@ -5584,48 +5558,48 @@ const Na = lo(
|
|
|
5584
5558
|
),
|
|
5585
5559
|
children: e
|
|
5586
5560
|
}
|
|
5587
|
-
),
|
|
5588
|
-
function
|
|
5561
|
+
), lu = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ge = (e, t) => e.example !== void 0 ? e.example : e.default !== void 0 ? e.default : e.examples && lu(e.examples) ? Object.values(e.examples)[0] : cu(e);
|
|
5562
|
+
function cu(e, t) {
|
|
5589
5563
|
const n = Object.entries(e.properties ?? {}).concat(
|
|
5590
5564
|
Object.entries(e.additionalProperties ?? {})
|
|
5591
5565
|
);
|
|
5592
5566
|
if (e.type === "object" && n.length > 0) {
|
|
5593
5567
|
const a = {};
|
|
5594
5568
|
return n.forEach(([s, o]) => {
|
|
5595
|
-
const r =
|
|
5569
|
+
const r = Ge(o);
|
|
5596
5570
|
r !== void 0 && (a[s] = r);
|
|
5597
5571
|
}), a;
|
|
5598
5572
|
} else if (e.type === "array" && e.items) {
|
|
5599
|
-
const a =
|
|
5573
|
+
const a = Ge(e.items);
|
|
5600
5574
|
return a !== void 0 ? [a] : [];
|
|
5601
5575
|
}
|
|
5602
5576
|
}
|
|
5603
|
-
const
|
|
5577
|
+
const uu = ({ content: e }) => {
|
|
5604
5578
|
var t;
|
|
5605
|
-
return e.length ? /* @__PURE__ */ f.jsx(f.Fragment, { children: /* @__PURE__ */ f.jsxs(
|
|
5606
|
-
/* @__PURE__ */ f.jsx(
|
|
5607
|
-
/* @__PURE__ */ f.jsx(
|
|
5608
|
-
|
|
5579
|
+
return e.length ? /* @__PURE__ */ f.jsx(f.Fragment, { children: /* @__PURE__ */ f.jsxs(vn, { children: [
|
|
5580
|
+
/* @__PURE__ */ f.jsx(bn, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ f.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
5581
|
+
/* @__PURE__ */ f.jsx(xn, { children: /* @__PURE__ */ f.jsx(
|
|
5582
|
+
Qe,
|
|
5609
5583
|
{
|
|
5610
5584
|
language: "json",
|
|
5611
5585
|
noBackground: !0,
|
|
5612
5586
|
copyable: !0,
|
|
5613
5587
|
className: "text-xs",
|
|
5614
5588
|
code: JSON.stringify(
|
|
5615
|
-
(t = e.at(0)) != null && t.schema ?
|
|
5589
|
+
(t = e.at(0)) != null && t.schema ? Ge(e[0].schema) : "",
|
|
5616
5590
|
null,
|
|
5617
5591
|
2
|
|
5618
5592
|
)
|
|
5619
5593
|
}
|
|
5620
5594
|
) })
|
|
5621
5595
|
] }) }) : null;
|
|
5622
|
-
},
|
|
5596
|
+
}, du = ({
|
|
5623
5597
|
responses: e
|
|
5624
5598
|
}) => {
|
|
5625
5599
|
var o, r;
|
|
5626
|
-
const [t, n] =
|
|
5627
|
-
return /* @__PURE__ */ f.jsxs(
|
|
5628
|
-
/* @__PURE__ */ f.jsxs(
|
|
5600
|
+
const [t, n] = Zt(0), s = (r = (o = e[t].content) == null ? void 0 : o[0]) == null ? void 0 : r.schema;
|
|
5601
|
+
return /* @__PURE__ */ f.jsxs(vn, { children: [
|
|
5602
|
+
/* @__PURE__ */ f.jsxs(bn, { className: "text-xs grid grid-rows-2 pb-0", children: [
|
|
5629
5603
|
/* @__PURE__ */ f.jsx("span", { className: "font-mono", children: "Example Responses" }),
|
|
5630
5604
|
/* @__PURE__ */ f.jsx("div", { className: "flex gap-2", children: e.map((i, l) => /* @__PURE__ */ f.jsx(
|
|
5631
5605
|
"div",
|
|
@@ -5640,18 +5614,18 @@ const du = ({ content: e }) => {
|
|
|
5640
5614
|
i.statusCode
|
|
5641
5615
|
)) })
|
|
5642
5616
|
] }),
|
|
5643
|
-
/* @__PURE__ */ f.jsx(
|
|
5644
|
-
|
|
5617
|
+
/* @__PURE__ */ f.jsx(xn, { children: s ? /* @__PURE__ */ f.jsx(
|
|
5618
|
+
Qe,
|
|
5645
5619
|
{
|
|
5646
5620
|
language: "json",
|
|
5647
5621
|
noBackground: !0,
|
|
5648
5622
|
className: "text-xs",
|
|
5649
|
-
code: JSON.stringify(
|
|
5623
|
+
code: JSON.stringify(Ge(s), null, 2)
|
|
5650
5624
|
}
|
|
5651
5625
|
) : /* @__PURE__ */ f.jsx("span", { className: "text-muted-foreground font-mono italic text-xs", children: "Empty Response" }) }),
|
|
5652
|
-
/* @__PURE__ */ f.jsx(
|
|
5626
|
+
/* @__PURE__ */ f.jsx(Oa, { className: "flex justify-end text-xs", children: e[t].description })
|
|
5653
5627
|
] });
|
|
5654
|
-
},
|
|
5628
|
+
}, fu = (e, t) => {
|
|
5655
5629
|
let n;
|
|
5656
5630
|
switch (t) {
|
|
5657
5631
|
case "shell":
|
|
@@ -5692,7 +5666,7 @@ const du = ({ content: e }) => {
|
|
|
5692
5666
|
break;
|
|
5693
5667
|
}
|
|
5694
5668
|
return n ? n[0] : "";
|
|
5695
|
-
},
|
|
5669
|
+
}, Ca = br(
|
|
5696
5670
|
/* GraphQL */
|
|
5697
5671
|
`
|
|
5698
5672
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -5701,17 +5675,26 @@ const du = ({ content: e }) => {
|
|
|
5701
5675
|
}
|
|
5702
5676
|
}
|
|
5703
5677
|
`
|
|
5704
|
-
),
|
|
5678
|
+
), pu = { suspense: !0 }, mu = {
|
|
5679
|
+
get: pe.green,
|
|
5680
|
+
post: pe.blue,
|
|
5681
|
+
put: pe.yellow,
|
|
5682
|
+
delete: pe.red,
|
|
5683
|
+
patch: pe.purple,
|
|
5684
|
+
options: pe.indigo,
|
|
5685
|
+
head: pe.gray,
|
|
5686
|
+
trace: pe.gray
|
|
5687
|
+
}, qu = ({
|
|
5705
5688
|
operation: e
|
|
5706
5689
|
}) => {
|
|
5707
5690
|
var p, d;
|
|
5708
|
-
const t =
|
|
5709
|
-
query:
|
|
5691
|
+
const t = iu(), [n] = Pa({
|
|
5692
|
+
query: Ca,
|
|
5710
5693
|
variables: t,
|
|
5711
|
-
context:
|
|
5712
|
-
}), a =
|
|
5694
|
+
context: pu
|
|
5695
|
+
}), a = mu[e.method.toLocaleLowerCase()] ?? pe.gray, [s, o] = Ja(), [, r] = po(), i = s.get("lang") ?? "shell", l = (p = e.requestBody) == null ? void 0 : p.content, c = e.path.split("/").map((m) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
5713
5696
|
m.startsWith("{") && m.endsWith("}") ? /* @__PURE__ */ f.jsx(
|
|
5714
|
-
|
|
5697
|
+
ln,
|
|
5715
5698
|
{
|
|
5716
5699
|
name: m.slice(1, -1),
|
|
5717
5700
|
backgroundOpacity: "0",
|
|
@@ -5721,9 +5704,9 @@ const du = ({ content: e }) => {
|
|
|
5721
5704
|
) : m,
|
|
5722
5705
|
"/",
|
|
5723
5706
|
/* @__PURE__ */ f.jsx("wbr", {})
|
|
5724
|
-
] }, m)), u =
|
|
5707
|
+
] }, m)), u = mo(() => {
|
|
5725
5708
|
var y;
|
|
5726
|
-
const m = (y = l == null ? void 0 : l[0]) != null && y.schema ?
|
|
5709
|
+
const m = (y = l == null ? void 0 : l[0]) != null && y.schema ? Ge(l[0].schema) : void 0, h = new ou(
|
|
5727
5710
|
{
|
|
5728
5711
|
method: e.method.toLocaleUpperCase(),
|
|
5729
5712
|
url: e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
@@ -5735,26 +5718,26 @@ const du = ({ content: e }) => {
|
|
|
5735
5718
|
}
|
|
5736
5719
|
// 👈 never touch this
|
|
5737
5720
|
);
|
|
5738
|
-
return
|
|
5721
|
+
return fu(h, i);
|
|
5739
5722
|
}, [i, e.method, e.path, l]);
|
|
5740
5723
|
return /* @__PURE__ */ f.jsxs("aside", { className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [
|
|
5741
|
-
/* @__PURE__ */ f.jsxs(
|
|
5742
|
-
/* @__PURE__ */ f.jsxs(
|
|
5724
|
+
/* @__PURE__ */ f.jsxs(vn, { children: [
|
|
5725
|
+
/* @__PURE__ */ f.jsxs(bn, { className: "flex justify-between items-center flex-nowrap py-3 gap-2 text-xs", children: [
|
|
5743
5726
|
/* @__PURE__ */ f.jsxs("span", { className: "font-mono break-words", children: [
|
|
5744
5727
|
/* @__PURE__ */ f.jsx("span", { className: A("font-semibold", a), children: e.method.toLocaleUpperCase() }),
|
|
5745
5728
|
" ",
|
|
5746
5729
|
c
|
|
5747
5730
|
] }),
|
|
5748
5731
|
/* @__PURE__ */ f.jsx(
|
|
5749
|
-
|
|
5732
|
+
su,
|
|
5750
5733
|
{
|
|
5751
5734
|
server: ((d = n.data) == null ? void 0 : d.schema.url) ?? "",
|
|
5752
5735
|
operation: e
|
|
5753
5736
|
}
|
|
5754
5737
|
)
|
|
5755
5738
|
] }),
|
|
5756
|
-
/* @__PURE__ */ f.jsx(
|
|
5757
|
-
|
|
5739
|
+
/* @__PURE__ */ f.jsx(xn, { children: /* @__PURE__ */ f.jsx(
|
|
5740
|
+
Qe,
|
|
5758
5741
|
{
|
|
5759
5742
|
language: i,
|
|
5760
5743
|
noBackground: !0,
|
|
@@ -5762,10 +5745,10 @@ const du = ({ content: e }) => {
|
|
|
5762
5745
|
code: u
|
|
5763
5746
|
}
|
|
5764
5747
|
) }),
|
|
5765
|
-
/* @__PURE__ */ f.jsxs(
|
|
5748
|
+
/* @__PURE__ */ f.jsxs(Oa, { className: "flex items-center text-xs gap-2 justify-end py-1", children: [
|
|
5766
5749
|
/* @__PURE__ */ f.jsx("span", { children: "Show example in" }),
|
|
5767
5750
|
/* @__PURE__ */ f.jsx(
|
|
5768
|
-
|
|
5751
|
+
na,
|
|
5769
5752
|
{
|
|
5770
5753
|
className: "self-start max-w-[150px]",
|
|
5771
5754
|
value: i,
|
|
@@ -5791,10 +5774,10 @@ const du = ({ content: e }) => {
|
|
|
5791
5774
|
)
|
|
5792
5775
|
] })
|
|
5793
5776
|
] }),
|
|
5794
|
-
l && /* @__PURE__ */ f.jsx(
|
|
5795
|
-
e.responses.length > 0 && /* @__PURE__ */ f.jsx(
|
|
5777
|
+
l && /* @__PURE__ */ f.jsx(uu, { content: l }),
|
|
5778
|
+
e.responses.length > 0 && /* @__PURE__ */ f.jsx(du, { responses: e.responses })
|
|
5796
5779
|
] });
|
|
5797
|
-
}, hu =
|
|
5780
|
+
}, hu = br(`
|
|
5798
5781
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
5799
5782
|
schema(input: $input, type: $type) {
|
|
5800
5783
|
tags {
|
|
@@ -5813,13 +5796,13 @@ const du = ({ content: e }) => {
|
|
|
5813
5796
|
}
|
|
5814
5797
|
}
|
|
5815
5798
|
`), yu = () => {
|
|
5816
|
-
const e =
|
|
5817
|
-
return /* @__PURE__ */ f.jsx(
|
|
5818
|
-
},
|
|
5819
|
-
const t = e.
|
|
5799
|
+
const e = Ga(), t = e instanceof Error ? /* @__PURE__ */ f.jsx(Qe, { code: e.message }) : "An unknown error occurred";
|
|
5800
|
+
return /* @__PURE__ */ f.jsx(To, { category: "Error", title: "An error occurred", message: t });
|
|
5801
|
+
}, Iu = (e) => {
|
|
5802
|
+
const t = eo(e.navigationId ?? "/reference"), n = e.server ? new Ea({
|
|
5820
5803
|
url: e.server,
|
|
5821
|
-
exchanges: [
|
|
5822
|
-
}) :
|
|
5804
|
+
exchanges: [Ra, Aa]
|
|
5805
|
+
}) : Ia({ useMemoryClient: e.inMemory ?? !1 });
|
|
5823
5806
|
return {
|
|
5824
5807
|
getHead: () => {
|
|
5825
5808
|
if (e.type === "url")
|
|
@@ -5844,8 +5827,8 @@ const du = ({ content: e }) => {
|
|
|
5844
5827
|
...i
|
|
5845
5828
|
}) => {
|
|
5846
5829
|
var u;
|
|
5847
|
-
const l =
|
|
5848
|
-
queryFn: async () => (await n.query(
|
|
5830
|
+
const l = za(), c = qa({
|
|
5831
|
+
queryFn: async () => (await n.query(Ca, {
|
|
5849
5832
|
type: e.type,
|
|
5850
5833
|
input: e.input
|
|
5851
5834
|
})).data,
|
|
@@ -5853,33 +5836,33 @@ const du = ({ content: e }) => {
|
|
|
5853
5836
|
queryKey: ["playground-server"]
|
|
5854
5837
|
});
|
|
5855
5838
|
return a && !l.isAuthenticated ? /* @__PURE__ */ f.jsxs(
|
|
5856
|
-
|
|
5839
|
+
qe,
|
|
5857
5840
|
{
|
|
5858
5841
|
className: "gap-2 items-center",
|
|
5859
5842
|
variant: "outline",
|
|
5860
5843
|
onClick: l.login,
|
|
5861
5844
|
children: [
|
|
5862
5845
|
"Login to open in Playground ",
|
|
5863
|
-
/* @__PURE__ */ f.jsx(
|
|
5846
|
+
/* @__PURE__ */ f.jsx(ko, { size: 16 })
|
|
5864
5847
|
]
|
|
5865
5848
|
}
|
|
5866
5849
|
) : /* @__PURE__ */ f.jsx(
|
|
5867
|
-
|
|
5850
|
+
ra,
|
|
5868
5851
|
{
|
|
5869
5852
|
url: r ?? "/",
|
|
5870
5853
|
method: o ?? "get",
|
|
5871
5854
|
server: s ?? ((u = c.data) == null ? void 0 : u.schema.url) ?? "https://example.com",
|
|
5872
5855
|
...i,
|
|
5873
|
-
children: /* @__PURE__ */ f.jsxs(
|
|
5856
|
+
children: /* @__PURE__ */ f.jsxs(qe, { className: "gap-2 items-center", variant: "outline", children: [
|
|
5874
5857
|
"Open in Playground ",
|
|
5875
|
-
/* @__PURE__ */ f.jsx(
|
|
5858
|
+
/* @__PURE__ */ f.jsx(yr, { size: 16 })
|
|
5876
5859
|
] })
|
|
5877
5860
|
}
|
|
5878
5861
|
);
|
|
5879
5862
|
}
|
|
5880
5863
|
}),
|
|
5881
5864
|
getNavigation: async (a) => {
|
|
5882
|
-
if (!
|
|
5865
|
+
if (!bo({ path: t, end: !1 }, a))
|
|
5883
5866
|
return [];
|
|
5884
5867
|
const { data: s } = await n.query(hu, {
|
|
5885
5868
|
input: e.input,
|
|
@@ -5887,30 +5870,30 @@ const du = ({ content: e }) => {
|
|
|
5887
5870
|
});
|
|
5888
5871
|
if (!s) return [];
|
|
5889
5872
|
const o = s.schema.tags.filter((r) => r.operations.length > 0).map((r) => ({
|
|
5890
|
-
|
|
5873
|
+
type: "category",
|
|
5891
5874
|
label: r.name ?? "",
|
|
5892
5875
|
collapsible: !1,
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5876
|
+
collapsed: !1,
|
|
5877
|
+
items: r.operations.map((i) => ({
|
|
5878
|
+
type: "link",
|
|
5879
|
+
label: i.summary ?? i.path,
|
|
5880
|
+
href: `#${i.slug}`,
|
|
5881
|
+
badge: {
|
|
5882
|
+
label: i.method,
|
|
5883
|
+
color: "green"
|
|
5884
|
+
}
|
|
5901
5885
|
}))
|
|
5902
5886
|
}));
|
|
5903
5887
|
return o.unshift({
|
|
5904
|
-
|
|
5888
|
+
type: "link",
|
|
5905
5889
|
label: "Overview",
|
|
5906
|
-
|
|
5907
|
-
children: [{ path: "#description", label: "Description" }]
|
|
5890
|
+
href: "#description"
|
|
5908
5891
|
}), o;
|
|
5909
5892
|
},
|
|
5910
5893
|
getRoutes: () => [
|
|
5911
5894
|
{
|
|
5912
5895
|
async lazy() {
|
|
5913
|
-
const { OpenApiRoute: a } = await import("./Route-
|
|
5896
|
+
const { OpenApiRoute: a } = await import("./Route-CwXfyIUw.js");
|
|
5914
5897
|
return {
|
|
5915
5898
|
element: /* @__PURE__ */ f.jsx(a, { client: n, config: e })
|
|
5916
5899
|
};
|
|
@@ -5923,7 +5906,7 @@ const du = ({ content: e }) => {
|
|
|
5923
5906
|
{
|
|
5924
5907
|
index: !0,
|
|
5925
5908
|
async lazy() {
|
|
5926
|
-
const { OperationList: a } = await import("./OperationList-
|
|
5909
|
+
const { OperationList: a } = await import("./OperationList-CMH3DPpj.js");
|
|
5927
5910
|
return { element: /* @__PURE__ */ f.jsx(a, {}) };
|
|
5928
5911
|
}
|
|
5929
5912
|
}
|
|
@@ -5935,16 +5918,17 @@ const du = ({ content: e }) => {
|
|
|
5935
5918
|
};
|
|
5936
5919
|
};
|
|
5937
5920
|
export {
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5921
|
+
ln as C,
|
|
5922
|
+
To as E,
|
|
5923
|
+
Fu as O,
|
|
5924
|
+
qu as S,
|
|
5925
|
+
wn as T,
|
|
5926
|
+
an as a,
|
|
5927
|
+
_t as b,
|
|
5945
5928
|
Ce as c,
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5929
|
+
Pe as d,
|
|
5930
|
+
br as g,
|
|
5931
|
+
Iu as o,
|
|
5932
|
+
iu as u
|
|
5949
5933
|
};
|
|
5950
|
-
//# sourceMappingURL=index-
|
|
5934
|
+
//# sourceMappingURL=index-DUrF63A6.js.map
|