@scalar/api-reference 1.25.11 → 1.25.12

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"AAueA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;YAiBxE,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;YAHV,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;AAouBhB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"SecurityScheme.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecurityScheme.vue"],"names":[],"mappings":"AAqhBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;YAkBxE,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;YAHV,SAAS,CAAC,oBAAoB,GAC9B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB;YAC5B,MAAM;;AAixBhB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SecurityScheme.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9d9c4ab4"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a66a7911"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,74 +1,103 @@
1
- import { defineComponent as J, computed as Q, openBlock as n, createBlock as w, withModifiers as X, withCtx as s, unref as u, createElementBlock as P, Fragment as S, createTextVNode as i, toDisplayString as Y, createCommentVNode as f, createVNode as d, createElementVNode as W } from "vue";
2
- import { concatenateUrlAndPath as Z, redirectToProxy as _ } from "@scalar/oas-utils/helpers";
3
- import { useToasts as x } from "@scalar/use-toasts";
4
- import ee from "./CardForm.vue.js";
5
- import te from "./CardFormButton.vue.js";
6
- import b from "./CardFormGroup.vue.js";
1
+ import { defineComponent as Q, computed as X, openBlock as l, createBlock as f, withModifiers as Y, withCtx as o, unref as u, createElementBlock as g, Fragment as P, createTextVNode as i, toDisplayString as Z, createCommentVNode as w, createVNode as c, createElementVNode as W } from "vue";
2
+ import { concatenateUrlAndPath as _, redirectToProxy as x } from "@scalar/oas-utils/helpers";
3
+ import { useToasts as ee } from "@scalar/use-toasts";
4
+ import { apiClientBus as C } from "../../components/api-client-bus.js";
5
+ import te from "./CardForm.vue.js";
6
+ import ae from "./CardFormButton.vue.js";
7
+ import S from "./CardFormGroup.vue.js";
7
8
  import j from "./CardFormRows.vue.js";
8
9
  import v from "./CardFormTextInput.vue.js";
9
- import K from "./SecuritySchemeScopes.vue.js";
10
- import { useServerStore as ae } from "../stores/useServerStore.js";
10
+ import R from "./SecuritySchemeScopes.vue.js";
11
+ import { useServerStore as re } from "../stores/useServerStore.js";
11
12
  import { getUrlFromServerState as oe } from "../helpers/getUrlFromServerState.js";
12
13
  import { useAuthenticationStore as se } from "../stores/useAuthenticationStore.js";
