zudoku 0.24.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/lib/components/Header.js +13 -13
  2. package/dist/lib/components/Header.js.map +1 -1
  3. package/dist/lib/components/Layout.js +1 -1
  4. package/dist/lib/components/Layout.js.map +1 -1
  5. package/dist/lib/components/TopNavigation.js +2 -2
  6. package/dist/lib/components/TopNavigation.js.map +1 -1
  7. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  8. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  9. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  10. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  11. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  12. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  13. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  14. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  15. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  16. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  17. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  18. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  19. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  20. package/dist/lib/ui/Card.js +1 -1
  21. package/dist/lib/ui/Card.js.map +1 -1
  22. package/lib/{OperationList-CqLL5P5l.js → OperationList-c6V_vcgz.js} +787 -802
  23. package/lib/OperationList-c6V_vcgz.js.map +1 -0
  24. package/lib/{index-DzRORsY1.js → index-DkwDHnit.js} +4 -3
  25. package/lib/index-DkwDHnit.js.map +1 -0
  26. package/lib/ui/Card.js +7 -7
  27. package/lib/ui/Card.js.map +1 -1
  28. package/lib/zudoku.components.js +140 -140
  29. package/lib/zudoku.components.js.map +1 -1
  30. package/lib/zudoku.plugin-openapi.js +1 -1
  31. package/package.json +1 -1
  32. package/src/app/main.css +50 -37
  33. package/src/lib/components/Header.tsx +9 -5
  34. package/src/lib/components/Layout.tsx +1 -1
  35. package/src/lib/components/TopNavigation.tsx +2 -2
  36. package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
  37. package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
  38. package/src/lib/plugins/openapi/Endpoint.tsx +1 -3
  39. package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
  40. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  41. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -0
  42. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  43. package/src/lib/ui/Card.tsx +1 -1
  44. package/lib/OperationList-CqLL5P5l.js.map +0 -1
  45. package/lib/index-DzRORsY1.js.map +0 -1
@@ -2,39 +2,39 @@ import { j as v } from "./jsx-runtime-Dx-03ztt.js";
2
2
  import { u as mr } from "./ZudokuContext-hmLMUdf2.js";
3
3
  import { H as Po } from "./index.esm-BSV1C092.js";
4
4
  import { b as Co, a as Ro } from "./chunk-D52XG6IA-Dl7HLe6j.js";
5
- import { S as qo, a as ko, b as No, c as Eo, e as Ao } from "./Select-B_IxRUUC.js";
5
+ import { S as qo, a as No, b as ko, c as Eo, e as Ao } from "./Select-B_IxRUUC.js";
6
6
  import { a as gr } from "./state-CFQsUZUP.js";
7
7
  import { C as _r } from "./CategoryHeading-CBconmtI.js";
8
8
  import { I as Io, M as we, H as He, P as qe } from "./Markdown-CZDLNOFc.js";
9
9
  import { c as pe } from "./cn-qaFjX9_3.js";
10
- import { CheckIcon as Lo, CopyIcon as Uo, ChevronDownIcon as Fo, CircleFadingPlusIcon as _o, CircleDotIcon as Bo, CircleIcon as Ho, SquareMinusIcon as Mo, SquarePlusIcon as zo, ListPlusIcon as Go, RefreshCcwDotIcon as Wo } from "lucide-react";
11
- import { useContext as Jo, useMemo as eo, useTransition as to, useState as Se, useRef as vr, useEffect as ro, useLayoutEffect as Vo, Fragment as Do, useCallback as Qo } from "react";
10
+ import { CheckIcon as Lo, CopyIcon as Uo, UnfoldVerticalIcon as Fo, FoldVerticalIcon as _o, ChevronDownIcon as Bo, CircleFadingPlusIcon as Ho, CircleDotIcon as Mo, CircleIcon as zo, SquareMinusIcon as Go, SquarePlusIcon as Wo, ListPlusIcon as Jo, RefreshCcwDotIcon as Vo } from "lucide-react";
11
+ import { useContext as Do, useMemo as eo, useTransition as to, useState as Se, useRef as vr, useEffect as ro, useLayoutEffect as Qo, Fragment as Ko, useCallback as Yo } from "react";
12
12
  import { Button as no } from "./ui/Button.js";
13
- import { h as Ko, C as Yo } from "./index-DyBL--Kz.js";
14
- import { a as Xo, u as br } from "./context-h_UkBLvr.js";
15
- import { g as tt, S as oo, C as ao, P as Zo } from "./index-DzRORsY1.js";
16
- import { Tabs as ea, TabsList as ta, TabsTrigger as ra, TabsContent as na } from "./ui/Tabs.js";
17
- import { a as oa } from "./StaggeredRender-DgsamH_G.js";
18
- import { Card as xe, CardHeader as aa, CardTitle as ia, CardContent as sa } from "./ui/Card.js";
19
- import { g as ca, c as Ze, a as la } from "./_commonjsHelpers-BkfeUUK-.js";
20
- import { _ as ua } from "./__vite-browser-external-BYRIRx8p.js";
13
+ import { h as Xo, C as Zo } from "./index-DyBL--Kz.js";
14
+ import { a as ea, u as br } from "./context-h_UkBLvr.js";
15
+ import { g as tt, S as oo, C as ao, P as ta } from "./index-DkwDHnit.js";
16
+ import { Tabs as ra, TabsList as na, TabsTrigger as oa, TabsContent as aa } from "./ui/Tabs.js";
17
+ import { a as ia } from "./StaggeredRender-DgsamH_G.js";
18
+ import { Card as xe, CardHeader as sa, CardTitle as la, CardContent as ca } from "./ui/Card.js";
19
+ import { g as ua, c as Ze, a as fa } from "./_commonjsHelpers-BkfeUUK-.js";
20
+ import { _ as pa } from "./__vite-browser-external-BYRIRx8p.js";
21
21
  import { S as xr } from "./SyntaxHighlight-Bz-lOJtH.js";
22
22
  import { B as Br } from "./Button-DeAoTouo.js";
23
23
  import * as ye from "@radix-ui/react-collapsible";
24
24
  import * as Ke from "@radix-ui/react-tabs";
25
- function fa(e, n) {
25
+ function da(e, n) {
26
26
  return n;
27
27
  }
28
28
  const $r = (e, ...n) => {
29
- const t = Jo(Xo);
29
+ const t = Do(ea);
30
30
  if (t === void 0)
31
31
  throw new Error("useGraphQL must be used within a GraphQLProvider");
32
- const o = eo(() => typeof n[0] == "object" && n[0] != null && "input" in n[0] && typeof n[0].input == "function" ? n[0].input.name : Ko(n[0] ?? {}), [n]);
32
+ const o = eo(() => typeof n[0] == "object" && n[0] != null && "input" in n[0] && typeof n[0].input == "function" ? n[0].input.name : Xo(n[0] ?? {}), [n]);
33
33
  return {
34
34
  queryFn: () => t.fetch(e, ...n),
35
35
  queryKey: [e, o]
36
36
  };
37
- }, pa = tt(
37
+ }, ha = tt(
38
38
  /* GraphQL */
39
39
  `
40
40
  query ServersQuery($input: JSON!, $type: SchemaType!) {
@@ -61,17 +61,14 @@ const $r = (e, ...n) => {
61
61
  children: n ? /* @__PURE__ */ v.jsx(Lo, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ v.jsx(Uo, { size: 14, strokeWidth: 1.3 })
62
62
  }
63
63
  );
64
- }, da = () => {
65
- const { input: e, type: n } = br(), t = $r(pa, { input: e, type: n }), o = mr(t), [, s] = to(), { selectedServer: c, setSelectedServer: r } = gr(), { servers: a } = o.data.schema;
64
+ }, ya = () => {
65
+ const { input: e, type: n } = br(), t = $r(ha, { input: e, type: n }), o = mr(t), [, s] = to(), { selectedServer: l, setSelectedServer: r } = gr(), { servers: a } = o.data.schema;
66
66
  return a.length === 1 ? /* @__PURE__ */ v.jsxs("div", { className: "flex items-center gap-2", children: [
67
67
  /* @__PURE__ */ v.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
68
68
  /* @__PURE__ */ v.jsx(Io, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: a[0].url }),
69
69
  /* @__PURE__ */ v.jsx(Hr, { url: a[0].url })
70
70
  ] }) : /* @__PURE__ */ v.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
71
- /* @__PURE__ */ v.jsxs("span", { className: "font-medium text-sm", children: [
72
- a.length > 1 ? "Endpoints" : "Endpoint",
73
- ":"
74
- ] }),
71
+ /* @__PURE__ */ v.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
75
72
  /* @__PURE__ */ v.jsx(
76
73
  oo,
77
74
  {
@@ -79,7 +76,7 @@ const $r = (e, ...n) => {
79
76
  onChange: (i) => s(() => {
80
77
  r(i.target.value);
81
78
  }),
82
- value: c ?? o.data.schema.url,
79
+ value: l ?? o.data.schema.url,
83
80
  showChevrons: a.length > 1,
84
81
  options: a.map((i) => ({
85
82
  value: i.url,
@@ -87,7 +84,7 @@ const $r = (e, ...n) => {
87
84
  }))
88
85
  }
89
86
  ),
90
- /* @__PURE__ */ v.jsx(Hr, { url: c ?? o.data.schema.url })
87
+ /* @__PURE__ */ v.jsx(Hr, { url: l ?? o.data.schema.url })
91
88
  ] });
92
89
  }, io = (e, n) => e.reduce(
93
90
  (t, o) => {
@@ -95,14 +92,14 @@ const $r = (e, ...n) => {
95
92
  return t[s] || (t[s] = []), t[s].push(o), t;
96
93
  },
97
94
  {}
98
- ), ha = (e, n) => e ? n(e) : void 0, ya = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
95
+ ), ma = (e, n) => e ? n(e) : void 0, ga = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
99
96
  type: "string"
100
- }, ma = ({
97
+ }, va = ({
101
98
  parameter: e,
102
99
  group: n,
103
100
  id: t
104
101
  }) => {
105
- const o = ya(e);
102
+ const o = ga(e);
106
103
  return /* @__PURE__ */ v.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
107
104
  /* @__PURE__ */ v.jsxs("div", { className: "flex items-center gap-2", children: [
108
105
  /* @__PURE__ */ v.jsx("code", { children: n === "path" ? /* @__PURE__ */ v.jsx(
@@ -124,14 +121,14 @@ const $r = (e, ...n) => {
124
121
  }
125
122
  )
126
123
  ] });
127
- }, ga = ({
124
+ }, ba = ({
128
125
  group: e,
129
126
  parameters: n,
130
127
  id: t
131
128
  }) => /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
132
129
  /* @__PURE__ */ v.jsx(He, { level: 3, id: `${t}/${e}-parameters`, className: "capitalize", children: e === "header" ? "Headers" : `${e} Parameters` }),
133
130
  /* @__PURE__ */ v.jsx(xe, { children: /* @__PURE__ */ v.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: n.sort((o, s) => o.required === s.required ? 0 : o.required ? -1 : 1).map((o) => /* @__PURE__ */ v.jsx(
134
- ma,
131
+ va,
135
132
  {
136
133
  parameter: o,
137
134
  id: t,
@@ -160,45 +157,45 @@ var Mr = (e, n) => {
160
157
  this.code.push("");
161
158
  }, this.join = () => {
162
159
  const t = this.code.join(this.lineJoin);
163
- return this.postProcessors.reduce((s, c) => c(s), t);
160
+ return this.postProcessors.reduce((s, l) => l(s), t);
164
161
  }, this.addPostProcessor = (t) => {
165
162
  this.postProcessors = [...this.postProcessors, t];
166
163
  }, this.indentationCharacter = e || zr, this.lineJoin = n ?? Gr;
167
164
  }
168
165
  }, ht, Wr;
169
- function va() {
166
+ function xa() {
170
167
  return Wr || (Wr = 1, ht = function(e) {
171
168
  return Object.prototype.toString.call(e) === "[object RegExp]";
172
169
  }), ht;
173
170
  }
174
171
  var yt, Jr;
175
- function ba() {
172
+ function $a() {
176
173
  return Jr || (Jr = 1, yt = function(e) {
177
174
  var n = typeof e;
178
175
  return e !== null && (n === "object" || n === "function");
179
176
  }), yt;
180
177
  }
181
178
  var Ye = {}, Vr;
182
- function xa() {
179
+ function ja() {
183
180
  return Vr || (Vr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Ye;
184
181
  }
185
182
  var mt, Dr;
186
- function $a() {
183
+ function wa() {
187
184
  if (Dr) return mt;
188
185
  Dr = 1;
189
- const e = va(), n = ba(), t = xa().default;
190
- return mt = (o, s, c) => {
186
+ const e = xa(), n = $a(), t = ja().default;
187
+ return mt = (o, s, l) => {
191
188
  const r = [];
192
- return function a(i, l, h) {
193
- l = l || {}, l.indent = l.indent || " ", h = h || "";
189
+ return function a(i, c, h) {
190
+ c = c || {}, c.indent = c.indent || " ", h = h || "";
194
191
  let f;
195
- l.inlineCharacterLimit === void 0 ? f = {
192
+ c.inlineCharacterLimit === void 0 ? f = {
196
193
  newLine: `
197
194
  `,
198
195
  newLineOrSpace: `
199
196
  `,
200
197
  pad: h,
201
- indent: h + l.indent
198
+ indent: h + c.indent
202
199
  } : f = {
203
200
  newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
204
201
  newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
@@ -206,11 +203,11 @@ function $a() {
206
203
  indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
207
204
  };
208
205
  const u = (m) => {
209
- if (l.inlineCharacterLimit === void 0)
206
+ if (c.inlineCharacterLimit === void 0)
210
207
  return m;
211
208
  const x = m.replace(new RegExp(f.newLine, "g"), "").replace(new RegExp(f.newLineOrSpace, "g"), " ").replace(new RegExp(f.pad + "|" + f.indent, "g"), "");
212
- return x.length <= l.inlineCharacterLimit ? x : m.replace(new RegExp(f.newLine + "|" + f.newLineOrSpace, "g"), `
213
- `).replace(new RegExp(f.pad, "g"), h).replace(new RegExp(f.indent, "g"), h + l.indent);
209
+ return x.length <= c.inlineCharacterLimit ? x : m.replace(new RegExp(f.newLine + "|" + f.newLineOrSpace, "g"), `
210
+ `).replace(new RegExp(f.pad, "g"), h).replace(new RegExp(f.indent, "g"), h + c.indent);
214
211
  };
215
212
  if (r.indexOf(i) !== -1)
216
213
  return '"[Circular]"';
@@ -224,36 +221,36 @@ function $a() {
224
221
  r.push(i);
225
222
  const m = "[" + f.newLine + i.map((x, $) => {
226
223
  const d = i.length - 1 === $ ? f.newLine : "," + f.newLineOrSpace;
227
- let y = a(x, l, h + l.indent);
228
- return l.transform && (y = l.transform(i, $, y)), f.indent + y + d;
224
+ let y = a(x, c, h + c.indent);
225
+ return c.transform && (y = c.transform(i, $, y)), f.indent + y + d;
229
226
  }).join("") + f.pad + "]";
230
227
  return r.pop(), u(m);
231
228
  }
232
229
  if (n(i)) {
233
230
  let m = Object.keys(i).concat(t(i));
234
- if (l.filter && (m = m.filter(($) => l.filter(i, $))), m.length === 0)
231
+ if (c.filter && (m = m.filter(($) => c.filter(i, $))), m.length === 0)
235
232
  return "{}";
236
233
  r.push(i);
237
234
  const x = "{" + f.newLine + m.map(($, d) => {
238
- const y = m.length - 1 === d ? f.newLine : "," + f.newLineOrSpace, g = typeof $ == "symbol", w = !g && /^[a-z$_][a-z$_0-9]*$/i.test($), T = g || w ? $ : a($, l);
239
- let p = a(i[$], l, h + l.indent);
240
- return l.transform && (p = l.transform(i, $, p)), f.indent + String(T) + ": " + p + y;
235
+ const y = m.length - 1 === d ? f.newLine : "," + f.newLineOrSpace, g = typeof $ == "symbol", w = !g && /^[a-z$_][a-z$_0-9]*$/i.test($), T = g || w ? $ : a($, c);
236
+ let p = a(i[$], c, h + c.indent);
237
+ return c.transform && (p = c.transform(i, $, p)), f.indent + String(T) + ": " + p + y;
241
238
  }).join("") + f.pad + "}";
242
239
  return r.pop(), u(x);
243
240
  }
244
241
  return i = String(i).replace(/[\r\n]/g, (m) => m === `
245
- ` ? "\\n" : "\\r"), l.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
246
- }(o, s, c);
242
+ ` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
243
+ }(o, s, l);
247
244
  }, mt;
248
245
  }
249
- var ja = $a();
250
- const ue = /* @__PURE__ */ ca(ja);
246
+ var Sa = wa();
247
+ const ue = /* @__PURE__ */ ua(Sa);
251
248
  function Me(e, n = {}) {
252
249
  const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: s = !0 } = n;
253
250
  return [...e.toString()].map((r) => r === "\b" ? `${o}b` : r === " " ? `${o}t` : r === `
254
251
  ` ? s ? `${o}n` : r : r === "\f" ? `${o}f` : r === "\r" ? s ? `${o}r` : r : r === o ? o + o : r === t ? o + t : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
255
252
  }