13
- const Ae = /* @__PURE__ */ J({
14
+ const ke = /* @__PURE__ */ Q({
14
15
  __name: "SecurityScheme",
15
16
  props: {
16
17
  value: {},
17
18
  proxy: {}
18
19
  },
19
- setup(re) {
20
- const { toast: R } = x(), { server: L } = ae(), { authentication: t, setAuthentication: p } = se(), N = (e) => {
20
+ setup(ue) {
21
+ const { toast: L } = ee(), { server: N } = re(), { authentication: t, setAuthentication: p } = se(), V = (e) => {
22
+ const a = e.target.value;
21
23
  p({
22
24
  apiKey: {
23
25
  ...t.apiKey,
24
- token: e.target.value
26
+ token: a
27
+ }
28
+ }), t.preferredSecurityScheme && C.emit({
29
+ updateAuth: {
30
+ nameKey: t.preferredSecurityScheme,
31
+ propertyKey: "value",
32
+ value: a
25
33
  }
26
34
  });
27
- }, V = (e) => {
35
+ }, D = (e) => {
36
+ const a = e.target.value;
28
37
  p({
29
38
  http: {
30
39
  ...t.http,
31
40
  basic: {
32
41
  ...t.http.basic,
33
- username: e.target.value
42
+ username: a
34
43
  }
35
44
  }
45
+ }), t.preferredSecurityScheme && C.emit({
46
+ updateAuth: {
47
+ nameKey: t.preferredSecurityScheme,
48
+ propertyKey: "username",
49
+ value: a
50
+ }
36
51
  });
37
- }, D = (e) => {
52
+ }, E = (e) => {
53
+ const a = e.target.value;
38
54
  p({
39
55
  http: {
40
56
  ...t.http,
41
57
  basic: {
42
58
  ...t.http.basic,
43
- password: e.target.value
59
+ password: a
44
60
  }
45
61
  }
62
+ }), t.preferredSecurityScheme && C.emit({
63
+ updateAuth: {
64
+ nameKey: t.preferredSecurityScheme,
65
+ propertyKey: "password",
66
+ value: a
67
+ }
46
68
  });
47
- }, E = (e) => {
69
+ }, H = (e) => {
70
+ const a = e.target.value;
48
71
  p({
49
72
  http: {
50
73
  ...t.http,
51
74
  bearer: {
52
75
  ...t.http.bearer,
53
- token: e.target.value
76
+ token: a
54
77
  }
55
78
  }
79
+ }), t.preferredSecurityScheme && C.emit({
80
+ updateAuth: {
81
+ nameKey: t.preferredSecurityScheme,
82
+ propertyKey: "token",
83
+ value: a
84
+ }
56
85
  });
57
- }, C = (e) => {
86
+ }, T = (e) => {
58
87
  p({
59
88
  oAuth2: {
60
89
  ...t.oAuth2,
61
90
  clientId: e.target.value
62
91
  }
63
92
  });
64
- }, H = (e) => {
93
+ }, M = (e) => {
65
94
  p({
66
95
  oAuth2: {
67
96
  ...t.oAuth2,
68
97
  username: e.target.value
69
98
  }
70
99
  });
71
- }, M = (e) => {
100
+ }, G = (e) => {
72
101
  p({
73
102
  oAuth2: {
74
103
  ...t.oAuth2,
@@ -76,58 +105,58 @@ const Ae = /* @__PURE__ */ J({
76
105
  }
77
106
  });
78
107
  };
79
- function G(e) {
80
- const a = t.oAuth2.scopes.join(" "), l = (Math.random() + 1).toString(36).substring(7), o = new URL(e.authorizationUrl);
108
+ function $(e) {
109
+ const a = t.oAuth2.scopes.join(" "), n = (Math.random() + 1).toString(36).substring(7), r = new URL(e.authorizationUrl);
81
110
  return p({
82
- oAuth2: { ...t.oAuth2, state: l }
83
- }), o.searchParams.set("response_type", "token"), o.searchParams.set("client_id", t.oAuth2.clientId), o.searchParams.set("redirect_uri", window.location.href), o.searchParams.set("scope", a), o.searchParams.set("state", l), o.toString();
111
+ oAuth2: { ...t.oAuth2, state: n }
112
+ }), r.searchParams.set("response_type", "token"), r.searchParams.set("client_id", t.oAuth2.clientId), r.searchParams.set("redirect_uri", window.location.href), r.searchParams.set("scope", a), r.searchParams.set("state", n), r.toString();
84
113
  }
85
- function $(e, a) {
114
+ function q(e, a) {
86
115
  if (typeof e != "string") {
87
116
  console.log("tokenUrl is not a string");
88
117
  return;
89
118
  }
90
- const l = a != null && a.baseUrl && !e.startsWith("http") ? Z(a == null ? void 0 : a.baseUrl, e) : e, o = new URL(l);
91
- o.searchParams.set("grant_type", "password"), o.searchParams.set("username", t.oAuth2.username), o.searchParams.set("password", t.oAuth2.password), o.searchParams.set("client_id", t.oAuth2.clientId), o.searchParams.set("scope", t.oAuth2.scopes.join(" ")), fetch(
92
- a != null && a.proxy ? _(a == null ? void 0 : a.proxy, o.toString()) : o.toString(),
119
+ const n = a != null && a.baseUrl && !e.startsWith("http") ? _(a == null ? void 0 : a.baseUrl, e) : e, r = new URL(n);
120
+ r.searchParams.set("grant_type", "password"), r.searchParams.set("username", t.oAuth2.username), r.searchParams.set("password", t.oAuth2.password), r.searchParams.set("client_id", t.oAuth2.clientId), r.searchParams.set("scope", t.oAuth2.scopes.join(" ")), fetch(
121
+ a != null && a.proxy ? x(a == null ? void 0 : a.proxy, r.toString()) : r.toString(),
93
122
  {
94
123
  method: "POST",
95
124
  headers: {
96
125
  "Content-Type": "application/x-www-form-urlencoded"
97
126
  }
98
127
  }
99
- ).then((r) => {
100
- if (!r.ok)
128
+ ).then((s) => {
129
+ if (!s.ok)
101
130
  throw new Error(
102
131
  "Failed to get an access token. Please check your credentials."
103
132
  );
104
- return r.json();
105
- }).then((r) => {
133
+ return s.json();
134
+ }).then((s) => {
106
135
  p({
107
- oAuth2: { ...t.oAuth2, accessToken: r.access_token }
136
+ oAuth2: { ...t.oAuth2, accessToken: s.access_token }
108
137
  });
109
- }).catch((r) => {
110
- R("Couldn’t retrieve the password grant token", "warn", {
138
+ }).catch((s) => {
139
+ L("Couldn’t retrieve the password grant token", "warn", {
111
140
  description: "Open your browser console to get more information."
112
- }), console.error("[authorizeWithPassword]", r);
141
+ }), console.error("[authorizeWithPassword]", s);
113
142
  });
114
143
  }
115
- const I = Q({
144
+ const b = X({
116
145
  get: () => t.oAuth2.scopes,
117
146
  set: (e) => p({ oAuth2: { ...t.oAuth2, scopes: e } })
118
- }), q = (e) => {
119
- const l = window.open(e, "openAuth2Window", "left=100,top=100,width=800,height=600");
120
- if (l) {
121
- const o = setInterval(function() {
122
- var r;
147
+ }), J = (e) => {
148
+ const n = window.open(e, "openAuth2Window", "left=100,top=100,width=800,height=600");
149
+ if (n) {
150
+ const r = setInterval(function() {
151
+ var s;
123
152
  try {
124
- const h = new URLSearchParams(l.location.href).get("access_token");
125
- if (l.closed || h) {
126
- clearInterval(o);
127
- const m = (r = l.location.href.match(/state=([^&]*)/)) == null ? void 0 : r[1];
153
+ const h = new URLSearchParams(n.location.href).get("access_token");
154
+ if (n.closed || h) {
155
+ clearInterval(r);
156
+ const m = (s = n.location.href.match(/state=([^&]*)/)) == null ? void 0 : s[1];
128
157
  h && t.oAuth2.state === m && p({
129
158
  oAuth2: { ...t.oAuth2, accessToken: h }
130
- }), l.close();
159
+ }), n.close();
131
160
  }
132
161
  } catch {
133
162
  }
@@ -135,90 +164,90 @@ const Ae = /* @__PURE__ */ J({
135
164
  }
136
165
  };
137
166
  return (e, a) => {
138
- var l;
139
- return e.value && ((l = e.value) != null && l.type) ? (n(), w(ee, {
167
+ var n;
168
+ return e.value && ((n = e.value) != null && n.type) ? (l(), f(te, {
140
169
  key: 0,
141
- onSubmit: a[5] || (a[5] = X(() => {
170
+ onSubmit: a[5] || (a[5] = Y(() => {
142
171
  }, ["prevent"]))
143
172
  }, {
144
- default: s(() => [
145
- e.value.type === "apiKey" ? (n(), w(v, {
173
+ default: o(() => [
174
+ e.value.type === "apiKey" ? (l(), f(v, {
146
175
  key: 0,
147
176
  id: `security-scheme-${e.value.name}`,
148
177
  placeholder: "Token",
149
178
  type: "password",
150
179
  value: u(t).apiKey.token,
151
- onInput: N
180
+ onInput: V
152
181
  }, {
153
- default: s(() => {
154
- var o, r, c;
182
+ default: o(() => {
183
+ var r, s, d;
155
184
  return [
156
- e.value.in ? (n(), P(S, { key: 0 }, [
157
- i(Y(((r = (o = e.value.in) == null ? void 0 : o.charAt(0)) == null ? void 0 : r.toUpperCase()) + ((c = e.value.in) == null ? void 0 : c.slice(1))), 1)
158
- ], 64)) : f("", !0),
185
+ e.value.in ? (l(), g(P, { key: 0 }, [
186
+ i(Z(((s = (r = e.value.in) == null ? void 0 : r.charAt(0)) == null ? void 0 : s.toUpperCase()) + ((d = e.value.in) == null ? void 0 : d.slice(1))), 1)
187
+ ], 64)) : w("", !0),
159
188
  i(" API ")
160
189
  ];
161
190
  }),
162
191
  _: 1
163
- }, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (n(), P(S, { key: 1 }, [
164
- e.value.type === "basic" || e.value.scheme === "basic" ? (n(), w(b, { key: 0 }, {
165
- default: s(() => [
166
- d(v, {
192
+ }, 8, ["id", "value"])) : e.value.type === "http" || e.value.type === "basic" ? (l(), g(P, { key: 1 }, [
193
+ e.value.type === "basic" || e.value.scheme === "basic" ? (l(), f(S, { key: 0 }, {
194
+ default: o(() => [
195
+ c(v, {
167
196
  id: "http.basic.username",
168
197
  placeholder: "Username",
169
198
  value: u(t).http.basic.username,
170
- onInput: V
199
+ onInput: D
171
200
  }, {
172
- default: s(() => [
201
+ default: o(() => [
173
202
  i(" Username ")
174
203
  ]),
175
204
  _: 1
176
205
  }, 8, ["value"]),
177
- d(v, {
206
+ c(v, {
178
207
  id: "http.basic.password",
179
208
  placeholder: "Password",
180
209
  type: "password",
181
210
  value: u(t).http.basic.password,
182
- onInput: D
211
+ onInput: E
183
212
  }, {
184
- default: s(() => [
213
+ default: o(() => [
185
214
  i(" Password ")
186
215
  ]),
187
216
  _: 1
188
217
  }, 8, ["value"])
189
218
  ]),
190
219
  _: 1
191
- })) : e.value.type === "http" && e.value.scheme === "bearer" ? (n(), w(v, {
220
+ })) : e.value.type === "http" && e.value.scheme === "bearer" ? (l(), f(v, {
192
221
  key: 1,
193
222
  id: "http.bearer.token",
194
223
  placeholder: "Token",
195
224
  type: "password",
196
225
  value: u(t).http.bearer.token,
197
- onInput: E
226
+ onInput: H
198
227
  }, {
199
- default: s(() => [
228
+ default: o(() => [
200
229
  i(" Bearer Token ")
201
230
  ]),
202
231
  _: 1
203
- }, 8, ["value"])) : f("", !0)
204
- ], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (n(), w(b, { key: 2 }, {
205
- default: s(() => {
206
- var o, r;
232
+ }, 8, ["value"])) : w("", !0)
233
+ ], 64)) : e.value.type.toLowerCase() === "oauth2" && e.value.flows ? (l(), f(S, { key: 2 }, {
234
+ default: o(() => {
235
+ var r, s;
207
236
  return [
208
- e.value.flows.implicit ? (n(), P(S, { key: 0 }, [
209
- u(t).oAuth2.accessToken ? (n(), P(S, { key: 0 }, [
210
- d(v, {
237
+ e.value.flows.implicit ? (l(), g(P, { key: 0 }, [
238
+ u(t).oAuth2.accessToken ? (l(), g(P, { key: 0 }, [
239
+ c(v, {
211
240
  id: "oAuth2.accessToken",
212
241
  placeholder: "xxxxx",
213
242
  type: "password",
214
243
  value: u(t).oAuth2.accessToken
215
244
  }, {
216
- default: s(() => [
245
+ default: o(() => [
217
246
  i(" Access Token ")
218
247
  ]),
219
248
  _: 1
220
249
  }, 8, ["value"]),
221
- d(te, {
250
+ c(ae, {
222
251
  onClick: a[0] || (a[0] = () => u(p)({
223
252
  oAuth2: {
224
253
  ...u(t).oAuth2,
@@ -227,36 +256,36 @@ const Ae = /* @__PURE__ */ J({
227
256
  }
228
257
  }))
229
258
  }, {
230
- default: s(() => [
259
+ default: o(() => [
231
260
  i(" Reset ")
232
261
  ]),
233
262
  _: 1
234
263
  })
235
- ], 64)) : f("", !0)
236
- ], 64)) : f("", !0),
237
- (r = (o = e.value) == null ? void 0 : o.flows) != null && r.password ? (n(), w(j, { key: 1 }, {
238
- default: s(() => [
239
- d(b, null, {
240
- default: s(() => [
241
- d(v, {
264
+ ], 64)) : w("", !0)
265
+ ], 64)) : w("", !0),
266
+ (s = (r = e.value) == null ? void 0 : r.flows) != null && s.password ? (l(), f(j, { key: 1 }, {
267
+ default: o(() => [
268
+ c(S, null, {
269
+ default: o(() => [
270
+ c(v, {
242
271
  id: "oAuth2.username",
243
272
  placeholder: "Username",
244
273
  value: u(t).oAuth2.username,
245
- onInput: H
274
+ onInput: M
246
275
  }, {
247
- default: s(() => [
276
+ default: o(() => [
248
277
  i(" Username ")
249
278
  ]),
250
279
  _: 1
251
280
  }, 8, ["value"]),
252
- d(v, {
281
+ c(v, {
253
282
  id: "oAuth2.password",
254
283
  placeholder: "Password",
255
284
  type: "password",
256
285
  value: u(t).oAuth2.password,
257
- onInput: M
286
+ onInput: G
258
287
  }, {
259
- default: s(() => [
288
+ default: o(() => [
260
289
  i(" Password ")
261
290
  ]),
262
291
  _: 1
@@ -264,39 +293,39 @@ const Ae = /* @__PURE__ */ J({
264
293
  ]),
265
294
  _: 1
266
295
  }),
267
- d(b, null, {
268
- default: s(() => {
269
- var c, h, m, A, y, k, T, U, F, B, O;
296
+ c(S, null, {
297
+ default: o(() => {
298
+ var d, h, m, y, A, k, U, K, F, B, O;
270
299
  return [
271
- d(v, {
300
+ c(v, {
272
301
  id: "oAuth2.clientId",
273
302
  placeholder: "12345",
274
303
  type: "text",
275
304
  value: u(t).oAuth2.clientId,
276
- onInput: C
305
+ onInput: T
277
306
  }, {
278
- default: s(() => [
307
+ default: o(() => [
279
308
  i(" Client ID ")
280
309
  ]),
281
310
  _: 1
282
311
  }, 8, ["value"]),
283
312
  e.value !== void 0 && Object.entries(
284
- ((m = (h = (c = e.value) == null ? void 0 : c.flows) == null ? void 0 : h.implicit) == null ? void 0 : m.scopes) ?? ((k = (y = (A = e.value) == null ? void 0 : A.flows) == null ? void 0 : y.password) == null ? void 0 : k.scopes) ?? {}
285
- ).length > 0 ? (n(), w(K, {
313
+ ((m = (h = (d = e.value) == null ? void 0 : d.flows) == null ? void 0 : h.implicit) == null ? void 0 : m.scopes) ?? ((k = (A = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : A.password) == null ? void 0 : k.scopes) ?? {}
314
+ ).length > 0 ? (l(), f(R, {
286
315
  key: 0,
287
- selected: I.value,
288
- "onUpdate:selected": a[1] || (a[1] = (g) => I.value = g),
289
- scopes: ((F = (U = (T = e.value) == null ? void 0 : T.flows) == null ? void 0 : U.implicit) == null ? void 0 : F.scopes) ?? ((O = (B = e.value) == null ? void 0 : B.flows) == null ? void 0 : O.password.scopes)
290
- }, null, 8, ["selected", "scopes"])) : f("", !0),
316
+ selected: b.value,
317
+ "onUpdate:selected": a[1] || (a[1] = (I) => b.value = I),
318
+ scopes: ((F = (K = (U = e.value) == null ? void 0 : U.flows) == null ? void 0 : K.implicit) == null ? void 0 : F.scopes) ?? ((O = (B = e.value) == null ? void 0 : B.flows) == null ? void 0 : O.password.scopes)
319
+ }, null, 8, ["selected", "scopes"])) : w("", !0),
291
320
  W("button", {
292
321
  class: "cardform-auth-button",
293
322
  type: "button",
294
323
  onClick: a[2] || (a[2] = () => {
295
- var g, z;
296
- return $(
297
- (z = (g = e.value.flows) == null ? void 0 : g.password) == null ? void 0 : z.tokenUrl,
324
+ var I, z;
325
+ return q(
326
+ (z = (I = e.value.flows) == null ? void 0 : I.password) == null ? void 0 : z.tokenUrl,
298
327
  {
299
- baseUrl: u(oe)(u(L)),
328
+ baseUrl: u(oe)(u(N)),
300
329
  proxy: e.proxy
301
330
  }
302
331
  );
@@ -308,40 +337,40 @@ const Ae = /* @__PURE__ */ J({
308
337
  })
309
338
  ]),
310
339
  _: 1
311
- })) : (n(), w(j, { key: 2 }, {
312
- default: s(() => [
313
- d(b, null, {
314
- default: s(() => {
315
- var c, h;
340
+ })) : (l(), f(j, { key: 2 }, {
341
+ default: o(() => [
342
+ c(S, null, {
343
+ default: o(() => {
344
+ var d, h;
316
345
  return [
317
- d(v, {
346
+ c(v, {
318
347
  id: "oAuth2.clientId",
319
348
  placeholder: "12345",
320
349
  type: "text",
321
350
  value: u(t).oAuth2.clientId,
322
- onInput: C
351
+ onInput: T
323
352
  }, {
324
- default: s(() => [
353
+ default: o(() => [
325
354
  i(" Client ID ")
326
355
  ]),
327
356
  _: 1
328
357
  }, 8, ["value"]),
329
358
  e.value !== void 0 && Object.entries(
330
- ((c = e.value.flows.implicit) == null ? void 0 : c.scopes) ?? e.value.flows.password.scopes
331
- ).length > 0 ? (n(), w(K, {
359
+ ((d = e.value.flows.implicit) == null ? void 0 : d.scopes) ?? e.value.flows.password.scopes
360
+ ).length > 0 ? (l(), f(R, {
332
361
  key: 0,
333
- selected: I.value,
334
- "onUpdate:selected": a[3] || (a[3] = (m) => I.value = m),
362
+ selected: b.value,
363
+ "onUpdate:selected": a[3] || (a[3] = (m) => b.value = m),
335
364
  scopes: ((h = e.value.flows.implicit) == null ? void 0 : h.scopes) ?? e.value.flows.password.scopes
336
- }, null, 8, ["selected", "scopes"])) : f("", !0),
365
+ }, null, 8, ["selected", "scopes"])) : w("", !0),
337
366
  W("button", {
338
367
  class: "cardform-auth-button",
339
368
  type: "button",
340
369
  onClick: a[4] || (a[4] = () => {
341
- var m, A, y, k;
342
- return q(
343
- G(
344
- ((A = (m = e.value) == null ? void 0 : m.flows) == null ? void 0 : A.implicit) ?? ((k = (y = e.value) == null ? void 0 : y.flows) == null ? void 0 : k.password)
370
+ var m, y, A, k;
371
+ return J(
372
+ $(
373
+ ((y = (m = e.value) == null ? void 0 : m.flows) == null ? void 0 : y.implicit) ?? ((k = (A = e.value) == null ? void 0 : A.flows) == null ? void 0 : k.password)
345
374
  )
346
375
  );
347
376
  })
@@ -356,13 +385,13 @@ const Ae = /* @__PURE__ */ J({
356
385
  ];
357
386
  }),
358
387
  _: 1
359
- })) : f("", !0)
388
+ })) : w("", !0)
360
389
  ]),
361
390
  _: 1
362
- })) : f("", !0);
391
+ })) : w("", !0);
363
392
  };
364
393
  }
365
394
  });
366
395
  export {
367
- Ae as default
396
+ ke as default
368
397
  };
@@ -1,5 +1,5 @@
1
1
  export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
2
- export type RequestMethod = typeof validRequestMethods[number];
2
+ export type RequestMethod = (typeof validRequestMethods)[number];
3
3
  export declare function isRequestMethod(s: string): s is RequestMethod;
4
4
  export declare const requestMethodColors: {
5
5
  [x in RequestMethod]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE/D,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
1
+ {"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { normalizeHeaderName as n } from "./normalizeHeaderName.js";
2
- const f = (a) => {
2
+ const o = (a) => {
3
3
  if (Array.isArray(a)) {
4
4
  const r = /* @__PURE__ */ new Map();
5
5
  return a.forEach((e) => {
@@ -11,12 +11,12 @@ const f = (a) => {
11
11
  }
12
12
  return Object.fromEntries(
13
13
  Object.entries(a ?? {}).reverse().filter(
14
- ([r, e], m, t) => t.findIndex(
15
- ([i, o]) => n(i) === n(r)
16
- ) === m
14
+ ([r], e, m) => m.findIndex(
15
+ ([t]) => n(t) === n(r)
16
+ ) === e
17
17
  ).reverse().map(([r, e]) => [n(r), e])
18
18
  );
19
19
  };
20
20
  export {
21
- f as normalizeHeaders
21
+ o as normalizeHeaders
22
22
  };
@@ -1,4 +1,4 @@
1
- import type { RequestMethod } from '@scalar/oas-utils/helpers';
1
+ import type { RequestMethod } from '@scalar/oas-utils/entities/spec';
2
2
  /**
3
3
  * Get a normalized request method (e.g. GET, POST, etc.)
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAM9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
1
+ {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
2
- const e = "GET", r = (t) => {
2
+ const e = "get", r = (t) => {
3
3
  if (typeof t != "string")
4
4
  return console.warn(
5
5
  `Request method is not a string. Using ${e} as the default.`