256
- var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), wa = {
253
+ var ze = (e) => Me(e, { delimiter: "'" }), le = (e) => Me(e, { delimiter: '"' }), Oa = {
257
254
  info: {
258
255
  key: "libcurl",
259
256
  title: "Libcurl",
@@ -262,14 +259,14 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
262
259
  extname: ".c"
263
260
  },
264
261
  convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: o, postData: s }) => {
265
- const { push: c, blank: r, join: a } = new V();
266
- c("CURL *hnd = curl_easy_init();"), r(), c(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), c("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), c(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
262
+ const { push: l, blank: r, join: a } = new V();
263
+ l("CURL *hnd = curl_easy_init();"), r(), l(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), l("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), l(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
267
264
  const i = Object.keys(t);
268
- return i.length && (r(), c("struct curl_slist *headers = NULL;"), i.forEach((l) => {
269
- c(`headers = curl_slist_append(headers, "${l}: ${ce(t[l])}");`);
270
- }), c("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (r(), c(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (r(), c(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), c("CURLcode ret = curl_easy_perform(hnd);"), a();
265
+ return i.length && (r(), l("struct curl_slist *headers = NULL;"), i.forEach((c) => {
266
+ l(`headers = curl_slist_append(headers, "${c}: ${le(t[c])}");`);
267
+ }), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (r(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), s.text && (r(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
271
268
  }
272
- }, Sa = {
269
+ }, Ta = {
273
270
  info: {
274
271
  key: "c",
275
272
  title: "C",
@@ -277,23 +274,23 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
277
274
  cli: "c"
278
275
  },
279
276
  clientsById: {
280
- libcurl: wa
277
+ libcurl: Oa
281
278
  }
282
279
  }, fe = (e, n) => Object.keys(e).find((t) => t.toLowerCase() === n.toLowerCase()), ve = (e, n) => {
283
280
  const t = fe(e, n);
284
281
  if (t)
285
282
  return e[t];
286
- }, rt = (e, n) => !!fe(e, n), Oa = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
283
+ }, rt = (e, n) => !!fe(e, n), Pa = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
287
284
  (n) => e.indexOf(n) > -1
288
285
  ), Qr = class {
289
286
  constructor(e) {
290
287
  this.name = "", this.toString = () => `:${this.name}`, this.name = e;
291
288
  }
292
- }, Ta = class {
289
+ }, Ca = class {
293
290
  constructor(e) {
294
291
  this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
295
292
  }
296
- }, so = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), co = (e) => e === void 0 ? !0 : so(e) === "object" ? Object.keys(e).length === 0 : !1, Kr = (e) => (Object.keys(e).filter((n) => co(e[n])).forEach((n) => {
293
+ }, so = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), lo = (e) => e === void 0 ? !0 : so(e) === "object" ? Object.keys(e).length === 0 : !1, Kr = (e) => (Object.keys(e).filter((n) => lo(e[n])).forEach((n) => {
297
294
  delete e[n];
298
295
  }), e), Xe = (e, n) => {
299
296
  const t = " ".repeat(e);
@@ -326,7 +323,7 @@ ${t}`);
326
323
  default:
327
324
  return e.toString();
328
325
  }
329
- }, Pa = {
326
+ }, Ra = {
330
327
  info: {
331
328
  key: "clj_http",
332
329
  title: "clj-http",
@@ -334,79 +331,79 @@ ${t}`);
334
331
  description: "An idiomatic clojure http client wrapping the apache client.",
335
332
  extname: ".clj"
336
333
  },
337
- convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s }, c) => {
338
- const { push: r, join: a } = new V({ indent: c == null ? void 0 : c.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
334
+ convert: ({ queryObj: e, method: n, postData: t, url: o, allHeaders: s }, l) => {
335
+ const { push: r, join: a } = new V({ indent: l == null ? void 0 : l.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
339
336
  if (n = n.toLowerCase(), !i.includes(n))
340
337
  return r("Method not supported"), a();
341
- const l = {
338
+ const c = {
342
339
  headers: s,
343
340
  "query-params": e
344
341
  };
345
342
  switch (t.mimeType) {
346
343
  case "application/json":
347
344
  {
348
- l["content-type"] = new Qr("json"), l["form-params"] = t.jsonObj;
349
- const h = fe(l.headers, "content-type");
350
- h && delete l.headers[h];
345
+ c["content-type"] = new Qr("json"), c["form-params"] = t.jsonObj;
346
+ const h = fe(c.headers, "content-type");
347
+ h && delete c.headers[h];
351
348
  }
352
349
  break;
353
350
  case "application/x-www-form-urlencoded":
354
351
  {
355
- l["form-params"] = t.paramsObj;
356
- const h = fe(l.headers, "content-type");
357
- h && delete l.headers[h];
352
+ c["form-params"] = t.paramsObj;
353
+ const h = fe(c.headers, "content-type");
354
+ h && delete c.headers[h];
358
355
  }
359
356
  break;
360
357
  case "text/plain":
361
358
  {
362
- l.body = t.text;
363
- const h = fe(l.headers, "content-type");
364
- h && delete l.headers[h];
359
+ c.body = t.text;
360
+ const h = fe(c.headers, "content-type");
361
+ h && delete c.headers[h];
365
362
  }
366
363
  break;
367
364
  case "multipart/form-data": {
368
365
  if (t.params) {
369
- l.multipart = t.params.map((f) => f.fileName && !f.value ? {
366
+ c.multipart = t.params.map((f) => f.fileName && !f.value ? {
370
367
  name: f.name,
371
- content: new Ta(f.fileName)
368
+ content: new Ca(f.fileName)
372
369
  } : {
373
370
  name: f.name,
374
371
  content: f.value
375
372
  });
376
- const h = fe(l.headers, "content-type");
377
- h && delete l.headers[h];
373
+ const h = fe(c.headers, "content-type");
374
+ h && delete c.headers[h];
378
375
  }
379
376
  break;
380
377
  }
381
378
  }
382
- switch (ve(l.headers, "accept")) {
379
+ switch (ve(c.headers, "accept")) {
383
380
  case "application/json":
384
381
  {
385
- l.accept = new Qr("json");
386
- const h = fe(l.headers, "accept");
387
- h && delete l.headers[h];
382
+ c.accept = new Qr("json");
383
+ const h = fe(c.headers, "accept");
384
+ h && delete c.headers[h];
388
385
  }
389
386
  break;
390
387
  }
391
388
  if (r(`(require '[clj-http.client :as client])
392
- `), co(Kr(l)))
389
+ `), lo(Kr(c)))
393
390
  r(`(client/${n} "${o}")`);
394
391
  else {
395
- const h = 11 + n.length + o.length, f = Xe(h, dr(Kr(l)));
392
+ const h = 11 + n.length + o.length, f = Xe(h, dr(Kr(c)));
396
393
  r(`(client/${n} "${o}" ${f})`);
397
394
  }
398
395
  return a();
399
396
  }
400
- }, Ca = {
397
+ }, qa = {
401
398
  info: {
402
399
  key: "clojure",
403
400
  title: "Clojure",
404
401
  default: "clj_http"
405
402
  },
406
403
  clientsById: {
407
- clj_http: Pa
404
+ clj_http: Ra
408
405
  }
409
- }, Ra = (e) => {
406
+ }, Na = (e) => {
410
407
  let n = ve(e, "accept-encoding");
411
408
  if (!n)
412
409
  return [];
@@ -415,15 +412,15 @@ ${t}`);
415
412
  deflate: "DecompressionMethods.Deflate"
416
413
  }, o = [];
417
414
  return typeof n == "string" && (n = [n]), n.forEach((s) => {
418
- s.split(",").forEach((c) => {
419
- const r = /\s*([^;\s]+)/.exec(c);
415
+ s.split(",").forEach((l) => {
416
+ const r = /\s*([^;\s]+)/.exec(l);
420
417
  if (r) {
421
418
  const a = t[r[1]];
422
419
  a && o.push(a);
423
420
  }
424
421
  });
425
422
  }), o;
426
- }, qa = {
423
+ }, ka = {
427
424
  info: {
428
425
  key: "httpclient",
429
426
  title: "HttpClient",
@@ -433,14 +430,14 @@ ${t}`);
433
430
  },
434
431
  convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
435
432
  var m, x;
436
- const c = {
433
+ const l = {
437
434
  indent: " ",
438
435
  ...s
439
- }, { push: r, join: a } = new V({ indent: c.indent });
436
+ }, { push: r, join: a } = new V({ indent: l.indent });
440
437
  r("using System.Net.Http.Headers;");
441
438
  let i = "";
442
- const l = !!e.cookie, h = Ra(e);
443
- (l || h.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), l && r("UseCookies = false,", 1), h.length && r(`AutomaticDecompression = ${h.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
439
+ const c = !!e.cookie, h = Na(e);
440
+ (c || h.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), h.length && r(`AutomaticDecompression = ${h.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
444
441
  const f = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
445
442
  t = t.toUpperCase(), t && f.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${o}"),`, 1);
446
443
  const u = Object.keys(e).filter(($) => {
@@ -454,7 +451,7 @@ ${t}`);
454
451
  }
455
452
  });
456
453
  if (u.length && (r("Headers =", 1), r("{", 1), u.forEach(($) => {
457
- r(`{ "${$}", "${ce(e[$])}" },`, 2);
454
+ r(`{ "${$}", "${le(e[$])}" },`, 2);
458
455
  }), r("},", 1)), n.text) {
459
456
  const $ = n.mimeType;
460
457
  switch ($) {
@@ -476,10 +473,10 @@ ${t}`);
476
473
  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("}"), a();
477
474
  }
478
475
  };
479
- function ka(e) {
476
+ function Ea(e) {
480
477
  return e[0].toUpperCase() + e.slice(1).toLowerCase();
481
478
  }
482
- var Na = {
479
+ var Aa = {
483
480
  info: {
484
481
  key: "restsharp",
485
482
  title: "RestSharp",
@@ -488,7 +485,7 @@ var Na = {
488
485
  extname: ".cs",
489
486
  installation: "dotnet add package RestSharp"
490
487
  },
491
- convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj: c }) => {
488
+ convert: ({ method: e, fullUrl: n, headersObj: t, cookies: o, postData: s, uriObj: l }) => {
492
489
  const { push: r, join: a } = new V();
493
490
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
494
491
  e.toUpperCase()
@@ -497,15 +494,15 @@ var Na = {
497
494
  r(`using RestSharp;
498
495
 
499
496
  `), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
500
- const l = s.mimeType && s.mimeType === "multipart/form-data";
501
- switch (l && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((h) => {
497
+ const c = s.mimeType && s.mimeType === "multipart/form-data";
498
+ switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((h) => {
502
499
  if (s.mimeType && h.toLowerCase() === "content-type" && s.text) {
503
- l && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
500
+ c && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
504
501
  return;
505
502
  }
506
- r(`request.AddHeader("${h}", "${ce(t[h])}");`);
503
+ r(`request.AddHeader("${h}", "${le(t[h])}");`);
507
504
  }), o.forEach(({ name: h, value: f }) => {
508
- r(`request.AddCookie("${h}", "${ce(f)}", "${c.pathname}", "${c.host}");`);
505
+ r(`request.AddCookie("${h}", "${le(f)}", "${l.pathname}", "${l.host}");`);
509
506
  }), s.mimeType) {
510
507
  case "multipart/form-data":
511
508
  if (!s.params) break;
@@ -529,11 +526,11 @@ var Na = {
529
526
  if (!s.text) break;
530
527
  r(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
531
528
  }
532
- return r(`var response = await client.${ka(e)}Async(request);
529
+ return r(`var response = await client.${Ea(e)}Async(request);
533
530
  `), r(`Console.WriteLine("{0}", response.Content);
534
531
  `), a();
535
532
  }
536
- }, Ea = {
533
+ }, Ia = {
537
534
  info: {
538
535
  key: "csharp",
539
536
  title: "C#",
@@ -541,10 +538,10 @@ var Na = {
541
538
  cli: "dotnet"
542
539
  },
543
540
  clientsById: {
544
- httpclient: qa,
545
- restsharp: Na
541
+ httpclient: ka,
542
+ restsharp: Aa
546
543
  }
547
- }, Aa = {
544
+ }, La = {
548
545
  info: {
549
546
  key: "native",
550
547
  title: "NewRequest",
@@ -553,16 +550,16 @@ var Na = {
553
550
  extname: ".go"
554
551
  },
555
552
  convert: ({ postData: e, method: n, allHeaders: t, fullUrl: o }, s = {}) => {
556
- const { blank: c, push: r, join: a } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: l = !1, printBody: h = !0, timeout: f = -1 } = s, u = l ? "err" : "_", m = i ? 1 : 0, x = () => {
557
- l && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
553
+ const { blank: l, push: r, join: a } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: h = !0, timeout: f = -1 } = s, u = c ? "err" : "_", m = i ? 1 : 0, x = () => {
554
+ c && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
558
555
  };
559
- i && (r("package main"), c(), r("import ("), r('"fmt"', m), f > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), h && r('"io"', m), r(")"), c(), r("func main() {"), c());
556
+ i && (r("package main"), l(), r("import ("), r('"fmt"', m), f > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), h && r('"io"', m), r(")"), l(), r("func main() {"), l());
560
557
  const $ = f > 0, d = $, y = d ? "client" : "http.DefaultClient";
561
- return d && (r("client := http.Client{", m), $ && r(`Timeout: time.Duration(${f} * time.Second),`, m + 1), r("}", m), c()), r(`url := "${o}"`, m), c(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), c(), r(`req, ${u} := http.NewRequest("${n}", url, payload)`, m), c()) : (r(`req, ${u} := http.NewRequest("${n}", url, nil)`, m), c()), x(), Object.keys(t).length && (Object.keys(t).forEach((g) => {
562
- r(`req.Header.Add("${g}", "${ce(t[g])}")`, m);
563
- }), c()), r(`res, ${u} := ${y}.Do(req)`, m), x(), h && (c(), r("defer res.Body.Close()", m), r(`body, ${u} := io.ReadAll(res.Body)`, m), x()), c(), h && r("fmt.Println(string(body))", m), i && (c(), r("}")), a();
558
+ return d && (r("client := http.Client{", m), $ && r(`Timeout: time.Duration(${f} * time.Second),`, m + 1), r("}", m), l()), r(`url := "${o}"`, m), l(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), l(), r(`req, ${u} := http.NewRequest("${n}", url, payload)`, m), l()) : (r(`req, ${u} := http.NewRequest("${n}", url, nil)`, m), l()), x(), Object.keys(t).length && (Object.keys(t).forEach((g) => {
559
+ r(`req.Header.Add("${g}", "${le(t[g])}")`, m);
560
+ }), l()), r(`res, ${u} := ${y}.Do(req)`, m), x(), h && (l(), r("defer res.Body.Close()", m), r(`body, ${u} := io.ReadAll(res.Body)`, m), x()), l(), h && r("fmt.Println(string(body))", m), i && (l(), r("}")), a();
564
561
  }
565
- }, Ia = {
562
+ }, Ua = {
566
563
  info: {
567
564
  key: "go",
568
565
  title: "Go",
@@ -570,10 +567,10 @@ var Na = {
570
567
  cli: "go"
571
568
  },
572
569
  clientsById: {
573
- native: Aa
570
+ native: La
574
571
  }
575
572
  }, Yr = `\r
576
- `, La = {
573
+ `, Fa = {
577
574
  info: {
578
575
  key: "http1.1",
579
576
  title: "HTTP/1.1",
@@ -581,36 +578,36 @@ var Na = {
581
578
  description: "HTTP/1.1 request string in accordance with RFC 7230",
582
579
  extname: null
583
580
  },
584
- convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData: c }, r) => {
581
+ convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: o, allHeaders: s, postData: l }, r) => {
585
582
  const a = {
586
583
  absoluteURI: !1,
587
584
  autoContentLength: !0,
588
585
  autoHost: !0,
589
586
  ...r
590
- }, { blank: i, push: l, join: h } = new V({ indent: "", join: Yr }), f = a.absoluteURI ? n : t.path;
591
- l(`${e} ${f} ${o}`);
587
+ }, { blank: i, push: c, join: h } = new V({ indent: "", join: Yr }), f = a.absoluteURI ? n : t.path;
588
+ c(`${e} ${f} ${o}`);
592
589
  const u = Object.keys(s);
593
590
  if (u.forEach(($) => {
594
591
  const d = $.toLowerCase().replace(/(^|-)(\w)/g, (y) => y.toUpperCase());
595
- l(`${d}: ${s[$]}`);
596
- }), a.autoHost && !u.includes("host") && l(`Host: ${t.host}`), a.autoContentLength && c.text && !u.includes("content-length")) {
597
- const d = new TextEncoder().encode(c.text).length.toString();
598
- l(`Content-Length: ${d}`);
592
+ c(`${d}: ${s[$]}`);
593
+ }), a.autoHost && !u.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !u.includes("content-length")) {
594
+ const d = new TextEncoder().encode(l.text).length.toString();
595
+ c(`Content-Length: ${d}`);
599
596
  }
600
597
  i();
601
- const m = h(), x = c.text || "";
598
+ const m = h(), x = l.text || "";
602
599
  return `${m}${Yr}${x}`;
603
600
  }
604
- }, Ua = {
601
+ }, _a = {
605
602
  info: {
606
603
  key: "http",
607
604
  title: "HTTP",
608
605
  default: "http1.1"
609
606
  },
610
607
  clientsById: {
611
- "http1.1": La
608
+ "http1.1": Fa
612
609
  }
613
- }, Fa = {
610
+ }, Ba = {
614
611
  info: {
615
612
  key: "asynchttp",
616
613
  title: "AsyncHttp",
@@ -619,15 +616,15 @@ var Na = {
619
616
  extname: ".java"
620
617
  },
621
618
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
622
- const c = {
619
+ const l = {
623
620
  indent: " ",
624
621
  ...s
625
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent });
626
- return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((l) => {
627
- a(`.setHeader("${l}", "${ce(n[l])}")`, 1);
622
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent });
623
+ return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(n).forEach((c) => {
624
+ a(`.setHeader("${c}", "${le(n[c])}")`, 1);
628
625
  }), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), r(), a("client.close();"), i();
629
626
  }
630
- }, _a = {
627
+ }, Ha = {
631
628
  info: {
632
629
  key: "nethttp",
633
630
  title: "java.net.http",
@@ -636,12 +633,12 @@ var Na = {
636
633
  extname: ".java"
637
634
  },
638
635
  convert: ({ allHeaders: e, fullUrl: n, method: t, postData: o }, s) => {
639
- const c = {
636
+ const l = {
640
637
  indent: " ",
641
638
  ...s
642
- }, { push: r, join: a } = new V({ indent: c.indent });
639
+ }, { push: r, join: a } = new V({ indent: l.indent });
643
640
  return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${n}"))`, 2), Object.keys(e).forEach((i) => {
644
- r(`.header("${i}", "${ce(e[i])}")`, 2);
641
+ r(`.header("${i}", "${le(e[i])}")`, 2);
645
642
  }), o.text ? r(
646
643
  `.method("${t.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(o.text)}))`,
647
644
  2
@@ -649,7 +646,7 @@ var Na = {
649
646
  "HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
650
647
  ), r("System.out.println(response.body());"), a();
651
648
  }
652
- }, Ba = {
649
+ }, Ma = {
653
650
  info: {
654
651
  key: "okhttp",
655
652
  title: "OkHttp",
@@ -658,15 +655,15 @@ var Na = {
658
655
  extname: ".java"
659
656
  },
660
657
  convert: ({ postData: e, method: n, fullUrl: t, allHeaders: o }, s) => {
661
- const c = {
658
+ const l = {
662
659
  indent: " ",
663
660
  ...s
664
- }, { push: r, blank: a, join: i } = new V({ indent: c.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
665
- return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), l.includes(n.toUpperCase()) ? h.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
666
- r(`.addHeader("${f}", "${ce(o[f])}")`, 1);
661
+ }, { push: r, blank: a, join: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
662
+ return r("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? h.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
663
+ r(`.addHeader("${f}", "${le(o[f])}")`, 1);
667
664
  }), r(".build();", 1), a(), r("Response response = client.newCall(request).execute();"), i();
668
665
  }
669
- }, Ha = {
666
+ }, za = {
670
667
  info: {
671
668
  key: "unirest",
672
669
  title: "Unirest",
@@ -675,27 +672,27 @@ var Na = {
675
672
  extname: ".java"
676
673
  },
677
674
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
678
- const c = {
675
+ const l = {
679
676
  indent: " ",
680
677
  ...s
681
- }, { join: r, push: a } = new V({ indent: c.indent });
682
- return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((l) => {
683
- a(`.header("${l}", "${ce(n[l])}")`, 1);
678
+ }, { join: r, push: a } = new V({ indent: l.indent });
679
+ return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(n).forEach((c) => {
680
+ a(`.header("${c}", "${le(n[c])}")`, 1);
684
681
  }), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), r();
685
682
  }
686
- }, Ma = {
683
+ }, Ga = {
687
684
  info: {
688
685
  key: "java",
689
686
  title: "Java",
690
687
  default: "unirest"
691
688
  },
692
689
  clientsById: {
693
- asynchttp: Fa,
694
- nethttp: _a,
695
- okhttp: Ba,
696
- unirest: Ha
690
+ asynchttp: Ba,
691
+ nethttp: Ha,
692
+ okhttp: Ma,
693
+ unirest: za
697
694
  }
698
- }, za = {
695
+ }, Wa = {
699
696
  info: {
700
697
  key: "axios",
701
698
  title: "Axios",
@@ -704,11 +701,11 @@ var Na = {
704
701
  extname: ".js",
705
702
  installation: "npm install axios --save"
706
703
  },
707
- convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s }, c) => {
704
+ convert: ({ allHeaders: e, method: n, url: t, queryObj: o, postData: s }, l) => {
708
705
  const r = {
709
706
  indent: " ",
710
- ...c
711
- }, { blank: a, push: i, join: l, addPostProcessor: h } = new V({ indent: r.indent });
707
+ ...l
708
+ }, { blank: a, push: i, join: c, addPostProcessor: h } = new V({ indent: r.indent });
712
709
  i("import axios from 'axios';"), a();
713
710
  const f = {
714
711
  method: n,
@@ -737,9 +734,9 @@ var Na = {
737
734
  indent: " ",
738
735
  inlineCharacterLimit: 80
739
736
  }).replace('"[form]"', "form");
740
- return i(`const options = ${u};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), l();
737
+ return i(`const options = ${u};`), a(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
741
738
  }
742
- }, Ga = {
739
+ }, Ja = {
743
740
  info: {
744
741
  key: "fetch",
745
742
  title: "fetch",
@@ -748,19 +745,19 @@ var Na = {
748
745
  extname: ".js"
749
746
  },
750
747
  convert: ({ method: e, allHeaders: n, postData: t, fullUrl: o }, s) => {
751
- const c = {
748
+ const l = {
752
749
  indent: " ",
753
750
  credentials: null,
754
751
  ...s
755
- }, { blank: r, join: a, push: i } = new V({ indent: c.indent }), l = {
752
+ }, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = {
756
753
  method: e
757
754
  };
758
- switch (Object.keys(n).length && (l.headers = n), c.credentials !== null && (l.credentials = c.credentials), t.mimeType) {
755
+ switch (Object.keys(n).length && (c.headers = n), l.credentials !== null && (c.credentials = l.credentials), t.mimeType) {
759
756
  case "application/x-www-form-urlencoded":
760
- l.body = t.paramsObj ? t.paramsObj : t.text;
757
+ c.body = t.paramsObj ? t.paramsObj : t.text;
761
758
  break;
762
759
  case "application/json":
763
- t.jsonObj && (l.body = t.jsonObj);
760
+ t.jsonObj && (c.body = t.jsonObj);
764
761
  break;
765
762
  case "multipart/form-data":
766
763
  if (!t.params)
@@ -771,11 +768,11 @@ var Na = {
771
768
  }), r();
772
769
  break;
773
770
  default:
774
- t.text && (l.body = t.text);
771
+ t.text && (c.body = t.text);
775
772
  }
776
- return l.headers && !Object.keys(l.headers).length && delete l.headers, i(
777
- `const options = ${ue(l, {
778
- indent: c.indent,
773
+ return c.headers && !Object.keys(c.headers).length && delete c.headers, i(
774
+ `const options = ${ue(c, {
775
+ indent: l.indent,
779
776
  inlineCharacterLimit: 80,
780
777
  // The Fetch API body only accepts string parameters, but stringified JSON can be difficult
781
778
  // to read, so we keep the object as a literal and use this transform function to wrap the
@@ -792,7 +789,7 @@ var Na = {
792
789
  })};`
793
790
  ), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${o}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), a();
794
791
  }
795
- }, Wa = {
792
+ }, Va = {
796
793
  info: {
797
794
  key: "jquery",
798
795
  title: "jQuery",
@@ -802,10 +799,10 @@ var Na = {
802
799
  },
803
800
  convert: ({ fullUrl: e, method: n, allHeaders: t, postData: o }, s) => {
804
801
  var f;
805
- const c = {
802
+ const l = {
806
803
  indent: " ",
807
804
  ...s
808
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent }), l = {
805
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent }), c = {
809
806
  async: !0,
810
807
  crossDomain: !0,
811
808
  url: e,
@@ -814,29 +811,29 @@ var Na = {
814
811
  };
815
812
  switch (o.mimeType) {
816
813
  case "application/x-www-form-urlencoded":
817
- l.data = o.paramsObj ? o.paramsObj : o.text;
814
+ c.data = o.paramsObj ? o.paramsObj : o.text;
818
815
  break;
819
816
  case "application/json":
820
- l.processData = !1, l.data = o.text;
817
+ c.processData = !1, c.data = o.text;
821
818
  break;
822
819
  case "multipart/form-data":
823
820
  if (!o.params)
824
821
  break;
825
822
  if (a("const form = new FormData();"), o.params.forEach((u) => {
826
823
  a(`form.append('${u.name}', '${u.value || u.fileName || ""}');`);
827
- }), l.processData = !1, l.contentType = !1, l.mimeType = "multipart/form-data", l.data = "[form]", rt(t, "content-type") && (f = ve(t, "content-type")) != null && f.includes("boundary")) {
824
+ }), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", rt(t, "content-type") && (f = ve(t, "content-type")) != null && f.includes("boundary")) {
828
825
  const u = fe(t, "content-type");
829
- u && delete l.headers[u];
826
+ u && delete c.headers[u];
830
827
  }
831
828
  r();
832
829
  break;
833
830
  default:
834
- o.text && (l.data = o.text);
831
+ o.text && (c.data = o.text);
835
832
  }
836
- const h = ue(l, { indent: c.indent }).replace("'[form]'", "form");
833
+ const h = ue(c, { indent: l.indent }).replace("'[form]'", "form");
837
834
  return a(`const settings = ${h};`), r(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), i();
838
835
  }
839
- }, Ja = {
836
+ }, Da = {
840
837
  info: {
841
838
  key: "xhr",
842
839
  title: "XMLHttpRequest",
@@ -845,17 +842,17 @@ var Na = {
845
842
  extname: ".js"
846
843
  },
847
844
  convert: ({ postData: e, allHeaders: n, method: t, fullUrl: o }, s) => {
848
- var l;
849
- const c = {
845
+ var c;
846
+ const l = {
850
847
  indent: " ",
851
848
  cors: !0,
852
849
  ...s
853
- }, { blank: r, push: a, join: i } = new V({ indent: c.indent });
850
+ }, { blank: r, push: a, join: i } = new V({ indent: l.indent });
854
851
  switch (e.mimeType) {
855
852
  case "application/json":
856
853
  a(
857
854
  `const data = JSON.stringify(${ue(e.jsonObj, {
858
- indent: c.indent
855
+ indent: l.indent
859
856
  })});`
860
857
  ), r();
861
858
  break;
@@ -864,7 +861,7 @@ var Na = {
864
861
  break;
865
862
  if (a("const data = new FormData();"), e.params.forEach((h) => {
866
863
  a(`data.append('${h.name}', '${h.value || h.fileName || ""}');`);
867
- }), rt(n, "content-type") && (l = ve(n, "content-type")) != null && l.includes("boundary")) {
864
+ }), rt(n, "content-type") && (c = ve(n, "content-type")) != null && c.includes("boundary")) {
868
865
  const h = fe(n, "content-type");
869
866
  h && delete n[h];
870
867
  }
@@ -873,23 +870,23 @@ var Na = {
873
870
  default:
874
871
  a(`const data = ${e.text ? `'${e.text}'` : "null"};`), r();
875
872
  }
876
- return a("const xhr = new XMLHttpRequest();"), c.cors && a("xhr.withCredentials = true;"), r(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), r(), a(`xhr.open('${t}', '${o}');`), Object.keys(n).forEach((h) => {
873
+ return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), r(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), r(), a(`xhr.open('${t}', '${o}');`), Object.keys(n).forEach((h) => {
877
874
  a(`xhr.setRequestHeader('${h}', '${ze(n[h])}');`);
878
875
  }), r(), a("xhr.send(data);"), i();
879
876
  }
880
- }, Va = {
877
+ }, Qa = {
881
878
  info: {
882
879
  key: "javascript",
883
880
  title: "JavaScript",
884
881
  default: "xhr"
885
882
  },
886
883
  clientsById: {
887
- xhr: Ja,
888
- axios: za,
889
- fetch: Ga,
890
- jquery: Wa
884
+ xhr: Da,
885
+ axios: Wa,
886
+ fetch: Ja,
887
+ jquery: Va
891
888
  }
892
- }, Da = {
889
+ }, Ka = {
893
890
  info: {
894
891
  key: "native",
895
892
  title: "Native JSON",
@@ -914,8 +911,8 @@ var Na = {
914
911
  if (!e.params)
915
912
  break;
916
913
  const s = {};
917
- e.params.forEach((c) => {
918
- s[c.name] = c.value;
914
+ e.params.forEach((l) => {
915
+ s[l.name] = l.value;
919
916
  }), o = s;
920
917
  break;
921
918
  default:
@@ -923,16 +920,16 @@ var Na = {
923
920
  }
924
921
  return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
925
922
  }
926
- }, Qa = {
923
+ }, Ya = {
927
924
  info: {
928
925
  key: "json",
929
926
  title: "JSON",
930
927
  default: "native"
931
928
  },
932
929
  clientsById: {
933
- native: Da
930
+ native: Ka
934
931
  }
935
- }, Ka = {
932
+ }, Xa = {
936
933
  info: {
937
934
  key: "okhttp",
938
935
  title: "OkHttp",
@@ -941,24 +938,24 @@ var Na = {
941
938
  extname: ".kt"
942
939
  },
943
940
  convert: ({ postData: e, fullUrl: n, method: t, allHeaders: o }, s) => {
944
- const c = {
941
+ const l = {
945
942
  indent: " ",
946
943
  ...s
947
- }, { blank: r, join: a, push: i } = new V({ indent: c.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
948
- return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), l.includes(t.toUpperCase()) ? h.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
949
- i(`.addHeader("${f}", "${ce(o[f])}")`, 1);
944
+ }, { blank: r, join: a, push: i } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], h = ["POST", "PUT", "DELETE", "PATCH"];
945
+ return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? h.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((f) => {
946
+ i(`.addHeader("${f}", "${le(o[f])}")`, 1);
950
947
  }), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), a();
951
948
  }
952
- }, Ya = {
949
+ }, Za = {
953
950
  info: {
954
951
  key: "kotlin",
955
952
  title: "Kotlin",
956
953
  default: "okhttp"
957
954
  },
958
955
  clientsById: {
959
- okhttp: Ka
956
+ okhttp: Xa
960
957
  }
961
- }, Xa = {
958
+ }, ei = {
962
959
  info: {
963
960
  key: "axios",
964
961
  title: "Axios",
@@ -968,10 +965,10 @@ var Na = {
968
965
  installation: "npm install axios --save"
969
966
  },
970
967
  convert: ({ method: e, fullUrl: n, allHeaders: t, postData: o }, s) => {
971
- const c = {
968
+ const l = {
972
969
  indent: " ",
973
970
  ...s
974
- }, { blank: r, join: a, push: i, addPostProcessor: l } = new V({ indent: c.indent });
971
+ }, { blank: r, join: a, push: i, addPostProcessor: c } = new V({ indent: l.indent });
975
972
  i("const axios = require('axios');");
976
973
  const h = {
977
974
  method: e,
@@ -981,7 +978,7 @@ var Na = {
981
978
  case "application/x-www-form-urlencoded":
982
979
  o.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), o.params.forEach((u) => {
983
980
  i(`encodedParams.set('${u.name}', '${u.value}');`);
984
- }), r(), h.data = "encodedParams,", l((u) => u.replace(/'encodedParams,'/, "encodedParams,")));
981
+ }), r(), h.data = "encodedParams,", c((u) => u.replace(/'encodedParams,'/, "encodedParams,")));
985
982
  break;
986
983
  case "application/json":
987
984
  r(), o.jsonObj && (h.data = o.jsonObj);
@@ -992,7 +989,7 @@ var Na = {
992
989
  const f = ue(h, { indent: " ", inlineCharacterLimit: 80 });
993
990
  return i(`const options = ${f};`), r(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), a();
994
991
  }
995
- }, Za = {
992
+ }, ti = {
996
993
  info: {
997
994
  key: "fetch",
998
995
  title: "Fetch",
@@ -1001,22 +998,22 @@ var Na = {
1001
998
  extname: ".cjs",
1002
999
  installation: "npm install node-fetch@2 --save"
1003
1000
  },
1004
- convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s }, c) => {
1001
+ convert: ({ method: e, fullUrl: n, postData: t, headersObj: o, cookies: s }, l) => {
1005
1002
  var $;
1006
1003
  const r = {
1007
1004
  indent: " ",
1008
- ...c
1005
+ ...l
1009
1006
  };
1010
1007
  let a = !1;
1011
- const { blank: i, push: l, join: h, unshift: f } = new V({ indent: r.indent });
1012
- l("const fetch = require('node-fetch');");
1008
+ const { blank: i, push: c, join: h, unshift: f } = new V({ indent: r.indent });
1009
+ c("const fetch = require('node-fetch');");
1013
1010
  const u = n, m = {
1014
1011
  method: e
1015
1012
  };
1016
1013
  switch (Object.keys(o).length && (m.headers = o), t.mimeType) {
1017
1014
  case "application/x-www-form-urlencoded":
1018
- f("const { URLSearchParams } = require('url');"), l("const encodedParams = new URLSearchParams();"), i(), ($ = t.params) == null || $.forEach((y) => {
1019
- l(`encodedParams.set('${y.name}', '${y.value}');`);
1015
+ f("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), ($ = t.params) == null || $.forEach((y) => {
1016
+ c(`encodedParams.set('${y.name}', '${y.value}');`);
1020
1017
  }), m.body = "encodedParams";
1021
1018
  break;
1022
1019
  case "application/json":
@@ -1026,12 +1023,12 @@ var Na = {
1026
1023
  if (!t.params)
1027
1024
  break;
1028
1025
  const d = fe(o, "content-type");
1029
- d && delete o[d], f("const FormData = require('form-data');"), l("const formData = new FormData();"), i(), t.params.forEach((y) => {
1026
+ d && delete o[d], f("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((y) => {
1030
1027
  if (!y.fileName && !y.fileName && !y.contentType) {
1031
- l(`formData.append('${y.name}', '${y.value}');`);
1028
+ c(`formData.append('${y.name}', '${y.value}');`);
1032
1029
  return;
1033
1030
  }
1034
- y.fileName && (a = !0, l(`formData.append('${y.name}', fs.createReadStream('${y.fileName}'));`));
1031
+ y.fileName && (a = !0, c(`formData.append('${y.name}', fs.createReadStream('${y.fileName}'));`));
1035
1032
  });
1036
1033
  break;
1037
1034
  default:
@@ -1041,7 +1038,7 @@ var Na = {
1041
1038
  const d = s.map(({ name: y, value: g }) => `${encodeURIComponent(y)}=${encodeURIComponent(g)}`).join("; ");
1042
1039
  m.headers || (m.headers = {}), m.headers.cookie = d;
1043
1040
  }
1044
- i(), l(`const url = '${u}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1041
+ i(), c(`const url = '${u}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1045
1042
  const x = ue(m, {
1046
1043
  indent: " ",
1047
1044
  inlineCharacterLimit: 80,
@@ -1050,9 +1047,9 @@ var Na = {
1050
1047
  // in a `JSON.stringify` call.
1051
1048
  transform: (d, y, g) => y === "body" && t.mimeType === "application/json" ? `JSON.stringify(${g})` : g
1052
1049
  });
1053
- return l(`const options = ${x};`), i(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (l("options.body = formData;"), i()), l("fetch(url, options)"), l(".then(res => res.json())", 1), l(".then(json => console.log(json))", 1), l(".catch(err => console.error('error:' + err));", 1), h().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1050
+ return c(`const options = ${x};`), i(), a && f("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), h().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1054
1051
  }
1055
- }, ei = {
1052
+ }, ri = {
1056
1053
  info: {
1057
1054
  key: "native",
1058
1055
  title: "HTTP",
@@ -1062,16 +1059,16 @@ var Na = {
1062
1059
  },
1063
1060
  convert: ({ uriObj: e, method: n, allHeaders: t, postData: o }, s = {}) => {
1064
1061
  var f;
1065
- const { indent: c = " " } = s, { blank: r, join: a, push: i, unshift: l } = new V({ indent: c }), h = {
1062
+ const { indent: l = " " } = s, { blank: r, join: a, push: i, unshift: c } = new V({ indent: l }), h = {
1066
1063
  method: n,
1067
1064
  hostname: e.hostname,
1068
1065
  port: e.port,
1069
1066
  path: e.path,
1070
1067
  headers: t
1071
1068
  };
1072
- switch (i(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), i(`const options = ${ue(h, { indent: c })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), o.mimeType) {
1069
+ switch (i(`const http = require('${(f = e.protocol) == null ? void 0 : f.replace(":", "")}');`), r(), i(`const options = ${ue(h, { indent: l })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), o.mimeType) {
1073
1070
  case "application/x-www-form-urlencoded":
1074
- o.paramsObj && (l("const qs = require('querystring');"), i(
1071
+ o.paramsObj && (c("const qs = require('querystring');"), i(
1075
1072
  `req.write(qs.stringify(${ue(o.paramsObj, {
1076
1073
  indent: " ",
1077
1074
  inlineCharacterLimit: 80
@@ -1087,11 +1084,11 @@ var Na = {
1087
1084
  );
1088
1085
  break;
1089
1086
  default:
1090
- o.text && i(`req.write(${ue(o.text, { indent: c })});`);
1087
+ o.text && i(`req.write(${ue(o.text, { indent: l })});`);
1091
1088
  }
1092
1089
  return i("req.end();"), a();
1093
1090
  }
1094
- }, ti = {
1091
+ }, ni = {
1095
1092
  info: {
1096
1093
  key: "request",
1097
1094
  title: "Request",
@@ -1100,14 +1097,14 @@ var Na = {
1100
1097
  extname: ".cjs",
1101
1098
  installation: "npm install request --save"
1102
1099
  },
1103
- convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies: c }, r) => {
1100
+ convert: ({ method: e, url: n, fullUrl: t, postData: o, headersObj: s, cookies: l }, r) => {
1104
1101
  const a = {
1105
1102
  indent: " ",
1106
1103
  ...r
1107
1104
  };
1108
1105
  let i = !1;
1109
- const { push: l, blank: h, join: f, unshift: u, addPostProcessor: m } = new V({ indent: a.indent });
1110
- l("const request = require('request');"), h();
1106
+ const { push: c, blank: h, join: f, unshift: u, addPostProcessor: m } = new V({ indent: a.indent });
1107
+ c("const request = require('request');"), h();
1111
1108
  const x = {
1112
1109
  method: e,
1113
1110
  url: t
@@ -1140,11 +1137,11 @@ var Na = {
1140
1137
  default:
1141
1138
  o.text && (x.body = o.text);
1142
1139
  }
1143
- return c.length && (x.jar = "JAR", l("const jar = request.jar();"), c.forEach(({ name: $, value: d }) => {
1144
- l(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(d)}'), '${n}');`);
1145
- }), h(), m(($) => $.replace(/'JAR'/, "jar"))), i && u("const fs = require('fs');"), l(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), h(), l("request(options, function (error, response, body) {"), l("if (error) throw new Error(error);", 1), h(), l("console.log(body);", 1), l("});"), f();
1140
+ return l.length && (x.jar = "JAR", c("const jar = request.jar();"), l.forEach(({ name: $, value: d }) => {
1141
+ c(`jar.setCookie(request.cookie('${encodeURIComponent($)}=${encodeURIComponent(d)}'), '${n}');`);
1142
+ }), h(), m(($) => $.replace(/'JAR'/, "jar"))), i && u("const fs = require('fs');"), c(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), h(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), h(), c("console.log(body);", 1), c("});"), f();
1146
1143
  }
1147
- }, ri = {
1144
+ }, oi = {
1148
1145
  info: {
1149
1146
  key: "unirest",
1150
1147
  title: "Unirest",
@@ -1152,18 +1149,18 @@ var Na = {
1152
1149
  description: "Lightweight HTTP Request Client Library",
1153
1150
  extname: ".cjs"
1154
1151
  },
1155
- convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj: c }, r) => {
1152
+ convert: ({ method: e, url: n, cookies: t, queryObj: o, postData: s, headersObj: l }, r) => {
1156
1153
  const a = {
1157
1154
  indent: " ",
1158
1155
  ...r
1159
1156
  };
1160
1157
  let i = !1;
1161
- const { addPostProcessor: l, blank: h, join: f, push: u, unshift: m } = new V({
1158
+ const { addPostProcessor: c, blank: h, join: f, push: u, unshift: m } = new V({
1162
1159
  indent: a.indent
1163
1160
  });
1164
1161
  switch (u("const unirest = require('unirest');"), h(), u(`const req = unirest('${e}', '${n}');`), h(), t.length && (u("const CookieJar = unirest.jar();"), t.forEach((x) => {
1165
1162
  u(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
1166
- }), u("req.jar(CookieJar);"), h()), Object.keys(o).length && (u(`req.query(${ue(o, { indent: a.indent })});`), h()), Object.keys(c).length && (u(`req.headers(${ue(c, { indent: a.indent })});`), h()), s.mimeType) {
1163
+ }), u("req.jar(CookieJar);"), h()), Object.keys(o).length && (u(`req.query(${ue(o, { indent: a.indent })});`), h()), Object.keys(l).length && (u(`req.headers(${ue(l, { indent: a.indent })});`), h()), s.mimeType) {
1167
1164
  case "application/x-www-form-urlencoded":
1168
1165
  s.paramsObj && (u(`req.form(${ue(s.paramsObj, { indent: a.indent })});`), h());
1169
1166
  break;
@@ -1176,7 +1173,7 @@ var Na = {
1176
1173
  const x = [];
1177
1174
  s.params.forEach(($) => {
1178
1175
  const d = {};
1179
- $.fileName && !$.value ? (i = !0, d.body = `fs.createReadStream('${$.fileName}')`, l((y) => y.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : $.value && (d.body = $.value), d.body && ($.contentType && (d["content-type"] = $.contentType), x.push(d));
1176
+ $.fileName && !$.value ? (i = !0, d.body = `fs.createReadStream('${$.fileName}')`, c((y) => y.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : $.value && (d.body = $.value), d.body && ($.contentType && (d["content-type"] = $.contentType), x.push(d));
1180
1177
  }), u(`req.multipart(${ue(x, { indent: a.indent })});`), h();
1181
1178
  break;
1182
1179
  }
@@ -1185,7 +1182,7 @@ var Na = {
1185
1182
  }
1186
1183
  return i && m("const fs = require('fs');"), u("req.end(function (res) {"), u("if (res.error) throw new Error(res.error);", 1), h(), u("console.log(res.body);", 1), u("});"), f();
1187
1184
  }
1188
- }, ni = {
1185
+ }, ai = {
1189
1186
  info: {
1190
1187
  key: "node",
1191
1188
  title: "Node.js",
@@ -1193,15 +1190,15 @@ var Na = {
1193
1190
  cli: "node %s"
1194
1191
  },
1195
1192
  clientsById: {
1196
- native: ei,
1197
- request: ti,
1198
- unirest: ri,
1199
- axios: Xa,
1200
- fetch: Za
1193
+ native: ri,
1194
+ request: ni,
1195
+ unirest: oi,
1196
+ axios: ei,
1197
+ fetch: ti
1201
1198
  }
1202
1199
  }, gt = (e, n, t, o) => {
1203
- const s = `${e} *${n} = `, c = hr(t, o ? s.length : void 0);
1204
- return `${s}${c};`;
1200
+ const s = `${e} *${n} = `, l = hr(t, o ? s.length : void 0);
1201
+ return `${s}${l};`;
1205
1202
  }, hr = (e, n) => {
1206
1203
  const t = n === void 0 ? ", " : `,
1207
1204
  ${" ".repeat(n)}`;
@@ -1221,7 +1218,7 @@ var Na = {
1221
1218
  default:
1222
1219
  return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
1223
1220
  }
1224
- }, oi = {
1221
+ }, ii = {
1225
1222
  info: {
1226
1223
  key: "nsurlsession",
1227
1224
  title: "NSURLSession",
@@ -1231,17 +1228,17 @@ var Na = {
1231
1228
  },
1232
1229
  convert: ({ allHeaders: e, postData: n, method: t, fullUrl: o }, s) => {
1233
1230
  var h;
1234
- const c = {
1231
+ const l = {
1235
1232
  indent: " ",
1236
1233
  pretty: !0,
1237
1234
  timeout: 10,
1238
1235
  ...s
1239
- }, { push: r, join: a, blank: i } = new V({ indent: c.indent }), l = {
1236
+ }, { push: r, join: a, blank: i } = new V({ indent: l.indent }), c = {
1240
1237
  hasHeaders: !1,
1241
1238
  hasBody: !1
1242
1239
  };
1243
- if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (l.hasHeaders = !0, i(), r(gt("NSDictionary", "headers", e, c.pretty))), n.text || n.jsonObj || n.params)
1244
- switch (l.hasBody = !0, n.mimeType) {
1240
+ if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(gt("NSDictionary", "headers", e, l.pretty))), n.text || n.jsonObj || n.params)
1241
+ switch (c.hasBody = !0, n.mimeType) {
1245
1242
  case "application/x-www-form-urlencoded":
1246
1243
  if ((h = n.params) != null && h.length) {
1247
1244
  i();
@@ -1252,13 +1249,13 @@ var Na = {
1252
1249
  r(`[postData appendData:[@"&${m}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
1253
1250
  });
1254
1251
  } else
1255
- l.hasBody = !1;
1252
+ c.hasBody = !1;
1256
1253
  break;
1257
1254
  case "application/json":
1258
- n.jsonObj && (r(gt("NSDictionary", "parameters", n.jsonObj, c.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1255
+ n.jsonObj && (r(gt("NSDictionary", "parameters", n.jsonObj, l.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1259
1256
  break;
1260
1257
  case "multipart/form-data":
1261
- r(gt("NSArray", "parameters", n.params || [], c.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1258
+ r(gt("NSArray", "parameters", n.params || [], l.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1262
1259
  '[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
1263
1260
  2
1264
1261
  ), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
@@ -1271,23 +1268,23 @@ var Na = {
1271
1268
  `NSData *postData = [[NSData alloc] initWithData:[@"${n.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
1272
1269
  );
1273
1270
  }
1274
- return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${c.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), l.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), l.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1271
+ return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${l.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1275
1272
  " completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
1276
1273
  ), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
1277
1274
  " NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
1278
1275
  2
1279
1276
  ), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), a();
1280
1277
  }
1281
- }, ai = {
1278
+ }, si = {
1282
1279
  info: {
1283
1280
  key: "objc",
1284
1281
  title: "Objective-C",
1285
1282
  default: "nsurlsession"
1286
1283
  },
1287
1284
  clientsById: {
1288
- nsurlsession: oi
1285
+ nsurlsession: ii
1289
1286
  }
1290
- }, ii = {
1287
+ }, li = {
1291
1288
  info: {
1292
1289
  key: "cohttp",
1293
1290
  title: "CoHTTP",
@@ -1297,30 +1294,30 @@ var Na = {
1297
1294
  installation: "opam install cohttp-lwt-unix cohttp-async"
1298
1295
  },
1299
1296
  convert: ({ fullUrl: e, allHeaders: n, postData: t, method: o }, s) => {
1300
- const c = {
1297
+ const l = {
1301
1298
  indent: " ",
1302
1299
  ...s
1303
- }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join: l } = new V({ indent: c.indent });
1300
+ }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: i, join: c } = new V({ indent: l.indent });
1304
1301
  a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), i(), a(`let uri = Uri.of_string "${e}" in`);
1305
1302
  const h = Object.keys(n);
1306
1303
  h.length === 1 ? a(
1307
- `let headers = Header.add (Header.init ()) "${h[0]}" "${ce(
1304
+ `let headers = Header.add (Header.init ()) "${h[0]}" "${le(
1308
1305
  n[h[0]]
1309
1306
  )}" in`
1310
1307
  ) : h.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), h.forEach((x) => {
1311
- a(`("${x}", "${ce(n[x])}");`, 1);
1308
+ a(`("${x}", "${le(n[x])}");`, 1);
1312
1309
  }), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
1313
1310
  const f = h.length ? "~headers " : "", u = t.text ? "~body " : "", m = r.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
1314
- return a(`Client.call ${f}${u}${m} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), l();
1311
+ return a(`Client.call ${f}${u}${m} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
1315
1312
  }
1316
- }, si = {
1313
+ }, ci = {
1317
1314
  info: {
1318
1315
  key: "ocaml",
1319
1316
  title: "OCaml",
1320
1317
  default: "cohttp"
1321
1318
  },
1322
1319
  clientsById: {
1323
- cohttp: ii
1320
+ cohttp: li
1324
1321
  }
1325
1322
  }, te = (e, n, t) => {
1326
1323
  switch (t = t || "", n = n || "", Object.prototype.toString.call(e)) {
@@ -1381,7 +1378,7 @@ ${t}]`;
1381
1378
  "UNLOCK",
1382
1379
  "UPDATE",
1383
1380
  "VERSION_CONTROL"
1384
- ], ci = {
1381
+ ], ui = {
1385
1382
  info: {
1386
1383
  key: "curl",
1387
1384
  title: "cURL",
@@ -1389,16 +1386,16 @@ ${t}]`;
1389
1386
  description: "PHP with ext-curl",
1390
1387
  extname: ".php"
1391
1388
  },
1392
- convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies: c, headersObj: r }, a = {}) => {
1389
+ convert: ({ uriObj: e, postData: n, fullUrl: t, method: o, httpVersion: s, cookies: l, headersObj: r }, a = {}) => {
1393
1390
  const {
1394
1391
  closingTag: i = !1,
1395
- indent: l = " ",
1392
+ indent: c = " ",
1396
1393
  maxRedirects: h = 10,
1397
1394
  namedErrors: f = !1,
1398
1395
  noTags: u = !1,
1399
1396
  shortTags: m = !1,
1400
1397
  timeout: x = 30
1401
- } = a, { push: $, blank: d, join: y } = new V({ indent: l });
1398
+ } = a, { push: $, blank: d, join: y } = new V({ indent: c });
1402
1399
  u || ($(m ? "<?" : "<?php"), d()), $("$curl = curl_init();"), d();
1403
1400
  const g = [
1404
1401
  {
@@ -1444,22 +1441,22 @@ ${t}]`;
1444
1441
  {
1445
1442
  escape: !n.jsonObj,
1446
1443
  name: "CURLOPT_POSTFIELDS",
1447
- value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, l.repeat(2), l)})` : n.text : void 0
1444
+ value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, c.repeat(2), c)})` : n.text : void 0
1448
1445
  }
1449
1446
  ];
1450
1447
  $("curl_setopt_array($curl, [");
1451
- const w = new V({ indent: l, join: `
1452
- ${l}` });
1448
+ const w = new V({ indent: c, join: `
1449
+ ${c}` });
1453
1450
  g.forEach(({ value: O, name: b, escape: q }) => {
1454
1451
  O != null && w.push(`${b} => ${q ? JSON.stringify(O) : O},`);
1455
1452
  });
1456
- const T = c.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1453
+ const T = l.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1457
1454
  T.length && w.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
1458
- const p = Object.keys(r).sort().map((O) => `"${O}: ${ce(r[O])}"`);
1455
+ const p = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
1459
1456
  return p.length && (w.push("CURLOPT_HTTPHEADER => ["), w.push(p.join(`,
1460
- ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), d(), $("curl_close($curl);"), d(), $("if ($err) {"), $(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !u && i && (d(), $("?>")), y();
1457
+ ${c}${c}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = curl_exec($curl);"), $("$err = curl_error($curl);"), d(), $("curl_close($curl);"), d(), $("if ($err) {"), $(f ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), $("} else {"), $("echo $response;", 1), $("}"), !u && i && (d(), $("?>")), y();
1461
1458
  }
1462
- }, li = {
1459
+ }, fi = {
1463
1460
  info: {
1464
1461
  key: "guzzle",
1465
1462
  title: "Guzzle",
@@ -1468,15 +1465,15 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1468
1465
  extname: ".php",
1469
1466
  installation: "composer require guzzlehttp/guzzle"
1470
1467
  },
1471
- convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s }, c) => {
1468
+ convert: ({ postData: e, fullUrl: n, method: t, cookies: o, headersObj: s }, l) => {
1472
1469
  var $;
1473
1470
  const r = {
1474
1471
  closingTag: !1,
1475
1472
  indent: " ",
1476
1473
  noTags: !1,
1477
1474
  shortTags: !1,
1478
- ...c
1479
- }, { push: a, blank: i, join: l } = new V({ indent: r.indent }), { code: h, push: f, join: u } = new V({ indent: r.indent });
1475
+ ...l
1476
+ }, { push: a, blank: i, join: c } = new V({ indent: r.indent }), { code: h, push: f, join: u } = new V({ indent: r.indent });
1480
1477
  switch (r.noTags || a(r.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), i(), e.mimeType) {
1481
1478
  case "application/x-www-form-urlencoded":
1482
1479
  f(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
@@ -1508,9 +1505,9 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1508
1505
  return `${r.indent}${r.indent}'${d}' => '${ze(s[d])}',`;
1509
1506
  }), x = o.map((d) => `${encodeURIComponent(d.name)}=${encodeURIComponent(d.value)}`).join("; ");
1510
1507
  return x.length && m.push(`${r.indent}${r.indent}'cookie' => '${ze(x)}',`), m.length && (f("'headers' => [", 1), f(m.join(`
1511
- `)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), h.length ? (a(`$response = $client->request('${t}', '${n}', [`), a(u()), a("]);")) : a(`$response = $client->request('${t}', '${n}');`), i(), a("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), a("?>")), l();
1508
+ `)), f("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), i(), h.length ? (a(`$response = $client->request('${t}', '${n}', [`), a(u()), a("]);")) : a(`$response = $client->request('${t}', '${n}');`), i(), a("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), a("?>")), c();
1512
1509
  }
1513
- }, ui = {
1510
+ }, pi = {
1514
1511
  info: {
1515
1512
  key: "http1",
1516
1513
  title: "HTTP v1",
@@ -1518,9 +1515,9 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1518
1515
  description: "PHP with pecl/http v1",
1519
1516
  extname: ".php"
1520
1517
  },
1521
- convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj: c }, r = {}) => {
1522
- const { closingTag: a = !1, indent: i = " ", noTags: l = !1, shortTags: h = !1 } = r, { push: f, blank: u, join: m } = new V({ indent: i });
1523
- switch (l || (f(h ? "<?" : "<?php"), u()), Xr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(n)});`), Xr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), u(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, i)});`), u()), Object.keys(s).length && (f(`$request->setHeaders(${te(s, i)});`), u()), Object.keys(c).length && (f(`$request->setCookies(${te(c, i)});`), u()), t.mimeType) {
1518
+ convert: ({ method: e, url: n, postData: t, queryObj: o, headersObj: s, cookiesObj: l }, r = {}) => {
1519
+ const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: h = !1 } = r, { push: f, blank: u, join: m } = new V({ indent: i });
1520
+ switch (c || (f(h ? "<?" : "<?php"), u()), Xr.includes(e.toUpperCase()) || f(`HttpRequest::methodRegister('${e}');`), f("$request = new HttpRequest();"), f(`$request->setUrl(${te(n)});`), Xr.includes(e.toUpperCase()) ? f(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : f(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), u(), Object.keys(o).length && (f(`$request->setQueryData(${te(o, i)});`), u()), Object.keys(s).length && (f(`$request->setHeaders(${te(s, i)});`), u()), Object.keys(l).length && (f(`$request->setCookies(${te(l, i)});`), u()), t.mimeType) {
1524
1521
  case "application/x-www-form-urlencoded":
1525
1522
  f(`$request->setContentType(${te(t.mimeType)});`), f(`$request->setPostFields(${te(t.paramsObj, i)});`), u();
1526
1523
  break;
@@ -1530,9 +1527,9 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1530
1527
  default:
1531
1528
  t.text && (f(`$request->setBody(${te(t.text)});`), u());
1532
1529
  }
1533
- return f("try {"), f("$response = $request->send();", 1), u(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !l && a && (u(), f("?>")), m();
1530
+ return f("try {"), f("$response = $request->send();", 1), u(), f("echo $response->getBody();", 1), f("} catch (HttpException $ex) {"), f("echo $ex;", 1), f("}"), !c && a && (u(), f("?>")), m();
1534
1531
  }
1535
- }, fi = {
1532
+ }, di = {
1536
1533
  info: {
1537
1534
  key: "http2",
1538
1535
  title: "HTTP v2",
@@ -1540,11 +1537,11 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1540
1537
  description: "PHP with pecl/http v2",
1541
1538
  extname: ".php"
1542
1539
  },
1543
- convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url: c }, r = {}) => {
1540
+ convert: ({ postData: e, headersObj: n, method: t, queryObj: o, cookiesObj: s, url: l }, r = {}) => {
1544
1541
  var $;
1545
- const { closingTag: a = !1, indent: i = " ", noTags: l = !1, shortTags: h = !1 } = r, { push: f, blank: u, join: m } = new V({ indent: i });
1542
+ const { closingTag: a = !1, indent: i = " ", noTags: c = !1, shortTags: h = !1 } = r, { push: f, blank: u, join: m } = new V({ indent: i });
1546
1543
  let x = !1;
1547
- switch (l || (f(h ? "<?" : "<?php"), u()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), u(), e.mimeType) {
1544
+ switch (c || (f(h ? "<?" : "<?php"), u()), f("$client = new http\\Client;"), f("$request = new http\\Client\\Request;"), u(), e.mimeType) {
1548
1545
  case "application/x-www-form-urlencoded":
1549
1546
  f("$body = new http\\Message\\Body;"), f(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), u(), x = !0;
1550
1547
  break;
@@ -1578,9 +1575,9 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1578
1575
  default:
1579
1576
  e.text && (f("$body = new http\\Message\\Body;"), f(`$body->append(${te(e.text)});`), u(), x = !0);
1580
1577
  }
1581
- return f(`$request->setRequestUrl(${te(c)});`), f(`$request->setRequestMethod(${te(t)});`), x && (f("$request->setBody($body);"), u()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), u()), Object.keys(n).length && (f(`$request->setHeaders(${te(n, i)});`), u()), Object.keys(s).length && (u(), f(`$client->setCookies(${te(s, i)});`), u()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), u(), f("echo $response->getBody();"), !l && a && (u(), f("?>")), m();
1578
+ return f(`$request->setRequestUrl(${te(l)});`), f(`$request->setRequestMethod(${te(t)});`), x && (f("$request->setBody($body);"), u()), Object.keys(o).length && (f(`$request->setQuery(new http\\QueryString(${te(o, i)}));`), u()), Object.keys(n).length && (f(`$request->setHeaders(${te(n, i)});`), u()), Object.keys(s).length && (u(), f(`$client->setCookies(${te(s, i)});`), u()), f("$client->enqueue($request)->send();"), f("$response = $client->getResponse();"), u(), f("echo $response->getBody();"), !c && a && (u(), f("?>")), m();
1582
1579
  }
1583
- }, pi = {
1580
+ }, hi = {
1584
1581
  info: {
1585
1582
  key: "php",
1586
1583
  title: "PHP",
@@ -1588,24 +1585,24 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1588
1585
  cli: "php %s"
1589
1586
  },
1590
1587
  clientsById: {
1591
- curl: ci,
1592
- guzzle: li,
1593
- http1: ui,
1594
- http2: fi
1588
+ curl: ui,
1589
+ guzzle: fi,
1590
+ http1: pi,
1591
+ http2: di
1595
1592
  }
1596
- }, lo = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: c, fullUrl: r, postData: a, allHeaders: i }) => {
1597
- const { push: l, join: h } = new V();
1593
+ }, co = (e) => ({ method: t, headersObj: o, cookies: s, uriObj: l, fullUrl: r, postData: a, allHeaders: i }) => {
1594
+ const { push: c, join: h } = new V();
1598
1595
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
1599
1596
  return "Method not supported";
1600
1597
  const u = [], m = Object.keys(o);
1601
- return m.length && (l("$headers=@{}"), m.forEach((x) => {
1602
- x !== "connection" && l(`$headers.Add("${x}", "${Me(o[x], { escapeChar: "`" })}")`);
1603
- }), u.push("-Headers $headers")), s.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((x) => {
1604
- l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${x.name}'`), l(`$cookie.Value = '${x.value}'`), l(`$cookie.Domain = '${c.host}'`), l("$session.Cookies.Add($cookie)");
1598
+ return m.length && (c("$headers=@{}"), m.forEach((x) => {
1599
+ x !== "connection" && c(`$headers.Add("${x}", "${Me(o[x], { escapeChar: "`" })}")`);
1600
+ }), u.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((x) => {
1601
+ c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${l.host}'`), c("$session.Cookies.Add($cookie)");
1605
1602
  }), u.push("-WebSession $session")), a.text && (u.push(
1606
1603
  `-ContentType '${Me(ve(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
1607
- ), u.push(`-Body '${a.text}'`)), l(`$response = ${e} -Uri '${r}' -Method ${t} ${u.join(" ")}`.trim()), h();
1608
- }, di = {
1604
+ ), u.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${u.join(" ")}`.trim()), h();
1605
+ }, yi = {
1609
1606
  info: {
1610
1607
  key: "restmethod",
1611
1608
  title: "Invoke-RestMethod",
@@ -1613,8 +1610,8 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1613
1610
  description: "Powershell Invoke-RestMethod client",
1614
1611
  extname: ".ps1"
1615
1612
  },
1616
- convert: lo("Invoke-RestMethod")
1617
- }, hi = {
1613
+ convert: co("Invoke-RestMethod")
1614
+ }, mi = {
1618
1615
  info: {
1619
1616
  key: "webrequest",
1620
1617
  title: "Invoke-WebRequest",
@@ -1622,24 +1619,24 @@ ${l}${l}`), 1), w.push("],")), $(w.join(), 1), $("]);"), d(), $("$response = cur
1622
1619
  description: "Powershell Invoke-WebRequest client",
1623
1620
  extname: ".ps1"
1624
1621
  },
1625
- convert: lo("Invoke-WebRequest")
1626
- }, yi = {
1622
+ convert: co("Invoke-WebRequest")
1623
+ }, gi = {
1627
1624
  info: {
1628
1625
  key: "powershell",
1629
1626
  title: "Powershell",
1630
1627
  default: "webrequest"
1631
1628
  },
1632
1629
  clientsById: {
1633
- webrequest: hi,
1634
- restmethod: di
1630
+ webrequest: mi,
1631
+ restmethod: yi
1635
1632
  }
1636
1633
  };
1637
1634
  function Zr(e, n, t, o, s) {
1638
- const c = o.repeat(s), r = o.repeat(s - 1), a = t ? `,
1639
- ${c}` : ", ", i = e === "object" ? "{" : "[", l = e === "object" ? "}" : "]";
1635
+ const l = o.repeat(s), r = o.repeat(s - 1), a = t ? `,
1636
+ ${l}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
1640
1637
  return t ? `${i}
1641
- ${c}${n.join(a)}
1642
- ${r}${l}` : e === "object" && n.length > 0 ? `${i} ${n.join(a)} ${l}` : `${i}${n.join(a)}${l}`;
1638
+ ${l}${n.join(a)}
1639
+ ${r}${c}` : e === "object" && n.length > 0 ? `${i} ${n.join(a)} ${c}` : `${i}${n.join(a)}${c}`;
1643
1640
  }
1644
1641
  var Le = (e, n, t) => {
1645
1642
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
@@ -1647,7 +1644,7 @@ var Le = (e, n, t) => {
1647
1644
  return e;
1648
1645
  case "[object Array]": {
1649
1646
  let o = !1;
1650
- const s = e.map((c) => (Object.prototype.toString.call(c) === "[object Object]" && (o = Object.keys(c).length > 1), Le(c, n, t)));
1647
+ const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), Le(l, n, t)));
1651
1648
  return Zr("array", s, o, n.indent, t);
1652
1649
  }
1653
1650
  case "[object Object]": {
@@ -1663,7 +1660,7 @@ var Le = (e, n, t) => {
1663
1660
  default:
1664
1661
  return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
1665
1662
  }
1666
- }, mi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], gi = {
1663
+ }, vi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], bi = {
1667
1664
  info: {
1668
1665
  key: "requests",
1669
1666
  title: "Requests",
@@ -1673,11 +1670,11 @@ var Le = (e, n, t) => {
1673
1670
  installation: "python -m pip install requests"
1674
1671
  },
1675
1672
  convert: ({ fullUrl: e, postData: n, allHeaders: t, method: o }, s) => {
1676
- const c = {
1673
+ const l = {
1677
1674
  indent: " ",
1678
1675
  pretty: !0,
1679
1676
  ...s
1680
- }, { push: r, blank: a, join: i, addPostProcessor: l } = new V({ indent: c.indent });
1677
+ }, { push: r, blank: a, join: i, addPostProcessor: c } = new V({ indent: l.indent });
1681
1678
  r("import requests"), a(), r(`url = "${e}"`), a();
1682
1679
  const h = t;
1683
1680
  let f = {};
@@ -1685,7 +1682,7 @@ var Le = (e, n, t) => {
1685
1682
  let m = !1, x = !1, $ = !1;
1686
1683
  switch (n.mimeType) {
1687
1684
  case "application/json":
1688
- n.jsonObj && (r(`payload = ${Le(n.jsonObj, c)}`), $ = !0, x = !0);
1685
+ n.jsonObj && (r(`payload = ${Le(n.jsonObj, l)}`), $ = !0, x = !0);
1689
1686
  break;
1690
1687
  case "multipart/form-data":
1691
1688
  if (!n.params)
@@ -1693,20 +1690,20 @@ var Le = (e, n, t) => {
1693
1690
  if (f = {}, n.params.forEach((g) => {
1694
1691
  g.fileName ? (g.contentType ? u[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'), '${g.contentType}')` : u[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'))`, m = !0) : (f[g.name] = g.value, x = !0);
1695
1692
  }), m) {
1696
- r(`files = ${Le(u, c)}`), x && r(`payload = ${Le(f, c)}`);
1693
+ r(`files = ${Le(u, l)}`), x && r(`payload = ${Le(f, l)}`);
1697
1694
  const g = fe(h, "content-type");
1698
1695
  g && delete h[g];
1699
1696
  } else {
1700
1697
  const g = JSON.stringify(n.text);
1701
1698
  g && (r(`payload = ${g}`), x = !0);
1702
1699
  }
1703
- l(
1700
+ c(
1704
1701
  (g) => g.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
1705
1702
  );
1706
1703
  break;
1707
1704
  default: {
1708
1705
  if (n.mimeType === "application/x-www-form-urlencoded" && n.paramsObj) {
1709
- r(`payload = ${Le(n.paramsObj, c)}`), x = !0;
1706
+ r(`payload = ${Le(n.paramsObj, l)}`), x = !0;
1710
1707
  break;
1711
1708
  }
1712
1709
  const g = JSON.stringify(n.text);
@@ -1718,18 +1715,18 @@ var Le = (e, n, t) => {
1718
1715
  a();
1719
1716
  else if (d === 1)
1720
1717
  Object.keys(h).forEach((g) => {
1721
- r(`headers = {"${g}": "${ce(h[g])}"}`), a();
1718
+ r(`headers = {"${g}": "${le(h[g])}"}`), a();
1722
1719
  });
1723
1720
  else if (d > 1) {
1724
1721
  let g = 1;
1725
1722
  r("headers = {"), Object.keys(h).forEach((w) => {
1726
- r(g !== d ? `"${w}": "${ce(h[w])}",` : `"${w}": "${ce(h[w])}"`, 1), g += 1;
1723
+ r(g !== d ? `"${w}": "${le(h[w])}",` : `"${w}": "${le(h[w])}"`, 1), g += 1;
1727
1724
  }), r("}"), a();
1728
1725
  }
1729
- let y = mi.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
1726
+ let y = vi.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
1730
1727
  return x && ($ ? y += ", json=payload" : y += ", data=payload"), m && (y += ", files=files"), d > 0 && (y += ", headers=headers"), y += ")", r(y), a(), r("print(response.text)"), i();
1731
1728
  }
1732
- }, vi = {
1729
+ }, xi = {
1733
1730
  info: {
1734
1731
  key: "python",
1735
1732
  title: "Python",
@@ -1737,9 +1734,9 @@ var Le = (e, n, t) => {
1737
1734
  cli: "python3 %s"
1738
1735
  },
1739
1736
  clientsById: {
1740
- requests: gi
1737
+ requests: bi
1741
1738
  }
1742
- }, bi = {
1739
+ }, $i = {
1743
1740
  info: {
1744
1741
  key: "httr",
1745
1742
  title: "httr",
@@ -1747,14 +1744,14 @@ var Le = (e, n, t) => {
1747
1744
  description: "httr: Tools for Working with URLs and HTTP",
1748
1745
  extname: ".r"
1749
1746
  },
1750
- convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method: c }) => {
1747
+ convert: ({ url: e, queryObj: n, queryString: t, postData: o, allHeaders: s, method: l }) => {
1751
1748
  const { push: r, blank: a, join: i } = new V();
1752
1749
  r("library(httr)"), a(), r(`url <- "${e}"`), a();
1753
- const l = n;
1750
+ const c = n;
1754
1751
  delete n.key;
1755
- const h = Object.keys(l).length;
1756
- t.length === 1 ? (r(`queryString <- list(${Object.keys(l)} = "${Object.values(l).toString()}")`), a()) : t.length > 1 && (r("queryString <- list("), Object.keys(l).forEach((p, O) => {
1757
- O !== h - 1 ? r(` ${p} = "${l[p].toString()}",`) : r(` ${p} = "${l[p].toString()}"`);
1752
+ const h = Object.keys(c).length;
1753
+ t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((p, O) => {
1754
+ O !== h - 1 ? r(` ${p} = "${c[p].toString()}",`) : r(` ${p} = "${c[p].toString()}"`);
1758
1755
  }), r(")"), a());
1759
1756
  const f = JSON.stringify(o.text);
1760
1757
  if (f && (r(`payload <- ${f}`), a()), o.text || o.jsonObj || o.params)
@@ -1772,22 +1769,22 @@ var Le = (e, n, t) => {
1772
1769
  r('encode <- "raw"'), a();
1773
1770
  break;
1774
1771
  }
1775
- const u = ve(s, "cookie"), m = ve(s, "accept"), x = u ? `set_cookies(\`${String(u).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, $ = m ? `accept("${ce(m)}")` : void 0, d = `content_type("${ce(o.mimeType)}")`, y = Object.entries(s).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, O]) => `'${p}' = '${ze(O)}'`).join(", "), g = y ? `add_headers(${y})` : void 0;
1776
- let w = `response <- VERB("${c}", url`;
1772
+ const u = ve(s, "cookie"), m = ve(s, "accept"), x = u ? `set_cookies(\`${String(u).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, $ = m ? `accept("${le(m)}")` : void 0, d = `content_type("${le(o.mimeType)}")`, y = Object.entries(s).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, O]) => `'${p}' = '${ze(O)}'`).join(", "), g = y ? `add_headers(${y})` : void 0;
1773
+ let w = `response <- VERB("${l}", url`;
1777
1774
  f && (w += ", body = payload"), t.length && (w += ", query = queryString");
1778
1775
  const T = [g, d, $, x].filter((p) => !!p).join(", ");
1779
1776
  return T && (w += `, ${T}`), (o.text || o.jsonObj || o.params) && (w += ", encode = encode"), w += ")", r(w), a(), r('content(response, "text")'), i();
1780
1777
  }
1781
- }, xi = {
1778
+ }, ji = {
1782
1779
  info: {
1783
1780
  key: "r",
1784
1781
  title: "R",
1785
1782
  default: "httr"
1786
1783
  },
1787
1784
  clientsById: {
1788
- httr: bi
1785
+ httr: $i
1789
1786
  }
1790
- }, $i = {
1787
+ }, wi = {
1791
1788
  info: {
1792
1789
  key: "native",
1793
1790
  title: "net::http",
@@ -1796,9 +1793,9 @@ var Le = (e, n, t) => {
1796
1793
  extname: ".rb"
1797
1794
  },
1798
1795
  convert: ({ uriObj: e, method: n, fullUrl: t, postData: o, allHeaders: s }) => {
1799
- const { push: c, blank: r, join: a } = new V();
1800
- c("require 'uri'"), c("require 'net/http'"), r();
1801
- const i = n.toUpperCase(), l = [
1796
+ const { push: l, blank: r, join: a } = new V();
1797
+ l("require 'uri'"), l("require 'net/http'"), r();
1798
+ const i = n.toUpperCase(), c = [
1802
1799
  "GET",
1803
1800
  "POST",
1804
1801
  "HEAD",
@@ -1812,22 +1809,22 @@ var Le = (e, n, t) => {
1812
1809
  "MOVE",
1813
1810
  "TRACE"
1814
1811
  ], h = i.charAt(0) + i.substring(1).toLowerCase();
1815
- l.includes(i) || (c(`class Net::HTTP::${h} < Net::HTTPRequest`), c(` METHOD = '${i.toUpperCase()}'`), c(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), c(" RESPONSE_HAS_BODY = true"), c("end"), r()), c(`url = URI("${t}")`), r(), c("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && c("http.use_ssl = true"), r(), c(`request = Net::HTTP::${h}.new(url)`);
1812
+ c.includes(i) || (l(`class Net::HTTP::${h} < Net::HTTPRequest`), l(` METHOD = '${i.toUpperCase()}'`), l(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), l(" RESPONSE_HAS_BODY = true"), l("end"), r()), l(`url = URI("${t}")`), r(), l("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && l("http.use_ssl = true"), r(), l(`request = Net::HTTP::${h}.new(url)`);
1816
1813
  const f = Object.keys(s);
1817
1814
  return f.length && f.forEach((u) => {
1818
- c(`request["${u}"] = '${ze(s[u])}'`);
1819
- }), o.text && c(`request.body = ${JSON.stringify(o.text)}`), r(), c("response = http.request(request)"), c("puts response.read_body"), a();
1815
+ l(`request["${u}"] = '${ze(s[u])}'`);
1816
+ }), o.text && l(`request.body = ${JSON.stringify(o.text)}`), r(), l("response = http.request(request)"), l("puts response.read_body"), a();
1820
1817
  }
1821
- }, ji = {
1818
+ }, Si = {
1822
1819
  info: {
1823
1820
  key: "ruby",
1824
1821
  title: "Ruby",
1825
1822
  default: "native"
1826
1823
  },
1827
1824
  clientsById: {
1828
- native: $i
1825
+ native: wi
1829
1826
  }
1830
- }, le = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, wi = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Si = {
1827
+ }, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Oi = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ti = {
1831
1828
  "http1.0": "0",
1832
1829
  "url ": "",
1833
1830
  cookie: "b",
@@ -1837,13 +1834,13 @@ var Le = (e, n, t) => {
1837
1834
  header: "H",
1838
1835
  insecure: "k",
1839
1836
  request: "X"
1840
- }, Oi = (e) => (n) => {
1837
+ }, Pi = (e) => (n) => {
1841
1838
  if (e) {
1842
- const t = Si[n];
1839
+ const t = Ti[n];
1843
1840
  return t ? `-${t}` : "";
1844
1841
  }
1845
1842
  return `--${n}`;
1846
- }, Ti = {
1843
+ }, Ci = {
1847
1844
  info: {
1848
1845
  key: "curl",
1849
1846
  title: "cURL",
@@ -1851,15 +1848,15 @@ var Le = (e, n, t) => {
1851
1848
  description: "cURL is a command line tool and library for transferring data with URL syntax",
1852
1849
  extname: ".sh"
1853
1850
  },
1854
- convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData: c }, r = {}) => {
1851
+ convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: o, allHeaders: s, postData: l }, r = {}) => {
1855
1852
  var d;
1856
- const { indent: a = " ", short: i = !1, binary: l = !1, globOff: h = !1 } = r, f = " ", { push: u, join: m } = new V({
1853
+ const { indent: a = " ", short: i = !1, binary: c = !1, globOff: h = !1 } = r, f = " ", { push: u, join: m } = new V({
1857
1854
  ...typeof a == "string" ? { indent: a } : {},
1858
1855
  join: a !== !1 ? ` \\
1859
1856
  ${a}` : " "
1860
- }), x = Oi(i);
1861
- let $ = le(e);
1862
- if (u(`curl ${x("request")} ${n}`), h && ($ = unescape($), u(x("globoff"))), u(`${x("url ")}${$}`), t === "HTTP/1.0" && u(x("http1.0")), ve(s, "accept-encoding") && u("--compressed"), c.mimeType === "multipart/form-data") {
1857
+ }), x = Pi(i);
1858
+ let $ = ce(e);
1859
+ if (u(`curl ${x("request")} ${n}`), h && ($ = unescape($), u(x("globoff"))), u(`${x("url ")}${$}`), t === "HTTP/1.0" && u(x("http1.0")), ve(s, "accept-encoding") && u("--compressed"), l.mimeType === "multipart/form-data") {
1863
1860
  const y = fe(o, "content-type");
1864
1861
  if (y) {
1865
1862
  const g = o[y];
@@ -1871,29 +1868,29 @@ ${a}` : " "
1871
1868
  }
1872
1869
  switch (Object.keys(o).sort().forEach((y) => {
1873
1870
  const g = `${y}: ${o[y]}`;
1874
- u(`${x("header")} ${le(g)}`);
1875
- }), s.cookie && u(`${x("cookie")} ${le(s.cookie)}`), c.mimeType) {
1871
+ u(`${x("header")} ${ce(g)}`);
1872
+ }), s.cookie && u(`${x("cookie")} ${ce(s.cookie)}`), l.mimeType) {
1876
1873
  case "multipart/form-data":
1877
- (d = c.params) == null || d.forEach((g) => {
1874
+ (d = l.params) == null || d.forEach((g) => {
1878
1875
  let w = "";
1879
- g.fileName ? w = `${g.name}='@${g.fileName}'` : w = le(`${g.name}=${g.value}`), u(`${x("form")} ${w}`);
1876
+ g.fileName ? w = `${g.name}='@${g.fileName}'` : w = ce(`${g.name}=${g.value}`), u(`${x("form")} ${w}`);
1880
1877
  });
1881
1878
  break;
1882
1879
  case "application/x-www-form-urlencoded":
1883
- c.params ? c.params.forEach((g) => {
1884
- const w = g.name, T = encodeURIComponent(g.name), p = T !== w, O = p ? T : w, b = l ? "--data-binary" : p ? "--data-urlencode" : x("data");
1885
- u(`${b} ${le(`${O}=${g.value}`)}`);
1886
- }) : u(`${l ? "--data-binary" : x("data")} ${le(c.text)}`);
1880
+ l.params ? l.params.forEach((g) => {
1881
+ const w = g.name, T = encodeURIComponent(g.name), p = T !== w, O = p ? T : w, b = c ? "--data-binary" : p ? "--data-urlencode" : x("data");
1882
+ u(`${b} ${ce(`${O}=${g.value}`)}`);
1883
+ }) : u(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
1887
1884
  break;
1888
1885
  default:
1889
- if (!c.text)
1886
+ if (!l.text)
1890
1887
  break;
1891
1888
  let y = !1;
1892
- if (Oa(c.mimeType) && c.text.length > 20)
1889
+ if (Pa(l.mimeType) && l.text.length > 20)
1893
1890
  try {
1894
- const g = JSON.parse(c.text);
1895
- y = !0, c.text.indexOf("'") > 0 ? u(
1896
- `${l ? "--data-binary" : x("data")} @- <<EOF
1891
+ const g = JSON.parse(l.text);
1892
+ y = !0, l.text.indexOf("'") > 0 ? u(
1893
+ `${c ? "--data-binary" : x("data")} @- <<EOF
1897
1894
  ${JSON.stringify(
1898
1895
  g,
1899
1896
  null,
@@ -1901,17 +1898,17 @@ ${JSON.stringify(
1901
1898
  )}
1902
1899
  EOF`
1903
1900
  ) : u(
1904
- `${l ? "--data-binary" : x("data")} '
1901
+ `${c ? "--data-binary" : x("data")} '
1905
1902
  ${JSON.stringify(g, null, f)}
1906
1903
  '`
1907
1904
  );
1908
1905
  } catch {
1909
1906
  }
1910
- y || u(`${l ? "--data-binary" : x("data")} ${le(c.text)}`);
1907
+ y || u(`${c ? "--data-binary" : x("data")} ${ce(l.text)}`);
1911
1908
  }
1912
1909
  return m();
1913
1910
  }
1914
- }, Pi = {
1911
+ }, Ri = {
1915
1912
  info: {
1916
1913
  key: "httpie",
1917
1914
  title: "HTTPie",
@@ -1920,7 +1917,7 @@ ${JSON.stringify(g, null, f)}
1920
1917
  extname: ".sh",
1921
1918
  installation: "brew install httpie"
1922
1919
  },
1923
- convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url: c }, r) => {
1920
+ convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: o, method: s, url: l }, r) => {
1924
1921
  const a = {
1925
1922
  body: !1,
1926
1923
  cert: !1,
@@ -1935,7 +1932,7 @@ ${JSON.stringify(g, null, f)}
1935
1932
  verbose: !1,
1936
1933
  verify: !1,
1937
1934
  ...r
1938
- }, { push: i, join: l, unshift: h } = new V({
1935
+ }, { push: i, join: c, unshift: h } = new V({
1939
1936
  indent: a.indent,
1940
1937
  // @ts-expect-error SEEMS LEGIT
1941
1938
  join: a.indent !== !1 ? ` \\
@@ -1946,21 +1943,21 @@ ${a.indent}` : " "
1946
1943
  a.headers && u.push(a.short ? "-h" : "--headers"), a.body && u.push(a.short ? "-b" : "--body"), a.verbose && u.push(a.short ? "-v" : "--verbose"), a.print && u.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && u.push(`--verify=${a.verify}`), a.cert && u.push(`--cert=${a.cert}`), a.pretty && u.push(`--pretty=${a.pretty}`), a.style && u.push(`--style=${a.style}`), a.timeout && u.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((x) => {
1947
1944
  const $ = t[x];
1948
1945
  Array.isArray($) ? $.forEach((d) => {
1949
- i(`${x}==${le(d)}`);
1950
- }) : i(`${x}==${le($)}`);
1946
+ i(`${x}==${ce(d)}`);
1947
+ }) : i(`${x}==${ce($)}`);
1951
1948
  }), Object.keys(e).sort().forEach((x) => {
1952
- i(`${x}:${le(e[x])}`);
1949
+ i(`${x}:${ce(e[x])}`);
1953
1950
  }), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (u.push(a.short ? "-f" : "--form"), n.params.forEach((x) => {
1954
- i(`${x.name}=${le(x.value)}`);
1951
+ i(`${x.name}=${ce(x.value)}`);
1955
1952
  })) : f = !0;
1956
1953
  const m = u.length ? `${u.join(" ")} ` : "";
1957
- if (c = le(a.queryParams ? c : o), h(`http ${m}${s} ${c}`), f && n.text) {
1958
- const x = le(n.text);
1954
+ if (l = ce(a.queryParams ? l : o), h(`http ${m}${s} ${l}`), f && n.text) {
1955
+ const x = ce(n.text);
1959
1956
  h(`echo ${x} | `);
1960
1957
  }
1961
- return l();
1958
+ return c();
1962
1959
  }
1963
- }, Ci = {
1960
+ }, qi = {
1964
1961
  info: {
1965
1962
  key: "wget",
1966
1963
  title: "Wget",
@@ -1969,22 +1966,22 @@ ${a.indent}` : " "
1969
1966
  extname: ".sh"
1970
1967
  },
1971
1968
  convert: ({ method: e, postData: n, allHeaders: t, fullUrl: o }, s) => {
1972
- const c = {
1969
+ const l = {
1973
1970
  indent: " ",
1974
1971
  short: !1,
1975
1972
  verbose: !1,
1976
1973
  ...s
1977
1974
  }, { push: r, join: a } = new V({
1978
- ...typeof c.indent == "string" ? { indent: c.indent } : {},
1979
- join: c.indent !== !1 ? ` \\
1980
- ${c.indent}` : " "
1975
+ ...typeof l.indent == "string" ? { indent: l.indent } : {},
1976
+ join: l.indent !== !1 ? ` \\
1977
+ ${l.indent}` : " "
1981
1978
  });
1982
- return c.verbose ? r(`wget ${c.short ? "-v" : "--verbose"}`) : r(`wget ${c.short ? "-q" : "--quiet"}`), r(`--method ${le(e)}`), Object.keys(t).forEach((i) => {
1983
- const l = `${i}: ${t[i]}`;
1984
- r(`--header ${le(l)}`);
1985
- }), n.text && r(`--body-data ${wi(le(n.text))}`), r(c.short ? "-O" : "--output-document"), r(`- ${le(o)}`), a();
1979
+ return l.verbose ? r(`wget ${l.short ? "-v" : "--verbose"}`) : r(`wget ${l.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
1980
+ const c = `${i}: ${t[i]}`;
1981
+ r(`--header ${ce(c)}`);
1982
+ }), n.text && r(`--body-data ${Oi(ce(n.text))}`), r(l.short ? "-O" : "--output-document"), r(`- ${ce(o)}`), a();
1986
1983
  }
1987
- }, Ri = {
1984
+ }, Ni = {
1988
1985
  info: {
1989
1986
  key: "shell",
1990
1987
  title: "Shell",
@@ -1992,23 +1989,23 @@ ${c.indent}` : " "
1992
1989
  cli: "%s"
1993
1990
  },
1994
1991
  clientsById: {
1995
- curl: Ti,
1996
- httpie: Pi,
1997
- wget: Ci
1992
+ curl: Ci,
1993
+ httpie: Ri,
1994
+ wget: qi
1998
1995
  }
1999
1996
  }, en = (e, n) => n.repeat(e), tn = (e, n, t, o) => {
2000
- const s = en(o, t), c = en(o - 1, t), r = n ? `,
1997
+ const s = en(o, t), l = en(o - 1, t), r = n ? `,
2001
1998
  ${s}` : ", ";
2002
1999
  return n ? `[
2003
2000
  ${s}${e.join(r)}
2004
- ${c}]` : `[${e.join(r)}]`;
2001
+ ${l}]` : `[${e.join(r)}]`;
2005
2002
  }, rn = (e, n, t) => `let ${e} = ${et(n, t)}`, et = (e, n, t) => {
2006
2003
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
2007
2004
  case "[object Number]":
2008
2005
  return e;
2009
2006
  case "[object Array]": {
2010
2007
  let o = !1;
2011
- const s = e.map((c) => (Object.prototype.toString.call(c) === "[object Object]" && (o = Object.keys(c).length > 1), et(c, n, t)));
2008
+ const s = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), et(l, n, t)));
2012
2009
  return tn(s, o, n.indent, t);
2013
2010
  }
2014
2011
  case "[object Object]": {
@@ -2029,7 +2026,7 @@ ${c}]` : `[${e.join(r)}]`;
2029
2026
  default:
2030
2027
  return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
2031
2028
  }
2032
- }, qi = {
2029
+ }, ki = {
2033
2030
  info: {
2034
2031
  key: "urlsession",
2035
2032
  title: "URLSession",
@@ -2037,14 +2034,14 @@ ${c}]` : `[${e.join(r)}]`;
2037
2034
  description: "Foundation's URLSession request",
2038
2035
  extname: ".swift"
2039
2036
  },
2040
- convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s }, c) => {
2037
+ convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: o, method: s }, l) => {
2041
2038
  var u;
2042
2039
  const r = {
2043
2040
  indent: " ",
2044
2041
  pretty: !0,
2045
2042
  timeout: 10,
2046
- ...c
2047
- }, { push: a, blank: i, join: l } = new V({ indent: r.indent });
2043
+ ...l
2044
+ }, { push: a, blank: i, join: c } = new V({ indent: r.indent });
2048
2045
  a("import Foundation"), i();
2049
2046
  const h = n.text || n.jsonObj || n.params;
2050
2047
  if (h)
@@ -2078,125 +2075,125 @@ ${c}]` : `[${e.join(r)}]`;
2078
2075
  });
2079
2076
  break;
2080
2077
  }
2081
- }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${et(e, r)}`), h && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), l();
2078
+ }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${s}"`), a(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${et(e, r)}`), h && a("request.httpBody = postData"), i(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
2082
2079
  }
2083
- }, ki = {
2080
+ }, Ei = {
2084
2081
  info: {
2085
2082
  key: "swift",
2086
2083
  title: "Swift",
2087
2084
  default: "urlsession"
2088
2085
  },
2089
2086
  clientsById: {
2090
- urlsession: qi
2087
+ urlsession: ki
2091
2088
  }
2092
- }, Ni = {
2093
- c: Sa,
2094
- clojure: Ca,
2095
- csharp: Ea,
2096
- go: Ia,
2097
- http: Ua,
2098
- java: Ma,
2099
- javascript: Va,
2100
- json: Qa,
2101
- kotlin: Ya,
2102
- node: ni,
2103
- objc: ai,
2104
- ocaml: si,
2105
- php: pi,
2106
- powershell: yi,
2107
- python: vi,
2108
- r: xi,
2109
- ruby: ji,
2110
- shell: Ri,
2111
- swift: ki
2089
+ }, Ai = {
2090
+ c: Ta,
2091
+ clojure: qa,
2092
+ csharp: Ia,
2093
+ go: Ua,
2094
+ http: _a,
2095
+ java: Ga,
2096
+ javascript: Qa,
2097
+ json: Ya,
2098
+ kotlin: Za,
2099
+ node: ai,
2100
+ objc: si,
2101
+ ocaml: ci,
2102
+ php: hi,
2103
+ powershell: gi,
2104
+ python: xi,
2105
+ r: ji,
2106
+ ruby: Si,
2107
+ shell: Ni,
2108
+ swift: Ei
2112
2109
  }, Re = {}, Be = { exports: {} };
2113
2110
  /*! https://mths.be/punycode v1.4.1 by @mathias */
2114
- var Ei = Be.exports, nn;
2115
- function Ai() {
2111
+ var Ii = Be.exports, nn;
2112
+ function Li() {
2116
2113
  return nn || (nn = 1, function(e, n) {
2117
2114
  (function(t) {
2118
- var o = n && !n.nodeType && n, s = e && !e.nodeType && e, c = typeof Ze == "object" && Ze;
2119
- (c.global === c || c.window === c || c.self === c) && (t = c);
2120
- var r, a = 2147483647, i = 36, l = 1, h = 26, f = 38, u = 700, m = 72, x = 128, $ = "-", d = /^xn--/, y = /[^\x20-\x7E]/, g = /[\x2E\u3002\uFF0E\uFF61]/g, w = {
2115
+ var o = n && !n.nodeType && n, s = e && !e.nodeType && e, l = typeof Ze == "object" && Ze;
2116
+ (l.global === l || l.window === l || l.self === l) && (t = l);
2117
+ var r, a = 2147483647, i = 36, c = 1, h = 26, f = 38, u = 700, m = 72, x = 128, $ = "-", d = /^xn--/, y = /[^\x20-\x7E]/, g = /[\x2E\u3002\uFF0E\uFF61]/g, w = {
2121
2118
  overflow: "Overflow: input needs wider integers to process",
2122
2119
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
2123
2120
  "invalid-input": "Invalid input"
2124
- }, T = i - l, p = Math.floor, O = String.fromCharCode, b;
2121
+ }, T = i - c, p = Math.floor, O = String.fromCharCode, b;
2125
2122
  function q(R) {
2126
2123
  throw new RangeError(w[R]);
2127
2124
  }
2128
- function L(R, k) {
2125
+ function L(R, N) {
2129
2126
  for (var U = R.length, C = []; U--; )
2130
- C[U] = k(R[U]);
2127
+ C[U] = N(R[U]);
2131
2128
  return C;
2132
2129
  }
2133
- function E(R, k) {
2130
+ function E(R, N) {
2134
2131
  var U = R.split("@"), C = "";
2135
2132
  U.length > 1 && (C = U[0] + "@", R = U[1]), R = R.replace(g, ".");
2136
- var I = R.split("."), W = L(I, k).join(".");
2133
+ var I = R.split("."), W = L(I, N).join(".");
2137
2134
  return C + W;
2138
2135
  }
2139
2136
  function B(R) {
2140
- for (var k = [], U = 0, C = R.length, I, W; U < C; )
2141
- I = R.charCodeAt(U++), I >= 55296 && I <= 56319 && U < C ? (W = R.charCodeAt(U++), (W & 64512) == 56320 ? k.push(((I & 1023) << 10) + (W & 1023) + 65536) : (k.push(I), U--)) : k.push(I);
2142
- return k;
2137
+ for (var N = [], U = 0, C = R.length, I, W; U < C; )
2138
+ I = R.charCodeAt(U++), I >= 55296 && I <= 56319 && U < C ? (W = R.charCodeAt(U++), (W & 64512) == 56320 ? N.push(((I & 1023) << 10) + (W & 1023) + 65536) : (N.push(I), U--)) : N.push(I);
2139
+ return N;
2143
2140
  }
2144
2141
  function P(R) {
2145
- return L(R, function(k) {
2142
+ return L(R, function(N) {
2146
2143
  var U = "";
2147
- return k > 65535 && (k -= 65536, U += O(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), U += O(k), U;
2144
+ return N > 65535 && (N -= 65536, U += O(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), U += O(N), U;
2148
2145
  }).join("");
2149
2146
  }
2150
2147
  function ae(R) {
2151
2148
  return R - 48 < 10 ? R - 22 : R - 65 < 26 ? R - 65 : R - 97 < 26 ? R - 97 : i;
2152
2149
  }
2153
- function H(R, k) {
2154
- return R + 22 + 75 * (R < 26) - ((k != 0) << 5);
2150
+ function H(R, N) {
2151
+ return R + 22 + 75 * (R < 26) - ((N != 0) << 5);
2155
2152
  }
2156
- function D(R, k, U) {
2153
+ function D(R, N, U) {
2157
2154
  var C = 0;
2158
- for (R = U ? p(R / u) : R >> 1, R += p(R / k); R > T * h >> 1; C += i)
2155
+ for (R = U ? p(R / u) : R >> 1, R += p(R / N); R > T * h >> 1; C += i)
2159
2156
  R = p(R / T);
2160
2157
  return p(C + (T + 1) * R / (R + f));
2161
2158
  }
2162
2159
  function se(R) {
2163
- var k = [], U = R.length, C, I = 0, W = x, z = m, K, ne, J, A, F, _, Q, G, Y;
2160
+ var N = [], U = R.length, C, I = 0, W = x, z = m, K, ne, J, A, F, _, Q, G, Y;
2164
2161
  for (K = R.lastIndexOf($), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
2165
- R.charCodeAt(ne) >= 128 && q("not-basic"), k.push(R.charCodeAt(ne));
2162
+ R.charCodeAt(ne) >= 128 && q("not-basic"), N.push(R.charCodeAt(ne));
2166
2163
  for (J = K > 0 ? K + 1 : 0; J < U; ) {
2167
- for (A = I, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > p((a - I) / F)) && q("overflow"), I += Q * F, G = _ <= z ? l : _ >= z + h ? h : _ - z, !(Q < G); _ += i)
2164
+ for (A = I, F = 1, _ = i; J >= U && q("invalid-input"), Q = ae(R.charCodeAt(J++)), (Q >= i || Q > p((a - I) / F)) && q("overflow"), I += Q * F, G = _ <= z ? c : _ >= z + h ? h : _ - z, !(Q < G); _ += i)
2168
2165
  Y = i - G, F > p(a / Y) && q("overflow"), F *= Y;
2169
- C = k.length + 1, z = D(I - A, C, A == 0), p(I / C) > a - W && q("overflow"), W += p(I / C), I %= C, k.splice(I++, 0, W);
2166
+ C = N.length + 1, z = D(I - A, C, A == 0), p(I / C) > a - W && q("overflow"), W += p(I / C), I %= C, N.splice(I++, 0, W);
2170
2167
  }
2171
- return P(k);
2168
+ return P(N);
2172
2169
  }
2173
2170
  function Z(R) {
2174
- var k, U, C, I, W, z, K, ne, J, A, F, _ = [], Q, G, Y, oe;
2175
- for (R = B(R), Q = R.length, k = x, U = 0, W = m, z = 0; z < Q; ++z)
2171
+ var N, U, C, I, W, z, K, ne, J, A, F, _ = [], Q, G, Y, oe;
2172
+ for (R = B(R), Q = R.length, N = x, U = 0, W = m, z = 0; z < Q; ++z)
2176
2173
  F = R[z], F < 128 && _.push(O(F));
2177
2174
  for (C = I = _.length, I && _.push($); C < Q; ) {
2178
2175
  for (K = a, z = 0; z < Q; ++z)
2179
- F = R[z], F >= k && F < K && (K = F);
2180
- for (G = C + 1, K - k > p((a - U) / G) && q("overflow"), U += (K - k) * G, k = K, z = 0; z < Q; ++z)
2181
- if (F = R[z], F < k && ++U > a && q("overflow"), F == k) {
2182
- for (ne = U, J = i; A = J <= W ? l : J >= W + h ? h : J - W, !(ne < A); J += i)
2176
+ F = R[z], F >= N && F < K && (K = F);
2177
+ for (G = C + 1, K - N > p((a - U) / G) && q("overflow"), U += (K - N) * G, N = K, z = 0; z < Q; ++z)
2178
+ if (F = R[z], F < N && ++U > a && q("overflow"), F == N) {
2179
+ for (ne = U, J = i; A = J <= W ? c : J >= W + h ? h : J - W, !(ne < A); J += i)
2183
2180
  oe = ne - A, Y = i - A, _.push(
2184
2181
  O(H(A + oe % Y, 0))
2185
2182
  ), ne = p(oe / Y);
2186
2183
  _.push(O(H(ne, 0))), W = D(U, G, C == I), U = 0, ++C;
2187
2184
  }
2188
- ++U, ++k;
2185
+ ++U, ++N;
2189
2186
  }
2190
2187
  return _.join("");
2191
2188
  }
2192
- function N(R) {
2193
- return E(R, function(k) {
2194
- return d.test(k) ? se(k.slice(4).toLowerCase()) : k;
2189
+ function k(R) {
2190
+ return E(R, function(N) {
2191
+ return d.test(N) ? se(N.slice(4).toLowerCase()) : N;
2195
2192
  });
2196
2193
  }
2197
2194
  function re(R) {
2198
- return E(R, function(k) {
2199
- return y.test(k) ? "xn--" + Z(k) : k;
2195
+ return E(R, function(N) {
2196
+ return y.test(N) ? "xn--" + Z(N) : N;
2200
2197
  });
2201
2198
  }
2202
2199
  if (r = {
@@ -2220,7 +2217,7 @@ function Ai() {
2220
2217
  decode: se,
2221
2218
  encode: Z,
2222
2219
  toASCII: re,
2223
- toUnicode: N
2220
+ toUnicode: k
2224
2221
  }, o && s)
2225
2222
  if (e.exports == o)
2226
2223
  s.exports = r;
@@ -2229,7 +2226,7 @@ function Ai() {
2229
2226
  r.hasOwnProperty(b) && (o[b] = r[b]);
2230
2227
  else
2231
2228
  t.punycode = r;
2232
- })(Ei);
2229
+ })(Ii);
2233
2230
  }(Be, Be.exports)), Be.exports;
2234
2231
  }
2235
2232
  var vt, on;
@@ -2237,20 +2234,20 @@ function uo() {
2237
2234
  return on || (on = 1, vt = Object), vt;
2238
2235
  }
2239
2236
  var bt, an;
2240
- function Ii() {
2237
+ function Ui() {
2241
2238
  return an || (an = 1, bt = Error), bt;
2242
2239
  }
2243
2240
  var xt, sn;
2244
- function Li() {
2241
+ function Fi() {
2245
2242
  return sn || (sn = 1, xt = EvalError), xt;
2246
2243
  }
2247
- var $t, cn;
2248
- function Ui() {
2249
- return cn || (cn = 1, $t = RangeError), $t;
2244
+ var $t, ln;
2245
+ function _i() {
2246
+ return ln || (ln = 1, $t = RangeError), $t;
2250
2247
  }
2251
- var jt, ln;
2252
- function Fi() {
2253
- return ln || (ln = 1, jt = ReferenceError), jt;
2248
+ var jt, cn;
2249
+ function Bi() {
2250
+ return cn || (cn = 1, jt = ReferenceError), jt;
2254
2251
  }
2255
2252
  var wt, un;
2256
2253
  function fo() {
@@ -2261,57 +2258,57 @@ function We() {
2261
2258
  return fn || (fn = 1, St = TypeError), St;
2262
2259
  }
2263
2260
  var Ot, pn;
2264
- function _i() {
2261
+ function Hi() {
2265
2262
  return pn || (pn = 1, Ot = URIError), Ot;
2266
2263
  }
2267
2264
  var Tt, dn;
2268
- function Bi() {
2265
+ function Mi() {
2269
2266
  return dn || (dn = 1, Tt = Math.abs), Tt;
2270
2267
  }
2271
2268
  var Pt, hn;
2272
- function Hi() {
2269
+ function zi() {
2273
2270
  return hn || (hn = 1, Pt = Math.floor), Pt;
2274
2271
  }
2275
2272
  var Ct, yn;
2276
- function Mi() {
2273
+ function Gi() {
2277
2274
  return yn || (yn = 1, Ct = Math.max), Ct;
2278
2275
  }
2279
2276
  var Rt, mn;
2280
- function zi() {
2277
+ function Wi() {
2281
2278
  return mn || (mn = 1, Rt = Math.min), Rt;
2282
2279
  }
2283
2280
  var qt, gn;
2284
- function Gi() {
2281
+ function Ji() {
2285
2282
  return gn || (gn = 1, qt = Math.pow), qt;
2286
2283
  }
2287
- var kt, vn;
2288
- function Wi() {
2289
- return vn || (vn = 1, kt = Math.round), kt;
2284
+ var Nt, vn;
2285
+ function Vi() {
2286
+ return vn || (vn = 1, Nt = Math.round), Nt;
2290
2287
  }
2291
- var Nt, bn;
2292
- function Ji() {
2293
- return bn || (bn = 1, Nt = Number.isNaN || function(n) {
2288
+ var kt, bn;
2289
+ function Di() {
2290
+ return bn || (bn = 1, kt = Number.isNaN || function(n) {
2294
2291
  return n !== n;
2295
- }), Nt;
2292
+ }), kt;
2296
2293
  }
2297
2294
  var Et, xn;
2298
- function Vi() {
2295
+ function Qi() {
2299
2296
  if (xn) return Et;
2300
2297
  xn = 1;
2301
- var e = /* @__PURE__ */ Ji();
2298
+ var e = /* @__PURE__ */ Di();
2302
2299
  return Et = function(t) {
2303
2300
  return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
2304
2301
  }, Et;
2305
2302
  }
2306
2303
  var At, $n;
2307
- function Di() {
2304
+ function Ki() {
2308
2305
  return $n || ($n = 1, At = Object.getOwnPropertyDescriptor), At;
2309
2306
  }
2310
2307
  var It, jn;
2311
2308
  function nt() {
2312
2309
  if (jn) return It;
2313
2310
  jn = 1;
2314
- var e = /* @__PURE__ */ Di();
2311
+ var e = /* @__PURE__ */ Ki();
2315
2312
  if (e)
2316
2313
  try {
2317
2314
  e([], "length");
@@ -2334,7 +2331,7 @@ function ot() {
2334
2331
  return Lt = e, Lt;
2335
2332
  }
2336
2333
  var Ut, Sn;
2337
- function Qi() {
2334
+ function Yi() {
2338
2335
  return Sn || (Sn = 1, Ut = function() {
2339
2336
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2340
2337
  return !1;
@@ -2345,7 +2342,7 @@ function Qi() {
2345
2342
  return !1;
2346
2343
  var s = 42;
2347
2344
  n[t] = s;
2348
- for (var c in n)
2345
+ for (var l in n)
2349
2346
  return !1;
2350
2347
  if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(n).length !== 0)
2351
2348
  return !1;
@@ -2364,10 +2361,10 @@ function Qi() {
2364
2361
  }), Ut;
2365
2362
  }
2366
2363
  var Ft, On;
2367
- function Ki() {
2364
+ function Xi() {
2368
2365
  if (On) return Ft;
2369
2366
  On = 1;
2370
- var e = typeof Symbol < "u" && Symbol, n = Qi();
2367
+ var e = typeof Symbol < "u" && Symbol, n = Yi();
2371
2368
  return Ft = function() {
2372
2369
  return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
2373
2370
  }, Ft;
@@ -2384,46 +2381,46 @@ function ho() {
2384
2381
  return Bt = e.getPrototypeOf || null, Bt;
2385
2382
  }
2386
2383
  var Ht, Cn;
2387
- function Yi() {
2384
+ function Zi() {
2388
2385
  if (Cn) return Ht;
2389
2386
  Cn = 1;
2390
- var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, l) {
2387
+ var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, o = "[object Function]", s = function(i, c) {
2391
2388
  for (var h = [], f = 0; f < i.length; f += 1)
2392
2389
  h[f] = i[f];
2393
- for (var u = 0; u < l.length; u += 1)
2394
- h[u + i.length] = l[u];
2390
+ for (var u = 0; u < c.length; u += 1)
2391
+ h[u + i.length] = c[u];
2395
2392
  return h;
2396
- }, c = function(i, l) {
2397
- for (var h = [], f = l, u = 0; f < i.length; f += 1, u += 1)
2393
+ }, l = function(i, c) {
2394
+ for (var h = [], f = c, u = 0; f < i.length; f += 1, u += 1)
2398
2395
  h[u] = i[f];
2399
2396
  return h;
2400
2397
  }, r = function(a, i) {
2401
- for (var l = "", h = 0; h < a.length; h += 1)
2402
- l += a[h], h + 1 < a.length && (l += i);
2403
- return l;
2398
+ for (var c = "", h = 0; h < a.length; h += 1)
2399
+ c += a[h], h + 1 < a.length && (c += i);
2400
+ return c;
2404
2401
  };
2405
2402
  return Ht = function(i) {
2406
- var l = this;
2407
- if (typeof l != "function" || n.apply(l) !== o)
2408
- throw new TypeError(e + l);
2409
- for (var h = c(arguments, 1), f, u = function() {
2403
+ var c = this;
2404
+ if (typeof c != "function" || n.apply(c) !== o)
2405
+ throw new TypeError(e + c);
2406
+ for (var h = l(arguments, 1), f, u = function() {
2410
2407
  if (this instanceof f) {
2411
- var y = l.apply(
2408
+ var y = c.apply(
2412
2409
  this,
2413
2410
  s(h, arguments)
2414
2411
  );
2415
2412
  return Object(y) === y ? y : this;
2416
2413
  }
2417
- return l.apply(
2414
+ return c.apply(
2418
2415
  i,
2419
2416
  s(h, arguments)
2420
2417
  );
2421
- }, m = t(0, l.length - h.length), x = [], $ = 0; $ < m; $++)
2418
+ }, m = t(0, c.length - h.length), x = [], $ = 0; $ < m; $++)
2422
2419
  x[$] = "$" + $;
2423
- if (f = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(u), l.prototype) {
2420
+ if (f = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(u), c.prototype) {
2424
2421
  var d = function() {
2425
2422
  };
2426
- d.prototype = l.prototype, f.prototype = new d(), d.prototype = null;
2423
+ d.prototype = c.prototype, f.prototype = new d(), d.prototype = null;
2427
2424
  }
2428
2425
  return f;
2429
2426
  }, Ht;
@@ -2432,26 +2429,26 @@ var Mt, Rn;
2432
2429
  function Je() {
2433
2430
  if (Rn) return Mt;
2434
2431
  Rn = 1;
2435
- var e = Yi();
2432
+ var e = Zi();
2436
2433
  return Mt = Function.prototype.bind || e, Mt;
2437
2434
  }
2438
2435
  var zt, qn;
2439
2436
  function jr() {
2440
2437
  return qn || (qn = 1, zt = Function.prototype.call), zt;
2441
2438
  }
2442
- var Gt, kn;
2439
+ var Gt, Nn;
2443
2440
  function wr() {
2444
- return kn || (kn = 1, Gt = Function.prototype.apply), Gt;
2441
+ return Nn || (Nn = 1, Gt = Function.prototype.apply), Gt;
2445
2442
  }
2446
- var Wt, Nn;
2447
- function Xi() {
2448
- return Nn || (Nn = 1, Wt = typeof Reflect < "u" && Reflect && Reflect.apply), Wt;
2443
+ var Wt, kn;
2444
+ function es() {
2445
+ return kn || (kn = 1, Wt = typeof Reflect < "u" && Reflect && Reflect.apply), Wt;
2449
2446
  }
2450
2447
  var Jt, En;
2451
2448
  function yo() {
2452
2449
  if (En) return Jt;
2453
2450
  En = 1;
2454
- var e = Je(), n = wr(), t = jr(), o = Xi();
2451
+ var e = Je(), n = wr(), t = jr(), o = es();
2455
2452
  return Jt = o || e.call(t, n), Jt;
2456
2453
  }
2457
2454
  var Vt, An;
@@ -2459,14 +2456,14 @@ function mo() {
2459
2456
  if (An) return Vt;
2460
2457
  An = 1;
2461
2458
  var e = Je(), n = /* @__PURE__ */ We(), t = jr(), o = yo();
2462
- return Vt = function(c) {
2463
- if (c.length < 1 || typeof c[0] != "function")
2459
+ return Vt = function(l) {
2460
+ if (l.length < 1 || typeof l[0] != "function")
2464
2461
  throw new n("a function is required");
2465
- return o(e, t, c);
2462
+ return o(e, t, l);
2466
2463
  }, Vt;
2467
2464
  }
2468
2465
  var Dt, In;
2469
- function Zi() {
2466
+ function ts() {
2470
2467
  if (In) return Dt;
2471
2468
  In = 1;
2472
2469
  var e = mo(), n = /* @__PURE__ */ nt(), t;
@@ -2481,19 +2478,19 @@ function Zi() {
2481
2478
  Object.prototype,
2482
2479
  /** @type {keyof typeof Object.prototype} */
2483
2480
  "__proto__"
2484
- ), s = Object, c = s.getPrototypeOf;
2485
- return Dt = o && typeof o.get == "function" ? e([o.get]) : typeof c == "function" ? (
2481
+ ), s = Object, l = s.getPrototypeOf;
2482
+ return Dt = o && typeof o.get == "function" ? e([o.get]) : typeof l == "function" ? (
2486
2483
  /** @type {import('./get')} */
2487
2484
  function(a) {
2488
- return c(a == null ? a : s(a));
2485
+ return l(a == null ? a : s(a));
2489
2486
  }
2490
2487
  ) : !1, Dt;
2491
2488
  }
2492
2489
  var Qt, Ln;
2493
- function es() {
2490
+ function rs() {
2494
2491
  if (Ln) return Qt;
2495
2492
  Ln = 1;
2496
- var e = po(), n = ho(), t = /* @__PURE__ */ Zi();
2493
+ var e = po(), n = ho(), t = /* @__PURE__ */ ts();
2497
2494
  return Qt = e ? function(s) {
2498
2495
  return e(s);
2499
2496
  } : n ? function(s) {
@@ -2505,7 +2502,7 @@ function es() {
2505
2502
  } : null, Qt;
2506
2503
  }
2507
2504
  var Kt, Un;
2508
- function ts() {
2505
+ function ns() {
2509
2506
  if (Un) return Kt;
2510
2507
  Un = 1;
2511
2508
  var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = Je();
@@ -2515,7 +2512,7 @@ var Yt, Fn;
2515
2512
  function Sr() {
2516
2513
  if (Fn) return Yt;
2517
2514
  Fn = 1;
2518
- var e, n = /* @__PURE__ */ uo(), t = /* @__PURE__ */ Ii(), o = /* @__PURE__ */ Li(), s = /* @__PURE__ */ Ui(), c = /* @__PURE__ */ Fi(), r = /* @__PURE__ */ fo(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ _i(), l = /* @__PURE__ */ Bi(), h = /* @__PURE__ */ Hi(), f = /* @__PURE__ */ Mi(), u = /* @__PURE__ */ zi(), m = /* @__PURE__ */ Gi(), x = /* @__PURE__ */ Wi(), $ = /* @__PURE__ */ Vi(), d = Function, y = function(J) {
2515
+ var e, n = /* @__PURE__ */ uo(), t = /* @__PURE__ */ Ui(), o = /* @__PURE__ */ Fi(), s = /* @__PURE__ */ _i(), l = /* @__PURE__ */ Bi(), r = /* @__PURE__ */ fo(), a = /* @__PURE__ */ We(), i = /* @__PURE__ */ Hi(), c = /* @__PURE__ */ Mi(), h = /* @__PURE__ */ zi(), f = /* @__PURE__ */ Gi(), u = /* @__PURE__ */ Wi(), m = /* @__PURE__ */ Ji(), x = /* @__PURE__ */ Vi(), $ = /* @__PURE__ */ Qi(), d = Function, y = function(J) {
2519
2516
  try {
2520
2517
  return d('"use strict"; return (' + J + ").constructor;")();
2521
2518
  } catch {
@@ -2532,7 +2529,7 @@ function Sr() {
2532
2529
  return T;
2533
2530
  }
2534
2531
  }
2535
- }() : T, O = Ki()(), b = es(), q = ho(), L = po(), E = wr(), B = jr(), P = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
2532
+ }() : T, O = Xi()(), b = rs(), q = ho(), L = po(), E = wr(), B = jr(), P = {}, ae = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
2536
2533
  __proto__: null,
2537
2534
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
2538
2535
  "%Array%": Array,
@@ -2581,7 +2578,7 @@ function Sr() {
2581
2578
  "%Promise%": typeof Promise > "u" ? e : Promise,
2582
2579
  "%Proxy%": typeof Proxy > "u" ? e : Proxy,
2583
2580
  "%RangeError%": s,
2584
- "%ReferenceError%": c,
2581
+ "%ReferenceError%": l,
2585
2582
  "%Reflect%": typeof Reflect > "u" ? e : Reflect,
2586
2583
  "%RegExp%": RegExp,
2587
2584
  "%Set%": typeof Set > "u" ? e : Set,
@@ -2606,7 +2603,7 @@ function Sr() {
2606
2603
  "%Function.prototype.apply%": E,
2607
2604
  "%Object.defineProperty%": w,
2608
2605
  "%Object.getPrototypeOf%": q,
2609
- "%Math.abs%": l,
2606
+ "%Math.abs%": c,
2610
2607
  "%Math.floor%": h,
2611
2608
  "%Math.max%": f,
2612
2609
  "%Math.min%": u,
@@ -2691,7 +2688,7 @@ function Sr() {
2691
2688
  "%URIErrorPrototype%": ["URIError", "prototype"],
2692
2689
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2693
2690
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2694
- }, N = Je(), re = /* @__PURE__ */ ts(), R = N.call(B, Array.prototype.concat), k = N.call(E, Array.prototype.splice), U = N.call(B, String.prototype.replace), C = N.call(B, String.prototype.slice), I = N.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
2691
+ }, k = Je(), re = /* @__PURE__ */ ns(), R = k.call(B, Array.prototype.concat), N = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), I = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(A) {
2695
2692
  var F = C(A, 0, 1), _ = C(A, -1);
2696
2693
  if (F === "%" && _ !== "%")
2697
2694
  throw new r("invalid intrinsic syntax, expected closing `%`");
@@ -2723,10 +2720,10 @@ function Sr() {
2723
2720
  if (I(/^%?[^%]*%?$/, A) === null)
2724
2721
  throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2725
2722
  var _ = K(A), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, Oe = G.alias;
2726
- Oe && (Q = Oe[0], k(_, R([0, 1], Oe)));
2727
- for (var ke = 1, Te = !0; ke < _.length; ke += 1) {
2728
- var me = _[ke], Ne = C(me, 0, 1), Ee = C(me, -1);
2729
- if ((Ne === '"' || Ne === "'" || Ne === "`" || Ee === '"' || Ee === "'" || Ee === "`") && Ne !== Ee)
2723
+ Oe && (Q = Oe[0], N(_, R([0, 1], Oe)));
2724
+ for (var Ne = 1, Te = !0; Ne < _.length; Ne += 1) {
2725
+ var me = _[Ne], ke = C(me, 0, 1), Ee = C(me, -1);
2726
+ if ((ke === '"' || ke === "'" || ke === "`" || Ee === '"' || Ee === "'" || Ee === "`") && ke !== Ee)
2730
2727
  throw new r("property names with quotes must have matching quotes");
2731
2728
  if ((me === "constructor" || !Te) && (he = !0), Q += "." + me, Y = "%" + Q + "%", re(H, Y))
2732
2729
  oe = H[Y];
@@ -2736,7 +2733,7 @@ function Sr() {
2736
2733
  throw new a("base intrinsic for " + A + " exists, but the property is not available.");
2737
2734
  return;
2738
2735
  }
2739
- if (g && ke + 1 >= _.length) {
2736
+ if (g && Ne + 1 >= _.length) {
2740
2737
  var Pe = g(oe, me);
2741
2738
  Te = !!Pe, Te && "get" in Pe && !("originalValue" in Pe.get) ? oe = Pe.get : oe = oe[me];
2742
2739
  } else
@@ -2748,12 +2745,12 @@ function Sr() {
2748
2745
  }, Yt;
2749
2746
  }
2750
2747
  var Xt = { exports: {} }, Zt, _n;
2751
- function rs() {
2748
+ function os() {
2752
2749
  if (_n) return Zt;
2753
2750
  _n = 1;
2754
2751
  var e = /* @__PURE__ */ ot(), n = /* @__PURE__ */ fo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ nt();
2755
- return Zt = function(c, r, a) {
2756
- if (!c || typeof c != "object" && typeof c != "function")
2752
+ return Zt = function(l, r, a) {
2753
+ if (!l || typeof l != "object" && typeof l != "function")
2757
2754
  throw new t("`obj` must be an object or a function`");
2758
2755
  if (typeof r != "string" && typeof r != "symbol")
2759
2756
  throw new t("`property` must be a string or a symbol`");
@@ -2765,22 +2762,22 @@ function rs() {
2765
2762
  throw new t("`nonConfigurable`, if provided, must be a boolean or null");
2766
2763
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2767
2764
  throw new t("`loose`, if provided, must be a boolean");
2768
- var i = arguments.length > 3 ? arguments[3] : null, l = arguments.length > 4 ? arguments[4] : null, h = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, u = !!o && o(c, r);
2765
+ var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, h = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, u = !!o && o(l, r);
2769
2766
  if (e)
2770
- e(c, r, {
2767
+ e(l, r, {
2771
2768
  configurable: h === null && u ? u.configurable : !h,
2772
2769
  enumerable: i === null && u ? u.enumerable : !i,
2773
2770
  value: a,
2774
- writable: l === null && u ? u.writable : !l
2771
+ writable: c === null && u ? u.writable : !c
2775
2772
  });
2776
- else if (f || !i && !l && !h)
2777
- c[r] = a;
2773
+ else if (f || !i && !c && !h)
2774
+ l[r] = a;
2778
2775
  else
2779
2776
  throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2780
2777
  }, Zt;
2781
2778
  }
2782
2779
  var er, Bn;
2783
- function ns() {
2780
+ function as() {
2784
2781
  if (Bn) return er;
2785
2782
  Bn = 1;
2786
2783
  var e = /* @__PURE__ */ ot(), n = function() {
@@ -2797,21 +2794,21 @@ function ns() {
2797
2794
  }, er = n, er;
2798
2795
  }
2799
2796
  var tr, Hn;
2800
- function os() {
2797
+ function is() {
2801
2798
  if (Hn) return tr;
2802
2799
  Hn = 1;
2803
- var e = /* @__PURE__ */ Sr(), n = /* @__PURE__ */ rs(), t = /* @__PURE__ */ ns()(), o = /* @__PURE__ */ nt(), s = /* @__PURE__ */ We(), c = e("%Math.floor%");
2800
+ var e = /* @__PURE__ */ Sr(), n = /* @__PURE__ */ os(), t = /* @__PURE__ */ as()(), o = /* @__PURE__ */ nt(), s = /* @__PURE__ */ We(), l = e("%Math.floor%");
2804
2801
  return tr = function(a, i) {
2805
2802
  if (typeof a != "function")
2806
2803
  throw new s("`fn` is not a function");
2807
- if (typeof i != "number" || i < 0 || i > 4294967295 || c(i) !== i)
2804
+ if (typeof i != "number" || i < 0 || i > 4294967295 || l(i) !== i)
2808
2805
  throw new s("`length` must be a positive 32-bit integer");
2809
- var l = arguments.length > 2 && !!arguments[2], h = !0, f = !0;
2806
+ var c = arguments.length > 2 && !!arguments[2], h = !0, f = !0;
2810
2807
  if ("length" in a && o) {
2811
2808
  var u = o(a, "length");
2812
2809
  u && !u.configurable && (h = !1), u && !u.writable && (f = !1);
2813
2810
  }
2814
- return (h || f || !l) && (t ? n(
2811
+ return (h || f || !c) && (t ? n(
2815
2812
  /** @type {Parameters<define>[0]} */
2816
2813
  a,
2817
2814
  "length",
@@ -2827,7 +2824,7 @@ function os() {
2827
2824
  }, tr;
2828
2825
  }
2829
2826
  var rr, Mn;
2830
- function as() {
2827
+ function ss() {
2831
2828
  if (Mn) return rr;
2832
2829
  Mn = 1;
2833
2830
  var e = Je(), n = wr(), t = yo();
@@ -2836,9 +2833,9 @@ function as() {
2836
2833
  }, rr;
2837
2834
  }
2838
2835
  var zn;
2839
- function is() {
2836
+ function ls() {
2840
2837
  return zn || (zn = 1, function(e) {
2841
- var n = /* @__PURE__ */ os(), t = /* @__PURE__ */ ot(), o = mo(), s = as();
2838
+ var n = /* @__PURE__ */ is(), t = /* @__PURE__ */ ot(), o = mo(), s = ss();
2842
2839
  e.exports = function(r) {
2843
2840
  var a = o(arguments), i = r.length - (arguments.length - 1);
2844
2841
  return n(
@@ -2850,24 +2847,24 @@ function is() {
2850
2847
  }(Xt)), Xt.exports;
2851
2848
  }
2852
2849
  var nr, Gn;
2853
- function ss() {
2850
+ function cs() {
2854
2851
  if (Gn) return nr;
2855
2852
  Gn = 1;
2856
- var e = /* @__PURE__ */ Sr(), n = is(), t = n(e("String.prototype.indexOf"));
2857
- return nr = function(s, c) {
2858
- var r = e(s, !!c);
2853
+ var e = /* @__PURE__ */ Sr(), n = ls(), t = n(e("String.prototype.indexOf"));
2854
+ return nr = function(s, l) {
2855
+ var r = e(s, !!l);
2859
2856
  return typeof r == "function" && t(s, ".prototype.") > -1 ? n(r) : r;
2860
2857
  }, nr;
2861
2858
  }
2862
- const cs = /* @__PURE__ */ la(ua);
2859
+ const us = /* @__PURE__ */ fa(pa);
2863
2860
  var or, Wn;
2864
- function ls() {
2861
+ function fs() {
2865
2862
  if (Wn) return or;
2866
2863
  Wn = 1;
2867
- var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, c = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = s && c && typeof c.get == "function" ? c.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, l = i ? WeakMap.prototype.has : null, h = typeof WeakSet == "function" && WeakSet.prototype, f = h ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, m = u ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, d = Function.prototype.toString, y = String.prototype.match, g = String.prototype.slice, w = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
2864
+ var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, o = e && Map.prototype.forEach, s = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = s && l && typeof l.get == "function" ? l.get : null, a = s && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, h = typeof WeakSet == "function" && WeakSet.prototype, f = h ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, m = u ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, $ = Object.prototype.toString, d = Function.prototype.toString, y = String.prototype.match, g = String.prototype.slice, w = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, q = Array.prototype.join, L = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(j) {
2868
2865
  return j.__proto__;
2869
2866
  } : null);
2870
- function N(j, S) {
2867
+ function k(j, S) {
2871
2868
  if (j === 1 / 0 || j === -1 / 0 || j !== j || j && j > -1e3 && j < 1e3 || O.call(/e/, S))
2872
2869
  return S;
2873
2870
  var X = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
@@ -2880,7 +2877,7 @@ function ls() {
2880
2877
  }
2881
2878
  return w.call(S, X, "$&_");
2882
2879
  }
2883
- var re = cs, R = re.custom, k = F(R) ? R : null;
2880
+ var re = us, R = re.custom, N = F(R) ? R : null;
2884
2881
  or = function j(S, X, ee, ie) {
2885
2882
  var M = X || {};
2886
2883
  if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
@@ -2907,11 +2904,11 @@ function ls() {
2907
2904
  if (S === 0)
2908
2905
  return 1 / 0 / S > 0 ? "0" : "-0";
2909
2906
  var de = String(S);
2910
- return Ce ? N(S, de) : de;
2907
+ return Ce ? k(S, de) : de;
2911
2908
  }
2912
2909
  if (typeof S == "bigint") {
2913
2910
  var je = String(S) + "n";
2914
- return Ce ? N(S, je) : je;
2911
+ return Ce ? k(S, je) : je;
2915
2912
  }
2916
2913
  var st = typeof M.depth > "u" ? 5 : M.depth;
2917
2914
  if (typeof ee > "u" && (ee = 0), ee >= st && st > 0 && typeof S == "object")
@@ -2931,30 +2928,30 @@ function ls() {
2931
2928
  return j(Ie, M, ee + 1, ie);
2932
2929
  }
2933
2930
  if (typeof S == "function" && !z(S)) {
2934
- var kr = oe(S), Nr = Ve(S, ge);
2935
- return "[Function" + (kr ? ": " + kr : " (anonymous)") + "]" + (Nr.length > 0 ? " { " + q.call(Nr, ", ") + " }" : "");
2931
+ var Nr = oe(S), kr = Ve(S, ge);
2932
+ return "[Function" + (Nr ? ": " + Nr : " (anonymous)") + "]" + (kr.length > 0 ? " { " + q.call(kr, ", ") + " }" : "");
2936
2933
  }
2937
2934
  if (F(S)) {
2938
2935
  var Er = H ? w.call(String(S), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(S);
2939
2936
  return typeof S == "object" && !H ? Fe(Er) : Er;
2940
2937
  }
2941
2938
  if (Ee(S)) {
2942
- for (var _e = "<" + p.call(String(S.nodeName)), ct = S.attributes || [], De = 0; De < ct.length; De++)
2943
- _e += " " + ct[De].name + "=" + U(C(ct[De].value), "double", M);
2939
+ for (var _e = "<" + p.call(String(S.nodeName)), lt = S.attributes || [], De = 0; De < lt.length; De++)
2940
+ _e += " " + lt[De].name + "=" + U(C(lt[De].value), "double", M);
2944
2941
  return _e += ">", S.childNodes && S.childNodes.length && (_e += "..."), _e += "</" + p.call(String(S.nodeName)) + ">", _e;
2945
2942
  }
2946
2943
  if (I(S)) {
2947
2944
  if (S.length === 0)
2948
2945
  return "[]";
2949
- var lt = Ve(S, ge);
2950
- return Ae && !wo(lt) ? "[" + it(lt, Ae) + "]" : "[ " + q.call(lt, ", ") + " ]";
2946
+ var ct = Ve(S, ge);
2947
+ return Ae && !wo(ct) ? "[" + it(ct, Ae) + "]" : "[ " + q.call(ct, ", ") + " ]";
2951
2948
  }
2952
2949
  if (K(S)) {
2953
2950
  var ut = Ve(S, ge);
2954
2951
  return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + q.call(b.call("[cause]: " + ge(S.cause), ut), ", ") + " }" : ut.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + q.call(ut, ", ") + " }";
2955
2952
  }
2956
2953
  if (typeof S == "object" && $e) {
2957
- if (k && typeof S[k] == "function" && re)
2954
+ if (N && typeof S[N] == "function" && re)
2958
2955
  return re(S, { depth: st - ee });
2959
2956
  if ($e !== "symbol" && typeof S.inspect == "function")
2960
2957
  return S.inspect();
@@ -2971,9 +2968,9 @@ function ls() {
2971
2968
  Ir.push(ge(Ie, S));
2972
2969
  }), qr("Set", r.call(S), Ir, Ae);
2973
2970
  }
2974
- if (ke(S))
2975
- return at("WeakMap");
2976
2971
  if (Ne(S))
2972
+ return at("WeakMap");
2973
+ if (ke(S))
2977
2974
  return at("WeakSet");
2978
2975
  if (Te(S))
2979
2976
  return at("WeakRef");
@@ -3083,11 +3080,11 @@ function ls() {
3083
3080
  }
3084
3081
  return !1;
3085
3082
  }
3086
- function ke(j) {
3087
- if (!l || !j || typeof j != "object")
3083
+ function Ne(j) {
3084
+ if (!c || !j || typeof j != "object")
3088
3085
  return !1;
3089
3086
  try {
3090
- l.call(j, l);
3087
+ c.call(j, c);
3091
3088
  try {
3092
3089
  f.call(j, f);
3093
3090
  } catch {
@@ -3122,13 +3119,13 @@ function ls() {
3122
3119
  }
3123
3120
  return !1;
3124
3121
  }
3125
- function Ne(j) {
3122
+ function ke(j) {
3126
3123
  if (!f || !j || typeof j != "object")
3127
3124
  return !1;
3128
3125
  try {
3129
3126
  f.call(j, f);
3130
3127
  try {
3131
- l.call(j, l);
3128
+ c.call(j, c);
3132
3129
  } catch {
3133
3130
  return !0;
3134
3131
  }
@@ -3219,10 +3216,10 @@ function ls() {
3219
3216
  return or;
3220
3217
  }
3221
3218
  var ar, Jn;
3222
- function us() {
3219
+ function ps() {
3223
3220
  if (Jn) return ar;
3224
3221
  Jn = 1;
3225
- var e = /* @__PURE__ */ Sr(), n = ss(), t = /* @__PURE__ */ ls(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), c = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), a = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), l = n("Map.prototype.get", !0), h = n("Map.prototype.set", !0), f = n("Map.prototype.has", !0), u = function(d, y) {
3222
+ var e = /* @__PURE__ */ Sr(), n = cs(), t = /* @__PURE__ */ fs(), o = /* @__PURE__ */ We(), s = e("%WeakMap%", !0), l = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), a = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), h = n("Map.prototype.set", !0), f = n("Map.prototype.has", !0), u = function(d, y) {
3226
3223
  for (var g = d, w; (w = g.next) !== null; g = w)
3227
3224
  if (w.key === y)
3228
3225
  return g.next = w.next, w.next = /** @type {NonNullable<typeof list.next>} */
@@ -3252,9 +3249,9 @@ function us() {
3252
3249
  if (s && p && (typeof p == "object" || typeof p == "function")) {
3253
3250
  if (y)
3254
3251
  return r(y, p);
3255
- } else if (c) {
3252
+ } else if (l) {
3256
3253
  if (g)
3257
- return l(g, p);
3254
+ return c(g, p);
3258
3255
  } else if (w)
3259
3256
  return m(w, p);
3260
3257
  },
@@ -3262,7 +3259,7 @@ function us() {
3262
3259
  if (s && p && (typeof p == "object" || typeof p == "function")) {
3263
3260
  if (y)
3264
3261
  return i(y, p);
3265
- } else if (c) {
3262
+ } else if (l) {
3266
3263
  if (g)
3267
3264
  return f(g, p);
3268
3265
  } else if (w)
@@ -3270,7 +3267,7 @@ function us() {
3270
3267
  return !1;
3271
3268
  },
3272
3269
  set: function(p, O) {
3273
- s && p && (typeof p == "object" || typeof p == "function") ? (y || (y = new s()), a(y, p, O)) : c ? (g || (g = new c()), h(g, p, O)) : (w || (w = { key: {}, next: null }), x(w, p, O));
3270
+ s && p && (typeof p == "object" || typeof p == "function") ? (y || (y = new s()), a(y, p, O)) : l ? (g || (g = new l()), h(g, p, O)) : (w || (w = { key: {}, next: null }), x(w, p, O));
3274
3271
  }
3275
3272
  };
3276
3273
  return T;
@@ -3315,7 +3312,7 @@ function go() {
3315
3312
  g.obj[g.prop] = T;
3316
3313
  }
3317
3314
  }
3318
- }, c = function(y, g) {
3315
+ }, l = function(y, g) {
3319
3316
  for (var w = g && g.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < y.length; ++T)
3320
3317
  typeof y[T] < "u" && (w[T] = y[T]);
3321
3318
  return w;
@@ -3334,7 +3331,7 @@ function go() {
3334
3331
  if (!y || typeof y != "object")
3335
3332
  return [y].concat(g);
3336
3333
  var T = y;
3337
- return t(y) && !t(g) && (T = c(y, w)), t(y) && t(g) ? (g.forEach(function(p, O) {
3334
+ return t(y) && !t(g) && (T = l(y, w)), t(y) && t(g) ? (g.forEach(function(p, O) {
3338
3335
  if (n.call(y, O)) {
3339
3336
  var b = y[O];
3340
3337
  b && typeof b == "object" && p && typeof p == "object" ? y[O] = d(b, p, w) : y.push(p);
@@ -3357,7 +3354,7 @@ function go() {
3357
3354
  } catch {
3358
3355
  return w;
3359
3356
  }
3360
- }, l = 1024, h = function(y, g, w, T, p) {
3357
+ }, c = 1024, h = function(y, g, w, T, p) {
3361
3358
  if (y.length === 0)
3362
3359
  return y;
3363
3360
  var O = y;
@@ -3365,8 +3362,8 @@ function go() {
3365
3362
  return escape(O).replace(/%u[0-9a-f]{4}/gi, function(ae) {
3366
3363
  return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
3367
3364
  });
3368
- for (var b = "", q = 0; q < O.length; q += l) {
3369
- for (var L = O.length >= l ? O.slice(q, q + l) : O, E = [], B = 0; B < L.length; ++B) {
3365
+ for (var b = "", q = 0; q < O.length; q += c) {
3366
+ for (var L = O.length >= c ? O.slice(q, q + c) : O, E = [], B = 0; B < L.length; ++B) {
3370
3367
  var P = L.charCodeAt(B);
3371
3368
  if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || p === e.RFC1738 && (P === 40 || P === 41)) {
3372
3369
  E[E.length] = L.charAt(B);
@@ -3411,7 +3408,7 @@ function go() {
3411
3408
  return g(y);
3412
3409
  };
3413
3410
  return sr = {
3414
- arrayToObject: c,
3411
+ arrayToObject: l,
3415
3412
  assign: a,
3416
3413
  combine: x,
3417
3414
  compact: f,
@@ -3423,11 +3420,11 @@ function go() {
3423
3420
  merge: r
3424
3421
  }, sr;
3425
3422
  }
3426
- var cr, Qn;
3427
- function fs() {
3428
- if (Qn) return cr;
3423
+ var lr, Qn;
3424
+ function ds() {
3425
+ if (Qn) return lr;
3429
3426
  Qn = 1;
3430
- var e = us(), n = /* @__PURE__ */ go(), t = /* @__PURE__ */ Or(), o = Object.prototype.hasOwnProperty, s = {
3427
+ var e = ps(), n = /* @__PURE__ */ go(), t = /* @__PURE__ */ Or(), o = Object.prototype.hasOwnProperty, s = {
3431
3428
  brackets: function(d) {
3432
3429
  return d + "[]";
3433
3430
  },
@@ -3438,9 +3435,9 @@ function fs() {
3438
3435
  repeat: function(d) {
3439
3436
  return d;
3440
3437
  }
3441
- }, c = Array.isArray, r = Array.prototype.push, a = function($, d) {
3442
- r.apply($, c(d) ? d : [d]);
3443
- }, i = Date.prototype.toISOString, l = t.default, h = {
3438
+ }, l = Array.isArray, r = Array.prototype.push, a = function($, d) {
3439
+ r.apply($, l(d) ? d : [d]);
3440
+ }, i = Date.prototype.toISOString, c = t.default, h = {
3444
3441
  addQueryPrefix: !1,
3445
3442
  allowDots: !1,
3446
3443
  allowEmptyArrays: !1,
@@ -3452,8 +3449,8 @@ function fs() {
3452
3449
  encodeDotInKeys: !1,
3453
3450
  encoder: n.encode,
3454
3451
  encodeValuesOnly: !1,
3455
- format: l,
3456
- formatter: t.formatters[l],
3452
+ format: c,
3453
+ formatter: t.formatters[c],
3457
3454
  // deprecated
3458
3455
  indices: !1,
3459
3456
  serializeDate: function(d) {
@@ -3464,48 +3461,48 @@ function fs() {
3464
3461
  }, f = function(d) {
3465
3462
  return typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "symbol" || typeof d == "bigint";
3466
3463
  }, u = {}, m = function $(d, y, g, w, T, p, O, b, q, L, E, B, P, ae, H, D, se, Z) {
3467
- for (var N = d, re = Z, R = 0, k = !1; (re = re.get(u)) !== void 0 && !k; ) {
3464
+ for (var k = d, re = Z, R = 0, N = !1; (re = re.get(u)) !== void 0 && !N; ) {
3468
3465
  var U = re.get(d);
3469
3466
  if (R += 1, typeof U < "u") {
3470
3467
  if (U === R)
3471
3468
  throw new RangeError("Cyclic object value");
3472
- k = !0;
3469
+ N = !0;
3473
3470
  }
3474
3471
  typeof re.get(u) > "u" && (R = 0);
3475
3472
  }
3476
- if (typeof L == "function" ? N = L(y, N) : N instanceof Date ? N = P(N) : g === "comma" && c(N) && (N = n.maybeMap(N, function(Y) {
3473
+ if (typeof L == "function" ? k = L(y, k) : k instanceof Date ? k = P(k) : g === "comma" && l(k) && (k = n.maybeMap(k, function(Y) {
3477
3474
  return Y instanceof Date ? P(Y) : Y;
3478
- })), N === null) {
3475
+ })), k === null) {
3479
3476
  if (p)
3480
3477
  return q && !D ? q(y, h.encoder, se, "key", ae) : y;
3481
- N = "";
3478
+ k = "";
3482
3479
  }
3483
- if (f(N) || n.isBuffer(N)) {
3480
+ if (f(k) || n.isBuffer(k)) {
3484
3481
  if (q) {
3485
3482
  var C = D ? y : q(y, h.encoder, se, "key", ae);
3486
- return [H(C) + "=" + H(q(N, h.encoder, se, "value", ae))];
3483
+ return [H(C) + "=" + H(q(k, h.encoder, se, "value", ae))];
3487
3484
  }
3488
- return [H(y) + "=" + H(String(N))];
3485
+ return [H(y) + "=" + H(String(k))];
3489
3486
  }
3490
3487
  var I = [];
3491
- if (typeof N > "u")
3488
+ if (typeof k > "u")
3492
3489
  return I;
3493
3490
  var W;
3494
- if (g === "comma" && c(N))
3495
- D && q && (N = n.maybeMap(N, q)), W = [{ value: N.length > 0 ? N.join(",") || null : void 0 }];
3496
- else if (c(L))
3491
+ if (g === "comma" && l(k))
3492
+ D && q && (k = n.maybeMap(k, q)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
3493
+ else if (l(L))
3497
3494
  W = L;
3498
3495
  else {
3499
- var z = Object.keys(N);
3496
+ var z = Object.keys(k);
3500
3497
  W = E ? z.sort(E) : z;
3501
3498
  }
3502
- var K = b ? y.replace(/\./g, "%2E") : y, ne = w && c(N) && N.length === 1 ? K + "[]" : K;
3503
- if (T && c(N) && N.length === 0)
3499
+ var K = b ? y.replace(/\./g, "%2E") : y, ne = w && l(k) && k.length === 1 ? K + "[]" : K;
3500
+ if (T && l(k) && k.length === 0)
3504
3501
  return ne + "[]";
3505
3502
  for (var J = 0; J < W.length; ++J) {
3506
- var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value : N[A];
3503
+ var A = W[J], F = typeof A == "object" && typeof A.value < "u" ? A.value : k[A];
3507
3504
  if (!(O && F === null)) {
3508
- var _ = B && b ? A.replace(/\./g, "%2E") : A, Q = c(N) ? typeof g == "function" ? g(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3505
+ var _ = B && b ? A.replace(/\./g, "%2E") : A, Q = l(k) ? typeof g == "function" ? g(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3509
3506
  Z.set(d, R);
3510
3507
  var G = e();
3511
3508
  G.set(u, Z), a(I, $(
@@ -3517,7 +3514,7 @@ function fs() {
3517
3514
  p,
3518
3515
  O,
3519
3516
  b,
3520
- g === "comma" && D && c(N) ? null : q,
3517
+ g === "comma" && D && l(k) ? null : q,
3521
3518
  L,
3522
3519
  E,
3523
3520
  B,
@@ -3550,7 +3547,7 @@ function fs() {
3550
3547
  g = d.format;
3551
3548
  }
3552
3549
  var w = t.formatters[g], T = h.filter;
3553
- (typeof d.filter == "function" || c(d.filter)) && (T = d.filter);
3550
+ (typeof d.filter == "function" || l(d.filter)) && (T = d.filter);
3554
3551
  var p;
3555
3552
  if (d.arrayFormat in s ? p = d.arrayFormat : "indices" in d ? p = d.indices ? "indices" : "repeat" : p = h.arrayFormat, "commaRoundTrip" in d && typeof d.commaRoundTrip != "boolean")
3556
3553
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
@@ -3577,9 +3574,9 @@ function fs() {
3577
3574
  strictNullHandling: typeof d.strictNullHandling == "boolean" ? d.strictNullHandling : h.strictNullHandling
3578
3575
  };
3579
3576
  };
3580
- return cr = function($, d) {
3577
+ return lr = function($, d) {
3581
3578
  var y = $, g = x(d), w, T;
3582
- typeof g.filter == "function" ? (T = g.filter, y = T("", y)) : c(g.filter) && (T = g.filter, w = T);
3579
+ typeof g.filter == "function" ? (T = g.filter, y = T("", y)) : l(g.filter) && (T = g.filter, w = T);
3583
3580
  var p = [];
3584
3581
  if (typeof y != "object" || y === null)
3585
3582
  return "";
@@ -3610,11 +3607,11 @@ function fs() {
3610
3607
  }
3611
3608
  var B = p.join(g.delimiter), P = g.addQueryPrefix === !0 ? "?" : "";
3612
3609
  return g.charsetSentinel && (g.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), B.length > 0 ? P + B : "";
3613
- }, cr;
3610
+ }, lr;
3614
3611
  }
3615
- var lr, Kn;
3616
- function ps() {
3617
- if (Kn) return lr;
3612
+ var cr, Kn;
3613
+ function hs() {
3614
+ if (Kn) return cr;
3618
3615
  Kn = 1;
3619
3616
  var e = /* @__PURE__ */ go(), n = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
3620
3617
  allowDots: !1,
@@ -3641,7 +3638,7 @@ function ps() {
3641
3638
  return u.replace(/&#(\d+);/g, function(m, x) {
3642
3639
  return String.fromCharCode(parseInt(x, 10));
3643
3640
  });
3644
- }, c = function(u, m) {
3641
+ }, l = function(u, m) {
3645
3642
  return u && typeof u == "string" && m.comma && u.indexOf(",") > -1 ? u.split(",") : u;
3646
3643
  }, r = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", i = function(m, x) {
3647
3644
  var $ = { __proto__: null }, d = x.ignoreQueryPrefix ? m.replace(/^\?/, "") : m;
@@ -3654,7 +3651,7 @@ function ps() {
3654
3651
  if (T !== w) {
3655
3652
  var O = g[T], b = O.indexOf("]="), q = b === -1 ? O.indexOf("=") : b + 1, L, E;
3656
3653
  q === -1 ? (L = x.decoder(O, o.decoder, p, "key"), E = x.strictNullHandling ? null : "") : (L = x.decoder(O.slice(0, q), o.decoder, p, "key"), E = e.maybeMap(
3657
- c(O.slice(q + 1), x),
3654
+ l(O.slice(q + 1), x),
3658
3655
  function(P) {
3659
3656
  return x.decoder(P, o.decoder, p, "value");
3660
3657
  }
@@ -3663,8 +3660,8 @@ function ps() {
3663
3660
  B && x.duplicates === "combine" ? $[L] = e.combine($[L], E) : (!B || x.duplicates === "last") && ($[L] = E);
3664
3661
  }
3665
3662
  return $;
3666
- }, l = function(u, m, x, $) {
3667
- for (var d = $ ? m : c(m, x), y = u.length - 1; y >= 0; --y) {
3663
+ }, c = function(u, m, x, $) {
3664
+ for (var d = $ ? m : l(m, x), y = u.length - 1; y >= 0; --y) {
3668
3665
  var g, w = u[y];
3669
3666
  if (w === "[]" && x.parseArrays)
3670
3667
  g = x.allowEmptyArrays && (d === "" || x.strictNullHandling && d === null) ? [] : [].concat(d);
@@ -3694,7 +3691,7 @@ function ps() {
3694
3691
  throw new RangeError("Input depth exceeded depth option of " + $.depth + " and strictDepth is true");
3695
3692
  O.push("[" + y.slice(T.index) + "]");
3696
3693
  }
3697
- return l(O, x, $, d);
3694
+ return c(O, x, $, d);
3698
3695
  }
3699
3696
  }, f = function(m) {
3700
3697
  if (!m)
@@ -3735,7 +3732,7 @@ function ps() {
3735
3732
  strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : o.strictNullHandling
3736
3733
  };
3737
3734
  };
3738
- return lr = function(u, m) {
3735
+ return cr = function(u, m) {
3739
3736
  var x = f(m);
3740
3737
  if (u === "" || u === null || typeof u > "u")
3741
3738
  return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
@@ -3744,13 +3741,13 @@ function ps() {
3744
3741
  d = e.merge(d, T, x);
3745
3742
  }
3746
3743
  return x.allowSparse === !0 ? d : e.compact(d);
3747
- }, lr;
3744
+ }, cr;
3748
3745
  }
3749
3746
  var ur, Yn;
3750
3747
  function vo() {
3751
3748
  if (Yn) return ur;
3752
3749
  Yn = 1;
3753
- var e = /* @__PURE__ */ fs(), n = /* @__PURE__ */ ps(), t = /* @__PURE__ */ Or();
3750
+ var e = /* @__PURE__ */ ds(), n = /* @__PURE__ */ hs(), t = /* @__PURE__ */ Or();
3754
3751
  return ur = {
3755
3752
  formats: t,
3756
3753
  parse: n,
@@ -3758,14 +3755,14 @@ function vo() {
3758
3755
  }, ur;
3759
3756
  }
3760
3757
  var Xn;
3761
- function ds() {
3758
+ function ys() {
3762
3759
  if (Xn) return Re;
3763
3760
  Xn = 1;
3764
- var e = Ai();
3761
+ var e = Li();
3765
3762
  function n() {
3766
3763
  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;
3767
3764
  }
3768
- var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, c = [
3765
+ var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, s = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, l = [
3769
3766
  "<",
3770
3767
  ">",
3771
3768
  '"',
@@ -3782,13 +3779,13 @@ function ds() {
3782
3779
  "\\",
3783
3780
  "^",
3784
3781
  "`"
3785
- ].concat(c), a = ["'"].concat(r), i = [
3782
+ ].concat(l), a = ["'"].concat(r), i = [
3786
3783
  "%",
3787
3784
  "/",
3788
3785
  "?",
3789
3786
  ";",
3790
3787
  "#"
3791
- ].concat(a), l = [
3788
+ ].concat(a), c = [
3792
3789
  "/",
3793
3790
  "?",
3794
3791
  "#"
@@ -3838,26 +3835,26 @@ function ds() {
3838
3835
  se && !(H && x[H]) && (P = P.substr(2), this.slashes = !0);
3839
3836
  }
3840
3837
  if (!x[H] && (se || H && !$[H])) {
3841
- for (var Z = -1, N = 0; N < l.length; N++) {
3842
- var re = P.indexOf(l[N]);
3838
+ for (var Z = -1, k = 0; k < c.length; k++) {
3839
+ var re = P.indexOf(c[k]);
3843
3840
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
3844
3841
  }
3845
- var R, k;
3846
- Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (R = P.slice(0, k), P = P.slice(k + 1), this.auth = decodeURIComponent(R)), Z = -1;
3847
- for (var N = 0; N < i.length; N++) {
3848
- var re = P.indexOf(i[N]);
3842
+ var R, N;
3843
+ Z === -1 ? N = P.lastIndexOf("@") : N = P.lastIndexOf("@", Z), N !== -1 && (R = P.slice(0, N), P = P.slice(N + 1), this.auth = decodeURIComponent(R)), Z = -1;
3844
+ for (var k = 0; k < i.length; k++) {
3845
+ var re = P.indexOf(i[k]);
3849
3846
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
3850
3847
  }
3851
3848
  Z === -1 && (Z = P.length), this.host = P.slice(0, Z), P = P.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
3852
3849
  var U = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
3853
3850
  if (!U)
3854
- for (var C = this.hostname.split(/\./), N = 0, I = C.length; N < I; N++) {
3855
- var W = C[N];
3851
+ for (var C = this.hostname.split(/\./), k = 0, I = C.length; k < I; k++) {
3852
+ var W = C[k];
3856
3853
  if (W && !W.match(f)) {
3857
3854
  for (var z = "", K = 0, ne = W.length; K < ne; K++)
3858
3855
  W.charCodeAt(K) > 127 ? z += "x" : z += W[K];
3859
3856
  if (!z.match(f)) {
3860
- var J = C.slice(0, N), A = C.slice(N + 1), F = W.match(u);
3857
+ var J = C.slice(0, k), A = C.slice(k + 1), F = W.match(u);
3861
3858
  F && (J.push(F[1]), A.unshift(F[2])), A.length && (P = "/" + A.join(".") + P), this.hostname = J.join(".");
3862
3859
  break;
3863
3860
  }
@@ -3868,8 +3865,8 @@ function ds() {
3868
3865
  this.host = Q + _, this.href += this.host, U && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
3869
3866
  }
3870
3867
  if (!m[D])
3871
- for (var N = 0, I = a.length; N < I; N++) {
3872
- var G = a[N];
3868
+ for (var k = 0, I = a.length; k < I; k++) {
3869
+ var G = a[k];
3873
3870
  if (P.indexOf(G) !== -1) {
3874
3871
  var Y = encodeURIComponent(G);
3875
3872
  Y === G && (Y = escape(G)), P = P.split(G).join(Y);
@@ -3942,13 +3939,13 @@ function ds() {
3942
3939
  } else
3943
3940
  b.pathname = p.pathname;
3944
3941
  if (b.search = p.search, b.query = p.query, b.host = p.host || "", b.auth = p.auth, b.hostname = p.hostname || p.host, b.port = p.port, b.pathname || b.search) {
3945
- var Z = b.pathname || "", N = b.search || "";
3946
- b.path = Z + N;
3942
+ var Z = b.pathname || "", k = b.search || "";
3943
+ b.path = Z + k;
3947
3944
  }
3948
3945
  return b.slashes = b.slashes || p.slashes, b.href = b.format(), b;
3949
3946
  }
3950
- var re = b.pathname && b.pathname.charAt(0) === "/", R = p.host || p.pathname && p.pathname.charAt(0) === "/", k = R || re || b.host && p.pathname, U = k, C = b.pathname && b.pathname.split("/") || [], I = p.pathname && p.pathname.split("/") || [], W = b.protocol && !$[b.protocol];
3951
- if (W && (b.hostname = "", b.port = null, b.host && (C[0] === "" ? C[0] = b.host : C.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (I[0] === "" ? I[0] = p.host : I.unshift(p.host)), p.host = null), k = k && (I[0] === "" || C[0] === "")), R)
3947
+ var re = b.pathname && b.pathname.charAt(0) === "/", R = p.host || p.pathname && p.pathname.charAt(0) === "/", N = R || re || b.host && p.pathname, U = N, C = b.pathname && b.pathname.split("/") || [], I = p.pathname && p.pathname.split("/") || [], W = b.protocol && !$[b.protocol];
3948
+ if (W && (b.hostname = "", b.port = null, b.host && (C[0] === "" ? C[0] = b.host : C.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (I[0] === "" ? I[0] = p.host : I.unshift(p.host)), p.host = null), N = N && (I[0] === "" || C[0] === "")), R)
3952
3949
  b.host = p.host || p.host === "" ? p.host : b.host, b.hostname = p.hostname || p.hostname === "" ? p.hostname : b.hostname, b.search = p.search, b.query = p.query, C = I;
3953
3950
  else if (I.length)
3954
3951
  C || (C = []), C.pop(), C = C.concat(I), b.search = p.search, b.query = p.query;
@@ -3964,28 +3961,28 @@ function ds() {
3964
3961
  return b.pathname = null, b.search ? b.path = "/" + b.search : b.path = null, b.href = b.format(), b;
3965
3962
  for (var K = C.slice(-1)[0], ne = (b.host || p.host || C.length > 1) && (K === "." || K === "..") || K === "", J = 0, A = C.length; A >= 0; A--)
3966
3963
  K = C[A], K === "." ? C.splice(A, 1) : K === ".." ? (C.splice(A, 1), J++) : J && (C.splice(A, 1), J--);
3967
- if (!k && !U)
3964
+ if (!N && !U)
3968
3965
  for (; J--; J)
3969
3966
  C.unshift("..");
3970
- k && C[0] !== "" && (!C[0] || C[0].charAt(0) !== "/") && C.unshift(""), ne && C.join("/").substr(-1) !== "/" && C.push("");
3967
+ N && C[0] !== "" && (!C[0] || C[0].charAt(0) !== "/") && C.unshift(""), ne && C.join("/").substr(-1) !== "/" && C.push("");
3971
3968
  var F = C[0] === "" || C[0] && C[0].charAt(0) === "/";
3972
3969
  if (W) {
3973
3970
  b.hostname = F ? "" : C.length ? C.shift() : "", b.host = b.hostname;
3974
3971
  var z = b.host && b.host.indexOf("@") > 0 ? b.host.split("@") : !1;
3975
3972
  z && (b.auth = z.shift(), b.hostname = z.shift(), b.host = b.hostname);
3976
3973
  }
3977
- return k = k || b.host && C.length, k && !F && C.unshift(""), C.length > 0 ? b.pathname = C.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth = p.auth || b.auth, b.slashes = b.slashes || p.slashes, b.href = b.format(), b;
3974
+ return N = N || b.host && C.length, N && !F && C.unshift(""), C.length > 0 ? b.pathname = C.join("/") : (b.pathname = null, b.path = null), (b.pathname !== null || b.search !== null) && (b.path = (b.pathname ? b.pathname : "") + (b.search ? b.search : "")), b.auth = p.auth || b.auth, b.slashes = b.slashes || p.slashes, b.href = b.format(), b;
3978
3975
  }, n.prototype.parseHost = function() {
3979
3976
  var p = this.host, O = o.exec(p);
3980
3977
  O && (O = O[0], O !== ":" && (this.port = O.substr(1)), p = p.substr(0, p.length - O.length)), p && (this.hostname = p);
3981
3978
  }, Re.parse = y, Re.resolve = w, Re.resolveObject = T, Re.format = g, Re.Url = n, Re;
3982
3979
  }
3983
- var fr = ds(), pr = /* @__PURE__ */ vo(), hs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), ys = class {
3980
+ var fr = ys(), pr = /* @__PURE__ */ vo(), ms = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), gs = class {
3984
3981
  constructor(e, n = {}) {
3985
3982
  this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
3986
3983
  harIsAlreadyEncoded: !1,
3987
3984
  ...n
3988
- }, this.requests = [], hs(e) ? this.entries = e.log.entries : this.entries = [
3985
+ }, this.requests = [], ms(e) ? this.entries = e.log.entries : this.entries = [
3989
3986
  {
3990
3987
  request: e
3991
3988
  }
@@ -4075,10 +4072,10 @@ var fr = ds(), pr = /* @__PURE__ */ vo(), hs = (e) => typeof e == "object" && "l
4075
4072
  const s = {
4076
4073
  ...t.allHeaders,
4077
4074
  ...t.headersObj
4078
- }, c = fr.parse(t.url, !0, !0);
4075
+ }, l = fr.parse(t.url, !0, !0);
4079
4076
  t.queryObj = {
4080
4077
  ...t.queryObj,
4081
- ...c.query
4078
+ ...l.query
4082
4079
  };
4083
4080
  let r;
4084
4081
  n.harIsAlreadyEncoded ? r = pr.stringify(t.queryObj, {
@@ -4088,56 +4085,56 @@ var fr = ds(), pr = /* @__PURE__ */ vo(), hs = (e) => typeof e == "object" && "l
4088
4085
  indices: !1
4089
4086
  });
4090
4087
  const a = {
4091
- ...c,
4088
+ ...l,
4092
4089
  query: t.queryObj,
4093
4090
  search: r,
4094
- path: r ? `${c.pathname}?${r}` : c.pathname
4091
+ path: r ? `${l.pathname}?${r}` : l.pathname
4095
4092
  }, i = fr.format({
4096
- ...c,
4093
+ ...l,
4097
4094
  query: null,
4098
4095
  search: null
4099
- }), l = fr.format({
4100
- ...c,
4096
+ }), c = fr.format({
4097
+ ...l,
4101
4098
  ...a
4102
4099
  });
4103
4100
  return {
4104
4101
  ...t,
4105
4102
  allHeaders: s,
4106
- fullUrl: l,
4103
+ fullUrl: c,
4107
4104
  url: i,
4108
4105
  uriObj: a
4109
4106
  };
4110
4107
  }
4111
4108
  convert(e, n, t) {
4112
4109
  this.initCalled || this.init(), !t && n && (t = n);
4113
- const o = Ni[e];
4110
+ const o = Ai[e];
4114
4111
  if (!o)
4115
4112
  return !1;
4116
4113
  const { convert: s } = o.clientsById[n || o.info.default];
4117
4114
  return this.requests.map((r) => s(r, t));
4118
4115
  }
4119
4116
  };
4120
- const ms = ({
4117
+ const vs = ({
4121
4118
  rootMargin: e = "0px",
4122
4119
  threshold: n
4123
4120
  } = {}) => {
4124
4121
  const [t, o] = Se(!1), s = vr(null);
4125
4122
  return ro(() => {
4126
- const c = new IntersectionObserver(
4123
+ const l = new IntersectionObserver(
4127
4124
  ([a]) => {
4128
4125
  a && o(a.isIntersecting);
4129
4126
  },
4130
4127
  { rootMargin: e, threshold: n }
4131
4128
  ), r = s.current;
4132
4129
  if (r)
4133
- return c.observe(r), () => c.unobserve(r);
4130
+ return l.observe(r), () => l.unobserve(r);
4134
4131
  }, [e, n]), [s, t];
4135
- }, gs = ye.Root, Zn = ye.CollapsibleTrigger, vs = ye.CollapsibleContent, bs = typeof window < "u" ? Vo : ro, Tr = ({
4132
+ }, bs = ye.Root, Zn = ye.CollapsibleTrigger, xs = ye.CollapsibleContent, $s = typeof window < "u" ? Qo : ro, Tr = ({
4136
4133
  children: e,
4137
4134
  maxHeight: n = 250
4138
4135
  }) => {
4139
- const t = vr(null), [o, s] = Se(!1), [c, r] = Se(!1);
4140
- return bs(() => {
4136
+ const t = vr(null), [o, s] = Se(!1), [l, r] = Se(!1);
4137
+ return $s(() => {
4141
4138
  const a = t.current;
4142
4139
  if (!a) return;
4143
4140
  s(a.scrollHeight > n);
@@ -4146,30 +4143,33 @@ const ms = ({
4146
4143
  });
4147
4144
  return i.observe(a), () => i.disconnect();
4148
4145
  }, [n]), /* @__PURE__ */ v.jsxs(
4149
- gs,
4146
+ bs,
4150
4147
  {
4151
4148
  className: "group",
4152
- open: c,
4149
+ open: l,
4153
4150
  onOpenChange: r,
4154
4151
  style: { "--max-height": `${n}px` },
4155
4152
  children: [
4156
4153
  /* @__PURE__ */ v.jsxs(
4157
- vs,
4154
+ xs,
4158
4155
  {
4159
4156
  forceMount: !0,
4160
4157
  className: pe(
4161
- "relative overflow-hidden",
4162
- !c && o && "max-h-[--max-height]"
4158
+ "relative overflow-hidden group",
4159
+ !l && o && "max-h-[--max-height]"
4163
4160
  ),
4164
4161
  children: [
4165
- !c && o && /* @__PURE__ */ v.jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10" }),
4162
+ !l && o && /* @__PURE__ */ v.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/90 dark:to-zinc-800/90 z-10 group-hover:to-transparent" }),
4166
4163
  /* @__PURE__ */ v.jsx("div", { ref: t, children: e }),
4167
- !c && o && /* @__PURE__ */ v.jsx(
4164
+ !l && o && /* @__PURE__ */ v.jsx(
4168
4165
  Zn,
4169
4166
  {
4170
- className: "absolute inset-0 grid place-items-center z-10",
4167
+ className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
4171
4168
  asChild: !0,
4172
- children: /* @__PURE__ */ v.jsx("div", { children: /* @__PURE__ */ v.jsx(Br, { className: "bg-primary/70 border border-accent-foreground/25", children: "Expand code" }) })
4169
+ children: /* @__PURE__ */ v.jsx("div", { children: /* @__PURE__ */ v.jsxs(Br, { variant: "outline", className: "hidden group-hover:flex", children: [
4170
+ /* @__PURE__ */ v.jsx(Fo, { size: 14, className: "mr-1.5" }),
4171
+ "Click to expand"
4172
+ ] }) })
4173
4173
  }
4174
4174
  )
4175
4175
  ]
@@ -4178,32 +4178,35 @@ const ms = ({
4178
4178
  o && /* @__PURE__ */ v.jsx(
4179
4179
  "div",
4180
4180
  {
4181
- className: pe("flex justify-center w-full mb-2", !c && "hidden"),
4182
- children: /* @__PURE__ */ v.jsx(Zn, { asChild: !0, children: /* @__PURE__ */ v.jsx(Br, { className: "border border-accent-foreground/25", children: "Collapse code" }) })
4181
+ className: pe("flex justify-center w-full mb-2", !l && "hidden"),
4182
+ children: /* @__PURE__ */ v.jsx(Zn, { asChild: !0, children: /* @__PURE__ */ v.jsxs(Br, { variant: "outline", size: "sm", children: [
4183
+ "Collapse",
4184
+ /* @__PURE__ */ v.jsx(_o, { size: 14, className: "ml-1.5" })
4185
+ ] }) })
4183
4186
  }
4184
4187
  )
4185
4188
  ]
4186
4189
  }
4187
4190
  );
4188
- }, xs = ({
4191
+ }, js = ({
4189
4192
  server: e,
4190
4193
  servers: n,
4191
4194
  operation: t
4192
4195
  }) => {
4193
4196
  var r, a, i;
4194
- const o = (r = t.parameters) == null ? void 0 : r.filter((l) => l.in === "header").map((l) => {
4197
+ const o = (r = t.parameters) == null ? void 0 : r.filter((c) => c.in === "header").map((c) => {
4195
4198
  var h, f;
4196
4199
  return {
4197
- name: l.name,
4198
- defaultValue: ((f = (h = l.examples) == null ? void 0 : h.find((u) => u.value)) == null ? void 0 : f.value) ?? ""
4200
+ name: c.name,
4201
+ defaultValue: ((f = (h = c.examples) == null ? void 0 : h.find((u) => u.value)) == null ? void 0 : f.value) ?? ""
4199
4202
  };
4200
- }), s = (a = t.parameters) == null ? void 0 : a.filter((l) => l.in === "query").sort((l, h) => l.required && !h.required ? -1 : 1).map((l) => ({
4201
- name: l.name,
4202
- defaultActive: l.required ?? !1,
4203
- isRequired: l.required ?? !1
4204
- })), c = (i = t.parameters) == null ? void 0 : i.filter((l) => l.in === "path").map((l) => ({ name: l.name }));
4203
+ }), s = (a = t.parameters) == null ? void 0 : a.filter((c) => c.in === "query").sort((c, h) => c.required && !h.required ? -1 : 1).map((c) => ({
4204
+ name: c.name,
4205
+ defaultActive: c.required ?? !1,
4206
+ isRequired: c.required ?? !1
4207
+ })), l = (i = t.parameters) == null ? void 0 : i.filter((c) => c.in === "path").map((c) => ({ name: c.name }));
4205
4208
  return /* @__PURE__ */ v.jsx(
4206
- Zo,
4209
+ ta,
4207
4210
  {
4208
4211
  server: e,
4209
4212
  servers: n,
@@ -4211,43 +4214,25 @@ const ms = ({
4211
4214
  url: t.path,
4212
4215
  headers: o,
4213
4216
  queryParams: s,
4214
- pathParams: c
4217
+ pathParams: l
4215
4218
  }
4216
4219
  );
4217
4220
  }, Pr = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx(
4218
4221
  "div",
4219
4222
  {
4220
- className: pe(
4221
- "rounded-lg overflow-hidden border dark:border-transparent",
4222
- n
4223
- ),
4223
+ className: pe("rounded-xl overflow-hidden border border-border", n),
4224
4224
  children: e
4225
4225
  }
4226
4226
  ), Cr = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx(
4227
4227
  "div",
4228
4228
  {
4229
4229
  className: pe(
4230
- "border-b dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
4230
+ "border-b bg-muted dark:bg-transparent text-card-foreground p-3",
4231
4231
  n
4232
4232
  ),
4233
4233
  children: e
4234
4234
  }
4235
- ), Rr = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx(
4236
- "div",
4237
- {
4238
- className: pe("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", n),
4239
- children: e
4240
- }
4241
- ), bo = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx(
4242
- "div",
4243
- {
4244
- className: pe(
4245
- "border-t dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2",
4246
- n
4247
- ),
4248
- children: e
4249
- }
4250
- ), Ue = (e, n) => {
4235
+ ), Rr = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx("div", { className: pe("bg-card overflow-auto p-2", n), children: e }), bo = ({ children: e, className: n }) => /* @__PURE__ */ v.jsx("div", { className: pe("border-t bg-muted dark:bg-transparent p-3", n), children: e }), Ue = (e, n) => {
4251
4236
  if (e.example !== void 0)
4252
4237
  return e.example;
4253
4238
  if (e.examples)
@@ -4281,7 +4266,7 @@ const ms = ({
4281
4266
  default:
4282
4267
  return {};
4283
4268
  }
4284
- }, $s = ({ content: e }) => {
4269
+ }, ws = ({ content: e }) => {
4285
4270
  var o, s;
4286
4271
  if (!e.length) return null;
4287
4272
  const n = e.at(0), t = ((s = (o = n == null ? void 0 : n.examples) == null ? void 0 : o.at(0)) == null ? void 0 : s.value) ?? (n != null && n.schema ? Ue(n.schema) : "");
@@ -4298,7 +4283,7 @@ const ms = ({
4298
4283
  }
4299
4284
  ) }) })
4300
4285
  ] }) });
4301
- }, js = ({
4286
+ }, Ss = ({
4302
4287
  responses: e,
4303
4288
  selectedResponse: n,
4304
4289
  onSelectResponse: t
@@ -4328,8 +4313,8 @@ const ms = ({
4328
4313
  )) })
4329
4314
  ] }),
4330
4315
  e.map((s) => {
4331
- var a, i, l;
4332
- const c = (a = s.content) == null ? void 0 : a.at(0), r = ((l = (i = c == null ? void 0 : c.examples) == null ? void 0 : i.at(0)) == null ? void 0 : l.value) ?? (c != null && c.schema ? Ue(c.schema) : "");
4316
+ var a, i, c;
4317
+ const l = (a = s.content) == null ? void 0 : a.at(0), r = ((c = (i = l == null ? void 0 : l.examples) == null ? void 0 : i.at(0)) == null ? void 0 : c.value) ?? (l != null && l.schema ? Ue(l.schema) : "");
4333
4318
  return /* @__PURE__ */ v.jsxs(Ke.Content, { value: s.statusCode, children: [
4334
4319
  /* @__PURE__ */ v.jsx(Rr, { className: "p-0", children: /* @__PURE__ */ v.jsx(Tr, { children: /* @__PURE__ */ v.jsx(
4335
4320
  xr,
@@ -4354,7 +4339,7 @@ const ms = ({
4354
4339
  purple: "text-purple-600",
4355
4340
  indigo: "text-indigo-600",
4356
4341
  gray: "text-gray-600"
4357
- }, ws = {
4342
+ }, Os = {
4358
4343
  get: be.green,
4359
4344
  post: be.blue,
4360
4345
  put: be.yellow,
@@ -4363,7 +4348,7 @@ const ms = ({
4363
4348
  options: be.indigo,
4364
4349
  head: be.gray,
4365
4350
  trace: be.gray
4366
- }, xo = (e) => ws[e.toLocaleLowerCase()] ?? be.gray, Ss = (e, n) => {
4351
+ }, xo = (e) => Os[e.toLocaleLowerCase()] ?? be.gray, Ts = (e, n) => {
4367
4352
  let t;
4368
4353
  switch (n) {
4369
4354
  case "shell":
@@ -4404,7 +4389,7 @@ const ms = ({
4404
4389
  break;
4405
4390
  }
4406
4391
  return t ? t[0] : "";
4407
- }, Os = tt(
4392
+ }, Ps = tt(
4408
4393
  /* GraphQL */
4409
4394
  `
4410
4395
  query getServerQuery($input: JSON!, $type: SchemaType!) {
@@ -4416,7 +4401,7 @@ const ms = ({
4416
4401
  }
4417
4402
  }
4418
4403
  `
4419
- ), Ts = [
4404
+ ), Cs = [
4420
4405
  { value: "shell", label: "cURL" },
4421
4406
  { value: "js", label: "JavaScript" },
4422
4407
  { value: "python", label: "Python" },
@@ -4428,17 +4413,17 @@ const ms = ({
4428
4413
  { value: "php", label: "PHP" },
4429
4414
  { value: "ruby", label: "Ruby" },
4430
4415
  { value: "swift", label: "Swift" }
4431
- ], Ps = ({
4416
+ ], Rs = ({
4432
4417
  operation: e,
4433
4418
  selectedResponse: n,
4434
4419
  onSelectResponse: t
4435
4420
  }) => {
4436
4421
  var g;
4437
- const { input: o, type: s } = br(), c = $r(Os, { input: o, type: s }), r = mr(c), a = xo(e.method), [i, l] = Co(), [, h] = to(), f = i.get("lang") ?? "shell", u = (g = e.requestBody) == null ? void 0 : g.content, m = e.path.split("/").map((w, T, p) => {
4422
+ const { input: o, type: s } = br(), l = $r(Ps, { input: o, type: s }), r = mr(l), a = xo(e.method), [i, c] = Co(), [, h] = to(), f = i.get("lang") ?? "shell", u = (g = e.requestBody) == null ? void 0 : g.content, m = e.path.split("/").map((w, T, p) => {
4438
4423
  const b = w.startsWith("{") && w.endsWith("}") || w.startsWith(":") ? w.replace(/[:{}]/g, "") : void 0;
4439
4424
  return (
4440
4425
  // eslint-disable-next-line react/no-array-index-key
4441
- /* @__PURE__ */ v.jsxs(Do, { children: [
4426
+ /* @__PURE__ */ v.jsxs(Ko, { children: [
4442
4427
  b ? /* @__PURE__ */ v.jsx(
4443
4428
  ao,
4444
4429
  {
@@ -4454,7 +4439,7 @@ const ms = ({
4454
4439
  );
4455
4440
  }), { selectedServer: x } = gr(), $ = eo(() => {
4456
4441
  var p;
4457
- const w = (p = u == null ? void 0 : u[0]) != null && p.schema ? Ue(u[0].schema) : void 0, T = new ys({
4442
+ const w = (p = u == null ? void 0 : u[0]) != null && p.schema ? Ue(u[0].schema) : void 0, T = new gs({
4458
4443
  method: e.method.toLocaleUpperCase(),
4459
4444
  url: (x ?? r.data.schema.url ?? "") + e.path.replaceAll("{", ":").replaceAll("}", ""),
4460
4445
  postData: w ? {
@@ -4468,7 +4453,7 @@ const ms = ({
4468
4453
  headersSize: 0,
4469
4454
  bodySize: 0
4470
4455
  });
4471
- return Ss(T, f);
4456
+ return Ts(T, f);
4472
4457
  }, [
4473
4458
  u,
4474
4459
  e.method,
@@ -4476,7 +4461,7 @@ const ms = ({
4476
4461
  x,
4477
4462
  r.data.schema.url,
4478
4463
  f
4479
- ]), [d, y] = ms({ rootMargin: "200px 0px 200px 0px" });
4464
+ ]), [d, y] = vs({ rootMargin: "200px 0px 200px 0px" });
4480
4465
  return /* @__PURE__ */ v.jsxs(
4481
4466
  "aside",
4482
4467
  {
@@ -4484,14 +4469,14 @@ const ms = ({
4484
4469
  className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
4485
4470
  children: [
4486
4471
  /* @__PURE__ */ v.jsxs(Pr, { children: [
4487
- /* @__PURE__ */ v.jsxs(Cr, { className: "flex justify-between items-center flex-nowrap py-3 gap-2 text-xs", children: [
4472
+ /* @__PURE__ */ v.jsxs(Cr, { className: "flex justify-between items-center flex-nowrap py-4 gap-2 text-xs", children: [
4488
4473
  /* @__PURE__ */ v.jsxs("span", { className: "font-mono break-words", children: [
4489
4474
  /* @__PURE__ */ v.jsx("span", { className: pe("font-semibold", a), children: e.method.toLocaleUpperCase() }),
4490
4475
  " ",
4491
4476
  m
4492
4477
  ] }),
4493
4478
  y && /* @__PURE__ */ v.jsx(
4494
- xs,
4479
+ js,
4495
4480
  {
4496
4481
  server: r.data.schema.url ?? "",
4497
4482
  servers: r.data.schema.servers.map((w) => w.url) ?? [],
@@ -4509,7 +4494,7 @@ const ms = ({
4509
4494
  code: $
4510
4495
  }
4511
4496
  ) }) }),
4512
- /* @__PURE__ */ v.jsxs(bo, { className: "flex items-center text-xs gap-2 justify-end py-1", children: [
4497
+ /* @__PURE__ */ v.jsxs(bo, { className: "flex items-center text-xs gap-2 justify-end py-3", children: [
4513
4498
  /* @__PURE__ */ v.jsx("span", { children: "Show example in" }),
4514
4499
  /* @__PURE__ */ v.jsx(
4515
4500
  oo,
@@ -4518,18 +4503,18 @@ const ms = ({
4518
4503
  value: f,
4519
4504
  onChange: (w) => {
4520
4505
  h(() => {
4521
- l((T) => (T.set("lang", w.target.value), T));
4506
+ c((T) => (T.set("lang", w.target.value), T));
4522
4507
  });
4523
4508
  },
4524
- options: Ts
4509
+ options: Cs
4525
4510
  }
4526
4511
  )
4527
4512
  ] })
4528
4513
  ] })
4529
4514
  ] }),
4530
- y && u && /* @__PURE__ */ v.jsx($s, { content: u }),
4515
+ y && u && /* @__PURE__ */ v.jsx(ws, { content: u }),
4531
4516
  y && e.responses.length > 0 && /* @__PURE__ */ v.jsx(
4532
- js,
4517
+ Ss,
4533
4518
  {
4534
4519
  selectedResponse: n,
4535
4520
  onSelectResponse: t,
@@ -4539,15 +4524,15 @@ const ms = ({
4539
4524
  ]
4540
4525
  }
4541
4526
  );
4542
- }, Cs = (e) => Object.entries(e), Rs = {
4543
- AND: /* @__PURE__ */ v.jsx(_o, { size: 16, className: "fill-card" }),
4544
- OR: /* @__PURE__ */ v.jsx(Bo, { size: 16, className: "fill-card" }),
4545
- ONE: /* @__PURE__ */ v.jsx(Ho, { size: 14, className: "fill-card" })
4546
- }, qs = {
4527
+ }, qs = (e) => Object.entries(e), Ns = {
4528
+ AND: /* @__PURE__ */ v.jsx(Ho, { size: 16, className: "fill-card" }),
4529
+ OR: /* @__PURE__ */ v.jsx(Mo, { size: 16, className: "fill-card" }),
4530
+ ONE: /* @__PURE__ */ v.jsx(zo, { size: 14, className: "fill-card" })
4531
+ }, ks = {
4547
4532
  AND: "text-green-500 dark:text-green-300/60",
4548
4533
  OR: "text-blue-400 dark:text-blue-500",
4549
4534
  ONE: "text-purple-500 dark:text-purple-300/60"
4550
- }, ks = ({
4535
+ }, Es = ({
4551
4536
  type: e,
4552
4537
  isOpen: n,
4553
4538
  className: t
@@ -4555,13 +4540,13 @@ const ms = ({
4555
4540
  "div",
4556
4541
  {
4557
4542
  className: pe(
4558
- qs[e],
4543
+ ks[e],
4559
4544
  "relative text-sm flex py-2",
4560
4545
  "before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
4561
4546
  t
4562
4547
  ),
4563
4548
  children: /* @__PURE__ */ v.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
4564
- Rs[e],
4549
+ Ns[e],
4565
4550
  /* @__PURE__ */ v.jsx(
4566
4551
  "div",
4567
4552
  {
@@ -4569,12 +4554,12 @@ const ms = ({
4569
4554
  "translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
4570
4555
  !n && "-rotate-90"
4571
4556
  ),
4572
- children: /* @__PURE__ */ v.jsx(Fo, { size: 16 })
4557
+ children: /* @__PURE__ */ v.jsx(Bo, { size: 16 })
4573
4558
  }
4574
4559
  )
4575
4560
  ] })
4576
4561
  }
4577
- ), Ns = (e) => {
4562
+ ), As = (e) => {
4578
4563
  const [n, t] = Se(!0);
4579
4564
  return /* @__PURE__ */ v.jsxs(
4580
4565
  ye.Root,
@@ -4583,17 +4568,17 @@ const ms = ({
4583
4568
  onOpenChange: () => t((o) => !o),
4584
4569
  className: "group",
4585
4570
  children: [
4586
- /* @__PURE__ */ v.jsx(ye.Trigger, { children: /* @__PURE__ */ v.jsx(ks, { type: e.type, isOpen: n }) }),
4571
+ /* @__PURE__ */ v.jsx(ye.Trigger, { children: /* @__PURE__ */ v.jsx(Es, { type: e.type, isOpen: n }) }),
4587
4572
  !n && /* @__PURE__ */ v.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
4588
4573
  /* @__PURE__ */ v.jsx(ye.Content, { children: /* @__PURE__ */ v.jsx(Ge, { schema: e.schema, level: e.level + 1 }) })
4589
4574
  ]
4590
4575
  }
4591
4576
  );
4592
- }, Es = {
4577
+ }, Is = {
4593
4578
  AND: "All of",
4594
4579
  OR: "Any of",
4595
4580
  ONE: "One of"
4596
- }, As = ({
4581
+ }, Ls = ({
4597
4582
  schemas: e,
4598
4583
  type: n,
4599
4584
  isOpen: t,
@@ -4601,22 +4586,22 @@ const ms = ({
4601
4586
  toggleOpen: s
4602
4587
  }) => /* @__PURE__ */ v.jsx(ye.Root, { open: t, onOpenChange: s, asChild: !0, children: /* @__PURE__ */ v.jsxs(xe, { className: "px-6", children: [
4603
4588
  /* @__PURE__ */ v.jsxs(ye.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
4604
- t ? /* @__PURE__ */ v.jsx(Mo, { size: 14 }) : /* @__PURE__ */ v.jsx(zo, { size: 14 }),
4605
- /* @__PURE__ */ v.jsx("span", { children: Es[n] })
4589
+ t ? /* @__PURE__ */ v.jsx(Go, { size: 14 }) : /* @__PURE__ */ v.jsx(Wo, { size: 14 }),
4590
+ /* @__PURE__ */ v.jsx("span", { children: Is[n] })
4606
4591
  ] }),
4607
- /* @__PURE__ */ v.jsx(ye.Content, { className: "pb-4", children: e.map((c, r) => (
4592
+ /* @__PURE__ */ v.jsx(ye.Content, { className: "pb-4", children: e.map((l, r) => (
4608
4593
  // eslint-disable-next-line react/no-array-index-key
4609
4594
  /* @__PURE__ */ v.jsx(
4610
- Ns,
4595
+ As,
4611
4596
  {
4612
4597
  type: n,
4613
- schema: c,
4598
+ schema: l,
4614
4599
  level: o
4615
4600
  },
4616
4601
  r
4617
4602
  )
4618
4603
  )) })
4619
- ] }) }), Is = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), yr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Ls = {
4604
+ ] }) }), Us = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), yr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Fs = {
4620
4605
  allOf: "AND",
4621
4606
  anyOf: "OR",
4622
4607
  oneOf: "ONE"
@@ -4624,34 +4609,34 @@ const ms = ({
4624
4609
  schema: e,
4625
4610
  level: n
4626
4611
  }) => {
4627
- const [t, o] = Se(!0), s = Qo(() => o((c) => !c), []);
4628
- for (const [c, r] of Cs(Ls))
4629
- if (e[c])
4612
+ const [t, o] = Se(!0), s = Yo(() => o((l) => !l), []);
4613
+ for (const [l, r] of qs(Fs))
4614
+ if (e[l])
4630
4615
  return /* @__PURE__ */ v.jsx(
4631
- As,
4616
+ Ls,
4632
4617
  {
4633
- schemas: e[c],
4618
+ schemas: e[l],
4634
4619
  type: r,
4635
4620
  isOpen: t,
4636
4621
  toggleOpen: s,
4637
4622
  level: n
4638
4623
  }
4639
4624
  );
4640
- }, Us = (e) => e === Yo, Fs = () => /* @__PURE__ */ v.jsxs("div", { className: "flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
4641
- /* @__PURE__ */ v.jsx(Wo, { size: 16 }),
4625
+ }, _s = (e) => e === Zo, Bs = () => /* @__PURE__ */ v.jsxs("div", { className: "flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
4626
+ /* @__PURE__ */ v.jsx(Vo, { size: 16 }),
4642
4627
  /* @__PURE__ */ v.jsx("span", { children: "recursive" })
4643
- ] }), _s = ({
4628
+ ] }), Hs = ({
4644
4629
  name: e,
4645
4630
  schema: n,
4646
4631
  group: t,
4647
4632
  level: o,
4648
4633
  defaultOpen: s = !1,
4649
- showCollapseButton: c = !0
4634
+ showCollapseButton: l = !0
4650
4635
  }) => {
4651
4636
  const [r, a] = Se(s);
4652
- return Us(n) ? /* @__PURE__ */ v.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ v.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ v.jsxs("div", { className: "flex gap-2 items-center", children: [
4637
+ return _s(n) ? /* @__PURE__ */ v.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ v.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ v.jsxs("div", { className: "flex gap-2 items-center", children: [
4653
4638
  /* @__PURE__ */ v.jsx("code", { children: e }),
4654
- /* @__PURE__ */ v.jsx(Fs, {})
4639
+ /* @__PURE__ */ v.jsx(Bs, {})
4655
4640
  ] }) }) }) : /* @__PURE__ */ v.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ v.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
4656
4641
  /* @__PURE__ */ v.jsxs("div", { className: "flex gap-2 items-center", children: [
4657
4642
  /* @__PURE__ */ v.jsx("code", { children: e }),
@@ -4668,21 +4653,21 @@ const ms = ({
4668
4653
  content: n.description
4669
4654
  }
4670
4655
  ),
4671
- (yr(n) || Is(n)) && /* @__PURE__ */ v.jsxs(
4656
+ (yr(n) || Us(n)) && /* @__PURE__ */ v.jsxs(
4672
4657
  ye.Root,
4673
4658
  {
4674
4659
  defaultOpen: s,
4675
4660
  open: r,
4676
4661
  onOpenChange: () => a(!r),
4677
4662
  children: [
4678
- c && /* @__PURE__ */ v.jsx(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ v.jsxs(
4663
+ l && /* @__PURE__ */ v.jsx(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ v.jsxs(
4679
4664
  no,
4680
4665
  {
4681
4666
  variant: "outline",
4682
4667
  size: "sm",
4683
4668
  className: "mt-2 flex gap-1.5",
4684
4669
  children: [
4685
- /* @__PURE__ */ v.jsx(Go, { size: 18 }),
4670
+ /* @__PURE__ */ v.jsx(Jo, { size: 18 }),
4686
4671
  r ? "Hide nested properties" : "Show nested properties"
4687
4672
  ]
4688
4673
  }
@@ -4699,9 +4684,9 @@ const ms = ({
4699
4684
  }) => {
4700
4685
  if (!e || Object.keys(e).length === 0)
4701
4686
  return /* @__PURE__ */ v.jsx(xe, { className: "p-4", children: /* @__PURE__ */ v.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
4702
- const o = (s, c) => {
4687
+ const o = (s, l) => {
4703
4688
  if (yr(s))
4704
- return /* @__PURE__ */ v.jsx($o, { schema: s, level: c });
4689
+ return /* @__PURE__ */ v.jsx($o, { schema: s, level: l });
4705
4690
  if (s.type === "array" && s.items) {
4706
4691
  const r = s.items;
4707
4692
  return typeof r.type == "string" && ["string", "number", "boolean", "integer"].includes(r.type) ? /* @__PURE__ */ v.jsxs(xe, { className: "p-4", children: [
@@ -4721,8 +4706,8 @@ const ms = ({
4721
4706
  )
4722
4707
  ] }) : r.type === "object" ? /* @__PURE__ */ v.jsxs(xe, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
4723
4708
  /* @__PURE__ */ v.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
4724
- o(r, c + 1)
4725
- ] }) : o(r, c + 1);
4709
+ o(r, l + 1)
4710
+ ] }) : o(r, l + 1);
4726
4711
  }
4727
4712
  if (s.type === "object" && (!s.properties || Object.keys(s.properties).length === 0))
4728
4713
  return /* @__PURE__ */ v.jsxs(xe, { className: "p-4 flex gap-2 items-center", children: [
@@ -4742,22 +4727,22 @@ const ms = ({
4742
4727
  if (s.properties) {
4743
4728
  const r = io(
4744
4729
  Object.entries(s.properties),
4745
- ([i, l]) => {
4730
+ ([i, c]) => {
4746
4731
  var h;
4747
- return l.deprecated ? "deprecated" : (h = s.required) != null && h.includes(i) ? "required" : "optional";
4732
+ return c.deprecated ? "deprecated" : (h = s.required) != null && h.includes(i) ? "required" : "optional";
4748
4733
  }
4749
4734
  ), a = ["required", "optional", "deprecated"];
4750
4735
  return /* @__PURE__ */ v.jsx(xe, { className: "divide-y overflow-hidden", children: a.map(
4751
- (i) => r[i] && /* @__PURE__ */ v.jsx("ul", { className: "divide-y", children: r[i].map(([l, h]) => /* @__PURE__ */ v.jsx(
4752
- _s,
4736
+ (i) => r[i] && /* @__PURE__ */ v.jsx("ul", { className: "divide-y", children: r[i].map(([c, h]) => /* @__PURE__ */ v.jsx(
4737
+ Hs,
4753
4738
  {
4754
- name: l,
4739
+ name: c,
4755
4740
  schema: h,
4756
4741
  group: i,
4757
- level: c,
4742
+ level: l,
4758
4743
  defaultOpen: t
4759
4744
  },
4760
- l
4745
+ c
4761
4746
  )) }, i)
4762
4747
  ) });
4763
4748
  }
@@ -4774,23 +4759,23 @@ const ms = ({
4774
4759
  }
4775
4760
  )
4776
4761
  ] }) : s.additionalProperties ? /* @__PURE__ */ v.jsxs(xe, { className: "my-2", children: [
4777
- /* @__PURE__ */ v.jsx(aa, { children: /* @__PURE__ */ v.jsx(ia, { children: "Additional Properties:" }) }),
4778
- /* @__PURE__ */ v.jsx(sa, { children: o(
4762
+ /* @__PURE__ */ v.jsx(sa, { children: /* @__PURE__ */ v.jsx(la, { children: "Additional Properties:" }) }),
4763
+ /* @__PURE__ */ v.jsx(ca, { children: o(
4779
4764
  s.additionalProperties,
4780
- c + 1
4765
+ l + 1
4781
4766
  ) })
4782
4767
  ] }) : null;
4783
4768
  };
4784
4769
  return o(e, n);
4785
- }, Bs = ["path", "query", "header", "cookie"], Hs = ({
4770
+ }, Ms = ["path", "query", "header", "cookie"], zs = ({
4786
4771
  operationFragment: e,
4787
4772
  serverUrl: n
4788
4773
  }) => {
4789
- var i, l, h;
4790
- const t = fa(zs, e), o = io(
4774
+ var i, c, h;
4775
+ const t = da(Ws, e), o = io(
4791
4776
  t.parameters ?? [],
4792
4777
  (f) => f.in
4793
- ), s = vr(null), c = t.responses.at(0), [r, a] = Se(c == null ? void 0 : c.statusCode);
4778
+ ), s = vr(null), l = t.responses.at(0), [r, a] = Se(l == null ? void 0 : l.statusCode);
4794
4779
  return /* @__PURE__ */ v.jsxs(
4795
4780
  "div",
4796
4781
  {
@@ -4827,11 +4812,11 @@ const ms = ({
4827
4812
  content: t.description
4828
4813
  }
4829
4814
  ),
4830
- t.parameters && t.parameters.length > 0 && /* @__PURE__ */ v.jsx(v.Fragment, { children: Bs.flatMap(
4815
+ t.parameters && t.parameters.length > 0 && /* @__PURE__ */ v.jsx(v.Fragment, { children: Ms.flatMap(
4831
4816
  (f) => {
4832
4817
  var u;
4833
4818
  return (u = o[f]) != null && u.length ? /* @__PURE__ */ v.jsx(
4834
- ga,
4819
+ ba,
4835
4820
  {
4836
4821
  id: t.slug,
4837
4822
  parameters: o[f],
@@ -4841,7 +4826,7 @@ const ms = ({
4841
4826
  ) : [];
4842
4827
  }
4843
4828
  ) }),
4844
- ha((h = (l = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : l.at(0)) == null ? void 0 : h.schema, (f) => /* @__PURE__ */ v.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4829
+ ma((h = (c = (i = t.requestBody) == null ? void 0 : i.content) == null ? void 0 : c.at(0)) == null ? void 0 : h.schema, (f) => /* @__PURE__ */ v.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4845
4830
  /* @__PURE__ */ v.jsx(
4846
4831
  He,
4847
4832
  {
@@ -4866,13 +4851,13 @@ const ms = ({
4866
4851
  }
4867
4852
  ),
4868
4853
  /* @__PURE__ */ v.jsxs(
4869
- ea,
4854
+ ra,
4870
4855
  {
4871
4856
  onValueChange: (f) => a(f),
4872
4857
  value: r,
4873
4858
  children: [
4874
- t.responses.length > 1 && /* @__PURE__ */ v.jsx(ta, { children: t.responses.map((f) => /* @__PURE__ */ v.jsx(
4875
- ra,
4859
+ t.responses.length > 1 && /* @__PURE__ */ v.jsx(na, { children: t.responses.map((f) => /* @__PURE__ */ v.jsx(
4860
+ oa,
4876
4861
  {
4877
4862
  value: f.statusCode,
4878
4863
  title: f.description ?? void 0,
@@ -4883,7 +4868,7 @@ const ms = ({
4883
4868
  /* @__PURE__ */ v.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
4884
4869
  var u, m;
4885
4870
  return /* @__PURE__ */ v.jsx(
4886
- na,
4871
+ aa,
4887
4872
  {
4888
4873
  value: f.statusCode,
4889
4874
  children: /* @__PURE__ */ v.jsx(
@@ -4902,7 +4887,7 @@ const ms = ({
4902
4887
  ] })
4903
4888
  ] }),
4904
4889
  /* @__PURE__ */ v.jsx(
4905
- Ps,
4890
+ Rs,
4906
4891
  {
4907
4892
  selectedResponse: r,
4908
4893
  onSelectResponse: a,
@@ -4914,10 +4899,10 @@ const ms = ({
4914
4899
  t.operationId
4915
4900
  );
4916
4901
  };
4917
- function Ms(e, n = 160) {
4902
+ function Gs(e, n = 160) {
4918
4903
  return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, n).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;") : "";
4919
4904
  }
4920
- const zs = tt(
4905
+ const Ws = tt(
4921
4906
  /* GraphQL */
4922
4907
  `
4923
4908
  fragment OperationsFragment on OperationItem {
@@ -4982,7 +4967,7 @@ const zs = tt(
4982
4967
  }
4983
4968
  }
4984
4969
  `
4985
- ), Gs = tt(
4970
+ ), Js = tt(
4986
4971
  /* GraphQL */
4987
4972
  `
4988
4973
  query AllOperations($input: JSON!, $type: SchemaType!) {
@@ -5003,8 +4988,8 @@ const zs = tt(
5003
4988
  }
5004
4989
  }
5005
4990
  `
5006
- ), dc = () => {
5007
- const { input: e, type: n, versions: t, version: o } = br(), s = $r(Gs, { input: e, type: n }), { selectedServer: c } = gr(), r = mr(s), a = r.data.schema.title, i = r.data.schema.summary, l = r.data.schema.description, h = Ro(), f = i || (l ? Ms(l) : void 0);
4991
+ ), yl = () => {
4992
+ const { input: e, type: n, versions: t, version: o } = br(), s = $r(Js, { input: e, type: n }), { selectedServer: l } = gr(), r = mr(s), a = r.data.schema.title, i = r.data.schema.summary, c = r.data.schema.description, h = Ro(), f = i || (c ? Gs(c) : void 0);
5008
4993
  return /* @__PURE__ */ v.jsxs("div", { className: "pt-[--padding-content-top]", children: [
5009
4994
  /* @__PURE__ */ v.jsxs(Po, { children: [
5010
4995
  /* @__PURE__ */ v.jsx("title", { children: a }),
@@ -5026,7 +5011,7 @@ const zs = tt(
5026
5011
  onValueChange: (u) => h(t[u]),
5027
5012
  defaultValue: o,
5028
5013
  children: [
5029
- /* @__PURE__ */ v.jsx(ko, { className: "w-[180px]", children: /* @__PURE__ */ v.jsx(No, { placeholder: "Select version" }) }),
5014
+ /* @__PURE__ */ v.jsx(No, { className: "w-[180px]", children: /* @__PURE__ */ v.jsx(ko, { placeholder: "Select version" }) }),
5030
5015
  /* @__PURE__ */ v.jsx(Eo, { children: Object.entries(t).map(([u]) => /* @__PURE__ */ v.jsx(Ao, { value: u, children: u }, u)) })
5031
5016
  ]
5032
5017
  }
@@ -5037,7 +5022,7 @@ const zs = tt(
5037
5022
  }
5038
5023
  ),
5039
5024
  /* @__PURE__ */ v.jsx("hr", {}),
5040
- /* @__PURE__ */ v.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ v.jsx(da, {}) }),
5025
+ /* @__PURE__ */ v.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ v.jsx(ya, {}) }),
5041
5026
  r.data.schema.tags.filter((u) => u.operations.length > 0).map((u) => (
5042
5027
  // px, -mx is so that `content-visibility` doesn't cut off overflown heading anchor links '#'
5043
5028
  /* @__PURE__ */ v.jsxs("div", { className: "px-6 -mx-6 [content-visibility:auto]", children: [
@@ -5049,10 +5034,10 @@ const zs = tt(
5049
5034
  content: u.description
5050
5035
  }
5051
5036
  ),
5052
- /* @__PURE__ */ v.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ v.jsx(oa, { children: u.operations.map((m) => /* @__PURE__ */ v.jsx(
5053
- Hs,
5037
+ /* @__PURE__ */ v.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ v.jsx(ia, { children: u.operations.map((m) => /* @__PURE__ */ v.jsx(
5038
+ zs,
5054
5039
  {
5055
- serverUrl: c ?? r.data.schema.url,
5040
+ serverUrl: l ?? r.data.schema.url,
5056
5041
  operationFragment: m
5057
5042
  },
5058
5043
  m.slug
@@ -5062,7 +5047,7 @@ const zs = tt(
5062
5047
  ] });
5063
5048
  };
5064
5049
  export {
5065
- dc as OperationList,
5066
- zs as OperationsFragment
5050
+ yl as OperationList,
5051
+ Ws as OperationsFragment
5067
5052
  };
5068
- //# sourceMappingURL=OperationList-CqLL5P5l.js.map
5053
+ //# sourceMappingURL=OperationList-c6V_vcgz.js.map